Midpoint of a segment #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
Main definitions #
midpoint R x y
: midpoint of the segment[x, y]
. We define it forx
andy
in a module over a ringR
with invertible2
.add_monoid_hom.of_map_midpoint
: construct anadd_monoid_hom
given a mapf
such thatf
sends zero to zero and midpoints to midpoints.
Main theorems #
midpoint_eq_iff
:z
is the midpoint of[x, y]
if and only ifx + y = z + z
,midpoint_unique
:midpoint R x y
does not depend onR
;midpoint x y
is linear both inx
andy
;point_reflection_midpoint_left
,point_reflection_midpoint_right
:equiv.point_reflection (midpoint R x y)
swapsx
andy
.
We do not mark most lemmas as @[simp]
because it is hard to tell which side is simpler.
Tags #
midpoint, add_monoid_hom
def
midpoint
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(x y : P) :
P
midpoint x y
is the midpoint of the segment [x, y]
.
Equations
- midpoint R x y = ⇑(affine_map.line_map x y) (⅟ 2)
@[simp]
theorem
affine_map.map_midpoint
{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
[add_comm_group V']
[module R V']
[add_torsor V' P']
(f : P →ᵃ[R] P')
(a b : P) :
@[simp]
theorem
affine_equiv.map_midpoint
{R : Type u_1}
{V : Type u_2}
{V' : Type u_3}
{P : Type u_4}
{P' : Type u_5}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
[add_comm_group V']
[module R V']
[add_torsor V' P']
(f : P ≃ᵃ[R] P')
(a b : P) :
@[simp]
theorem
affine_equiv.point_reflection_midpoint_left
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(x y : P) :
⇑(affine_equiv.point_reflection R (midpoint R x y)) x = y
theorem
midpoint_comm
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(x y : P) :
@[simp]
theorem
affine_equiv.point_reflection_midpoint_right
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(x y : P) :
⇑(affine_equiv.point_reflection R (midpoint R x y)) y = x
theorem
midpoint_vsub_midpoint
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ p₃ p₄ : P) :
theorem
midpoint_vadd_midpoint
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(v v' : V)
(p p' : P) :
theorem
midpoint_eq_iff
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y z : P} :
@[simp]
theorem
midpoint_vsub_left
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ : P) :
@[simp]
theorem
midpoint_vsub_right
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ : P) :
@[simp]
theorem
left_vsub_midpoint
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ : P) :
@[simp]
theorem
right_vsub_midpoint
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ : P) :
theorem
midpoint_vsub
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ p : P) :
theorem
vsub_midpoint
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(p₁ p₂ p : P) :
@[simp]
theorem
midpoint_sub_left
{R : Type u_1}
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(v₁ v₂ : V) :
@[simp]
theorem
midpoint_sub_right
{R : Type u_1}
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(v₁ v₂ : V) :
@[simp]
theorem
left_sub_midpoint
{R : Type u_1}
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(v₁ v₂ : V) :
@[simp]
theorem
right_sub_midpoint
{R : Type u_1}
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(v₁ v₂ : V) :
@[simp]
theorem
midpoint_eq_left_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y : P} :
@[simp]
theorem
left_eq_midpoint_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y : P} :
@[simp]
theorem
midpoint_eq_right_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y : P} :
@[simp]
theorem
right_eq_midpoint_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y : P} :
theorem
midpoint_eq_midpoint_iff_vsub_eq_vsub
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x x' y y' : P} :
theorem
midpoint_eq_iff'
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
{x y z : P} :
theorem
midpoint_unique
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(R' : Type u_3)
[ring R']
[invertible 2]
[module R' V]
(x y : P) :
midpoint
does not depend on the ring R
.
@[simp]
theorem
midpoint_self
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
[add_torsor V P]
(x : P) :
@[simp]
theorem
midpoint_add_self
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x y : V) :
theorem
midpoint_zero_add
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x y : V) :
theorem
midpoint_eq_smul_add
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x y : V) :
@[simp]
theorem
midpoint_self_neg
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x : V) :
@[simp]
theorem
midpoint_neg_self
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x : V) :
@[simp]
theorem
midpoint_sub_add
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x y : V) :
@[simp]
theorem
midpoint_add_sub
(R : Type u_1)
{V : Type u_2}
[ring R]
[invertible 2]
[add_comm_group V]
[module R V]
(x y : V) :
def
add_monoid_hom.of_map_midpoint
(R : Type u_1)
(R' : Type u_2)
{E : Type u_3}
{F : Type u_4}
[ring R]
[invertible 2]
[add_comm_group E]
[module R E]
[ring R']
[invertible 2]
[add_comm_group F]
[module R' F]
(f : E → F)
(h0 : f 0 = 0)
(hm : ∀ (x y : E), f (midpoint R x y) = midpoint R' (f x) (f y)) :
E →+ F
A map f : E → F
sending zero to zero and midpoints to midpoints is an add_monoid_hom
.
@[simp]
theorem
add_monoid_hom.coe_of_map_midpoint
(R : Type u_1)
(R' : Type u_2)
{E : Type u_3}
{F : Type u_4}
[ring R]
[invertible 2]
[add_comm_group E]
[module R E]
[ring R']
[invertible 2]
[add_comm_group F]
[module R' F]
(f : E → F)
(h0 : f 0 = 0)
(hm : ∀ (x y : E), f (midpoint R x y) = midpoint R' (f x) (f y)) :
⇑(add_monoid_hom.of_map_midpoint R R' f h0 hm) = f