File: Mathlib/Algebra/AddTorsor.lean

full_name: AddTorsor
code: /-- An `AddTorsor G P` gives a structure to the nonempty type `P`,
acted on by an `AddGroup G` with a transitive and free action given
by the `+ᵥ` operation and a corresponding subtraction given by the
`-ᵥ` operation. In the case of a vector space, it is an affine
space. -/
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
  VSub G P where
  [nonempty : Nonempty P]
  /-- Torsor subtraction and addition with the same element cancels out. -/
  vsub_vadd' : ∀ p₁ p₂ : P, (p₁ -ᵥ p₂ : G) +ᵥ p₂ = p₁
  /-- Torsor addition and subtraction with the same element cancels out. -/
  vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
goal: Type (max u_1 u_2)

full_name: AddTorsor.vsub_vadd'
code: /-- An `AddTorsor G P` gives a structure to the nonempty type `P`,
acted on by an `AddGroup G` with a transitive and free action given
by the `+ᵥ` operation and a corresponding subtraction given by the
`-ᵥ` operation. In the case of a vector space, it is an affine
space. -/
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
  VSub G P where
  [nonempty : Nonempty P]
  /-- Torsor subtraction and addition with the same element cancels out. -/
  vsub_vadd' : ∀ p₁ p₂ : P, (p₁ -ᵥ p₂ : G) +ᵥ p₂ = p₁
  /-- Torsor addition and subtraction with the same element cancels out. -/
  vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
goal: p₁ -ᵥ p₂ +ᵥ p₂ = p₁

full_name: AddTorsor.vadd_vsub'
code: /-- An `AddTorsor G P` gives a structure to the nonempty type `P`,
acted on by an `AddGroup G` with a transitive and free action given
by the `+ᵥ` operation and a corresponding subtraction given by the
`-ᵥ` operation. In the case of a vector space, it is an affine
space. -/
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
  VSub G P where
  [nonempty : Nonempty P]
  /-- Torsor subtraction and addition with the same element cancels out. -/
  vsub_vadd' : ∀ p₁ p₂ : P, (p₁ -ᵥ p₂ : G) +ᵥ p₂ = p₁
  /-- Torsor addition and subtraction with the same element cancels out. -/
  vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
goal: g +ᵥ p -ᵥ p = g

full_name: AddTorsor.nonempty
code: /-- An `AddTorsor G P` gives a structure to the nonempty type `P`,
acted on by an `AddGroup G` with a transitive and free action given
by the `+ᵥ` operation and a corresponding subtraction given by the
`-ᵥ` operation. In the case of a vector space, it is an affine
space. -/
class AddTorsor (G : outParam Type*) (P : Type*) [AddGroup G] extends AddAction G P,
  VSub G P where
  [nonempty : Nonempty P]
  /-- Torsor subtraction and addition with the same element cancels out. -/
  vsub_vadd' : ∀ p₁ p₂ : P, (p₁ -ᵥ p₂ : G) +ᵥ p₂ = p₁
  /-- Torsor addition and subtraction with the same element cancels out. -/
  vadd_vsub' : ∀ (g : G) (p : P), g +ᵥ p -ᵥ p = g
goal: Nonempty P

full_name: addGroupIsAddTorsor
code: /-- An `AddGroup G` is a torsor for itself. -/
-- Porting note(#12096): linter not ported yet
--@[nolint instance_priority]
instance addGroupIsAddTorsor (G : Type*) [AddGroup G] : AddTorsor G G 
goal: AddTorsor G G

full_name: vsub_eq_sub
code: /-- Simplify subtraction for a torsor for an `AddGroup G` over
itself. -/
@[simp]
theorem vsub_eq_sub {G : Type*} [AddGroup G] (g₁ g₂ : G) : g₁ -ᵥ g₂ = g₁ - g₂ 
goal: g₁ -ᵥ g₂ = g₁ - g₂

full_name: vsub_vadd
code: /-- Adding the result of subtracting from another point produces that
point. -/
@[simp]
theorem vsub_vadd (p₁ p₂ : P) : p₁ -ᵥ p₂ +ᵥ p₂ = p₁ 
goal: p₁ -ᵥ p₂ +ᵥ p₂ = p₁

full_name: vadd_vsub
code: /-- Adding a group element then subtracting the original point
produces that group element. -/
@[simp]
theorem vadd_vsub (g : G) (p : P) : g +ᵥ p -ᵥ p = g 
goal: g +ᵥ p -ᵥ p = g

full_name: vadd_right_cancel
code: /-- If the same point added to two group elements produces equal
results, those group elements are equal. -/
theorem vadd_right_cancel {g₁ g₂ : G} (p : P) (h : g₁ +ᵥ p = g₂ +ᵥ p) : g₁ = g₂ 
goal: g₁ = g₂

full_name: vadd_right_cancel_iff
code: @[simp]
theorem vadd_right_cancel_iff {g₁ g₂ : G} (p : P) : g₁ +ᵥ p = g₂ +ᵥ p ↔ g₁ = g₂ 
goal: g₁ +ᵥ p = g₂ +ᵥ p ↔ g₁ = g₂

full_name: vadd_right_injective
code: /-- Adding a group element to the point `p` is an injective
function. -/
theorem vadd_right_injective (p : P) : Function.Injective ((· +ᵥ p) : G → P) 
goal: Function.Injective fun x => x +ᵥ p

full_name: vadd_vsub_assoc
code: /-- Adding a group element to a point, then subtracting another point,
produces the same result as subtracting the points then adding the
group element. -/
theorem vadd_vsub_assoc (g : G) (p₁ p₂ : P) : g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂) 
goal: g +ᵥ p₁ -ᵥ p₂ = g + (p₁ -ᵥ p₂)

