Theorem: IsBaseChange.of_lift_unique
File: Mathlib/RingTheory/IsTensorProduct.lean

tactic: obtain ⟨g, hg, -⟩ :=
  h (ULift.{v₂} <| S ⊗[R] M)
    (ULift.moduleEquiv.symm.toLinearMap.comp <| TensorProduct.mk R S M 1)
state_before: 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

tactic: 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)
state_before: 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

tactic: change Function.Bijective f'
state_before: 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

tactic: simp_rw [FunLike.ext_iff, LinearMap.comp_apply, LinearMap.restrictScalars_apply] at hg
state_before: 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'

tactic: let fe : S ⊗[R] M ≃ₗ[S] N :=
  LinearEquiv.ofLinear f'' (ULift.moduleEquiv.toLinearMap.comp g) ?_ ?_
state_before: 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'

tactic: 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 => _ }
state_before: 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

tactic: dsimp
state_before: 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

tactic: rw [map_zero, smul_zero, map_zero, smul_zero]
state_before: 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

tactic: dsimp at *
state_before: 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)

tactic: rw [smul_add, map_add, map_add, smul_add, hx, hy]
state_before: 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)

tactic: exact fe.bijective
state_before: 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'

tactic: rw [← LinearMap.cancel_left (ULift.moduleEquiv : ULift.{max v₁ v₃} N ≃ₗ[S] N).symm.injective]
state_before: 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

tactic: refine' (h (ULift.{max v₁ v₃} N) <| ULift.moduleEquiv.symm.toLinearMap.comp f).unique _ rfl
state_before: 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

tactic: ext x
state_before: 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

tactic: simp only [LinearMap.comp_apply, LinearMap.restrictScalars_apply, hg]
state_before: 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

tactic: apply one_smul
state_before: 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

tactic: ext x
state_before: 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

tactic: change (g <| (1 : S) • f x).down = _
state_before: 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

tactic: rw [one_smul, hg]
state_before: 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

tactic: rfl
state_before: 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