File: Mathlib/LinearAlgebra/AffineSpace/Midpoint.lean

full_name: midpoint
code: /-- `midpoint x y` is the midpoint of the segment `[x, y]`. -/
def midpoint (x y : P) : P 
goal: P

full_name: AffineMap.map_midpoint
code: @[simp]
theorem AffineMap.map_midpoint (f : P →ᵃ[R] P') (a b : P) :
    f (midpoint R a b) = midpoint R (f a) (f b) 
goal: f (midpoint R a b) = midpoint R (f a) (f b)

full_name: AffineEquiv.map_midpoint
code: @[simp]
theorem AffineEquiv.map_midpoint (f : P ≃ᵃ[R] P') (a b : P) :
    f (midpoint R a b) = midpoint R (f a) (f b) 
goal: f (midpoint R a b) = midpoint R (f a) (f b)

full_name: AffineEquiv.pointReflection_midpoint_left
code: theorem AffineEquiv.pointReflection_midpoint_left (x y : P) :
    pointReflection R (midpoint R x y) x = y 
goal: (AffineEquiv.pointReflection R (midpoint R x y)) x = y

full_name: Equiv.pointReflection_midpoint_left
code: @[simp] -- Porting note: added variant with `Equiv.pointReflection` for `simp`
theorem Equiv.pointReflection_midpoint_left (x y : P) :
    (Equiv.pointReflection (midpoint R x y)) x = y 
goal: (Equiv.pointReflection (midpoint R x y)) x = y

full_name: midpoint_comm
code: theorem midpoint_comm (x y : P) : midpoint R x y = midpoint R y x 
goal: midpoint R x y = midpoint R y x

full_name: AffineEquiv.pointReflection_midpoint_right
code: theorem AffineEquiv.pointReflection_midpoint_right (x y : P) :
    pointReflection R (midpoint R x y) y = x 
goal: (AffineEquiv.pointReflection R (midpoint R x y)) y = x

full_name: Equiv.pointReflection_midpoint_right
code: @[simp] -- Porting note: added variant with `Equiv.pointReflection` for `simp`
theorem Equiv.pointReflection_midpoint_right (x y : P) :
    (Equiv.pointReflection (midpoint R x y)) y = x 
goal: (Equiv.pointReflection (midpoint R x y)) y = x

full_name: midpoint_vsub_midpoint
code: theorem midpoint_vsub_midpoint (p₁ p₂ p₃ p₄ : P) :
    midpoint R p₁ p₂ -ᵥ midpoint R p₃ p₄ = midpoint R (p₁ -ᵥ p₃) (p₂ -ᵥ p₄) 
goal: midpoint R p₁ p₂ -ᵥ midpoint R p₃ p₄ = midpoint R (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)

full_name: midpoint_vadd_midpoint
code: theorem midpoint_vadd_midpoint (v v' : V) (p p' : P) :
    midpoint R v v' +ᵥ midpoint R p p' = midpoint R (v +ᵥ p) (v' +ᵥ p') 
goal: midpoint R v v' +ᵥ midpoint R p p' = midpoint R (v +ᵥ p) (v' +ᵥ p')

full_name: midpoint_eq_iff
code: theorem midpoint_eq_iff {x y z : P} : midpoint R x y = z ↔ pointReflection R z x = y 
goal: midpoint R x y = z ↔ (AffineEquiv.pointReflection R z) x = y

full_name: midpoint_pointReflection_left
code: @[simp]
theorem midpoint_pointReflection_left (x y : P) :
    midpoint R (Equiv.pointReflection x y) y = x 
goal: midpoint R ((Equiv.pointReflection x) y) y = x

full_name: midpoint_pointReflection_right
code: @[simp]
theorem midpoint_pointReflection_right (x y : P) :
    midpoint R y (Equiv.pointReflection x y) = x 
goal: midpoint R y ((Equiv.pointReflection x) y) = x

full_name: midpoint_vsub_left
code: @[simp]
theorem midpoint_vsub_left (p₁ p₂ : P) : midpoint R p₁ p₂ -ᵥ p₁ = (⅟ 2 : R) • (p₂ -ᵥ p₁) 
goal: midpoint R p₁ p₂ -ᵥ p₁ = ⅟2 • (p₂ -ᵥ p₁)

full_name: midpoint_vsub_right
code: @[simp]
theorem midpoint_vsub_right (p₁ p₂ : P) : midpoint R p₁ p₂ -ᵥ p₂ = (⅟ 2 : R) • (p₁ -ᵥ p₂) 
goal: midpoint R p₁ p₂ -ᵥ p₂ = ⅟2 • (p₁ -ᵥ p₂)

full_name: left_vsub_midpoint
code: @[simp]
theorem left_vsub_midpoint (p₁ p₂ : P) : p₁ -ᵥ midpoint R p₁ p₂ = (⅟ 2 : R) • (p₁ -ᵥ p₂) 
goal: p₁ -ᵥ midpoint R p₁ p₂ = ⅟2 • (p₁ -ᵥ p₂)

full_name: right_vsub_midpoint
code: @[simp]
theorem right_vsub_midpoint (p₁ p₂ : P) : p₂ -ᵥ midpoint R p₁ p₂ = (⅟ 2 : R) • (p₂ -ᵥ p₁) 
goal: p₂ -ᵥ midpoint R p₁ p₂ = ⅟2 • (p₂ -ᵥ p₁)

full_name: midpoint_vsub
code: theorem midpoint_vsub (p₁ p₂ p : P) :
    midpoint R p₁ p₂ -ᵥ p = (⅟ 2 : R) • (p₁ -ᵥ p) + (⅟ 2 : R) • (p₂ -ᵥ p) 
goal: midpoint R p₁ p₂ -ᵥ p = ⅟2 • (p₁ -ᵥ p) + ⅟2 • (p₂ -ᵥ p)

full_name: vsub_midpoint
code: theorem vsub_midpoint (p₁ p₂ p : P) :
    p -ᵥ midpoint R p₁ p₂ = (⅟ 2 : R) • (p -ᵥ p₁) + (⅟ 2 : R) • (p -ᵥ p₂) 
goal: p -ᵥ midpoint R p₁ p₂ = ⅟2 • (p -ᵥ p₁) + ⅟2 • (p -ᵥ p₂)

full_name: midpoint_sub_left
code: @[simp]
theorem midpoint_sub_left (v₁ v₂ : V) : midpoint R v₁ v₂ - v₁ = (⅟ 2 : R) • (v₂ - v₁) 
goal: midpoint R v₁ v₂ - v₁ = ⅟2 • (v₂ - v₁)

full_name: midpoint_sub_right
code: @[simp]
theorem midpoint_sub_right (v₁ v₂ : V) : midpoint R v₁ v₂ - v₂ = (⅟ 2 : R) • (v₁ - v₂) 
goal: midpoint R v₁ v₂ - v₂ = ⅟2 • (v₁ - v₂)

full_name: left_sub_midpoint
code: @[simp]
theorem left_sub_midpoint (v₁ v₂ : V) : v₁ - midpoint R v₁ v₂ = (⅟ 2 : R) • (v₁ - v₂) 
goal: v₁ - midpoint R v₁ v₂ = ⅟2 • (v₁ - v₂)

full_name: right_sub_midpoint
code: @[simp]
theorem right_sub_midpoint (v₁ v₂ : V) : v₂ - midpoint R v₁ v₂ = (⅟ 2 : R) • (v₂ - v₁) 
goal: v₂ - midpoint R v₁ v₂ = ⅟2 • (v₂ - v₁)

full_name: midpoint_eq_left_iff
code: @[simp]
theorem midpoint_eq_left_iff {x y : P} : midpoint R x y = x ↔ x = y 
goal: midpoint R x y = x ↔ x = y

full_name: left_eq_midpoint_iff
code: @[simp]
theorem left_eq_midpoint_iff {x y : P} : x = midpoint R x y ↔ x = y 
goal: x = midpoint R x y ↔ x = y

full_name: midpoint_eq_right_iff
code: @[simp]
theorem midpoint_eq_right_iff {x y : P} : midpoint R x y = y ↔ x = y 
goal: midpoint R x y = y ↔ x = y

full_name: right_eq_midpoint_iff
code: @[simp]
theorem right_eq_midpoint_iff {x y : P} : y = midpoint R x y ↔ x = y 
goal: y = midpoint R x y ↔ x = y

full_name: midpoint_eq_midpoint_iff_vsub_eq_vsub
code: theorem midpoint_eq_midpoint_iff_vsub_eq_vsub {x x' y y' : P} :
    midpoint R x y = midpoint R x' y' ↔ x -ᵥ x' = y' -ᵥ y 
goal: midpoint R x y = midpoint R x' y' ↔ x -ᵥ x' = y' -ᵥ y

full_name: midpoint_eq_iff'
code: theorem midpoint_eq_iff' {x y z : P} : midpoint R x y = z ↔ Equiv.pointReflection z x = y 
goal: midpoint R x y = z ↔ (Equiv.pointReflection z) x = y

full_name: midpoint_unique
code: /-- `midpoint` does not depend on the ring `R`. -/
theorem midpoint_unique (R' : Type*) [Ring R'] [Invertible (2 : R')] [Module R' V] (x y : P) :
    midpoint R x y = midpoint R' x y 
goal: midpoint R x y = midpoint R' x y

full_name: midpoint_self
code: @[simp]
theorem midpoint_self (x : P) : midpoint R x x = x 
goal: midpoint R x x = x

full_name: midpoint_add_self
code: @[simp]
theorem midpoint_add_self (x y : V) : midpoint R x y + midpoint R x y = x + y 
goal: midpoint R x y + midpoint R x y = x + y

full_name: midpoint_zero_add
code: theorem midpoint_zero_add (x y : V) : midpoint R 0 (x + y) = midpoint R x y 
goal: midpoint R 0 (x + y) = midpoint R x y

full_name: midpoint_eq_smul_add
code: theorem midpoint_eq_smul_add (x y : V) : midpoint R x y = (⅟ 2 : R) • (x + y) 
goal: midpoint R x y = ⅟2 • (x + y)

full_name: midpoint_self_neg
code: @[simp]
theorem midpoint_self_neg (x : V) : midpoint R x (-x) = 0 
goal: midpoint R x (-x) = 0

full_name: midpoint_neg_self
code: @[simp]
theorem midpoint_neg_self (x : V) : midpoint R (-x) x = 0 
goal: midpoint R (-x) x = 0

full_name: midpoint_sub_add
code: @[simp]
theorem midpoint_sub_add (x y : V) : midpoint R (x - y) (x + y) = x 
goal: midpoint R (x - y) (x + y) = x

full_name: midpoint_add_sub
code: @[simp]
theorem midpoint_add_sub (x y : V) : midpoint R (x + y) (x - y) = x 
goal: midpoint R (x + y) (x - y) = x

full_name: AddMonoidHom.ofMapMidpoint
code: /-- A map `f : E → F` sending zero to zero and midpoints to midpoints is an `AddMonoidHom`. -/
def ofMapMidpoint (f : E → F) (h0 : f 0 = 0)
    (hm : ∀ x y, f (midpoint R x y) = midpoint R' (f x) (f y)) : E →+ F 
goal: E →+ F

full_name: AddMonoidHom.coe_ofMapMidpoint
code: @[simp]
theorem coe_ofMapMidpoint (f : E → F) (h0 : f 0 = 0)
    (hm : ∀ x y, f (midpoint R x y) = midpoint R' (f x) (f y)) :
    ⇑(ofMapMidpoint R R' f h0 hm) = f 
goal: ⇑(AddMonoidHom.ofMapMidpoint R R' f h0 hm) = f