Module

FormalNeighborhoods.lean

Nyll.SchemeTheory.LocalGeometry.FormalNeighborhoods
40 declarations indexed from sourceView source ↗

Formal neighborhoods, rigidity and generic flatness

Imports16
  • Mathlib.AlgebraicGeometry.Morphisms.Separated
  • Mathlib.AlgebraicGeometry.Morphisms.UniversallyInjective
  • Mathlib.AlgebraicGeometry.Morphisms.Flat
  • Mathlib.AlgebraicGeometry.Morphisms.SchemeTheoreticallyDominant
  • Mathlib.AlgebraicGeometry.Noetherian
  • Mathlib.AlgebraicGeometry.PullbackCarrier
  • Mathlib.AlgebraicGeometry.ResidueField
  • Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup.Basic
  • Mathlib.LinearAlgebra.TensorProduct.RightExactness
  • Mathlib.RingTheory.Filtration
  • Mathlib.RingTheory.Localization.AtPrime.Basic
  • Mathlib.Topology.NoetherianSpace
  • Mathlib.Tactic.Choose
  • Mathlib.Tactic.Push
  • Nyll.SchemeTheory.BaseChange.AffineGlobalSections
  • Nyll.SchemeTheory.RingTheory.Flat.GenericFlatness
Imported by4

Declarations

AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.res

Restrict a global function to an open.

Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Vanishing
variable {G : Scheme.{u}}
abbrev res (U : G.Opens) (e : Γ(G, ⊤)) : Γ(G, U)
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.app_res
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Vanishing
variable {G : Scheme.{u}}
theorem app_res {T : Scheme.{u}} (x : T ⟶ G) (U : G.Opens) (e : Γ(G, ⊤)) :
    x.app U (res U e) = T.presheaf.map (homOfLE le_top).op (x.appTop e)
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.eq_zero_of_forall_res_eq_zero
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Vanishing
variable {G : Scheme.{u}}
theorem eq_zero_of_forall_res_eq_zero {T : Scheme.{u}} (x : T ⟶ G) {ι : Type*} (U : ι → G.Opens)
    (hU : ∀ g : G, ∃ i, g ∈ U i) (s : Γ(T, ⊤))
    (hs : ∀ i, T.presheaf.map (homOfLE (le_top : x ⁻¹ᵁ U i ≤ ⊤)).op s = 0) : s = 0
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.Kills

