Exact Lean source
Nonadditivity.HaarNonbacktrackingSegmentation
Download original .lean · View on GitHub · Jump to source
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
14 project constants, including generated, internal and private declarations.
14 declarations
Nonadditivity.HaarNonbacktracking.coefficient_factorization_positiveNonadditivity.HaarNonbacktracking.coefficient_factorization_segmentsNonadditivity.HaarNonbacktracking.mk_flatMap_toWordNonadditivity.HaarNonbacktracking.mk_flatMap_toWord._simp_1_1internal/detail/privateNonadditivity.HaarNonbacktracking.prod_cons_ne_one_of_reducedNonadditivity.HaarNonbacktracking.segmentedProductNonadditivity.HaarNonbacktracking.segmentedProduct._sparseCasesOn_1internal/detail/privateNonadditivity.HaarNonbacktracking.segmentedProduct._sparseCasesOn_2internal/detail/privateNonadditivity.HaarNonbacktracking.segmentedProduct._sunfoldinternal/detail/privateNonadditivity.HaarNonbacktracking.segmentedProduct._unsafe_recinternal/detail/privateNonadditivity.HaarNonbacktracking.segmentedProduct.match_1internal/detail/privateNonadditivity.HaarNonbacktracking.segmentedProduct_consNonadditivity.HaarNonbacktracking.segmentedProduct_singleNonadditivity.HaarNonbacktracking.toWord_prod_of_reduced
Full module
1/-2Copyright (c) 2026 the Nonadditivity project contributors.3All rights reserved. See COPYRIGHT.md for licensing and attribution.4-/56import Nonadditivity.HaarNonbacktrackingFirstStep7import Nonadditivity.HaarTimeCompositions89/-! # Exact iterated last-return segmentation of reduced free-group words -/1011noncomputable section12set_option backward.isDefEq.respectTransparency false1314namespace Nonadditivity.HaarNonbacktracking1516open scoped BigOperators17open HaarTimeCompositions1819section Words20variable {α : Type*} [DecidableEq α]2122theorem mk_flatMap_toWord (gs : List (FreeGroup α)) :23FreeGroup.mk (gs.flatMap FreeGroup.toWord) = gs.prod := by24induction gs with25| nil => simp [← FreeGroup.one_eq_mk]26| cons g gs ih =>27rw [List.flatMap_cons, ← FreeGroup.mul_mk, FreeGroup.mk_toWord, ih, List.prod_cons]2829theorem toWord_prod_of_reduced (gs : List (FreeGroup α))30(hred : FreeGroup.IsReduced (gs.flatMap FreeGroup.toWord)) :31gs.prod.toWord = gs.flatMap FreeGroup.toWord := by32rw [← mk_flatMap_toWord, FreeGroup.toWord_mk, hred.reduce_eq]3334theorem prod_cons_ne_one_of_reduced (g : FreeGroup α) (gs : List (FreeGroup α))35(hg : g ≠ 1) (hred : FreeGroup.IsReduced ((g :: gs).flatMap FreeGroup.toWord)) :36(g :: gs).prod ≠ 1 := by37intro h38have he := toWord_prod_of_reduced (g :: gs) hred39rw [h, FreeGroup.toWord_one, List.flatMap_cons] at he40have : g.toWord = [] := (List.append_eq_nil_iff.mp he.symm).141exact hg (FreeGroup.toWord_eq_nil_iff.mp this)4243end Words4445section Ring46variable {G R : Type*} [Group G] [Ring R]4748/-- At all but the final segment use non-returning coefficients; the final49segment is the ordinary coefficient. Factors retain their actual order. -/50def segmentedProduct (A : MonoidAlgebra R G) : G → List G → List ℕ → R51| g, [], [n] => (A ^ n) g52| g, h :: gs, n :: ns => killedPolynomial A 1 n g * segmentedProduct A h gs ns53| _, _, _ => 05455@[simp] theorem segmentedProduct_single (A : MonoidAlgebra R G) (g : G) (n : ℕ) :56segmentedProduct A g [] [n] = (A ^ n) g := rfl5758@[simp] theorem segmentedProduct_cons (A : MonoidAlgebra R G) (g h : G)59(gs : List G) (n : ℕ) (ns : List ℕ) :60segmentedProduct A g (h :: gs) (n :: ns) =61killedPolynomial A 1 n g * segmentedProduct A h gs ns := rfl6263end Ring6465variable {α R : Type*} [DecidableEq α] [Ring R]6667/-- Both segment lengths may be taken strictly positive. The omitted68endpoints vanish because neither word is the identity. -/69theorem coefficient_factorization_positive70(A : MonoidAlgebra R (FreeGroup α))71(hA : ∀ a ∈ A.support, a.toWord.length ≤ 1)72(n : ℕ) (g h : FreeGroup α) (hg : g ≠ 1) (hh : h ≠ 1)73(hred : FreeGroup.IsReduced (g.toWord ++ h.toWord)) :74(A ^ n) (g * h) = ∑ k ∈ Finset.range n,75killedPolynomial A 1 (k + 1) g * (A ^ (n - (k + 1))) h := by76rw [coefficient_factorization_of_reduced_append A hA n g h hh hred]77let f : ℕ → R := fun k => killedPolynomial A 1 k g * (A ^ (n - k)) h78change ∑ k ∈ Finset.range n, f k = ∑ k ∈ Finset.range n, f (k + 1)79have hzero : f 0 = 0 := by80simp [f, killedPolynomial, MonoidAlgebra.one_def, Ne.symm hg]81have hn : f n = 0 := by82simp [f, MonoidAlgebra.one_def, Ne.symm hh]83have he := Finset.sum_range_succ' f n84rw [Finset.sum_range_succ] at he85simpa [hzero, hn] using he8687/-- The full literal coefficient factorization over positive time88compositions. Every non-returning factor may subsequently be localized to89its terminal letter by `killedPolynomial_first_step`. -/90theorem coefficient_factorization_segments91(A : MonoidAlgebra R (FreeGroup α))92(hA : ∀ a ∈ A.support, a.toWord.length ≤ 1)93(g : FreeGroup α) (gs : List (FreeGroup α))94(hne : ∀ h ∈ g :: gs, h ≠ 1)95(hred : FreeGroup.IsReduced ((g :: gs).flatMap FreeGroup.toWord)) (n : ℕ) :96(A ^ n) (g :: gs).prod = ∑ t ∈ compositions gs.length n,97segmentedProduct A g gs t := by98induction gs generalizing g n with99| nil =>100by_cases hn : n = 0101· subst n102have hg := hne g (by simp)103simp [MonoidAlgebra.one_def, Ne.symm hg]104· simp [compositions, hn]105| cons h gs ih =>106have hg : g ≠ 1 := hne g (by simp)107have hh : h ≠ 1 := hne h (by simp)108have htred : FreeGroup.IsReduced ((h :: gs).flatMap FreeGroup.toWord) :=109(List.isChain_append.mp hred).2.1110have htword := toWord_prod_of_reduced (h :: gs) htred111have hprefix : FreeGroup.IsReduced (g.toWord ++ (h :: gs).prod.toWord) := by112simpa only [htword, List.flatMap_cons] using hred113have htne := prod_cons_ne_one_of_reduced h gs hh htred114rw [List.prod_cons, coefficient_factorization_positive A hA n g (h :: gs).prod115hg htne hprefix, List.length_cons, sum_succ]116apply Finset.sum_congr rfl117intro k hk118have htne' : ∀ w ∈ h :: gs, w ≠ 1 := fun w hw => hne w (by simp [hw])119rw [ih h htne' htred (n - (k + 1)), Finset.mul_sum]120apply Finset.sum_congr rfl121intro t ht122rfl123124end Nonadditivity.HaarNonbacktracking