Theorem: associated_norm_prod_smith
File: Mathlib/LinearAlgebra/FreeModule/Norm.lean

tactic: have hI := span_singleton_eq_bot.not.2 hf
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)

tactic: let b' := ringBasis b (span {f}) hI
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)

tactic: classical
rw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']
let e :=
  (b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
    ((LinearEquiv.coord S S f hf).restrictScalars R)
refine (LinearMap.associated_det_of_eq_comp e _ _ ?_).symm
dsimp only [e, LinearEquiv.trans_apply]
simp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]
refine b'.ext fun i => ?_
simp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,
  Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
  zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
change _ = f * _
erw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
  Ideal.selfBasis_def]
rfl
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)
state_after: no goals

tactic: rw [← Matrix.det_diagonal, ← LinearMap.det_toLin b']
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (∏ i : ι, smithCoeffs b (span {f}) ⋯ i)
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))))

tactic: let e :=
  (b'.equiv ((span {f}).selfBasis b hI) <| Equiv.refl _).trans
    ((LinearEquiv.coord S S f hf).restrictScalars R)
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
⊢ Associated ((Algebra.norm R) f) (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ Associated ((Algebra.norm R) f) (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))))

tactic: refine (LinearMap.associated_det_of_eq_comp e _ _ ?_).symm
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ Associated ((Algebra.norm R) f) (LinearMap.det ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ∀ (x : S),
    ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) x = (↑(Algebra.lmul R S).toRingHom f) (e x)

tactic: dsimp only [e, LinearEquiv.trans_apply]
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ∀ (x : S),
    ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) x = (↑(Algebra.lmul R S).toRingHom f) (e x)
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ∀ (x : S),
    ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) x =
      (↑(Algebra.lmul R S).toRingHom f)
        ((LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))
          ((b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι)) x))

tactic: simp_rw [← LinearEquiv.coe_toLinearMap, ← LinearMap.comp_apply, ← LinearMap.ext_iff]
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ∀ (x : S),
    ((Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) x =
      (↑(Algebra.lmul R S).toRingHom f)
        ((LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf))
          ((b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι)) x))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ↑(Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯)) =
    ↑(Algebra.lmul R S).toRingHom f ∘ₗ
      ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ∘ₗ
        ↑(b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι))

tactic: refine b'.ext fun i => ?_
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
⊢ ↑(Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯)) =
    ↑(Algebra.lmul R S).toRingHom f ∘ₗ
      ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ∘ₗ
        ↑(b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ (↑(Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) (b' i) =
    (↑(Algebra.lmul R S).toRingHom f ∘ₗ
        ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ∘ₗ
          ↑(b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι)))
      (b' i)

tactic: simp_rw [LinearMap.comp_apply, LinearEquiv.coe_toLinearMap, Matrix.toLin_apply, Basis.repr_self,
  Finsupp.single_eq_pi_single, Matrix.diagonal_mulVec_single, Pi.single_apply, ite_smul,
  zero_smul, Finset.sum_ite_eq', mul_one, if_pos (Finset.mem_univ _), b'.equiv_apply]
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ (↑(Matrix.toLin b' b') (Matrix.diagonal (smithCoeffs b (span {f}) ⋯))) (b' i) =
    (↑(Algebra.lmul R S).toRingHom f ∘ₗ
        ↑(LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ∘ₗ
          ↑(b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι)))
      (b' i)
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    (↑(Algebra.lmul R S).toRingHom f)
      ((LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ((selfBasis b (span {f}) hI) ((Equiv.refl ι) i)))

tactic: change _ = f * _
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    (↑(Algebra.lmul R S).toRingHom f)
      ((LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ((selfBasis b (span {f}) hI) ((Equiv.refl ι) i)))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    f * (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ((selfBasis b (span {f}) hI) ((Equiv.refl ι) i))

tactic: erw [mul_comm, ← smul_eq_mul, LinearEquiv.restrictScalars_apply, LinearEquiv.coord_apply_smul,
  Ideal.selfBasis_def]
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    f * (LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)) ((selfBasis b (span {f}) hI) ((Equiv.refl ι) i))
state_after: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    smithCoeffs b (span {f}) hI ((Equiv.refl ι) i) • (ringBasis b (span {f}) hI) ((Equiv.refl ι) i)

tactic: rfl
state_before: R : Type u_1
S : Type u_2
ι : Type u_3
inst✝¹⁰ : CommRing R
inst✝⁹ : IsDomain R
inst✝⁸ : IsPrincipalIdealRing R
inst✝⁷ : CommRing S
inst✝⁶ : IsDomain S
inst✝⁵ : Algebra R S
F : Type u_4
inst✝⁴ : CommRing F
inst✝³ : Algebra F R
inst✝² : Algebra F S
inst✝¹ : IsScalarTower F R S
inst✝ : Fintype ι
b : Basis ι R S
f : S
hf : f ≠ 0
hI : ¬span {f} = ⊥
b' : Basis ι R S := ringBasis b (span {f}) hI
e : S ≃ₗ[R] S :=
  b'.equiv (selfBasis b (span {f}) hI) (Equiv.refl ι) ≪≫ₗ LinearEquiv.restrictScalars R (LinearEquiv.coord S S f hf)
i : ι
⊢ smithCoeffs b (span {f}) ⋯ i • b' i =
    smithCoeffs b (span {f}) hI ((Equiv.refl ι) i) • (ringBasis b (span {f}) hI) ((Equiv.refl ι) i)
state_after: no goals