full_name: vsub_self
code: /-- Subtracting a point from itself produces 0. -/
@[simp]
theorem vsub_self (p : P) : p -ᵥ p = (0 : G) 
goal: p -ᵥ p = 0

full_name: eq_of_vsub_eq_zero
code: /-- If subtracting two points produces 0, they are equal. -/
theorem eq_of_vsub_eq_zero {p₁ p₂ : P} (h : p₁ -ᵥ p₂ = (0 : G)) : p₁ = p₂ 
goal: p₁ = p₂

full_name: vsub_eq_zero_iff_eq
code: /-- Subtracting two points produces 0 if and only if they are
equal. -/
@[simp]
theorem vsub_eq_zero_iff_eq {p₁ p₂ : P} : p₁ -ᵥ p₂ = (0 : G) ↔ p₁ = p₂ 
goal: p₁ -ᵥ p₂ = 0 ↔ p₁ = p₂

full_name: vsub_ne_zero
code: theorem vsub_ne_zero {p q : P} : p -ᵥ q ≠ (0 : G) ↔ p ≠ q 
goal: p -ᵥ q ≠ 0 ↔ p ≠ q

full_name: vsub_add_vsub_cancel
code: /-- Cancellation adding the results of two subtractions. -/
@[simp]
theorem vsub_add_vsub_cancel (p₁ p₂ p₃ : P) : p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃ 
goal: p₁ -ᵥ p₂ + (p₂ -ᵥ p₃) = p₁ -ᵥ p₃

full_name: neg_vsub_eq_vsub_rev
code: /-- Subtracting two points in the reverse order produces the negation
of subtracting them. -/
@[simp]
theorem neg_vsub_eq_vsub_rev (p₁ p₂ : P) : -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁ 
goal: -(p₁ -ᵥ p₂) = p₂ -ᵥ p₁

full_name: vadd_vsub_eq_sub_vsub
code: theorem vadd_vsub_eq_sub_vsub (g : G) (p q : P) : g +ᵥ p -ᵥ q = g - (q -ᵥ p) 
goal: g +ᵥ p -ᵥ q = g - (q -ᵥ p)

full_name: vsub_vadd_eq_vsub_sub
code: /-- Subtracting the result of adding a group element produces the same result
as subtracting the points and subtracting that group element. -/
theorem vsub_vadd_eq_vsub_sub (p₁ p₂ : P) (g : G) : p₁ -ᵥ (g +ᵥ p₂) = p₁ -ᵥ p₂ - g 
goal: p₁ -ᵥ (g +ᵥ p₂) = p₁ -ᵥ p₂ - g

full_name: vsub_sub_vsub_cancel_right
code: /-- Cancellation subtracting the results of two subtractions. -/
@[simp]
theorem vsub_sub_vsub_cancel_right (p₁ p₂ p₃ : P) : p₁ -ᵥ p₃ - (p₂ -ᵥ p₃) = p₁ -ᵥ p₂ 
goal: p₁ -ᵥ p₃ - (p₂ -ᵥ p₃) = p₁ -ᵥ p₂

