l3lab/ntp-mathlib huggingface dataset:
theorem norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) :
    algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x := by
  apply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)
  rw [map_prod (algebraMap L (AlgebraicClosure L))]
  rw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]
  · rw [← norm_eq_prod_embeddings]
    

Proof state:
case a
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
⊢ (algebraMap L (AlgebraicClosure L)) ((algebraMap K L) ((norm K) x)) =
    (algebraMap K (AlgebraicClosure L)) ((norm K) ?a.x✝)
case a.x
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
⊢ L

Next tactic:
simp only [algebraMap_eq_smul_one, smul_one_smul]
theorem norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) :
    algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x := by
  apply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)
  rw [map_prod (algebraMap L (AlgebraicClosure L))]
  rw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]
  · rw [← norm_eq_prod_embeddings]
    simp only [algebraMap_eq_smul_one, smul_one_smul]
    

Proof state:
case a
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
⊢ (norm K) x • 1 = (norm K) ?a.x✝ • 1
case a.x
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
⊢ L

Next tactic:
rfl
theorem norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) :
    algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x := by
  apply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)
  rw [map_prod (algebraMap L (AlgebraicClosure L))]
  rw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]
  · rw [← norm_eq_prod_embeddings]
    simp only [algebraMap_eq_smul_one, smul_one_smul]
    rfl
  · 

Proof state:
case a.h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
⊢ ∀ (x_1 : L →ₐ[K] AlgebraicClosure L),
    x_1 x = (algebraMap L (AlgebraicClosure L)) (((Normal.algHomEquivAut K (AlgebraicClosure L) L) x_1) x)

Next tactic:
intro σ
theorem norm_eq_prod_automorphisms [FiniteDimensional K L] [IsGalois K L] (x : L) :
    algebraMap K L (norm K x) = ∏ σ : L ≃ₐ[K] L, σ x := by
  apply NoZeroSMulDivisors.algebraMap_injective L (AlgebraicClosure L)
  rw [map_prod (algebraMap L (AlgebraicClosure L))]
  rw [← Fintype.prod_equiv (Normal.algHomEquivAut K (AlgebraicClosure L) L)]
  · rw [← norm_eq_prod_embeddings]
    simp only [algebraMap_eq_smul_one, smul_one_smul]
    rfl
  · intro σ
    

Proof state:
case a.h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : FiniteDimensional K L
inst✝ : IsGalois K L
x : L
σ : L →ₐ[K] AlgebraicClosure L
⊢ σ x = (algebraMap L (AlgebraicClosure L)) (((Normal.algHomEquivAut K (AlgebraicClosure L) L) σ) x)

Next tactic:
simp only [Normal.algHomEquivAut, AlgHom.restrictNormal', Equiv.coe_fn_mk,
      AlgEquiv.coe_ofBijective, AlgHom.restrictNormal_commutes, id.map_eq_id, RingHom.id_apply]
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
⊢ IsIntegral R ((norm K) x)

Next tactic:
have hx' : IsIntegral K x := hx.tower_top
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
⊢ IsIntegral R ((norm K) x)

Next tactic:
rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · 

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
⊢ IsIntegral R (Multiset.prod (aroots (minpoly K x) (AlgebraicClosure L)) ^ finrank (↥K⟮x⟯) L)

Next tactic:
refine' (IsIntegral.multiset_prod fun y hy => _).pow _
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · refine' (IsIntegral.multiset_prod fun y hy => _).pow _
    

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
y : AlgebraicClosure L
hy : y ∈ aroots (minpoly K x) (AlgebraicClosure L)
⊢ IsIntegral R y

