l3lab/ntp-mathlib huggingface dataset:
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 simp [Algebra.smul_def, ← he])),
      e.map_det]
    

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
⊢ det
      ((RingEquiv.mapMatrix e)
        ((leftMulMatrix
            (Basis.mapCoeffs b (RingEquiv.symm e) (_ : ∀ (a : B) (a_1 : C), (RingEquiv.symm e) a • a_1 = a • a_1)))
          x)) =
    det ((leftMulMatrix b) x)

Next tactic:
congr
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 simp [Algebra.smul_def, ← he])),
      e.map_det]
    congr
    

Proof state:
case pos.intro.intro.e_M
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
⊢ (RingEquiv.mapMatrix e)
      ((leftMulMatrix
          (Basis.mapCoeffs b (RingEquiv.symm e) (_ : ∀ (a : B) (a_1 : C), (RingEquiv.symm e) a • a_1 = a • a_1)))
        x) =
    (leftMulMatrix b) x

Next tactic:
ext i j
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 simp [Algebra.smul_def, ← he])),
      e.map_det]
    congr
    ext i j
    

Proof state:
case pos.intro.intro.e_M.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
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
i j : { x // x ∈ s }
⊢ (RingEquiv.mapMatrix e)
      ((leftMulMatrix
          (Basis.mapCoeffs b (RingEquiv.symm e) (_ : ∀ (a : B) (a_1 : C), (RingEquiv.symm e) a • a_1 = a • a_1)))
        x)
      i j =
    (leftMulMatrix b) x i j

Next tactic:
simp [leftMulMatrix_apply, LinearMap.toMatrix_apply]
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 simp [Algebra.smul_def, ← he])),
      e.map_det]
    congr
    ext i j
    simp [leftMulMatrix_apply, LinearMap.toMatrix_apply]
  

Proof state:
case neg
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:
rw [norm_eq_one_of_not_exists_basis _ h, norm_eq_one_of_not_exists_basis, _root_.map_one]
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 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]
  

