Exact Lean source
Nonadditivity.FiniteFreeModel
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.PolynomialReductionMathlib.Logic.Equiv.FintypedependencyMathlib.Data.Fintype.Vectordependency
Imported by project modules
2 direct reverse imports
Relationships above come from literal import commands. The declarations below link to types and references extracted from Lean’s environment. Source text is complete and unchanged.
Declarations in this module
38 project constants, including generated, internal and private declarations.
38 declarations
Nonadditivity.FiniteFreeModel.BallNonadditivity.FiniteFreeModel.ballFintypeNonadditivity.FiniteFreeModel.baseNonadditivity.FiniteFreeModel.base._proof_1internal/detail/privateNonadditivity.FiniteFreeModel.encodeNonadditivity.FiniteFreeModel.encode._proof_1internal/detail/privateNonadditivity.FiniteFreeModel.encode._proof_2internal/detail/privateNonadditivity.FiniteFreeModel.encode._proof_3internal/detail/privateNonadditivity.FiniteFreeModel.encode_injectiveNonadditivity.FiniteFreeModel.exists_finite_separating_modelNonadditivity.FiniteFreeModel.generatorPermNonadditivity.FiniteFreeModel.generatorPerm._proof_1internal/detail/privateNonadditivity.FiniteFreeModel.generatorPerm.eq_1internal/detail/privateNonadditivity.FiniteFreeModel.generatorPerm_applyNonadditivity.FiniteFreeModel.generatorPerm_inv_applyNonadditivity.FiniteFreeModel.mk_cons_falseNonadditivity.FiniteFreeModel.mk_cons_trueNonadditivity.FiniteFreeModel.modelNonadditivity.FiniteFreeModel.model_baseNonadditivity.FiniteFreeModel.model_eq_one_iffNonadditivity.FiniteFreeModel.model_mk_baseNonadditivity.FiniteFreeModel.model_mk_base._proof_1_1internal/detail/privateNonadditivity.FiniteFreeModel.model_ne_oneNonadditivity.FiniteFreeModel.partialTranslationNonadditivity.FiniteFreeModel.partialTranslation._proof_1internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_10internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_2internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_3internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_4internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_5internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_6internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_7internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_8internal/detail/privateNonadditivity.FiniteFreeModel.partialTranslation._proof_9internal/detail/privateNonadditivity.FiniteFreeModel.productModelNonadditivity.FiniteFreeModel.productModel._proof_1internal/detail/privateNonadditivity.FiniteFreeModel.productModel._proof_2internal/detail/privateNonadditivity.FiniteFreeModel.productModel_eq_one_iff
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.PolynomialReduction7import Mathlib.Logic.Equiv.Fintype8import Mathlib.Data.Fintype.Vector910/-! Finite quotients that exactly distinguish every word in a prescribed free-group ball. -/11noncomputable section12set_option backward.isDefEq.respectTransparency false13set_option linter.unusedSectionVars false14set_option maxHeartbeats 120000015namespace Nonadditivity.FiniteFreeModel16universe u17variable {α : Type u} [Fintype α] [DecidableEq α]1819abbrev Ball (α : Type*) [DecidableEq α] (R : ℕ) := {w : FreeGroup α // FreeGroup.norm w ≤ R}2021def encode (R : ℕ) (w : Ball α R) : Σ t : Fin (R+1), List.Vector (α×Bool) t.val :=22⟨⟨w.val.toWord.length,by have := w.property; change w.val.toWord.length ≤ R at this; omega⟩,23⟨w.val.toWord,rfl⟩⟩2425theorem encode_injective (R : ℕ) : Function.Injective (encode (α := α) R) := by26intro v w h27have hwords := congrArg (fun x : Σ t : Fin (R+1), List.Vector (α×Bool) t.val => x.2.val) h28exact Subtype.ext (FreeGroup.toWord_injective hwords)2930instance ballFintype (R : ℕ) : Fintype (Ball α R) := Fintype.ofInjective (encode R) (encode_injective R)3132def base (R : ℕ) : Ball α R := ⟨1,by simp⟩3334/-- Left translation restricted to pairs that remain inside the finite ball. -/35def partialTranslation (R : ℕ) (a : α) :36{w : Ball α R // FreeGroup.norm (FreeGroup.of a * w.val) ≤ R} ≃37{w : Ball α R // FreeGroup.norm ((FreeGroup.of a)⁻¹ * w.val) ≤ R} where38toFun w := ⟨⟨FreeGroup.of a * w.val.val,w.property⟩,by simpa only [inv_mul_cancel_left] using w.val.property⟩39invFun w := ⟨⟨(FreeGroup.of a)⁻¹ * w.val.val,w.property⟩,by simpa only [mul_inv_cancel_left] using w.val.property⟩40left_inv w := by apply Subtype.ext; apply Subtype.ext; simp41right_inv w := by apply Subtype.ext; apply Subtype.ext; simp4243/-- Complete the partial translation to a genuine finite permutation. -/44def generatorPerm (R : ℕ) (a : α) : Equiv.Perm (Ball α R) := (partialTranslation R a).extendSubtype4546theorem generatorPerm_apply (R : ℕ) (a : α) (w : Ball α R)47(h : FreeGroup.norm (FreeGroup.of a * w.val) ≤ R) :48(generatorPerm R a w).val = FreeGroup.of a * w.val := by49rw [generatorPerm,Equiv.extendSubtype_apply_of_mem _ w h]50rfl5152theorem generatorPerm_inv_apply (R : ℕ) (a : α) (w : Ball α R)53(h : FreeGroup.norm ((FreeGroup.of a)⁻¹ * w.val) ≤ R) :54((generatorPerm R a)⁻¹ w).val = (FreeGroup.of a)⁻¹ * w.val := by55let v : Ball α R := ⟨(FreeGroup.of a)⁻¹*w.val,h⟩56have hv : generatorPerm R a v = w := by57apply Subtype.ext58rw [generatorPerm_apply]59· simp [v]60· simpa [v] using w.property61have heq : (generatorPerm R a)⁻¹ w = v := by62rw [←hv]63exact (generatorPerm R a).symm_apply_apply v64exact congrArg Subtype.val heq6566/-- A homomorphism into a genuine finite group, with no approximation premise. -/67def model (R : ℕ) : FreeGroup α →* Equiv.Perm (Ball α R) := FreeGroup.lift (generatorPerm R)6869theorem mk_cons_true (a : α) (l : List (α×Bool)) :70FreeGroup.mk ((a,true)::l) = FreeGroup.of a * FreeGroup.mk l := by71rw [FreeGroup.of,FreeGroup.mul_mk]72rfl7374theorem mk_cons_false (a : α) (l : List (α×Bool)) :75FreeGroup.mk ((a,false)::l) = (FreeGroup.of a)⁻¹ * FreeGroup.mk l := by76rw [FreeGroup.of,FreeGroup.inv_mk,FreeGroup.mul_mk]77rfl7879/-- Every word of length at most `R` acts correctly on the distinguished identity. -/80theorem model_mk_base (R : ℕ) (l : List (α×Bool)) (hl : l.length ≤ R) :81((model R (FreeGroup.mk l)) (base R)).val = FreeGroup.mk l := by82induction l with83| nil => rfl84| cons x l ih =>85have hl' : l.length ≤ R := by simp only [List.length_cons] at hl; omega86specialize ih hl'87rcases x with ⟨a,b⟩88cases b with89| false =>90rw [mk_cons_false,map_mul,map_inv]91change ((generatorPerm R a)⁻¹ ((model R (FreeGroup.mk l)) (base R))).val = _92rw [generatorPerm_inv_apply]93· rw [ih]94· rw [ih,←mk_cons_false]95exact FreeGroup.norm_mk_le.trans hl96| true =>97rw [mk_cons_true,map_mul]98change (generatorPerm R a ((model R (FreeGroup.mk l)) (base R))).val = _99rw [generatorPerm_apply]100· rw [ih]101· rw [ih,←mk_cons_true]102exact FreeGroup.norm_mk_le.trans hl103104theorem model_base (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) :105((model R w) (base R)).val = w := by106simpa only [FreeGroup.mk_toWord] using model_mk_base R w.toWord hw107108/-- The constructed finite model detects every nontrivial element in the chosen ball. -/109theorem model_eq_one_iff (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) :110model R w = 1 ↔ w = 1 := by111constructor112· intro h113have hb := model_base R w hw114rw [h] at hb115exact hb.symm116· rintro rfl; exact map_one _117118theorem model_ne_one (R : ℕ) (w : FreeGroup α) (hw : FreeGroup.norm w ≤ R) (h : w≠1) :119model R w ≠ 1 := (model_eq_one_iff R w hw).not.mpr h120121/-- An explicit finite group separates any given nonidentity free-group element. -/122theorem exists_finite_separating_model (w : FreeGroup α) (hw : w≠1) :123∃(H : Type u) (_ : Fintype H) (_ : Group H) (π : FreeGroup α →* H), π w≠1 := by124exact ⟨Equiv.Perm (Ball α (FreeGroup.norm w)),inferInstance,inferInstance,125model (FreeGroup.norm w),model_ne_one _ _ le_rfl hw⟩126127/-- Independent coordinate models give a finite quotient of the product free group. -/128def productModel (R n : ℕ) : (Fin n → FreeGroup α) →* (Fin n → Equiv.Perm (Ball α R)) where129toFun w j := model R (w j)130map_one' := by funext j; exact map_one _131map_mul' v w := by funext j; exact map_mul _ _ _132133theorem productModel_eq_one_iff (R n : ℕ) (w : Fin n → FreeGroup α)134(hw : ∀j, FreeGroup.norm (w j) ≤ R) : productModel R n w = 1 ↔ w=1 := by135constructor136· intro h137funext j138apply (model_eq_one_iff R (w j) (hw j)).mp139exact congrFun h j140· rintro rfl; exact map_one _141142end Nonadditivity.FiniteFreeModel