-- Mathlib/AlgebraicGeometry/Noetherian.lean
theorem isNoetherianRing_of_away : IsNoetherianRing R

Proof state:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
⊢ ∀ (f : ℕ →o Submodule R R), ∃ n, ∀ (m : ℕ), n ≤ m → f n = f m

Tactic:
intro I

Result:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → I n = I m

Proof state:
case h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN✝ : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
hN : ∀ (s : { x // x ∈ S }), minN ↑s ≤ N
⊢ ∀ (m : ℕ), N ≤ m → I N = I m

Tactic:
intro n hn

Result:
case h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN✝ : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
hN : ∀ (s : { x // x ∈ S }), minN ↑s ≤ N
n : ℕ
hn : N ≤ n
⊢ I N = I n

Proof state:
case h.h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN✝ : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
hN : ∀ (s : { x // x ∈ S }), minN ↑s ≤ N
n : ℕ
hn : N ≤ n
⊢ ∀ (i : Subtype (Membership.mem S)),
    Ideal.comap (algebraMap R (Localization.Away ↑i)) (Ideal.map (algebraMap R (Localization.Away ↑i)) (I N)) =
      Ideal.comap (algebraMap R (Localization.Away ↑i)) (Ideal.map (algebraMap R (Localization.Away ↑i)) (I n))

Tactic:
intro s

Result:
case h.h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN✝ : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
hN : ∀ (s : { x // x ∈ S }), minN ↑s ≤ N
n : ℕ
hn : N ≤ n
s : Subtype (Membership.mem S)
⊢ Ideal.comap (algebraMap R (Localization.Away ↑s)) (Ideal.map (algebraMap R (Localization.Away ↑s)) (I N)) =
    Ideal.comap (algebraMap R (Localization.Away ↑s)) (Ideal.map (algebraMap R (Localization.Away ↑s)) (I n))

Proof state:
case h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
s : { x // x ∈ S }
⊢ (suitableN ↑s).Nonempty

Tactic:
let f : ℕ →o Ideal (Away (M := R) s) :=
  ⟨fun n ↦ Ideal.map (floc s) (I n), fun _ _ h ↦ Ideal.map_mono (I.monotone h)⟩

Result:
case h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
s : { x // x ∈ S }
f : ℕ →o Ideal (Localization.Away ↑s) := { toFun := fun n => Ideal.map (floc ↑s) (I n), monotone' := ⋯ }
⊢ (suitableN ↑s).Nonempty

Proof state:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → I n = I m

Tactic:
use N

Result:
case h
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
⊢ ∀ (m : ℕ), N ≤ m → I N = I m

Proof state:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → I n = I m

Tactic:
let minN s := sInf (suitableN s)

Result:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
⊢ ∃ n, ∀ (m : ℕ), n ≤ m → I n = I m

Proof state:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
⊢ IsNoetherianRing R

Tactic:
apply monotone_stabilizes_iff_noetherian.mp

Result:
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
⊢ ∀ (f : ℕ →o Submodule R R), ∃ n, ∀ (m : ℕ), n ≤ m → f n = f m

Proof state:
case h.h.e_I
R : Type u
inst✝ : CommRing R
S : Finset R
hS : Ideal.span ↑S = ⊤
hN✝ : ∀ (s : { x // x ∈ S }), IsNoetherianRing (Localization.Away ↑s)
I : ℕ →o Submodule R R
floc : (s : R) → R →+* Localization.Away s := fun s => algebraMap R (Localization.Away s)
suitableN : R → Set ℕ := fun s => {n | ∀ (m : ℕ), n ≤ m → Ideal.map (floc s) (I n) = Ideal.map (floc s) (I m)}
minN : R → ℕ := fun s => sInf (suitableN s)
hSuit : ∀ (s : { x // x ∈ S }), minN ↑s ∈ suitableN ↑s
N : ℕ := S.sup minN
hN : ∀ (s : { x // x ∈ S }), minN ↑s ≤ N
n : ℕ
hn : N ≤ n
s : Subtype (Membership.mem S)
⊢ Ideal.map (floc ↑s) (I (minN ↑s)) = Ideal.map (algebraMap R (Localization.Away ↑s)) (I n)

Tactic:
exact hSuit s n <| Nat.le_trans (hN s) hn

Result:
no goals