l3lab/ntp-mathlib huggingface dataset:
/-- A pair of continuous (semi)linear equivalences generates an equivalence between the spaces of
continuous linear maps. See also `ContinuousLinearEquiv.arrowCongr`. -/
@[simps]
def arrowCongrEquiv (e₁₂ : M₁ ≃SL[σ₁₂] M₂) (e₄₃ : M₄ ≃SL[σ₄₃] M₃) :
    (M₁ →SL[σ₁₄] M₄) ≃ (M₂ →SL[σ₂₃] M₃) where
  toFun f := (e₄₃ : M₄ →SL[σ₄₃] M₃).comp (f.comp (e₁₂.symm : M₂ →SL[σ₂₁] M₁))
  invFun f := (e₄₃.symm : M₃ →SL[σ₃₄] M₄).comp (f.comp (e₁₂ : M₁ →SL[σ₁₂] M₂))
  left_inv f :=
    ContinuousLinearMap.ext fun x => by
      

Proof state:
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝³¹ : Semiring R₁
inst✝³⁰ : Semiring R₂
inst✝²⁹ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₁ : R₂ →+* R₁
inst✝²⁸ : RingHomInvPair σ₁₂ σ₂₁
inst✝²⁷ : RingHomInvPair σ₂₁ σ₁₂
σ₂₃ : R₂ →+* R₃
σ₃₂ : R₃ →+* R₂
inst✝²⁶ : RingHomInvPair σ₂₃ σ₃₂
inst✝²⁵ : RingHomInvPair σ₃₂ σ₂₃
σ₁₃ : R₁ →+* R₃
σ₃₁ : R₃ →+* R₁
inst✝²⁴ : RingHomInvPair σ₁₃ σ₃₁
inst✝²³ : RingHomInvPair σ₃₁ σ₁₃
inst✝²² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝²¹ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁
M₁ : Type u_4
inst✝²⁰ : TopologicalSpace M₁
inst✝¹⁹ : AddCommMonoid M₁
M'₁ : Type u_5
inst✝¹⁸ : TopologicalSpace M'₁
inst✝¹⁷ : AddCommMonoid M'₁
M₂ : Type u_6
inst✝¹⁶ : TopologicalSpace M₂
inst✝¹⁵ : AddCommMonoid M₂
M₃ : Type u_7
inst✝¹⁴ : TopologicalSpace M₃
inst✝¹³ : AddCommMonoid M₃
M₄ : Type u_8
inst✝¹² : TopologicalSpace M₄
inst✝¹¹ : AddCommMonoid M₄
inst✝¹⁰ : Module R₁ M₁
inst✝⁹ : Module R₁ M'₁
inst✝⁸ : Module R₂ M₂
inst✝⁷ : Module R₃ M₃
R₄ : Type u_9
inst✝⁶ : Semiring R₄
inst✝⁵ : Module R₄ M₄
σ₃₄ : R₃ →+* R₄
σ₄₃ : R₄ →+* R₃
inst✝⁴ : RingHomInvPair σ₃₄ σ₄₃
inst✝³ : RingHomInvPair σ₄₃ σ₃₄
σ₂₄ : R₂ →+* R₄
σ₁₄ : R₁ →+* R₄
inst✝² : RingHomCompTriple σ₂₁ σ₁₄ σ₂₄
inst✝¹ : RingHomCompTriple σ₂₄ σ₄₃ σ₂₃
inst✝ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄
e₁₂ : M₁ ≃SL[σ₁₂] M₂
e₄₃ : M₄ ≃SL[σ₄₃] M₃
f : M₁ →SL[σ₁₄] M₄
x : M₁
⊢ ((fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e₄₃)) (ContinuousLinearMap.comp f ↑e₁₂))
        ((fun f => ContinuousLinearMap.comp (↑e₄₃) (ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e₁₂))) f))
      x =
    f x

Next tactic:
simp only [ContinuousLinearMap.comp_apply, symm_apply_apply, coe_coe]
/-- A pair of continuous (semi)linear equivalences generates an equivalence between the spaces of
continuous linear maps. See also `ContinuousLinearEquiv.arrowCongr`. -/
@[simps]
def arrowCongrEquiv (e₁₂ : M₁ ≃SL[σ₁₂] M₂) (e₄₃ : M₄ ≃SL[σ₄₃] M₃) :
    (M₁ →SL[σ₁₄] M₄) ≃ (M₂ →SL[σ₂₃] M₃) where
  toFun f := (e₄₃ : M₄ →SL[σ₄₃] M₃).comp (f.comp (e₁₂.symm : M₂ →SL[σ₂₁] M₁))
  invFun f := (e₄₃.symm : M₃ →SL[σ₃₄] M₄).comp (f.comp (e₁₂ : M₁ →SL[σ₁₂] M₂))
  left_inv f :=
    ContinuousLinearMap.ext fun x => by
      simp only [ContinuousLinearMap.comp_apply, symm_apply_apply, coe_coe]
  right_inv f :=
    ContinuousLinearMap.ext fun x => by
      

