Exact Lean source
Nonadditivity.HaarPathVertexFibre
Download original .lean · View on GitHub · Jump to source
Direct imports
Imported by project modules
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
37 project constants, including generated, internal and private declarations.
37 declarations
Nonadditivity.HaarPathGraph.Path.ext_dataNonadditivity.HaarPathGraph.Path.instFintypeNonadditivity.HaarPathGraph.Path.instFintype._proof_1internal/detail/privateNonadditivity.HaarPathVertexFibre.ColorFibreNonadditivity.HaarPathVertexFibre.FibreNonadditivity.HaarPathVertexFibre.VertexLabelsNonadditivity.HaarPathVertexFibre.card_vertexLabels_leNonadditivity.HaarPathVertexFibre.fibreEquivNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_1internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_2internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_3internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_4internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_5internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_6internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_7internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv._proof_8internal/detail/privateNonadditivity.HaarPathVertexFibre.fibreEquiv.eq_1internal/detail/privateNonadditivity.HaarPathVertexFibre.instFintypeColorFibreNonadditivity.HaarPathVertexFibre.instFintypeFibreNonadditivity.HaarPathVertexFibre.labelsNonadditivity.HaarPathVertexFibre.labels._proof_1internal/detail/privateNonadditivity.HaarPathVertexFibre.labels.congr_simpNonadditivity.HaarPathVertexFibre.labels_applyNonadditivity.HaarPathVertexFibre.normalizeNonadditivity.HaarPathVertexFibre.normalize_samePatternNonadditivity.HaarPathVertexFibre.reconstructNonadditivity.HaarPathVertexFibre.reconstruct._proof_1internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct._proof_2internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct._proof_3internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct._proof_4internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct._proof_5internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct._proof_6internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct.eq_1internal/detail/privateNonadditivity.HaarPathVertexFibre.reconstruct_samePatternNonadditivity.HaarPathVertexFibre.sum_fibre_colorsNonadditivity.HaarPathVertexFibre.vertexLabelsFintypeNonadditivity.HaarPathVertexFibre.visitedFintype
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarPathClasses78/-! # Exact separation of vertex labelings from a path class910For a fixed incidence pattern, choosing distinct labels for the visited11vertices is independent of the generator colors. This constructs the literal12bijection used to pull the `N^v` factor out of the grouped coefficient sum.13-/1415noncomputable section16set_option backward.isDefEq.respectTransparency false1718namespace Nonadditivity.HaarPathGraph.Path1920variable {V : Type*} {d m : ℕ}2122theorem ext_data {P Q : Path V d m} (hv : P.vertex = Q.vertex) (hc : P.colors = Q.colors) :23P = Q := by24cases P25cases Q26cases hv27cases hc28rfl2930instance [Fintype V] : Fintype (Path V d m) :=31Fintype.ofInjective (fun P : Path V d m => (P.vertex,P.colors))32(fun _ _ h => ext_data (congrArg Prod.fst h) (congrArg Prod.snd h))3334end Nonadditivity.HaarPathGraph.Path3536namespace Nonadditivity.HaarPathVertexFibre3738open scoped BigOperators39open HaarPathGraph HaarPathClasses HaarPathProfiles4041variable {V : Type*} [Fintype V] {d m : ℕ}4243/-- The actual coarse path class before quotienting. -/44def Fibre (P : Path V d m) := {Q : Path V d m // SamePattern P Q}4546/-- Its color fibre after fixing the original vertex labeling. -/47def ColorFibre (P : Path V d m) :=48{Q : Path V d m // Q.vertex = P.vertex ∧ SamePattern P Q}4950instance (P : Path V d m) : Fintype (Fibre P) := by51classical52unfold Fibre53infer_instance54instance (P : Path V d m) : Fintype (ColorFibre P) := by55classical56unfold ColorFibre57infer_instance5859abbrev VertexLabels (P : Path V d m) := Set.range P.vertex ↪ V6061instance visitedFintype (P : Path V d m) : Fintype (Set.range P.vertex) := by62classical63infer_instance6465instance vertexLabelsFintype (P : Path V d m) : Fintype (VertexLabels P) := by66classical67unfold VertexLabels68infer_instance6970/-- Keep the colors and restore the reference vertex names. -/71def normalize (P Q : Path V d m) : Path V d m where72vertex := P.vertex73colors := Q.colors74closed := P.closed75reduced := Q.reduced7677theorem normalize_samePattern {P Q : Path V d m} (h : SamePattern P Q) :78SamePattern P (normalize P Q) := by79refine ⟨fun _ _ => Iff.rfl, ?_⟩80intro a b hab81exact h.2 a b hab8283/-- The unique injection assigning the new name to each visited vertex. -/84def labels {P Q : Path V d m} (h : SamePattern P Q) : VertexLabels P :=85(rangeEquivOfKernel P.vertex Q.vertex h.1).toEmbedding.trans86(Function.Embedding.subtype (fun v => v ∈ Set.range Q.vertex))8788@[simp] theorem labels_apply {P Q : Path V d m} (h : SamePattern P Q) (i : Fin (m+1)) :89labels h ⟨P.vertex i,⟨i,rfl⟩⟩ = Q.vertex i :=90rangeEquivOfKernel_apply P.vertex Q.vertex h.1 i9192/-- Reconstruct a path by an injective choice of vertex names and a color fibre. -/93def reconstruct (P : Path V d m) (e : VertexLabels P) (C : ColorFibre P) : Path V d m where94vertex i := e ⟨P.vertex i,⟨i,rfl⟩⟩95colors := C.val.colors96closed := by congr 1; exact Subtype.ext P.closed97reduced := C.val.reduced9899theorem reconstruct_samePattern (P : Path V d m) (e : VertexLabels P) (C : ColorFibre P) :100SamePattern P (reconstruct P e C) := by101constructor102· intro i j103change P.vertex i = P.vertex j ↔ e ⟨P.vertex i,⟨i,rfl⟩⟩ = e ⟨P.vertex j,⟨j,rfl⟩⟩104exact ⟨fun h => congrArg e (Subtype.ext h),fun h => congrArg Subtype.val (e.injective h)⟩105· intro a b hab106exact C.property.2.2 a b hab107108/-- Literal path-class parametrization: vertex injections times fixed-vertex colors. -/109def fibreEquiv (P : Path V d m) : Fibre P ≃ VertexLabels P × ColorFibre P where110toFun Q := (labels Q.property, ⟨normalize P Q.val,rfl,normalize_samePattern Q.property⟩)111invFun eC := ⟨reconstruct P eC.1 eC.2,reconstruct_samePattern P eC.1 eC.2⟩112left_inv Q := by113apply Subtype.ext114apply Path.ext_data115· funext i116exact labels_apply Q.property i117· rfl118right_inv eC := by119rcases eC with ⟨e,C⟩120apply Prod.ext121· apply Function.Embedding.ext122intro v123obtain ⟨i,hi⟩ := v.property124have hv : v = ⟨P.vertex i,⟨i,rfl⟩⟩ := Subtype.ext hi.symm125rw [hv,labels_apply]126rfl127· apply Subtype.ext128exact Path.ext_data C.property.1.symm rfl129130/-- Exact grouped coefficient sum, since coefficients do not depend on vertex names. -/131theorem sum_fibre_colors {R : Type*} [AddCommMonoid R] (P : Path V d m)132(f : (Fin m → Color d) → R) :133∑ Q : Fibre P, f Q.val.colors =134Fintype.card (VertexLabels P) • ∑ C : ColorFibre P, f C.val.colors := by135rw [← (fibreEquiv P).symm.sum_comp]136simp only [Fintype.sum_prod_type, fibreEquiv, reconstruct]137simp138139/-- The vertex factor has the exact dimension exponent, with no factorial loss. -/140theorem card_vertexLabels_le (P : Path V d m) :141Fintype.card (VertexLabels P) ≤ Fintype.card V ^ Fintype.card (Set.range P.vertex) := by142classical143have h := Fintype.card_le_of_injective144(fun e : VertexLabels P => (e : Set.range P.vertex → V)) Function.Embedding.coe_injective145simpa only [Fintype.card_fun] using h146147end Nonadditivity.HaarPathVertexFibre