Exact Lean source
Nonadditivity.HaarPathProfileReverse
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
11 project constants, including generated, internal and private declarations.
11 declarations
Nonadditivity.HaarPathGraph.Path.coreChainProfile.eq_1internal/detail/privateNonadditivity.HaarPathGraph.Path.coreChainProfile_countNonadditivity.HaarPathGraph.Path.coreChainProfile_firstNonadditivity.HaarPathGraph.Path.coreChainProfile_lastNonadditivity.HaarPathGraph.Path.coreChainProfile_last._simp_1_3internal/detail/privateNonadditivity.HaarPathGraph.Path.coreChainProfile_reverse_countNonadditivity.HaarPathGraph.Path.coreChainProfile_reverse_eq_of_profile_eqNonadditivity.HaarPathGraph.Path.coreChainProfile_reverse_firstNonadditivity.HaarPathGraph.Path.coreChainProfile_reverse_lastNonadditivity.HaarPathGraph.Path.flipColor_involutiveNonadditivity.HaarPathProfiles.wordProfile.eq_1internal/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.HaarPathChainProfiles78/-! # Reversal of actual core-chain profiles910One orientation's profile determines the other, allowing one profile per11unoriented chain in the refined quotient count.12-/13noncomputable section14namespace Nonadditivity.HaarPathGraph.Path15open HaarPathProfiles16variable {V W : Type*} [DecidableEq V] [DecidableEq W] {d m : ℕ}1718theorem coreChainProfile_first (P : Path V d m) (c : P.CoreChain) :19(P.coreChainProfile c).val.first = color (c.val.head (P.toCore_nonempty c.property.1)) := rfl2021theorem coreChainProfile_last (P : Path V d m) (c : P.CoreChain) :22(P.coreChainProfile c).val.last = color (c.val.getLast (P.toCore_nonempty c.property.1)) := by23obtain ⟨a,l,he,ha⟩ := c.property.224simp [coreChainProfile,he,wordProfile,←List.map_cons,List.getLast_map]2526theorem coreChainProfile_count (P : Path V d m) (c : P.CoreChain) (a : Color d) :27(P.coreChainProfile c).val.count a = (c.val.map color).count a := by28obtain ⟨b,l,he,hb⟩ := c.property.229simp [coreChainProfile,he,wordProfile]30simp only [List.count_eq_countP,Bool.beq_eq_decide_eq]3132theorem flipColor_involutive : Function.Involutive (@flipColor d) := by33intro c34simp [flipColor]3536theorem coreChainProfile_reverse_first (P : Path V d m) (c : P.CoreChain) :37(P.coreChainProfile (P.coreChainReverse c)).val.first =38flipColor (P.coreChainProfile c).val.last := by39rw [coreChainProfile_first,coreChainProfile_last]40change color ((c.val.reverse.map reverse).head _) = _41rw [List.head_map,List.head_reverse]42rfl4344theorem coreChainProfile_reverse_last (P : Path V d m) (c : P.CoreChain) :45(P.coreChainProfile (P.coreChainReverse c)).val.last =46flipColor (P.coreChainProfile c).val.first := by47rw [coreChainProfile_first,coreChainProfile_last]48change color ((c.val.reverse.map reverse).getLast _) = _49rw [List.getLast_map,List.getLast_reverse]50rfl5152theorem coreChainProfile_reverse_count (P : Path V d m) (c : P.CoreChain) (a : Color d) :53(P.coreChainProfile (P.coreChainReverse c)).val.count a =54(P.coreChainProfile c).val.count (flipColor a) := by55rw [coreChainProfile_count,coreChainProfile_count]56have he : (P.coreChainReverse c).val.map color = (c.val.map color).reverse.map flipColor := by57change (c.val.reverse.map reverse).map color = _58simp only [List.map_map,List.map_reverse]59rfl60rw [he,←flipColor_involutive a]61rw [List.count_map_of_injective _ flipColor flipColor_involutive.injective]62rw [List.count_reverse,flipColor_involutive]6364/-- Cross-path form used by the actual refined quotient encoding. -/65theorem coreChainProfile_reverse_eq_of_profile_eq66(P : Path V d m) (Q : Path W d m) (c : P.CoreChain) (e : Q.CoreChain)67(h : P.coreChainProfile c = Q.coreChainProfile e) :68P.coreChainProfile (P.coreChainReverse c) = Q.coreChainProfile (Q.coreChainReverse e) := by69apply Subtype.ext70apply Profile.ext71· rw [coreChainProfile_reverse_first,coreChainProfile_reverse_first,h]72· rw [coreChainProfile_reverse_last,coreChainProfile_reverse_last,h]73· funext a74rw [coreChainProfile_reverse_count,coreChainProfile_reverse_count,h]7576end Nonadditivity.HaarPathGraph.Path