Exact Lean source
Nonadditivity.HaarPathReconstruction
Download original .lean · View on GitHub · Jump to source
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
17 project constants, including generated, internal and private declarations.
17 declarations
Nonadditivity.HaarPathClasses.NormalizedPrefixEqNonadditivity.HaarPathClasses.colorNormalizer.congr_simpNonadditivity.HaarPathClasses.nextImportant_eq_of_eventList_eqNonadditivity.HaarPathClasses.normalColor.eq_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_extendNonadditivity.HaarPathClasses.normalizedPrefixEq_extend._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_extend._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_extend_markNonadditivity.HaarPathClasses.normalizedPrefixEq_fullNonadditivity.HaarPathClasses.normalizedPrefixEq_full._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_monoNonadditivity.HaarPathClasses.normalizedPrefixEq_zeroNonadditivity.HaarPathClasses.normalizedPrefixEq_zero._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_zero._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalizer_freshNormalizationNonadditivity.HaarPathGraph.Path.importantStops.eq_1internal/detail/privateNonadditivity.HaarPathGraph.Path.nextImportant.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.HaarPathMarks7import Nonadditivity.HaarPathNormalizedFresh89/-! # Reconstruction of the normalized data from sparse exploration marks1011Pointwise prefix data are stronger than path equivalence. Each important12mark extends those data by one step; the tree and fresh-run bridges then13reconstruct the intervening unmarked steps.14-/15noncomputable section16namespace Nonadditivity.HaarPathClasses17open HaarPathGraph HaarPathProfiles18variable {V : Type*} [DecidableEq V] {m : ℕ}19variable {P Q : Path V 2 m}2021/-- Literal equality of all normalized data in the decoded prefix. -/22def NormalizedPrefixEq (P Q : Path V 2 m) (hm : 0 < m) (k : ℕ) : Prop :=23(∀ j : Fin (m+1), j.val ≤ k → P.vertexName hm j=Q.vertexName hm j) ∧24∀ a : Incidence m, a.1.val < k → normalColor P hm a=normalColor Q hm a2526theorem normalizedPrefixEq_zero (P Q : Path V 2 m) (hm : 0 < m) :27NormalizedPrefixEq P Q hm 0 := by28constructor29· intro j hj30have he : j=0 := Fin.ext (by change j.val=0; omega)31subst j32rw [P.vertexName_root hm,Q.vertexName_root hm]33· intro a ha34omega3536theorem normalizedPrefixEq_mono (hm : 0 < m) {j k : ℕ}37(h : NormalizedPrefixEq P Q hm k) (hjk : j ≤ k) : NormalizedPrefixEq P Q hm j :=38⟨fun a ha => h.1 a (ha.trans hjk),fun a ha => h.2 a (ha.trans_le hjk)⟩3940theorem normalizedPrefixEq_full (hm : 0 < m)41(h : NormalizedPrefixEq P Q hm m) : SamePattern P Q := by42apply samePattern_of_named_data hm (colorNormalizer P hm) (colorNormalizer Q hm)43· intro j44exact h.1 j (by omega)45· intro a46exact h.2 a a.1.isLt4748/-- Extend by an actual step once its target and two incidence labels are49known. This covers important edges, including loops and repeated edges. -/50theorem normalizedPrefixEq_extend (hm : 0 < m) (i : Fin m)51(hp : NormalizedPrefixEq P Q hm i.val)52(ht : P.vertexName hm i.succ=Q.vertexName hm i.succ)53(hc : ∀ b : Bool, normalColor P hm (i,b)=normalColor Q hm (i,b)) :54NormalizedPrefixEq P Q hm (i.val+1) := by55constructor56· intro j hj57by_cases hj' : j.val ≤ i.val58· exact hp.1 j hj'59· have he : j=i.succ := Fin.ext (by simp; omega)60subst j61exact ht62· rintro ⟨j,b⟩ hj63by_cases hj' : j.val < i.val64· exact hp.2 (j,b) hj'65· have he : j=i := Fin.ext (by change j.val < i.val+1 at hj; omega)66subst j67exact hc b6869/-- Projection of the actual sparse mark supplies all data of an important70step, using no lookup in the unreconstructed final graph. -/71theorem normalizedPrefixEq_extend_mark (hm : 0 < m) (i : Fin m)72(hp : NormalizedPrefixEq P Q hm i.val)73(hmark : explorationMark P hm i=explorationMark Q hm i) :74NormalizedPrefixEq P Q hm (i.val+1) := by75apply normalizedPrefixEq_extend hm i hp76· exact congrArg Prod.fst hmark77· intro b78cases b79· exact congrArg (fun x : ExplorationMark m => x.2.2.2.1) hmark80· exact congrArg (fun x : ExplorationMark m => x.2.2.1) hmark8182theorem nextImportant_eq_of_eventList_eq (hm : 0 < m)83(h : explorationEventList P hm=explorationEventList Q hm) (a : ℕ) :84P.nextImportant a=Q.nextImportant a := by85have hi := importantTimes_eq_of_eventList_eq hm h86simp only [Path.nextImportant,Path.importantStops,hi]8788theorem normalizer_freshNormalization (P : Path V 2 m) (hm : 0 < m) :89FreshNormalization P (colorNormalizer P hm) initialColor nextColor := by90constructor91· intro i hi92exact normalColor_incoming P hm i hi93· intro i j hi hij94have hv : j.castSucc=i.succ := Fin.ext (by simpa using hij.symm)95simpa only [normalColor,normalizedIncidenceColor,incidenceVertex,incidenceColor,96if_true,hv] using normalColor_after_firstVisit P hm i j hi hij9798end Nonadditivity.HaarPathClasses