full_name: eq_vadd_iff_vsub_eq
code: /-- Convert between an equality with adding a group element to a point
and an equality of a subtraction of two points with a group
element. -/
theorem eq_vadd_iff_vsub_eq (p₁ : P) (g : G) (p₂ : P) : p₁ = g +ᵥ p₂ ↔ p₁ -ᵥ p₂ = g 
goal: p₁ = g +ᵥ p₂ ↔ p₁ -ᵥ p₂ = g

full_name: vadd_eq_vadd_iff_neg_add_eq_vsub
code: theorem vadd_eq_vadd_iff_neg_add_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} :
    v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ -v₁ + v₂ = p₁ -ᵥ p₂ 
goal: v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ -v₁ + v₂ = p₁ -ᵥ p₂

full_name: Set.singleton_vsub_self
code: theorem singleton_vsub_self (p : P) : ({p} : Set P) -ᵥ {p} = {(0 : G)} 
goal: {p} -ᵥ {p} = {0}

full_name: vadd_vsub_vadd_cancel_right
code: @[simp]
theorem vadd_vsub_vadd_cancel_right (v₁ v₂ : G) (p : P) : v₁ +ᵥ p -ᵥ (v₂ +ᵥ p) = v₁ - v₂ 
goal: v₁ +ᵥ p -ᵥ (v₂ +ᵥ p) = v₁ - v₂

full_name: vsub_left_cancel
code: /-- If the same point subtracted from two points produces equal
results, those points are equal. -/
theorem vsub_left_cancel {p₁ p₂ p : P} (h : p₁ -ᵥ p = p₂ -ᵥ p) : p₁ = p₂ 
goal: p₁ = p₂

full_name: vsub_left_cancel_iff
code: /-- The same point subtracted from two points produces equal results
if and only if those points are equal. -/
@[simp]
theorem vsub_left_cancel_iff {p₁ p₂ p : P} : p₁ -ᵥ p = p₂ -ᵥ p ↔ p₁ = p₂ 
goal: p₁ -ᵥ p = p₂ -ᵥ p ↔ p₁ = p₂

full_name: vsub_left_injective
code: /-- Subtracting the point `p` is an injective function. -/
theorem vsub_left_injective (p : P) : Function.Injective ((· -ᵥ p) : P → G) 
goal: Function.Injective fun x => x -ᵥ p

full_name: vsub_right_cancel
code: /-- If subtracting two points from the same point produces equal
results, those points are equal. -/
theorem vsub_right_cancel {p₁ p₂ p : P} (h : p -ᵥ p₁ = p -ᵥ p₂) : p₁ = p₂ 
goal: p₁ = p₂

full_name: vsub_right_cancel_iff
code: /-- Subtracting two points from the same point produces equal results
if and only if those points are equal. -/
@[simp]
theorem vsub_right_cancel_iff {p₁ p₂ p : P} : p -ᵥ p₁ = p -ᵥ p₂ ↔ p₁ = p₂ 
goal: p -ᵥ p₁ = p -ᵥ p₂ ↔ p₁ = p₂

full_name: vsub_right_injective
code: /-- Subtracting a point from the point `p` is an injective
function. -/
theorem vsub_right_injective (p : P) : Function.Injective ((p -ᵥ ·) : P → G) 
goal: Function.Injective fun x => p -ᵥ x

full_name: vsub_sub_vsub_cancel_left
code: /-- Cancellation subtracting the results of two subtractions. -/
@[simp]
theorem vsub_sub_vsub_cancel_left (p₁ p₂ p₃ : P) : p₃ -ᵥ p₂ - (p₃ -ᵥ p₁) = p₁ -ᵥ p₂ 
goal: p₃ -ᵥ p₂ - (p₃ -ᵥ p₁) = p₁ -ᵥ p₂

full_name: vadd_vsub_vadd_cancel_left
code: @[simp]
theorem vadd_vsub_vadd_cancel_left (v : G) (p₁ p₂ : P) : v +ᵥ p₁ -ᵥ (v +ᵥ p₂) = p₁ -ᵥ p₂ 
goal: v +ᵥ p₁ -ᵥ (v +ᵥ p₂) = p₁ -ᵥ p₂

full_name: vsub_vadd_comm
code: theorem vsub_vadd_comm (p₁ p₂ p₃ : P) : (p₁ -ᵥ p₂ : G) +ᵥ p₃ = p₃ -ᵥ p₂ +ᵥ p₁ 
goal: p₁ -ᵥ p₂ +ᵥ p₃ = p₃ -ᵥ p₂ +ᵥ p₁