Proof state:
R₁ : Type u_1
R₂ : Type u_2
R₃ : Type u_3
inst✝³¹ : Semiring R₁
inst✝³⁰ : Semiring R₂
inst✝²⁹ : Semiring R₃
σ₁₂ : R₁ →+* R₂
σ₂₁ : R₂ →+* R₁
inst✝²⁸ : RingHomInvPair σ₁₂ σ₂₁
inst✝²⁷ : RingHomInvPair σ₂₁ σ₁₂
σ₂₃ : R₂ →+* R₃
σ₃₂ : R₃ →+* R₂
inst✝²⁶ : RingHomInvPair σ₂₃ σ₃₂
inst✝²⁵ : RingHomInvPair σ₃₂ σ₂₃
σ₁₃ : R₁ →+* R₃
σ₃₁ : R₃ →+* R₁
inst✝²⁴ : RingHomInvPair σ₁₃ σ₃₁
inst✝²³ : RingHomInvPair σ₃₁ σ₁₃
inst✝²² : RingHomCompTriple σ₁₂ σ₂₃ σ₁₃
inst✝²¹ : RingHomCompTriple σ₃₂ σ₂₁ σ₃₁
M₁ : Type u_4
inst✝²⁰ : TopologicalSpace M₁
inst✝¹⁹ : AddCommMonoid M₁
M'₁ : Type u_5
inst✝¹⁸ : TopologicalSpace M'₁
inst✝¹⁷ : AddCommMonoid M'₁
M₂ : Type u_6
inst✝¹⁶ : TopologicalSpace M₂
inst✝¹⁵ : AddCommMonoid M₂
M₃ : Type u_7
inst✝¹⁴ : TopologicalSpace M₃
inst✝¹³ : AddCommMonoid M₃
M₄ : Type u_8
inst✝¹² : TopologicalSpace M₄
inst✝¹¹ : AddCommMonoid M₄
inst✝¹⁰ : Module R₁ M₁
inst✝⁹ : Module R₁ M'₁
inst✝⁸ : Module R₂ M₂
inst✝⁷ : Module R₃ M₃
R₄ : Type u_9
inst✝⁶ : Semiring R₄
inst✝⁵ : Module R₄ M₄
σ₃₄ : R₃ →+* R₄
σ₄₃ : R₄ →+* R₃
inst✝⁴ : RingHomInvPair σ₃₄ σ₄₃
inst✝³ : RingHomInvPair σ₄₃ σ₃₄
σ₂₄ : R₂ →+* R₄
σ₁₄ : R₁ →+* R₄
inst✝² : RingHomCompTriple σ₂₁ σ₁₄ σ₂₄
inst✝¹ : RingHomCompTriple σ₂₄ σ₄₃ σ₂₃
inst✝ : RingHomCompTriple σ₁₃ σ₃₄ σ₁₄
e₁₂ : M₁ ≃SL[σ₁₂] M₂
e₄₃ : M₄ ≃SL[σ₄₃] M₃
f : M₂ →SL[σ₂₃] M₃
x : M₂
⊢ ((fun f => ContinuousLinearMap.comp (↑e₄₃) (ContinuousLinearMap.comp f ↑(ContinuousLinearEquiv.symm e₁₂)))
        ((fun f => ContinuousLinearMap.comp (↑(ContinuousLinearEquiv.symm e₄₃)) (ContinuousLinearMap.comp f ↑e₁₂)) f))
      x =
    f x

Next tactic:
simp only [ContinuousLinearMap.comp_apply, apply_symm_apply, coe_coe]
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by 

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
⊢ ∀ (x y : M), ↑f (x + y) = ↑f x + ↑f y

