Exact Lean source
Nonadditivity.HaarChainColoringFibre
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
18 project constants, including generated, internal and private declarations.
18 declarations
Nonadditivity.HaarPathGraph.Path.ChainColoring.colorFibreEquivNonadditivity.HaarPathGraph.Path.ChainColoring.colorFibreEquiv._proof_1internal/detail/privateNonadditivity.HaarPathGraph.Path.ChainColoring.colorFibreEquiv._proof_2internal/detail/privateNonadditivity.HaarPathGraph.Path.ChainColoring.colorFibreEquiv._proof_3internal/detail/privateNonadditivity.HaarPathGraph.Path.ChainColoring.colorFibreEquiv._proof_4internal/detail/privateNonadditivity.HaarPathGraph.Path.ChainColoring.ext_valueNonadditivity.HaarPathGraph.Path.ChainColoring.ext_value_iffNonadditivity.HaarPathGraph.Path.ChainColoring.path_injectiveNonadditivity.HaarPathGraph.Path.coreProfileWord.eq_1internal/detail/privateNonadditivity.HaarPathGraph.Path.refinedChainColoringNonadditivity.HaarPathGraph.Path.refinedChainColoring._proof_1internal/detail/privateNonadditivity.HaarPathGraph.Path.refinedChainColoring_colorNonadditivity.HaarPathGraph.Path.refinedChainColoring_pathNonadditivity.HaarPathGraph.Path.refinedChainWordNonadditivity.HaarPathGraph.Path.refinedChainWord._proof_1internal/detail/privateNonadditivity.HaarPathGraph.Path.refinedChainWord._proof_2internal/detail/privateNonadditivity.HaarPathGraph.Path.refinedChainWord._proof_3internal/detail/privateNonadditivity.HaarPathGraph.Path.refinedChainWord._proof_4internal/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.HaarChainColoringPath78/-! # Exact refined color fibre as compatible actual profile assignments -/9noncomputable section10set_option backward.isDefEq.respectTransparency false11set_option maxHeartbeats 150000012namespace Nonadditivity.HaarPathGraph.Path13open HaarPathGraph HaarPathClasses HaarPathProfiles HaarProfileCoefficient14variable {V : Type*} [Fintype V] [DecidableEq V] {d m : ℕ}15variable {P : Path V d m}1617/-- Read the chosen profile word from an actual path in the refined class. -/18def refinedChainWord {Q : Path V d m} (h : RefinedPattern P Q) (c : P.CoreChain) :19Words d c.val.length (P.coreChainProfile c).val := by20let v : Fin c.val.length → Color d := fun i => color (h.samePattern.dartPerm c.val[i])21have he : List.ofFn v=(h.samePattern.coreChainEquiv c).val.map color := by22simp only [SamePattern.coreChainEquiv_apply,SamePattern.coreChainMap_val,List.map_map]23simpa only [v,Fin.getElem_fin,Function.comp_def] using24List.ofFn_getElem_eq_map c.val (color ∘ h.samePattern.dartPerm)25refine ⟨v,?_⟩26rw [he,h.profile_eq c]27have hp := (Q.coreProfileWord (h.samePattern.coreChainEquiv c)).property28have hw : List.ofFn (Q.coreProfileWord (h.samePattern.coreChainEquiv c)).val=29(h.samePattern.coreChainEquiv c).val.map color :=30by31simpa only [Path.coreProfileWord,Fin.getElem_fin] using32List.ofFn_getElem_eq_map (h.samePattern.coreChainEquiv c).val color33simpa only [hw] using hp3435/-- A refined path induces compatible words on all chain orientations. -/36def refinedChainColoring {Q : Path V d m} (h : RefinedPattern P Q) : P.ChainColoring where37value := refinedChainWord h38reversal p := by39change color (h.samePattern.dartPerm (P.positionDart (P.reversePosition p)).val)=40flipColor (color (h.samePattern.dartPerm (P.positionDart p).val))41rw [P.positionDart_reversePosition,h.samePattern.dartPerm_reverse (P.positionDart p).property]42rfl4344@[simp] theorem refinedChainColoring_color {Q : Path V d m} (h : RefinedPattern P Q)45(q : P.darts) : (refinedChainColoring h).color q=color (h.samePattern.dartPerm q.val) := by46obtain ⟨⟨c,i⟩,rfl⟩ := P.positionDart_surjective q47rw [ChainColoring.color_position]48rfl4950/-- Reconstructing all profile words of a refined path recovers that path when51its vertex labels are fixed. -/52theorem refinedChainColoring_path {Q : Path V d m} (h : RefinedPattern P Q)53(hv : Q.vertex=P.vertex) : (refinedChainColoring h).path=Q := by54apply Path.ext_data55· exact hv.symm56· funext i57rw [ChainColoring.path_colors,refinedChainColoring_color,h.samePattern.dartPerm_traversal]58exact color_dart _ _ _5960namespace ChainColoring6162@[ext] theorem ext_value {F G : P.ChainColoring} (h : ∀ c, F.value c=G.value c) : F=G := by63cases F with64| mk f hf => cases G with65| mk g hg =>66have he : f=g := funext h67subst g68rfl6970/-- A reconstructed path determines the assigned word at every graph dart. -/71theorem path_injective : Function.Injective (path (P := P)) := by72intro F G he73have hc (q : P.darts) : F.color q=G.color q := by74obtain ⟨i,hi | hi⟩ := P.dart_eq_traversal_or_reverse q.val q.property75· have hq : q=⟨P.traversal i,P.traversal_mem i⟩ := Subtype.ext hi76rw [hq]77exact congrArg (fun R : Path V d m => R.colors i) he78· have hq : q=⟨reverse (P.traversal i),P.reverse_mem (P.traversal_mem i)⟩ := Subtype.ext hi79rw [hq,F.color_reverse ⟨P.traversal i,P.traversal_mem i⟩,80G.color_reverse ⟨P.traversal i,P.traversal_mem i⟩]81exact congrArg flipColor (congrArg (fun R : Path V d m => R.colors i) he)82apply ext_value83intro c84apply Subtype.ext85funext i86simpa only [color_position] using hc (P.positionDart ⟨c,i⟩)8788/-- Compatible reduced chain words are exactly all literal fixed-vertex paths89of the refined class. -/90def colorFibreEquiv : P.ChainColoring ≃ HaarRefinedVertexFibre.ColorFibre P where91toFun F := F.colorFibre92invFun C := refinedChainColoring C.property.293left_inv F := path_injective (refinedChainColoring_path F.refinedPattern F.path_vertex)94right_inv C := Subtype.ext (refinedChainColoring_path C.property.2 C.property.1)9596end ChainColoring97end Nonadditivity.HaarPathGraph.Path