Theorem: Ideal.exists_comap_eq_of_mem_minimalPrimes_of_injective
File: Mathlib/RingTheory/Ideal/MinimalPrime.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
⊢ ∃ p', p'.IsPrime ∧ comap f p' = p
state_after: R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this : p.IsPrime
⊢ ∃ p', p'.IsPrime ∧ comap f p' = p
tactic: have := H.1.1
state_before: R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
⊢ ∃ p', p'.IsPrime ∧ comap f p' = p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ ∃ p', p'.IsPrime ∧ comap f p' = p
tactic: obtain ⟨M, hM⟩ := Ideal.exists_maximal (Localization (Submonoid.map f p.primeCompl))
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ ∃ p', p'.IsPrime ∧ comap f p' = p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap f (comap (algebraMap S (Localization (Submonoid.map f p.primeCompl))) M) = p
tactic: refine ⟨M.comap (algebraMap S <| Localization (Submonoid.map f p.primeCompl)), inferInstance, ?_⟩
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap f (comap (algebraMap S (Localization (Submonoid.map f p.primeCompl))) M) = p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M) =
    p
tactic: rw [Ideal.comap_comap, ← @IsLocalization.map_comp _ _ _ _ _ _ _ _ Localization.isLocalization
      _ _ _ _ p.primeCompl.le_comap_map _ Localization.isLocalization,
    ← Ideal.comap_comap]
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M) =
    p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M) ≤
    p
tactic: suffices _ ≤ p by exact this.antisymm (H.2 ⟨inferInstance, bot_le⟩ this)
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
⊢ comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M) ≤
    p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
⊢ x ∈ p
tactic: intro x hx
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
⊢ x ∈ p
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ False
tactic: by_contra h
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ False
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ M = ⊤
tactic: apply hM.ne_top
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ M = ⊤
state_after: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ IsUnit
    ((IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯)
      ((algebraMap R (Localization p.primeCompl)) x))
tactic: apply M.eq_top_of_isUnit_mem hx
state_before: case intro
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ IsUnit
    ((IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯)
      ((algebraMap R (Localization p.primeCompl)) x))
state_after: case intro.h
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ IsUnit ((algebraMap R (Localization p.primeCompl)) x)
tactic: apply IsUnit.map
state_before: case intro.h
R : Type u_1
S : Type u_2
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
I J : Ideal R
f : R →+* S
hf : Function.Injective ⇑f
p : Ideal R
H : p ∈ minimalPrimes R
this✝ : p.IsPrime
this : Nontrivial (Localization (Submonoid.map f p.primeCompl))
M : Ideal (Localization (Submonoid.map f p.primeCompl))
hM : M.IsMaximal
x : R
hx :
  x ∈
    comap (algebraMap R (Localization p.primeCompl))
      (comap (IsLocalization.map (Localization (Submonoid.map f p.primeCompl)) f ⋯) M)
h : x ∉ p
⊢ IsUnit ((algebraMap R (Localization p.primeCompl)) x)
state_after: no goals
tactic: apply IsLocalization.map_units _ (show p.primeCompl from ⟨x, h⟩)