Module

Slices.lean

Nyll.AbelianVarieties.Geometry.Quotients.Slices
55 declarations indexed from sourceView source ↗

Affine étale slices for relative group actions

Adapted cotangent coordinates cut out a smooth affine transverse slice. The action is formally unramified at the unit and becomes étale after shrinking the slice.

Imports31
Imported by2

Declarations

AbelianVarieties.NOSProofs.AffineSlices.CutAlg.det_basis_baseChange_tmul
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem det_basis_baseChange_tmul
    {A : Type u} [CommRing A] {M : Type u} [AddCommGroup M] [Module A M]
    {ι : Type} [Fintype ι] [DecidableEq ι] (b : Module.Basis ι A M) (x : ι → M)
    (A' : Type u) [CommRing A'] [Algebra A A'] :
    (Algebra.TensorProduct.basis A' b).det (fun i => (1 : A') ⊗ₜ[A] x i) = algebraMap A A' (b.det
      x) := by
  classical
  have hmat : (Algebra.TensorProduct.basis A' b).toMatrix (fun i => (1 : A') ⊗ₜ[A] x i) =
      (b.toMatrix x).map (algebraMap A A') := by
    ext i j
    simp only [Module.Basis.toMatrix_apply, Algebra.TensorProduct.basis_repr_tmul,
      one_smul, Finsupp.mapRange_apply, Matrix.map_apply]
  rw [Module.Basis.det_apply, Module.Basis.det_apply, hmat, RingHom.map_det,
    RingHom.mapMatrix_apply]
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.algebraMap_det_ne_zero_of_linearIndependent
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem algebraMap_det_ne_zero_of_linearIndependent
    {A : Type u} [CommRing A] {K : Type u} [Field K] [Algebra A K] {M : Type u} [AddCommGroup M]
      [Module A M]
    {ι : Type} [Fintype ι] [DecidableEq ι] (b : Module.Basis ι A M) (x : ι → M)
    (hx : LinearIndependent K (fun i => (1 : K) ⊗ₜ[A] x i : ι → K ⊗[A] M)) :
    algebraMap A K (b.det x) ≠ 0 := by
  classical
  rw [← det_basis_baseChange_tmul b x K]
  cases isEmpty_or_nonempty ι with
  | inl _ => rw [Module.Basis.det_apply, Matrix.det_isEmpty]; exact one_ne_zero
  | inr _ =>
  have hcard : Fintype.card ι = Module.finrank K (K ⊗[A] M) :=
    (Module.finrank_eq_card_basis (Algebra.TensorProduct.basis K b)).symm
  let B := basisOfLinearIndependentOfCardEqFinrank hx hcard
  have hB : (⇑B : ι → K ⊗[A] M) = fun i => (1 : K) ⊗ₜ[A] x i :=
    coe_basisOfLinearIndependentOfCardEqFinrank hx hcard
  have hu := (Algebra.TensorProduct.basis K b).isUnit_det B
  rw [hB] at hu
  exact hu.ne_zero
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_basis_baseChange_of_isUnit_det
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem exists_basis_baseChange_of_isUnit_det
    {A : Type u} [CommRing A] {M : Type u} [AddCommGroup M] [Module A M]
    {ι : Type} [Fintype ι] [DecidableEq ι] (b : Module.Basis ι A M) (x : ι → M)
    (A' : Type u) [CommRing A'] [Algebra A A'] (hu : IsUnit (algebraMap A A' (b.det x))) :
    ∃ b' : Module.Basis ι A' (A' ⊗[A] M), ∀ i, b' i = (1 : A') ⊗ₜ[A] x i
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_basis_kaehler_of_isLocalization
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem exists_basis_kaehler_of_isLocalization
    {k : Type u} [CommRing k] {A A' : Type u} [CommRing A] [CommRing A'] [Algebra k A] [Algebra k
      A'] [Algebra A A']
    [IsScalarTower k A A'] (M : Submonoid A) [IsLocalization M A']
    {ι : Type} (x : ι → A) (b : Module.Basis ι A' (A' ⊗[A] Ω[A⁄k])) (hb : ∀ i, b i = (1 : A')
      ⊗ₜ[A] D k A (x i)) :
    ∃ b' : Module.Basis ι A' (Ω[A'⁄k]), ∀ i, b' i = D k A' (algebraMap A A' (x i))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.nonempty_basis_kaehler_of_isStandardSmoothOfRelativeDimension
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem nonempty_basis_kaehler_of_isStandardSmoothOfRelativeDimension
    {R S : Type u} [CommRing R] [CommRing S] [Algebra R S] (n : ℕ)
    [Algebra.IsStandardSmoothOfRelativeDimension n R S] :
    Nonempty (Module.Basis (Fin n) S (Ω[S⁄R]))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.algebraMap_point_surjective
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
lemma algebraMap_point_surjective : Function.Surjective (algebraMap P k)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.algebraMap_algebraMap_point
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
lemma algebraMap_algebraMap_point (c : k) : algebraMap P k (algebraMap k P c) = c
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.one_tmul_smul
Source context 10 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
omit [IsScalarTower k P k] in
lemma one_tmul_smul (p : P) (ω : Ω[P⁄k]) :
    (1 : k) ⊗ₜ[P] (p • ω) = algebraMap P k p • ((1 : k) ⊗ₜ[P] ω)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.one_tmul_D_algebraMap_mul
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
lemma one_tmul_D_algebraMap_mul (c : k) (a : P) :
    (1 : k) ⊗ₜ[P] D k P (algebraMap k P c * a) = c • ((1 : k) ⊗ₜ[P] D k P a)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.tmul_eq_one_tmul_smul
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
lemma tmul_eq_one_tmul_smul (c : k) (ω : Ω[P⁄k]) :
    c ⊗ₜ[P] ω = (1 : k) ⊗ₜ[P] (algebraMap k P c • ω)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.kerCotangentToTensor_injective
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
theorem kerCotangentToTensor_injective :
    Function.Injective (KaehlerDifferential.kerCotangentToTensor k P k)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_eq_one_tmul_D
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
lemma exists_eq_one_tmul_D (v : k ⊗[P] Ω[P⁄k]) :
    ∃ a : P, algebraMap P k a = 0 ∧ v = (1 : k) ⊗ₜ[P] D k P a
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.one_tmul_D_eq_zero_of_mem_sq
Source context 10 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
omit [IsScalarTower k P k] in
lemma one_tmul_D_eq_zero_of_mem_sq {c : P} (hc : c ∈ RingHom.ker (algebraMap P k) ^ 2) :
    (1 : k) ⊗ₜ[P] D k P c = 0
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.ker_le_span_sup_sq
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section point
variable {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
  [IsScalarTower k P k]
theorem ker_le_span_sup_sq (s : Set P) (hs : ∀ x ∈ s, algebraMap P k x = 0)
    (hsp : Submodule.span k ((fun a : P => (1 : k) ⊗ₜ[P] D k P a) '' s) = ⊤) :
    RingHom.ker (algebraMap P k) ≤ Ideal.span s ⊔ RingHom.ker (algebraMap P k) ^ 2 := by
  classical
  intro x hx
  have hmem : (1 : k) ⊗ₜ[P] D k P x ∈ Submodule.span k ((fun a : P => (1 : k) ⊗ₜ[P] D k P a) '' s)
    := by
    rw [hsp]; exact Submodule.mem_top
  rw [Submodule.mem_span_image_iff_exists_fun] at hmem
  obtain ⟨t, ht, c, hc⟩ := hmem
  set z : P := ∑ i : t, algebraMap k P (c i) * (i : P) with hz
  have hzs : z ∈ Ideal.span s :=
    Submodule.sum_mem _ fun i _ ↦ Ideal.mul_mem_left _ _ (Ideal.subset_span (ht i.2))
  have hz0 : algebraMap P k z = 0 := by
    rw [hz, map_sum]
    exact Finset.sum_eq_zero fun i _ ↦ by rw [map_mul, hs _ (ht i.2), mul_zero]
  have hy : x - z ∈ RingHom.ker (algebraMap P k) := by
    rw [RingHom.mem_ker, map_sub, hz0, sub_zero]; exact hx
  have hDz : (1 : k) ⊗ₜ[P] D k P z = (1 : k) ⊗ₜ[P] D k P x := by
    rw [← hc, hz, map_sum, TensorProduct.tmul_sum]
    exact Finset.sum_congr rfl fun i _ ↦ one_tmul_D_algebraMap_mul (c i) (i : P)
  have hker : kerCotangentToTensor k P k (Ideal.toCotangent _ ⟨x - z, hy⟩) = 0 := by
    rw [kerCotangentToTensor_toCotangent, map_sub, TensorProduct.tmul_sub, hDz, sub_self]
  rw [← map_zero (kerCotangentToTensor k P k)] at hker
  have h0 := kerCotangentToTensor_injective hker
  have hy2 : ((⟨x - z, hy⟩ : RingHom.ker (algebraMap P k)) : P) ∈ RingHom.ker (algebraMap P k) ^ 2
    :=
    (Ideal.mem_toCotangent_ker _).mp (LinearMap.mem_ker.mpr h0)
  have : x = z + (x - z) := by ring
  rw [this]
  exact Submodule.add_mem_sup hzs hy2
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.cotangentMap

The induced map on cotangent spaces at the chosen rational point.

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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section adapted
variable {k : Type u} [Field k] {P Q : Type u} [CommRing P] [CommRing Q]
    [Algebra k P] [Algebra k Q] [Algebra P Q] [IsScalarTower k P Q]
    [Algebra Q k] [Algebra P k] [IsScalarTower P Q k] [IsScalarTower k Q k] [IsScalarTower k P k]
def cotangentMap : k ⊗[P] Ω[P⁄k] →ₗ[k] k ⊗[Q] Ω[Q⁄k]
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.cotangentMap_one_tmul_D
Source context 10 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section adapted
variable {k : Type u} [Field k] {P Q : Type u} [CommRing P] [CommRing Q]
    [Algebra k P] [Algebra k Q] [Algebra P Q] [IsScalarTower k P Q]
    [Algebra Q k] [Algebra P k] [IsScalarTower P Q k] [IsScalarTower k Q k] [IsScalarTower k P k]
omit [IsScalarTower k Q k] [IsScalarTower k P k] in
lemma cotangentMap_one_tmul_D (a : P) :
    cotangentMap (k := k) (P := P) (Q := Q) ((1 : k) ⊗ₜ[P] D k P a) = (1 : k) ⊗ₜ[Q] D k Q
      (algebraMap P Q a)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.sumExtend_apply_inl
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma sumExtend_apply_inl
    {k : Type u} [Field k] {V : Type u} [AddCommGroup V] [Module k V]
    {ι : Type*} (v : ι → V) (hv : LinearIndependent k v) (i : ι) :
    Module.Basis.sumExtend hv (Sum.inl i) = v i
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.differentialSpan_mem
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma differentialSpan_mem
    {k : Type u} [Field k] {P : Type u} [CommRing P] [Algebra k P] [Algebra P k]
    [IsScalarTower k P k] (I : Ideal P) :
    ∀ w ∈ Submodule.span k ((fun a : P => (1 : k) ⊗ₜ[P] D k P a) '' (I : Set P)),
      ∃ a ∈ I, w = (1 : k) ⊗ₜ[P] D k P a := by
  intro w hw
  induction hw using Submodule.span_induction with
  | mem x hx => obtain ⟨a, ha, rfl⟩ := hx; exact ⟨a, ha, rfl⟩
  | zero => exact ⟨0, I.zero_mem, by rw [map_zero, TensorProduct.tmul_zero]⟩
  | add x y _ _ hx hy =>
    obtain ⟨a, ha, rfl⟩ := hx; obtain ⟨b, hb, rfl⟩ := hy
    exact ⟨a + b, I.add_mem ha hb, by rw [map_add, TensorProduct.tmul_add]⟩
  | smul c x _ hx =>
    obtain ⟨a, ha, rfl⟩ := hx
    exact ⟨algebraMap k P c * a, I.mul_mem_left _ ha, (one_tmul_D_algebraMap_mul c a).symm⟩
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.cotangentMap_ker_of_surjective
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma cotangentMap_ker_of_surjective
    {k : Type u} [Field k] {P Q : Type u} [CommRing P] [CommRing Q]
    [Algebra k P] [Algebra k Q] [Algebra P Q] [IsScalarTower k P Q]
    [Algebra Q k] [Algebra P k] [IsScalarTower P Q k] [IsScalarTower k Q k] [IsScalarTower k P k]
    (hPQ : Function.Surjective (algebraMap P Q)) :
    LinearMap.ker (cotangentMap (k := k) (P := P) (Q := Q)) =
      Submodule.span k ((fun a : P => (1 : k) ⊗ₜ[P] D k P a) ''
        (RingHom.ker (algebraMap P Q) : Set P)) := by
  let I : Ideal P := RingHom.ker (algebraMap P Q)
  let W : Submodule k (k ⊗[P] Ω[P⁄k]) :=
    Submodule.span k ((fun a : P => (1 : k) ⊗ₜ[P] D k P a) '' (I : Set P))
  let φ : k ⊗[P] Ω[P⁄k] →ₗ[k] k ⊗[Q] Ω[Q⁄k] := cotangentMap
  have hεPQ : ∀ a : P, algebraMap Q k (algebraMap P Q a) = algebraMap P k a :=
    fun a => (IsScalarTower.algebraMap_apply P Q k a).symm
  have hφ : ∀ a : P, φ ((1 : k) ⊗ₜ[P] D k P a) =
      (1 : k) ⊗ₜ[Q] D k Q (algebraMap P Q a) := cotangentMap_one_tmul_D
  change LinearMap.ker φ = W
  apply le_antisymm
  · intro v hv
    obtain ⟨a, ha0, rfl⟩ := exists_eq_one_tmul_D v
    rw [LinearMap.mem_ker, hφ] at hv
    have hb : algebraMap P Q a ∈ RingHom.ker (algebraMap Q k) := by
      rw [RingHom.mem_ker, hεPQ, ha0]
    have hb2 : algebraMap P Q a ∈ RingHom.ker (algebraMap Q k) ^ 2 := by
      have h0 : kerCotangentToTensor k Q k (Ideal.toCotangent _ ⟨_, hb⟩) = 0 := by
        rw [kerCotangentToTensor_toCotangent]; exact hv
      rw [← map_zero (kerCotangentToTensor k Q k)] at h0
      exact (Ideal.mem_toCotangent_ker _).mp (LinearMap.mem_ker.mpr
        (kerCotangentToTensor_injective h0))
    have hmap : RingHom.ker (algebraMap Q k) = (RingHom.ker (algebraMap P k)).map (algebraMap P
      Q) := by
      have : RingHom.ker (algebraMap P k) = (RingHom.ker (algebraMap Q k)).comap (algebraMap P
        Q) := by
        ext x; simp only [RingHom.mem_ker, Ideal.mem_comap, hεPQ]
      rw [this, Ideal.map_comap_of_surjective _ hPQ]
    rw [hmap, ← Ideal.map_pow] at hb2
    obtain ⟨c, hc, hca⟩ := (Ideal.mem_map_iff_of_surjective _ hPQ).mp hb2
    have haI : a - c ∈ I := by
      change a - c ∈ RingHom.ker (algebraMap P Q)
      rw [RingHom.mem_ker, map_sub, hca, sub_self]
    have : (1 : k) ⊗ₜ[P] D k P a = (1 : k) ⊗ₜ[P] D k P (a - c) + (1 : k) ⊗ₜ[P] D k P c := by
      rw [map_sub, TensorProduct.tmul_sub, sub_add_cancel]
    rw [this, one_tmul_D_eq_zero_of_mem_sq hc, add_zero]
    exact Submodule.subset_span ⟨a - c, haI, rfl⟩
  · rw [Submodule.span_le]
    rintro _ ⟨a, ha, rfl⟩
    rw [SetLike.mem_coe, LinearMap.mem_ker, hφ, RingHom.mem_ker.mp ha, map_zero,
      TensorProduct.tmul_zero]
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_basis_extending_kernel
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma exists_basis_extending_kernel
    {k : Type u} [Field k] {V V' : Type u}
    [AddCommGroup V] [Module k V] [AddCommGroup V'] [Module k V']
    {g h : ℕ} (bV : Module.Basis (Fin g) k V) (bV' : Module.Basis (Fin h) k V')
    (φ : V →ₗ[k] V') (W : Submodule k V)
    (hsurj : LinearMap.range φ = ⊤) (hker : LinearMap.ker φ = W) :
    h ≤ g ∧ ∃ bW : Module.Basis (Fin (g - h)) k W,
      ∃ b : Module.Basis (Fin h ⊕ Fin (g - h)) k V,
        ∀ j, b (Sum.inr j) = (bW j : V)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_adapted_coords
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem exists_adapted_coords
    {k : Type u} [Field k] {P Q : Type u} [CommRing P] [CommRing Q]
    [Algebra k P] [Algebra k Q] [Algebra P Q] [IsScalarTower k P Q]
    [Algebra Q k] [Algebra P k] [IsScalarTower P Q k] [IsScalarTower k Q k] [IsScalarTower k P k]
    (hPQ : Function.Surjective (algebraMap P Q)) {g h : ℕ}
    (bP : Module.Basis (Fin g) k (k ⊗[P] Ω[P⁄k])) (bQ : Module.Basis (Fin h) k (k ⊗[Q] Ω[Q⁄k])) :
    h ≤ g ∧ ∃ (t : Fin h → P) (u : Fin (g - h) → P),
      (∀ i, algebraMap P k (t i) = 0) ∧ (∀ j, algebraMap P Q (u j) = 0) ∧
      ∃ b : Module.Basis (Fin h ⊕ Fin (g - h)) k (k ⊗[P] Ω[P⁄k]),
        (∀ i, b (Sum.inl i) = (1 : k) ⊗ₜ[P] D k P (t i)) ∧
        (∀ j, b (Sum.inr j) = (1 : k) ⊗ₜ[P] D k P (u j))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.cotangentEquivOfFormallyEtale

The cotangent-space comparison along a formally étale algebra map.

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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section localization
variable {k : Type u} [Field k] {A P : Type u} [CommRing A] [CommRing P]
    [Algebra k A] [Algebra k P] [Algebra A P] [IsScalarTower k A P]
    [Algebra P k] [Algebra A k] [IsScalarTower A P k]
def cotangentEquivOfFormallyEtale [Algebra.FormallyEtale A P] :
    k ⊗[A] Ω[A⁄k] ≃ₗ[k] k ⊗[P] Ω[P⁄k]
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.cotangentEquivOfFormallyEtale_one_tmul_D
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
section localization
variable {k : Type u} [Field k] {A P : Type u} [CommRing A] [CommRing P]
    [Algebra k A] [Algebra k P] [Algebra A P] [IsScalarTower k A P]
    [Algebra P k] [Algebra A k] [IsScalarTower A P k]
lemma cotangentEquivOfFormallyEtale_one_tmul_D [Algebra.FormallyEtale A P] (a : A) :
    cotangentEquivOfFormallyEtale (k := k) (A := A) (P := P) ((1 : k) ⊗ₜ[A] D k A a) =
      (1 : k) ⊗ₜ[P] D k P (algebraMap A P a)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.exists_coords_of_isLocalization
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem exists_coords_of_isLocalization
    {k : Type u} [Field k] {A P : Type u} [CommRing A] [CommRing P]
    [Algebra k A] [Algebra k P] [Algebra A P] [IsScalarTower k A P]
    [Algebra P k] [Algebra A k] [IsScalarTower A P k] [IsScalarTower k P k] [IsScalarTower k A k]
    (M : Submonoid A) [IsLocalization M P] (hM : ∀ s ∈ M, algebraMap A k s ≠ 0)
    {ι : Type} [Finite ι] (x : ι → P) (hx : ∀ l, algebraMap P k (x l) = 0)
    (b : Module.Basis ι k (k ⊗[P] Ω[P⁄k])) (hb : ∀ l, b l = (1 : k) ⊗ₜ[P] D k P (x l)) :
    ∃ (a : ι → A) (s : ι → A), (∀ l, s l ∈ M) ∧ (∀ l, algebraMap A P (a l) = algebraMap A P (s l)
      * x l) ∧
      ∃ b' : Module.Basis ι k (k ⊗[A] Ω[A⁄k]), ∀ l, b' l = (1 : k) ⊗ₜ[A] D k A (a l)
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.ker_le_map_includeLeft_sup_map_includeRight
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
theorem ker_le_map_includeLeft_sup_map_includeRight
    {k : Type u} [Field k] {B C : Type u} [CommRing B] [CommRing C] [Algebra k B] [Algebra k C]
    (ψ : B ⊗[k] C →ₐ[k] k) :
    RingHom.ker ψ.toRingHom ≤
      (RingHom.ker (ψ.comp Algebra.TensorProduct.includeLeft).toRingHom).map
          (Algebra.TensorProduct.includeLeft : B →ₐ[k] B ⊗[k] C).toRingHom ⊔
        (RingHom.ker (ψ.comp Algebra.TensorProduct.includeRight).toRingHom).map
          (Algebra.TensorProduct.includeRight : C →ₐ[k] B ⊗[k] C).toRingHom
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.etale_comp_of_bijective
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma etale_comp_of_bijective
    {R₁ R₂ S : Type*} [CommRing R₁] [CommRing R₂] [CommRing S]
    (g : R₁ →+* R₂) (hg : Function.Bijective g) (f : R₂ →+* S)
    (hf : f.Etale) : (f.comp g).Etale
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.etale_comp_iff_of_bijective
Source context 7 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
lemma etale_comp_iff_of_bijective {R₁ R₂ S : Type*} [CommRing R₁] [CommRing R₂] [CommRing S]
    (g : R₁ →+* R₂) (hg : Function.Bijective g) (f : R₂ →+* S) : (f.comp g).Etale ↔ f.Etale
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.etale_aeval_iff_of_equiv
Source context 8 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
theorem etale_aeval_iff_of_equiv {k : Type u} [Field k] {A' : Type u} [CommRing A'] [Algebra k A']
    {ι : Type v} {ι' : Type w} (e : ι ≃ ι') (a : ι' → A') :
    (MvPolynomial.aeval (a ∘ e) : MvPolynomial ι k →ₐ[k] A').toRingHom.Etale ↔
      (MvPolynomial.aeval a : MvPolynomial ι' k →ₐ[k] A').toRingHom.Etale
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.smoothOfRelativeDimension_SpecMap_of_isStandardSmoothOfRelativeDimension
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
open AlgebraicGeometry in
theorem smoothOfRelativeDimension_SpecMap_of_isStandardSmoothOfRelativeDimension
    {R S : Type u} [CommRing R] [CommRing S] (φ : R →+* S) (n : ℕ)
    (h : φ.IsStandardSmoothOfRelativeDimension n) :
    SmoothOfRelativeDimension n (Spec.map (CommRingCat.ofHom φ))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.smoothOfRelativeDimension_SpecMap_mvPolynomial
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
open AlgebraicGeometry in
theorem smoothOfRelativeDimension_SpecMap_mvPolynomial (k : Type u) [CommRing k] (n : ℕ) :
    SmoothOfRelativeDimension n
      (Spec.map (CommRingCat.ofHom (algebraMap k (MvPolynomial (Fin n) k))))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.quotSpanXInlEquiv

The polynomial quotient obtained by killing the first group of variables.

Source context 8 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
def quotSpanXInlEquiv (k : Type u) [Field k] (h m : ℕ) :
    (MvPolynomial (Fin h ⊕ Fin m) k ⧸
      Ideal.span (Set.range ((MvPolynomial.X : Fin h ⊕ Fin m → MvPolynomial (Fin h ⊕ Fin m) k) ∘
        Sum.inl))) ≃ₐ[k]
      MvPolynomial (Fin m) k
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.smoothOfRelativeDimension_SpecMap_quotient_of_etale_aeval
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
open AlgebraicGeometry in
theorem smoothOfRelativeDimension_SpecMap_quotient_of_etale_aeval
    {k : Type u} [Field k] {A' : Type u} [CommRing A'] [Algebra k A'] {h m : ℕ}
    (a : Fin h ⊕ Fin m → A')
    (ha : (MvPolynomial.aeval a : MvPolynomial (Fin h ⊕ Fin m) k →ₐ[k] A').toRingHom.Etale) :
    SmoothOfRelativeDimension m
      (Spec.map (CommRingCat.ofHom (algebraMap k (A' ⧸ Ideal.span (Set.range (a ∘ Sum.inl))))))
AbelianVarieties.NOSProofs.AffineSlices.CutAlg.formallyUnramified_of_span_eq_maximalIdeal
Source context 8 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
namespace CutAlg
universe v w in
theorem formallyUnramified_of_span_eq_maximalIdeal
    {k : Type u} [Field k] {R S : Type u} [CommRing R] [CommRing S] [IsLocalRing R] [IsLocalRing S]
    (φ : R →+* S) [IsLocalHom φ] (hφ : φ.EssFiniteType) (ι₀ : k →+* R)
    (hk : Function.Surjective ((IsLocalRing.residue S).comp (φ.comp ι₀)))
    {ι : Type} [Finite ι] (x : ι → R) (y : ι → S) (hx : ∀ l, x l ∈ IsLocalRing.maximalIdeal R)
    (hy : IsLocalRing.maximalIdeal S = Ideal.span (Set.range y))
    (hxy : ∀ l, φ (x l) - y l ∈ IsLocalRing.maximalIdeal S ^ 2) :
    φ.FormallyUnramified
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.isScalarTower_sec_stalk
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section towers
variable {Y : Scheme.{u}} (p : Y ⟶ Spec (.of k))
theorem isScalarTower_sec_stalk (U : Y.Opens) (y : Y) (hy : y ∈ U) :
    let : Algebra k Γ(Y, U) := p.sectionsAlgebra U
    let : Algebra k (Y.presheaf.stalk y) := NeronModelInfra.stalkAlgebra p y
    let : Algebra Γ(Y, U) (Y.presheaf.stalk y) :=
      TopCat.Presheaf.algebra_section_stalk Y.presheaf (⟨y, hy⟩ : U)
    IsScalarTower k Γ(Y, U) (Y.presheaf.stalk y) := by
  intro algU algStalk algUStalk
  refine IsScalarTower.of_algebraMap_eq' ?_
  change ((Scheme.ΓSpecIso (.of k)).inv ≫ p.appTop ≫ Y.presheaf.germ ⊤ y trivial).hom =
    (Y.presheaf.germ U y hy).hom.comp ((Scheme.ΓSpecIso (.of k)).inv ≫ p.appLE ⊤ U le_top).hom
  rw [← CommRingCat.hom_comp]
  simp only [Category.assoc, Scheme.Hom.appLE, TopCat.Presheaf.germ_res]
  rfl
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.stalkMap_comp_algebraMap
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section towers
variable {Y : Scheme.{u}} (p : Y ⟶ Spec (.of k))
theorem stalkMap_comp_algebraMap {X : Scheme.{u}} (f : X ⟶ Y) (x : X) :
    let : Algebra k (Y.presheaf.stalk (f.base x)) := NeronModelInfra.stalkAlgebra p (f.base x)
    let : Algebra k (X.presheaf.stalk x) := NeronModelInfra.stalkAlgebra (f ≫ p) x
    (f.stalkMap x).hom.comp (algebraMap k (Y.presheaf.stalk (f.base x))) =
      algebraMap k (X.presheaf.stalk x) := by
  intro algY algX
  let α : CommRingCat.of k ⟶ Y.presheaf.stalk (f x) :=
    CommRingCat.ofHom (algebraMap k (Y.presheaf.stalk (f x)))
  let β : CommRingCat.of k ⟶ X.presheaf.stalk x :=
    CommRingCat.ofHom (algebraMap k (X.presheaf.stalk x))
  have hα : Spec.map α = Y.fromSpecStalk (f x) ≫ p :=
    (NeronModelInfra.fromSpecStalk_comp_eq_specMap_algebraMap_stalkAlgebra p (f x)).symm
  have hβ : Spec.map β = X.fromSpecStalk x ≫ (f ≫ p) :=
    (NeronModelInfra.fromSpecStalk_comp_eq_specMap_algebraMap_stalkAlgebra (f ≫ p) x).symm
  have hc : α ≫ f.stalkMap x = β := by
    apply Spec.map_injective
    rw [Spec.map_comp, hα, hβ, ← Category.assoc,
      Scheme.SpecMap_stalkMap_fromSpecStalk, Category.assoc]
  exact congrArg CommRingCat.Hom.hom hc
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.fromSpec_comp
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section towers
variable {Y : Scheme.{u}} (p : Y ⟶ Spec (.of k))
theorem fromSpec_comp {V : Y.Opens} (hV : IsAffineOpen V) :
    hV.fromSpec ≫ p = Spec.map ((Scheme.ΓSpecIso (.of k)).inv ≫ p.appLE ⊤ V le_top)
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.stalkClosedPointTo_comp_algebraMap
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section ratpoint
variable {Y : Scheme.{u}}
theorem stalkClosedPointTo_comp_algebraMap (p : Y ⟶ Spec (.of k)) (y : Spec (.of k) ⟶ Y) (hy : y ≫
  p = 𝟙 _) :
    let : Algebra k (Y.presheaf.stalk (y.base (closedPoint k))) :=
      NeronModelInfra.stalkAlgebra p (y.base (closedPoint k))
    (Scheme.stalkClosedPointTo y).hom.comp (algebraMap k (Y.presheaf.stalk (y.base (closedPoint
      k)))) =
      RingHom.id k := by
  intro algStalk
  let x : Y := y (show Spec (CommRingCat.of k) from closedPoint k)
  let α : CommRingCat.of k ⟶ Y.presheaf.stalk x :=
    CommRingCat.ofHom (algebraMap k (Y.presheaf.stalk x))
  have hα : Spec.map α = Y.fromSpecStalk x ≫ p :=
    (NeronModelInfra.fromSpecStalk_comp_eq_specMap_algebraMap_stalkAlgebra p x).symm
  have hc : α ≫ Scheme.stalkClosedPointTo y = 𝟙 (CommRingCat.of k) := by
    apply Spec.map_injective
    rw [Spec.map_comp, Spec.map_id, hα, ← Category.assoc,
      Scheme.Spec_stalkClosedPointTo_fromSpecStalk]
    exact hy
  exact congrArg CommRingCat.Hom.hom hc
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.residue_comp_algebraMap_surjective
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section ratpoint
variable {Y : Scheme.{u}}
theorem residue_comp_algebraMap_surjective (p : Y ⟶ Spec (.of k)) (y : Spec (.of k) ⟶ Y) (hy : y ≫
  p = 𝟙 _) :
    let : Algebra k (Y.presheaf.stalk (y.base (closedPoint k))) :=
      NeronModelInfra.stalkAlgebra p (y.base (closedPoint k))
    Function.Surjective
      ((residue (Y.presheaf.stalk (y.base (closedPoint k)))).comp
        (algebraMap k (Y.presheaf.stalk (y.base (closedPoint k))))) := by
  intro algStalk
  have hret := stalkClosedPointTo_comp_algebraMap p y hy
  intro c
  obtain ⟨s, rfl⟩ := Ideal.Quotient.mk_surjective c
  refine ⟨(Scheme.stalkClosedPointTo y).hom s, ?_⟩
  change Ideal.Quotient.mk _ _ = Ideal.Quotient.mk _ _
  rw [Ideal.Quotient.eq, IsLocalRing.mem_maximalIdeal, mem_nonunits_iff]
  intro hu
  have := hu.map (Scheme.stalkClosedPointTo y).hom
  rw [map_sub, ← RingHom.comp_apply, hret, RingHom.id_apply, sub_self] at this
  exact not_isUnit_zero this
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.ker_stalkClosedPointTo
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section ratpoint
variable {Y : Scheme.{u}}
theorem ker_stalkClosedPointTo (y : Spec (.of k) ⟶ Y) :
    RingHom.ker (Scheme.stalkClosedPointTo y).hom = maximalIdeal (Y.presheaf.stalk (y.base
      (closedPoint k)))
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.SpecMap_germ_stalkClosedPointTo_fromSpec
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section ratpoint
variable {Y : Scheme.{u}}
theorem SpecMap_germ_stalkClosedPointTo_fromSpec (y : Spec (.of k) ⟶ Y) {V : Y.Opens} (hV :
  IsAffineOpen V)
    (hyV : y.base (closedPoint k) ∈ V) :
    Spec.map (Y.presheaf.germ V _ hyV ≫ Scheme.stalkClosedPointTo y) ≫ hV.fromSpec = y
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.primeIdealOf_eq_ker
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section ratpoint
variable {Y : Scheme.{u}}
theorem primeIdealOf_eq_ker (y : Spec (.of k) ⟶ Y) {V : Y.Opens} (hV : IsAffineOpen V) (hyV :
  y.base (closedPoint k) ∈ V) :
    (hV.primeIdealOf ⟨_, hyV⟩).asIdeal =
      RingHom.ker (Y.presheaf.germ V _ hyV ≫ Scheme.stalkClosedPointTo y).hom
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.exists_isStandardSmoothOfRelativeDimension_chart
Source context 11 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
section smooth
variable {Y : Scheme.{u}} (p : Y ⟶ Spec (.of k)) (n : ℕ) [SmoothOfRelativeDimension n p]
theorem exists_isStandardSmoothOfRelativeDimension_chart (y : Y) :
    ∃ (V : Y.Opens) (_hV : IsAffineOpen V) (_hyV : y ∈ V),
      let : Algebra k Γ(Y, V) := p.sectionsAlgebra V
      Algebra.IsStandardSmoothOfRelativeDimension n k Γ(Y, V) := by
  obtain ⟨U, hU, V, hV, hyV, e, hstd⟩ :=
    SmoothOfRelativeDimension.exists_isStandardSmoothOfRelativeDimension (n := n) (f := p) y
  refine ⟨V, hV, hyV, ?_⟩
  have hpt : ∀ x : ↑(Spec (CommRingCat.of k)), x = closedPoint k :=
    fun x => Subsingleton.elim x _
  have hU' : U = ⊤ := IsLocalRing.closed_point_mem_iff.mp (hpt (p.base y) ▸ e hyV)
  subst hU'
  exact (RingHom.isStandardSmoothOfRelativeDimension_respectsIso (n := n)).2 (p.appLE ⊤ V e).hom
    (Scheme.ΓSpecIso (.of k)).symm.commRingCatIsoToRingEquiv hstd
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.germ_mem_maximalIdeal_iff_of_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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
theorem germ_mem_maximalIdeal_iff_of_eq {X : Scheme.{u}} {U : X.Opens} {x x' : ↑X} (h : x = x')
    (hx : x ∈ U) (hx' : x' ∈ U) (s : Γ(X, U)) :
    (X.presheaf.germ U x hx).hom s ∈ maximalIdeal (X.presheaf.stalk x) ↔
      (X.presheaf.germ U x' hx').hom s ∈ maximalIdeal (X.presheaf.stalk x')
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.germ_eq_zero_iff_of_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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
theorem germ_eq_zero_iff_of_eq {X : Scheme.{u}} {U : X.Opens} {x x' : ↑X} (h : x = x')
    (hx : x ∈ U) (hx' : x' ∈ U) (s : Γ(X, U)) :
    (X.presheaf.germ U x hx).hom s = 0 ↔ (X.presheaf.germ U x' hx').hom s = 0
AbelianVarieties.NOSProofs.AffineSlices.CutGeo.map_maximalIdeal_stalkMap_of_surjective
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutGeo
variable {k : Type u} [Field k]
theorem map_maximalIdeal_stalkMap_of_surjective {X Y : Scheme.{u}} (f : X ⟶ Y) (x : X)
    (hf : Function.Surjective (f.stalkMap x).hom) :
    (maximalIdeal (Y.presheaf.stalk (f.base x))).map (f.stalkMap x).hom = maximalIdeal
      (X.presheaf.stalk x)
AbelianVarieties.NOSProofs.AffineSlices.CutBody.comp_one_eq_one
Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
theorem comp_one_eq_one (L : RelativeGroupLaw k f) {N : Scheme.{u}} (i : N ⟶ G) (LN :
  RelativeGroupLaw k (i ≫ f))
    (hi : ∀ {T : Scheme.{u}} (t : T ⟶ Spec (CommRingCat.of k)) (x y : SchemeHomOver t (i ≫ f)),
      NeronModelInfra.schemeHomOverComp (LN.mul t x y) (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f) =
        L.mul t (NeronModelInfra.schemeHomOverComp x (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f))
          (NeronModelInfra.schemeHomOverComp y (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f)))
    {T : Scheme.{u}} (t : T ⟶ Spec (CommRingCat.of k)) :
    NeronModelInfra.schemeHomOverComp (LN.one t) (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f) = L.one t
AbelianVarieties.NOSProofs.AffineSlices.CutBody.mult

The multiplication morphism on the product of a relative group scheme.

Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
abbrev mult (L : RelativeGroupLaw k f) : pullback f f ⟶ G
AbelianVarieties.NOSProofs.AffineSlices.CutBody.lift_one_one_comp_mult
Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
theorem lift_one_one_comp_mult (L : RelativeGroupLaw k f) :
    pullback.lift (L.one (𝟙 _)).1 (L.one (𝟙 _)).1 rfl ≫ mult L = (L.one (𝟙 _)).1
AbelianVarieties.NOSProofs.AffineSlices.CutBody.map_comp_action_eq_map_comp_mul
Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
theorem map_comp_action_eq_map_comp_mul (L : RelativeGroupLaw k f)
    {N S : Scheme.{u}} (i : N ⟶ G) (j : S ⟶ G) :
    pullback.map (i ≫ f) (j ≫ f) (i ≫ f) f (𝟙 N) j (𝟙 _)
        ((Category.comp_id _).trans (Category.id_comp _).symm) (Category.comp_id _) ≫ L.action i =
      pullback.map (i ≫ f) (j ≫ f) f f i j (𝟙 _) (Category.comp_id _) (Category.comp_id _) ≫ mult
        L
AbelianVarieties.NOSProofs.AffineSlices.CutBody.germ_mult_sub_mem_sq
Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
theorem germ_mult_sub_mem_sq (L : RelativeGroupLaw k f) (U : G.Opens)
    (he : (L.one (𝟙 (Spec (CommRingCat.of k)))).1.base (closedPoint k) ∈ U)
    (p : ↑(pullback f f))
    (hp : p = (pullback.lift (L.one (𝟙 (Spec (CommRingCat.of k)))).1 (L.one (𝟙 (Spec
      (CommRingCat.of k)))).1 rfl).base
      (closedPoint k))
    (hpm : p ∈ mult L ⁻¹ᵁ U) (hp₁ : p ∈ pullback.fst f f ⁻¹ᵁ U) (hp₂ : p ∈ pullback.snd f f ⁻¹ᵁ U)
    (φ : Γ(G, U)) (hφ : (G.presheaf.germ U _ he).hom φ ∈ maximalIdeal (G.presheaf.stalk _)) :
    ((pullback f f).presheaf.germ (mult L ⁻¹ᵁ U ⊓ pullback.fst f f ⁻¹ᵁ U ⊓ pullback.snd f f ⁻¹ᵁ U) p
        (Opens.mem_inf.mpr ⟨Opens.mem_inf.mpr ⟨hpm, hp₁⟩, hp₂⟩)).hom
      (((mult L).appLE U _ (inf_le_left.trans inf_le_left)).hom φ -
        ((pullback.fst f f).appLE U _ (inf_le_left.trans inf_le_right)).hom φ -
        ((pullback.snd f f).appLE U _ inf_le_right).hom φ)
      ∈ maximalIdeal ((pullback f f).presheaf.stalk p) ^ 2
AbelianVarieties.NOSProofs.AffineSlices.CutBody.germ_sub_sub_mem_sq
Source context 19 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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.AffineSlices
universe u
open scoped TensorProduct
open KaehlerDifferential
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry Opposite TopologicalSpace IsLocalRing
namespace CutBody
open _root_.GoodReductionJacobian.RelativeGroupLaw
open _root_.GoodReductionJacobian
open _root_.CategoryTheory
open _root_.CategoryTheory.Limits
open _root_.AlgebraicGeometry
open _root_.NeronModelInfra
open _root_.GoodReductionJacobian
open _root_.IsLocalRing
open _root_.TopologicalSpace
open scoped TensorProduct
variable {k : Type u} [Field k] {G : Scheme.{u}} {f : G ⟶ Spec (CommRingCat.of k)}
theorem germ_sub_sub_mem_sq (L : RelativeGroupLaw k f) (U : G.Opens)
    (he : (L.one (𝟙 (Spec (CommRingCat.of k)))).1.base (closedPoint k) ∈ U)
    {X : Scheme.{u}} (ρ : X ⟶ pullback f f) (z : X)
    (hz : ρ.base z = (pullback.lift (L.one (𝟙 (Spec (CommRingCat.of k)))).1
      (L.one (𝟙 (Spec (CommRingCat.of k)))).1 rfl).base (closedPoint k))
    (a b c : X ⟶ G) (ha : ρ ≫ mult L = a) (hb : ρ ≫ pullback.fst f f = b) (hc : ρ ≫ pullback.snd f
      f = c)
    (haz : a.base z ∈ U) (hbz : b.base z ∈ U) (hcz : c.base z ∈ U)
    (φ : Γ(G, U)) (hφ : (G.presheaf.germ U _ he).hom φ ∈ maximalIdeal (G.presheaf.stalk _)) :
    (X.presheaf.germ (a ⁻¹ᵁ U) z haz).hom (a.app U φ) - (X.presheaf.germ (b ⁻¹ᵁ U) z hbz).hom
      (b.app U φ)
      - (X.presheaf.germ (c ⁻¹ᵁ U) z hcz).hom (c.app U φ) ∈ maximalIdeal (X.presheaf.stalk z) ^ 2
GoodReductionJacobian.RelativeGroupLaw.specMap_fromSpec_appLE
Source context 8 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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 GoodReductionJacobian.RelativeGroupLaw
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry NeronModelInfra Opposite
open GoodReductionJacobian TopologicalSpace
open scoped TensorProduct
open AbelianVarieties.NOSProofs.AffineSlices
lemma specMap_fromSpec_appLE
    {Y : Scheme.{u}} {U : Y.Opens} (hU : IsAffineOpen U)
    {A : Type u} [CommRing A] (q : Γ(Y, U) →+* A)
    (he : ⊤ ≤ (Spec.map (CommRingCat.ofHom q) ≫ hU.fromSpec) ⁻¹ᵁ U) :
    (Spec.map (CommRingCat.ofHom q) ≫ hU.fromSpec).appLE U ⊤ he =
      CommRingCat.ofHom q ≫ (Scheme.ΓSpecIso (.of A)).inv
GoodReductionJacobian.RelativeGroupLaw.app_germ_eq_appLE_top_germ
Source context 8 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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 GoodReductionJacobian.RelativeGroupLaw
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry NeronModelInfra Opposite
open GoodReductionJacobian TopologicalSpace
open scoped TensorProduct
open AbelianVarieties.NOSProofs.AffineSlices
lemma app_germ_eq_appLE_top_germ
    {Y Z : Scheme.{u}} (j : Y ⟶ Z) (U : Z.Opens) (hU : j ⁻¹ᵁ U = ⊤)
    (y : Y) (hy : y ∈ j ⁻¹ᵁ U) :
    j.app U ≫ Y.presheaf.germ (j ⁻¹ᵁ U) y hy =
      j.appLE U ⊤ hU.ge ≫ Y.presheaf.germ ⊤ y trivial
GoodReductionJacobian.RelativeGroupLaw.exists_affine_formallyUnramified_stalkMap_action_one
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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_formallyUnramified_stalkMap_action_one.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 GoodReductionJacobian.RelativeGroupLaw
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry NeronModelInfra Opposite
open GoodReductionJacobian TopologicalSpace
open scoped TensorProduct
open AbelianVarieties.NOSProofs.AffineSlices
open CutBody CutAlg CutGeo IsLocalRing in
theorem exists_affine_formallyUnramified_stalkMap_action_one
    (k : Type u) [Field k] {G : Scheme.{u}} (f : G ⟶ Spec (CommRingCat.of k)) (L :
      RelativeGroupLaw k f)
    (g : ℕ) [SmoothOfRelativeDimension g f]
    {N : Scheme.{u}} (i : N ⟶ G) [IsClosedImmersion i] (LN : RelativeGroupLaw k (i ≫ f))
    (h : ℕ) [SmoothOfRelativeDimension h (i ≫ f)]
    (hi : ∀ {T : Scheme.{u}} (t : T ⟶ Spec (CommRingCat.of k)) (x y : SchemeHomOver t (i ≫ f)),
      NeronModelInfra.schemeHomOverComp (LN.mul t x y) (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f) =
        L.mul t (NeronModelInfra.schemeHomOverComp x (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f))
          (NeronModelInfra.schemeHomOverComp y (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f))) :
    h ≤ g ∧ ∃ (S' : Scheme.{u}) (j' : S' ⟶ G) (eS : Spec (CommRingCat.of k) ⟶ S')
      (heS : eS ≫ j' ≫ f = 𝟙 _),
      IsAffine S' ∧ SmoothOfRelativeDimension (g - h) (j' ≫ f) ∧
      ((pullback.map (i ≫ f) (j' ≫ f) (i ≫ f) f (𝟙 N) j' (𝟙 _)
          ((Category.comp_id _).trans (Category.id_comp _).symm) (Category.comp_id _) ≫ L.action
            i).stalkMap
        (pullback.lift (LN.one (𝟙 _)).1 eS ((LN.one (𝟙 _)).2.trans heS.symm)
          (IsLocalRing.closedPoint k))).hom.FormallyUnramified
GoodReductionJacobian.RelativeGroupLaw.exists_affine_etale_slice_of_isAlgClosed
Source context 5 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_GoodReductionJacobian_RelativeGroupLaw_exists_affine_etale_slice_of_isAlgClosed.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 GoodReductionJacobian.RelativeGroupLaw
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry NeronModelInfra GoodReductionJacobian
universe u
theorem exists_affine_etale_slice_of_isAlgClosed
    (k : Type u) [Field k] [IsAlgClosed k] {G : Scheme.{u}} (f : G ⟶ Spec (CommRingCat.of k))
    [IsSeparated f] [QuasiCompact f] (L : RelativeGroupLaw k f)
    (g : ℕ) [SmoothOfRelativeDimension g f]
    {N : Scheme.{u}} (i : N ⟶ G) [IsClosedImmersion i] (LN : RelativeGroupLaw k (i ≫ f))
    (h : ℕ) [SmoothOfRelativeDimension h (i ≫ f)]
    (hi : ∀ {T : Scheme.{u}} (t : T ⟶ Spec (CommRingCat.of k)) (x y : SchemeHomOver t (i ≫ f)),
      NeronModelInfra.schemeHomOverComp (LN.mul t x y) (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f) =
        L.mul t (NeronModelInfra.schemeHomOverComp x (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f))
          (NeronModelInfra.schemeHomOverComp y (⟨i, rfl⟩ : SchemeHomOver (i ≫ f) f))) :
    ∃ (S : Scheme.{u}) (j : S ⟶ G), IsAffine S ∧ Nonempty S ∧ SmoothOfRelativeDimension (g - h) (j
      ≫ f) ∧
      Etale (CategoryTheory.Limits.pullback.map (i ≫ f) (j ≫ f) (i ≫ f) f (𝟙 N) j (𝟙 _)
          ((Category.comp_id _).trans (Category.id_comp _).symm) (Category.comp_id _) ≫ L.action
            i)