Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

FLT.Assumptions.MazurProof.FakeSquareClass source foundation

Definition
MazurN13_FLT_Assumptions_MazurProof_FakeSquareClass_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.FakeSquareClass
Original leading source comments and nonproject imports are retained below. -/
import Mathlib

set_option autoImplicit false




/-!
# The fake square-class target

This file defines
`Lˣ / ((Lˣ)^2 * image(Kˣ))`
for a homomorphism of commutative rings `K →+* L`.

The product of the two subgroups is written as their supremum: `Lˣ` is
commutative, so this is the subgroup generated by squares and rational scalars.
-/

namespace MazurProof.FakeSquareClass

variable {K L : Type*} [CommRing K] [CommRing L]

/-- The map on unit groups induced by a ring homomorphism `K →+* L`. -/
def scalarUnitsMap (e : K →+* L) : Kˣ →* Lˣ := Units.map e.toMonoidHom

/-- Squares together with the scalar subgroup of `Lˣ`. -/
def fakeSquareClassSubgroup (e : K →+* L) : Subgroup Lˣ :=
  Subgroup.square Lˣ ⊔ (⊤ : Subgroup Kˣ).map (scalarUnitsMap e)

/-- The usual fake square-class target. -/
abbrev Target (e : K →+* L) : Type _ :=
  Lˣ ⧸ fakeSquareClassSubgroup e

instance instCommGroupTarget (e : K →+* L) : CommGroup (Target e) := inferInstance

/-- A scalar is trivial in the fake square-class target. -/
theorem scalar_eq_one (e : K →+* L) (q : Kˣ) :
    ((scalarUnitsMap e q : Lˣ) : Target e) = 1 := by
  apply (QuotientGroup.eq_one_iff _).mpr
  apply Subgroup.mem_sup_right
  exact Subgroup.mem_map_of_mem (scalarUnitsMap e)
    (show q ∈ (⊤ : Subgroup Kˣ) from trivial)

/-- A square is trivial in the fake square-class target. -/
theorem square_eq_one (e : K →+* L) (s : Lˣ) :
    ((s ^ 2 : Lˣ) : Target e) = 1 := by
  apply (QuotientGroup.eq_one_iff _).mpr
  apply Subgroup.mem_sup_left
  exact Subgroup.mem_square.mpr ⟨s, by simp [pow_two]⟩

/-- Every element of the fake square-class target has exponent two. -/
@[simp] theorem target_sq_eq_one (e : K →+* L) (z : Target e) :
    z ^ 2 = 1 := by
  refine QuotientGroup.induction_on z ?_
  intro s
  exact square_eq_one e s

/-- In an exponent-two square-class target, equality is detected by the
product rather than by a quotient. -/
theorem target_eq_iff_mul_eq_one (e : K →+* L) (x y : Target e) :
    x = y ↔ x * y = 1 := by
  constructor
  · intro hxy
    rw [hxy]
    rw [← pow_two]
    exact target_sq_eq_one e y
  · intro hxy
    calc
      x = x * 1 := (mul_one x).symm
      _ = x * (y * y) := by rw [← pow_two, target_sq_eq_one]
      _ = (x * y) * y := by ac_rfl
      _ = y := by rw [hxy, one_mul]

/-- If `z` differs from a scalar by a square, its fake class is trivial. -/
theorem eq_one_of_mul_sq_eq_scalar
    (e : K →+* L) (z s : Lˣ) (q : Kˣ)
    (h : z * s ^ 2 = scalarUnitsMap e q) :
    (z : Target e) = 1 := by
  apply (QuotientGroup.eq_one_iff _).mpr
  have hscalar : scalarUnitsMap e q ∈ fakeSquareClassSubgroup e := by
    apply Subgroup.mem_sup_right
    exact Subgroup.mem_map_of_mem (scalarUnitsMap e)
      (show q ∈ (⊤ : Subgroup Kˣ) from trivial)
  have hprod : z * s ^ 2 ∈ fakeSquareClassSubgroup e := by
    rw [h]
    exact hscalar
  have hsq : s ^ 2 ∈ fakeSquareClassSubgroup e := by
    apply Subgroup.mem_sup_left
    exact Subgroup.mem_square.mpr ⟨s, by simp [pow_two]⟩
  have hdiv := (fakeSquareClassSubgroup e).div_mem hprod hsq
  simpa using hdiv

/-- A ring equality to a scalar unit proves that both displayed factors are
units and that the first has trivial fake square class. -/
theorem exists_units_and_class_eq_one
    (e : K →+* L) (z₀ s₀ : L) (q : Kˣ)
    (h : z₀ * s₀ ^ 2 = e q) :
    ∃ hz : IsUnit z₀, ∃ _hs : IsUnit s₀,
      ((hz.unit : Lˣ) : Target e) = 1 := by
  have hprod : IsUnit (z₀ * s₀ ^ 2) := by
    rw [h]
    exact (scalarUnitsMap e q).isUnit
  have hsplit : IsUnit z₀ ∧ IsUnit (s₀ ^ 2) :=
    (Commute.all z₀ (s₀ ^ 2)).isUnit_mul_iff.mp hprod
  have hs : IsUnit s₀ :=
    (isUnit_pow_iff (by decide : 2 ≠ 0)).mp hsplit.2
  refine ⟨hsplit.1, hs, ?_⟩
  apply eq_one_of_mul_sq_eq_scalar e hsplit.1.unit hs.unit q
  apply Units.ext
  simpa [scalarUnitsMap, pow_two] using h

end MazurProof.FakeSquareClass

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

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