Exact Lean source
Nonadditivity.HaarPathCounting
Download original .lean · View on GitHub · Jump to source
Direct imports
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
9 project constants, including generated, internal and private declarations.
9 declarations
Nonadditivity.HaarPathClasses.NormalizedPrefixEq.congr_simpNonadditivity.HaarPathClasses.card_defectClass_leNonadditivity.HaarPathClasses.classExplorationCode_injectiveNonadditivity.HaarPathClasses.samePattern_of_eventList_eqNonadditivity.HaarPathClasses.samePattern_of_eventList_eq._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.samePattern_of_eventList_eq._proof_1_3internal/detail/privateNonadditivity.HaarPathClasses.samePattern_of_eventList_eq._proof_1_4internal/detail/privateNonadditivity.HaarPathClasses.samePattern_of_eventList_eq._proof_1_5internal/detail/privateNonadditivity.HaarPathClasses.samePattern_of_eventList_eq._proof_1_6internal/detail/private
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathReconstructionTree78/-! # The corrected explicit count of actual two-generator path classes910This proof reconstructs each normalized incidence pattern from its actual11sparse marks, then counts the fixed code alphabet. Both the final tree-edge12correction and the cost of independent endpoint color labels are retained.13-/14noncomputable section15namespace Nonadditivity.HaarPathClasses16open HaarPathGraph HaarPathProfiles17variable {V : Type*} [DecidableEq V] {m : ℕ}18variable {P Q : Path V 2 m}1920/-- Equality of the actual event lists reconstructs the entire path class.21The induction advances from each important traversal to the next one. -/22theorem samePattern_of_eventList_eq (hm : 0 < m)23(hevents : explorationEventList P hm=explorationEventList Q hm) : SamePattern P Q := by24have htail : ∀ r : ℕ, ∀ i : Fin m, m-i.val=r → i∈P.importantTimes →25NormalizedPrefixEq P Q hm i.val → NormalizedPrefixEq P Q hm m := by26intro r27induction r using Nat.strong_induction_on with28| h r ih =>29intro i hri hi hp30have hb := P.nextImportant_bounds (i.val+1) (by omega)31have hblock := normalizedPrefixEq_block hm i hevents hi hp32by_cases hend : P.nextImportant (i.val+1)=m33· simpa only [hend] using hblock34· have hjm : P.nextImportant (i.val+1) < m := by omega35let j : Fin m := ⟨P.nextImportant (i.val+1),hjm⟩36exact ih (m-j.val) (by dsimp [j]; omega) j rfl37(P.nextImportant_is_important (i.val+1) hjm) hblock38have hinit := normalizedPrefixEq_initial hm hevents39have hb := P.nextImportant_bounds 0 (by omega)40apply normalizedPrefixEq_full hm41by_cases hend : P.nextImportant 0=m42· simpa only [hend] using hinit43· have hjm : P.nextImportant 0 < m := by omega44let j : Fin m := ⟨P.nextImportant 0,hjm⟩45exact htail (m-j.val) j rfl (P.nextImportant_is_important 0 hjm) hinit4647/-- The sparse code is injective on the genuine vertex/local-color quotient,48including loops, parallel edges, and non-cyclically reduced closed paths. -/49theorem classExplorationCode_injective [Fintype V] (hm : 0 < m) (δ : ℕ) :50Function.Injective (@classExplorationCode V _ m _ δ hm) := by51intro C D he52have hl : explorationEventList (classRepresentative hm C) hm =53explorationEventList (classRepresentative hm D) hm := congrArg Subtype.val he54have hp := samePattern_of_eventList_eq hm hl55apply Subtype.ext56calc57C.val = Quotient.mk _ (classRepresentative hm C) := (Quotient.out_eq C.val).symm58_ = Quotient.mk _ (classRepresentative hm D) := Quotient.sound hp59_ = D.val := Quotient.out_eq D.val6061/-- A fully explicit corrected BC5.3 bound for the two-generator problem.62Here δ=2χ is the actual integer defect, and all constants include local63color normalization and the variable number of important events. -/64theorem card_defectClass_le [Fintype V] (hm : 0 < m) (δ : ℕ) :65Fintype.card (DefectClass V m δ hm) ≤ 128^(δ+2)*m^(3*δ+6) := by66calc67_ ≤ Fintype.card (BoundedList (ExplorationEvent m) (δ+2)) :=68Fintype.card_le_of_injective _ (classExplorationCode_injective hm δ)69_ ≤ 128^(δ+2)*m^(3*(δ+2)) := card_explorationCodes_le m (δ+2) hm70_ = _ := by congr 27172end Nonadditivity.HaarPathClasses