Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

FLT.Assumptions.MazurProof.RamifiedDlog source foundation

Definition
MazurN13_FLT_Assumptions_MazurProof_RamifiedDlog_p0

by FormallyCorrect · Oct 7, 2026 · Mathlib 0df444a (Lean v4.33.1)

mazur-torsion

Definitions and supporting proofs for the order-thirteen exclusion, retained from the indicated source commands.

Definition code
/- Port source: https://github.com/xiangyazi24/FLT @ 51bbb4f191ad0d3753b87123635c100a638ae580
Module: FLT.Assumptions.MazurProof.RamifiedDlog
Original leading source comments and nonproject imports are retained below. -/
import Definitions.Def_MazurN13_FLT_Assumptions_MazurProof_FakeSquareClass_p0
import Mathlib.Algebra.DualNumber

set_option autoImplicit false




/-!
# The first ramified logarithm

For a field `k`, the units of the dual-number ring
`k[ε] = k ⊕ εk`, `ε² = 0`, have a canonical first-order logarithm

`a + εb ↦ b / a`.

It is additive under multiplication.  In characteristic two it kills
squares, as well as constant units.  This is the structural finite quotient
used by the local N13 fake-descent calculation at two.
-/

namespace MazurProof.RamifiedDlog

open TrivSqZeroExt

noncomputable section

variable {k : Type*} [Field k]

local instance dualNumberUnitsIsMulCommutative :
    IsMulCommutative (DualNumber k)ˣ :=
  IsMulCommutative.of_comm fun a b => by
    apply Units.ext
    exact mul_comm (a : DualNumber k) (b : DualNumber k)

/-- The residue of a dual-number unit is nonzero. -/
theorem fst_ne_zero (z : (DualNumber k)ˣ) :
    fst (z : DualNumber k) ≠ 0 := by
  have hz :
      IsUnit (fst (z : DualNumber k)) :=
    z.isUnit.map (fstHom k k k).toRingHom
  exact hz.ne_zero

/-- The first ramified logarithm on a dual-number unit. -/
def dlog (z : (DualNumber k)ˣ) : k :=
  snd (z : DualNumber k) / fst (z : DualNumber k)

@[simp] theorem dlog_one : dlog (1 : (DualNumber k)ˣ) = 0 := by
  simp [dlog]

theorem dlog_eq_zero_iff (z : (DualNumber k)ˣ) :
    dlog z = 0 ↔ snd (z : DualNumber k) = 0 := by
  simp [dlog, fst_ne_zero z]

/-- Package `a + εb` as a unit when its residue `a` is nonzero. -/
def unitOf (a b : k) (ha : a ≠ 0) : (DualNumber k)ˣ :=
  ((isUnit_iff_isUnit_fst (x := ((a, b) : DualNumber k))).2
    (isUnit_iff_ne_zero.mpr ha)).unit

@[simp] theorem unitOf_val (a b : k) (ha : a ≠ 0) :
    (unitOf a b ha : DualNumber k) = (a, b) :=
  by
    unfold unitOf
    exact IsUnit.unit_spec _

@[simp] theorem dlog_unitOf (a b : k) (ha : a ≠ 0) :
    dlog (unitOf a b ha) = b / a := by
  simp [dlog]

theorem dlog_mul (z w : (DualNumber k)ˣ) :
    dlog (z * w) = dlog z + dlog w := by
  simp only [dlog, Units.val_mul, fst_mul, DualNumber.snd_mul]
  field_simp [fst_ne_zero z, fst_ne_zero w]
  ring

/-- The ramified logarithm as a homomorphism from multiplicative units to
the additive residue field. -/
def dlogHom : (DualNumber k)ˣ →* Multiplicative k where
  toFun z := Multiplicative.ofAdd (dlog z)
  map_one' := by simp
  map_mul' z w := by
    exact congrArg Multiplicative.ofAdd (dlog_mul z w)

@[simp] theorem dlogHom_apply (z : (DualNumber k)ˣ) :
    dlogHom z = Multiplicative.ofAdd (dlog z) := rfl

/-- A constant nonzero residue gives a dual-number unit. -/
def constantUnit (a : kˣ) : (DualNumber k)ˣ :=
  Units.map (algebraMap k (DualNumber k)).toMonoidHom a

@[simp] theorem constantUnit_val (a : kˣ) :
    (constantUnit a : DualNumber k) = inl (a : k) := rfl

@[simp] theorem dlog_constantUnit (a : kˣ) :
    dlog (constantUnit a) = 0 := by
  simp [dlog]

/-- In characteristic two every square has zero first ramified logarithm. -/
theorem dlog_sq [CharP k 2] (z : (DualNumber k)ˣ) :
    dlog (z ^ 2) = 0 := by
  rw [pow_two, dlog_mul]
  have htwo : (2 : k) = 0 := CharP.cast_eq_zero k 2
  linear_combination htwo * dlog z

theorem dlogHom_sq [CharP k 2] (z : (DualNumber k)ˣ) :
    dlogHom (z ^ 2) = 1 := by
  simp [dlogHom, dlog_sq]

/-- In characteristic two, the subgroup generated by squares and constant
units lies in the kernel of the first ramified logarithm. -/
theorem fakeSquareClassSubgroup_le_ker [CharP k 2] :
    FakeSquareClass.fakeSquareClassSubgroup
        (algebraMap k (DualNumber k)) ≤ dlogHom.ker := by
  rw [FakeSquareClass.fakeSquareClassSubgroup, sup_le_iff]
  constructor
  · intro z hz
    obtain ⟨w, rfl⟩ := Subgroup.mem_square.mp hz
    rw [show w * w = w ^ 2 by simp [pow_two]]
    exact MonoidHom.mem_ker.mpr (dlogHom_sq w)
  · rintro z ⟨a, -, rfl⟩
    exact MonoidHom.mem_ker.mpr (by
      change Multiplicative.ofAdd
          (dlog (FakeSquareClass.scalarUnitsMap
            (algebraMap k (DualNumber k)) a)) = 1
      have hconst :
          FakeSquareClass.scalarUnitsMap
              (algebraMap k (DualNumber k)) a =
            constantUnit a := rfl
      rw [hconst, dlog_constantUnit]
      rfl)

/-- The first ramified logarithm descends to the fake square-class target. -/
def fakeDlog [CharP k 2] :
    FakeSquareClass.Target (algebraMap k (DualNumber k)) →*
      Multiplicative k :=
  QuotientGroup.lift
    (FakeSquareClass.fakeSquareClassSubgroup
      (algebraMap k (DualNumber k)))
    dlogHom fakeSquareClassSubgroup_le_ker

@[simp] theorem fakeDlog_mk [CharP k 2] (z : (DualNumber k)ˣ) :
    fakeDlog
        (QuotientGroup.mk'
          (FakeSquareClass.fakeSquareClassSubgroup
            (algebraMap k (DualNumber k))) z) =
      Multiplicative.ofAdd (dlog z) :=
  rfl

end

end MazurProof.RamifiedDlog

Source
https://github.com/xiangyazi24/FLT @ 51bbb4f191ad0d3753b87123635c100a638ae580:FLT.Assumptions.MazurProof.RamifiedDlog

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me