File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

full_name: AffineMap.toFun
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
structure AffineMap (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*) [Ring k]
  [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
  [AffineSpace V2 P2] where
  toFun : P1 → P2
  linear : V1 →ₗ[k] V2
  map_vadd' : ∀ (p : P1) (v : V1), toFun (v +ᵥ p) = linear v +ᵥ toFun p
goal: P1 → P2

full_name: AffineMap
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
structure AffineMap (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*) [Ring k]
  [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
  [AffineSpace V2 P2] where
  toFun : P1 → P2
  linear : V1 →ₗ[k] V2
  map_vadd' : ∀ (p : P1) (v : V1), toFun (v +ᵥ p) = linear v +ᵥ toFun p
goal: Type (max (max (max u_2 u_3) u_4) u_5)

full_name: AffineMap.map_vadd'
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
structure AffineMap (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*) [Ring k]
  [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
  [AffineSpace V2 P2] where
  toFun : P1 → P2
  linear : V1 →ₗ[k] V2
  map_vadd' : ∀ (p : P1) (v : V1), toFun (v +ᵥ p) = linear v +ᵥ toFun p
goal: self.toFun (v +ᵥ p) = self.linear v +ᵥ self.toFun p

full_name: AffineMap.linear
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
structure AffineMap (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*) [Ring k]
  [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
  [AffineSpace V2 P2] where
  toFun : P1 → P2
  linear : V1 →ₗ[k] V2
  map_vadd' : ∀ (p : P1) (v : V1), toFun (v +ᵥ p) = linear v +ᵥ toFun p
goal: V1 →ₗ[k] V2

full_name: «_aux_Mathlib_LinearAlgebra_AffineSpace_AffineMap___macroRules_term_→ᵃ[_]__1»
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
notation:25 P1 " →ᵃ[" k:25 "] " P2:0 => AffineMap k P1 P2
goal: Lean.Macro

full_name: _aux_Mathlib_LinearAlgebra_AffineSpace_AffineMap___unexpand_AffineMap_1
code: /-- An `AffineMap k P1 P2` (notation: `P1 →ᵃ[k] P2`) is a map from `P1` to `P2` that
induces a corresponding linear map from `V1` to `V2`. -/
notation:25 P1 " →ᵃ[" k:25 "] " P2:0 => AffineMap k P1 P2
goal: Lean.PrettyPrinter.Unexpander

full_name: AffineMap.instFunLike
code: instance AffineMap.instFunLike (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*)
    [Ring k] [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
    [AffineSpace V2 P2] : FunLike (P1 →ᵃ[k] P2) P1 P2 
goal: FunLike (P1 →ᵃ[k] P2) P1 P2

full_name: AffineMap.hasCoeToFun
code: instance AffineMap.hasCoeToFun (k : Type*) {V1 : Type*} (P1 : Type*) {V2 : Type*} (P2 : Type*)
    [Ring k] [AddCommGroup V1] [Module k V1] [AffineSpace V1 P1] [AddCommGroup V2] [Module k V2]
    [AffineSpace V2 P2] : CoeFun (P1 →ᵃ[k] P2) fun _ => P1 → P2 
goal: CoeFun (P1 →ᵃ[k] P2) fun x => P1 → P2

full_name: LinearMap.toAffineMap
code: /-- Reinterpret a linear map as an affine map. -/
def toAffineMap : V₁ →ᵃ[k] V₂ 
goal: V₁ →ᵃ[k] V₂

full_name: LinearMap.coe_toAffineMap
code: @[simp]
theorem coe_toAffineMap : ⇑f.toAffineMap = f 
goal: ⇑f.toAffineMap = ⇑f

full_name: LinearMap.toAffineMap_linear
code: @[simp]
theorem toAffineMap_linear : f.toAffineMap.linear = f 
goal: f.toAffineMap.linear = f

full_name: AffineMap.coe_mk
code: /-- Constructing an affine map and coercing back to a function
produces the same map. -/
@[simp]
theorem coe_mk (f : P1 → P2) (linear add) : ((mk f linear add : P1 →ᵃ[k] P2) : P1 → P2) = f 
goal: ⇑{ toFun := f, linear := linear, map_vadd' := add } = f

full_name: AffineMap.toFun_eq_coe
code: /-- `toFun` is the same as the result of coercing to a function. -/
@[simp]
theorem toFun_eq_coe (f : P1 →ᵃ[k] P2) : f.toFun = ⇑f 
goal: f.toFun = ⇑f

full_name: AffineMap.map_vadd
code: /-- An affine map on the result of adding a vector to a point produces
the same result as the linear map applied to that vector, added to the
affine map applied to that point. -/
@[simp]
theorem map_vadd (f : P1 →ᵃ[k] P2) (p : P1) (v : V1) : f (v +ᵥ p) = f.linear v +ᵥ f p 
goal: f (v +ᵥ p) = f.linear v +ᵥ f p

full_name: AffineMap.linearMap_vsub
code: /-- The linear map on the result of subtracting two points is the
result of subtracting the result of the affine map on those two
points. -/
@[simp]
theorem linearMap_vsub (f : P1 →ᵃ[k] P2) (p1 p2 : P1) : f.linear (p1 -ᵥ p2) = f p1 -ᵥ f p2 
goal: f.linear (p1 -ᵥ p2) = f p1 -ᵥ f p2

full_name: AffineMap.ext
code: /-- Two affine maps are equal if they coerce to the same function. -/
@[ext]
theorem ext {f g : P1 →ᵃ[k] P2} (h : ∀ p, f p = g p) : f = g 
goal: f = g

full_name: AffineMap.ext_iff
code: theorem ext_iff {f g : P1 →ᵃ[k] P2} : f = g ↔ ∀ p, f p = g p 
goal: f = g ↔ ∀ (p : P1), f p = g p

full_name: AffineMap.coeFn_injective
code: theorem coeFn_injective : @Function.Injective (P1 →ᵃ[k] P2) (P1 → P2) (⇑) 
goal: Function.Injective DFunLike.coe

full_name: AffineMap.congr_arg
code: protected theorem congr_arg (f : P1 →ᵃ[k] P2) {x y : P1} (h : x = y) : f x = f y 
goal: f x = f y

full_name: AffineMap.congr_fun
code: protected theorem congr_fun {f g : P1 →ᵃ[k] P2} (h : f = g) (x : P1) : f x = g x 
goal: f x = g x

full_name: AffineMap.ext_linear
code: /-- Two affine maps are equal if they have equal linear maps and are equal at some point. -/
theorem ext_linear {f g : P1 →ᵃ[k] P2} (h₁ : f.linear = g.linear) {p : P1} (h₂ : f p = g p) :
    f = g 
goal: f = g

full_name: AffineMap.ext_linear_iff
code: /-- Two affine maps are equal if they have equal linear maps and are equal at some point. -/
theorem ext_linear_iff {f g : P1 →ᵃ[k] P2} : f = g ↔ (f.linear = g.linear) ∧ (∃ p, f p = g p) 
goal: f = g ↔ f.linear = g.linear ∧ ∃ p, f p = g p

full_name: AffineMap.const
code: /-- The constant function as an `AffineMap`. -/
def const (p : P2) : P1 →ᵃ[k] P2 
goal: P1 →ᵃ[k] P2

full_name: AffineMap.coe_const
code: @[simp]
theorem coe_const (p : P2) : ⇑(const k P1 p) = Function.const P1 p 
goal: ⇑(AffineMap.const k P1 p) = Function.const P1 p

full_name: AffineMap.const_apply
code: @[simp]
theorem const_apply (p : P2) (q : P1) : (const k P1 p) q = p 
goal: (AffineMap.const k P1 p) q = p

full_name: AffineMap.const_linear
code: @[simp]
theorem const_linear (p : P2) : (const k P1 p).linear = 0 
goal: (AffineMap.const k P1 p).linear = 0

full_name: AffineMap.linear_eq_zero_iff_exists_const
code: theorem linear_eq_zero_iff_exists_const (f : P1 →ᵃ[k] P2) :
    f.linear = 0 ↔ ∃ q, f = const k P1 q 
goal: f.linear = 0 ↔ ∃ q, f = AffineMap.const k P1 q

full_name: AffineMap.nonempty
code: instance nonempty : Nonempty (P1 →ᵃ[k] P2) 
goal: Nonempty (P1 →ᵃ[k] P2)

full_name: AffineMap.mk'
code: /-- Construct an affine map by verifying the relation between the map and its linear part at one
base point. Namely, this function takes a map `f : P₁ → P₂`, a linear map `f' : V₁ →ₗ[k] V₂`, and
a point `p` such that for any other point `p'` we have `f p' = f' (p' -ᵥ p) +ᵥ f p`. -/
def mk' (f : P1 → P2) (f' : V1 →ₗ[k] V2) (p : P1) (h : ∀ p' : P1, f p' = f' (p' -ᵥ p) +ᵥ f p) :
    P1 →ᵃ[k] P2 
goal: P1 →ᵃ[k] P2

full_name: AffineMap.coe_mk'
code: @[simp]
theorem coe_mk' (f : P1 → P2) (f' : V1 →ₗ[k] V2) (p h) : ⇑(mk' f f' p h) = f 
goal: ⇑(AffineMap.mk' f f' p h) = f

full_name: AffineMap.mk'_linear
code: @[simp]
theorem mk'_linear (f : P1 → P2) (f' : V1 →ₗ[k] V2) (p h) : (mk' f f' p h).linear = f' 
goal: (AffineMap.mk' f f' p h).linear = f'

full_name: AffineMap.mulAction
code: /-- The space of affine maps to a module inherits an `R`-action from the action on its codomain. -/
instance mulAction : MulAction R (P1 →ᵃ[k] V2) 
goal: MulAction R (P1 →ᵃ[k] V2)

full_name: AffineMap.coe_smul
code: @[simp, norm_cast]
theorem coe_smul (c : R) (f : P1 →ᵃ[k] V2) : ⇑(c • f) = c • ⇑f 
goal: ⇑(c • f) = c • ⇑f

full_name: AffineMap.smul_linear
code: @[simp]
theorem smul_linear (t : R) (f : P1 →ᵃ[k] V2) : (t • f).linear = t • f.linear 
goal: (t • f).linear = t • f.linear

full_name: AffineMap.isCentralScalar
code: instance isCentralScalar [DistribMulAction Rᵐᵒᵖ V2] [IsCentralScalar R V2] :
  IsCentralScalar R (P1 →ᵃ[k] V2) 
goal: IsCentralScalar R (P1 →ᵃ[k] V2)

full_name: AffineMap.instZero
code: instance : Zero (P1 →ᵃ[k] V2) 
goal: Zero (P1 →ᵃ[k] V2)

full_name: AffineMap.instAdd
code: instance : Add (P1 →ᵃ[k] V2) 
goal: Add (P1 →ᵃ[k] V2)

full_name: AffineMap.instSub
code: instance : Sub (P1 →ᵃ[k] V2) 
goal: Sub (P1 →ᵃ[k] V2)

full_name: AffineMap.instNeg
code: instance : Neg (P1 →ᵃ[k] V2) 
goal: Neg (P1 →ᵃ[k] V2)

full_name: AffineMap.coe_zero
code: @[simp, norm_cast]
theorem coe_zero : ⇑(0 : P1 →ᵃ[k] V2) = 0 
goal: ⇑0 = 0

full_name: AffineMap.coe_add
code: @[simp, norm_cast]
theorem coe_add (f g : P1 →ᵃ[k] V2) : ⇑(f + g) = f + g 
goal: ⇑(f + g) = ⇑f + ⇑g

full_name: AffineMap.coe_neg
code: @[simp, norm_cast]
theorem coe_neg (f : P1 →ᵃ[k] V2) : ⇑(-f) = -f 
goal: ⇑(-f) = -⇑f

full_name: AffineMap.coe_sub
code: @[simp, norm_cast]
theorem coe_sub (f g : P1 →ᵃ[k] V2) : ⇑(f - g) = f - g 
goal: ⇑(f - g) = ⇑f - ⇑g

full_name: AffineMap.zero_linear
code: @[simp]
theorem zero_linear : (0 : P1 →ᵃ[k] V2).linear = 0 
goal: AffineMap.linear 0 = 0

full_name: AffineMap.add_linear
code: @[simp]
theorem add_linear (f g : P1 →ᵃ[k] V2) : (f + g).linear = f.linear + g.linear 
goal: (f + g).linear = f.linear + g.linear

full_name: AffineMap.sub_linear
code: @[simp]
theorem sub_linear (f g : P1 →ᵃ[k] V2) : (f - g).linear = f.linear - g.linear 
goal: (f - g).linear = f.linear - g.linear

full_name: AffineMap.neg_linear
code: @[simp]
theorem neg_linear (f : P1 →ᵃ[k] V2) : (-f).linear = -f.linear 
goal: (-f).linear = -f.linear

full_name: AffineMap.instAddCommGroup
code: /-- The set of affine maps to a vector space is an additive commutative group. -/
instance : AddCommGroup (P1 →ᵃ[k] V2) 
goal: AddCommGroup (P1 →ᵃ[k] V2)

full_name: AffineMap.instAddTorsor
code: /-- The space of affine maps from `P1` to `P2` is an affine space over the space of affine maps
from `P1` to the vector space `V2` corresponding to `P2`. -/
instance : AffineSpace (P1 →ᵃ[k] V2) (P1 →ᵃ[k] P2) 
goal: AffineSpace (P1 →ᵃ[k] V2) (P1 →ᵃ[k] P2)

full_name: AffineMap.vadd_apply
code: @[simp]
theorem vadd_apply (f : P1 →ᵃ[k] V2) (g : P1 →ᵃ[k] P2) (p : P1) : (f +ᵥ g) p = f p +ᵥ g p 
goal: (f +ᵥ g) p = f p +ᵥ g p

full_name: AffineMap.vsub_apply
code: @[simp]
theorem vsub_apply (f g : P1 →ᵃ[k] P2) (p : P1) : (f -ᵥ g : P1 →ᵃ[k] V2) p = f p -ᵥ g p 
goal: (f -ᵥ g) p = f p -ᵥ g p

full_name: AffineMap.fst
code: /-- `Prod.fst` as an `AffineMap`. -/
def fst : P1 × P2 →ᵃ[k] P1 
goal: P1 × P2 →ᵃ[k] P1

full_name: AffineMap.coe_fst
code: @[simp]
theorem coe_fst : ⇑(fst : P1 × P2 →ᵃ[k] P1) = Prod.fst 
goal: ⇑AffineMap.fst = Prod.fst

full_name: AffineMap.fst_linear
code: @[simp]
theorem fst_linear : (fst : P1 × P2 →ᵃ[k] P1).linear = LinearMap.fst k V1 V2 
goal: AffineMap.fst.linear = LinearMap.fst k V1 V2

full_name: AffineMap.snd
code: /-- `Prod.snd` as an `AffineMap`. -/
def snd : P1 × P2 →ᵃ[k] P2 
goal: P1 × P2 →ᵃ[k] P2

full_name: AffineMap.coe_snd
code: @[simp]
theorem coe_snd : ⇑(snd : P1 × P2 →ᵃ[k] P2) = Prod.snd 
goal: ⇑AffineMap.snd = Prod.snd

full_name: AffineMap.snd_linear
code: @[simp]
theorem snd_linear : (snd : P1 × P2 →ᵃ[k] P2).linear = LinearMap.snd k V1 V2 
goal: AffineMap.snd.linear = LinearMap.snd k V1 V2

full_name: AffineMap.id
code: /-- Identity map as an affine map. -/
nonrec def id : P1 →ᵃ[k] P1 
goal: P1 →ᵃ[k] P1

full_name: AffineMap.coe_id
code: /-- The identity affine map acts as the identity. -/
@[simp]
theorem coe_id : ⇑(id k P1) = _root_.id 
goal: ⇑(AffineMap.id k P1) = id

full_name: AffineMap.id_linear
code: @[simp]
theorem id_linear : (id k P1).linear = LinearMap.id 
goal: (AffineMap.id k P1).linear = LinearMap.id

full_name: AffineMap.id_apply
code: /-- The identity affine map acts as the identity. -/
theorem id_apply (p : P1) : id k P1 p = p 
goal: (AffineMap.id k P1) p = p

full_name: AffineMap.instInhabited
code: instance : Inhabited (P1 →ᵃ[k] P1) 
goal: Inhabited (P1 →ᵃ[k] P1)

full_name: AffineMap.comp
code: /-- Composition of affine maps. -/
def comp (f : P2 →ᵃ[k] P3) (g : P1 →ᵃ[k] P2) : P1 →ᵃ[k] P3 
goal: P1 →ᵃ[k] P3

full_name: AffineMap.coe_comp
code: /-- Composition of affine maps acts as applying the two functions. -/
@[simp]
theorem coe_comp (f : P2 →ᵃ[k] P3) (g : P1 →ᵃ[k] P2) : ⇑(f.comp g) = f ∘ g 
goal: ⇑(f.comp g) = ⇑f ∘ ⇑g

full_name: AffineMap.comp_apply
code: /-- Composition of affine maps acts as applying the two functions. -/
theorem comp_apply (f : P2 →ᵃ[k] P3) (g : P1 →ᵃ[k] P2) (p : P1) : f.comp g p = f (g p) 
goal: (f.comp g) p = f (g p)

full_name: AffineMap.comp_id
code: @[simp]
theorem comp_id (f : P1 →ᵃ[k] P2) : f.comp (id k P1) = f 
goal: f.comp (AffineMap.id k P1) = f

full_name: AffineMap.id_comp
code: @[simp]
theorem id_comp (f : P1 →ᵃ[k] P2) : (id k P2).comp f = f 
goal: (AffineMap.id k P2).comp f = f

full_name: AffineMap.comp_assoc
code: theorem comp_assoc (f₃₄ : P3 →ᵃ[k] P4) (f₂₃ : P2 →ᵃ[k] P3) (f₁₂ : P1 →ᵃ[k] P2) :
    (f₃₄.comp f₂₃).comp f₁₂ = f₃₄.comp (f₂₃.comp f₁₂) 
goal: (f₃₄.comp f₂₃).comp f₁₂ = f₃₄.comp (f₂₃.comp f₁₂)

full_name: AffineMap.instMonoid
code: instance : Monoid (P1 →ᵃ[k] P1) 
goal: Monoid (P1 →ᵃ[k] P1)

full_name: AffineMap.coe_mul
code: @[simp]
theorem coe_mul (f g : P1 →ᵃ[k] P1) : ⇑(f * g) = f ∘ g 
goal: ⇑(f * g) = ⇑f ∘ ⇑g

full_name: AffineMap.coe_one
code: @[simp]
theorem coe_one : ⇑(1 : P1 →ᵃ[k] P1) = _root_.id 
goal: ⇑1 = id

full_name: AffineMap.linearHom_apply
code: /-- `AffineMap.linear` on endomorphisms is a `MonoidHom`. -/
@[simps]
def linearHom : (P1 →ᵃ[k] P1) →* V1 →ₗ[k] V1 
goal: AffineMap.linearHom self = self.linear

full_name: AffineMap.linearHom
code: /-- `AffineMap.linear` on endomorphisms is a `MonoidHom`. -/
@[simps]
def linearHom : (P1 →ᵃ[k] P1) →* V1 →ₗ[k] V1 
goal: (P1 →ᵃ[k] P1) →* V1 →ₗ[k] V1

full_name: AffineMap.linear_injective_iff
code: @[simp]
theorem linear_injective_iff (f : P1 →ᵃ[k] P2) :
    Function.Injective f.linear ↔ Function.Injective f 
goal: Function.Injective ⇑f.linear ↔ Function.Injective ⇑f

full_name: AffineMap.linear_surjective_iff
code: @[simp]
theorem linear_surjective_iff (f : P1 →ᵃ[k] P2) :
    Function.Surjective f.linear ↔ Function.Surjective f 
goal: Function.Surjective ⇑f.linear ↔ Function.Surjective ⇑f

full_name: AffineMap.linear_bijective_iff
code: @[simp]
theorem linear_bijective_iff (f : P1 →ᵃ[k] P2) :
    Function.Bijective f.linear ↔ Function.Bijective f 
goal: Function.Bijective ⇑f.linear ↔ Function.Bijective ⇑f

full_name: AffineMap.image_vsub_image
code: theorem image_vsub_image {s t : Set P1} (f : P1 →ᵃ[k] P2) :
    f '' s -ᵥ f '' t = f.linear '' (s -ᵥ t) 
goal: ⇑f '' s -ᵥ ⇑f '' t = ⇑f.linear '' (s -ᵥ t)

full_name: AffineMap.lineMap
code: /-- The affine map from `k` to `P1` sending `0` to `p₀` and `1` to `p₁`. -/
def lineMap (p₀ p₁ : P1) : k →ᵃ[k] P1 
goal: k →ᵃ[k] P1

full_name: AffineMap.coe_lineMap
code: theorem coe_lineMap (p₀ p₁ : P1) : (lineMap p₀ p₁ : k → P1) = fun c => c • (p₁ -ᵥ p₀) +ᵥ p₀ 
goal: ⇑(AffineMap.lineMap p₀ p₁) = fun c => c • (p₁ -ᵥ p₀) +ᵥ p₀

full_name: AffineMap.lineMap_apply
code: theorem lineMap_apply (p₀ p₁ : P1) (c : k) : lineMap p₀ p₁ c = c • (p₁ -ᵥ p₀) +ᵥ p₀ 
goal: (AffineMap.lineMap p₀ p₁) c = c • (p₁ -ᵥ p₀) +ᵥ p₀

full_name: AffineMap.lineMap_apply_module'
code: theorem lineMap_apply_module' (p₀ p₁ : V1) (c : k) : lineMap p₀ p₁ c = c • (p₁ - p₀) + p₀ 
goal: (AffineMap.lineMap p₀ p₁) c = c • (p₁ - p₀) + p₀

full_name: AffineMap.lineMap_apply_module
code: theorem lineMap_apply_module (p₀ p₁ : V1) (c : k) : lineMap p₀ p₁ c = (1 - c) • p₀ + c • p₁ 
goal: (AffineMap.lineMap p₀ p₁) c = (1 - c) • p₀ + c • p₁

full_name: AffineMap.lineMap_apply_ring'
code: theorem lineMap_apply_ring' (a b c : k) : lineMap a b c = c * (b - a) + a 
goal: (AffineMap.lineMap a b) c = c * (b - a) + a

full_name: AffineMap.lineMap_apply_ring
code: theorem lineMap_apply_ring (a b c : k) : lineMap a b c = (1 - c) * a + c * b 
goal: (AffineMap.lineMap a b) c = (1 - c) * a + c * b

full_name: AffineMap.lineMap_vadd_apply
code: theorem lineMap_vadd_apply (p : P1) (v : V1) (c : k) : lineMap p (v +ᵥ p) c = c • v +ᵥ p 
goal: (AffineMap.lineMap p (v +ᵥ p)) c = c • v +ᵥ p

full_name: AffineMap.lineMap_linear
code: @[simp]
theorem lineMap_linear (p₀ p₁ : P1) :
    (lineMap p₀ p₁ : k →ᵃ[k] P1).linear = LinearMap.id.smulRight (p₁ -ᵥ p₀) 
goal: (AffineMap.lineMap p₀ p₁).linear = LinearMap.id.smulRight (p₁ -ᵥ p₀)

full_name: AffineMap.lineMap_same_apply
code: theorem lineMap_same_apply (p : P1) (c : k) : lineMap p p c = p 
goal: (AffineMap.lineMap p p) c = p

full_name: AffineMap.lineMap_same
code: @[simp]
theorem lineMap_same (p : P1) : lineMap p p = const k k p 
goal: AffineMap.lineMap p p = AffineMap.const k k p

full_name: AffineMap.lineMap_apply_zero
code: @[simp]
theorem lineMap_apply_zero (p₀ p₁ : P1) : lineMap p₀ p₁ (0 : k) = p₀ 
goal: (AffineMap.lineMap p₀ p₁) 0 = p₀

full_name: AffineMap.lineMap_apply_one
code: @[simp]
theorem lineMap_apply_one (p₀ p₁ : P1) : lineMap p₀ p₁ (1 : k) = p₁ 
goal: (AffineMap.lineMap p₀ p₁) 1 = p₁

full_name: AffineMap.lineMap_eq_lineMap_iff
code: @[simp]
theorem lineMap_eq_lineMap_iff [NoZeroSMulDivisors k V1] {p₀ p₁ : P1} {c₁ c₂ : k} :
    lineMap p₀ p₁ c₁ = lineMap p₀ p₁ c₂ ↔ p₀ = p₁ ∨ c₁ = c₂ 
goal: (AffineMap.lineMap p₀ p₁) c₁ = (AffineMap.lineMap p₀ p₁) c₂ ↔ p₀ = p₁ ∨ c₁ = c₂

full_name: AffineMap.lineMap_eq_left_iff
code: @[simp]
theorem lineMap_eq_left_iff [NoZeroSMulDivisors k V1] {p₀ p₁ : P1} {c : k} :
    lineMap p₀ p₁ c = p₀ ↔ p₀ = p₁ ∨ c = 0 
goal: (AffineMap.lineMap p₀ p₁) c = p₀ ↔ p₀ = p₁ ∨ c = 0

full_name: AffineMap.lineMap_eq_right_iff
code: @[simp]
theorem lineMap_eq_right_iff [NoZeroSMulDivisors k V1] {p₀ p₁ : P1} {c : k} :
    lineMap p₀ p₁ c = p₁ ↔ p₀ = p₁ ∨ c = 1 
goal: (AffineMap.lineMap p₀ p₁) c = p₁ ↔ p₀ = p₁ ∨ c = 1

full_name: AffineMap.lineMap_injective
code: theorem lineMap_injective [NoZeroSMulDivisors k V1] {p₀ p₁ : P1} (h : p₀ ≠ p₁) :
    Function.Injective (lineMap p₀ p₁ : k → P1) 
goal: Function.Injective ⇑(AffineMap.lineMap p₀ p₁)

full_name: AffineMap.apply_lineMap
code: @[simp]
theorem apply_lineMap (f : P1 →ᵃ[k] P2) (p₀ p₁ : P1) (c : k) :
    f (lineMap p₀ p₁ c) = lineMap (f p₀) (f p₁) c 
goal: f ((AffineMap.lineMap p₀ p₁) c) = (AffineMap.lineMap (f p₀) (f p₁)) c

full_name: AffineMap.comp_lineMap
code: @[simp]
theorem comp_lineMap (f : P1 →ᵃ[k] P2) (p₀ p₁ : P1) :
    f.comp (lineMap p₀ p₁) = lineMap (f p₀) (f p₁) 
goal: f.comp (AffineMap.lineMap p₀ p₁) = AffineMap.lineMap (f p₀) (f p₁)

full_name: AffineMap.fst_lineMap
code: @[simp]
theorem fst_lineMap (p₀ p₁ : P1 × P2) (c : k) : (lineMap p₀ p₁ c).1 = lineMap p₀.1 p₁.1 c 
goal: ((AffineMap.lineMap p₀ p₁) c).1 = (AffineMap.lineMap p₀.1 p₁.1) c

full_name: AffineMap.snd_lineMap
code: @[simp]
theorem snd_lineMap (p₀ p₁ : P1 × P2) (c : k) : (lineMap p₀ p₁ c).2 = lineMap p₀.2 p₁.2 c 
goal: ((AffineMap.lineMap p₀ p₁) c).2 = (AffineMap.lineMap p₀.2 p₁.2) c

full_name: AffineMap.lineMap_symm
code: theorem lineMap_symm (p₀ p₁ : P1) :
    lineMap p₀ p₁ = (lineMap p₁ p₀).comp (lineMap (1 : k) (0 : k)) 
goal: AffineMap.lineMap p₀ p₁ = (AffineMap.lineMap p₁ p₀).comp (AffineMap.lineMap 1 0)

full_name: AffineMap.lineMap_apply_one_sub
code: theorem lineMap_apply_one_sub (p₀ p₁ : P1) (c : k) : lineMap p₀ p₁ (1 - c) = lineMap p₁ p₀ c 
goal: (AffineMap.lineMap p₀ p₁) (1 - c) = (AffineMap.lineMap p₁ p₀) c

full_name: AffineMap.lineMap_vsub_left
code: @[simp]
theorem lineMap_vsub_left (p₀ p₁ : P1) (c : k) : lineMap p₀ p₁ c -ᵥ p₀ = c • (p₁ -ᵥ p₀) 
goal: (AffineMap.lineMap p₀ p₁) c -ᵥ p₀ = c • (p₁ -ᵥ p₀)

full_name: AffineMap.left_vsub_lineMap
code: @[simp]
theorem left_vsub_lineMap (p₀ p₁ : P1) (c : k) : p₀ -ᵥ lineMap p₀ p₁ c = c • (p₀ -ᵥ p₁) 
goal: p₀ -ᵥ (AffineMap.lineMap p₀ p₁) c = c • (p₀ -ᵥ p₁)

full_name: AffineMap.lineMap_vsub_right
code: @[simp]
theorem lineMap_vsub_right (p₀ p₁ : P1) (c : k) : lineMap p₀ p₁ c -ᵥ p₁ = (1 - c) • (p₀ -ᵥ p₁) 
goal: (AffineMap.lineMap p₀ p₁) c -ᵥ p₁ = (1 - c) • (p₀ -ᵥ p₁)

full_name: AffineMap.right_vsub_lineMap
code: @[simp]
theorem right_vsub_lineMap (p₀ p₁ : P1) (c : k) : p₁ -ᵥ lineMap p₀ p₁ c = (1 - c) • (p₁ -ᵥ p₀) 
goal: p₁ -ᵥ (AffineMap.lineMap p₀ p₁) c = (1 - c) • (p₁ -ᵥ p₀)

full_name: AffineMap.lineMap_vadd_lineMap
code: theorem lineMap_vadd_lineMap (v₁ v₂ : V1) (p₁ p₂ : P1) (c : k) :
    lineMap v₁ v₂ c +ᵥ lineMap p₁ p₂ c = lineMap (v₁ +ᵥ p₁) (v₂ +ᵥ p₂) c 
goal: (AffineMap.lineMap v₁ v₂) c +ᵥ (AffineMap.lineMap p₁ p₂) c = (AffineMap.lineMap (v₁ +ᵥ p₁) (v₂ +ᵥ p₂)) c

full_name: AffineMap.lineMap_vsub_lineMap
code: theorem lineMap_vsub_lineMap (p₁ p₂ p₃ p₄ : P1) (c : k) :
    lineMap p₁ p₂ c -ᵥ lineMap p₃ p₄ c = lineMap (p₁ -ᵥ p₃) (p₂ -ᵥ p₄) c 
goal: (AffineMap.lineMap p₁ p₂) c -ᵥ (AffineMap.lineMap p₃ p₄) c = (AffineMap.lineMap (p₁ -ᵥ p₃) (p₂ -ᵥ p₄)) c

full_name: AffineMap.decomp
code: /-- Decomposition of an affine map in the special case when the point space and vector space
are the same. -/
theorem decomp (f : V1 →ᵃ[k] V2) : (f : V1 → V2) = ⇑f.linear + fun _ => f 0 
goal: ⇑f = ⇑f.linear + fun x => f 0

full_name: AffineMap.decomp'
code: /-- Decomposition of an affine map in the special case when the point space and vector space
are the same. -/
theorem decomp' (f : V1 →ᵃ[k] V2) : (f.linear : V1 → V2) = ⇑f - fun _ => f 0 
goal: ⇑f.linear = ⇑f - fun x => f 0

full_name: AffineMap.image_uIcc
code: theorem image_uIcc {k : Type*} [LinearOrderedField k] (f : k →ᵃ[k] k) (a b : k) :
    f '' Set.uIcc a b = Set.uIcc (f a) (f b) 
goal: ⇑f '' Set.uIcc a b = Set.uIcc (f a) (f b)

full_name: AffineMap.proj
code: /-- Evaluation at a point as an affine map. -/
def proj (i : ι) : (∀ i : ι, P i) →ᵃ[k] P i 
goal: ((i : ι) → P i) →ᵃ[k] P i

full_name: AffineMap.proj_apply
code: @[simp]
theorem proj_apply (i : ι) (f : ∀ i, P i) : @proj k _ ι V P _ _ _ i f = f i 
goal: (AffineMap.proj i) f = f i

full_name: AffineMap.proj_linear
code: @[simp]
theorem proj_linear (i : ι) : (@proj k _ ι V P _ _ _ i).linear = @LinearMap.proj k ι _ V _ _ i 
goal: (AffineMap.proj i).linear = LinearMap.proj i

full_name: AffineMap.pi_lineMap_apply
code: theorem pi_lineMap_apply (f g : ∀ i, P i) (c : k) (i : ι) :
    lineMap f g c i = lineMap (f i) (g i) c 
goal: (AffineMap.lineMap f g) c i = (AffineMap.lineMap (f i) (g i)) c

full_name: AffineMap.distribMulAction
code: /-- The space of affine maps to a module inherits an `R`-action from the action on its codomain. -/
instance distribMulAction : DistribMulAction R (P1 →ᵃ[k] V2) 
goal: DistribMulAction R (P1 →ᵃ[k] V2)

full_name: AffineMap.instModule
code: /-- The space of affine maps taking values in an `R`-module is an `R`-module. -/
instance : Module R (P1 →ᵃ[k] V2) 
goal: Module R (P1 →ᵃ[k] V2)

full_name: AffineMap.toConstProdLinearMap
code: /-- The space of affine maps between two modules is linearly equivalent to the product of the
domain with the space of linear maps, by taking the value of the affine map at `(0 : V1)` and the
linear part.

See note [bundled maps over different rings]-/
@[simps]
def toConstProdLinearMap : (V1 →ᵃ[k] V2) ≃ₗ[R] V2 × (V1 →ₗ[k] V2) 
goal: (V1 →ᵃ[k] V2) ≃ₗ[R] V2 × (V1 →ₗ[k] V2)

full_name: AffineMap.toConstProdLinearMap_apply
code: /-- The space of affine maps between two modules is linearly equivalent to the product of the
domain with the space of linear maps, by taking the value of the affine map at `(0 : V1)` and the
linear part.

See note [bundled maps over different rings]-/
@[simps]
def toConstProdLinearMap : (V1 →ᵃ[k] V2) ≃ₗ[R] V2 × (V1 →ₗ[k] V2) 
goal: (AffineMap.toConstProdLinearMap R) f = (f 0, f.linear)

full_name: AffineMap.toConstProdLinearMap_symm_apply
code: /-- The space of affine maps between two modules is linearly equivalent to the product of the
domain with the space of linear maps, by taking the value of the affine map at `(0 : V1)` and the
linear part.

See note [bundled maps over different rings]-/
@[simps]
def toConstProdLinearMap : (V1 →ᵃ[k] V2) ≃ₗ[R] V2 × (V1 →ₗ[k] V2) 
goal: (AffineMap.toConstProdLinearMap R).symm p = p.2.toAffineMap + AffineMap.const k V1 p.1

full_name: AffineMap.pi
code: /-- `pi` construction for affine maps. From a family of affine maps it produces an affine
map into a family of affine spaces.

This is the affine version of `LinearMap.pi`.
-/
def pi (f : (i : ι) → (P1 →ᵃ[k] φp i)) : P1 →ᵃ[k] ((i : ι) → φp i) 
goal: P1 →ᵃ[k] (i : ι) → φp i

full_name: AffineMap.pi_apply
code: @[simp]
theorem pi_apply (c : P1) (i : ι) : pi fp c i = fp i c 
goal: (AffineMap.pi fp) c i = (fp i) c

full_name: AffineMap.pi_comp
code: theorem pi_comp (g : P3 →ᵃ[k] P1) : (pi fp).comp g = pi (fun i => (fp i).comp g) 
goal: (AffineMap.pi fp).comp g = AffineMap.pi fun i => (fp i).comp g

full_name: AffineMap.pi_eq_zero
code: theorem pi_eq_zero : pi fv = 0 ↔ ∀ i, fv i = 0 
goal: AffineMap.pi fv = 0 ↔ ∀ (i : ι), fv i = 0

full_name: AffineMap.pi_zero
code: theorem pi_zero : pi (fun _ ↦ 0 : (i : ι) → P1 →ᵃ[k] φv i) = 0 
goal: (AffineMap.pi fun x => 0) = 0

full_name: AffineMap.proj_pi
code: theorem proj_pi (i : ι) : (proj i).comp (pi fp) = fp i 
goal: (AffineMap.proj i).comp (AffineMap.pi fp) = fp i

full_name: AffineMap.pi_ext_zero
code: /-- Two affine maps from a Pi-tyoe of modules `(i : ι) → φv i` are equal if they are equal in their
  operation on `Pi.single` and at zero. Analogous to `LinearMap.pi_ext`. See also `pi_ext_nonempty`,
  which instead of agrement at zero requires `Nonempty ι`. -/
theorem pi_ext_zero (h : ∀ i x, f (Pi.single i x) = g (Pi.single i x)) (h₂ : f 0 = g 0) :
    f = g 
goal: f = g

full_name: AffineMap.pi_ext_nonempty
code: /-- Two affine maps from a Pi-tyoe of modules `(i : ι) → φv i` are equal if they are equal in their
  operation on `Pi.single` and `ι` is nonempty.  Analogous to `LinearMap.pi_ext`. See also
  `pi_ext_zero`, which instead `Nonempty ι` requires agreement at 0.-/
theorem pi_ext_nonempty [Nonempty ι] (h : ∀ i x, f (Pi.single i x) = g (Pi.single i x)) :
    f = g 
goal: f = g

full_name: AffineMap.pi_ext_nonempty'
code: /-- This is used as the ext lemma instead of `AffineMap.pi_ext_nonempty` for reasons explained in
note [partially-applied ext lemmas]. Analogous to `LinearMap.pi_ext'`-/
@[ext]
theorem pi_ext_nonempty' [Nonempty ι] (h : ∀ i, f.comp (LinearMap.single i).toAffineMap =
    g.comp (LinearMap.single i).toAffineMap) : f = g 
goal: f = g

full_name: AffineMap.homothety
code: /-- `homothety c r` is the homothety (also known as dilation) about `c` with scale factor `r`. -/
def homothety (c : P1) (r : k) : P1 →ᵃ[k] P1 
goal: P1 →ᵃ[k] P1

full_name: AffineMap.homothety_def
code: theorem homothety_def (c : P1) (r : k) :
    homothety c r = r • (id k P1 -ᵥ const k P1 c) +ᵥ const k P1 c 
goal: AffineMap.homothety c r = r • (AffineMap.id k P1 -ᵥ AffineMap.const k P1 c) +ᵥ AffineMap.const k P1 c

full_name: AffineMap.homothety_apply
code: theorem homothety_apply (c : P1) (r : k) (p : P1) : homothety c r p = r • (p -ᵥ c : V1) +ᵥ c 
goal: (AffineMap.homothety c r) p = r • (p -ᵥ c) +ᵥ c

full_name: AffineMap.homothety_eq_lineMap
code: theorem homothety_eq_lineMap (c : P1) (r : k) (p : P1) : homothety c r p = lineMap c p r 
goal: (AffineMap.homothety c r) p = (AffineMap.lineMap c p) r

full_name: AffineMap.homothety_one
code: @[simp]
theorem homothety_one (c : P1) : homothety c (1 : k) = id k P1 
goal: AffineMap.homothety c 1 = AffineMap.id k P1

full_name: AffineMap.homothety_apply_same
code: @[simp]
theorem homothety_apply_same (c : P1) (r : k) : homothety c r c = c 
goal: (AffineMap.homothety c r) c = c

full_name: AffineMap.homothety_mul_apply
code: theorem homothety_mul_apply (c : P1) (r₁ r₂ : k) (p : P1) :
    homothety c (r₁ * r₂) p = homothety c r₁ (homothety c r₂ p) 
goal: (AffineMap.homothety c (r₁ * r₂)) p = (AffineMap.homothety c r₁) ((AffineMap.homothety c r₂) p)

full_name: AffineMap.homothety_mul
code: theorem homothety_mul (c : P1) (r₁ r₂ : k) :
    homothety c (r₁ * r₂) = (homothety c r₁).comp (homothety c r₂) 
goal: AffineMap.homothety c (r₁ * r₂) = (AffineMap.homothety c r₁).comp (AffineMap.homothety c r₂)

full_name: AffineMap.homothety_zero
code: @[simp]
theorem homothety_zero (c : P1) : homothety c (0 : k) = const k P1 c 
goal: AffineMap.homothety c 0 = AffineMap.const k P1 c

full_name: AffineMap.homothety_add
code: @[simp]
theorem homothety_add (c : P1) (r₁ r₂ : k) :
    homothety c (r₁ + r₂) = r₁ • (id k P1 -ᵥ const k P1 c) +ᵥ homothety c r₂ 
goal: AffineMap.homothety c (r₁ + r₂) = r₁ • (AffineMap.id k P1 -ᵥ AffineMap.const k P1 c) +ᵥ AffineMap.homothety c r₂

full_name: AffineMap.homothetyHom
code: /-- `homothety` as a multiplicative monoid homomorphism. -/
def homothetyHom (c : P1) : k →* P1 →ᵃ[k] P1 
goal: k →* P1 →ᵃ[k] P1

full_name: AffineMap.coe_homothetyHom
code: @[simp]
theorem coe_homothetyHom (c : P1) : ⇑(homothetyHom c : k →* _) = homothety c 
goal: ⇑(AffineMap.homothetyHom c) = AffineMap.homothety c

full_name: AffineMap.homothetyAffine
code: /-- `homothety` as an affine map. -/
def homothetyAffine (c : P1) : k →ᵃ[k] P1 →ᵃ[k] P1 
goal: k →ᵃ[k] P1 →ᵃ[k] P1

full_name: AffineMap.coe_homothetyAffine
code: @[simp]
theorem coe_homothetyAffine (c : P1) : ⇑(homothetyAffine c : k →ᵃ[k] _) = homothety c 
goal: ⇑(AffineMap.homothetyAffine c) = AffineMap.homothety c

full_name: Convex.combo_affine_apply
code: /-- Applying an affine map to an affine combination of two points yields an affine combination of
the images. -/
theorem Convex.combo_affine_apply {x y : E} {a b : 𝕜} {f : E →ᵃ[𝕜] F} (h : a + b = 1) :
    f (a • x + b • y) = a • f x + b • f y 
goal: f (a • x + b • y) = a • f x + b • f y