Next tactic:
rw [mem_roots_map (minpoly.ne_zero hx')] at hy
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · refine' (IsIntegral.multiset_prod fun y hy => _).pow _
    rw [mem_roots_map (minpoly.ne_zero hx')] at hy
    

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
y : AlgebraicClosure L
hy : eval₂ (algebraMap K (AlgebraicClosure L)) y (minpoly K x) = 0
⊢ IsIntegral R y

Next tactic:
use minpoly R x, minpoly.monic hx
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · refine' (IsIntegral.multiset_prod fun y hy => _).pow _
    rw [mem_roots_map (minpoly.ne_zero hx')] at hy
    use minpoly R x, minpoly.monic hx
    

Proof state:
case right
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
y : AlgebraicClosure L
hy : eval₂ (algebraMap K (AlgebraicClosure L)) y (minpoly K x) = 0
⊢ eval₂ (algebraMap R (AlgebraicClosure L)) y (minpoly R x) = 0

Next tactic:
rw [← aeval_def] at hy ⊢
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · refine' (IsIntegral.multiset_prod fun y hy => _).pow _
    rw [mem_roots_map (minpoly.ne_zero hx')] at hy
    use minpoly R x, minpoly.monic hx
    rw [← aeval_def] at hy ⊢
    

Proof state:
case right
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
y : AlgebraicClosure L
hy : (aeval y) (minpoly K x) = 0
⊢ (aeval y) (minpoly R x) = 0

Next tactic:
exact minpoly.aeval_of_isScalarTower R x y hy
theorem isIntegral_norm [Algebra R L] [Algebra R K] [IsScalarTower R K L] [IsSeparable K L]
    [FiniteDimensional K L] {x : L} (hx : IsIntegral R x) : IsIntegral R (norm K x) := by
  have hx' : IsIntegral K x := hx.tower_top
  rw [← isIntegral_algebraMap_iff (algebraMap K (AlgebraicClosure L)).injective, norm_eq_prod_roots]
  · refine' (IsIntegral.multiset_prod fun y hy => _).pow _
    rw [mem_roots_map (minpoly.ne_zero hx')] at hy
    use minpoly R x, minpoly.monic hx
    rw [← aeval_def] at hy ⊢
    exact minpoly.aeval_of_isScalarTower R x y hy
  · 

Proof state:
case hF
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
inst✝⁴ : Algebra R L
inst✝³ : Algebra R K
inst✝² : IsScalarTower R K L
inst✝¹ : IsSeparable K L
inst✝ : FiniteDimensional K L
x : L
hx : IsIntegral R x
hx' : IsIntegral K x
⊢ Splits (algebraMap K (AlgebraicClosure L)) (minpoly K x)

Next tactic:
apply IsAlgClosed.splits_codomain
lemma norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) :
    Algebra.norm R (e x) = Algebra.norm R x := by
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : Ring T
inst✝ : Algebra R T
e : S ≃ₐ[R] T
x : S
⊢ (norm R) (e x) = (norm R) x

Next tactic:
simp_rw [Algebra.norm_apply, ← LinearMap.det_conj _ e.toLinearEquiv]
lemma norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) :
    Algebra.norm R (e x) = Algebra.norm R x := by
  simp_rw [Algebra.norm_apply, ← LinearMap.det_conj _ e.toLinearEquiv]; 

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : Ring T
inst✝ : Algebra R T
e : S ≃ₐ[R] T
x : S
⊢ LinearMap.det ((lmul R T) (e x)) =
    LinearMap.det (↑(AlgEquiv.toLinearEquiv e) ∘ₗ (lmul R S) x ∘ₗ ↑(LinearEquiv.symm (AlgEquiv.toLinearEquiv e)))

Next tactic:
congr
lemma norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) :
    Algebra.norm R (e x) = Algebra.norm R x := by
  simp_rw [Algebra.norm_apply, ← LinearMap.det_conj _ e.toLinearEquiv]; congr; 

Proof state:
case h.e_6.h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : Ring T
inst✝ : Algebra R T
e : S ≃ₐ[R] T
x : S
⊢ (lmul R T) (e x) = ↑(AlgEquiv.toLinearEquiv e) ∘ₗ (lmul R S) x ∘ₗ ↑(LinearEquiv.symm (AlgEquiv.toLinearEquiv e))

Next tactic:
ext
lemma norm_eq_of_algEquiv [Ring T] [Algebra R T] (e : S ≃ₐ[R] T) (x) :
    Algebra.norm R (e x) = Algebra.norm R x := by
  simp_rw [Algebra.norm_apply, ← LinearMap.det_conj _ e.toLinearEquiv]; congr; ext; 

Proof state:
case h.e_6.h.h
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹¹ : CommRing R
inst✝¹⁰ : Ring S
inst✝⁹ : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝⁸ : Field K
inst✝⁷ : Field L
inst✝⁶ : Field F
inst✝⁵ : Algebra K L
inst✝⁴ : Algebra K F
ι : Type w
E : Type u_7
inst✝³ : Field E
inst✝² : Algebra K E
inst✝¹ : Ring T
inst✝ : Algebra R T
e : S ≃ₐ[R] T
x : S
x✝ : T
⊢ ((lmul R T) (e x)) x✝ =
    (↑(AlgEquiv.toLinearEquiv e) ∘ₗ (lmul R S) x ∘ₗ ↑(LinearEquiv.symm (AlgEquiv.toLinearEquiv e))) x✝

Next tactic:
simp
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
⊢ e ((norm A) x) = (norm B) x

Next tactic:
classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · obtain ⟨s, ⟨b⟩⟩ := h
    letI : Algebra A B := RingHom.toAlgebra e
    letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
    rw [Algebra.norm_eq_matrix_det b,
      Algebra.norm_eq_matrix_det (b.mapCoeffs e.symm (by simp [Algebra.smul_def, ← he])),
      e.map_det]
    congr
    ext i j
    simp [leftMulMatrix_apply, LinearMap.toMatrix_apply]
  rw [norm_eq_one_of_not_exists_basis _ h, norm_eq_one_of_not_exists_basis, _root_.map_one]
  intro ⟨s, ⟨b⟩⟩
  exact h ⟨s, ⟨b.mapCoeffs e (by simp [Algebra.smul_def, ← he])⟩⟩
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
⊢ e ((norm A) x) = (norm B) x

Next tactic:
by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · 

Proof state:
case pos
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
h : ∃ s, Nonempty (Basis { x // x ∈ s } B C)
⊢ e ((norm A) x) = (norm B) x

Next tactic:
obtain ⟨s, ⟨b⟩⟩ := h
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · obtain ⟨s, ⟨b⟩⟩ := h
    

Proof state:
case pos.intro.intro
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
s : Finset C
b : Basis { x // x ∈ s } B C
⊢ e ((norm A) x) = (norm B) x

Next tactic:
letI : Algebra A B := RingHom.toAlgebra e
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · obtain ⟨s, ⟨b⟩⟩ := h
    letI : Algebra A B := RingHom.toAlgebra e
    

Proof state:
case pos.intro.intro
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
s : Finset C
b : Basis { x // x ∈ s } B C
this : Algebra A B := RingHom.toAlgebra ↑e
⊢ e ((norm A) x) = (norm B) x

Next tactic:
letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · obtain ⟨s, ⟨b⟩⟩ := h
    letI : Algebra A B := RingHom.toAlgebra e
    letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
    

Proof state:
case pos.intro.intro
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
s : Finset C
b : Basis { x // x ∈ s } B C
this✝ : Algebra A B := RingHom.toAlgebra ↑e
this : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
⊢ e ((norm A) x) = (norm B) x

Next tactic:
rw [Algebra.norm_eq_matrix_det b,
      Algebra.norm_eq_matrix_det (b.mapCoeffs e.symm (by simp [Algebra.smul_def, ← he])),
      e.map_det]
lemma norm_eq_of_ringEquiv {A B C : Type*} [CommRing A] [CommRing B] [Ring C]
    [Algebra A C] [Algebra B C] (e : A ≃+* B) (he : (algebraMap B C).comp e = algebraMap A C)
    (x : C) :
    e (Algebra.norm A x) = Algebra.norm B x := by
  classical
  by_cases h : ∃ s : Finset C, Nonempty (Basis s B C)
  · obtain ⟨s, ⟨b⟩⟩ := h
    letI : Algebra A B := RingHom.toAlgebra e
    letI : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
    rw [Algebra.norm_eq_matrix_det b,
      Algebra.norm_eq_matrix_det (b.mapCoeffs e.symm (by 

Proof state:
R : Type u_1
S : Type u_2
T : Type u_3
inst✝¹⁴ : CommRing R
inst✝¹³ : Ring S
inst✝¹² : Algebra R S
K : Type u_4
L : Type u_5
F : Type u_6
inst✝¹¹ : Field K
inst✝¹⁰ : Field L
inst✝⁹ : Field F
inst✝⁸ : Algebra K L
inst✝⁷ : Algebra K F
ι : Type w
E : Type u_7
inst✝⁶ : Field E
inst✝⁵ : Algebra K E
A : Type u_8
B : Type u_9
C : Type u_10
inst✝⁴ : CommRing A
inst✝³ : CommRing B
inst✝² : Ring C
inst✝¹ : Algebra A C
inst✝ : Algebra B C
e : A ≃+* B
he : RingHom.comp (algebraMap B C) ↑e = algebraMap A C
x : C
s : Finset C
b : Basis { x // x ∈ s } B C
this✝ : Algebra A B := RingHom.toAlgebra ↑e
this : IsScalarTower A B C := IsScalarTower.of_algebraMap_eq' he.symm
⊢ ∀ (c : B) (x : C), (RingEquiv.symm e) c • x = c • x

Next tactic:
simp [Algebra.smul_def, ← he]