full_name: vadd_eq_vadd_iff_sub_eq_vsub
code: theorem vadd_eq_vadd_iff_sub_eq_vsub {v₁ v₂ : G} {p₁ p₂ : P} :
    v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ v₂ - v₁ = p₁ -ᵥ p₂ 
goal: v₁ +ᵥ p₁ = v₂ +ᵥ p₂ ↔ v₂ - v₁ = p₁ -ᵥ p₂

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

full_name: Prod.instAddTorsor
code: instance instAddTorsor : AddTorsor (G × G') (P × P') 
goal: AddTorsor (G × G') (P × P')

full_name: Prod.fst_vadd
code: @[simp]
theorem fst_vadd (v : G × G') (p : P × P') : (v +ᵥ p).1 = v.1 +ᵥ p.1 
goal: (v +ᵥ p).1 = v.1 +ᵥ p.1

full_name: Prod.snd_vadd
code: @[simp]
theorem snd_vadd (v : G × G') (p : P × P') : (v +ᵥ p).2 = v.2 +ᵥ p.2 
goal: (v +ᵥ p).2 = v.2 +ᵥ p.2

full_name: Prod.mk_vadd_mk
code: @[simp]
theorem mk_vadd_mk (v : G) (v' : G') (p : P) (p' : P') : (v, v') +ᵥ (p, p') = (v +ᵥ p, v' +ᵥ p') 
goal: (v, v') +ᵥ (p, p') = (v +ᵥ p, v' +ᵥ p')

full_name: Prod.fst_vsub
code: @[simp]
theorem fst_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').1 = p₁.1 -ᵥ p₂.1 
goal: (p₁ -ᵥ p₂).1 = p₁.1 -ᵥ p₂.1

full_name: Prod.snd_vsub
code: @[simp]
theorem snd_vsub (p₁ p₂ : P × P') : (p₁ -ᵥ p₂ : G × G').2 = p₁.2 -ᵥ p₂.2 
goal: (p₁ -ᵥ p₂).2 = p₁.2 -ᵥ p₂.2