Vanishing of the selected family along a morphism.

Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
def Kills {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (n : ℕ) {T : Scheme.{u}} (x : T ⟶ G) : Prop
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.J

Ideal generated by all equations through a finite stage.

Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
def J {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (U : G.Opens) (n : ℕ) : Ideal Γ(G, U)
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.J_mono
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
theorem J_mono {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (U : G.Opens) : Monotone (J e U)
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.res_mem_J
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
theorem res_mem_J {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (U : G.Opens) {m n : ℕ} (h : m ≤ n)
    (a : A m) : res U (e m a) ∈ J e U n
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.exists_J_stable
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
theorem exists_J_stable {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (U : G.Opens)
    [IsNoetherianRing Γ(G, U)] : ∃ N, ∀ n, N ≤ n → J e U N = J e U n
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.J_le_ker
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
theorem J_le_ker {A : ℕ → Type*} (e : ∀ n, A n → Γ(G, ⊤)) (U : G.Opens) (n : ℕ)
    {T : Scheme.{u}} (x : T ⟶ G) (hx : ∀ m ≤ n, Kills e m x) :
    J e U n ≤ RingHom.ker (x.app U).hom
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.exists_forall_kills_of_isNoetherian
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Stabilization
variable {G : Scheme.{u}}
theorem exists_forall_kills_of_isNoetherian [IsNoetherian G] {A : ℕ → Type*}
    (e : ∀ n, A n → Γ(G, ⊤)) :
    ∃ N : ℕ, ∀ {T : Scheme.{u}} (x : T ⟶ G), (∀ n ≤ N, Kills e n x) → ∀ n, Kills e n x
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.eqns

Matrix entries defining the identity locus.

Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Matrix
variable {G : Scheme.{u}}
def eqns (d : ℕ → ℕ) (ρ : ∀ (n : ℕ) {T : Scheme.{u}}, (T ⟶ G) → GL (Fin (d n)) Γ(T, ⊤)) (n : ℕ)
    (ij : Fin (d n) × Fin (d n)) : Γ(G, ⊤)
AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization.eq_one_iff_kills
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.KernelStabilization
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace KernelTowerStabilization
open _root_.AlgebraicGeometry
section Matrix
variable {G : Scheme.{u}}
theorem eq_one_iff_kills (d : ℕ → ℕ)
    (ρ : ∀ (n : ℕ) {T : Scheme.{u}}, (T ⟶ G) → GL (Fin (d n)) Γ(T, ⊤))
    (hρ : ∀ (n : ℕ) {T T' : Scheme.{u}} (ψ : T' ⟶ T) (x : T ⟶ G),
      ρ n (ψ ≫ x) = Matrix.GeneralLinearGroup.map ψ.appTop.hom (ρ n x))
    (n : ℕ) {T : Scheme.{u}} (x : T ⟶ G) :
    ρ n x = 1 ↔ Kills (eqns d ρ) n x
AlgebraicGeometry.exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
open CategoryTheory CategoryTheory.Limits TopologicalSpace Opposite
open AbelianVarieties.NOSProofs.KernelStabilization.AlgebraicGeometry.KernelTowerStabilization
namespace AlgebraicGeometry
universe u
theorem exists_forall_generalLinearGroup_eq_one_of_forall_le_of_isNoetherian
    {G : Scheme.{u}} [IsNoetherian G] (d : ℕ → ℕ)
    (ρ : ∀ (n : ℕ) {T : Scheme.{u}}, (T ⟶ G) → GL (Fin (d n)) Γ(T, ⊤))
    (hρ : ∀ (n : ℕ) {T T' : Scheme.{u}} (ψ : T' ⟶ T) (x : T ⟶ G),
      ρ n (ψ ≫ x) = Matrix.GeneralLinearGroup.map ψ.appTop.hom (ρ n x)) :
    ∃ N : ℕ, ∀ {T : Scheme.{u}} (x : T ⟶ G), (∀ n ≤ N, ρ n x = 1) → ∀ n, ρ n x = 1
AbelianVarieties.NOSProofs.InfinitesimalSections.AlgebraicGeometry.InfinitesimallyConstantH1.fst_injective_of_section
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimallyConstantH1
open _root_.AlgebraicGeometry
section OnePoint
variable {k : Type u} [Field k]
theorem fst_injective_of_section {X S : Scheme.{u}} (x : X ⟶ Spec (CommRingCat.of k))
    (s : S ⟶ Spec (CommRingCat.of k)) (σ : Spec (CommRingCat.of k) ⟶ S) (hσ : σ ≫ s = 𝟙 _)
    [Subsingleton ↥S] : Function.Injective (pullback.fst x s)
AbelianVarieties.NOSProofs.InfinitesimalSections.AlgebraicGeometry.InfinitesimallyConstantH1.subsingleton_primeSpectrum_quotient
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimallyConstantH1
open _root_.AlgebraicGeometry
section OnePoint
variable {k : Type u} [Field k]
theorem subsingleton_primeSpectrum_quotient (O : Type u) [CommRing O] [IsLocalRing O] (n : ℕ) :
    Subsingleton (PrimeSpectrum (O ⧸ IsLocalRing.maximalIdeal O ^ n))
AbelianVarieties.NOSProofs.InfinitesimalSections.AlgebraicGeometry.InfinitesimallyConstantH1.map_map_pow_eq_bot
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimallyConstantH1
open _root_.AlgebraicGeometry
section OnePoint
variable {k : Type u} [Field k]
theorem map_map_pow_eq_bot {A B C : Type*} [CommRing A] [CommRing B] [CommRing C]
    {F G : Type*} [FunLike F A B] [RingHomClass F A B] [FunLike G B C] [RingHomClass G B C]
    (f : F) (g : G) (I : Ideal A) (n : ℕ) (hI : I ^ n = ⊥) :
    ((I.map f).map g) ^ n = ⊥
AbelianVarieties.NOSProofs.InfinitesimalSections.AlgebraicGeometry.InfinitesimallyConstantH1.section_kernel_pow_eq_bot
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimallyConstantH1
open _root_.AlgebraicGeometry
section Main
variable {k : Type u} [Field k]
theorem section_kernel_pow_eq_bot {A : Type u} [CommRing A] [Algebra k A]
    (n : ℕ) (q : A →ₐ[k] k) (hq : Function.Surjective q)
    (hker : RingHom.ker q.toRingHom ^ n = ⊥)
    {Y : Scheme.{u}} (y : Y ⟶ Spec (CommRingCat.of k))
    [CompactSpace ↥Y] [QuasiSeparatedSpace ↥Y]
    (ι : Y ⟶ pullback y (Spec.map (CommRingCat.ofHom (algebraMap k A))))
    (hι₁ : ι ≫ pullback.fst y (Spec.map (CommRingCat.ofHom (algebraMap k A))) = 𝟙 Y)
    (hι₂ : ι ≫ pullback.snd y (Spec.map (CommRingCat.ofHom (algebraMap k A))) =
      y ≫ Spec.map (CommRingCat.ofHom q.toRingHom)) :
    RingHom.ker ι.appTop.hom ^ n = ⊥
AbelianVarieties.NOSProofs.InfinitesimalSections.AlgebraicGeometry.InfinitesimallyConstantH1.main
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimallyConstantH1
open _root_.AlgebraicGeometry
section Main
variable {k : Type u} [Field k]
theorem main {P : Scheme.{u}} (p : P ⟶ Spec (CommRingCat.of k))
    (P₀ : Spec (CommRingCat.of k) ⟶ P) (hP₀ : P₀ ≫ p = 𝟙 _) (n : ℕ)
    (y₀ : ↥P) (hy₀ : P₀.base (show Spec (CommRingCat.of k) from IsLocalRing.closedPoint k) = y₀)
    (jn : Spec (CommRingCat.of (P.presheaf.stalk y₀ ⧸
        IsLocalRing.maximalIdeal (P.presheaf.stalk y₀) ^ n)) ⟶ P)
    (hjn : jn = Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
        (IsLocalRing.maximalIdeal (P.presheaf.stalk y₀) ^ n))) ≫ P.fromSpecStalk y₀)
    (g : Spec (CommRingCat.of (P.presheaf.stalk y₀ ⧸
        IsLocalRing.maximalIdeal (P.presheaf.stalk y₀) ^ n)) ⟶ Spec (CommRingCat.of k))
    (hg : jn ≫ p = g)
    (σ : Spec (CommRingCat.of k) ⟶
      Spec (CommRingCat.of (P.presheaf.stalk y₀ ⧸ IsLocalRing.maximalIdeal (P.presheaf.stalk y₀) ^
          n)))
    (hσ : σ ≫ jn = P₀)
    {Y : Scheme.{u}} (y : Y ⟶ Spec (CommRingCat.of k)) [CompactSpace ↥Y] [QuasiSeparatedSpace ↥Y]
    (ι : Y ⟶ pullback y g) (hι₁ : ι ≫ pullback.fst y g = 𝟙 Y) (hι₂ : ι ≫ pullback.snd y g = y ≫ σ)
    (α : pullback y g ⟶ P) (hα : ι ≫ α = y ≫ P₀) :
    ∃ β : pullback y g ⟶
        Spec (CommRingCat.of (P.presheaf.stalk y₀ ⧸ IsLocalRing.maximalIdeal (P.presheaf.stalk y₀)
            ^ n)),
      β ≫ jn = α := by
  obtain ⟨φ₀, rfl⟩ := Spec.map_surjective g
  obtain ⟨qσ, rfl⟩ := Spec.map_surjective σ
  let O : CommRingCat.{u} := P.presheaf.stalk y₀
  let A : Type u := O ⧸ IsLocalRing.maximalIdeal O ^ n
  let algA : Algebra k A := φ₀.hom.toAlgebra
  have hσg : Spec.map qσ ≫ Spec.map φ₀ = 𝟙 _ := by
    rw [← hg, ← Category.assoc, hσ, hP₀]
  have hφq : φ₀ ≫ qσ = 𝟙 _ := by
    apply Spec.map_injective
    rw [Spec.map_comp, Spec.map_id, hσg]
  have hφq' : ∀ c : k, qσ.hom (φ₀.hom c) = c := fun c => by
    change (φ₀ ≫ qσ).hom c = c
    rw [hφq]; rfl
  have hqsurj : Function.Surjective qσ.hom := fun c => ⟨φ₀.hom c, hφq' c⟩
  have hkerq : RingHom.ker qσ.hom ^ n = ⊥ := by
    have hprime : (RingHom.ker qσ.hom).IsPrime := RingHom.ker_isPrime _
    have hcomap : ((RingHom.ker qσ.hom).comap (Ideal.Quotient.mk _)) = IsLocalRing.maximalIdeal O
        := by
      have : ((RingHom.ker qσ.hom).comap
          (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n))).IsPrime := Ideal.IsPrime.comap _
      have hle : IsLocalRing.maximalIdeal O ≤ (RingHom.ker qσ.hom).comap (Ideal.Quotient.mk _) := by
        intro a ha
        have han : a ^ n ∈ (RingHom.ker qσ.hom).comap
            (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n)) := by
          rw [Ideal.mem_comap, Ideal.Quotient.eq_zero_iff_mem.mpr (Ideal.pow_mem_pow ha n)]
          exact Ideal.zero_mem _
        exact Ideal.IsPrime.mem_of_pow_mem inferInstance n han
      exact ((IsLocalRing.maximalIdeal.isMaximal O).eq_of_le
        (Ideal.IsPrime.ne_top inferInstance) hle).symm
    have hle : RingHom.ker qσ.hom ≤ (IsLocalRing.maximalIdeal O).map (Ideal.Quotient.mk _) := by
      rw [← Ideal.map_comap_of_surjective (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n))
        Ideal.Quotient.mk_surjective (RingHom.ker qσ.hom), hcomap]
    apply le_bot_iff.mp
    calc RingHom.ker qσ.hom ^ n ≤ ((IsLocalRing.maximalIdeal O).map (Ideal.Quotient.mk _)) ^ n :=
          Ideal.pow_right_mono hle n
      _ = ⊥ := by rw [← Ideal.map_pow, Ideal.map_quotient_self]
  have : Subsingleton ↥(Spec (CommRingCat.of A)) := subsingleton_primeSpectrum_quotient O n
  have hfst : Function.Injective (pullback.fst y (Spec.map φ₀)) :=
    fst_injective_of_section y (Spec.map φ₀) (Spec.map qσ) hσg
  have hιsurj : ∀ z : ↥(pullback y (Spec.map φ₀)), ι (pullback.fst y (Spec.map φ₀) z) = z := by
    intro z
    apply hfst
    rw [← Scheme.Hom.comp_apply, hι₁]
    rfl
  obtain ⟨_, ⟨U, hU, rfl⟩, hyU, -⟩ :=
    P.isBasis_affineOpens.exists_subset_of_mem_open (Set.mem_univ y₀) isOpen_univ
  have hU : IsAffineOpen U := hU
  have hαU : Set.range α ⊆ (U : Set ↥P) := by
    rintro _ ⟨z, rfl⟩
    rw [← hιsurj z, ← Scheme.Hom.comp_apply, hα, Scheme.Hom.comp_apply]
    have : P₀ (y (pullback.fst y (Spec.map φ₀) z)) = y₀ := by
      rw [show y (pullback.fst y (Spec.map φ₀) z) = IsLocalRing.closedPoint k from
        Subsingleton.elim _ _]
      exact hy₀
    rw [this]; exact hyU
  set R : CommRingCat.{u} := Γ(P, U) with hR
  let αR : pullback y (Spec.map φ₀) ⟶ Spec R :=
    IsOpenImmersion.lift hU.fromSpec α (by rw [hU.range_fromSpec]; exact hαU)
  have hαR : αR ≫ hU.fromSpec = α := IsOpenImmersion.lift_fac _ _ _
  let P₀R : Spec (CommRingCat.of k) ⟶ Spec R :=
    IsOpenImmersion.lift hU.fromSpec P₀ (by
      rw [hU.range_fromSpec]
      rintro _ ⟨z, rfl⟩
      rw [Subsingleton.elim z (show Spec (CommRingCat.of k) from IsLocalRing.closedPoint k)]
      change P₀.base (show Spec (CommRingCat.of k) from IsLocalRing.closedPoint k) ∈ (U : Set ↥P)
      rw [hy₀]; exact hyU)
  have hP₀R : P₀R ≫ hU.fromSpec = P₀ := IsOpenImmersion.lift_fac _ _ _
  obtain ⟨ψ, hψ⟩ := Spec.map_surjective P₀R
  obtain ⟨ψk, hψk⟩ := Spec.map_surjective (hU.fromSpec ≫ p)
  have hψψk : ψk ≫ ψ = 𝟙 _ := by
    apply Spec.map_injective
    rw [Spec.map_comp, Spec.map_id, hψ, hψk, ← Category.assoc, hP₀R, hP₀]
  have hψsurj : Function.Surjective ψ.hom := fun c => ⟨ψk.hom c, by
    change (ψk ≫ ψ).hom c = c; rw [hψψk]; rfl⟩
  have hια : ι ≫ αR = y ≫ P₀R := by
    rw [← cancel_mono hU.fromSpec, Category.assoc, hαR, hα, Category.assoc, hP₀R]
  set 𝔭 : Ideal R := (hU.primeIdealOf ⟨y₀, hyU⟩).asIdeal with h𝔭
  have h𝔭pt : hU.primeIdealOf ⟨y₀, hyU⟩ = P₀R (show Spec (CommRingCat.of k) from
      IsLocalRing.closedPoint k) := by
    apply hU.fromSpec.injective
    rw [hU.fromSpec_primeIdealOf, ← Scheme.Hom.comp_apply, hP₀R]
    exact hy₀.symm
  have h𝔭ker : 𝔭 = RingHom.ker ψ.hom := by
    rw [h𝔭, h𝔭pt, ← hψ]
    ext r
    change r ∈ ((Spec.map ψ).base (show Spec (CommRingCat.of k) from IsLocalRing.closedPoint
        k)).asIdeal ↔ _
    rw [Spec.map_base]
    change r ∈ (PrimeSpectrum.comap ψ.hom (show Spec (CommRingCat.of k) from
        IsLocalRing.closedPoint k)).asIdeal ↔ _
    rw [PrimeSpectrum.comap_asIdeal, Ideal.mem_comap, RingHom.mem_ker]
    change ψ.hom r ∈ IsLocalRing.maximalIdeal k ↔ _
    rw [IsLocalRing.mem_maximalIdeal, mem_nonunits_iff, isUnit_iff_ne_zero, not_not]
  have h𝔭max : 𝔭.IsMaximal := by
    rw [h𝔭ker]; exact RingHom.ker_isMaximal_of_surjective ψ.hom hψsurj
  let algRO : Algebra R O := (P.presheaf.germ U y₀ hyU).hom.toAlgebra
  have : IsLocalization.AtPrime O 𝔭 := hU.isLocalization_stalk ⟨y₀, hyU⟩
  let qσₐ : A →ₐ[k] k := { qσ.hom with commutes' := fun c => hφq' c }
  have hK : RingHom.ker ι.appTop.hom ^ n = ⊥ :=
    section_kernel_pow_eq_bot n qσₐ hqsurj hkerq y ι hι₁ hι₂
  have hval : ∀ r : R, ι.appTop.hom (αR.appTop.hom ((Scheme.ΓSpecIso R).inv.hom r)) =
      y.appTop.hom ((Scheme.ΓSpecIso (CommRingCat.of k)).inv.hom (ψ.hom r)) := by
    intro r
    have h1 : αR.appTop ≫ ι.appTop = P₀R.appTop ≫ y.appTop := by
      rw [← Scheme.Hom.comp_appTop, ← Scheme.Hom.comp_appTop, hια]
    have h2 : (Scheme.ΓSpecIso R).inv ≫ P₀R.appTop = ψ ≫ (Scheme.ΓSpecIso (CommRingCat.of k)).inv
        := by
      rw [← hψ, Scheme.ΓSpecIso_inv_naturality]
    have h3 : ∀ s, ι.appTop.hom (αR.appTop.hom s) = y.appTop.hom (P₀R.appTop.hom s) := by
      intro s
      change (αR.appTop ≫ ι.appTop).hom s = (P₀R.appTop ≫ y.appTop).hom s
      rw [h1]
    have h4 : P₀R.appTop.hom ((Scheme.ΓSpecIso R).inv.hom r) =
        (Scheme.ΓSpecIso (CommRingCat.of k)).inv.hom (ψ.hom r) := by
      change ((Scheme.ΓSpecIso R).inv ≫ P₀R.appTop).hom r =
        (ψ ≫ (Scheme.ΓSpecIso (CommRingCat.of k)).inv).hom r
      rw [h2]
    rw [h3, h4]
  have hI : 𝔭 ^ n ≤ RingHom.ker ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom := by
    have h1 : 𝔭 ≤ (RingHom.ker ι.appTop.hom).comap ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom := by
      intro r hr
      rw [h𝔭ker, RingHom.mem_ker] at hr
      have h := hval r
      have h0 : y.appTop.hom ((Scheme.ΓSpecIso (CommRingCat.of k)).inv.hom (ψ.hom r)) = 0 := by
        rw [hr, RingHom.map_zero, RingHom.map_zero]
      exact h.trans h0
    calc 𝔭 ^ n ≤ ((RingHom.ker ι.appTop.hom).comap ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom) ^ n :=
          Ideal.pow_right_mono h1 n
      _ ≤ (RingHom.ker ι.appTop.hom ^ n).comap ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom :=
          Ideal.le_comap_pow _ n
      _ = RingHom.ker ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom := by
          exact congrArg (Ideal.comap ((Scheme.ΓSpecIso R).inv ≫ αR.appTop).hom) hK
  let e' : (R ⧸ 𝔭 ^ n) ≃ₐ[R] A := IsLocalization.AtPrime.equivQuotMaximalIdealPow 𝔭 O n
  let β : pullback y (Spec.map φ₀) ⟶ Spec (CommRingCat.of A) :=
    αR.liftQuotient (𝔭 ^ n) hI ≫ Spec.map (CommRingCat.ofHom e'.symm.toRingHom)
  refine ⟨β, ?_⟩
  have hring : P.presheaf.germ U y₀ hyU ≫ CommRingCat.ofHom (Ideal.Quotient.mk
      (IsLocalRing.maximalIdeal O ^ n)) ≫ CommRingCat.ofHom e'.symm.toRingHom =
      CommRingCat.ofHom (Ideal.Quotient.mk (𝔭 ^ n)) := by
    ext r
    change e'.symm (Ideal.Quotient.mk _ (algebraMap R O r)) = Ideal.Quotient.mk _ r
    rw [← IsLocalization.AtPrime.equivQuotMaximalIdealPow_apply_mk 𝔭 O n r]
    exact e'.symm_apply_apply _
  have hjn' : jn = Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
      (IsLocalRing.maximalIdeal O ^ n))) ≫ Spec.map (P.presheaf.germ U y₀ hyU) ≫ hU.fromSpec := by
    rw [hjn, ← hU.fromSpecStalk_eq_fromSpecStalk hyU]
    rfl
  have hSpec : Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk (𝔭 ^ n))) =
      Spec.map (CommRingCat.ofHom e'.symm.toRingHom) ≫
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n))) ≫
          Spec.map (P.presheaf.germ U y₀ hyU) := by
    rw [← hring]
    exact (Spec.map_comp _ _).trans
      ((congrArg (fun z => z ≫ Spec.map (P.presheaf.germ U y₀ hyU))
        (Spec.map_comp
          (CommRingCat.ofHom (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n)) :
            O ⟶ CommRingCat.of A)
          (CommRingCat.ofHom e'.symm.toRingHom))).trans (Category.assoc _ _ _))
  calc β ≫ jn
      = αR.liftQuotient (𝔭 ^ n) hI ≫ (Spec.map (CommRingCat.ofHom e'.symm.toRingHom) ≫
          Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk (IsLocalRing.maximalIdeal O ^ n))) ≫
          Spec.map (P.presheaf.germ U y₀ hyU)) ≫ hU.fromSpec := by
        rw [hjn']; simp only [β, Category.assoc]
    _ = αR.liftQuotient (𝔭 ^ n) hI ≫ Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk (𝔭 ^ n))) ≫
          hU.fromSpec := by
        rw [← hSpec]
    _ = αR ≫ hU.fromSpec := by rw [← Category.assoc, Scheme.Hom.liftQuotient_comp]
    _ = α := hαR
AlgebraicGeometry.exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq
Source context 9 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.InfinitesimalSections
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TensorProduct
open Topology
universe u
theorem _root_.AlgebraicGeometry.exists_comp_specMap_quotient_maximalIdeal_pow_eq_of_section_comp_eq
    {k : Type u} [Field k] {P : Scheme.{u}} (p : P ⟶ Spec (CommRingCat.of k))
    (P₀ : Spec (CommRingCat.of k) ⟶ P) (hP₀ : P₀ ≫ p = 𝟙 _) (n : ℕ)
    (jn : Spec (CommRingCat.of (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
        IsLocalRing.closedPoint k)) ⧸
        IsLocalRing.maximalIdeal (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
            IsLocalRing.closedPoint k))) ^ n)) ⟶ P)
    (hjn : jn = Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
      (IsLocalRing.maximalIdeal (P.presheaf.stalk
        (P₀.base (show Spec (CommRingCat.of k) from IsLocalRing.closedPoint k))) ^ n))) ≫
      P.fromSpecStalk _)
    (g : Spec (CommRingCat.of (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
        IsLocalRing.closedPoint k)) ⧸
        IsLocalRing.maximalIdeal (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
            IsLocalRing.closedPoint k))) ^ n)) ⟶
        Spec (CommRingCat.of k))
    (hg : jn ≫ p = g)
    (σ : Spec (CommRingCat.of k) ⟶
      Spec (CommRingCat.of (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
          IsLocalRing.closedPoint k)) ⧸
        IsLocalRing.maximalIdeal (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
            IsLocalRing.closedPoint k))) ^ n)))
    (hσ : σ ≫ jn = P₀)
    {Y : Scheme.{u}} (y : Y ⟶ Spec (CommRingCat.of k)) [CompactSpace ↥Y] [QuasiSeparatedSpace ↥Y]
    (ι : Y ⟶ pullback y g) (hι₁ : ι ≫ pullback.fst y g = 𝟙 Y)
    (hι₂ : ι ≫ pullback.snd y g = y ≫ σ)
    (α : pullback y g ⟶ P) (hα : ι ≫ α = y ≫ P₀) :
    ∃ β : pullback y g ⟶
        Spec (CommRingCat.of (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
            IsLocalRing.closedPoint k)) ⧸
          IsLocalRing.maximalIdeal (P.presheaf.stalk (P₀.base (show Spec (CommRingCat.of k) from
              IsLocalRing.closedPoint k))) ^ n)),
      β ≫ jn = α :=
  AlgebraicGeometry.InfinitesimallyConstantH1.main p P₀ hP₀ n _ rfl jn hjn g hg σ hσ y ι hι₁ hι₂ α
      hα
