Module

TopForms.lean

Nyll.SchemeTheory.RingTheory.Differentials.TopForms
23 declarations indexed from sourceView source ↗

Integral top forms and their orders over a discrete valuation ring

Declarations

NeronModelInfra.TopFormOrder.moduleAlong

Restrict scalars along the chosen algebra map.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
def moduleAlong (N : Type u) [AddCommGroup N] [Module F N] : Module O N
NeronModelInfra.TopFormOrder.ιMultiAlong

The alternating map induced by the map of Kähler differentials.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
def ιMultiAlong :
    let _ : Module O (⋀[F]^d (Ω[F⁄K'])) := moduleAlong O F (⋀[F]^d (Ω[F⁄K']))
    (Ω[O⁄R']) [⋀^Fin d]→ₗ[O] (⋀[F]^d (Ω[F⁄K'])) := by
  intro mO
  have hTower : IsScalarTower O F (⋀[F]^d (Ω[F⁄K'])) :=
    IsScalarTower.of_algebraMap_smul fun _ _ => rfl
  exact { (@MultilinearMap.restrictScalars O _ (Fin d) (fun _ => Ω[F⁄K'])
      (⋀[F]^d (Ω[F⁄K'])) _ _ _ F _ _ _ _ mO (fun _ => inferInstance) hTower
      (exteriorPower.ιMulti F d (M := Ω[F⁄K'])).toMultilinearMap).compLinearMap
      (fun _ => KaehlerDifferential.map R' K' O F) with
    map_eq_zero_of_eq' := fun v i j h hij =>
      (exteriorPower.ιMulti F d (M := Ω[F⁄K'])).map_eq_zero_of_eq _ (congrArg
        (KaehlerDifferential.map R' K' O F) h) hij }
NeronModelInfra.TopFormOrder.topFormMap

Base change of top exterior powers of Kähler differentials.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
def topFormMap :
    let _ : Module O (⋀[F]^d (Ω[F⁄K'])) := moduleAlong O F (⋀[F]^d (Ω[F⁄K']))
    ⋀[O]^d (Ω[O⁄R']) →ₗ[O] ⋀[F]^d (Ω[F⁄K']) := by
  intro targetModule
  exact exteriorPower.alternatingMapLinearEquiv (ιMultiAlong R' K' O F d)
NeronModelInfra.TopFormOrder.integralTopForms

The integral lattice generated by top forms before base change.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
def integralTopForms :
    let _ : Module O (⋀[F]^d (Ω[F⁄K'])) := moduleAlong O F (⋀[F]^d (Ω[F⁄K']))
    Submodule O (⋀[F]^d (Ω[F⁄K'])) := by
  intro targetModule
  exact LinearMap.range (topFormMap R' K' O F d)
NeronModelInfra.TopFormOrder.maximalSpectrum

The height-one point determined by the maximal ideal of a DVR.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
section Order
variable [IsDomain O] [IsDiscreteValuationRing O]
variable (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] [Algebra K' L] [Algebra R' L]
  [IsScalarTower R' O L] [IsScalarTower R' K' L]
open IsDedekindDomain IsLocalRing in
def maximalSpectrum : HeightOneSpectrum O
NeronModelInfra.TopFormOrder.addOrd

The additive order of a nonzero fraction, extended by zero at zero.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
section Order
variable [IsDomain O] [IsDiscreteValuationRing O]
variable (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] [Algebra K' L] [Algebra R' L]
  [IsScalarTower R' O L] [IsScalarTower R' K' L]
open IsDedekindDomain in
def addOrd (a : L) : ℤ
NeronModelInfra.TopFormOrder.ord

The order of a top form with respect to its integral lattice.

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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
section Order
variable [IsDomain O] [IsDiscreteValuationRing O]
variable (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] [Algebra K' L] [Algebra R' L]
  [IsScalarTower R' O L] [IsScalarTower R' K' L]
def ord (ω : ⋀[L]^d (Ω[L⁄K'])) : ℤ
NeronModelInfra.TopFormOrder.addOrd_uniformizer
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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
section Order
variable [IsDomain O] [IsDiscreteValuationRing O]
variable (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] [Algebra K' L] [Algebra R' L]
  [IsScalarTower R' O L] [IsScalarTower R' K' L]
omit K' d in
theorem addOrd_uniformizer (ϖ : O) (hϖ : IsLocalRing.maximalIdeal O = Ideal.span {ϖ}) :
    addOrd O L (algebraMap O L ϖ) = 1
NeronModelInfra.TopFormOrder.addOrd_uniformizer_sq
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/Definitions/Def_NeronModelInfra_TopFormOrder.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 scoped TensorProduct
namespace NeronModelInfra.TopFormOrder
variable (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
  [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
  [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ)
section Order
variable [IsDomain O] [IsDiscreteValuationRing O]
variable (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] [Algebra K' L] [Algebra R' L]
  [IsScalarTower R' O L] [IsScalarTower R' K' L]
omit K' d in
theorem addOrd_uniformizer_sq (ϖ : O) (hϖ : IsLocalRing.maximalIdeal O = Ideal.span {ϖ}) :
    addOrd O L (algebraMap O L ϖ ^ 2) = 2
AbelianVarieties.NOSProofs.TopFormBasis.BenchLTopLine.orderEmbedding_fin_eq_id
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_TopFormOrder_topFormMap_iotaMulti_ne_zero_and_forall_exists_smul_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.TopFormBasis
universe u
open NeronModelInfra.TopFormOrder
namespace BenchLTopLine
theorem orderEmbedding_fin_eq_id {d : ℕ} (f : Fin d ↪o Fin d) : (f : Fin d → Fin d) = id
NeronModelInfra.TopFormOrder.topFormMap_iotaMulti_ne_zero_and_forall_exists_smul_eq
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_TopFormOrder_topFormMap_iotaMulti_ne_zero_and_forall_exists_smul_eq.lean
Upstream NOTICE: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/NOTICE
Upstream per-file ATTRIBUTION: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/ATTRIBUTION.md
Copies of these notices are retained in the AbelianVarieties directory.
Existing upstream author/copyright comments in the source are retained below.

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace AbelianVarieties.NOSProofs.TopFormBasis
universe u
open NeronModelInfra.TopFormOrder
theorem _root_.NeronModelInfra.TopFormOrder.topFormMap_iotaMulti_ne_zero_and_forall_exists_smul_eq
    (R K O F : Type u) [CommRing R] [IsDomain R] [Field K] [Algebra R K] [IsFractionRing R K]
    [CommRing O] [IsDomain O] [Algebra R O] [Field F] [Algebra O F] [IsFractionRing O F]
    [Algebra K F] [Algebra R F] [IsScalarTower R O F] [IsScalarTower R K F]
    (d : ℕ) (b : Module.Basis (Fin d) O (Ω[O⁄R])) :
    let _ : Module O (⋀[F]^d (Ω[F⁄K])) := moduleAlong O F (⋀[F]^d (Ω[F⁄K]))
    topFormMap R K O F d (exteriorPower.ιMulti O d b) ≠ 0 ∧
      ∀ ω : ⋀[F]^d (Ω[F⁄K]), ∃ a : F, ω = a • topFormMap R K O F d (exteriorPower.ιMulti O d b) :=
        by
  intro targetModule
  set v : Fin d → Ω[F⁄K] := fun i => KaehlerDifferential.map R K O F (b i) with hv
  have hρ : topFormMap R K O F d (exteriorPower.ιMulti O d b) = exteriorPower.ιMulti F d v := by
    change exteriorPower.alternatingMapLinearEquiv (ιMultiAlong R K O F d) (exteriorPower.ιMulti O
      d b) = _
    rw [exteriorPower.alternatingMapLinearEquiv_apply_ιMulti]
    rfl
  have : IsLocalizedModule (nonZeroDivisors O) (KaehlerDifferential.map R R O F) :=
    KaehlerDifferential.isLocalizedModule_map R O F (nonZeroDivisors O)
  let b₁ : Module.Basis (Fin d) F (Ω[F⁄R]) :=
    b.ofIsLocalizedModule F (nonZeroDivisors O) (KaehlerDifferential.map R R O F)
  have hinj : Function.Injective (KaehlerDifferential.map R K F F) := by
    have : Algebra.FormallyUnramified R K :=
      Algebra.FormallyUnramified.of_isLocalization (nonZeroDivisors R)
    rw [← LinearMap.ker_eq_bot, LinearMap.exact_iff.mp
      (KaehlerDifferential.exact_mapBaseChange_map R K F),
      LinearMap.range_eq_bot]
    refine LinearMap.ext fun x => ?_
    induction x using TensorProduct.inductionOn with
    | tmul a y => rw [Subsingleton.elim y 0, TensorProduct.tmul_zero, map_zero,
      LinearMap.zero_apply]
    | add x y hx hy => simp only [map_add, hx, hy, LinearMap.zero_apply, add_zero]
  let e : Ω[F⁄R] ≃ₗ[F] Ω[F⁄K] :=
    LinearEquiv.ofBijective (KaehlerDifferential.map R K F F) ⟨hinj,
      KaehlerDifferential.map_surjective R K F⟩
  let b₂ : Module.Basis (Fin d) F (Ω[F⁄K]) := b₁.map e
  have hcomp : ∀ x : Ω[O⁄R], KaehlerDifferential.map R K F F (KaehlerDifferential.map R R O F x) =
      KaehlerDifferential.map R K O F x := by
    intro x
    have hx : x ∈ Submodule.span O (Set.range (KaehlerDifferential.D R O)) := by
      rw [KaehlerDifferential.span_range_derivation]; trivial
    induction hx using Submodule.span_induction with
    | mem x hx =>
        obtain ⟨o, rfl⟩ := hx
        rw [KaehlerDifferential.map_D, KaehlerDifferential.map_D, KaehlerDifferential.map_D]
        rfl
    | zero => simp only [map_zero]
    | add x y _ _ hx hy => rw [map_add, map_add, map_add, hx, hy]
    | smul o x _ hx =>
        rw [LinearMap.map_smul, LinearMap.map_smul, ← hx, ← algebraMap_smul F o
          (KaehlerDifferential.map R R O F x),
          LinearMap.map_smul, algebraMap_smul]
  have hb₂ : (b₂ : Fin d → Ω[F⁄K]) = v := by
    funext i
    simp only [b₂, b₁, Module.Basis.map_apply, Module.Basis.ofIsLocalizedModule_apply]
    exact hcomp (b i)
  let B := b₂.exteriorPower d
  let s₀ : Set.powersetCard (Fin d) d := ⟨Finset.univ, by simp only [Set.powersetCard.mem_iff,
    Finset.card_univ, Fintype.card_fin]⟩
  have hs : ∀ s : Set.powersetCard (Fin d) d, s = s₀ := by
    intro s
    apply Subtype.ext
    change s.val = Finset.univ
    exact Finset.eq_univ_of_card s.val (by rw [Fintype.card_fin]; exact s.prop)
  have hB : B s₀ = exteriorPower.ιMulti F d v := by
    rw [show B s₀ = exteriorPower.ιMulti_family F d b₂ s₀ from exteriorPower.basis_apply F d b₂ s₀]
    unfold exteriorPower.ιMulti_family
    rw [hb₂]
    congr 1
    funext i
    change v ((Set.powersetCard.ofFinEmbEquiv.symm s₀ : Fin d ↪o Fin d) i) = v i
    rw [BenchLTopLine.orderEmbedding_fin_eq_id]
    rfl
  rw [hρ]
  refine ⟨?_, fun ω => ?_⟩
  · rw [← hB]; exact B.ne_zero s₀
  · refine ⟨B.repr ω s₀, ?_⟩
    rw [← hB]
    conv_lhs => rw [← B.sum_repr ω]
    rw [Fintype.sum_eq_single s₀ (fun s hs' => absurd (hs s) hs')]
AbelianVarieties.NOSProofs.TopFormNonvanishing.P2mFrameNZ.exists_smul_ιMulti_and_smul_injective
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_TopFormOrder_topFormMap_ne_zero_of_bijective_smul_of_isLocalization.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.TopFormNonvanishing
universe u
open NeronModelInfra NeronModelInfra.TopFormOrder
namespace P2mFrameNZ
theorem exists_smul_ιMulti_and_smul_injective {A M : Type u} [CommRing A] [AddCommGroup M] [Module
  A M]
    (d : ℕ) (b : Module.Basis (Fin d) A M) :
    (∀ η : ⋀[A]^d M, ∃ c : A, η = c • exteriorPower.ιMulti A d b) ∧
      ∀ c c' : A, c • exteriorPower.ιMulti A d b = c' • exteriorPower.ιMulti A d b → c = c'
AbelianVarieties.NOSProofs.TopFormNonvanishing.P2mFrameNZ.main
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_TopFormOrder_topFormMap_ne_zero_of_bijective_smul_of_isLocalization.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.TopFormNonvanishing
universe u
open NeronModelInfra NeronModelInfra.TopFormOrder
namespace P2mFrameNZ
theorem main
    (K A F : Type u) [Field K] [CommRing A] [Algebra K A] [Field F] [Algebra A F] [Algebra K F]
    [IsScalarTower K A F] (M : Submonoid A) [IsLocalization M F]
    (d : ℕ) (b : Module.Basis (Fin d) A (Ω[A⁄K]))
    (ω : ⋀[A]^d (Ω[A⁄K])) (hω : Function.Bijective fun g : A => g • ω) :
    topFormMap K K A F d ω ≠ 0 := by
  classical
  let _ : Module A (⋀[F]^d (Ω[F⁄K])) := moduleAlong A F (⋀[F]^d (Ω[F⁄K]))
  obtain ⟨hspan, hfree⟩ := exists_smul_ιMulti_and_smul_injective d b
  obtain ⟨c, hc⟩ := hspan ω
  obtain ⟨g, hg⟩ := hω.2 (exteriorPower.ιMulti A d b)
  have hgc : g * c = 1 := by
    have h1 : (g * c) • exteriorPower.ιMulti A d b = (1 : A) • exteriorPower.ιMulti A d b := by
      rw [mul_smul, ← hc, one_smul]; exact hg
    exact hfree _ _ h1
  have hcU : IsUnit c := IsUnit.of_mul_eq_one g (by rw [mul_comm]; exact hgc)
  set v : Fin d → Ω[F⁄K] := fun i => KaehlerDifferential.map K K A F (b i) with hv
  have hρ : topFormMap K K A F d (exteriorPower.ιMulti A d b) = exteriorPower.ιMulti F d v := by
    change exteriorPower.alternatingMapLinearEquiv (ιMultiAlong K K A F d) (exteriorPower.ιMulti A
      d b) = _
    rw [exteriorPower.alternatingMapLinearEquiv_apply_ιMulti]
    rfl
  have : IsLocalizedModule M (KaehlerDifferential.map K K A F) :=
    KaehlerDifferential.isLocalizedModule_map K A F M
  let bF : Module.Basis (Fin d) F (Ω[F⁄K]) := b.ofIsLocalizedModule F M (KaehlerDifferential.map K
    K A F)
  have hbF : (bF : Fin d → Ω[F⁄K]) = v := by
    funext i
    simp only [bF, Module.Basis.ofIsLocalizedModule_apply, hv]
  obtain ⟨_, hfreeF⟩ := exists_smul_ιMulti_and_smul_injective d bF
  rw [hbF] at hfreeF
  have hω' : topFormMap K K A F d ω = algebraMap A F c • exteriorPower.ιMulti F d v := by
    rw [hc, LinearMap.map_smul, hρ]
    rfl
  rw [hω']
  intro h0
  have := hfreeF _ 0 (by rw [h0, zero_smul])
  exact (hcU.map (algebraMap A F)).ne_zero this
NeronModelInfra.TopFormOrder.topFormMap_ne_zero_of_bijective_smul_of_isLocalization
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_TopFormOrder_topFormMap_ne_zero_of_bijective_smul_of_isLocalization.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.TopFormNonvanishing
universe u
open NeronModelInfra NeronModelInfra.TopFormOrder
theorem _root_.NeronModelInfra.TopFormOrder.topFormMap_ne_zero_of_bijective_smul_of_isLocalization
    (K A F : Type u) [Field K] [CommRing A] [Algebra K A] [Field F] [Algebra A F] [Algebra K F]
    [IsScalarTower K A F] (M : Submonoid A) [IsLocalization M F]
    (d : ℕ) (b : Module.Basis (Fin d) A (Ω[A⁄K]))
    (ω : ⋀[A]^d (Ω[A⁄K])) (hω : Function.Bijective fun g : A => g • ω) :
    NeronModelInfra.TopFormOrder.topFormMap K K A F d ω ≠ 0 :=
  P2mFrameNZ.main K A F M d b ω hω
AbelianVarieties.NOSProofs.TopFormComposition.BenchOTFMComp.kaehlerMap_kaehlerMap
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_TopFormOrder_topFormMap_topFormMap.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.TopFormComposition
open NeronModelInfra.TopFormOrder
universe u
namespace BenchOTFMComp
theorem kaehlerMap_kaehlerMap
    (R₁ R₂ R₃ O₁ O₂ O₃ : Type u) [CommRing R₁] [CommRing R₂] [CommRing R₃]
    [CommRing O₁] [CommRing O₂] [CommRing O₃]
    [Algebra R₁ R₂] [Algebra R₂ R₃] [Algebra R₁ R₃] [IsScalarTower R₁ R₂ R₃]
    [Algebra R₁ O₁] [Algebra R₂ O₂] [Algebra R₃ O₃]
    [Algebra O₁ O₂] [Algebra O₂ O₃] [Algebra O₁ O₃] [IsScalarTower O₁ O₂ O₃]
    [Algebra R₁ O₂] [IsScalarTower R₁ O₁ O₂] [IsScalarTower R₁ R₂ O₂]
    [Algebra R₂ O₃] [IsScalarTower R₂ O₂ O₃] [IsScalarTower R₂ R₃ O₃]
    [Algebra R₁ O₃] [IsScalarTower R₁ O₁ O₃] [IsScalarTower R₁ R₃ O₃]
    (x : Ω[O₁⁄R₁]) :
    KaehlerDifferential.map R₂ R₃ O₂ O₃ (KaehlerDifferential.map R₁ R₂ O₁ O₂ x) =
      KaehlerDifferential.map R₁ R₃ O₁ O₃ x
AbelianVarieties.NOSProofs.TopFormComposition.BenchOTFMComp.topFormMap_ιMulti
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_TopFormOrder_topFormMap_topFormMap.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.TopFormComposition
open NeronModelInfra.TopFormOrder
universe u
namespace BenchOTFMComp
theorem topFormMap_ιMulti (R' K' O F : Type u) [CommRing R'] [CommRing K'] [Algebra R' K']
    [CommRing O] [Algebra R' O] [CommRing F] [Algebra O F] [Algebra K' F] [Algebra R' F]
    [IsScalarTower R' O F] [IsScalarTower R' K' F] (d : ℕ) (v : Fin d → Ω[O⁄R']) :
    topFormMap R' K' O F d (exteriorPower.ιMulti O d v) =
      exteriorPower.ιMulti F d (fun i => KaehlerDifferential.map R' K' O F (v i)) := by
  let _ : Module O (⋀[F]^d (Ω[F⁄K'])) := moduleAlong O F (⋀[F]^d (Ω[F⁄K']))
  change exteriorPower.alternatingMapLinearEquiv (ιMultiAlong R' K' O F d) (exteriorPower.ιMulti O
    d v) = _
  rw [exteriorPower.alternatingMapLinearEquiv_apply_ιMulti]
  rfl
NeronModelInfra.TopFormOrder.topFormMap_topFormMap
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_TopFormOrder_topFormMap_topFormMap.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.TopFormComposition
open NeronModelInfra.TopFormOrder
universe u
theorem _root_.NeronModelInfra.TopFormOrder.topFormMap_topFormMap
    (R₁ R₂ R₃ O₁ O₂ O₃ : Type u) [CommRing R₁] [CommRing R₂] [CommRing R₃]
    [CommRing O₁] [CommRing O₂] [CommRing O₃]
    [Algebra R₁ R₂] [Algebra R₂ R₃] [Algebra R₁ R₃] [IsScalarTower R₁ R₂ R₃]
    [Algebra R₁ O₁] [Algebra R₂ O₂] [Algebra R₃ O₃]
    [Algebra O₁ O₂] [Algebra O₂ O₃] [Algebra O₁ O₃] [IsScalarTower O₁ O₂ O₃]
    [Algebra R₁ O₂] [IsScalarTower R₁ O₁ O₂] [IsScalarTower R₁ R₂ O₂]
    [Algebra R₂ O₃] [IsScalarTower R₂ O₂ O₃] [IsScalarTower R₂ R₃ O₃]
    [Algebra R₁ O₃] [IsScalarTower R₁ O₁ O₃] [IsScalarTower R₁ R₃ O₃]
    (d : ℕ) (η : ⋀[O₁]^d (Ω[O₁⁄R₁])) :
    topFormMap R₂ R₃ O₂ O₃ d (topFormMap R₁ R₂ O₁ O₂ d η) = topFormMap R₁ R₃ O₁ O₃ d η
AbelianVarieties.NOSProofs.TopFormValuation.OCA.addOrd_of_ne_zero
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_NeronModelInfra_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
namespace OCA
open NeronModelInfra.TopFormOrder IsDedekindDomain
variable (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
  (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L]
lemma addOrd_of_ne_zero {a : L} (ha : a ≠ 0) :
    addOrd O L a = -(Multiplicative.toAdd (WithZero.unzero
      (((maximalSpectrum O).valuation L).ne_zero_iff.mpr ha)))
AbelianVarieties.NOSProofs.TopFormValuation.OCA.addOrd_mul
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_NeronModelInfra_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
namespace OCA
open NeronModelInfra.TopFormOrder IsDedekindDomain
variable (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
  (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L]
lemma addOrd_mul {a b : L} (ha : a ≠ 0) (hb : b ≠ 0) :
    addOrd O L (a * b) = addOrd O L a + addOrd O L b
AbelianVarieties.NOSProofs.TopFormValuation.OCA.unzero_le_one
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_NeronModelInfra_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
namespace OCA
open NeronModelInfra.TopFormOrder IsDedekindDomain
variable (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
  (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L]
lemma unzero_le_one {x : O} (hx : x ≠ 0) :
    WithZero.unzero (((maximalSpectrum O).valuation L).ne_zero_iff.mpr
      ((map_ne_zero_iff _ (IsFractionRing.injective O L)).mpr hx)) ≤ 1
AbelianVarieties.NOSProofs.TopFormValuation.OCA.addOrd_algebraMap_nonneg
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_NeronModelInfra_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
namespace OCA
open NeronModelInfra.TopFormOrder IsDedekindDomain
variable (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
  (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L]
lemma addOrd_algebraMap_nonneg (x : O) : 0 ≤ addOrd O L (algebraMap O L x)
AbelianVarieties.NOSProofs.TopFormValuation.OCA.addOrd_algebraMap_eq_zero_iff
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_NeronModelInfra_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
namespace OCA
open NeronModelInfra.TopFormOrder IsDedekindDomain
variable (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
  (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L]
lemma addOrd_algebraMap_eq_zero_iff {x : O} (hx : x ≠ 0) :
    addOrd O L (algebraMap O L x) = 0 ↔ IsUnit x
NeronModelInfra.TopFormOrder.addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer
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_TopFormOrder_addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer.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.TopFormValuation
universe u
open NeronModelInfra.TopFormOrder
theorem _root_.NeronModelInfra.TopFormOrder.addOrd_mul_and_nonneg_and_eq_zero_iff_and_uniformizer
    (O : Type u) [CommRing O] [IsDomain O] [IsDiscreteValuationRing O]
    (L : Type u) [Field L] [Algebra O L] [IsFractionRing O L] :
    (∀ a b : L, a ≠ 0 → b ≠ 0 → addOrd O L (a * b) = addOrd O L a + addOrd O L b) ∧
    (∀ x : O, 0 ≤ addOrd O L (algebraMap O L x)) ∧
    (∀ x : O, x ≠ 0 → (addOrd O L (algebraMap O L x) = 0 ↔ IsUnit x)) ∧
    (∀ (R' : Type u) [CommRing R'] [IsDomain R'] [IsDiscreteValuationRing R'] [Algebra R' O]
      [IsLocalHom (algebraMap R' O)],
      Ideal.map (algebraMap R' O) (IsLocalRing.maximalIdeal R') = IsLocalRing.maximalIdeal O →
      ∀ π : R', IsLocalRing.maximalIdeal R' = Ideal.span {π} →
        addOrd O L (algebraMap O L (algebraMap R' O π)) = 1)