full_name: Prod.mk_vsub_mk
code: @[simp]
theorem mk_vsub_mk (p₁ p₂ : P) (p₁' p₂' : P') :
    ((p₁, p₁') -ᵥ (p₂, p₂') : G × G') = (p₁ -ᵥ p₂, p₁' -ᵥ p₂') 
goal: (p₁, p₁') -ᵥ (p₂, p₂') = (p₁ -ᵥ p₂, p₁' -ᵥ p₂')

full_name: Pi.instAddTorsor
code: /-- A product of `AddTorsor`s is an `AddTorsor`. -/
instance instAddTorsor [∀ i, AddTorsor (fg i) (fp i)] : AddTorsor (∀ i, fg i) (∀ i, fp i) 
goal: AddTorsor ((i : I) → fg i) ((i : I) → fp i)

full_name: Equiv.vaddConst
code: /-- `v ↦ v +ᵥ p` as an equivalence. -/
def vaddConst (p : P) : G ≃ P 
goal: G ≃ P

full_name: Equiv.coe_vaddConst
code: @[simp]
theorem coe_vaddConst (p : P) : ⇑(vaddConst p) = fun v => v +ᵥ p 
goal: ⇑(Equiv.vaddConst p) = fun v => v +ᵥ p

full_name: Equiv.coe_vaddConst_symm
code: @[simp]
theorem coe_vaddConst_symm (p : P) : ⇑(vaddConst p).symm = fun p' => p' -ᵥ p 
goal: ⇑(Equiv.vaddConst p).symm = fun p' => p' -ᵥ p

full_name: Equiv.constVSub
code: /-- `p' ↦ p -ᵥ p'` as an equivalence. -/
def constVSub (p : P) : P ≃ G 
goal: P ≃ G

full_name: Equiv.coe_constVSub
code: @[simp] lemma coe_constVSub (p : P) : ⇑(constVSub p) = (p -ᵥ ·) 
goal: ⇑(Equiv.constVSub p) = fun x => p -ᵥ x

full_name: Equiv.coe_constVSub_symm
code: @[simp]
theorem coe_constVSub_symm (p : P) : ⇑(constVSub p).symm = fun (v : G) => -v +ᵥ p 
goal: ⇑(Equiv.constVSub p).symm = fun v => -v +ᵥ p

full_name: Equiv.constVAdd
code: /-- The permutation given by `p ↦ v +ᵥ p`. -/
def constVAdd (v : G) : Equiv.Perm P 
goal: Equiv.Perm P

full_name: Equiv.coe_constVAdd
code: @[simp] lemma coe_constVAdd (v : G) : ⇑(constVAdd P v) = (v +ᵥ ·) 
goal: ⇑(Equiv.constVAdd P v) = fun x => v +ᵥ x

full_name: Equiv.constVAdd_zero
code: @[simp]
theorem constVAdd_zero : constVAdd P (0 : G) = 1 
goal: Equiv.constVAdd P 0 = 1

full_name: Equiv.constVAdd_add
code: @[simp]
theorem constVAdd_add (v₁ v₂ : G) : constVAdd P (v₁ + v₂) = constVAdd P v₁ * constVAdd P v₂ 
goal: Equiv.constVAdd P (v₁ + v₂) = Equiv.constVAdd P v₁ * Equiv.constVAdd P v₂

full_name: Equiv.constVAddHom
code: /-- `Equiv.constVAdd` as a homomorphism from `Multiplicative G` to `Equiv.perm P` -/
def constVAddHom : Multiplicative G →* Equiv.Perm P 
goal: Multiplicative G →* Equiv.Perm P

full_name: Equiv.pointReflection
code: /-- Point reflection in `x` as a permutation. -/
def pointReflection (x : P) : Perm P 
goal: Equiv.Perm P

full_name: Equiv.pointReflection_apply
code: theorem pointReflection_apply (x y : P) : pointReflection x y = x -ᵥ y +ᵥ x 
goal: (Equiv.pointReflection x) y = x -ᵥ y +ᵥ x

full_name: Equiv.pointReflection_vsub_left
code: @[simp]
theorem pointReflection_vsub_left (x y : P) : pointReflection x y -ᵥ x = x -ᵥ y 
goal: (Equiv.pointReflection x) y -ᵥ x = x -ᵥ y

full_name: Equiv.left_vsub_pointReflection
code: @[simp]
theorem left_vsub_pointReflection (x y : P) : x -ᵥ pointReflection x y = y -ᵥ x 
goal: x -ᵥ (Equiv.pointReflection x) y = y -ᵥ x

full_name: Equiv.pointReflection_vsub_right
code: @[simp]
theorem pointReflection_vsub_right (x y : P) : pointReflection x y -ᵥ y = 2 • (x -ᵥ y) 
goal: (Equiv.pointReflection x) y -ᵥ y = 2 • (x -ᵥ y)

full_name: Equiv.right_vsub_pointReflection
code: @[simp]
theorem right_vsub_pointReflection (x y : P) : y -ᵥ pointReflection x y = 2 • (y -ᵥ x) 
goal: y -ᵥ (Equiv.pointReflection x) y = 2 • (y -ᵥ x)

full_name: Equiv.pointReflection_symm
code: @[simp]
theorem pointReflection_symm (x : P) : (pointReflection x).symm = pointReflection x 
goal: Equiv.symm (Equiv.pointReflection x) = Equiv.pointReflection x

full_name: Equiv.pointReflection_self
code: @[simp]
theorem pointReflection_self (x : P) : pointReflection x x = x 
goal: (Equiv.pointReflection x) x = x

full_name: Equiv.pointReflection_involutive
code: theorem pointReflection_involutive (x : P) : Involutive (pointReflection x : P → P) 
goal: Function.Involutive ⇑(Equiv.pointReflection x)

full_name: Equiv.pointReflection_fixed_iff_of_injective_bit0
code: /-- `x` is the only fixed point of `pointReflection x`. This lemma requires
`x + x = y + y ↔ x = y`. There is no typeclass to use here, so we add it as an explicit argument. -/
theorem pointReflection_fixed_iff_of_injective_bit0 {x y : P} (h : Injective (2 • · : G → G)) :
    pointReflection x y = y ↔ y = x 
goal: (Equiv.pointReflection x) y = y ↔ y = x

full_name: Equiv.injective_pointReflection_left_of_injective_bit0
code: theorem injective_pointReflection_left_of_injective_bit0 {G P : Type*} [AddCommGroup G]
    [AddTorsor G P] (h : Injective (2 • · : G → G)) (y : P) :
    Injective fun x : P => pointReflection x y 
goal: Function.Injective fun x => (Equiv.pointReflection x) y

full_name: AddTorsor.subsingleton_iff
code: theorem AddTorsor.subsingleton_iff (G P : Type*) [AddGroup G] [AddTorsor G P] :
    Subsingleton G ↔ Subsingleton P 
goal: Subsingleton G ↔ Subsingleton P