Module

SmoothnessDefect.lean

Nyll.SchemeTheory.LocalGeometry.SmoothnessDefect
20 declarations indexed from sourceView source ↗

Smoothness defect along a discrete valuation ring point

The length of torsion in pulled-back differentials measures the smoothness defect. If the image of the generic point is smooth, this length vanishes exactly when the closed point is smooth. Stalk and section maps connect the invariant to affine cotangent ranks.

Declarations

NeronModelInfra.stalkAlgebraMap

The base ring homomorphism to the stalk induced by a structural morphism.

Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
def stalkAlgebraMap {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
    (x : X) : R →+* X.presheaf.stalk x
NeronModelInfra.stalkAlgebraMap_apply
Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
theorem stalkAlgebraMap_apply {R : Type u} [CommRing R] {X : Scheme.{u}}
    (f : X ⟶ Spec (CommRingCat.of R)) (x : X) (r : R) :
    stalkAlgebraMap f x r =
      (X.presheaf.germ ⊤ x trivial).hom
        (f.appTop.hom ((Scheme.ΓSpecIso (CommRingCat.of R)).inv.hom r))
NeronModelInfra.stalkAlgebra

The base algebra on a stalk induced by the structural morphism.

Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
abbrev stalkAlgebra {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
    (x : X) : Algebra R (X.presheaf.stalk x)
NeronModelInfra.pointAlgebra

The stalk algebra on the local ring defining a scheme-valued point.

Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
abbrev pointAlgebra {X : Scheme.{u}} {R' : Type u} [CommRing R'] [IsLocalRing R']
    (a : Spec (CommRingCat.of R') ⟶ X) :
    Algebra (X.presheaf.stalk (a (IsLocalRing.closedPoint R'))) R'
NeronModelInfra.smoothnessDefect

The length of torsion in the differentials pulled back along a local point.

Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
def smoothnessDefect {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
    {R' : Type u} [CommRing R'] [IsLocalRing R'] (a : Spec (CommRingCat.of R') ⟶ X) : ℕ∞
NeronModelInfra.smoothnessDefect_def
Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
theorem smoothnessDefect_def {R : Type u} [CommRing R] {X : Scheme.{u}}
    (f : X ⟶ Spec (CommRingCat.of R))
    {R' : Type u} [CommRing R'] [IsLocalRing R'] (a : Spec (CommRingCat.of R') ⟶ X) :
    smoothnessDefect f a =
      (letI : Algebra R (X.presheaf.stalk (a (IsLocalRing.closedPoint R'))) :=
        stalkAlgebra f (a (IsLocalRing.closedPoint R'))
      letI : Algebra (X.presheaf.stalk (a (IsLocalRing.closedPoint R'))) R' := pointAlgebra a
      Module.length R'
        (Submodule.torsion R'
          (R' ⊗[X.presheaf.stalk (a (IsLocalRing.closedPoint R'))]
            Ω[X.presheaf.stalk (a (IsLocalRing.closedPoint R'))⁄R]))) :=
  rfl
NeronModelInfra.stalkAlgebraMap_id
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/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
section Gate
variable (R : Type u) [CommRing R]
theorem stalkAlgebraMap_id (p : PrimeSpectrum R) :
    stalkAlgebraMap (𝟙 (Spec (CommRingCat.of R))) p = (StructureSheaf.toStalk R p).hom
NeronModelInfra.smoothnessDefect_id
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/Definitions/Def_NeronModelInfra_SmoothnessDefect.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct
namespace NeronModelInfra
section Gate
variable (R : Type u) [CommRing R]
theorem smoothnessDefect_id {R' : Type u} [CommRing R'] [IsLocalRing R']
    (a : Spec (CommRingCat.of R') ⟶ Spec (CommRingCat.of R)) :
    smoothnessDefect (𝟙 (Spec (CommRingCat.of R))) a = 0
SchemeTheory.LocalGeometry.SmoothnessDefect.stalkMap_toStalk
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section SmoothLocus
variable {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
theorem stalkMap_toStalk (x : X) (r : R) :
    (f.stalkMap x).hom ((StructureSheaf.toStalk R (f x)).hom r) = stalkAlgebraMap f x r
SchemeTheory.LocalGeometry.SmoothnessDefect.mem_smoothLocus_iff
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section SmoothLocus
variable {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
theorem mem_smoothLocus_iff [LocallyOfFinitePresentation f] (x : X) :
    x ∈ f.smoothLocus ↔
      @Algebra.FormallySmooth R (X.presheaf.stalk x) _ _ (stalkAlgebra f x)
SchemeTheory.LocalGeometry.SmoothnessDefect.sectionsAlgebra_isScalarTower
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section SmoothLocus
variable {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
theorem sectionsAlgebra_isScalarTower (V : X.Opens) (x : X) (hxV : x ∈ V) :
    let : Algebra R Γ(X, V) := f.sectionsAlgebra V
    let : Algebra R (X.presheaf.stalk x) := stalkAlgebra f x
    let : Algebra Γ(X, V) (X.presheaf.stalk x) :=
      X.presheaf.algebra_section_stalk (⟨x, hxV⟩ : V)
    IsScalarTower R Γ(X, V) (X.presheaf.stalk x) := by
  intro sectionsAlgebra stalkBaseAlgebra stalkSectionAlgebra
  refine IsScalarTower.of_algebraMap_eq fun r => ?_
  change stalkAlgebraMap f x r = (X.presheaf.germ V x hxV).hom
    ((f.appLE ⊤ V le_top).hom ((Scheme.ΓSpecIso (CommRingCat.of R)).inv.hom r))
  exact congrArg (fun α : Γ(X, ⊤) ⟶ X.presheaf.stalk x =>
    α.hom (f.appTop.hom ((Scheme.ΓSpecIso (CommRingCat.of R)).inv.hom r)))
      (X.presheaf.germ_res (homOfLE (show V ≤ (⊤ : X.Opens) from le_top)) x hxV).symm
SchemeTheory.LocalGeometry.SmoothnessDefect.finiteType_sectionsAlgebra
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section SmoothLocus
variable {R : Type u} [CommRing R] {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R))
theorem finiteType_sectionsAlgebra [LocallyOfFiniteType f] (V : X.Opens) (hV : IsAffineOpen V) :
    letI : Algebra R Γ(X, V) := f.sectionsAlgebra V
    Algebra.FiniteType R Γ(X, V) := by
  have h1 : (f.appLE ⊤ V le_top).hom.FiniteType :=
    f.finiteType_appLE (isAffineOpen_top _) hV le_top
  have h2 : (Scheme.ΓSpecIso (CommRingCat.of R)).inv.hom.FiniteType :=
    RingHom.FiniteType.of_surjective _
      (Scheme.ΓSpecIso (CommRingCat.of R)).symm.commRingCatIsoToRingEquiv.surjective
  exact h1.comp h2
SchemeTheory.LocalGeometry.SmoothnessDefect.pointHom

The map from affine sections to the local ring of a scheme-valued point.

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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section Chart
variable {X : Scheme.{u}} {R' : Type u} [CommRing R'] [IsLocalRing R']
  (a : Spec (CommRingCat.of R') ⟶ X) {V : X.Opens} (hV : IsAffineOpen V)
  (hxV : a (IsLocalRing.closedPoint R') ∈ V)
def pointHom : Γ(X, V) →+* R'
SchemeTheory.LocalGeometry.SmoothnessDefect.eq_specMap_pointHom_comp_fromSpec
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section Chart
variable {X : Scheme.{u}} {R' : Type u} [CommRing R'] [IsLocalRing R']
  (a : Spec (CommRingCat.of R') ⟶ X) {V : X.Opens} (hV : IsAffineOpen V)
  (hxV : a (IsLocalRing.closedPoint R') ∈ V)
theorem eq_specMap_pointHom_comp_fromSpec :
    a = Spec.map (CommRingCat.ofHom (pointHom a hxV)) ≫ hV.fromSpec
SchemeTheory.LocalGeometry.SmoothnessDefect.primeIdealOf_apply
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section Chart
variable {X : Scheme.{u}} {R' : Type u} [CommRing R'] [IsLocalRing R']
  (a : Spec (CommRingCat.of R') ⟶ X) {V : X.Opens} (hV : IsAffineOpen V)
  (hxV : a (IsLocalRing.closedPoint R') ∈ V)
theorem primeIdealOf_apply (P : PrimeSpectrum R') (hP : a P ∈ V) :
    hV.primeIdealOf ⟨a P, hP⟩ = PrimeSpectrum.comap (pointHom a hxV) P
SchemeTheory.LocalGeometry.SmoothnessDefect.finrank_tensor_eq_finrank_residueField_tensor
Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section Ranks
theorem finrank_tensor_eq_finrank_residueField_tensor
    {A : Type*} [CommRing A] (M : Type*) [AddCommGroup M] [Module A M]
    (p : Ideal A) [p.IsPrime] (F : Type*) [Field F] [Algebra A F]
    (hker : RingHom.ker (algebraMap A F) = p) :
    Module.finrank F (F ⊗[A] M) =
      Module.finrank p.ResidueField (p.ResidueField ⊗[A] M)
SchemeTheory.LocalGeometry.SmoothnessDefect.finrank_tensor_kaehler_eq_of_free
Source context 6 commands

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

@[expose] public section
section
/-
Anthropic FLT upstream notice: Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted Anthropic FLT source (pinned revision):
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
section Ranks
theorem finrank_tensor_kaehler_eq_of_free
    {R A B R' : Type u} [CommRing R] [CommRing A] [CommRing B] [CommRing R'] [Nontrivial R']
    [Algebra R A] [Algebra R B] [Algebra A B] [IsScalarTower R A B] [Algebra.FormallyEtale A B]
    [Algebra B R'] [Algebra A R'] [IsScalarTower A B R']
    [Module.Free R' (R' ⊗[B] Ω[B⁄R])]
    (F : Type u) [Field F] [Algebra R' F] [Algebra B F] [Algebra A F]
    [IsScalarTower B R' F] [IsScalarTower A B F] :
    Module.finrank F (F ⊗[A] Ω[A⁄R]) = Module.finrank R' (R' ⊗[B] Ω[B⁄R])
NeronModelInfra.smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus
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_NeronModelInfra_smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus.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 SchemeTheory.LocalGeometry.SmoothnessDefect
open CategoryTheory CategoryTheory.Limits AlgebraicGeometry TensorProduct NeronModelInfra
universe u
theorem _root_.NeronModelInfra.smoothnessDefect_eq_zero_iff_apply_closedPoint_mem_smoothLocus
    {R : Type u} [CommRing R] [IsDomain R] [IsDiscreteValuationRing R]
    {X : Scheme.{u}} (f : X ⟶ Spec (CommRingCat.of R)) [LocallyOfFiniteType f]
    {R' : Type u} [CommRing R'] [IsDomain R'] [IsDiscreteValuationRing R']
    (a : Spec (CommRingCat.of R') ⟶ X)
    (hgen : a (⊥ : PrimeSpectrum R') ∈ f.smoothLocus) :
    smoothnessDefect f a = 0 ↔ a (IsLocalRing.closedPoint R') ∈ f.smoothLocus
NeronModelInfra.ofHom_stalkAlgebraMap_eq
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/Definitions/Def_NeronModelInfra_OmegaMinimalComponentData.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits Opposite AlgebraicGeometry
namespace NeronModelInfra
section StalkAlgebra
variable {R : Type u} [CommRing R] {Y : Scheme.{u}} (f : Y ⟶ Spec (CommRingCat.of R)) (y : Y)
theorem ofHom_stalkAlgebraMap_eq :
    CommRingCat.ofHom (stalkAlgebraMap f y) =
      ((Scheme.ΓSpecIso (CommRingCat.of R)).inv ≫
        (Spec (CommRingCat.of R)).presheaf.germ ⊤ (f.base y) trivial) ≫ f.stalkMap y
NeronModelInfra.fromSpecStalk_comp_eq_specMap_algebraMap_stalkAlgebra
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/Definitions/Def_NeronModelInfra_OmegaMinimalComponentData.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.
-/
noncomputable section
universe u
open CategoryTheory CategoryTheory.Limits Opposite AlgebraicGeometry
namespace NeronModelInfra
section StalkAlgebra
variable {R : Type u} [CommRing R] {Y : Scheme.{u}} (f : Y ⟶ Spec (CommRingCat.of R)) (y : Y)
theorem fromSpecStalk_comp_eq_specMap_algebraMap_stalkAlgebra :
    let : Algebra R (Y.presheaf.stalk y) := stalkAlgebra f y
    Y.fromSpecStalk y ≫ f = Spec.map (CommRingCat.ofHom (algebraMap R (Y.presheaf.stalk y))) := by
  intro stalkBaseAlgebra
  change Y.fromSpecStalk y ≫ f = Spec.map (CommRingCat.ofHom (stalkAlgebraMap f y))
  rw [ofHom_stalkAlgebraMap_eq, Spec.map_comp, ← Scheme.SpecMap_stalkMap_fromSpecStalk f,
    Spec.fromSpecStalk_eq]