Module

Basis.lean

Nyll.AbelianVarieties.Tate.Basis
19 declarations indexed from sourceView source ↗

Bases of prime-power Tate modules from torsion cardinalities

For an arbitrary additive commutative group, the cardinalities of all actual p-power torsion subgroups give a compatible p-adic basis. This is the general rank construction; no elliptic-curve or rank-two specialization is imported. The cardinality hypothesis must still be supplied from the geometry of the abelian variety before applying this theorem in the NOS development.

Imports9
  • Mathlib.Algebra.Group.Subgroup.Finite
  • Mathlib.Algebra.Module.ZMod
  • Mathlib.FieldTheory.Finiteness
  • Mathlib.GroupTheory.Coset.Card
  • Mathlib.GroupTheory.QuotientGroup.Basic
  • Mathlib.LinearAlgebra.Dimension.Free
  • Mathlib.LinearAlgebra.LinearIndependent.Lemmas
  • Mathlib.Tactic.Choose
  • Nyll.AbelianVarieties.Tate.PrimePower
Imported by4

Declarations

TateModule.BasisProofs.finite_torsionBy'
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem finite_torsionBy' [Fact p.Prime]
    (hcard : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) (n : ℕ) :
    Finite (torsionBy ℤ M ((p ^ n : ℕ) : ℤ))
TateModule.BasisProofs.mulP_surjective'
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem mulP_surjective' [Fact p.Prime]
    (hcard : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) (n : ℕ) :
    Function.Surjective (mulP p M n)
TateModule.BasisProofs.proj_surjective'
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem proj_surjective' [Fact p.Prime]
    (hcard : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) (n : ℕ) :
    ∀ m ∈ torsionBy ℤ M ((p ^ n : ℕ) : ℤ), ∃ x : TateModule p M, proj p M n x = m
TateModule.BasisProofs.exists_tuple_of_card_eq_pow
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem exists_tuple_of_card_eq_pow [Fact p.Prime] {V : Type u} [AddCommGroup V]
    [Module (ZMod p) V] [Finite V] (hV : Nat.card V = p ^ r) :
    ∃ v : Fin r → V, ∀ a : Fin r → ℤ, ∑ i, a i • v i = 0 → ∀ i, (p : ℤ) ∣ a i
TateModule.BasisProofs.exists_indep_tuple_torsionBy_one
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem exists_indep_tuple_torsionBy_one [Fact p.Prime]
    (hcard : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) :
    ∃ e : Fin r → M, (∀ i, e i ∈ torsionBy ℤ M ((p ^ 1 : ℕ) : ℤ)) ∧
      ∀ a : Fin r → ℤ, ∑ i, a i • e i = 0 → ∀ i, (p : ℤ) ∣ a i
TateModule.BasisProofs.exists_tuple'
Source context 6 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
theorem exists_tuple' [Fact p.Prime]
    (hcard : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) :
    ∃ x : Fin r → TateModule p M,
      ∀ a : Fin r → ℤ, ∑ i, a i • ((x i : ℕ → M)) 1 = 0 → ∀ i, (p : ℤ) ∣ a i
TateModule.BasisProofs.dvd_of_rel_apply
Source context 8 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
omit [Fact p.Prime] in
theorem dvd_of_rel_apply {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 →
      ∀ i, (p : ℤ) ∣ a i) :
    ∀ (n : ℕ) (a : Fin r → ℤ), (∑ i, a i • ((x i : TateModule p M) : ℕ → M) n) = 0 →
      ∀ i, ((p ^ n : ℕ) : ℤ) ∣ a i
TateModule.BasisProofs.levelMap
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
def levelMap (x : Fin r → TateModule p M) (n : ℕ)
    (c : Fin r → ZMod (p ^ n)) : torsionBy ℤ M ((p ^ n : ℕ) : ℤ)
TateModule.BasisProofs.levelMap_injective
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem levelMap_injective {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 → ∀ i, (p : ℤ) ∣ a i)
    (n : ℕ) : Function.Injective (levelMap x n)