Next tactic:
simp
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by simp
      map_smul' := by 

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
⊢ ∀ (r : R) (x : M),
    AddHom.toFun { toFun := ⇑↑f, map_add' := (_ : ∀ (a a_1 : M), ↑f (a + a_1) = ↑f a + ↑f a_1) } (r • x) =
      (RingHom.id R) r • AddHom.toFun { toFun := ⇑↑f, map_add' := (_ : ∀ (a a_1 : M), ↑f (a + a_1) = ↑f a + ↑f a_1) } x

Next tactic:
simp
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by simp
      map_smul' := by simp
      invFun := f.inv
      left_inv := fun x =>
        show (f.inv * f.val) x = x by
          

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
x : M
⊢ (f.inv * ↑f) x = x

Next tactic:
rw [f.inv_val]
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by simp
      map_smul' := by simp
      invFun := f.inv
      left_inv := fun x =>
        show (f.inv * f.val) x = x by
          rw [f.inv_val]
          

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
x : M
⊢ 1 x = x

Next tactic:
simp
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by simp
      map_smul' := by simp
      invFun := f.inv
      left_inv := fun x =>
        show (f.inv * f.val) x = x by
          rw [f.inv_val]
          simp
      right_inv := fun x =>
        show (f.val * f.inv) x = x by
          

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
x : M
⊢ (↑f * f.inv) x = x

Next tactic:
rw [f.val_inv]
/-- An invertible continuous linear map `f` determines a continuous equivalence from `M` to itself.
-/
def ofUnit (f : (M →L[R] M)ˣ) : M ≃L[R] M where
  toLinearEquiv :=
    { toFun := f.val
      map_add' := by simp
      map_smul' := by simp
      invFun := f.inv
      left_inv := fun x =>
        show (f.inv * f.val) x = x by
          rw [f.inv_val]
          simp
      right_inv := fun x =>
        show (f.val * f.inv) x = x by
          rw [f.val_inv]
          

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
x : M
⊢ 1 x = x

Next tactic:
simp
/-- A continuous equivalence from `M` to itself determines an invertible continuous linear map. -/
def toUnit (f : M ≃L[R] M) : (M →L[R] M)ˣ where
  val := f
  inv := f.symm
  val_inv := by
    

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
⊢ ↑f * ↑(ContinuousLinearEquiv.symm f) = 1

Next tactic:
ext
/-- A continuous equivalence from `M` to itself determines an invertible continuous linear map. -/
def toUnit (f : M ≃L[R] M) : (M →L[R] M)ˣ where
  val := f
  inv := f.symm
  val_inv := by
    ext
    

Proof state:
case h
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
x✝ : M
⊢ (↑f * ↑(ContinuousLinearEquiv.symm f)) x✝ = 1 x✝

Next tactic:
simp
/-- A continuous equivalence from `M` to itself determines an invertible continuous linear map. -/
def toUnit (f : M ≃L[R] M) : (M →L[R] M)ˣ where
  val := f
  inv := f.symm
  val_inv := by
    ext
    simp
  inv_val := by
    

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
⊢ ↑(ContinuousLinearEquiv.symm f) * ↑f = 1

Next tactic:
ext
/-- A continuous equivalence from `M` to itself determines an invertible continuous linear map. -/
def toUnit (f : M ≃L[R] M) : (M →L[R] M)ˣ where
  val := f
  inv := f.symm
  val_inv := by
    ext
    simp
  inv_val := by
    ext
    

Proof state:
case h
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
x✝ : M
⊢ (↑(ContinuousLinearEquiv.symm f) * ↑f) x✝ = 1 x✝

Next tactic:
simp
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
⊢ toUnit (ofUnit f) = f

Next tactic:
ext
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    ext
    

Proof state:
case a.h
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : (M →L[R] M)ˣ
x✝ : M
⊢ ↑(toUnit (ofUnit f)) x✝ = ↑f x✝

Next tactic:
rfl
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    ext
    rfl
  right_inv f := by
    

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
⊢ ofUnit (toUnit f) = f

Next tactic:
ext
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    ext
    rfl
  right_inv f := by
    ext
    

Proof state:
case h.h
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
f : M ≃L[R] M
x✝ : M
⊢ (ofUnit (toUnit f)) x✝ = f x✝

Next tactic:
rfl
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    ext
    rfl
  right_inv f := by
    ext
    rfl
  map_mul' x y := by
    

Proof state:
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
x y : (M →L[R] M)ˣ
⊢ Equiv.toFun
      { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
        right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
      (x * y) =
    Equiv.toFun
        { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
          right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
        x *
      Equiv.toFun
        { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
          right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
        y

Next tactic:
ext
/-- The units of the algebra of continuous `R`-linear endomorphisms of `M` is multiplicatively
equivalent to the type of continuous linear equivalences between `M` and itself. -/
def unitsEquiv : (M →L[R] M)ˣ ≃* M ≃L[R] M where
  toFun := ofUnit
  invFun := toUnit
  left_inv f := by
    ext
    rfl
  right_inv f := by
    ext
    rfl
  map_mul' x y := by
    ext
    

Proof state:
case h.h
R : Type u_1
inst✝¹⁰ : Ring R
R₂ : Type u_2
inst✝⁹ : Ring R₂
M : Type u_3
inst✝⁸ : TopologicalSpace M
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
M₂ : Type u_4
inst✝⁵ : TopologicalSpace M₂
inst✝⁴ : AddCommGroup M₂
inst✝³ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝² : RingHomInvPair σ₁₂ σ₂₁
inst✝¹ : RingHomInvPair σ₂₁ σ₁₂
inst✝ : TopologicalAddGroup M
x y : (M →L[R] M)ˣ
x✝ : M
⊢ (Equiv.toFun
        { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
          right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
        (x * y))
      x✝ =
    (Equiv.toFun
          { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
            right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
          x *
        Equiv.toFun
          { toFun := ofUnit, invFun := toUnit, left_inv := (_ : ∀ (f : (M →L[R] M)ˣ), toUnit (ofUnit f) = f),
            right_inv := (_ : ∀ (f : M ≃L[R] M), ofUnit (toUnit f) = f) }
          y)
      x✝

Next tactic:
rfl
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by 

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
u : Rˣ
x : R
⊢ (ContinuousLinearMap.smulRight 1 ↑u⁻¹) ((ContinuousLinearMap.smulRight 1 ↑u) x) = x

Next tactic:
simp
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by simp) fun x => by 

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
u : Rˣ
x : R
⊢ (ContinuousLinearMap.smulRight 1 ↑u) ((ContinuousLinearMap.smulRight 1 ↑u⁻¹) x) = x

Next tactic:
simp
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by simp) fun x => by simp
  invFun e :=
    ⟨e 1, e.symm 1, by 

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
e : R ≃L[R] R
⊢ e 1 * (ContinuousLinearEquiv.symm e) 1 = 1

Next tactic:
rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, symm_apply_apply]
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by simp) fun x => by simp
  invFun e :=
    ⟨e 1, e.symm 1, by rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, symm_apply_apply], by
      

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
e : R ≃L[R] R
⊢ (ContinuousLinearEquiv.symm e) 1 * e 1 = 1

Next tactic:
rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, apply_symm_apply]
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by simp) fun x => by simp
  invFun e :=
    ⟨e 1, e.symm 1, by rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, symm_apply_apply], by
      rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, apply_symm_apply]⟩
  left_inv u := Units.ext <| by 

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
u : Rˣ
⊢ ↑((fun e =>
          { val := e 1, inv := (ContinuousLinearEquiv.symm e) 1,
            val_inv := (_ : e 1 * (ContinuousLinearEquiv.symm e) 1 = 1),
            inv_val := (_ : (ContinuousLinearEquiv.symm e) 1 * e 1 = 1) })
        ((fun u =>
            equivOfInverse (ContinuousLinearMap.smulRight 1 ↑u) (ContinuousLinearMap.smulRight 1 ↑u⁻¹)
              (_ : ∀ (x : R), x * ↑u * ↑u⁻¹ = x) (_ : ∀ (x : R), x * ↑u⁻¹ * ↑u = x))
          u)) =
    ↑u

