case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
obtain ⟨Q' : Ideal (S ⧸ I), ⟨Q'_prime, hQ'⟩⟩ :=
  @exists_ideal_over_prime_of_is_integral' (R ⧸ I.comap (algebraMap R S)) _ (S ⧸ I) _
    Ideal.quotientAlgebra _ (isIntegral_quotient_of_isIntegral H)
    (map (Ideal.Quotient.mk (I.comap (algebraMap R S))) P)
    (map_isPrime_of_surjective Quotient.mk_surjective (by simp [hIP]))
    (le_trans (le_of_eq ((RingHom.injective_iff_ker_eq_bot _).1 algebraMap_quotient_injective))
      bot_le)
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
haveI := Q'_prime
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (algebraMap R S) (comap (Quotient.mk I) Q') = P
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ ∃ Q, Q ≥ I ∧ IsPrime Q ∧ comap (algebraMap R S) Q = P
refine' ⟨Q'.comap _, le_trans (le_of_eq mk_ker.symm) (ker_le_comap _), ⟨comap_isPrime _ Q', _⟩⟩
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' = P
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (algebraMap R S) (comap (Quotient.mk I) Q') = P
rw [comap_comap]
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (Quotient.mk (comap (algebraMap R S) I)) (comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q')

case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) (map (Quotient.mk (comap (algebraMap R S) I)) P) = P
case intro.intro
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' = P
refine' _root_.trans _ (_root_.trans (congr_arg (comap (Ideal.Quotient.mk
  (comap (algebraMap R S) I))) hQ') _)
no goals
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
⊢ RingHom.ker (Quotient.mk (comap (algebraMap R S) I)) ≤ P
simp [hIP]
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (RingHom.comp (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) (Quotient.mk (comap (algebraMap R S) I))) Q'
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (Quotient.mk (comap (algebraMap R S) I)) (comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q')
rw [comap_comap]
no goals
case intro.intro.refine'_1
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (RingHom.comp (Quotient.mk I) (algebraMap R S)) Q' =
    comap (RingHom.comp (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) (Quotient.mk (comap (algebraMap R S) I))) Q'
exact congr_arg (comap . Q') (RingHom.ext fun r => rfl)
case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) ⊥ ≤ P
case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) (map (Quotient.mk (comap (algebraMap R S) I)) P) = P
refine' _root_.trans (comap_map_of_surjective _ Quotient.mk_surjective _) (sup_eq_left.2 _)
no goals
case intro.intro.refine'_2
R : Type u_1
inst✝⁴ : CommRing R
S : Type u_2
inst✝³ : CommRing S
f : R →+* S
I✝ J : Ideal S
inst✝² : Algebra R S
H : Algebra.IsIntegral R S
P : Ideal R
inst✝¹ : IsPrime P
I : Ideal S
inst✝ : IsPrime I
hIP : comap (algebraMap R S) I ≤ P
Q' : Ideal (S ⧸ I)
Q'_prime : IsPrime Q'
hQ' : comap (algebraMap (R ⧸ comap (algebraMap R S) I) (S ⧸ I)) Q' = map (Quotient.mk (comap (algebraMap R S) I)) P
this : IsPrime Q'
⊢ comap (Quotient.mk (comap (algebraMap R S) I)) ⊥ ≤ P
simpa [← RingHom.ker_eq_comap_bot] using hIP