TateModule.BasisProofs.levelMap_bijective
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem levelMap_bijective
    (hcard' : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r)
    {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 → ∀ i, (p : ℤ) ∣ a i)
    (n : ℕ) : Function.Bijective (levelMap x n)
TateModule.BasisProofs.exists_eq_levelMap
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem exists_eq_levelMap
    (hcard' : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r)
    {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 → ∀ i, (p : ℤ) ∣ a i)
    (n : ℕ) {m : M} (hm : m ∈ torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) :
    ∃ a : Fin r → ℕ, (∑ i, (a i : ℤ) • ((x i : TateModule p M) : ℕ → M) n) = m
TateModule.BasisProofs.coe_sum_apply
Source context 8 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
omit [Fact p.Prime] in
theorem coe_sum_apply (f : Fin r → TateModule p M) (n : ℕ) :
    ((∑ i, f i : TateModule p M) : ℕ → M) n = ∑ i, ((f i : TateModule p M) : ℕ → M) n
TateModule.BasisProofs.linearIndependent_tuple
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem linearIndependent_tuple {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 →
      ∀ i, (p : ℤ) ∣ a i) :
    LinearIndependent ℤ_[p] x
TateModule.BasisProofs.mem_span_tuple
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem mem_span_tuple
    (hcard' : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r)
    {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 → ∀ i, (p : ℤ) ∣ a i)
    (z : TateModule p M) : ∃ s : Fin r → ℤ_[p], (∑ i, s i • x i) = z
TateModule.BasisProofs.top_le_span_tuple
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
theorem top_le_span_tuple
    (hcard' : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r)
    {x : Fin r → TateModule p M}
    (h1 : ∀ a : Fin r → ℤ, (∑ i, a i • ((x i : TateModule p M) : ℕ → M) 1) = 0 →
      ∀ i, (p : ℤ) ∣ a i) :
    ⊤ ≤ span ℤ_[p] (Set.range x)
TateModule.BasisProofs.basisOfCardPow
Source context 7 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
namespace TateModule.BasisProofs
open Submodule TateModule
variable {p : ℕ} {M : Type u} [AddCommGroup M] {r : ℕ}
variable [Fact p.Prime]
def basisOfCardPow
    (hcard' : ∀ n : ℕ, Nat.card (torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) :
    Module.Basis (Fin r) ℤ_[p] (TateModule p M)
TateModule.nonempty_basis_of_card_torsionBy

The expected prime-power torsion cardinalities give a p-adic basis of rank r.

Source context 3 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization:
https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_of_card_torsionBy.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

Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
theorem TateModule.nonempty_basis_of_card_torsionBy
    (p : ℕ) [Fact p.Prime] {M : Type u} [AddCommGroup M] (r : ℕ)
    (hcard : ∀ n : ℕ, Nat.card (Submodule.torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) :
    Nonempty (Module.Basis (Fin r) ℤ_[p] (TateModule p M))
TateModule.exists_proj_eq_of_mem_torsionBy

Every prime-power torsion point lifts to a compatible Tate sequence.

Source context 3 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization.
Source: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_and_forall_exists_proj_eq_of_natCard_torsionBy_eq_pow.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
Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
theorem TateModule.exists_proj_eq_of_mem_torsionBy
    (p : ℕ) [Fact p.Prime] {M : Type u} [AddCommGroup M] (r : ℕ)
    (hcard : ∀ n : ℕ, Nat.card (Submodule.torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r)
    (n : ℕ) (m : M) (hm : m ∈ Submodule.torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) :
    ∃ x : TateModule p M, TateModule.proj p M n x = m
TateModule.nonempty_basis_and_forall_exists_proj_eq_of_natCard_torsionBy_eq_pow

The cardinalities give both a basis and surjectivity onto every torsion level.

Source context 3 commands

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

@[expose] public section
universe u
section
/-
Copyright 2026 Anthropic, PBC.
Released under Apache 2.0 license as described in the file LICENSE.
Adapted from Anthropic's Fermat's Last Theorem formalization.
Source: https://github.com/anthropics/fermats-last-theorem/blob/6e837e75355538c7f80bab5b956861e86c4eacc2/P2M/Sol/S_TateModule_nonempty_basis_and_forall_exists_proj_eq_of_natCard_torsionBy_eq_pow.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
Local adaptation and maintenance: Naganori Yamaguchi (https://github.com/n-yamaguchi-0729).
AI assistance in local adaptation and maintenance: OpenAI Codex.
-/
theorem TateModule.nonempty_basis_and_forall_exists_proj_eq_of_natCard_torsionBy_eq_pow
    (p : ℕ) [Fact p.Prime] (M : Type u) [AddCommGroup M] (r : ℕ)
    (hcard : ∀ n : ℕ, Nat.card (Submodule.torsionBy ℤ M ((p ^ n : ℕ) : ℤ)) = (p ^ n) ^ r) :
    Nonempty (Module.Basis (Fin r) ℤ_[p] (TateModule p M)) ∧
    ∀ (n : ℕ) (m : M), ((p ^ n : ℕ) : ℤ) • m = 0 →
      ∃ x : TateModule p M, (x : ℕ → M) n = m