AbelianVarieties.NOSProofs.LocalRigidity.AlgebraicGeometry.InfinitesimalRigidity.ringHom_ext_of_forall_quotient_pow
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.LocalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidity
open _root_.AlgebraicGeometry
theorem ringHom_ext_of_forall_quotient_pow {A B : Type*} [CommRing A] [CommRing B]
    [IsNoetherianRing A] [IsLocalRing A] (φ ψ : B →+* A)
    (h : ∀ n : ℕ, (Ideal.Quotient.mk (IsLocalRing.maximalIdeal A ^ n)).comp φ =
      (Ideal.Quotient.mk (IsLocalRing.maximalIdeal A ^ n)).comp ψ) :
    φ = ψ
AbelianVarieties.NOSProofs.LocalRigidity.AlgebraicGeometry.InfinitesimalRigidity.exists_not_mem_and_forall_mul_eq_zero
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.LocalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidity
open _root_.AlgebraicGeometry
theorem exists_not_mem_and_forall_mul_eq_zero {R A : Type*} [CommRing R] [CommRing A]
    [IsNoetherianRing R] [Algebra R A] (𝔭 : Ideal R) [𝔭.IsPrime] [IsLocalization.AtPrime A 𝔭]
    (I : Ideal R) (hI : ∀ i ∈ I, algebraMap R A i = 0) :
    ∃ m : R, m ∉ 𝔭 ∧ ∀ i ∈ I, m * i = 0
