Skip to content

Commit a1ec97c

Browse files
committed
feat: affine isomorphisms between spaces of affine maps (leanprover-community#35998)
These isomorphisms are analogous to `LinearEquiv.arrowCongr` and `LinearEquiv.congrLeft`.
1 parent c942e26 commit a1ec97c

1 file changed

Lines changed: 123 additions & 0 deletions

File tree

Mathlib/LinearAlgebra/AffineSpace/AffineEquiv.lean

Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,129 @@ theorem ofLinearEquiv_trans_ofLinearEquiv (A B : V ≃ₗ[k] V) (p₀ p₁ p₂
613613

614614
end ofLinearEquiv
615615

616+
section arrowCongrEquiv
617+
618+
variable (e₁ : P₁ ≃ᵃ[k] P₂) (e₂ : P₃ ≃ᵃ[k] P₄)
619+
620+
/-- Affine isomorphisms between the domains and codomains of two spaces of affine maps give a
621+
bijection between the two function spaces.
622+
623+
See `AffineEquiv.arrowCongr` and `AffineEquiv.arrowCongrₗ` for the affine and linear versions of
624+
this bijection. -/
625+
def arrowCongrEquiv : (P₁ →ᵃ[k] P₃) ≃ (P₂ →ᵃ[k] P₄) where
626+
toFun f := e₂.toAffineMap.comp <| f.comp e₁.symm.toAffineMap
627+
invFun f := e₂.symm.toAffineMap.comp <| f.comp e₁.toAffineMap
628+
left_inv _ := by ext; simp
629+
right_inv _ := by ext; simp
630+
631+
@[simp]
632+
theorem arrowCongrEquiv_apply (f : P₁ →ᵃ[k] P₃) (x : P₂) :
633+
e₁.arrowCongrEquiv e₂ f x = e₂ (f (e₁.symm x)) :=
634+
rfl
635+
636+
@[simp]
637+
theorem arrowCongrEquiv_symm_apply (f : P₂ →ᵃ[k] P₄) (x : P₁) :
638+
(e₁.arrowCongrEquiv e₂).symm f x = e₂.symm (f (e₁ x)) :=
639+
rfl
640+
641+
end arrowCongrEquiv
642+
643+
section CommRing
644+
645+
variable {R : Type*} [CommRing R] [Module R V₁] [Module R V₂] [Module R V₃] [Module R V₄]
646+
647+
section arrowCongrₗ
648+
649+
variable (e₁ : P₁ ≃ᵃ[R] P₂) (e₂ : V₃ ≃ₗ[R] V₄)
650+
651+
/-- An affine isomorphism between the domains and a linear isomorphism between the codomains of two
652+
spaces of affine maps give a linear isomorphism between the two function spaces.
653+
654+
See also `AffineEquiv.arrowCongrEquiv` and `AffineEquiv.arrowCongr`. -/
655+
def arrowCongrₗ : (P₁ →ᵃ[R] V₃) ≃ₗ[R] (P₂ →ᵃ[R] V₄) where
656+
__ := e₁.arrowCongrEquiv e₂.toAffineEquiv
657+
map_add' _ _ := by ext; simp
658+
map_smul' _ _ := by ext; simp
659+
660+
@[simp]
661+
theorem arrowCongrₗ_apply (f : P₁ →ᵃ[R] V₃) (x : P₂) :
662+
e₁.arrowCongrₗ e₂ f x = e₂ (f (e₁.symm x)) :=
663+
rfl
664+
665+
@[simp]
666+
theorem arrowCongrₗ_symm_apply (f : P₂ →ᵃ[R] V₄) (x : P₁) :
667+
(e₁.arrowCongrₗ e₂).symm f x = e₂.symm (f (e₁ x)) :=
668+
rfl
669+
670+
end arrowCongrₗ
671+
672+
section arrowCongr
673+
674+
variable (e₁ : P₁ ≃ᵃ[R] P₂) (e₂ : P₃ ≃ᵃ[R] P₄)
675+
676+
/-- Affine isomorphisms between the domains and codomains of two spaces of affine maps give an
677+
affine isomorphism between the two function spaces.
678+
679+
See also `AffineEquiv.arrowCongrEquiv` and `AffineEquiv.arrowCongrₗ`. -/
680+
@[simps linear]
681+
def arrowCongr : (P₁ →ᵃ[R] P₃) ≃ᵃ[R] (P₂ →ᵃ[R] P₄) where
682+
__ := e₁.arrowCongrEquiv e₂
683+
linear := e₁.arrowCongrₗ e₂.linear
684+
map_vadd' _ _ := by ext; simp
685+
686+
@[simp]
687+
theorem arrowCongr_apply (f : P₁ →ᵃ[R] P₃) (x : P₂) :
688+
e₁.arrowCongr e₂ f x = e₂ (f (e₁.symm x)) :=
689+
rfl
690+
691+
@[simp]
692+
theorem arrowCongr_symm_apply (f : P₂ →ᵃ[R] P₄) (x : P₁) :
693+
(e₁.arrowCongr e₂).symm f x = e₂.symm (f (e₁ x)) :=
694+
rfl
695+
696+
end arrowCongr
697+
698+
end CommRing
699+
700+
section congrLeft
701+
702+
variable (R W : Type*) [Ring R] [AddCommGroup W] [Module k W] [Module R W] [SMulCommClass k R W]
703+
(e : P₁ ≃ᵃ[k] P₂)
704+
705+
/-- An affine isomorphism between the domains of affine spaces induces a linear isomorphism over
706+
another ring between the two function spaces. -/
707+
def congrLeftₗ : (P₁ →ᵃ[k] W) ≃ₗ[R] (P₂ →ᵃ[k] W) where
708+
__ := e.arrowCongrEquiv (.refl k W)
709+
map_add' _ _ := by ext; simp
710+
map_smul' _ _ := by ext; simp
711+
712+
@[simp]
713+
theorem congrLeftₗ_apply (f : P₁ →ᵃ[k] W) (x : P₂) : e.congrLeftₗ R W f x = f (e.symm x) :=
714+
rfl
715+
716+
@[simp]
717+
theorem congrLeftₗ_symm_apply (f : P₂ →ᵃ[k] W) (x : P₁) : (e.congrLeftₗ R W).symm f x = f (e x) :=
718+
rfl
719+
720+
variable {W} (Q : Type*) [AddTorsor W Q]
721+
722+
/-- An affine isomorphism between the domains of affine spaces induces an affine isomorphism over
723+
another ring between the two function spaces. -/
724+
def congrLeft : (P₁ →ᵃ[k] Q) ≃ᵃ[R] (P₂ →ᵃ[k] Q) where
725+
__ := e.arrowCongrEquiv (.refl k Q)
726+
linear := e.congrLeftₗ R W
727+
map_vadd' _ _ := by ext; simp
728+
729+
@[simp]
730+
theorem congrLeft_apply (f : P₁ →ᵃ[k] Q) (x : P₂) : e.congrLeft R Q f x = f (e.symm x) :=
731+
rfl
732+
733+
@[simp]
734+
theorem congrLeft_symm_apply (f : P₂ →ᵃ[k] Q) (x : P₁) : (e.congrLeft R Q).symm f x = f (e x) :=
735+
rfl
736+
737+
end congrLeft
738+
616739
end AffineEquiv
617740

618741
namespace AffineMap

0 commit comments

Comments
 (0)