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
w_opp_side_self_iff {s : affine_subspace R P} {x : P} : s.w_opp_side x x ↔ x ∈ s
begin split, { rintro ⟨p₁, hp₁, p₂, hp₂, h⟩, obtain ⟨a, -, -, -, -, h₁, -⟩ := h.exists_eq_smul_add, rw [add_comm, vsub_add_vsub_cancel, ←eq_vadd_iff_vsub_eq] at h₁, rw h₁, exact s.smul_vsub_vadd_mem a hp₂ hp₁ hp₁ }, { exact λ h, ⟨x, h, x, h, same_ray.rfl⟩ } end
lemma
affine_subspace.w_opp_side_self_iff
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "vsub_add_vsub_cancel" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
not_s_opp_side_self (s : affine_subspace R P) (x : P) : ¬s.s_opp_side x x
by simp [s_opp_side]
lemma
affine_subspace.not_s_opp_side_self
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side_iff_exists_left {s : affine_subspace R P} {x y p₁ : P} (h : p₁ ∈ s) : s.w_same_side x y ↔ x ∈ s ∨ ∃ p₂ ∈ s, same_ray R (x -ᵥ p₁) (y -ᵥ p₂)
begin split, { rintro ⟨p₁', hp₁', p₂', hp₂', h0 | h0 | ⟨r₁, r₂, hr₁, hr₂, hr⟩⟩, { rw vsub_eq_zero_iff_eq at h0, rw h0, exact or.inl hp₁' }, { refine or.inr ⟨p₂', hp₂', _⟩, rw h0, exact same_ray.zero_right _ }, { refine or.inr ⟨(r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂', s.smul_vsub_vadd_mem ...
lemma
affine_subspace.w_same_side_iff_exists_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "mul_div_cancel'", "same_ray", "same_ray.zero_right", "smul_smul", "smul_sub", "vsub_eq_zero_iff_eq", "vsub_sub_vsub_cancel_right", "vsub_vadd_eq_vsub_sub" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side_iff_exists_right {s : affine_subspace R P} {x y p₂ : P} (h : p₂ ∈ s) : s.w_same_side x y ↔ y ∈ s ∨ ∃ p₁ ∈ s, same_ray R (x -ᵥ p₁) (y -ᵥ p₂)
begin rw [w_same_side_comm, w_same_side_iff_exists_left h], simp_rw same_ray_comm end
lemma
affine_subspace.w_same_side_iff_exists_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "same_ray", "same_ray_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_iff_exists_left {s : affine_subspace R P} {x y p₁ : P} (h : p₁ ∈ s) : s.s_same_side x y ↔ x ∉ s ∧ y ∉ s ∧ ∃ p₂ ∈ s, same_ray R (x -ᵥ p₁) (y -ᵥ p₂)
begin rw [s_same_side, and_comm, w_same_side_iff_exists_left h, and_assoc, and.congr_right_iff], intro hx, rw or_iff_right hx end
lemma
affine_subspace.s_same_side_iff_exists_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "and.congr_right_iff", "or_iff_right", "same_ray" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_iff_exists_right {s : affine_subspace R P} {x y p₂ : P} (h : p₂ ∈ s) : s.s_same_side x y ↔ x ∉ s ∧ y ∉ s ∧ ∃ p₁ ∈ s, same_ray R (x -ᵥ p₁) (y -ᵥ p₂)
begin rw [s_same_side_comm, s_same_side_iff_exists_left h, ←and_assoc, and_comm (y ∉ s), and_assoc], simp_rw same_ray_comm end
lemma
affine_subspace.s_same_side_iff_exists_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "same_ray", "same_ray_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side_iff_exists_left {s : affine_subspace R P} {x y p₁ : P} (h : p₁ ∈ s) : s.w_opp_side x y ↔ x ∈ s ∨ ∃ p₂ ∈ s, same_ray R (x -ᵥ p₁) (p₂ -ᵥ y)
begin split, { rintro ⟨p₁', hp₁', p₂', hp₂', h0 | h0 | ⟨r₁, r₂, hr₁, hr₂, hr⟩⟩, { rw vsub_eq_zero_iff_eq at h0, rw h0, exact or.inl hp₁' }, { refine or.inr ⟨p₂', hp₂', _⟩, rw h0, exact same_ray.zero_right _ }, { refine or.inr ⟨(-r₁ / r₂) • (p₁ -ᵥ p₁') +ᵥ p₂', s.smul_vsub_vadd_mem...
lemma
affine_subspace.w_opp_side_iff_exists_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "mul_div_cancel'", "mul_neg", "neg_div", "neg_smul", "same_ray", "same_ray.zero_right", "smul_add", "smul_smul", "vadd_vsub_assoc", "vsub_eq_zero_iff_eq", "vsub_sub_vsub_cancel_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side_iff_exists_right {s : affine_subspace R P} {x y p₂ : P} (h : p₂ ∈ s) : s.w_opp_side x y ↔ y ∈ s ∨ ∃ p₁ ∈ s, same_ray R (x -ᵥ p₁) (p₂ -ᵥ y)
begin rw [w_opp_side_comm, w_opp_side_iff_exists_left h], split, { rintro (hy | ⟨p, hp, hr⟩), { exact or.inl hy }, refine or.inr ⟨p, hp, _⟩, rwa [same_ray_comm, ←same_ray_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev] }, { rintro (hy | ⟨p, hp, hr⟩), { exact or.inl hy }, refine or.inr ⟨p, hp, _...
lemma
affine_subspace.w_opp_side_iff_exists_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "neg_vsub_eq_vsub_rev", "same_ray", "same_ray_comm" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_iff_exists_left {s : affine_subspace R P} {x y p₁ : P} (h : p₁ ∈ s) : s.s_opp_side x y ↔ x ∉ s ∧ y ∉ s ∧ ∃ p₂ ∈ s, same_ray R (x -ᵥ p₁) (p₂ -ᵥ y)
begin rw [s_opp_side, and_comm, w_opp_side_iff_exists_left h, and_assoc, and.congr_right_iff], intro hx, rw or_iff_right hx end
lemma
affine_subspace.s_opp_side_iff_exists_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "and.congr_right_iff", "or_iff_right", "same_ray" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_iff_exists_right {s : affine_subspace R P} {x y p₂ : P} (h : p₂ ∈ s) : s.s_opp_side x y ↔ x ∉ s ∧ y ∉ s ∧ ∃ p₁ ∈ s, same_ray R (x -ᵥ p₁) (p₂ -ᵥ y)
begin rw [s_opp_side, and_comm, w_opp_side_iff_exists_right h, and_assoc, and.congr_right_iff, and.congr_right_iff], rintro hx hy, rw or_iff_right hy end
lemma
affine_subspace.s_opp_side_iff_exists_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "and.congr_right_iff", "or_iff_right", "same_ray" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side.trans {s : affine_subspace R P} {x y z : P} (hxy : s.w_same_side x y) (hyz : s.w_same_side y z) (hy : y ∉ s) : s.w_same_side x z
begin rcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩, rw [w_same_side_iff_exists_left hp₂, or_iff_right hy] at hyz, rcases hyz with ⟨p₃, hp₃, hyz⟩, refine ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩, refine λ h, false.elim _, rw vsub_eq_zero_iff_eq at h, exact hy (h.symm ▸ hp₂) end
lemma
affine_subspace.w_same_side.trans
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "or_iff_right", "vsub_eq_zero_iff_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side.trans_s_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_same_side x y) (hyz : s.s_same_side y z) : s.w_same_side x z
hxy.trans hyz.1 hyz.2.1
lemma
affine_subspace.w_same_side.trans_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side.trans_w_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_same_side x y) (hyz : s.w_opp_side y z) (hy : y ∉ s) : s.w_opp_side x z
begin rcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩, rw [w_opp_side_iff_exists_left hp₂, or_iff_right hy] at hyz, rcases hyz with ⟨p₃, hp₃, hyz⟩, refine ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩, refine λ h, false.elim _, rw vsub_eq_zero_iff_eq at h, exact hy (h.symm ▸ hp₂) end
lemma
affine_subspace.w_same_side.trans_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "or_iff_right", "vsub_eq_zero_iff_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side.trans_s_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_same_side x y) (hyz : s.s_opp_side y z) : s.w_opp_side x z
hxy.trans_w_opp_side hyz.1 hyz.2.1
lemma
affine_subspace.w_same_side.trans_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.trans_w_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_same_side x y) (hyz : s.w_same_side y z) : s.w_same_side x z
(hyz.symm.trans_s_same_side hxy.symm).symm
lemma
affine_subspace.s_same_side.trans_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.trans {s : affine_subspace R P} {x y z : P} (hxy : s.s_same_side x y) (hyz : s.s_same_side y z) : s.s_same_side x z
⟨hxy.w_same_side.trans_s_same_side hyz, hxy.2.1, hyz.2.2⟩
lemma
affine_subspace.s_same_side.trans
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.trans_w_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_same_side x y) (hyz : s.w_opp_side y z) : s.w_opp_side x z
hxy.w_same_side.trans_w_opp_side hyz hxy.2.2
lemma
affine_subspace.s_same_side.trans_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.trans_s_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_same_side x y) (hyz : s.s_opp_side y z) : s.s_opp_side x z
⟨hxy.trans_w_opp_side hyz.1, hxy.2.1, hyz.2.2⟩
lemma
affine_subspace.s_same_side.trans_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side.trans_w_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_opp_side x y) (hyz : s.w_same_side y z) (hy : y ∉ s) : s.w_opp_side x z
(hyz.symm.trans_w_opp_side hxy.symm hy).symm
lemma
affine_subspace.w_opp_side.trans_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side.trans_s_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_opp_side x y) (hyz : s.s_same_side y z) : s.w_opp_side x z
hxy.trans_w_same_side hyz.1 hyz.2.1
lemma
affine_subspace.w_opp_side.trans_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side.trans {s : affine_subspace R P} {x y z : P} (hxy : s.w_opp_side x y) (hyz : s.w_opp_side y z) (hy : y ∉ s) : s.w_same_side x z
begin rcases hxy with ⟨p₁, hp₁, p₂, hp₂, hxy⟩, rw [w_opp_side_iff_exists_left hp₂, or_iff_right hy] at hyz, rcases hyz with ⟨p₃, hp₃, hyz⟩, rw [←same_ray_neg_iff, neg_vsub_eq_vsub_rev, neg_vsub_eq_vsub_rev] at hyz, refine ⟨p₁, hp₁, p₃, hp₃, hxy.trans hyz _⟩, refine λ h, false.elim _, rw vsub_eq_zero_iff_e...
lemma
affine_subspace.w_opp_side.trans
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "neg_vsub_eq_vsub_rev", "or_iff_right", "vsub_eq_zero_iff_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side.trans_s_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.w_opp_side x y) (hyz : s.s_opp_side y z) : s.w_same_side x z
hxy.trans hyz.1 hyz.2.1
lemma
affine_subspace.w_opp_side.trans_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.trans_w_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_opp_side x y) (hyz : s.w_same_side y z) : s.w_opp_side x z
(hyz.symm.trans_s_opp_side hxy.symm).symm
lemma
affine_subspace.s_opp_side.trans_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.trans_s_same_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_opp_side x y) (hyz : s.s_same_side y z) : s.s_opp_side x z
(hyz.symm.trans_s_opp_side hxy.symm).symm
lemma
affine_subspace.s_opp_side.trans_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.trans_w_opp_side {s : affine_subspace R P} {x y z : P} (hxy : s.s_opp_side x y) (hyz : s.w_opp_side y z) : s.w_same_side x z
(hyz.symm.trans_s_opp_side hxy.symm).symm
lemma
affine_subspace.s_opp_side.trans_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.trans {s : affine_subspace R P} {x y z : P} (hxy : s.s_opp_side x y) (hyz : s.s_opp_side y z) : s.s_same_side x z
⟨hxy.trans_w_opp_side hyz.1, hxy.2.1, hyz.2.2⟩
lemma
affine_subspace.s_opp_side.trans
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side_and_w_opp_side_iff {s : affine_subspace R P} {x y : P} : (s.w_same_side x y ∧ s.w_opp_side x y) ↔ (x ∈ s ∨ y ∈ s)
begin split, { rintro ⟨hs, ho⟩, rw w_opp_side_comm at ho, by_contra h, rw not_or_distrib at h, exact h.1 (w_opp_side_self_iff.1 (hs.trans_w_opp_side ho h.2)) }, { rintro (h | h), { exact ⟨w_same_side_of_left_mem y h, w_opp_side_of_left_mem y h⟩ }, { exact ⟨w_same_side_of_right_mem x h, w_o...
lemma
affine_subspace.w_same_side_and_w_opp_side_iff
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "by_contra", "not_or_distrib" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_same_side.not_s_opp_side {s : affine_subspace R P} {x y : P} (h : s.w_same_side x y) : ¬s.s_opp_side x y
begin intro ho, have hxy := w_same_side_and_w_opp_side_iff.1 ⟨h, ho.1⟩, rcases hxy with hx | hy, { exact ho.2.1 hx }, { exact ho.2.2 hy } end
lemma
affine_subspace.w_same_side.not_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.not_w_opp_side {s : affine_subspace R P} {x y : P} (h : s.s_same_side x y) : ¬s.w_opp_side x y
begin intro ho, have hxy := w_same_side_and_w_opp_side_iff.1 ⟨h.1, ho⟩, rcases hxy with hx | hy, { exact h.2.1 hx }, { exact h.2.2 hy } end
lemma
affine_subspace.s_same_side.not_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side.not_s_opp_side {s : affine_subspace R P} {x y : P} (h : s.s_same_side x y) : ¬s.s_opp_side x y
λ ho, h.not_w_opp_side ho.1
lemma
affine_subspace.s_same_side.not_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side.not_s_same_side {s : affine_subspace R P} {x y : P} (h : s.w_opp_side x y) : ¬s.s_same_side x y
λ hs, hs.not_w_opp_side h
lemma
affine_subspace.w_opp_side.not_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.not_w_same_side {s : affine_subspace R P} {x y : P} (h : s.s_opp_side x y) : ¬s.w_same_side x y
λ hs, hs.not_s_opp_side h
lemma
affine_subspace.s_opp_side.not_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.not_s_same_side {s : affine_subspace R P} {x y : P} (h : s.s_opp_side x y) : ¬s.s_same_side x y
λ hs, h.not_w_same_side hs.1
lemma
affine_subspace.s_opp_side.not_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side_iff_exists_wbtw {s : affine_subspace R P} {x y : P} : s.w_opp_side x y ↔ ∃ p ∈ s, wbtw R x p y
begin refine ⟨λ h, _, λ ⟨p, hp, h⟩, h.w_opp_side₁₃ hp⟩, rcases h with ⟨p₁, hp₁, p₂, hp₂, (h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩)⟩, { rw vsub_eq_zero_iff_eq at h, rw h, exact ⟨p₁, hp₁, wbtw_self_left _ _ _⟩ }, { rw vsub_eq_zero_iff_eq at h, rw ←h, exact ⟨p₂, hp₂, wbtw_self_right _ _ _⟩ }, { refine ⟨lin...
lemma
affine_subspace.w_opp_side_iff_exists_wbtw
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "div_eq_inv_mul", "div_le_one_of_le", "div_self", "neg_div", "neg_one_smul", "set.mem_image_of_mem", "smul_add", "smul_neg", "smul_smul", "smul_sub", "vadd_vsub_assoc", "vsub_eq_zero_iff_eq", "vsub_vadd_eq_vsub_sub", "wbtw", "wbtw_self_left", "wbtw_self_right" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side.exists_sbtw {s : affine_subspace R P} {x y : P} (h : s.s_opp_side x y) : ∃ p ∈ s, sbtw R x p y
begin obtain ⟨p, hp, hw⟩ := w_opp_side_iff_exists_wbtw.1 h.w_opp_side, refine ⟨p, hp, hw, _, _⟩, { rintro rfl, exact h.2.1 hp }, { rintro rfl, exact h.2.2 hp }, end
lemma
affine_subspace.s_opp_side.exists_sbtw
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "sbtw" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
_root_.sbtw.s_opp_side_of_not_mem_of_mem {s : affine_subspace R P} {x y z : P} (h : sbtw R x y z) (hx : x ∉ s) (hy : y ∈ s) : s.s_opp_side x z
begin refine ⟨h.wbtw.w_opp_side₁₃ hy, hx, λ hz, hx _⟩, rcases h with ⟨⟨t, ⟨ht0, ht1⟩, rfl⟩, hyx, hyz⟩, rw line_map_apply at hy, have ht : t ≠ 1, { rintro rfl, simpa [line_map_apply] using hyz }, have hy' := vsub_mem_direction hy hz, rw [vadd_vsub_assoc, ←neg_vsub_eq_vsub_rev z, ←neg_one_smul R (z -ᵥ x), ←ad...
lemma
sbtw.s_opp_side_of_not_mem_of_mem
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "sbtw", "submodule.smul_mem", "vadd_vsub_assoc" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_smul_vsub_vadd_left {s : affine_subspace R P} {x p₁ p₂ : P} (hx : x ∉ s) (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : 0 < t) : s.s_same_side (t • (x -ᵥ p₁) +ᵥ p₂) x
begin refine ⟨w_same_side_smul_vsub_vadd_left x hp₁ hp₂ ht.le, λ h, hx _, hx⟩, rwa [vadd_mem_iff_mem_direction _ hp₂, s.direction.smul_mem_iff ht.ne.symm, vsub_right_mem_direction_iff_mem hp₁] at h end
lemma
affine_subspace.s_same_side_smul_vsub_vadd_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_smul_vsub_vadd_right {s : affine_subspace R P} {x p₁ p₂ : P} (hx : x ∉ s) (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : 0 < t) : s.s_same_side x (t • (x -ᵥ p₁) +ᵥ p₂)
(s_same_side_smul_vsub_vadd_left hx hp₁ hp₂ ht).symm
lemma
affine_subspace.s_same_side_smul_vsub_vadd_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_line_map_left {s : affine_subspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) {t : R} (ht : 0 < t) : s.s_same_side (line_map x y t) y
s_same_side_smul_vsub_vadd_left hy hx hx ht
lemma
affine_subspace.s_same_side_line_map_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_same_side_line_map_right {s : affine_subspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) {t : R} (ht : 0 < t) : s.s_same_side y (line_map x y t)
(s_same_side_line_map_left hx hy ht).symm
lemma
affine_subspace.s_same_side_line_map_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_smul_vsub_vadd_left {s : affine_subspace R P} {x p₁ p₂ : P} (hx : x ∉ s) (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : t < 0) : s.s_opp_side (t • (x -ᵥ p₁) +ᵥ p₂) x
begin refine ⟨w_opp_side_smul_vsub_vadd_left x hp₁ hp₂ ht.le, λ h, hx _, hx⟩, rwa [vadd_mem_iff_mem_direction _ hp₂, s.direction.smul_mem_iff ht.ne, vsub_right_mem_direction_iff_mem hp₁] at h end
lemma
affine_subspace.s_opp_side_smul_vsub_vadd_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_smul_vsub_vadd_right {s : affine_subspace R P} {x p₁ p₂ : P} (hx : x ∉ s) (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) {t : R} (ht : t < 0) : s.s_opp_side x (t • (x -ᵥ p₁) +ᵥ p₂)
(s_opp_side_smul_vsub_vadd_left hx hp₁ hp₂ ht).symm
lemma
affine_subspace.s_opp_side_smul_vsub_vadd_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_line_map_left {s : affine_subspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) {t : R} (ht : t < 0) : s.s_opp_side (line_map x y t) y
s_opp_side_smul_vsub_vadd_left hy hx hx ht
lemma
affine_subspace.s_opp_side_line_map_left
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_line_map_right {s : affine_subspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) {t : R} (ht : t < 0) : s.s_opp_side y (line_map x y t)
(s_opp_side_line_map_left hx hy ht).symm
lemma
affine_subspace.s_opp_side_line_map_right
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
set_of_w_same_side_eq_image2 {s : affine_subspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) : {y | s.w_same_side x y} = set.image2 (λ (t : R) q, t • (x -ᵥ p) +ᵥ q) (set.Ici 0) s
begin ext y, simp_rw [set.mem_set_of, set.mem_image2, set.mem_Ici, mem_coe], split, { rw [w_same_side_iff_exists_left hp, or_iff_right hx], rintro ⟨p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩, { rw vsub_eq_zero_iff_eq at h, exact false.elim (hx (h.symm ▸ hp)) }, { rw vsub_eq_zero_iff_eq at h, ...
lemma
affine_subspace.set_of_w_same_side_eq_image2
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "div_eq_inv_mul", "div_pos", "inv_mul_cancel", "one_smul", "or_iff_right", "set.Ici", "set.image2", "set.mem_Ici", "set.mem_image2", "set.mem_set_of", "smul_smul", "vsub_eq_zero_iff_eq", "vsub_vadd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
set_of_s_same_side_eq_image2 {s : affine_subspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) : {y | s.s_same_side x y} = set.image2 (λ (t : R) q, t • (x -ᵥ p) +ᵥ q) (set.Ioi 0) s
begin ext y, simp_rw [set.mem_set_of, set.mem_image2, set.mem_Ioi, mem_coe], split, { rw s_same_side_iff_exists_left hp, rintro ⟨-, hy, p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩, { rw vsub_eq_zero_iff_eq at h, exact false.elim (hx (h.symm ▸ hp)) }, { rw vsub_eq_zero_iff_eq at h, exact fals...
lemma
affine_subspace.set_of_s_same_side_eq_image2
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "div_eq_inv_mul", "div_pos", "inv_mul_cancel", "one_smul", "set.Ioi", "set.image2", "set.mem_Ioi", "set.mem_image2", "set.mem_set_of", "smul_smul", "vsub_eq_zero_iff_eq", "vsub_vadd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
set_of_w_opp_side_eq_image2 {s : affine_subspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) : {y | s.w_opp_side x y} = set.image2 (λ (t : R) q, t • (x -ᵥ p) +ᵥ q) (set.Iic 0) s
begin ext y, simp_rw [set.mem_set_of, set.mem_image2, set.mem_Iic, mem_coe], split, { rw [w_opp_side_iff_exists_left hp, or_iff_right hx], rintro ⟨p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩, { rw vsub_eq_zero_iff_eq at h, exact false.elim (hx (h.symm ▸ hp)) }, { rw vsub_eq_zero_iff_eq at h, ...
lemma
affine_subspace.set_of_w_opp_side_eq_image2
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "div_eq_inv_mul", "div_neg_of_neg_of_pos", "inv_mul_cancel", "neg_smul", "neg_vsub_eq_vsub_rev", "one_smul", "or_iff_right", "set.Iic", "set.image2", "set.mem_Iic", "set.mem_image2", "set.mem_set_of", "smul_neg", "smul_smul", "vsub_eq_zero_iff_eq", "vsub_vadd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
set_of_s_opp_side_eq_image2 {s : affine_subspace R P} {x p : P} (hx : x ∉ s) (hp : p ∈ s) : {y | s.s_opp_side x y} = set.image2 (λ (t : R) q, t • (x -ᵥ p) +ᵥ q) (set.Iio 0) s
begin ext y, simp_rw [set.mem_set_of, set.mem_image2, set.mem_Iio, mem_coe], split, { rw s_opp_side_iff_exists_left hp, rintro ⟨-, hy, p₂, hp₂, h | h | ⟨r₁, r₂, hr₁, hr₂, h⟩⟩, { rw vsub_eq_zero_iff_eq at h, exact false.elim (hx (h.symm ▸ hp)) }, { rw vsub_eq_zero_iff_eq at h, exact false...
lemma
affine_subspace.set_of_s_opp_side_eq_image2
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "div_eq_inv_mul", "div_neg_of_neg_of_pos", "inv_mul_cancel", "neg_smul", "neg_vsub_eq_vsub_rev", "one_smul", "set.Iio", "set.image2", "set.mem_Iio", "set.mem_image2", "set.mem_set_of", "smul_neg", "smul_smul", "vsub_eq_zero_iff_eq", "vsub_vadd" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
w_opp_side_point_reflection {s : affine_subspace R P} {x : P} (y : P) (hx : x ∈ s) : s.w_opp_side y (point_reflection R x y)
(wbtw_point_reflection R _ _).w_opp_side₁₃ hx
lemma
affine_subspace.w_opp_side_point_reflection
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "wbtw_point_reflection" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
s_opp_side_point_reflection {s : affine_subspace R P} {x y : P} (hx : x ∈ s) (hy : y ∉ s) : s.s_opp_side y (point_reflection R x y)
begin refine (sbtw_point_reflection_of_ne R (λ h, hy _)).s_opp_side_of_not_mem_of_mem hy hx, rwa ←h end
lemma
affine_subspace.s_opp_side_point_reflection
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "sbtw_point_reflection_of_ne" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_connected_set_of_w_same_side {s : affine_subspace ℝ P} (x : P) (h : (s : set P).nonempty) : is_connected {y | s.w_same_side x y}
begin obtain ⟨p, hp⟩ := h, haveI : nonempty s := ⟨⟨p, hp⟩⟩, by_cases hx : x ∈ s, { convert is_connected_univ, { simp [w_same_side_of_left_mem, hx] }, { exact add_torsor.connected_space V P } }, { rw [set_of_w_same_side_eq_image2 hx hp, ←set.image_prod], refine (is_connected_Ici.prod (is_connected_...
lemma
affine_subspace.is_connected_set_of_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "add_torsor.connected_space", "affine_subspace", "continuous_const", "continuous_on", "continuous_snd", "is_connected", "is_connected_univ" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_preconnected_set_of_w_same_side (s : affine_subspace ℝ P) (x : P) : is_preconnected {y | s.w_same_side x y}
begin rcases set.eq_empty_or_nonempty (s : set P) with h | h, { convert is_preconnected_empty, rw coe_eq_bot_iff at h, simp only [h, not_w_same_side_bot], refl }, { exact (is_connected_set_of_w_same_side x h).is_preconnected } end
lemma
affine_subspace.is_preconnected_set_of_w_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "is_preconnected", "is_preconnected_empty", "set.eq_empty_or_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_connected_set_of_s_same_side {s : affine_subspace ℝ P} {x : P} (hx : x ∉ s) (h : (s : set P).nonempty) : is_connected {y | s.s_same_side x y}
begin obtain ⟨p, hp⟩ := h, haveI : nonempty s := ⟨⟨p, hp⟩⟩, rw [set_of_s_same_side_eq_image2 hx hp, ←set.image_prod], refine (is_connected_Ioi.prod (is_connected_iff_connected_space.2 _)).image _ ((continuous_fst.smul continuous_const).vadd continuous_snd).continuous_on, convert add_torsor.connected_...
lemma
affine_subspace.is_connected_set_of_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "add_torsor.connected_space", "affine_subspace", "continuous_const", "continuous_on", "continuous_snd", "is_connected" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_preconnected_set_of_s_same_side (s : affine_subspace ℝ P) (x : P) : is_preconnected {y | s.s_same_side x y}
begin rcases set.eq_empty_or_nonempty (s : set P) with h | h, { convert is_preconnected_empty, rw coe_eq_bot_iff at h, simp only [h, not_s_same_side_bot], refl }, { by_cases hx : x ∈ s, { convert is_preconnected_empty, simp only [hx, s_same_side, not_true, false_and, and_false], refl }...
lemma
affine_subspace.is_preconnected_set_of_s_same_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "is_preconnected", "is_preconnected_empty", "set.eq_empty_or_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_connected_set_of_w_opp_side {s : affine_subspace ℝ P} (x : P) (h : (s : set P).nonempty) : is_connected {y | s.w_opp_side x y}
begin obtain ⟨p, hp⟩ := h, haveI : nonempty s := ⟨⟨p, hp⟩⟩, by_cases hx : x ∈ s, { convert is_connected_univ, { simp [w_opp_side_of_left_mem, hx] }, { exact add_torsor.connected_space V P } }, { rw [set_of_w_opp_side_eq_image2 hx hp, ←set.image_prod], refine (is_connected_Iic.prod (is_connected_if...
lemma
affine_subspace.is_connected_set_of_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "add_torsor.connected_space", "affine_subspace", "continuous_const", "continuous_on", "continuous_snd", "is_connected", "is_connected_univ" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_preconnected_set_of_w_opp_side (s : affine_subspace ℝ P) (x : P) : is_preconnected {y | s.w_opp_side x y}
begin rcases set.eq_empty_or_nonempty (s : set P) with h | h, { convert is_preconnected_empty, rw coe_eq_bot_iff at h, simp only [h, not_w_opp_side_bot], refl }, { exact (is_connected_set_of_w_opp_side x h).is_preconnected } end
lemma
affine_subspace.is_preconnected_set_of_w_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "is_preconnected", "is_preconnected_empty", "set.eq_empty_or_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_connected_set_of_s_opp_side {s : affine_subspace ℝ P} {x : P} (hx : x ∉ s) (h : (s : set P).nonempty) : is_connected {y | s.s_opp_side x y}
begin obtain ⟨p, hp⟩ := h, haveI : nonempty s := ⟨⟨p, hp⟩⟩, rw [set_of_s_opp_side_eq_image2 hx hp, ←set.image_prod], refine (is_connected_Iio.prod (is_connected_iff_connected_space.2 _)).image _ ((continuous_fst.smul continuous_const).vadd continuous_snd).continuous_on, convert add_torsor.connected_s...
lemma
affine_subspace.is_connected_set_of_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "add_torsor.connected_space", "affine_subspace", "continuous_const", "continuous_on", "continuous_snd", "is_connected" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
is_preconnected_set_of_s_opp_side (s : affine_subspace ℝ P) (x : P) : is_preconnected {y | s.s_opp_side x y}
begin rcases set.eq_empty_or_nonempty (s : set P) with h | h, { convert is_preconnected_empty, rw coe_eq_bot_iff at h, simp only [h, not_s_opp_side_bot], refl }, { by_cases hx : x ∈ s, { convert is_preconnected_empty, simp only [hx, s_opp_side, not_true, false_and, and_false], refl }, ...
lemma
affine_subspace.is_preconnected_set_of_s_opp_side
analysis.convex
src/analysis/convex/side.lean
[ "analysis.convex.between", "analysis.convex.normed", "analysis.normed.group.add_torsor" ]
[ "affine_subspace", "is_preconnected", "is_preconnected_empty", "set.eq_empty_or_nonempty" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.slope_mono_adjacent (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)
begin have hxz := hxy.trans hyz, rw ←sub_pos at hxy hxz hyz, suffices : f y / (y - x) + f y / (z - y) ≤ f x / (y - x) + f z / (z - y), { ring_nf at this ⊢, linarith }, set a := (z - y) / (z - x), set b := (y - x) / (z - x), have hy : a • x + b • z = y, by { field_simp, rw div_eq_iff; [ring, linarith] }, ...
lemma
convex_on.slope_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "div_eq_iff", "div_le_div_right", "div_nonneg", "mul_comm", "mul_le_mul_of_nonneg_left", "ring" ]
If `f : 𝕜 → 𝕜` is convex, then for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is less than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
concave_on.slope_anti_adjacent (hf : concave_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)
begin rw [←neg_le_neg_iff, ←neg_sub_neg (f x), ←neg_sub_neg (f y)], simp_rw [←pi.neg_apply, ←neg_div, neg_sub], exact convex_on.slope_mono_adjacent hf.neg hx hz hxy hyz, end
lemma
concave_on.slope_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "concave_on", "convex_on.slope_mono_adjacent" ]
If `f : 𝕜 → 𝕜` is concave, then for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is greater than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on.slope_strict_mono_adjacent (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f y - f x) / (y - x) < (f z - f y) / (z - y)
begin have hxz := hxy.trans hyz, have hxz' := hxz.ne, rw ←sub_pos at hxy hxz hyz, suffices : f y / (y - x) + f y / (z - y) < f x / (y - x) + f z / (z - y), { ring_nf at this ⊢, linarith }, set a := (z - y) / (z - x), set b := (y - x) / (z - x), have hy : a • x + b • z = y, by { field_simp, rw div_eq_iff...
lemma
strict_convex_on.slope_strict_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "div_eq_iff", "div_lt_div_right", "div_pos", "mul_comm", "mul_lt_mul_of_pos_left", "ring", "strict_convex_on" ]
If `f : 𝕜 → 𝕜` is strictly convex, then for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is strictly less than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_concave_on.slope_anti_adjacent (hf : strict_concave_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f z - f y) / (z - y) < (f y - f x) / (y - x)
begin rw [←neg_lt_neg_iff, ←neg_sub_neg (f x), ←neg_sub_neg (f y)], simp_rw [←pi.neg_apply, ←neg_div, neg_sub], exact strict_convex_on.slope_strict_mono_adjacent hf.neg hx hz hxy hyz, end
lemma
strict_concave_on.slope_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "strict_concave_on", "strict_convex_on.slope_strict_mono_adjacent" ]
If `f : 𝕜 → 𝕜` is strictly concave, then for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is strictly greater than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on_of_slope_mono_adjacent (hs : convex 𝕜 s) (hf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)) : convex_on 𝕜 s f
linear_order.convex_on_of_lt hs $ λ x hx z hz hxz a b ha hb hab, begin let y := a * x + b * z, have hxy : x < y, { rw [← one_mul x, ← hab, add_mul], exact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _ }, have hyz : y < z, { rw [← one_mul z, ← hab, add_mul], exact add_lt_add_right ((mul_lt_mul_left ha...
lemma
convex_on_of_slope_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "add_div", "convex", "convex_on", "div_eq_iff", "div_le_div_iff", "le_div_iff", "linear_order.convex_on_of_lt", "mul_comm", "mul_div_assoc", "mul_lt_mul_left", "one_mul", "ring" ]
If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is less than the slope of the secant line of `f` on `[x, z]`, then `f` is convex.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
concave_on_of_slope_anti_adjacent (hs : convex 𝕜 s) (hf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)) : concave_on 𝕜 s f
begin rw ←neg_convex_on_iff, refine convex_on_of_slope_mono_adjacent hs (λ x y z hx hz hxy hyz, _), rw ←neg_le_neg_iff, simp_rw [←neg_div, neg_sub, pi.neg_apply, neg_sub_neg], exact hf hx hz hxy hyz, end
lemma
concave_on_of_slope_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "concave_on", "convex", "convex_on_of_slope_mono_adjacent" ]
If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is greater than the slope of the secant line of `f` on `[x, z]`, then `f` is concave.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on_of_slope_strict_mono_adjacent (hs : convex 𝕜 s) (hf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)) : strict_convex_on 𝕜 s f
linear_order.strict_convex_on_of_lt hs $ λ x hx z hz hxz a b ha hb hab, begin let y := a * x + b * z, have hxy : x < y, { rw [← one_mul x, ← hab, add_mul], exact add_lt_add_left ((mul_lt_mul_left hb).2 hxz) _ }, have hyz : y < z, { rw [← one_mul z, ← hab, add_mul], exact add_lt_add_right ((mul_lt_mul_...
lemma
strict_convex_on_of_slope_strict_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "add_div", "convex", "div_eq_iff", "div_lt_div_iff", "linear_order.strict_convex_on_of_lt", "lt_div_iff", "mul_comm", "mul_div_assoc", "mul_lt_mul_left", "one_mul", "ring", "strict_convex_on" ]
If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is strictly less than the slope of the secant line of `f` on `[x, z]`, then `f` is strictly convex.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_concave_on_of_slope_strict_anti_adjacent (hs : convex 𝕜 s) (hf : ∀ {x y z : 𝕜}, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)) : strict_concave_on 𝕜 s f
begin rw ←neg_strict_convex_on_iff, refine strict_convex_on_of_slope_strict_mono_adjacent hs (λ x y z hx hz hxy hyz, _), rw ←neg_lt_neg_iff, simp_rw [←neg_div, neg_sub, pi.neg_apply, neg_sub_neg], exact hf hx hz hxy hyz, end
lemma
strict_concave_on_of_slope_strict_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex", "strict_concave_on", "strict_convex_on_of_slope_strict_mono_adjacent" ]
If for any three points `x < y < z`, the slope of the secant line of `f : 𝕜 → 𝕜` on `[x, y]` is strictly greater than the slope of the secant line of `f` on `[x, z]`, then `f` is strictly concave.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on_iff_slope_mono_adjacent : convex_on 𝕜 s f ↔ convex 𝕜 s ∧ ∀ ⦃x y z : 𝕜⦄, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) ≤ (f z - f y) / (z - y)
⟨λ h, ⟨h.1, λ x y z, h.slope_mono_adjacent⟩, λ h, convex_on_of_slope_mono_adjacent h.1 h.2⟩
lemma
convex_on_iff_slope_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex", "convex_on", "convex_on_of_slope_mono_adjacent" ]
A function `f : 𝕜 → 𝕜` is convex iff for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is less than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
concave_on_iff_slope_anti_adjacent : concave_on 𝕜 s f ↔ convex 𝕜 s ∧ ∀ ⦃x y z : 𝕜⦄, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) ≤ (f y - f x) / (y - x)
⟨λ h, ⟨h.1, λ x y z, h.slope_anti_adjacent⟩, λ h, concave_on_of_slope_anti_adjacent h.1 h.2⟩
lemma
concave_on_iff_slope_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "concave_on", "concave_on_of_slope_anti_adjacent", "convex" ]
A function `f : 𝕜 → 𝕜` is concave iff for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is greater than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on_iff_slope_strict_mono_adjacent : strict_convex_on 𝕜 s f ↔ convex 𝕜 s ∧ ∀ ⦃x y z : 𝕜⦄, x ∈ s → z ∈ s → x < y → y < z → (f y - f x) / (y - x) < (f z - f y) / (z - y)
⟨λ h, ⟨h.1, λ x y z, h.slope_strict_mono_adjacent⟩, λ h, strict_convex_on_of_slope_strict_mono_adjacent h.1 h.2⟩
lemma
strict_convex_on_iff_slope_strict_mono_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex", "strict_convex_on", "strict_convex_on_of_slope_strict_mono_adjacent" ]
A function `f : 𝕜 → 𝕜` is strictly convex iff for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is strictly less than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_concave_on_iff_slope_strict_anti_adjacent : strict_concave_on 𝕜 s f ↔ convex 𝕜 s ∧ ∀ ⦃x y z : 𝕜⦄, x ∈ s → z ∈ s → x < y → y < z → (f z - f y) / (z - y) < (f y - f x) / (y - x)
⟨λ h, ⟨h.1, λ x y z, h.slope_anti_adjacent⟩, λ h, strict_concave_on_of_slope_strict_anti_adjacent h.1 h.2⟩
lemma
strict_concave_on_iff_slope_strict_anti_adjacent
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex", "strict_concave_on", "strict_concave_on_of_slope_strict_anti_adjacent" ]
A function `f : 𝕜 → 𝕜` is strictly concave iff for any three points `x < y < z` the slope of the secant line of `f` on `[x, y]` is strictly greater than the slope of the secant line of `f` on `[x, z]`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.secant_mono_aux1 (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (z - x) * f y ≤ (z - y) * f x + (y - x) * f z
begin have hxy' : 0 < y - x := by linarith, have hyz' : 0 < z - y := by linarith, have hxz' : 0 < z - x := by linarith, rw ← le_div_iff' hxz', have ha : 0 ≤ (z - y) / (z - x) := by positivity, have hb : 0 ≤ (y - x) / (z - x) := by positivity, calc f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z) : ...
lemma
convex_on.secant_mono_aux1
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "le_div_iff'", "ring" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.secant_mono_aux2 (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f y - f x) / (y - x) ≤ (f z - f x) / (z - x)
begin have hxy' : 0 < y - x := by linarith, have hxz' : 0 < z - x := by linarith, rw div_le_div_iff hxy' hxz', linarith only [hf.secant_mono_aux1 hx hz hxy hyz], end
lemma
convex_on.secant_mono_aux2
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "div_le_div_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.secant_mono_aux3 (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f z - f x) / (z - x) ≤ (f z - f y) / (z - y)
begin have hyz' : 0 < z - y := by linarith, have hxz' : 0 < z - x := by linarith, rw div_le_div_iff hxz' hyz', linarith only [hf.secant_mono_aux1 hx hz hxy hyz], end
lemma
convex_on.secant_mono_aux3
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "div_le_div_iff" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.secant_mono (hf : convex_on 𝕜 s f) {a x y : 𝕜} (ha : a ∈ s) (hx : x ∈ s) (hy : y ∈ s) (hxa : x ≠ a) (hya : y ≠ a) (hxy : x ≤ y) : (f x - f a) / (x - a) ≤ (f y - f a) / (y - a)
begin rcases eq_or_lt_of_le hxy with rfl | hxy, { simp }, cases lt_or_gt_of_ne hxa with hxa hxa, { cases lt_or_gt_of_ne hya with hya hya, { convert hf.secant_mono_aux3 hx ha hxy hya using 1; rw ← neg_div_neg_eq; field_simp, }, { convert hf.slope_mono_adjacent hx hy hxa hya using 1, rw ...
lemma
convex_on.secant_mono
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "eq_or_lt_of_le", "neg_div_neg_eq" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on.secant_strict_mono_aux1 (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (z - x) * f y < (z - y) * f x + (y - x) * f z
begin have hxy' : 0 < y - x := by linarith, have hyz' : 0 < z - y := by linarith, have hxz' : 0 < z - x := by linarith, rw ← lt_div_iff' hxz', have ha : 0 < (z - y) / (z - x) := by positivity, have hb : 0 < (y - x) / (z - x) := by positivity, calc f y = f ((z - y) / (z - x) * x + (y - x) / (z - x) * z) : ...
lemma
strict_convex_on.secant_strict_mono_aux1
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "lt_div_iff'", "ring", "strict_convex_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on.secant_strict_mono_aux2 (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f y - f x) / (y - x) < (f z - f x) / (z - x)
begin have hxy' : 0 < y - x := by linarith, have hxz' : 0 < z - x := by linarith, rw div_lt_div_iff hxy' hxz', linarith only [hf.secant_strict_mono_aux1 hx hz hxy hyz], end
lemma
strict_convex_on.secant_strict_mono_aux2
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "div_lt_div_iff", "strict_convex_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on.secant_strict_mono_aux3 (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y < z) : (f z - f x) / (z - x) < (f z - f y) / (z - y)
begin have hyz' : 0 < z - y := by linarith, have hxz' : 0 < z - x := by linarith, rw div_lt_div_iff hxz' hyz', linarith only [hf.secant_strict_mono_aux1 hx hz hxy hyz], end
lemma
strict_convex_on.secant_strict_mono_aux3
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "div_lt_div_iff", "strict_convex_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_convex_on.secant_strict_mono (hf : strict_convex_on 𝕜 s f) {a x y : 𝕜} (ha : a ∈ s) (hx : x ∈ s) (hy : y ∈ s) (hxa : x ≠ a) (hya : y ≠ a) (hxy : x < y) : (f x - f a) / (x - a) < (f y - f a) / (y - a)
begin cases lt_or_gt_of_ne hxa with hxa hxa, { cases lt_or_gt_of_ne hya with hya hya, { convert hf.secant_strict_mono_aux3 hx ha hxy hya using 1; rw ← neg_div_neg_eq; field_simp, }, { convert hf.slope_strict_mono_adjacent hx hy hxa hya using 1, rw ← neg_div_neg_eq; field_simp, } }, ...
lemma
strict_convex_on.secant_strict_mono
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "neg_div_neg_eq", "strict_convex_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
strict_concave_on.secant_strict_mono (hf : strict_concave_on 𝕜 s f) {a x y : 𝕜} (ha : a ∈ s) (hx : x ∈ s) (hy : y ∈ s) (hxa : x ≠ a) (hya : y ≠ a) (hxy : x < y) : (f y - f a) / (y - a) < (f x - f a) / (x - a)
begin have key := hf.neg.secant_strict_mono ha hx hy hxa hya hxy, simp only [pi.neg_apply] at key, rw ← neg_lt_neg_iff, convert key using 1; field_simp, end
lemma
strict_concave_on.secant_strict_mono
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "strict_concave_on" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
convex_on.strict_mono_of_lt (hf : convex_on 𝕜 s f) {x y : 𝕜} (hx : x ∈ s) (hxy : x < y) (hxy' : f x < f y) : strict_mono_on f (s ∩ set.Ici y)
begin intros u hu v hv huv, have step1 : ∀ {z : 𝕜}, z ∈ s ∩ set.Ioi y → f y < f z, { refine λ z hz, hf.lt_right_of_left_lt hx hz.1 _ hxy', rw open_segment_eq_Ioo (hxy.trans hz.2), exact ⟨hxy, hz.2⟩ }, rcases eq_or_lt_of_le hu.2 with rfl | hu2, { exact step1 ⟨hv.1, huv⟩ }, { refine hf.lt_right_of_le...
lemma
convex_on.strict_mono_of_lt
analysis.convex
src/analysis/convex/slope.lean
[ "analysis.convex.function", "tactic.field_simp", "tactic.linarith" ]
[ "convex_on", "eq_or_lt_of_le", "open_segment_eq_Ioo", "segment_eq_Icc", "set.Ici", "set.Ioi", "strict_mono_on" ]
If `f` is convex on a set `s` in a linearly ordered field, and `f x < f y` for two points `x < y` in `s`, then `f` is strictly monotone on `s ∩ [y, ∞)`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex : Prop
∀ ⦃y : E⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • x + b • y ∈ s
def
star_convex
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[]
Star-convexity of sets. `s` is star-convex at `x` if every segment from `x` to a point in `s` is contained in `s`.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_iff_segment_subset : star_convex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → [x -[𝕜] y] ⊆ s
begin split, { rintro h y hy z ⟨a, b, ha, hb, hab, rfl⟩, exact h hy ha hb hab }, { rintro h y hy a b ha hb hab, exact h hy ⟨a, b, ha, hb, hab, rfl⟩ } end
lemma
star_convex_iff_segment_subset
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.segment_subset (h : star_convex 𝕜 x s) {y : E} (hy : y ∈ s) : [x -[𝕜] y] ⊆ s
star_convex_iff_segment_subset.1 h hy
lemma
star_convex.segment_subset
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.open_segment_subset (h : star_convex 𝕜 x s) {y : E} (hy : y ∈ s) : open_segment 𝕜 x y ⊆ s
(open_segment_subset_segment 𝕜 x y).trans (h.segment_subset hy)
lemma
star_convex.open_segment_subset
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "open_segment", "open_segment_subset_segment", "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_iff_pointwise_add_subset : star_convex 𝕜 x s ↔ ∀ ⦃a b : 𝕜⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → a • {x} + b • s ⊆ s
begin refine ⟨_, λ h y hy a b ha hb hab, h ha hb hab (add_mem_add (smul_mem_smul_set $ mem_singleton _) ⟨_, hy, rfl⟩)⟩, rintro hA a b ha hb hab w ⟨au, bv, ⟨u, (rfl : u = x), rfl⟩, ⟨v, hv, rfl⟩, rfl⟩, exact hA hv ha hb hab, end
lemma
star_convex_iff_pointwise_add_subset
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
Alternative definition of star-convexity, in terms of pointwise set operations.
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_empty (x : E) : star_convex 𝕜 x ∅
λ y hy, hy.elim
lemma
star_convex_empty
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_univ (x : E) : star_convex 𝕜 x univ
λ _ _ _ _ _ _ _, trivial
lemma
star_convex_univ
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.inter (hs : star_convex 𝕜 x s) (ht : star_convex 𝕜 x t) : star_convex 𝕜 x (s ∩ t)
λ y hy a b ha hb hab, ⟨hs hy.left ha hb hab, ht hy.right ha hb hab⟩
lemma
star_convex.inter
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_sInter {S : set (set E)} (h : ∀ s ∈ S, star_convex 𝕜 x s) : star_convex 𝕜 x (⋂₀ S)
λ y hy a b ha hb hab s hs, h s hs (hy s hs) ha hb hab
lemma
star_convex_sInter
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_Inter {ι : Sort*} {s : ι → set E} (h : ∀ i, star_convex 𝕜 x (s i)) : star_convex 𝕜 x (⋂ i, s i)
(sInter_range s) ▸ star_convex_sInter $ forall_range_iff.2 h
lemma
star_convex_Inter
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex", "star_convex_sInter" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.union (hs : star_convex 𝕜 x s) (ht : star_convex 𝕜 x t) : star_convex 𝕜 x (s ∪ t)
begin rintro y (hy | hy) a b ha hb hab, { exact or.inl (hs hy ha hb hab) }, { exact or.inr (ht hy ha hb hab) } end
lemma
star_convex.union
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_Union {ι : Sort*} {s : ι → set E} (hs : ∀ i, star_convex 𝕜 x (s i)) : star_convex 𝕜 x (⋃ i, s i)
begin rintro y hy a b ha hb hab, rw mem_Union at ⊢ hy, obtain ⟨i, hy⟩ := hy, exact ⟨i, hs i hy ha hb hab⟩, end
lemma
star_convex_Union
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_sUnion {S : set (set E)} (hS : ∀ s ∈ S, star_convex 𝕜 x s) : star_convex 𝕜 x (⋃₀ S)
begin rw sUnion_eq_Union, exact star_convex_Union (λ s, hS _ s.2), end
lemma
star_convex_sUnion
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex", "star_convex_Union" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.prod {y : F} {s : set E} {t : set F} (hs : star_convex 𝕜 x s) (ht : star_convex 𝕜 y t) : star_convex 𝕜 (x, y) (s ×ˢ t)
λ y hy a b ha hb hab, ⟨hs hy.1 ha hb hab, ht hy.2 ha hb hab⟩
lemma
star_convex.prod
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_pi {ι : Type*} {E : ι → Type*} [Π i, add_comm_monoid (E i)] [Π i, has_smul 𝕜 (E i)] {x : Π i, E i} {s : set ι} {t : Π i, set (E i)} (ht : ∀ ⦃i⦄, i ∈ s → star_convex 𝕜 (x i) (t i)) : star_convex 𝕜 x (s.pi t)
λ y hy a b ha hb hab i hi, ht hi (hy i hi) ha hb hab
lemma
star_convex_pi
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "add_comm_monoid", "has_smul", "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex.mem (hs : star_convex 𝕜 x s) (h : s.nonempty) : x ∈ s
begin obtain ⟨y, hy⟩ := h, convert hs hy zero_le_one le_rfl (add_zero 1), rw [one_smul, zero_smul, add_zero], end
lemma
star_convex.mem
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "le_rfl", "one_smul", "star_convex", "zero_le_one", "zero_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_iff_forall_pos (hx : x ∈ s) : star_convex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s
begin refine ⟨λ h y hy a b ha hb hab, h hy ha.le hb.le hab, _⟩, intros h y hy a b ha hb hab, obtain rfl | ha := ha.eq_or_lt, { rw zero_add at hab, rwa [hab, one_smul, zero_smul, zero_add] }, obtain rfl | hb := hb.eq_or_lt, { rw add_zero at hab, rwa [hab, one_smul, zero_smul, add_zero] }, exact h h...
lemma
star_convex_iff_forall_pos
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "one_smul", "star_convex", "zero_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_iff_forall_ne_pos (hx : x ∈ s) : star_convex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → x ≠ y → ∀ ⦃a b : 𝕜⦄, 0 < a → 0 < b → a + b = 1 → a • x + b • y ∈ s
begin refine ⟨λ h y hy _ a b ha hb hab, h hy ha.le hb.le hab, _⟩, intros h y hy a b ha hb hab, obtain rfl | ha' := ha.eq_or_lt, { rw [zero_add] at hab, rwa [hab, zero_smul, one_smul, zero_add] }, obtain rfl | hb' := hb.eq_or_lt, { rw [add_zero] at hab, rwa [hab, zero_smul, one_smul, add_zero] }, obtain rf...
lemma
star_convex_iff_forall_ne_pos
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "convex.combo_self", "eq_or_ne", "one_smul", "star_convex", "zero_smul" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_iff_open_segment_subset (hx : x ∈ s) : star_convex 𝕜 x s ↔ ∀ ⦃y⦄, y ∈ s → open_segment 𝕜 x y ⊆ s
star_convex_iff_segment_subset.trans $ forall₂_congr $ λ y hy, (open_segment_subset_iff_segment_subset hx hy).symm
lemma
star_convex_iff_open_segment_subset
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "forall₂_congr", "open_segment", "open_segment_subset_iff_segment_subset", "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83
star_convex_singleton (x : E) : star_convex 𝕜 x {x}
begin rintro y (rfl : y = x) a b ha hb hab, exact convex.combo_self hab _, end
lemma
star_convex_singleton
analysis.convex
src/analysis/convex/star.lean
[ "analysis.convex.segment" ]
[ "convex.combo_self", "star_convex" ]
https://github.com/leanprover-community/mathlib
65a1391a0106c9204fe45bc73a039f056558cb83