l3lab/ntp-mathlib huggingface dataset:
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
⊢ algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))

Next tactic:
ext r
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    

Proof state:
case a
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
r : R
⊢ (algebraMap R (T ⧸ P)) r =
    (RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))) r

Next tactic:
simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral (algebraMap R (T ⧸ P))

Next tactic:
rw [h_eq]
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  

Proof state:
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral
    (RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q'))))

Next tactic:
apply RingHom.IsIntegral.trans
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  

Proof state:
case hf
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
case hg
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w))

Next tactic:
apply RingHom.IsIntegral.trans
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · 

Proof state:
case hf.hf
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral (algebraMap R (S ⧸ Q'))

Next tactic:
apply IH
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · apply IH
    

Proof state:
case hf.hf.a
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ IsMaximal Q'

Next tactic:
apply Polynomial.isMaximal_comap_C_of_isJacobson'
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · apply IH
    apply Polynomial.isMaximal_comap_C_of_isJacobson'
    

Proof state:
case hf.hf.a.hP
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ IsMaximal Q

Next tactic:
exact hQ
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · apply IH
    apply Polynomial.isMaximal_comap_C_of_isJacobson'
    exact hQ
  · 

Proof state:
case hf.hg
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
⊢ RingHom.IsIntegral ↑w'

Next tactic:
suffices : w'.toRingHom = Ideal.quotientMap Q (Polynomial.C) le_rfl
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · apply IH
    apply Polynomial.isMaximal_comap_C_of_isJacobson'
    exact hQ
  · suffices : w'.toRingHom = Ideal.quotientMap Q (Polynomial.C) le_rfl
    · 

Proof state:
case hf.hg
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
this : ↑w' = quotientMap Q Polynomial.C (_ : comap Polynomial.C Q ≤ comap Polynomial.C Q)
⊢ RingHom.IsIntegral ↑w'

Next tactic:
rw [this]
private lemma aux_IH {R : Type u} {S : Type v} {T : Type w}
  [CommRing R] [CommRing S] [CommRing T] [IsJacobson S] [Algebra R S] [Algebra R T]
  (IH : ∀ (Q : Ideal S), (IsMaximal Q) → RingHom.IsIntegral (algebraMap R (S ⧸ Q)))
  (v : S[X] ≃ₐ[R] T) (P : Ideal T) (hP : P.IsMaximal) :
  RingHom.IsIntegral (algebraMap R (T ⧸ P)) := by
  let Q := P.comap v.toAlgHom.toRingHom
  have hw : Ideal.map v Q = P := map_comap_of_surjective v v.surjective P
  haveI hQ : IsMaximal Q := comap_isMaximal_of_surjective _ v.surjective
  let w : (S[X] ⧸ Q) ≃ₐ[R] (T ⧸ P) := Ideal.quotientEquivAlg Q P v hw.symm
  let Q' := Q.comap (Polynomial.C)
  let w' : (S ⧸ Q') →ₐ[R] (S[X] ⧸ Q) := Ideal.quotientMapₐ Q (Cₐ R S) le_rfl
  have h_eq : algebraMap R (T ⧸ P) =
    w.toRingEquiv.toRingHom.comp (w'.toRingHom.comp (algebraMap R (S ⧸ Q'))) := by
    ext r
    simp only [AlgEquiv.toAlgHom_eq_coe, AlgHom.toRingHom_eq_coe, AlgEquiv.toRingEquiv_eq_coe,
      RingEquiv.toRingHom_eq_coe, AlgHom.comp_algebraMap_of_tower, coe_comp, coe_coe,
      AlgEquiv.coe_ringEquiv, Function.comp_apply, AlgEquiv.commutes]
  rw [h_eq]
  apply RingHom.IsIntegral.trans
  apply RingHom.IsIntegral.trans
  · apply IH
    apply Polynomial.isMaximal_comap_C_of_isJacobson'
    exact hQ
  · suffices : w'.toRingHom = Ideal.quotientMap Q (Polynomial.C) le_rfl
    · rw [this]
      

Proof state:
case hf.hg
n : ℕ
R : Type u
S : Type v
T : Type w
inst✝⁵ : CommRing R
inst✝⁴ : CommRing S
inst✝³ : CommRing T
inst✝² : IsJacobson S
inst✝¹ : Algebra R S
inst✝ : Algebra R T
IH : ∀ (Q : Ideal S), IsMaximal Q → RingHom.IsIntegral (algebraMap R (S ⧸ Q))
v : S[X] ≃ₐ[R] T
P : Ideal T
hP : IsMaximal P
Q : Ideal S[X] := comap (↑↑v) P
hw : map v Q = P
hQ : IsMaximal Q
w : (S[X] ⧸ Q) ≃ₐ[R] T ⧸ P := quotientEquivAlg Q P v (_ : P = map v Q)
Q' : Ideal S := comap Polynomial.C Q
w' : S ⧸ Q' →ₐ[R] S[X] ⧸ Q := quotientMapₐ Q (Ideal.MvPolynomial.Cₐ R S) (_ : Q' ≤ Q')
h_eq :
  algebraMap R (T ⧸ P) =
    RingHom.comp (RingEquiv.toRingHom (AlgEquiv.toRingEquiv w)) (RingHom.comp (↑w') (algebraMap R (S ⧸ Q')))
this : ↑w' = quotientMap Q Polynomial.C (_ : comap Polynomial.C Q ≤ comap Polynomial.C Q)
⊢ RingHom.IsIntegral (quotientMap Q Polynomial.C (_ : comap Polynomial.C Q ≤ comap Polynomial.C Q))

Next tactic:
rw [isIntegral_quotientMap_iff _]