statement
stringlengths
1
2.88k
proof
stringlengths
0
13.9k
type
stringclasses
10 values
symbolic_name
stringlengths
1
131
library
stringclasses
417 values
filename
stringlengths
17
80
imports
listlengths
0
16
deps
listlengths
0
64
docstring
stringlengths
0
10.2k
source_url
stringclasses
1 value
commit
stringclasses
1 value
wbtw_swap_right_iff [no_zero_smul_divisors R V] (x : P) {y z : P} : (wbtw R x y z ∧ wbtw R x z y) ↔ y = z
begin nth_rewrite 0 wbtw_comm, nth_rewrite 1 wbtw_comm, rw eq_comm, exact wbtw_swap_left_iff R x end
lemma
wbtw_swap_right_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw", "wbtw_comm", "wbtw_swap_left_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_rotate_iff [no_zero_smul_divisors R V] (x : P) {y z : P} : (wbtw R x y z ∧ wbtw R z x y) ↔ x = y
by rw [wbtw_comm, wbtw_swap_right_iff, eq_comm]
lemma
wbtw_rotate_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw", "wbtw_comm", "wbtw_swap_right_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.swap_left_iff [no_zero_smul_divisors R V] {x y z : P} (h : wbtw R x y z) : wbtw R y x z ↔ x = y
by rw [←wbtw_swap_left_iff R z, and_iff_right h]
lemma
wbtw.swap_left_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.swap_right_iff [no_zero_smul_divisors R V] {x y z : P} (h : wbtw R x y z) : wbtw R x z y ↔ y = z
by rw [←wbtw_swap_right_iff R x, and_iff_right h]
lemma
wbtw.swap_right_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.rotate_iff [no_zero_smul_divisors R V] {x y z : P} (h : wbtw R x y z) : wbtw R z x y ↔ x = y
by rw [←wbtw_rotate_iff R x, and_iff_right h]
lemma
wbtw.rotate_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.not_swap_left [no_zero_smul_divisors R V] {x y z : P} (h : sbtw R x y z) : ¬ wbtw R y x z
λ hs, h.left_ne (h.wbtw.swap_left_iff.1 hs)
lemma
sbtw.not_swap_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.not_swap_right [no_zero_smul_divisors R V] {x y z : P} (h : sbtw R x y z) : ¬ wbtw R x z y
λ hs, h.ne_right (h.wbtw.swap_right_iff.1 hs)
lemma
sbtw.not_swap_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.not_rotate [no_zero_smul_divisors R V] {x y z : P} (h : sbtw R x y z) : ¬ wbtw R z x y
λ hs, h.left_ne (h.wbtw.rotate_iff.1 hs)
lemma
sbtw.not_rotate
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_line_map_iff [no_zero_smul_divisors R V] {x y : P} {r : R} : wbtw R x (line_map x y r) y ↔ x = y ∨ r ∈ set.Icc (0 : R) 1
begin by_cases hxy : x = y, { simp [hxy] }, rw [or_iff_right hxy, wbtw, affine_segment, (line_map_injective R hxy).mem_set_image] end
lemma
wbtw_line_map_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "affine_segment", "no_zero_smul_divisors", "or_iff_right", "set.Icc", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_line_map_iff [no_zero_smul_divisors R V] {x y : P} {r : R} : sbtw R x (line_map x y r) y ↔ x ≠ y ∧ r ∈ set.Ioo (0 : R) 1
begin rw [sbtw_iff_mem_image_Ioo_and_ne, and_comm, and_congr_right], intro hxy, rw (line_map_injective R hxy).mem_set_image end
lemma
sbtw_line_map_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "sbtw_iff_mem_image_Ioo_and_ne", "set.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_mul_sub_add_iff [no_zero_divisors R] {x y r : R} : wbtw R x (r * (y - x) + x) y ↔ x = y ∨ r ∈ set.Icc (0 : R) 1
wbtw_line_map_iff
lemma
wbtw_mul_sub_add_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_divisors", "set.Icc", "wbtw", "wbtw_line_map_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_mul_sub_add_iff [no_zero_divisors R] {x y r : R} : sbtw R x (r * (y - x) + x) y ↔ x ≠ y ∧ r ∈ set.Ioo (0 : R) 1
sbtw_line_map_iff
lemma
sbtw_mul_sub_add_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_divisors", "sbtw", "sbtw_line_map_iff", "set.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_zero_one_iff {x : R} : wbtw R 0 x 1 ↔ x ∈ set.Icc (0 : R) 1
begin simp_rw [wbtw, affine_segment, set.mem_image, line_map_apply_ring], simp end
lemma
wbtw_zero_one_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "affine_segment", "set.Icc", "set.mem_image", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_one_zero_iff {x : R} : wbtw R 1 x 0 ↔ x ∈ set.Icc (0 : R) 1
by rw [wbtw_comm, wbtw_zero_one_iff]
lemma
wbtw_one_zero_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "set.Icc", "wbtw", "wbtw_comm", "wbtw_zero_one_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_zero_one_iff {x : R} : sbtw R 0 x 1 ↔ x ∈ set.Ioo (0 : R) 1
begin rw [sbtw, wbtw_zero_one_iff, set.mem_Icc, set.mem_Ioo], exact ⟨λ h, ⟨h.1.1.lt_of_ne (ne.symm h.2.1), h.1.2.lt_of_ne h.2.2⟩, λ h, ⟨⟨h.1.le, h.2.le⟩, h.1.ne', h.2.ne⟩⟩ end
lemma
sbtw_zero_one_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "set.Ioo", "set.mem_Icc", "set.mem_Ioo", "wbtw_zero_one_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_one_zero_iff {x : R} : sbtw R 1 x 0 ↔ x ∈ set.Ioo (0 : R) 1
by rw [sbtw_comm, sbtw_zero_one_iff]
lemma
sbtw_one_zero_iff
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "sbtw_comm", "sbtw_zero_one_iff", "set.Ioo" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_left {w x y z : P} (h₁ : wbtw R w y z) (h₂ : wbtw R w x y) : wbtw R w x z
begin rcases h₁ with ⟨t₁, ht₁, rfl⟩, rcases h₂ with ⟨t₂, ht₂, rfl⟩, refine ⟨t₂ * t₁, ⟨mul_nonneg ht₂.1 ht₁.1, mul_le_one ht₂.2 ht₁.1 ht₁.2⟩, _⟩, simp [line_map_apply, smul_smul] end
lemma
wbtw.trans_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "mul_le_one", "smul_smul", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_right {w x y z : P} (h₁ : wbtw R w x z) (h₂ : wbtw R x y z) : wbtw R w y z
begin rw wbtw_comm at *, exact h₁.trans_left h₂ end
lemma
wbtw.trans_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw", "wbtw_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_sbtw_left [no_zero_smul_divisors R V] {w x y z : P} (h₁ : wbtw R w y z) (h₂ : sbtw R w x y) : sbtw R w x z
begin refine ⟨h₁.trans_left h₂.wbtw, h₂.ne_left, _⟩, rintro rfl, exact h₂.right_ne ((wbtw_swap_right_iff R w).1 ⟨h₁, h₂.wbtw⟩) end
lemma
wbtw.trans_sbtw_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw", "wbtw_swap_right_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_sbtw_right [no_zero_smul_divisors R V] {w x y z : P} (h₁ : wbtw R w x z) (h₂ : sbtw R x y z) : sbtw R w y z
begin rw wbtw_comm at *, rw sbtw_comm at *, exact h₁.trans_sbtw_left h₂ end
lemma
wbtw.trans_sbtw_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "sbtw_comm", "wbtw", "wbtw_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_left [no_zero_smul_divisors R V] {w x y z : P} (h₁ : sbtw R w y z) (h₂ : sbtw R w x y) : sbtw R w x z
h₁.wbtw.trans_sbtw_left h₂
lemma
sbtw.trans_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_right [no_zero_smul_divisors R V] {w x y z : P} (h₁ : sbtw R w x z) (h₂ : sbtw R x y z) : sbtw R w y z
h₁.wbtw.trans_sbtw_right h₂
lemma
sbtw.trans_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_left_ne [no_zero_smul_divisors R V] {w x y z : P} (h₁ : wbtw R w y z) (h₂ : wbtw R w x y) (h : y ≠ z) : x ≠ z
begin rintro rfl, exact h (h₁.swap_right_iff.1 h₂) end
lemma
wbtw.trans_left_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_right_ne [no_zero_smul_divisors R V] {w x y z : P} (h₁ : wbtw R w x z) (h₂ : wbtw R x y z) (h : w ≠ x) : w ≠ y
begin rintro rfl, exact h (h₁.swap_left_iff.1 h₂) end
lemma
wbtw.trans_right_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_wbtw_left_ne [no_zero_smul_divisors R V] {w x y z : P} (h₁ : sbtw R w y z) (h₂ : wbtw R w x y) : x ≠ z
h₁.wbtw.trans_left_ne h₂ h₁.ne_right
lemma
sbtw.trans_wbtw_left_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_wbtw_right_ne [no_zero_smul_divisors R V] {w x y z : P} (h₁ : sbtw R w x z) (h₂ : wbtw R x y z) : w ≠ y
h₁.wbtw.trans_right_ne h₂ h₁.left_ne
lemma
sbtw.trans_wbtw_right_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "no_zero_smul_divisors", "sbtw", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.affine_combination_of_mem_affine_span_pair [no_zero_divisors R] [no_zero_smul_divisors R V] {ι : Type*} {p : ι → P} (ha : affine_independent R p) {w w₁ w₂ : ι → R} {s : finset ι} (hw : ∑ i in s, w i = 1) (hw₁ : ∑ i in s, w₁ i = 1) (hw₂ : ∑ i in s, w₂ i = 1) (h : s.affine_combination R p w ∈ line[R, s.a...
begin rw affine_combination_mem_affine_span_pair ha hw hw₁ hw₂ at h, rcases h with ⟨r, hr⟩, dsimp only at hr, rw [hr i his, sbtw_mul_sub_add_iff] at hs, change ∀ i ∈ s, w i = ((r • (w₂ - w₁) + w₁) i) at hr, rw s.affine_combination_congr hr (λ _ _, rfl), dsimp only, rw [←s.weighted_vsub_vadd_affine_combi...
lemma
sbtw.affine_combination_of_mem_affine_span_pair
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "affine_combination_mem_affine_span_pair", "affine_independent", "finset", "no_zero_divisors", "no_zero_smul_divisors", "sbtw", "sbtw_line_map_iff", "sbtw_mul_sub_add_iff", "vsub_ne_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.same_ray_vsub {x y z : P} (h : wbtw R x y z) : same_ray R (y -ᵥ x) (z -ᵥ y)
begin rcases h with ⟨t, ⟨ht0, ht1⟩, rfl⟩, simp_rw line_map_apply, rcases ht0.lt_or_eq with ht0' | rfl, swap, { simp }, rcases ht1.lt_or_eq with ht1' | rfl, swap, { simp }, refine or.inr (or.inr ⟨1 - t, t, sub_pos.2 ht1', ht0', _⟩), simp [vsub_vadd_eq_vsub_sub, smul_sub, smul_smul, ←sub_smul], ring_nf end
lemma
wbtw.same_ray_vsub
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "same_ray", "smul_smul", "smul_sub", "vsub_vadd_eq_vsub_sub", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.same_ray_vsub_left {x y z : P} (h : wbtw R x y z) : same_ray R (y -ᵥ x) (z -ᵥ x)
begin rcases h with ⟨t, ⟨ht0, ht1⟩, rfl⟩, simpa [line_map_apply] using same_ray_nonneg_smul_left (z -ᵥ x) ht0 end
lemma
wbtw.same_ray_vsub_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "same_ray", "same_ray_nonneg_smul_left", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.same_ray_vsub_right {x y z : P} (h : wbtw R x y z) : same_ray R (z -ᵥ x) (z -ᵥ y)
begin rcases h with ⟨t, ⟨ht0, ht1⟩, rfl⟩, simpa [line_map_apply, vsub_vadd_eq_vsub_sub, sub_smul] using same_ray_nonneg_smul_right (z -ᵥ x) (sub_nonneg.2 ht1) end
lemma
wbtw.same_ray_vsub_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "same_ray", "same_ray_nonneg_smul_right", "sub_smul", "vsub_vadd_eq_vsub_sub", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_of_sbtw_of_sbtw_of_mem_affine_span_pair [no_zero_smul_divisors R V] {t : affine.triangle R P} {i₁ i₂ i₃ : fin 3} (h₁₂ : i₁ ≠ i₂) {p₁ p₂ p : P} (h₁ : sbtw R (t.points i₂) p₁ (t.points i₃)) (h₂ : sbtw R (t.points i₁) p₂ (t.points i₃)) (h₁' : p ∈ line[R, t.points i₁, p₁]) (h₂' : p ∈ line[R, t.points i₂, p₂]) : ...
begin -- Should not be needed; see comments on local instances in `data.sign`. letI : decidable_rel ((<) : R → R → Prop) := linear_ordered_ring.decidable_lt, have h₁₃ : i₁ ≠ i₃, { rintro rfl, simpa using h₂ }, have h₂₃ : i₂ ≠ i₃, { rintro rfl, simpa using h₁ }, have h3 : ∀ i : fin 3, i = i₁ ∨ i = i₂ ∨ i = i₃,...
lemma
sbtw_of_sbtw_of_sbtw_of_mem_affine_span_pair
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "affine.triangle", "affine_span", "affine_span_mono", "affine_span_pair_le_of_mem_of_mem", "affine_subspace.le_def'", "by_contra", "eq_affine_combination_of_mem_affine_span_of_fintype", "finset", "finset.affine_combination_line_map_weights_apply_of_ne", "finset.affine_combination_single_weights_ap...
Suppose lines from two vertices of a triangle to interior points of the opposite side meet at `p`. Then `p` lies in the interior of the first (and by symmetry the other) segment from a vertex to the point on the opposite side.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_iff_left_eq_or_right_mem_image_Ici {x y z : P} : wbtw R x y z ↔ x = y ∨ z ∈ line_map x y '' (set.Ici (1 : R))
begin refine ⟨λ h, _, λ h, _⟩, { rcases h with ⟨r, ⟨hr0, hr1⟩, rfl⟩, rcases hr0.lt_or_eq with hr0' | rfl, { rw set.mem_image, refine or.inr ⟨r⁻¹, one_le_inv hr0' hr1, _⟩, simp only [line_map_apply, smul_smul, vadd_vsub], rw [inv_mul_cancel hr0'.ne', one_smul, vsub_vadd] }, { simp } }, ...
lemma
wbtw_iff_left_eq_or_right_mem_image_Ici
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "inv_le_one", "inv_mul_cancel", "one_le_inv", "one_smul", "set.Ici", "set.mem_Ici", "set.mem_image", "smul_smul", "vadd_vsub", "vsub_vadd", "wbtw", "wbtw_self_left" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.right_mem_image_Ici_of_left_ne {x y z : P} (h : wbtw R x y z) (hne : x ≠ y) : z ∈ line_map x y '' (set.Ici (1 : R))
(wbtw_iff_left_eq_or_right_mem_image_Ici.1 h).resolve_left hne
lemma
wbtw.right_mem_image_Ici_of_left_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "set.Ici", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.right_mem_affine_span_of_left_ne {x y z : P} (h : wbtw R x y z) (hne : x ≠ y) : z ∈ line[R, x, y]
begin rcases h.right_mem_image_Ici_of_left_ne hne with ⟨r, ⟨-, rfl⟩⟩, exact line_map_mem_affine_span_pair _ _ _ end
lemma
wbtw.right_mem_affine_span_of_left_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_iff_left_ne_and_right_mem_image_IoI {x y z : P} : sbtw R x y z ↔ x ≠ y ∧ z ∈ line_map x y '' (set.Ioi (1 : R))
begin refine ⟨λ h, ⟨h.left_ne, _⟩, λ h, _⟩, { obtain ⟨r, ⟨hr, rfl⟩⟩ := h.wbtw.right_mem_image_Ici_of_left_ne h.left_ne, rw [set.mem_Ici] at hr, rcases hr.lt_or_eq with hrlt | rfl, { exact set.mem_image_of_mem _ hrlt }, { exfalso, simpa using h } }, { rcases h with ⟨hne, r, hr, rfl⟩, rw set.mem...
lemma
sbtw_iff_left_ne_and_right_mem_image_IoI
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "set.Ioi", "set.Ioi_subset_Ici_self", "set.mem_Ici", "set.mem_Ioi", "set.mem_image_of_mem", "set.mem_of_mem_of_subset", "smul_ne_zero_iff", "vsub_ne_zero", "vsub_vadd_eq_vsub_sub" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.right_mem_image_Ioi {x y z : P} (h : sbtw R x y z) : z ∈ line_map x y '' (set.Ioi (1 : R))
(sbtw_iff_left_ne_and_right_mem_image_IoI.1 h).2
lemma
sbtw.right_mem_image_Ioi
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "set.Ioi" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.right_mem_affine_span {x y z : P} (h : sbtw R x y z) : z ∈ line[R, x, y]
h.wbtw.right_mem_affine_span_of_left_ne h.left_ne
lemma
sbtw.right_mem_affine_span
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_iff_right_eq_or_left_mem_image_Ici {x y z : P} : wbtw R x y z ↔ z = y ∨ x ∈ line_map z y '' (set.Ici (1 : R))
by rw [wbtw_comm, wbtw_iff_left_eq_or_right_mem_image_Ici]
lemma
wbtw_iff_right_eq_or_left_mem_image_Ici
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "set.Ici", "wbtw", "wbtw_comm", "wbtw_iff_left_eq_or_right_mem_image_Ici" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.left_mem_image_Ici_of_right_ne {x y z : P} (h : wbtw R x y z) (hne : z ≠ y) : x ∈ line_map z y '' (set.Ici (1 : R))
h.symm.right_mem_image_Ici_of_left_ne hne
lemma
wbtw.left_mem_image_Ici_of_right_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "set.Ici", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.left_mem_affine_span_of_right_ne {x y z : P} (h : wbtw R x y z) (hne : z ≠ y) : x ∈ line[R, z, y]
h.symm.right_mem_affine_span_of_left_ne hne
lemma
wbtw.left_mem_affine_span_of_right_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_iff_right_ne_and_left_mem_image_IoI {x y z : P} : sbtw R x y z ↔ z ≠ y ∧ x ∈ line_map z y '' (set.Ioi (1 : R))
by rw [sbtw_comm, sbtw_iff_left_ne_and_right_mem_image_IoI]
lemma
sbtw_iff_right_ne_and_left_mem_image_IoI
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "sbtw_comm", "sbtw_iff_left_ne_and_right_mem_image_IoI", "set.Ioi" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.left_mem_image_Ioi {x y z : P} (h : sbtw R x y z) : x ∈ line_map z y '' (set.Ioi (1 : R))
h.symm.right_mem_image_Ioi
lemma
sbtw.left_mem_image_Ioi
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw", "set.Ioi" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.left_mem_affine_span {x y z : P} (h : sbtw R x y z) : x ∈ line[R, z, y]
h.symm.right_mem_affine_span
lemma
sbtw.left_mem_affine_span
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_smul_vadd_smul_vadd_of_nonneg_of_le (x : P) (v : V) {r₁ r₂ : R} (hr₁ : 0 ≤ r₁) (hr₂ : r₁ ≤ r₂) : wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x)
begin refine ⟨r₁ / r₂, ⟨div_nonneg hr₁ (hr₁.trans hr₂), div_le_one_of_le hr₂ (hr₁.trans hr₂)⟩, _⟩, by_cases h : r₁ = 0, { simp [h] }, simp [line_map_apply, smul_smul, ((hr₁.lt_of_ne' h).trans_le hr₂).ne.symm] end
lemma
wbtw_smul_vadd_smul_vadd_of_nonneg_of_le
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "div_le_one_of_le", "smul_smul", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_or_wbtw_smul_vadd_of_nonneg (x : P) (v : V) {r₁ r₂ : R} (hr₁ : 0 ≤ r₁) (hr₂ : 0 ≤ r₂) : wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)
begin rcases le_total r₁ r₂ with h|h, { exact or.inl (wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x v hr₁ h) }, { exact or.inr (wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x v hr₂ h) } end
lemma
wbtw_or_wbtw_smul_vadd_of_nonneg
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw", "wbtw_smul_vadd_smul_vadd_of_nonneg_of_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_smul_vadd_smul_vadd_of_nonpos_of_le (x : P) (v : V) {r₁ r₂ : R} (hr₁ : r₁ ≤ 0) (hr₂ : r₂ ≤ r₁) : wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x)
begin convert wbtw_smul_vadd_smul_vadd_of_nonneg_of_le x (-v) (left.nonneg_neg_iff.2 hr₁) (neg_le_neg_iff.2 hr₂) using 1; rw neg_smul_neg end
lemma
wbtw_smul_vadd_smul_vadd_of_nonpos_of_le
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "neg_smul_neg", "wbtw", "wbtw_smul_vadd_smul_vadd_of_nonneg_of_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_or_wbtw_smul_vadd_of_nonpos (x : P) (v : V) {r₁ r₂ : R} (hr₁ : r₁ ≤ 0) (hr₂ : r₂ ≤ 0) : wbtw R x (r₁ • v +ᵥ x) (r₂ • v +ᵥ x) ∨ wbtw R x (r₂ • v +ᵥ x) (r₁ • v +ᵥ x)
begin rcases le_total r₁ r₂ with h|h, { exact or.inr (wbtw_smul_vadd_smul_vadd_of_nonpos_of_le x v hr₂ h) }, { exact or.inl (wbtw_smul_vadd_smul_vadd_of_nonpos_of_le x v hr₁ h) } end
lemma
wbtw_or_wbtw_smul_vadd_of_nonpos
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw", "wbtw_smul_vadd_smul_vadd_of_nonpos_of_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg (x : P) (v : V) {r₁ r₂ : R} (hr₁ : r₁ ≤ 0) (hr₂ : 0 ≤ r₂) : wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)
begin convert wbtw_smul_vadd_smul_vadd_of_nonneg_of_le (r₁ • v +ᵥ x) v (left.nonneg_neg_iff.2 hr₁) (neg_le_sub_iff_le_add.2 ((le_add_iff_nonneg_left r₁).2 hr₂)) using 1; simp [sub_smul, ←add_vadd] end
lemma
wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sub_smul", "wbtw", "wbtw_smul_vadd_smul_vadd_of_nonneg_of_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos (x : P) (v : V) {r₁ r₂ : R} (hr₁ : 0 ≤ r₁) (hr₂ : r₂ ≤ 0) : wbtw R (r₁ • v +ᵥ x) x (r₂ • v +ᵥ x)
begin rw wbtw_comm, exact wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg x v hr₂ hr₁ end
lemma
wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw", "wbtw_comm", "wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_left_right {w x y z : P} (h₁ : wbtw R w y z) (h₂ : wbtw R w x y) : wbtw R x y z
begin rcases h₁ with ⟨t₁, ht₁, rfl⟩, rcases h₂ with ⟨t₂, ht₂, rfl⟩, refine ⟨(t₁ - t₂ * t₁) / (1 - t₂ * t₁), ⟨div_nonneg (sub_nonneg.2 (mul_le_of_le_one_left ht₁.1 ht₂.2)) (sub_nonneg.2 (mul_le_one ht₂.2 ht₁.1 ht₁.2)), div_le_one_of_le (sub_le_sub_right ht₁.2 _) ...
lemma
wbtw.trans_left_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "div_le_one_of_le", "div_mul_eq_mul_div", "div_self", "div_sub_div_same", "eq_of_le_of_not_lt", "mul_div_assoc", "mul_le_of_le_one_left", "mul_le_one", "mul_lt_one_of_nonneg_of_lt_one_right", "smul_smul", "smul_sub", "vadd_right_cancel_iff", "vadd_vsub", "vsub_vadd_eq_vsub_sub", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.trans_right_left {w x y z : P} (h₁ : wbtw R w x z) (h₂ : wbtw R x y z) : wbtw R w x y
begin rw wbtw_comm at *, exact h₁.trans_left_right h₂ end
lemma
wbtw.trans_right_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "wbtw", "wbtw_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_left_right {w x y z : P} (h₁ : sbtw R w y z) (h₂ : sbtw R w x y) : sbtw R x y z
⟨h₁.wbtw.trans_left_right h₂.wbtw, h₂.right_ne, h₁.ne_right⟩
lemma
sbtw.trans_left_right
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw.trans_right_left {w x y z : P} (h₁ : sbtw R w x z) (h₂ : sbtw R x y z) : sbtw R w x y
⟨h₁.wbtw.trans_right_left h₂.wbtw, h₁.ne_left, h₂.left_ne⟩
lemma
sbtw.trans_right_left
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw.collinear {x y z : P} (h : wbtw R x y z) : collinear R ({x, y, z} : set P)
begin rw collinear_iff_exists_forall_eq_smul_vadd, refine ⟨x, z -ᵥ x, _⟩, intros p hp, simp_rw [set.mem_insert_iff, set.mem_singleton_iff] at hp, rcases hp with rfl|rfl|rfl, { refine ⟨0, _⟩, simp }, { rcases h with ⟨t, -, rfl⟩, exact ⟨t, rfl⟩ }, { refine ⟨1, _⟩, simp } end
lemma
wbtw.collinear
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "collinear", "collinear_iff_exists_forall_eq_smul_vadd", "set.mem_insert_iff", "set.mem_singleton_iff", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
collinear.wbtw_or_wbtw_or_wbtw {x y z : P} (h : collinear R ({x, y, z} : set P)) : wbtw R x y z ∨ wbtw R y z x ∨ wbtw R z x y
begin rw collinear_iff_of_mem (set.mem_insert _ _) at h, rcases h with ⟨v, h⟩, simp_rw [set.mem_insert_iff, set.mem_singleton_iff] at h, have hy := h y (or.inr (or.inl rfl)), have hz := h z (or.inr (or.inr rfl)), rcases hy with ⟨ty, rfl⟩, rcases hz with ⟨tz, rfl⟩, rcases lt_trichotomy ty 0 with hy0|rfl|...
lemma
collinear.wbtw_or_wbtw_or_wbtw
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "collinear", "collinear_iff_of_mem", "set.mem_insert", "set.mem_insert_iff", "set.mem_singleton_iff", "wbtw", "wbtw_comm", "wbtw_or_wbtw_smul_vadd_of_nonneg", "wbtw_or_wbtw_smul_vadd_of_nonpos", "wbtw_smul_vadd_smul_vadd_of_nonneg_of_nonpos", "wbtw_smul_vadd_smul_vadd_of_nonpos_of_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_iff_same_ray_vsub {x y z : P} : wbtw R x y z ↔ same_ray R (y -ᵥ x) (z -ᵥ y)
begin refine ⟨wbtw.same_ray_vsub, λ h, _⟩, rcases h with h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩, { rw vsub_eq_zero_iff_eq at h, simp [h] }, { rw vsub_eq_zero_iff_eq at h, simp [h] }, { refine ⟨r₂ / (r₁ + r₂), ⟨div_nonneg hr₂.le (add_nonneg hr₁.le hr₂.le), div_le_one_of_le (le_add_of_nonneg_lef...
lemma
wbtw_iff_same_ray_vsub
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "div_le_one_of_le", "eq_vadd_iff_vsub_eq", "one_smul", "ring", "same_ray", "smul_add", "smul_smul", "vadd_vsub_assoc", "vsub_eq_zero_iff_eq", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_point_reflection (x y : P) : wbtw R y x (point_reflection R x y)
begin refine ⟨2⁻¹, ⟨by norm_num, by norm_num⟩, _⟩, rw [line_map_apply, point_reflection_apply, vadd_vsub_assoc, ←two_smul R (x -ᵥ y)], simp end
lemma
wbtw_point_reflection
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "vadd_vsub_assoc", "wbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_point_reflection_of_ne {x y : P} (h : x ≠ y) : sbtw R y x (point_reflection R x y)
begin refine ⟨wbtw_point_reflection _ _ _, h, _⟩, nth_rewrite 0 [←point_reflection_self R x], exact (point_reflection_involutive R x).injective.ne h end
lemma
sbtw_point_reflection_of_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
wbtw_midpoint (x y : P) : wbtw R x (midpoint R x y) y
by { convert wbtw_point_reflection R (midpoint R x y) x, simp }
lemma
wbtw_midpoint
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "midpoint", "wbtw", "wbtw_point_reflection" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
sbtw_midpoint_of_ne {x y : P} (h : x ≠ y) : sbtw R x (midpoint R x y) y
begin have h : midpoint R x y ≠ x, { simp [h] }, convert sbtw_point_reflection_of_ne R h, simp end
lemma
sbtw_midpoint_of_ne
analysis.convex
src/analysis/convex/between.lean
[ "data.set.intervals.group", "analysis.convex.segment", "linear_algebra.affine_space.finite_dimensional", "tactic.field_simp", "algebra.char_p.invertible" ]
[ "midpoint", "sbtw", "sbtw_point_reflection_of_ne" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_body (V : Type*) [topological_space V] [add_comm_monoid V] [has_smul ℝ V]
(carrier : set V) (convex' : convex ℝ carrier) (is_compact' : is_compact carrier) (nonempty' : carrier.nonempty)
structure
convex_body
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "add_comm_monoid", "convex", "has_smul", "is_compact", "topological_space" ]
Let `V` be a real topological vector space. A subset of `V` is a convex body if and only if it is convex, compact, and nonempty.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex (K : convex_body V) : convex ℝ (K : set V)
K.convex'
lemma
convex_body.convex
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex", "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_compact (K : convex_body V) : is_compact (K : set V)
K.is_compact'
lemma
convex_body.is_compact
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body", "is_compact" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
nonempty (K : convex_body V) : (K : set V).nonempty
K.nonempty'
lemma
convex_body.nonempty
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
ext {K L : convex_body V} (h : (K : set V) = L) : K = L
set_like.ext' h
lemma
convex_body.ext
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body", "set_like.ext'" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_mk (s : set V) (h₁ h₂ h₃) : (mk s h₁ h₂ h₃ : set V) = s
rfl
lemma
convex_body.coe_mk
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_add (K L : convex_body V) : (↑(K + L) : set V) = (K : set V) + L
rfl
lemma
convex_body.coe_add
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_zero : (↑(0 : convex_body V) : set V) = 0
rfl
lemma
convex_body.coe_zero
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_smul (c : ℝ) (K : convex_body V) : (↑(c • K) : set V) = c • (K : set V)
rfl
lemma
convex_body.coe_smul
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
coe_smul' (c : ℝ≥0) (K : convex_body V) : (↑(c • K) : set V) = c • (K : set V)
rfl
lemma
convex_body.coe_smul'
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
bounded : metric.bounded (K : set V)
K.is_compact.bounded
lemma
convex_body.bounded
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "metric.bounded" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Hausdorff_edist_ne_top {K L : convex_body V} : emetric.Hausdorff_edist (K : set V) L ≠ ⊤
by apply_rules [metric.Hausdorff_edist_ne_top_of_nonempty_of_bounded, convex_body.nonempty, convex_body.bounded]
lemma
convex_body.Hausdorff_edist_ne_top
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "convex_body", "convex_body.bounded", "convex_body.nonempty", "emetric.Hausdorff_edist", "metric.Hausdorff_edist_ne_top_of_nonempty_of_bounded" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Hausdorff_dist_coe : metric.Hausdorff_dist (K : set V) L = dist K L
rfl
lemma
convex_body.Hausdorff_dist_coe
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "metric.Hausdorff_dist" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
Hausdorff_edist_coe : emetric.Hausdorff_edist (K : set V) L = edist K L
by { rw edist_dist, exact (ennreal.of_real_to_real Hausdorff_edist_ne_top).symm }
lemma
convex_body.Hausdorff_edist_coe
analysis.convex
src/analysis/convex/body.lean
[ "analysis.convex.basic", "analysis.normed_space.basic", "topology.metric_space.hausdorff_distance" ]
[ "edist_dist", "emetric.Hausdorff_edist", "ennreal.of_real_to_real" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_convex_hull_erase [decidable_eq E] {t : finset E} (h : ¬ affine_independent 𝕜 (coe : t → E)) {x : E} (m : x ∈ convex_hull 𝕜 (↑t : set E)) : ∃ (y : (↑t : set E)), x ∈ convex_hull 𝕜 (↑(t.erase y) : set E)
begin simp only [finset.convex_hull_eq, mem_set_of_eq] at m ⊢, obtain ⟨f, fpos, fsum, rfl⟩ := m, obtain ⟨g, gcombo, gsum, gpos⟩ := exists_nontrivial_relation_sum_zero_of_not_affine_ind h, replace gpos := exists_pos_of_sum_zero_of_exists_nonzero g gsum gpos, clear h, let s := @finset.filter _ (λ z, 0 < g z) ...
lemma
caratheodory.mem_convex_hull_erase
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "affine_independent", "and_imp", "convex_hull", "div_nonneg", "exists_nontrivial_relation_sum_zero_of_not_affine_ind", "finset", "finset.convex_hull_eq", "finset.filter", "inv_one", "le_div_iff", "mul_nonpos_of_nonneg_of_nonpos", "mul_zero", "one_smul", "smul_zero", "sub_smul", "subtyp...
If `x` is in the convex hull of some finset `t` whose elements are not affine-independent, then it is in the convex hull of a strict subset of `t`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
min_card_finset_of_mem_convex_hull : finset E
function.argmin_on finset.card nat.lt_wf { t | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) } (by simpa only [convex_hull_eq_union_convex_hull_finite_subsets s, exists_prop, mem_Union] using hx)
def
caratheodory.min_card_finset_of_mem_convex_hull
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "convex_hull", "convex_hull_eq_union_convex_hull_finite_subsets", "exists_prop", "finset", "finset.card", "function.argmin_on" ]
Given a point `x` in the convex hull of a set `s`, this is a finite subset of `s` of minimum cardinality, whose convex hull contains `x`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
min_card_finset_of_mem_convex_hull_subseteq : ↑(min_card_finset_of_mem_convex_hull hx) ⊆ s
(function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) } _).1
lemma
caratheodory.min_card_finset_of_mem_convex_hull_subseteq
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "convex_hull", "finset", "function.argmin_on_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
mem_min_card_finset_of_mem_convex_hull : x ∈ convex_hull 𝕜 (min_card_finset_of_mem_convex_hull hx : set E)
(function.argmin_on_mem _ _ { t : finset E | ↑t ⊆ s ∧ x ∈ convex_hull 𝕜 (t : set E) } _).2
lemma
caratheodory.mem_min_card_finset_of_mem_convex_hull
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "convex_hull", "finset", "function.argmin_on_mem" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
min_card_finset_of_mem_convex_hull_nonempty : (min_card_finset_of_mem_convex_hull hx).nonempty
begin rw [← finset.coe_nonempty, ← @convex_hull_nonempty_iff 𝕜], exact ⟨x, mem_min_card_finset_of_mem_convex_hull hx⟩, end
lemma
caratheodory.min_card_finset_of_mem_convex_hull_nonempty
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "convex_hull_nonempty_iff", "finset.coe_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
min_card_finset_of_mem_convex_hull_card_le_card {t : finset E} (ht₁ : ↑t ⊆ s) (ht₂ : x ∈ convex_hull 𝕜 (t : set E)) : (min_card_finset_of_mem_convex_hull hx).card ≤ t.card
function.argmin_on_le _ _ _ ⟨ht₁, ht₂⟩
lemma
caratheodory.min_card_finset_of_mem_convex_hull_card_le_card
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "convex_hull", "finset", "function.argmin_on_le" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
affine_independent_min_card_finset_of_mem_convex_hull : affine_independent 𝕜 (coe : min_card_finset_of_mem_convex_hull hx → E)
begin let k := (min_card_finset_of_mem_convex_hull hx).card - 1, have hk : (min_card_finset_of_mem_convex_hull hx).card = k + 1, { exact (nat.succ_pred_eq_of_pos (finset.card_pos.mpr (min_card_finset_of_mem_convex_hull_nonempty hx))).symm }, classical, by_contra, obtain ⟨p, hp⟩ := mem_convex_hull_eras...
lemma
caratheodory.affine_independent_min_card_finset_of_mem_convex_hull
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "affine_independent", "by_contra", "finset.erase_subset", "lt_add_one", "set.subset.trans" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_hull_eq_union : convex_hull 𝕜 s = ⋃ (t : finset E) (hss : ↑t ⊆ s) (hai : affine_independent 𝕜 (coe : t → E)), convex_hull 𝕜 ↑t
begin apply set.subset.antisymm, { intros x hx, simp only [exists_prop, set.mem_Union], exact ⟨caratheodory.min_card_finset_of_mem_convex_hull hx, caratheodory.min_card_finset_of_mem_convex_hull_subseteq hx, caratheodory.affine_independent_min_card_finset_of_mem_convex_hull hx, ...
lemma
convex_hull_eq_union
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "affine_independent", "caratheodory.affine_independent_min_card_finset_of_mem_convex_hull", "caratheodory.mem_min_card_finset_of_mem_convex_hull", "caratheodory.min_card_finset_of_mem_convex_hull_subseteq", "convex_hull", "convex_hull_mono", "exists_prop", "finset", "set.Union_subset", "set.mem_Un...
**Carathéodory's convexity theorem**
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
eq_pos_convex_span_of_mem_convex_hull {x : E} (hx : x ∈ convex_hull 𝕜 s) : ∃ (ι : Sort (u+1)) (_ : fintype ι), by exactI ∃ (z : ι → E) (w : ι → 𝕜) (hss : set.range z ⊆ s) (hai : affine_independent 𝕜 z) (hw : ∀ i, 0 < w i), ∑ i, w i = 1 ∧ ∑ i, w i • z i = x
begin rw convex_hull_eq_union at hx, simp only [exists_prop, set.mem_Union] at hx, obtain ⟨t, ht₁, ht₂, ht₃⟩ := hx, simp only [t.convex_hull_eq, exists_prop, set.mem_set_of_eq] at ht₃, obtain ⟨w, hw₁, hw₂, hw₃⟩ := ht₃, let t' := t.filter (λ i, w i ≠ 0), refine ⟨t', t'.fintype_coe_sort, (coe : t' → E), w ∘...
theorem
eq_pos_convex_span_of_mem_convex_hull
analysis.convex
src/analysis/convex/caratheodory.lean
[ "analysis.convex.combination", "linear_algebra.affine_space.independent", "tactic.field_simp" ]
[ "affine_independent", "convex_hull", "convex_hull_eq_union", "exists_prop", "finset.filter_subset", "fintype", "set.mem_Union", "set.range", "subtype.range_coe_subtype", "zero_smul" ]
A more explicit version of `convex_hull_eq_union`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass (t : finset ι) (w : ι → R) (z : ι → E) : E
(∑ i in t, w i)⁻¹ • (∑ i in t, w i • z i)
def
finset.center_mass
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset" ]
Center of mass of a finite collection of points with prescribed weights. Note that we require neither `0 ≤ w i` nor `∑ w = 1`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_empty : (∅ : finset ι).center_mass w z = 0
by simp only [center_mass, sum_empty, smul_zero]
lemma
finset.center_mass_empty
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset", "smul_zero" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_pair (hne : i ≠ j) : ({i, j} : finset ι).center_mass w z = (w i / (w i + w j)) • z i + (w j / (w i + w j)) • z j
by simp only [center_mass, sum_pair hne, smul_add, (mul_smul _ _ _).symm, div_eq_inv_mul]
lemma
finset.center_mass_pair
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "div_eq_inv_mul", "finset", "smul_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_insert (ha : i ∉ t) (hw : ∑ j in t, w j ≠ 0) : (insert i t).center_mass w z = (w i / (w i + ∑ j in t, w j)) • z i + ((∑ j in t, w j) / (w i + ∑ j in t, w j)) • t.center_mass w z
begin simp only [center_mass, sum_insert ha, smul_add, (mul_smul _ _ _).symm, ← div_eq_inv_mul], congr' 2, rw [div_mul_eq_mul_div, mul_inv_cancel hw, one_div] end
lemma
finset.center_mass_insert
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "div_eq_inv_mul", "div_mul_eq_mul_div", "mul_inv_cancel", "one_div", "smul_add" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_singleton (hw : w i ≠ 0) : ({i} : finset ι).center_mass w z = z i
by rw [center_mass, sum_singleton, sum_singleton, ← mul_smul, inv_mul_cancel hw, one_smul]
lemma
finset.center_mass_singleton
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset", "inv_mul_cancel", "one_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_eq_of_sum_1 (hw : ∑ i in t, w i = 1) : t.center_mass w z = ∑ i in t, w i • z i
by simp only [finset.center_mass, hw, inv_one, one_smul]
lemma
finset.center_mass_eq_of_sum_1
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset.center_mass", "inv_one", "one_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_smul : t.center_mass w (λ i, c • z i) = c • t.center_mass w z
by simp only [finset.center_mass, finset.smul_sum, (mul_smul _ _ _).symm, mul_comm c, mul_assoc]
lemma
finset.center_mass_smul
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset.center_mass", "finset.smul_sum", "mul_assoc", "mul_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_segment' (s : finset ι) (t : finset ι') (ws : ι → R) (zs : ι → E) (wt : ι' → R) (zt : ι' → E) (hws : ∑ i in s, ws i = 1) (hwt : ∑ i in t, wt i = 1) (a b : R) (hab : a + b = 1) : a • s.center_mass ws zs + b • t.center_mass wt zt = (s.disj_sum t).center_mass (sum.elim (λ i, a * ws i) (λ j, b ...
begin rw [s.center_mass_eq_of_sum_1 _ hws, t.center_mass_eq_of_sum_1 _ hwt, smul_sum, smul_sum, ← finset.sum_sum_elim, finset.center_mass_eq_of_sum_1], { congr' with ⟨⟩; simp only [sum.elim_inl, sum.elim_inr, mul_smul] }, { rw [sum_sum_elim, ← mul_sum, ← mul_sum, hws, hwt, mul_one, mul_one, hab] } end
lemma
finset.center_mass_segment'
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset", "finset.center_mass_eq_of_sum_1", "mul_one", "sum.elim", "sum.elim_inl", "sum.elim_inr" ]
A convex combination of two centers of mass is a center of mass as well. This version deals with two different index types.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_segment (s : finset ι) (w₁ w₂ : ι → R) (z : ι → E) (hw₁ : ∑ i in s, w₁ i = 1) (hw₂ : ∑ i in s, w₂ i = 1) (a b : R) (hab : a + b = 1) : a • s.center_mass w₁ z + b • s.center_mass w₂ z = s.center_mass (λ i, a * w₁ i + b * w₂ i) z
have hw : ∑ i in s, (a * w₁ i + b * w₂ i) = 1, by simp only [mul_sum.symm, sum_add_distrib, mul_one, *], by simp only [finset.center_mass_eq_of_sum_1, smul_sum, sum_add_distrib, add_smul, mul_smul, *]
lemma
finset.center_mass_segment
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "add_smul", "finset", "finset.center_mass_eq_of_sum_1", "mul_one" ]
A convex combination of two centers of mass is a center of mass as well. This version works if two centers of mass share the set of original points.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_ite_eq (hi : i ∈ t) : t.center_mass (λ j, if (i = j) then (1 : R) else 0) z = z i
begin rw [finset.center_mass_eq_of_sum_1], transitivity ∑ j in t, if (i = j) then z i else 0, { congr' with i, split_ifs, exacts [h ▸ one_smul _ _, zero_smul _ _] }, { rw [sum_ite_eq, if_pos hi] }, { rw [sum_ite_eq, if_pos hi] } end
lemma
finset.center_mass_ite_eq
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset.center_mass_eq_of_sum_1", "one_smul", "zero_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_subset {t' : finset ι} (ht : t ⊆ t') (h : ∀ i ∈ t', i ∉ t → w i = 0) : t.center_mass w z = t'.center_mass w z
begin rw [center_mass, sum_subset ht h, smul_sum, center_mass, smul_sum], apply sum_subset ht, assume i hit' hit, rw [h i hit' hit, zero_smul, smul_zero] end
lemma
finset.center_mass_subset
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset", "smul_zero", "zero_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
finset.center_mass_filter_ne_zero : (t.filter (λ i, w i ≠ 0)).center_mass w z = t.center_mass w z
finset.center_mass_subset z (filter_subset _ _) $ λ i hit hit', by simpa only [hit, mem_filter, true_and, ne.def, not_not] using hit'
lemma
finset.center_mass_filter_ne_zero
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset.center_mass_subset", "not_not" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
center_mass_le_sup {s : finset ι} {f : ι → α} {w : ι → R} (hw₀ : ∀ i ∈ s, 0 ≤ w i) (hw₁ : 0 < ∑ i in s, w i) : s.center_mass w f ≤ s.sup' (nonempty_of_ne_empty $ by { rintro rfl, simpa using hw₁ }) f
begin rw [center_mass, inv_smul_le_iff hw₁, sum_smul], exact sum_le_sum (λ i hi, smul_le_smul_of_nonneg (le_sup' _ hi) $ hw₀ i hi), apply_instance, end
lemma
finset.center_mass_le_sup
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset", "inv_smul_le_iff", "smul_le_smul_of_nonneg" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
inf_le_center_mass {s : finset ι} {f : ι → α} {w : ι → R} (hw₀ : ∀ i ∈ s, 0 ≤ w i) (hw₁ : 0 < ∑ i in s, w i) : s.inf' (nonempty_of_ne_empty $ by { rintro rfl, simpa using hw₁ }) f ≤ s.center_mass w f
@center_mass_le_sup R _ αᵒᵈ _ _ _ _ _ _ _ hw₀ hw₁
lemma
finset.inf_le_center_mass
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "finset" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex.center_mass_mem (hs : convex R s) : (∀ i ∈ t, 0 ≤ w i) → (0 < ∑ i in t, w i) → (∀ i ∈ t, z i ∈ s) → t.center_mass w z ∈ s
begin induction t using finset.induction with i t hi ht, { simp [lt_irrefl] }, intros h₀ hpos hmem, have zi : z i ∈ s, from hmem _ (mem_insert_self _ _), have hs₀ : ∀ j ∈ t, 0 ≤ w j, from λ j hj, h₀ j $ mem_insert_of_mem hj, rw [sum_insert hi] at hpos, by_cases hsum_t : ∑ j in t, w j = 0, { have ws : ∀ j ...
lemma
convex.center_mass_mem
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "convex", "finset.center_mass_insert", "finset.induction", "inv_mul_cancel", "one_smul" ]
The center of mass of a finite subset of a convex set belongs to the set provided that all weights are non-negative, and the total weight is positive.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex.sum_mem (hs : convex R s) (h₀ : ∀ i ∈ t, 0 ≤ w i) (h₁ : ∑ i in t, w i = 1) (hz : ∀ i ∈ t, z i ∈ s) : ∑ i in t, w i • z i ∈ s
by simpa only [h₁, center_mass, inv_one, one_smul] using hs.center_mass_mem h₀ (h₁.symm ▸ zero_lt_one) hz
lemma
convex.sum_mem
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "convex", "inv_one", "one_smul", "zero_lt_one" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex.finsum_mem {ι : Sort*} {w : ι → R} {z : ι → E} {s : set E} (hs : convex R s) (h₀ : ∀ i, 0 ≤ w i) (h₁ : ∑ᶠ i, w i = 1) (hz : ∀ i, w i ≠ 0 → z i ∈ s) : ∑ᶠ i, w i • z i ∈ s
begin have hfin_w : (support (w ∘ plift.down)).finite, { by_contra H, rw [finsum, dif_neg H] at h₁, exact zero_ne_one h₁ }, have hsub : support ((λ i, w i • z i) ∘ plift.down) ⊆ hfin_w.to_finset, from (support_smul_subset_left _ _).trans hfin_w.coe_to_finset.ge, rw [finsum_eq_sum_plift_of_support_su...
lemma
convex.finsum_mem
analysis.convex
src/analysis/convex/combination.lean
[ "algebra.big_operators.order", "analysis.convex.hull", "linear_algebra.affine_space.basis" ]
[ "by_contra", "convex", "finite", "finsum", "zero_ne_one" ]
A version of `convex.sum_mem` for `finsum`s. If `s` is a convex set, `w : ι → R` is a family of nonnegative weights with sum one and `z : ι → E` is a family of elements of a module over `R` such that `z i ∈ s` whenever `w i ≠ 0``, then the sum `∑ᶠ i, w i • z i` belongs to `s`. See also `partition_of_unity.finsum_smul_m...
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83