Exact Lean source
Nonadditivity.HaarPathReconstructionFresh
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
12 project constants, including generated, internal and private declarations.
12 declarations
Nonadditivity.HaarPathClasses.explorationMark.eq_1internal/detail/privateNonadditivity.HaarPathClasses.normalColor.congr_simpNonadditivity.HaarPathClasses.normalizedPrefixEq_after_treeStopNonadditivity.HaarPathClasses.normalizedPrefixEq_after_treeStop._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_after_treeStop._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_fresh_intervalNonadditivity.HaarPathClasses.normalizedPrefixEq_fresh_interval._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_fresh_interval._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_fresh_interval._proof_1_3internal/detail/privateNonadditivity.HaarPathClasses.normalizedPrefixEq_initialNonadditivity.HaarPathClasses.treeStop.congr_simpNonadditivity.HaarPathClasses.treeStopIndex.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.HaarPathReconstruction78/-! # The fresh-run steps in sparse normalized path reconstruction -/910noncomputable section11namespace Nonadditivity.HaarPathClasses12open HaarPathGraph HaarPathProfiles1314variable {V : Type*} [DecidableEq V] {m : ℕ} {P Q : Path V 2 m}1516/-- Equal event lists determine the entire unmarked initial prefix. -/17theorem normalizedPrefixEq_initial (hm : 0<m)18(hevents : explorationEventList P hm=explorationEventList Q hm) :19NormalizedPrefixEq P Q hm (P.nextImportant 0) := by20have h := normalized_before_first_important P Q hm21(colorNormalizer P hm) (colorNormalizer Q hm) initialColor nextColor22(normalizer_freshNormalization P hm) (normalizer_freshNormalization Q hm)23(normalColor_root P hm) (normalColor_root Q hm)24(nextImportant_eq_of_eventList_eq hm hevents 0)25refine ⟨h.1,?_⟩26rintro ⟨i,b⟩ hi27cases b with28| false => exact (h.2 i hi).229| true => exact (h.2 i hi).13031/-- Join an already reconstructed prefix to a fresh interval. Only the32first outgoing label is read from the sparse mark. -/33theorem normalizedPrefixEq_fresh_interval (hm : 0<m) (a b : ℕ)34(hab : a ≤ b) (hbm : b ≤ m) (hp : NormalizedPrefixEq P Q hm a)35(hfresh : ∀ i : Fin m, a ≤ i.val → i.val<b → P.FirstVisit i ∧ Q.FirstVisit i)36(hfirst : ∀ i : Fin m, i.val=a → normalColor P hm (i,true)=normalColor Q hm (i,true)) :37NormalizedPrefixEq P Q hm b := by38have hstart : P.vertexName hm ⟨a,by omega⟩=Q.vertexName hm ⟨a,by omega⟩ :=39hp.1 _ le_rfl40have h := normalized_fresh_run P Q hm41(colorNormalizer P hm) (colorNormalizer Q hm) initialColor nextColor42(normalizer_freshNormalization P hm) (normalizer_freshNormalization Q hm)43a b hab hbm hfresh hstart hfirst44constructor45· intro j hj46by_cases hja : j.val ≤ a47· exact hp.1 j hja48· exact h.1 j (by omega) hj49· rintro ⟨i,c⟩ hi50by_cases hia : i.val<a51· exact hp.2 (i,c) hia52· have hc := h.2 i (by omega) hi53cases c with54| false => exact hc.255| true => exact hc.15657/-- After the reconstructed old-tree run, the actual exploration split and58the mark's final color determine the whole remaining fresh run. -/59theorem normalizedPrefixEq_after_treeStop (hm : 0<m) (i : Fin m)60(hevents : explorationEventList P hm=explorationEventList Q hm)61(hmark : explorationMark P hm i=explorationMark Q hm i)62(hstop : treeStop P i=treeStop Q i)63(hp : NormalizedPrefixEq P Q hm (treeStop P i)) :64NormalizedPrefixEq P Q hm (P.nextImportant (i.val+1)) := by65have hnext := nextImportant_eq_of_eventList_eq hm hevents (i.val+1)66have hbounds := P.nextImportant_bounds (i.val+1) (by omega)67have hswitch := P.firstFresh_bounds (i.val+1) (P.nextImportant (i.val+1)) hbounds.168apply normalizedPrefixEq_fresh_interval hm (treeStop P i)69(P.nextImportant (i.val+1)) hswitch.2 hbounds.2 hp70· intro j hsj hjb71have hP := (P.exploration_block_split (i.val+1) (by omega)).2.2 j hsj hjb72have hsjQ : treeStop Q i ≤ j.val := by rw [←hstop]; exact hsj73have hQ := (Q.exploration_block_split (i.val+1) (by omega)).2.2 j74hsjQ (by simpa only [←hnext] using hjb)75exact ⟨hP,hQ⟩76· intro j hjs77have hsP : treeStop P i<m := by rw [←hjs]; exact j.isLt78have hsQ : treeStop Q i<m := by simpa only [←hstop] using hsP79have hc := congrArg (fun x : ExplorationMark m => x.2.2.2.2) hmark80simp only [explorationMark,dif_pos hsP,dif_pos hsQ] at hc81have hjP : (⟨treeStop P i,hsP⟩ : Fin m)=j := Fin.ext hjs.symm82have hjQ : (⟨treeStop Q i,hsQ⟩ : Fin m)=j := Fin.ext (hstop.symm.trans hjs.symm)83simpa only [hjP,hjQ] using hc8485end Nonadditivity.HaarPathClasses