Next tactic:
simp
/-- Continuous linear equivalences `R ≃L[R] R` are enumerated by `Rˣ`. -/
def unitsEquivAut : Rˣ ≃ R ≃L[R] R where
  toFun u :=
    equivOfInverse (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u)
      (ContinuousLinearMap.smulRight (1 : R →L[R] R) ↑u⁻¹) (fun x => by simp) fun x => by simp
  invFun e :=
    ⟨e 1, e.symm 1, by rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, symm_apply_apply], by
      rw [← smul_eq_mul, ← map_smul, smul_eq_mul, mul_one, apply_symm_apply]⟩
  left_inv u := Units.ext <| by simp
  right_inv e := ext₁ <| by 

Proof state:
R : Type u_1
inst✝¹¹ : Ring R
R₂ : Type u_2
inst✝¹⁰ : Ring R₂
M : Type u_3
inst✝⁹ : TopologicalSpace M
inst✝⁸ : AddCommGroup M
inst✝⁷ : Module R M
M₂ : Type u_4
inst✝⁶ : TopologicalSpace M₂
inst✝⁵ : AddCommGroup M₂
inst✝⁴ : Module R₂ M₂
σ₁₂ : R →+* R₂
σ₂₁ : R₂ →+* R
inst✝³ : RingHomInvPair σ₁₂ σ₂₁
inst✝² : RingHomInvPair σ₂₁ σ₁₂
inst✝¹ : TopologicalSpace R
inst✝ : ContinuousMul R
e : R ≃L[R] R
⊢ ((fun u =>
          equivOfInverse (ContinuousLinearMap.smulRight 1 ↑u) (ContinuousLinearMap.smulRight 1 ↑u⁻¹)
            (_ : ∀ (x : R), x * ↑u * ↑u⁻¹ = x) (_ : ∀ (x : R), x * ↑u⁻¹ * ↑u = x))
        ((fun e =>
            { val := e 1, inv := (ContinuousLinearEquiv.symm e) 1,
              val_inv := (_ : e 1 * (ContinuousLinearEquiv.symm e) 1 = 1),
              inv_val := (_ : (ContinuousLinearEquiv.symm e) 1 * e 1 = 1) })
          e))
      1 =
    e 1

Next tactic:
simp