AbelianVarieties.NOSProofs.LocalRigidity.AlgebraicGeometry.InfinitesimalRigidity.exists_mem_and_ι_comp_eq
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.LocalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidity
open _root_.AlgebraicGeometry
theorem exists_mem_and_ι_comp_eq {X Y : Scheme.{u}} [IsLocallyNoetherian X] (f g : X ⟶ Y)
    (x : X)
    (h : ∀ n : ℕ,
      Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ f =
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ g) :
    ∃ U : X.Opens, x ∈ U ∧ U.ι ≫ f = U.ι ≫ g
AlgebraicGeometry.exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
open CategoryTheory CategoryTheory.Limits TopologicalSpace Opposite
open AbelianVarieties.NOSProofs.LocalRigidity.AlgebraicGeometry.InfinitesimalRigidity
namespace AlgebraicGeometry
universe u
theorem exists_mem_and_iota_comp_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq
    {X Y : Scheme.{u}} [IsLocallyNoetherian X] (f g : X ⟶ Y) (x : X)
    (h : ∀ n : ℕ,
      Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ f =
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ g) :
    ∃ U : X.Opens, x ∈ U ∧ U.ι ≫ f = U.ι ≫ g
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.sourceLocal_of_ringHomProperty
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
theorem sourceLocal_of_ringHomProperty (P : MorphismProperty Scheme.{u})
    (Q : ∀ {R S : Type u} [CommRing R] [CommRing S], (R →+* S) → Prop)
    [HasRingHomProperty P Q] : IsZariskiLocalAtSource P
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.flatSourceLocal
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
theorem flatSourceLocal :
    IsZariskiLocalAtSource (@Flat : MorphismProperty Scheme.{u})
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.flatRespectsIso
Source context 14 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
theorem flatRespectsIso :
    MorphismProperty.RespectsIso (@Flat : MorphismProperty Scheme.{u})
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_ne_zero_flat_away
Source context 16 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
open TensorProduct in
theorem exists_ne_zero_flat_away {A B : Type u} [CommRing A] [IsDomain A] [IsNoetherianRing A]
    [CommRing B] [Algebra A B] [Algebra.FiniteType A B] :
    ∃ a : A, a ≠ 0 ∧ Module.Flat A (Localization.Away (algebraMap A B a))
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.flat_ι_comp_of_le
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Transport
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem flat_ι_comp_of_le {W₁ W₂ : X.Opens} (e : W₁ ≤ W₂) (h : Flat (W₂.ι ≫ f)) :
    Flat (W₁.ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.flat_image_ι_comp
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Transport
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem flat_image_ι_comp {Y : Scheme.{u}} (i : Y ⟶ X) [IsOpenImmersion i] (W : Y.Opens)
    (h : Flat (W.ι ≫ i ≫ f)) : Flat ((i ''ᵁ W).ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.flat_preimage_image_ι_comp
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Transport
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem flat_preimage_image_ι_comp (W : S.Opens) (U : (W : Scheme.{u}).Opens)
    (h : Flat (((f ∣_ W) ⁻¹ᵁ U).ι ≫ (f ∣_ W))) : Flat ((f ⁻¹ᵁ (W.ι ''ᵁ U)).ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_ne_zero_flat_of_isAffine
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Affine
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem exists_ne_zero_flat_of_isAffine [IsAffine X] [IsAffine S] [IsIntegral S]
    [IsLocallyNoetherian S] [LocallyOfFiniteType f] :
    ∃ b : Γ(S, ⊤), b ≠ 0 ∧ Flat ((f ⁻¹ᵁ S.basicOpen b).ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_nonempty_forall_flat
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Core
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem exists_nonempty_forall_flat [IsAffine S] [IsIntegral S] [IsLocallyNoetherian S]
    [LocallyOfFiniteType f] (t : Finset X.Opens) (ht : ∀ V ∈ t, IsAffineOpen V) :
    ∃ U : S.Opens, (U : Set S).Nonempty ∧ ∀ V ∈ t, Flat ((V ⊓ f ⁻¹ᵁ U).ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_nonempty_flat_of_isAffine_of_isIntegral
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Core
variable {X S : Scheme.{u}} (f : X ⟶ S)
theorem exists_nonempty_flat_of_isAffine_of_isIntegral [IsAffine S] [IsIntegral S]
    [IsLocallyNoetherian S] [LocallyOfFiniteType f] [QuasiCompact f] :
    ∃ U : S.Opens, (U : Set S).Nonempty ∧ Flat ((f ⁻¹ᵁ U).ι ≫ f)
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_isAffineOpen_isIntegral
Source context 17 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
section Reduced
variable {S : Scheme.{u}}
theorem exists_isAffineOpen_isIntegral [IsReduced S] [IsLocallyNoetherian S] [Nonempty S] :
    ∃ W : S.Opens, IsAffineOpen W ∧ Nonempty (W : Scheme.{u}) ∧ IsIntegral (W : Scheme.{u})
AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme.exists_nonempty_flat
Source context 15 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GenericFlatness
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Topology
universe u
noncomputable section
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace GenericFlatnessScheme
open _root_.AlgebraicGeometry
attribute [local instance] flatSourceLocal flatRespectsIso
theorem exists_nonempty_flat {X S : Scheme.{u}} (f : X ⟶ S) [IsReduced S] [IsLocallyNoetherian S]
    [Nonempty S] [LocallyOfFiniteType f] [QuasiCompact f] :
    ∃ U : S.Opens, (U : Set S).Nonempty ∧ Flat ((f ⁻¹ᵁ U).ι ≫ f)
AlgebraicGeometry.exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
open CategoryTheory CategoryTheory.Limits TopologicalSpace Opposite
open AbelianVarieties.NOSProofs.GenericFlatness.AlgebraicGeometry.GenericFlatnessScheme
namespace AlgebraicGeometry
universe u
theorem exists_nonempty_flat_preimage_iota_comp_of_isReduced_of_locallyOfFiniteType {X S :
    Scheme.{u}} (f : X ⟶ S) [IsLocallyNoetherian S] [IsReduced S] [Nonempty S]
    [LocallyOfFiniteType f] [QuasiCompact f] :
    ∃ U : S.Opens, (U : Set S).Nonempty ∧ Flat ((f ⁻¹ᵁ U).ι ≫ f)
AbelianVarieties.NOSProofs.GlobalRigidity.AlgebraicGeometry.InfinitesimalRigidityGlobal.eq_of_isSchemeTheoreticallyDominant_comp_eq
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GlobalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidityGlobal
open _root_.AlgebraicGeometry
theorem eq_of_isSchemeTheoreticallyDominant_comp_eq {W X Y Z : Scheme.{u}} (ι : W ⟶ X)
    [IsSchemeTheoreticallyDominant ι] (f g : X ⟶ Y) (s : Y ⟶ Z) [IsSeparated s]
    (hs : f ≫ s = g ≫ s) (hU : ι ≫ f = ι ≫ g) : f = g
AbelianVarieties.NOSProofs.GlobalRigidity.AlgebraicGeometry.InfinitesimalRigidityGlobal.eq_of_forall_jets_eq
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GlobalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidityGlobal
open _root_.AlgebraicGeometry
theorem eq_of_forall_jets_eq {X Y Z : Scheme.{u}} [IsLocallyNoetherian X]
    (hX : ∀ U : X.Opens, (U : Set X).Nonempty → IsSchemeTheoreticallyDominant U.ι)
    (f g : X ⟶ Y) (s : Y ⟶ Z) [IsSeparated s] (hs : f ≫ s = g ≫ s) (x : X)
    (h : ∀ n : ℕ,
      Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ f =
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ g) :
    f = g
AbelianVarieties.NOSProofs.GlobalRigidity.AlgebraicGeometry.InfinitesimalRigidityGlobal.eq_of_forall_jets_eq_of_isIntegral
Source context 13 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.GlobalRigidity
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.TopologicalSpace
open _root_.Opposite
universe u
namespace AlgebraicGeometry
open _root_.AlgebraicGeometry
namespace InfinitesimalRigidityGlobal
open _root_.AlgebraicGeometry
theorem eq_of_forall_jets_eq_of_isIntegral {X Y Z : Scheme.{u}} [IsIntegral X]
    [IsLocallyNoetherian X]
    (f g : X ⟶ Y) (s : Y ⟶ Z) [IsSeparated s] (hs : f ≫ s = g ≫ s) (x : X)
    (h : ∀ n : ℕ,
      Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ f =
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ g) :
    f = g
AlgebraicGeometry.eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant
Source context 6 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_AlgebraicGeometry_eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
open CategoryTheory
open AbelianVarieties.NOSProofs.GlobalRigidity.AlgebraicGeometry.InfinitesimalRigidityGlobal
namespace AlgebraicGeometry
universe u
theorem eq_of_forall_specMap_quotient_maximalIdeal_pow_comp_eq_of_isSchemeTheoreticallyDominant
    {X Y Z : Scheme.{u}} [IsLocallyNoetherian X]
    (hX : ∀ U : X.Opens, (U : Set X).Nonempty → IsSchemeTheoreticallyDominant U.ι)
    (f g : X ⟶ Y) (s : Y ⟶ Z) [IsSeparated s] (hs : f ≫ s = g ≫ s) (x : X)
    (h : ∀ n : ℕ,
      Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ f =
        Spec.map (CommRingCat.ofHom (Ideal.Quotient.mk
          (IsLocalRing.maximalIdeal (X.presheaf.stalk x) ^ n))) ≫ X.fromSpecStalk x ≫ g) :
    f = g