Theorem: Ideal.Polynomial.comp_C_integral_of_surjective_of_jacobson
File: Mathlib/RingTheory/Jacobson.lean

tactic: haveI : f.ker.IsMaximal := RingHom.ker_isMaximal_of_surjective f hf
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
⊢ (f.comp C).IsIntegral
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
⊢ (f.comp C).IsIntegral

tactic: let g : R[X] ⧸ (RingHom.ker f) →+* S := Ideal.Quotient.lift (RingHom.ker f) f fun _ h => h
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
⊢ (f.comp C).IsIntegral
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
⊢ (f.comp C).IsIntegral

tactic: have hfg : g.comp (Quotient.mk (RingHom.ker f)) = f := ringHom_ext' rfl rfl
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
⊢ (f.comp C).IsIntegral
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ (f.comp C).IsIntegral

tactic: rw [← hfg, RingHom.comp_assoc]
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ (f.comp C).IsIntegral
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ (g.comp ((Quotient.mk (RingHom.ker f)).comp C)).IsIntegral

tactic: refine (quotient_mk_comp_C_isIntegral_of_jacobson (RingHom.ker f)).trans _ g
  (g.isIntegral_of_surjective ?_)
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ (g.comp ((Quotient.mk (RingHom.ker f)).comp C)).IsIntegral
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

tactic: rw [← hfg] at hf
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
hf : Function.Surjective ⇑f
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hf : Function.Surjective ⇑(g.comp (Quotient.mk (RingHom.ker f)))
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

tactic: norm_num at hf
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hf : Function.Surjective ⇑(g.comp (Quotient.mk (RingHom.ker f)))
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g
state_after: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hf : Function.Surjective (⇑g ∘ ⇑(Quotient.mk (RingHom.ker f)))
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g

tactic: exact Function.Surjective.of_comp hf
state_before: R : Type u_1
inst✝² : CommRing R
inst✝¹ : IsJacobson R
P : Ideal R[X]
hP : P.IsMaximal
S : Type u_2
inst✝ : Field S
f : R[X] →+* S
this : (RingHom.ker f).IsMaximal
g : R[X] ⧸ RingHom.ker f →+* S := Quotient.lift (RingHom.ker f) f ⋯
hf : Function.Surjective (⇑g ∘ ⇑(Quotient.mk (RingHom.ker f)))
hfg : g.comp (Quotient.mk (RingHom.ker f)) = f
⊢ Function.Surjective ⇑g
state_after: no goals