Exact Lean source
Nonadditivity.HaarPathRefinedCounting
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
3 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.HaarPathClasses.DefectClass.congr_simpNonadditivity.HaarPathClasses.RefinedDefectClassNonadditivity.HaarPathClasses.RefinedDefectClass.congr_simpNonadditivity.HaarPathClasses.RefinedOverNonadditivity.HaarPathClasses.RefinedOver.congr_simpNonadditivity.HaarPathClasses.card_refinedDefectClass_leNonadditivity.HaarPathClasses.card_refinedOver_leNonadditivity.HaarPathClasses.card_refined_subfamily_leNonadditivity.HaarPathClasses.chainOrbitNonadditivity.HaarPathClasses.chainOrbit._proof_1internal/detail/privateNonadditivity.HaarPathClasses.chainOrbit.eq_1internal/detail/privateNonadditivity.HaarPathClasses.classDefectTwice.congr_simpNonadditivity.HaarPathClasses.instFintypeRefinedOverNonadditivity.HaarPathClasses.orientationNonadditivity.HaarPathClasses.orientation._proof_1internal/detail/privateNonadditivity.HaarPathClasses.orientation_casesNonadditivity.HaarPathClasses.orientation_cases._simp_1_2internal/detail/privateNonadditivity.HaarPathClasses.orientation_cases._simp_1_3internal/detail/privateNonadditivity.HaarPathClasses.orientation_memNonadditivity.HaarPathClasses.overProfileAssignmentNonadditivity.HaarPathClasses.overProfileAssignment_injectiveNonadditivity.HaarPathClasses.overProfiles_allNonadditivity.HaarPathClasses.overRepresentativeNonadditivity.HaarPathClasses.over_samePatternNonadditivity.HaarPathClasses.refinedClassFintypeNonadditivity.HaarPathClasses.refinedDefectEquivNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_1internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_2internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_3internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_4internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_5internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_6internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_7internal/detail/privateNonadditivity.HaarPathClasses.refinedDefectEquiv._proof_8internal/detail/privateNonadditivity.HaarPathClasses.refinedToCoarseNonadditivity.HaarPathClasses.refinedToCoarse._proof_1internal/detail/privateNonadditivity.HaarPathClasses.refinedToCoarse_mkNonadditivity.HaarPathGraph.Path.defectTwice.congr_simp
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathCounting7import Nonadditivity.HaarPathVertexFibre8import Nonadditivity.HaarPathRefined9import Nonadditivity.HaarPathProfileReverse1011/-! # Counting the genuine refined path quotient1213Within each actual coarse class, one profile per unoriented suppressed chain14is sufficient: the reverse profile is forced. Transport to a fixed class15representative gives a concrete injective profile assignment.16-/17noncomputable section18set_option backward.isDefEq.respectTransparency false19set_option maxHeartbeats 100000020namespace Nonadditivity.HaarPathClasses21open HaarPathGraph HaarPathProfiles22open scoped BigOperators23attribute [local instance] Classical.propDecidable24variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}2526instance refinedClassFintype : Fintype (RefinedClass V d m) := Quotient.fintype _2728def refinedToCoarse : RefinedClass V d m → PathClass V d m :=29Quotient.lift (Quotient.mk _) (fun _ _ h => Quotient.sound h.samePattern)3031@[simp] theorem refinedToCoarse_mk (P : Path V d m) :32refinedToCoarse (Quotient.mk _ P)=Quotient.mk _ P := rfl3334/-- Actual refined classes lying over a given coarse class. -/35def RefinedOver (C : PathClass V d m) := {D : RefinedClass V d m // refinedToCoarse D=C}3637instance (C : PathClass V d m) : Fintype (RefinedOver C) := by38unfold RefinedOver39infer_instance4041def orientation (P : Path V d m) (s : P.unorientedChains) : P.CoreChain :=42Classical.choose (show s.val.Nonempty from by43obtain ⟨c,hc,he⟩ := Finset.mem_image.mp s.property44rw [←he]45simp)4647omit [Fintype V] in48theorem orientation_mem (P : Path V d m) (s : P.unorientedChains) :49orientation P s ∈ s.val := Classical.choose_spec _5051def chainOrbit (P : Path V d m) (c : P.CoreChain) : P.unorientedChains :=52⟨{c,P.coreChainReverse c},Finset.mem_image.mpr ⟨c,Finset.mem_univ _,rfl⟩⟩5354theorem orientation_cases (P : Path V d m) (c : P.CoreChain) :55orientation P (chainOrbit P c)=c ∨56orientation P (chainOrbit P c)=P.coreChainReverse c := by57simpa only [chainOrbit,Finset.mem_insert,Finset.mem_singleton] using58orientation_mem P (chainOrbit P c)5960def overRepresentative {C : PathClass V d m} (D : RefinedOver C) : Path V d m :=61Quotient.out D.val6263theorem over_samePattern {C : PathClass V d m} (D : RefinedOver C) :64SamePattern (Quotient.out C) (overRepresentative D) := by65apply @Quotient.exact _ (pathSetoid (V := V) (d := d) (m := m))66change Quotient.mk _ (Quotient.out C)=refinedToCoarse (Quotient.mk _ (overRepresentative D))67rw [Quotient.out_eq]68have hd : (Quotient.mk _ (overRepresentative D) : RefinedClass V d m)=D.val :=69Quotient.out_eq D.val70rw [hd,D.property]7172/-- The actual profile labels on chosen orientations of the representative's73suppressed chains. -/74def overProfileAssignment {C : PathClass V d m} (D : RefinedOver C) :75(Quotient.out C).unorientedChains → BoundedProfile (Color d) m :=76fun s => (overRepresentative D).coreChainProfile77((over_samePattern D).coreChainEquiv (orientation (Quotient.out C) s))7879/-- Equality on one orientation forces equality on the reverse orientation. -/80theorem overProfiles_all {C : PathClass V d m} (D E : RefinedOver C)81(he : overProfileAssignment D=overProfileAssignment E)82(c : (Quotient.out C).CoreChain) :83(overRepresentative D).coreChainProfile ((over_samePattern D).coreChainEquiv c)=84(overRepresentative E).coreChainProfile ((over_samePattern E).coreChainEquiv c) := by85have h := congrFun he (chainOrbit (Quotient.out C) c)86change (overRepresentative D).coreChainProfile87((over_samePattern D).coreChainEquiv (orientation _ _)) =88(overRepresentative E).coreChainProfile89((over_samePattern E).coreChainEquiv (orientation _ _)) at h90rcases orientation_cases (Quotient.out C) c with hc | hc91· simpa only [hc] using h92· rw [hc] at h93simp only [SamePattern.coreChainEquiv_apply,SamePattern.coreChainMap_reverse] at h94have hr := HaarPathGraph.Path.coreChainProfile_reverse_eq_of_profile_eq95(overRepresentative D) (overRepresentative E) _ _ h96simpa only [Path.coreChainReverse_involutive] using hr9798/-- The profile assignment is injective on the genuine refined quotient. -/99theorem overProfileAssignment_injective (C : PathClass V d m) :100Function.Injective (@overProfileAssignment V _ _ d m C) := by101intro D E he102let hD := over_samePattern D103let hE := over_samePattern E104let hDE := hD.symm.trans hE105have hr : RefinedPattern (overRepresentative D) (overRepresentative E) := by106refine ⟨hDE,fun c => ?_⟩107let a := hD.coreChainEquiv.symm c108have ha : hD.coreChainEquiv a=c := hD.coreChainEquiv.apply_symm_apply c109have hv := overProfiles_all D E he a110have ht : hDE.coreChainEquiv (hD.coreChainEquiv a)=hE.coreChainEquiv a := by111simpa only [SamePattern.coreChainEquiv_apply] using112(hD.coreChainMap_trans hDE a).symm113rw [ha] at hv ht114exact hv.trans (congrArg (overRepresentative E).coreChainProfile ht.symm)115apply Subtype.ext116calc117D.val = Quotient.mk _ (overRepresentative D) := (Quotient.out_eq D.val).symm118_ = Quotient.mk _ (overRepresentative E) := Quotient.sound hr119_ = E.val := Quotient.out_eq E.val120121/-- Exact refined-fibre count with the original profile exponent. -/122theorem card_refinedOver_le (C : PathClass V d m) (hm : 0 < m) (hd : 0 < d) :123Fintype.card (RefinedOver C) ≤124(2*d*m^d)^(3*(Quotient.out C).defectTwice+4) := by125calc126_ ≤ Fintype.card ((Quotient.out C).unorientedChains → BoundedProfile (Color d) m) :=127Fintype.card_le_of_injective _ (overProfileAssignment_injective C)128_ ≤ _ := (Quotient.out C).card_chainProfileAssignments_le hm hd129130/-- Actual refined classes at a fixed integer defect. -/131abbrev RefinedDefectClass (V : Type*) [Fintype V] [DecidableEq V]132(m δ : ℕ) (hm : 0 < m) :=133{D : RefinedClass V 2 m // classDefectTwice hm (refinedToCoarse D)=δ}134135def refinedDefectEquiv (hm : 0 < m) (δ : ℕ) :136RefinedDefectClass V m δ hm ≃137Σ C : DefectClass V m δ hm, RefinedOver C.val where138toFun D := ⟨⟨refinedToCoarse D.val,D.property⟩,⟨D.val,rfl⟩⟩139invFun CD := ⟨CD.2.val,by rw [CD.2.property]; exact CD.1.property⟩140left_inv D := rfl141right_inv CD := by142obtain ⟨⟨C,hC⟩,D,hD⟩ := CD143dsimp at hD144subst C145rfl146147/-- Corrected coarse-class and exact profile counts combined on the genuine148refined quotient, with no class-cardinality hypothesis. -/149theorem card_refinedDefectClass_le (hm : 0 < m) (δ : ℕ) :150Fintype.card (RefinedDefectClass V m δ hm) ≤151128^(δ+2)*m^(3*δ+6)*(4*m^2)^(3*δ+4) := by152rw [Fintype.card_congr (refinedDefectEquiv hm δ),Fintype.card_sigma]153have hC (C : DefectClass V m δ hm) :154Fintype.card (RefinedOver C.val) ≤ (4*m^2)^(3*δ+4) := by155have h := card_refinedOver_le C.val hm (by decide : 0 < 2)156have hd := classRepresentative_defect hm C157change (Quotient.out C.val).defectTwice=δ at hd158simpa only [hd,show 2*2=4 from rfl] using h159calc160_ ≤ ∑ C : DefectClass V m δ hm, (4*m^2)^(3*δ+4) :=161Finset.sum_le_sum (fun C _ => hC C)162_ = Fintype.card (DefectClass V m δ hm)*(4*m^2)^(3*δ+4) := by simp163_ ≤ _ := Nat.mul_le_mul_right _ (card_defectClass_le hm δ)164165/-- Every concrete subfamily of refined classes at a fixed defect inherits166our genuine quotient bound. -/167theorem card_refined_subfamily_le (hm : 0 < m) (δ : ℕ)168(s : Finset (RefinedClass V 2 m))169(hs : ∀ C ∈ s, classDefectTwice hm (refinedToCoarse C)=δ) :170s.card ≤ 128^(δ+2)*m^(3*δ+6)*(4*m^2)^(3*δ+4) := by171let f : s → RefinedDefectClass V m δ hm := fun C => ⟨C.val,hs C.val C.property⟩172have hf : Function.Injective f := by173intro C D h174have he := congrArg (fun x : RefinedDefectClass V m δ hm => x.val) h175exact Subtype.ext he176have h := Fintype.card_le_of_injective f hf177simp only [Fintype.card_coe] at h178exact h.trans (card_refinedDefectClass_le hm δ)179180end Nonadditivity.HaarPathClasses