case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
⊢ IsBaseChange S f
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
⊢ IsBaseChange S f
obtain ⟨g, hg, -⟩ :=
  h (ULift.{v₂} <| S ⊗[R] M)
    (ULift.moduleEquiv.symm.toLinearMap.comp <| TensorProduct.mk R S M 1)
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
⊢ IsBaseChange S f
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
⊢ IsBaseChange S f
let f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (((LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S
    (Module.End S (M →ₗ[R] N))))) f).restrictScalars R)
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
⊢ Function.Bijective ↑f'
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
⊢ IsBaseChange S f
change Function.Bijective f'
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ Function.Bijective ↑f'
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
⊢ Function.Bijective ↑f'
simp_rw [FunLike.ext_iff, LinearMap.comp_apply, LinearMap.restrictScalars_apply] at hg
case intro.intro.refine_3
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
fe : S ⊗[R] M ≃ₗ[S] N :=
  LinearEquiv.ofLinear f'' (LinearMap.comp (↑ULift.moduleEquiv) g) ?intro.intro.refine_1 ?intro.intro.refine_2
⊢ Function.Bijective ↑f'

case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g) = LinearMap.id

case intro.intro.refine_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp (LinearMap.comp (↑ULift.moduleEquiv) g) f'' = LinearMap.id
case intro.intro
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ Function.Bijective ↑f'
let fe : S ⊗[R] M ≃ₗ[S] N :=
  LinearEquiv.ofLinear f'' (ULift.moduleEquiv.toLinearMap.comp g) ?_ ?_
case refine'_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x : S ⊗[R] M
⊢ AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • 0) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        0

case refine'_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x✝ x y : S ⊗[R] M
hx :
  AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • x) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        x
hy :
  AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • y) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        y
⊢ AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • (x + y)) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        (x + y)
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
⊢ S ⊗[R] M →ₗ[S] N
refine'
  { f' with
    toFun := f'
    map_smul' := fun s x =>
      TensorProduct.induction_on x _ (fun s' y => smul_assoc s s' _) fun x y hx hy => _ }
case refine'_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x : S ⊗[R] M
⊢ ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • 0) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        0
case refine'_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x : S ⊗[R] M
⊢ AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • 0) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        0
dsimp
no goals
case refine'_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x : S ⊗[R] M
⊢ ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • 0) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        0
rw [map_zero, smul_zero, map_zero, smul_zero]
case refine'_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x✝ x y : S ⊗[R] M
hx :
  ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • x) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        x
hy :
  ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • y) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        y
⊢ ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • (x + y)) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        (x + y)
case refine'_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x✝ x y : S ⊗[R] M
hx :
  AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • x) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        x
hy :
  AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • y) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        y
⊢ AddHom.toFun
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
      (s • (x + y)) =
    ↑(RingHom.id S) s •
      AddHom.toFun
        { toFun := ↑f',
          map_add' :=
            (_ :
              ∀ (x y : S ⊗[R] M),
                AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
        (x + y)
dsimp at *
no goals
case refine'_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
hg : LinearMap.comp (↑R g) f = LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (↑(mk R S M) 1)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
s : S
x✝ x y : S ⊗[R] M
hx :
  ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • x) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        x
hy :
  ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • y) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        y
⊢ ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
      (s • (x + y)) =
    s •
      ↑(TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f)))
        (x + y)
rw [smul_add, map_add, map_add, smul_add, hx, hy]
no goals
case intro.intro.refine_3
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
fe : S ⊗[R] M ≃ₗ[S] N :=
  LinearEquiv.ofLinear f'' (LinearMap.comp (↑ULift.moduleEquiv) g) ?intro.intro.refine_1 ?intro.intro.refine_2
⊢ Function.Bijective ↑f'
exact fe.bijective
case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g)) =
    LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) LinearMap.id
case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g) = LinearMap.id
rw [← LinearMap.cancel_left (ULift.moduleEquiv : ULift.{max v₁ v₃} N ≃ₗ[S] N).symm.injective]
case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp
      (↑R
        (LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv))
          (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g))))
      f =
    LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) f
case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g)) =
    LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) LinearMap.id
refine' (h (ULift.{max v₁ v₃} N) <| ULift.moduleEquiv.symm.toLinearMap.comp f).unique _ rfl
case intro.intro.refine_1.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑(LinearMap.comp
            (↑R
              (LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv))
                (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g))))
            f)
        x).down =
    (↑(LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) f) x).down
case intro.intro.refine_1
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp
      (↑R
        (LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv))
          (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g))))
      f =
    LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) f
