Midpoint of a segment #
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
.AddMonoidHom.ofMapMidpoint
: construct anAddMonoidHom
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
;pointReflection_midpoint_left
,pointReflection_midpoint_right
:Equiv.pointReflection (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, AddMonoidHom
def
midpoint
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
P
midpoint x y
is the midpoint of the segment [x, y]
.
Equations
- midpoint R x y = (AffineMap.lineMap x y) ⅟2
Instances For
@[simp]
theorem
AffineMap.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]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
(f : P →ᵃ[R] P')
(a : P)
(b : P)
:
@[simp]
theorem
AffineEquiv.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]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
[AddCommGroup V']
[Module R V']
[AddTorsor V' P']
(f : P ≃ᵃ[R] P')
(a : P)
(b : P)
:
theorem
AffineEquiv.pointReflection_midpoint_left
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
(AffineEquiv.pointReflection R (midpoint R x y)) x = y
@[simp]
theorem
Equiv.pointReflection_midpoint_left
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
(Equiv.pointReflection (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]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
theorem
AffineEquiv.pointReflection_midpoint_right
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
(AffineEquiv.pointReflection R (midpoint R x y)) y = x
@[simp]
theorem
Equiv.pointReflection_midpoint_right
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
(Equiv.pointReflection (midpoint R x y)) y = x
theorem
midpoint_eq_iff
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
{z : P}
:
midpoint R x y = z ↔ (AffineEquiv.pointReflection R z) x = y
@[simp]
theorem
midpoint_pointReflection_left
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
midpoint R ((Equiv.pointReflection x) y) y = x
@[simp]
theorem
midpoint_pointReflection_right
{R : Type u_1}
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
(y : P)
:
midpoint R y ((Equiv.pointReflection x) y) = x
@[simp]
theorem
midpoint_sub_left
{R : Type u_1}
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(v₁ : V)
(v₂ : V)
:
@[simp]
theorem
midpoint_sub_right
{R : Type u_1}
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(v₁ : V)
(v₂ : V)
:
@[simp]
theorem
left_sub_midpoint
{R : Type u_1}
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(v₁ : V)
(v₂ : V)
:
@[simp]
theorem
right_sub_midpoint
{R : Type u_1}
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(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]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
:
@[simp]
theorem
left_eq_midpoint_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
:
@[simp]
theorem
midpoint_eq_right_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
:
@[simp]
theorem
right_eq_midpoint_iff
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
:
theorem
midpoint_eq_iff'
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
{x : P}
{y : P}
{z : P}
:
midpoint R x y = z ↔ (Equiv.pointReflection z) x = y
theorem
midpoint_unique
(R : Type u_1)
{V : Type u_2}
{P : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(R' : Type u_6)
[Ring R']
[Invertible 2]
[Module R' V]
(x : P)
(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]
[AddCommGroup V]
[Module R V]
[AddTorsor V P]
(x : P)
:
@[simp]
theorem
midpoint_add_self
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
(y : V)
:
theorem
midpoint_zero_add
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
(y : V)
:
theorem
midpoint_eq_smul_add
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
(y : V)
:
@[simp]
theorem
midpoint_self_neg
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
:
@[simp]
theorem
midpoint_neg_self
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
:
@[simp]
theorem
midpoint_sub_add
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
(y : V)
:
@[simp]
theorem
midpoint_add_sub
(R : Type u_1)
{V : Type u_2}
[Ring R]
[Invertible 2]
[AddCommGroup V]
[Module R V]
(x : V)
(y : V)
:
def
AddMonoidHom.ofMapMidpoint
(R : Type u_1)
(R' : Type u_2)
{E : Type u_3}
{F : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup E]
[Module R E]
[Ring R']
[Invertible 2]
[AddCommGroup 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 AddMonoidHom
.
Equations
- AddMonoidHom.ofMapMidpoint R R' f h0 hm = { toZeroHom := { toFun := f, map_zero' := h0 }, map_add' := (_ : ∀ (x y : E), f (x + y) = f x + f y) }
Instances For
@[simp]
theorem
AddMonoidHom.coe_ofMapMidpoint
(R : Type u_1)
(R' : Type u_2)
{E : Type u_3}
{F : Type u_4}
[Ring R]
[Invertible 2]
[AddCommGroup E]
[Module R E]
[Ring R']
[Invertible 2]
[AddCommGroup 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))
:
⇑(AddMonoidHom.ofMapMidpoint R R' f h0 hm) = f