l3lab/ntp-mathlib huggingface dataset:
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    ext x
    simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
  map_add' f g := by
    

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f g : M₁ →ₗ[R] M₂₁
⊢ (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) = (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g

Next tactic:
ext x
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    ext x
    simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
  map_add' f g := by
    ext x
    

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f g : M₁ →ₗ[R] M₂₁
x : M₂
⊢ ((fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g)) x =
    ((fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) x

Next tactic:
simp only [map_add, add_apply, Function.comp_apply, coe_comp, coe_coe]
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    ext x
    simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
  map_add' f g := by
    ext x
    simp only [map_add, add_apply, Function.comp_apply, coe_comp, coe_coe]
  map_smul' c f := by
    

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
c : R
f : M₁ →ₗ[R] M₂₁
⊢ AddHom.toFun
      { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
        map_add' :=
          (_ :
            ∀ (f g : M₁ →ₗ[R] M₂₁),
              (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
      (c • f) =
    (RingHom.id R) c •
      AddHom.toFun
        { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
          map_add' :=
            (_ :
              ∀ (f g : M₁ →ₗ[R] M₂₁),
                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
        f

Next tactic:
ext x
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    ext x
    simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
  map_add' f g := by
    ext x
    simp only [map_add, add_apply, Function.comp_apply, coe_comp, coe_coe]
  map_smul' c f := by
    ext x
    

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
c : R
f : M₁ →ₗ[R] M₂₁
x : M₂
⊢ (AddHom.toFun
        { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
          map_add' :=
            (_ :
              ∀ (f g : M₁ →ₗ[R] M₂₁),
                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
        (c • f))
      x =
    ((RingHom.id R) c •
        AddHom.toFun
          { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
            map_add' :=
              (_ :
                ∀ (f g : M₁ →ₗ[R] M₂₁),
                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                    (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
          f)
      x

Next tactic:
simp only [smul_apply, Function.comp_apply, coe_comp, map_smulₛₗ e₂, coe_coe]
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f : M₁ →ₗ[R] M₂₁
⊢ (fun f => ↑(symm e₂) ∘ₗ f ∘ₗ ↑e₁)
      (AddHom.toFun
        {
            toAddHom :=
              { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                map_add' :=
                  (_ :
                    ∀ (f g : M₁ →ₗ[R] M₂₁),
                      (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                        (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),
                  AddHom.toFun
                      { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                        map_add' :=
                          (_ :
                            ∀ (f g : M₁ →ₗ[R] M₂₁),
                              (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                      (c • f) =
                    (RingHom.id R) c •
                      AddHom.toFun
                        { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                          map_add' :=
                            (_ :
                              ∀ (f g : M₁ →ₗ[R] M₂₁),
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                        f) }.toAddHom
        f) =
    f

Next tactic:
ext x
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f : M₁ →ₗ[R] M₂₁
x : M₁
⊢ ((fun f => ↑(symm e₂) ∘ₗ f ∘ₗ ↑e₁)
        (AddHom.toFun
          {
              toAddHom :=
                { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                  map_add' :=
                    (_ :
                      ∀ (f g : M₁ →ₗ[R] M₂₁),
                        (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                          (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) },
              map_smul' :=
                (_ :
                  ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),
                    AddHom.toFun
                        { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                          map_add' :=
                            (_ :
                              ∀ (f g : M₁ →ₗ[R] M₂₁),
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                        (c • f) =
                      (RingHom.id R) c •
                        AddHom.toFun
                          { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                            map_add' :=
                              (_ :
                                ∀ (f g : M₁ →ₗ[R] M₂₁),
                                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                    (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                          f) }.toAddHom
          f))
      x =
    f x

Next tactic:
simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    

Proof state:
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f : M₂ →ₗ[R] M₂₂
⊢ AddHom.toFun
      {
          toAddHom :=
            { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
              map_add' :=
                (_ :
                  ∀ (f g : M₁ →ₗ[R] M₂₁),
                    (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                      (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) },
          map_smul' :=
            (_ :
              ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),
                AddHom.toFun
                    { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                      map_add' :=
                        (_ :
                          ∀ (f g : M₁ →ₗ[R] M₂₁),
                            (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                              (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                    (c • f) =
                  (RingHom.id R) c •
                    AddHom.toFun
                      { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                        map_add' :=
                          (_ :
                            ∀ (f g : M₁ →ₗ[R] M₂₁),
                              (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                      f) }.toAddHom
      ((fun f => ↑(symm e₂) ∘ₗ f ∘ₗ ↑e₁) f) =
    f

Next tactic:
ext x
/-- A linear isomorphism between the domains and codomains of two spaces of linear maps gives a
linear isomorphism between the two function spaces. -/
def arrowCongr {R M₁ M₂ M₂₁ M₂₂ : Sort _} [CommSemiring R] [AddCommMonoid M₁] [AddCommMonoid M₂]
    [AddCommMonoid M₂₁] [AddCommMonoid M₂₂] [Module R M₁] [Module R M₂] [Module R M₂₁]
    [Module R M₂₂] (e₁ : M₁ ≃ₗ[R] M₂) (e₂ : M₂₁ ≃ₗ[R] M₂₂) : (M₁ →ₗ[R] M₂₁) ≃ₗ[R] M₂ →ₗ[R] M₂₂
    where
  toFun := fun f : M₁ →ₗ[R] M₂₁ => (e₂ : M₂₁ →ₗ[R] M₂₂).comp <| f.comp (e₁.symm : M₂ →ₗ[R] M₁)
  invFun f := (e₂.symm : M₂₂ →ₗ[R] M₂₁).comp <| f.comp (e₁ : M₁ →ₗ[R] M₂)
  left_inv f := by
    ext x
    simp only [symm_apply_apply, Function.comp_apply, coe_comp, coe_coe]
  right_inv f := by
    ext x
    

Proof state:
case h
R✝ : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁✝ : Type u_11
M₂✝ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹⁵ : CommSemiring R✝
inst✝¹⁴ : AddCommMonoid M
inst✝¹³ : AddCommMonoid M₂✝
inst✝¹² : AddCommMonoid M₃
inst✝¹¹ : Module R✝ M
inst✝¹⁰ : Module R✝ M₂✝
inst✝⁹ : Module R✝ M₃
R : Type ?u.1219362
M₁ : Type ?u.1219365
M₂ : Type ?u.1219368
M₂₁ : Type ?u.1219371
M₂₂ : Type ?u.1219374
inst✝⁸ : CommSemiring R
inst✝⁷ : AddCommMonoid M₁
inst✝⁶ : AddCommMonoid M₂
inst✝⁵ : AddCommMonoid M₂₁
inst✝⁴ : AddCommMonoid M₂₂
inst✝³ : Module R M₁
inst✝² : Module R M₂
inst✝¹ : Module R M₂₁
inst✝ : Module R M₂₂
e₁ : M₁ ≃ₗ[R] M₂
e₂ : M₂₁ ≃ₗ[R] M₂₂
f : M₂ →ₗ[R] M₂₂
x : M₂
⊢ (AddHom.toFun
        {
            toAddHom :=
              { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                map_add' :=
                  (_ :
                    ∀ (f g : M₁ →ₗ[R] M₂₁),
                      (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                        (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) },
            map_smul' :=
              (_ :
                ∀ (c : R) (f : M₁ →ₗ[R] M₂₁),
                  AddHom.toFun
                      { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                        map_add' :=
                          (_ :
                            ∀ (f g : M₁ →ₗ[R] M₂₁),
                              (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                      (c • f) =
                    (RingHom.id R) c •
                      AddHom.toFun
                        { toFun := fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁),
                          map_add' :=
                            (_ :
                              ∀ (f g : M₁ →ₗ[R] M₂₁),
                                (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) (f + g) =
                                  (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) f + (fun f => ↑e₂ ∘ₗ f ∘ₗ ↑(symm e₁)) g) }
                        f) }.toAddHom
        ((fun f => ↑(symm e₂) ∘ₗ f ∘ₗ ↑e₁) f))
      x =
    f x

Next tactic:
simp only [Function.comp_apply, apply_symm_apply, coe_comp, coe_coe]
theorem arrowCongr_comp {N N₂ N₃ : Sort _} [AddCommMonoid N] [AddCommMonoid N₂] [AddCommMonoid N₃]
    [Module R N] [Module R N₂] [Module R N₃] (e₁ : M ≃ₗ[R] N) (e₂ : M₂ ≃ₗ[R] N₂) (e₃ : M₃ ≃ₗ[R] N₃)
    (f : M →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) :
    arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f) := by
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N✝ : Type u_15
N₂✝ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : AddCommMonoid M₃
inst✝⁸ : Module R M
inst✝⁷ : Module R M₂
inst✝⁶ : Module R M₃
N : Type u_20
N₂ : Type u_21
N₃ : Type u_22
inst✝⁵ : AddCommMonoid N
inst✝⁴ : AddCommMonoid N₂
inst✝³ : AddCommMonoid N₃
inst✝² : Module R N
inst✝¹ : Module R N₂
inst✝ : Module R N₃
e₁ : M ≃ₗ[R] N
e₂ : M₂ ≃ₗ[R] N₂
e₃ : M₃ ≃ₗ[R] N₃
f : M →ₗ[R] M₂
g : M₂ →ₗ[R] M₃
⊢ (arrowCongr e₁ e₃) (g ∘ₗ f) = (arrowCongr e₂ e₃) g ∘ₗ (arrowCongr e₁ e₂) f

Next tactic:
ext
theorem arrowCongr_comp {N N₂ N₃ : Sort _} [AddCommMonoid N] [AddCommMonoid N₂] [AddCommMonoid N₃]
    [Module R N] [Module R N₂] [Module R N₃] (e₁ : M ≃ₗ[R] N) (e₂ : M₂ ≃ₗ[R] N₂) (e₃ : M₃ ≃ₗ[R] N₃)
    (f : M →ₗ[R] M₂) (g : M₂ →ₗ[R] M₃) :
    arrowCongr e₁ e₃ (g.comp f) = (arrowCongr e₂ e₃ g).comp (arrowCongr e₁ e₂ f) := by
  ext
  

Proof state:
case h
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N✝ : Type u_15
N₂✝ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝¹² : CommSemiring R
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M₂
inst✝⁹ : AddCommMonoid M₃
inst✝⁸ : Module R M
inst✝⁷ : Module R M₂
inst✝⁶ : Module R M₃
N : Type u_20
N₂ : Type u_21
N₃ : Type u_22
inst✝⁵ : AddCommMonoid N
inst✝⁴ : AddCommMonoid N₂
inst✝³ : AddCommMonoid N₃
inst✝² : Module R N
inst✝¹ : Module R N₂
inst✝ : Module R N₃
e₁ : M ≃ₗ[R] N
e₂ : M₂ ≃ₗ[R] N₂
e₃ : M₃ ≃ₗ[R] N₃
f : M →ₗ[R] M₂
g : M₂ →ₗ[R] M₃
x✝ : N
⊢ ((arrowCongr e₁ e₃) (g ∘ₗ f)) x✝ = ((arrowCongr e₂ e₃) g ∘ₗ (arrowCongr e₁ e₂) f) x✝

Next tactic:
simp only [symm_apply_apply, arrowCongr_apply, LinearMap.comp_apply]
theorem conj_trans (e₁ : M ≃ₗ[R] M₂) (e₂ : M₂ ≃ₗ[R] M₃) :
    e₁.conj.trans e₂.conj = (e₁.trans e₂).conj := by
  

Proof state:
R : Type u_1
R₁ : Type u_2
R₂ : Type u_3
R₃ : Type u_4
R₄ : Type u_5
S : Type u_6
K : Type u_7
K₂ : Type u_8
M : Type u_9
M' : Type u_10
M₁ : Type u_11
M₂ : Type u_12
M₃ : Type u_13
M₄ : Type u_14
N : Type u_15
N₂ : Type u_16
ι : Type u_17
V : Type u_18
V₂ : Type u_19
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid M₂
inst✝³ : AddCommMonoid M₃
inst✝² : Module R M
inst✝¹ : Module R M₂
inst✝ : Module R M₃
e₁ : M ≃ₗ[R] M₂
e₂ : M₂ ≃ₗ[R] M₃
⊢ conj e₁ ≪≫ₗ conj e₂ = conj (e₁ ≪≫ₗ e₂)

Next tactic:
ext f x