ext x
case intro.intro.refine_1.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑↑(LinearEquiv.symm ULift.moduleEquiv)
        (↑{
              toAddHom :=
                {
                  toFun :=
                    ↑(TensorProduct.lift
                        (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))),
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
              map_smul' :=
                (_ :
                  ∀ (s : S) (x : S ⊗[R] M),
                    AddHom.toFun
                        { toFun := ↑f',
                          map_add' :=
                            (_ :
                              ∀ (x y : S ⊗[R] M),
                                AddHom.toFun f'.toAddHom (x + y) =
                                  AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                        (s • x) =
                      ↑(RingHom.id S) s •
                        AddHom.toFun
                          { toFun := ↑f',
                            map_add' :=
                              (_ :
                                ∀ (x y : S ⊗[R] M),
                                  AddHom.toFun f'.toAddHom (x + y) =
                                    AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                          x) }
          (↑↑ULift.moduleEquiv (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x))))).down =
    (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑f x)).down
case intro.intro.refine_1.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑(LinearMap.comp
            (↑R
              (LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv))
                (LinearMap.comp f'' (LinearMap.comp (↑ULift.moduleEquiv) g))))
            f)
        x).down =
    (↑(LinearMap.comp (↑(LinearEquiv.symm ULift.moduleEquiv)) f) x).down
simp only [LinearMap.comp_apply, LinearMap.restrictScalars_apply, hg]
no goals
case intro.intro.refine_1.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑↑(LinearEquiv.symm ULift.moduleEquiv)
        (↑{
              toAddHom :=
                {
                  toFun :=
                    ↑(TensorProduct.lift
                        (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))),
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
              map_smul' :=
                (_ :
                  ∀ (s : S) (x : S ⊗[R] M),
                    AddHom.toFun
                        { toFun := ↑f',
                          map_add' :=
                            (_ :
                              ∀ (x y : S ⊗[R] M),
                                AddHom.toFun f'.toAddHom (x + y) =
                                  AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                        (s • x) =
                      ↑(RingHom.id S) s •
                        AddHom.toFun
                          { toFun := ↑f',
                            map_add' :=
                              (_ :
                                ∀ (x y : S ⊗[R] M),
                                  AddHom.toFun f'.toAddHom (x + y) =
                                    AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                          x) }
          (↑↑ULift.moduleEquiv (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x))))).down =
    (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑f x)).down
apply one_smul
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ ↑(↑(AlgebraTensorModule.curry (LinearMap.comp (LinearMap.comp (↑ULift.moduleEquiv) g) f'')) 1) x =
    ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
case intro.intro.refine_2
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
⊢ LinearMap.comp (LinearMap.comp (↑ULift.moduleEquiv) g) f'' = LinearMap.id
ext x
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑g (1 • ↑f x)).down = ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ ↑(↑(AlgebraTensorModule.curry (LinearMap.comp (LinearMap.comp (↑ULift.moduleEquiv) g) f'')) 1) x =
    ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
change (g <| (1 : S) • f x).down = _
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)).down = ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑g (1 • ↑f x)).down = ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
rw [one_smul, hg]
no goals
case intro.intro.refine_2.a.h.h
R : Type u_1
M : Type v₁
N : Type v₂
S : Type v₃
inst✝¹² : AddCommMonoid M
inst✝¹¹ : AddCommMonoid N
inst✝¹⁰ : CommRing R
inst✝⁹ : CommRing S
inst✝⁸ : Algebra R S
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module S N
inst✝⁴ : IsScalarTower R S N
f : M →ₗ[R] N
h✝ : IsBaseChange S f
P : Type ?u.406196
Q : Type ?u.406199
inst✝³ : AddCommMonoid P
inst✝² : Module R P
inst✝¹ : AddCommMonoid Q
inst✝ : Module S Q
h :
  ∀ (Q : Type (max v₁ v₂ v₃)) [inst : AddCommMonoid Q] [inst_1 : Module R Q] [inst_2 : Module S Q]
    [inst_3 : IsScalarTower R S Q] (g : M →ₗ[R] Q), ∃! g', LinearMap.comp (↑R g') f = g
g : N →ₗ[S] ULift (S ⊗[R] M)
f' : S ⊗[R] M →ₗ[R] N :=
  TensorProduct.lift (↑R (↑(LinearMap.flip (AlgHom.toLinearMap (Algebra.ofId S (Module.End S (M →ₗ[R] N))))) f))
f'' : S ⊗[R] M →ₗ[S] N :=
  {
    toAddHom :=
      { toFun := ↑f',
        map_add' :=
          (_ :
            ∀ (x y : S ⊗[R] M),
              AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) },
    map_smul' :=
      (_ :
        ∀ (s : S) (x : S ⊗[R] M),
          AddHom.toFun
              { toFun := ↑f',
                map_add' :=
                  (_ :
                    ∀ (x y : S ⊗[R] M),
                      AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
              (s • x) =
            ↑(RingHom.id S) s •
              AddHom.toFun
                { toFun := ↑f',
                  map_add' :=
                    (_ :
                      ∀ (x y : S ⊗[R] M),
                        AddHom.toFun f'.toAddHom (x + y) = AddHom.toFun f'.toAddHom x + AddHom.toFun f'.toAddHom y) }
                x) }
hg : ∀ (x : M), ↑g (↑f x) = ↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)
x : M
⊢ (↑↑(LinearEquiv.symm ULift.moduleEquiv) (↑(↑(mk R S M) 1) x)).down = ↑(↑(AlgebraTensorModule.curry LinearMap.id) 1) x
rfl