Exact Lean source
Nonadditivity.HaarPathNormalizedFresh
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
19 project constants, including generated, internal and private declarations.
19 declarations
Nonadditivity.HaarPathClasses.FreshNormalizationNonadditivity.HaarPathClasses.normalized_before_first_importantNonadditivity.HaarPathClasses.normalized_before_first_important._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_runNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_3internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_4internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_5internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_6internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_7internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_8internal/detail/privateNonadditivity.HaarPathClasses.normalized_fresh_run._proof_1_9internal/detail/privateNonadditivity.HaarPathClasses.normalized_initial_fresh_runNonadditivity.HaarPathClasses.normalized_initial_fresh_run._proof_1_1internal/detail/privateNonadditivity.HaarPathClasses.normalized_initial_fresh_run._proof_1_2internal/detail/privateNonadditivity.HaarPathClasses.normalized_initial_fresh_run._proof_1_3internal/detail/privateNonadditivity.HaarPathClasses.normalized_initial_fresh_run._proof_1_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.HaarPathVertexNames7import Nonadditivity.HaarPathExplorationBlocks89/-! # Literal reconstruction of normalized fresh exploration runs1011Fresh vertex names are their first-arrival times. Incoming incidence labels12are fixed, as are outgoing labels after the first fresh step. Consequently13the start name and first outgoing label determine the whole interval's14normalized data.15-/1617noncomputable section18namespace Nonadditivity.HaarPathClasses19open HaarPathGraph HaarPathProfiles2021variable {V : Type*} [DecidableEq V] {d m : ℕ}2223/-- The two local normalization requirements at first arrivals. -/24def FreshNormalization (P : Path V d m) (β : V → Equiv.Perm (Color d))25(c₀ c₁ : Color d) : Prop :=26(∀ i : Fin m, P.FirstVisit i → β (P.vertex i.succ) (flipColor (P.colors i))=c₀) ∧27(∀ i j : Fin m, P.FirstVisit i → i.val+1=j.val → β (P.vertex i.succ) (P.colors j)=c₁)2829/-- Reconstruct all names and both incidence labels on an actual fresh run.30No intermediate color choices or vertex correspondences are supplied. -/31theorem normalized_fresh_run (P Q : Path V d m) (hm : 0<m)32(β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)33(hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)34(a b : ℕ) (hab : a ≤ b) (hbm : b ≤ m)35(hfresh : ∀ i : Fin m, a ≤ i.val → i.val<b → P.FirstVisit i ∧ Q.FirstVisit i)36(hstart : P.vertexName hm ⟨a,by omega⟩=Q.vertexName hm ⟨a,by omega⟩)37(hfirst : ∀ i : Fin m, i.val=a →38normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true)) :39(∀ j : Fin (m+1), a ≤ j.val → j.val ≤ b → P.vertexName hm j=Q.vertexName hm j) ∧40(∀ i : Fin m, a ≤ i.val → i.val<b →41normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧42normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by43constructor44· intro j haj hjb45by_cases hja : j.val=a46· have he : j=⟨a,by omega⟩ := Fin.ext hja47simpa only [he] using hstart48· let i : Fin m := ⟨j.val-1,by omega⟩49have hij : i.succ=j := Fin.ext (by dsimp [i]; omega)50have hi := hfresh i (by dsimp [i]; omega) (by dsimp [i]; omega)51apply Fin.ext52rw [←hij,P.vertexName_of_firstVisit hm hi.1,Q.vertexName_of_firstVisit hm hi.2]53· intro i hai hib54have hi := hfresh i hai hib55constructor56· by_cases hia : i.val=a57· exact hfirst i hia58· let j : Fin m := ⟨i.val-1,by omega⟩59have hji : j.val+1=i.val := by dsimp [j]; omega60have hidx : i.castSucc=j.succ := Fin.ext hji.symm61have hj := hfresh j (by dsimp [j]; omega) (by dsimp [j]; omega)62change β (P.vertex i.castSucc) (P.colors i)=γ (Q.vertex i.castSucc) (Q.colors i)63rw [hidx,hβ.2 j i hj.1 hji,hγ.2 j i hj.2 hji]64· change β (P.vertex i.succ) (flipColor (P.colors i))=65γ (Q.vertex i.succ) (flipColor (Q.colors i))66rw [hβ.1 i hi.1,hγ.1 i hi.2]6768/-- The initial fresh prefix requires no color mark: the root's outgoing69color is fixed by its own normalization. -/70theorem normalized_initial_fresh_run (P Q : Path V d m) (hm : 0<m)71(β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)72(hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)73(hβroot : β (P.vertex 0) (P.colors ⟨0,hm⟩)=c₀)74(hγroot : γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)=c₀)75(b : ℕ) (hbm : b ≤ m)76(hfresh : ∀ i : Fin m, i.val<b → P.FirstVisit i ∧ Q.FirstVisit i) :77(∀ j : Fin (m+1), j.val ≤ b → P.vertexName hm j=Q.vertexName hm j) ∧78(∀ i : Fin m, i.val<b →79normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧80normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by81have hs : P.vertexName hm ⟨0,by omega⟩=Q.vertexName hm ⟨0,by omega⟩ := by simp82have ho (i : Fin m) (hi : i.val=0) :83normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) := by84have he : i=⟨0,hm⟩ := Fin.ext hi85subst i86change β (P.vertex 0) (P.colors ⟨0,hm⟩)=γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)87rw [hβroot,hγroot]88have h := normalized_fresh_run P Q hm β γ c₀ c₁ hβ hγ 0 b (by omega) hbm89(fun i _ hi => hfresh i hi) hs ho90exact ⟨fun j hj => h.1 j (by omega) hj,fun i hi => h.2 i (by omega) hi⟩9192/-- Before a shared first important time, the normalized data agree without93any stored labels. The fresh-run hypothesis follows from the actual paths. -/94theorem normalized_before_first_important (P Q : Path V d m) (hm : 0<m)95(β γ : V → Equiv.Perm (Color d)) (c₀ c₁ : Color d)96(hβ : FreshNormalization P β c₀ c₁) (hγ : FreshNormalization Q γ c₀ c₁)97(hβroot : β (P.vertex 0) (P.colors ⟨0,hm⟩)=c₀)98(hγroot : γ (Q.vertex 0) (Q.colors ⟨0,hm⟩)=c₀)99(hb : P.nextImportant 0=Q.nextImportant 0) :100(∀ j : Fin (m+1), j.val ≤ P.nextImportant 0 →101P.vertexName hm j=Q.vertexName hm j) ∧102(∀ i : Fin m, i.val<P.nextImportant 0 →103normalizedIncidenceColor P β (i,true)=normalizedIncidenceColor Q γ (i,true) ∧104normalizedIncidenceColor P β (i,false)=normalizedIncidenceColor Q γ (i,false)) := by105apply normalized_initial_fresh_run P Q hm β γ c₀ c₁ hβ hγ hβroot hγroot106(P.nextImportant 0) (P.nextImportant_bounds 0 (by omega)).2107intro i hi108exact ⟨P.initial_prefix_firstVisit i hi,Q.initial_prefix_firstVisit i (by simpa only [←hb] using hi)⟩109110end Nonadditivity.HaarPathClasses