Exact Lean source
Nonadditivity.HaarReducedChunks
Download original .lean · View on GitHub · Jump to source
Direct imports
Nonadditivity.HaarNonbacktrackingSegmentationMathlib.Data.List.Infixdependency
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
7 project constants, including generated, internal and private declarations.
7 declarations
Nonadditivity.HaarNonbacktracking.chunk_flatMap_reducedNonadditivity.HaarNonbacktracking.chunk_prod_ne_oneNonadditivity.HaarNonbacktracking.chunk_prod_toWordNonadditivity.HaarNonbacktracking.chunk_products_flatMapNonadditivity.HaarNonbacktracking.chunk_products_nontrivialNonadditivity.HaarNonbacktracking.chunk_products_reducedNonadditivity.HaarNonbacktracking.occurrence_chunk_spec
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarNonbacktrackingSegmentation7import Mathlib.Data.List.Infix89/-! # Reduced, nontrivial group words on actual contiguous chunks1011Grouping consecutive pieces of a reduced word introduces neither cancellation12nor trivial chunks. These identities supply the literal hypotheses of the13checked positive-time coefficient factorization.14-/15noncomputable section16namespace Nonadditivity.HaarNonbacktracking17variable {α C : Type*} [DecidableEq α]1819theorem chunk_flatMap_reduced (chunks : List (List (FreeGroup α)))20(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))21{chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) :22FreeGroup.IsReduced (chunk.flatMap FreeGroup.toWord) := by23exact hred.infix ((List.infix_of_mem_flatten hc).flatMap FreeGroup.toWord)2425theorem chunk_prod_toWord (chunks : List (List (FreeGroup α)))26(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))27{chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) :28chunk.prod.toWord=chunk.flatMap FreeGroup.toWord :=29toWord_prod_of_reduced chunk (chunk_flatMap_reduced chunks hred hc)3031theorem chunk_prod_ne_one (chunks : List (List (FreeGroup α)))32(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))33(hne : ∀ g ∈ chunks.flatten, g≠1)34{chunk : List (FreeGroup α)} (hc : chunk ∈ chunks) (hchunk : chunk≠[]) :35chunk.prod≠1 := by36cases chunk with37| nil => exact (hchunk rfl).elim38| cons g gs =>39exact prod_cons_ne_one_of_reduced g gs40(hne g (List.mem_flatten.mpr ⟨g::gs,hc,by simp⟩))41(chunk_flatMap_reduced chunks hred hc)4243theorem chunk_products_flatMap (chunks : List (List (FreeGroup α)))44(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord)) :45(chunks.map List.prod).flatMap FreeGroup.toWord =46chunks.flatten.flatMap FreeGroup.toWord := by47rw [List.flatMap_map]48calc49_ = chunks.flatMap (fun c => c.flatMap FreeGroup.toWord) := by50apply List.flatMap_congr51intro c hc52exact chunk_prod_toWord chunks hred hc53_ = _ := by54clear hred55induction chunks with56| nil => rfl57| cons c cs ih =>58simp only [List.flatMap_cons,List.flatten_cons,List.flatMap_append]59exact congrArg (c.flatMap FreeGroup.toWord ++ ·) ih6061theorem chunk_products_reduced (chunks : List (List (FreeGroup α)))62(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord)) :63FreeGroup.IsReduced ((chunks.map List.prod).flatMap FreeGroup.toWord) := by64rwa [chunk_products_flatMap chunks hred]6566theorem chunk_products_nontrivial (chunks : List (List (FreeGroup α)))67(hred : FreeGroup.IsReduced (chunks.flatten.flatMap FreeGroup.toWord))68(hne : ∀ g ∈ chunks.flatten, g≠1) (hchunks : ∀ c∈chunks, c≠[]) :69∀ g∈chunks.map List.prod, g≠1 := by70intro g hg71obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hg72exact chunk_prod_ne_one chunks hred hne hc (hchunks c hc)7374/-- Payload form: every original occurrence retains its own orientation and75word; the chunks need only concatenate to the original occurrence list. -/76theorem occurrence_chunk_spec (cs : List C) (chunks : List (List C))77(φ : C → FreeGroup α) (hflat : chunks.flatten=cs)78(hred : FreeGroup.IsReduced ((cs.map φ).flatMap FreeGroup.toWord))79(hne : ∀ c∈cs, φ c≠1) (hchunks : ∀ c∈chunks, c≠[]) :80let gs := chunks.map (fun c => (c.map φ).prod)81gs.flatMap FreeGroup.toWord = (cs.map φ).flatMap FreeGroup.toWord ∧82FreeGroup.IsReduced (gs.flatMap FreeGroup.toWord) ∧83(∀ g∈gs, g≠1) ∧ gs.prod=(cs.map φ).prod := by84let ls := chunks.map (List.map φ)85have hl : ls.flatten=cs.map φ := by86rw [←List.map_flatten,hflat]87have hr : FreeGroup.IsReduced (ls.flatten.flatMap FreeGroup.toWord) := by rwa [hl]88have hn : ∀ g∈ls.flatten, g≠1 := by89rw [hl]90intro g hg91obtain ⟨c,hc,rfl⟩ := List.mem_map.mp hg92exact hne c hc93have hls : ∀ c∈ls, c≠[] := by94intro c hc95obtain ⟨b,hb,rfl⟩ := List.mem_map.mp hc96exact fun he => hchunks b hb (List.map_eq_nil_iff.mp he)97have hword := chunk_products_flatMap ls hr98rw [hl] at hword99have hgn := chunk_products_nontrivial ls hr hn hls100have hgr := chunk_products_reduced ls hr101have hprod := congrArg FreeGroup.mk hword102rw [mk_flatMap_toWord,mk_flatMap_toWord] at hprod103have hout := And.intro hword (And.intro hgr (And.intro hgn hprod))104simpa only [ls,List.map_map,Function.comp_def] using hout105106end Nonadditivity.HaarNonbacktracking