Proof state:
case neg.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
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)
⊢ ¬∃ s, Nonempty (Basis { x // x ∈ s } A C)

Next tactic:
intro ⟨s, ⟨b⟩⟩
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 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⟩⟩
  

Proof state:
case neg.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
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)
s : Finset C
b : Basis { x // x ∈ s } A C
⊢ False

Next tactic:
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
  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 

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
h : ¬∃ s, Nonempty (Basis { x // x ∈ s } B C)
s : Finset C
b : Basis { x // x ∈ s } A C
⊢ ∀ (c : A) (x : C), e c • x = c • x

Next tactic:
simp [Algebra.smul_def, ← he]
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ 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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
⊢ (norm A₁) x = (RingEquiv.symm e₁) ((norm A₂) (e₂ x))

Next tactic:
letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  

Proof state:
case refine_2
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
this : Algebra A₁ B₂ := RingHom.toAlgebra' (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) ?refine_1
⊢ (norm A₁) x = (RingEquiv.symm e₁) ((norm A₂) (e₂ x))
case refine_1
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
⊢ ∀ (c : A₁) (x : B₂), (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x = x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c

Next tactic:
let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  

Proof state:
case refine_2
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
this : Algebra A₁ B₂ := RingHom.toAlgebra' (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) ?refine_1
e' : B₁ ≃ₐ[A₁] B₂ :=
  { toEquiv := e₂.toEquiv,
    map_mul' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x * y) = Equiv.toFun e₂.toEquiv x * Equiv.toFun e₂.toEquiv y),
    map_add' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x + y) = Equiv.toFun e₂.toEquiv x + Equiv.toFun e₂.toEquiv y),
    commutes' :=
      (_ : ∀ (x : A₁), Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x) = Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x)) }
⊢ (norm A₁) x = (RingEquiv.symm e₁) ((norm A₂) (e₂ x))
case refine_1
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
⊢ ∀ (c : A₁) (x : B₂), (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x = x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c

Next tactic:
rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
  

Proof state:
case refine_2
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
this : Algebra A₁ B₂ := RingHom.toAlgebra' (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) ?refine_1
e' : B₁ ≃ₐ[A₁] B₂ :=
  { toEquiv := e₂.toEquiv,
    map_mul' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x * y) = Equiv.toFun e₂.toEquiv x * Equiv.toFun e₂.toEquiv y),
    map_add' :=
      (_ : ∀ (x y : B₁), Equiv.toFun e₂.toEquiv (x + y) = Equiv.toFun e₂.toEquiv x + Equiv.toFun e₂.toEquiv y),
    commutes' :=
      (_ : ∀ (x : A₁), Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x) = Equiv.toFun e₂.toEquiv ((algebraMap A₁ B₁) x)) }
⊢ (norm A₁) (e' x) = (norm A₁) (e₂ x)
case refine_1
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
⊢ ∀ (c : A₁) (x : B₂), (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x = x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c

Next tactic:
rfl
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
  rfl
  

Proof state:
case refine_1
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x : B₁
⊢ ∀ (c : A₁) (x : B₂), (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x = x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c

Next tactic:
intros c x
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
  rfl
  intros c x
  

Proof state:
case refine_1
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
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x✝ : B₁
c : A₁
x : B₂
⊢ (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x = x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c

Next tactic:
apply e₂.symm.injective
lemma norm_eq_of_equiv_equiv {A₁ B₁ A₂ B₂ : Type*} [CommRing A₁] [Ring B₁]
    [CommRing A₂] [Ring B₂] [Algebra A₁ B₁] [Algebra A₂ B₂] (e₁ : A₁ ≃+* A₂) (e₂ : B₁ ≃+* B₂)
    (he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp ↑e₂ (algebraMap A₁ B₁)) (x) :
    Algebra.norm A₁ x = e₁.symm (Algebra.norm A₂ (e₂ x)) := by
  letI := (RingHom.comp (e₂ : B₁ →+* B₂) (algebraMap A₁ B₁)).toAlgebra' ?_
  let e' : B₁ ≃ₐ[A₁] B₂ := { e₂ with commutes' := fun _ ↦ rfl }
  rw [← Algebra.norm_eq_of_ringEquiv e₁ he, ← Algebra.norm_eq_of_algEquiv e',
    RingEquiv.symm_apply_apply]
  rfl
  intros c x
  apply e₂.symm.injective
  

Proof state:
case refine_1.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
A₁ : Type u_8
B₁ : Type u_9
A₂ : Type u_10
B₂ : Type u_11
inst✝⁵ : CommRing A₁
inst✝⁴ : Ring B₁
inst✝³ : CommRing A₂
inst✝² : Ring B₂
inst✝¹ : Algebra A₁ B₁
inst✝ : Algebra A₂ B₂
e₁ : A₁ ≃+* A₂
e₂ : B₁ ≃+* B₂
he : RingHom.comp (algebraMap A₂ B₂) ↑e₁ = RingHom.comp (↑e₂) (algebraMap A₁ B₁)
x✝ : B₁
c : A₁
x : B₂
⊢ (RingEquiv.symm e₂) ((RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c * x) =
    (RingEquiv.symm e₂) (x * (RingHom.comp (↑e₂) (algebraMap A₁ B₁)) c)

Next tactic:
simp only [RingHom.coe_comp, RingHom.coe_coe, Function.comp_apply, _root_.map_mul,
    RingEquiv.symm_apply_apply, commutes]
theorem norm_norm [Algebra L F] [IsScalarTower K L F] [IsSeparable K F] (x : F) :
    norm K (norm L x) = 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 L F
inst✝¹ : IsScalarTower K L F
inst✝ : IsSeparable K F
x : F
⊢ (norm K) ((norm L) x) = (norm K) x

Next tactic:
by_cases hKF : FiniteDimensional K F
theorem norm_norm [Algebra L F] [IsScalarTower K L F] [IsSeparable K F] (x : F) :
    norm K (norm L x) = norm K x := by
  by_cases hKF : FiniteDimensional K F
  · 

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
inst✝² : Algebra L F
inst✝¹ : IsScalarTower K L F
inst✝ : IsSeparable K F
x : F
hKF : FiniteDimensional K F
⊢ (norm K) ((norm L) x) = (norm K) x

Next tactic:
let A := AlgebraicClosure K