Exact Lean source
Nonadditivity.HaarProfileAssignmentBound
Download original .lean · View on GitHub · Jump to source
Direct imports
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
15 project constants, including generated, internal and private declarations.
15 declarations
Nonadditivity.HaarProfileAssignmentBound.block_product_zero_of_invalidNonadditivity.HaarProfileAssignmentBound.dependent_profile_sum_norm_leNonadditivity.HaarProfileAssignmentBound.embedAssignmentNonadditivity.HaarProfileAssignmentBound.embedAssignment_injectiveNonadditivity.HaarProfileAssignmentBound.exists_invalid_of_not_mem_rangeNonadditivity.HaarProfileAssignmentBound.sum_uniform_eq_dependentNonadditivity.HaarProfilePadding.embedWords.congr_simpNonadditivity.HaarProfilePatternBound.blockFactor.congr_simpNonadditivity.HaarProfilePatternBound.blockFactor.eq_1internal/detail/privateNonadditivity.HaarProfilePatternBound.blockFactor.eq_2internal/detail/private_private.Nonadditivity.HaarProfileAssignmentBound.0.Nonadditivity.HaarProfilePatternBound.blockFactor.match_1.eq_1internal/detail/private_private.Nonadditivity.HaarProfileAssignmentBound.0.Nonadditivity.HaarProfilePatternBound.blockFactor.match_1.eq_2internal/detail/private_private.Nonadditivity.HaarProfileAssignmentBound.0.Nonadditivity.HaarProfilePatternBound.blockFactor.match_1.splitterinternal/detail/private_private.Nonadditivity.HaarProfileAssignmentBound.0.Nonadditivity.HaarProfilePatternBound.blockFactor.match_1.splitter._sparseCasesOn_2internal/detail/private_private.Nonadditivity.HaarProfileAssignmentBound.0.Nonadditivity.HaarProfilePatternBound.blockFactor.match_1.splitter._sparseCasesOn_3internal/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.HaarProfilePatternBound78/-! # Remove padded assignments and sum over the actual dependent palettes910Every introduced label has a zero-padded endpoint. An invalid profile choice11therefore makes the full ordered coefficient product zero. Consequently the12uniform-register sum equals the literal sum over the different profile-word13palettes attached to each edge label.14-/1516noncomputable section17set_option backward.isDefEq.respectTransparency false18set_option linter.unusedSectionVars false19namespace Nonadditivity.HaarProfileAssignmentBound20open scoped BigOperators21open HaarOperatorPolynomial HaarProfileBlockCoefficients HaarProfilePadding22HaarProfileCoefficient HaarPathProfiles NoncommutativeCS HaarProfilePatternBound2324variable {I E : Type*} [DecidableEq I]25variable [NormedAddCommGroup E] [InnerProductSpace ℂ E] [CompleteSpace E]26variable {d M : ℕ}2728def embedAssignment (size : I → ℕ) (profile : I → Profile (Color d))29(hsize : ∀ i, size i ≤ M) (σ : ∀ i, Words d (size i) (profile i)) : I → Palette d M :=30fun i => embedWords (hsize i) (σ i)3132theorem embedAssignment_injective (size : I → ℕ) (profile : I → Profile (Color d))33(hsize : ∀ i, size i ≤ M) : Function.Injective (embedAssignment size profile hsize) := by34intro σ τ h35funext i36exact embedWords_injective (hsize i) (congrFun h i)3738theorem exists_invalid_of_not_mem_range (size : I → ℕ) (profile : I → Profile (Color d))39(hsize : ∀ i, size i ≤ M) (σ : I → Palette d M)40(hσ : σ ∉ Set.range (embedAssignment size profile hsize)) :41∃ i, σ i ∉ Set.range (embedWords (p := profile i) (hsize i)) := by42classical43by_cases h : ∀ i, σ i ∈ Set.range (embedWords (p := profile i) (hsize i))44· let τ : ∀ i, Words d (size i) (profile i) := fun i => Classical.choose (h i)45have he : embedAssignment size profile hsize τ = σ := by46funext i47exact Classical.choose_spec (h i)48exact (hσ ⟨τ, he⟩).elim49· exact not_forall.mp h5051/-- Any invalid label value kills its actual first/singleton coefficient,52and hence the full ordered product. -/53theorem block_product_zero_of_invalid {m n : ℕ} {a : Fin m → I} {b : Fin n → I}54(P : NoncommutativeCS.EndpointSkeleton I a b)55(B : Polynomial (FreeGroup (Fin d)) E)56(size : I → ℕ) (profile : I → Profile (Color d)) (hsize : ∀ i, size i ≤ M)57(ordinary : ℕ → Bool) (duration : ℕ → ℕ) (forward : ℕ → I → Bool)58(decode : ℕ → List I → List (Palette d M) → FreeGroup (Fin d))59(σ : I → Palette d M) {i : I} (hi : i ∈ P.profileLabels)60(hbad : σ i ∉ Set.range (embedWords (p := profile i) (hsize i))) (k : ℕ) :61(P.blockFactors (blockFactor B size profile hsize ordinary duration forward decode) k σ).prod = 0 := by62induction P generalizing k with63| done => simpa [NoncommutativeCS.EndpointSkeleton.profileLabels] using hi64| first j P ih =>65rcases List.mem_cons.mp hi with he | hi66· subst i67simp [NoncommutativeCS.EndpointSkeleton.blockFactors, blockFactor, paddedFamily,68Function.extend_apply' _ _ _ hbad]69· simpa [NoncommutativeCS.EndpointSkeleton.blockFactors, List.prod_append,70ih hi (k + 1)]71| last p P ih =>72simpa [NoncommutativeCS.EndpointSkeleton.blockFactors, List.prod_append,73ih hi (k + 1)]74| middle v P ih =>75simpa [NoncommutativeCS.EndpointSkeleton.blockFactors, List.prod_append,76ih hi (k + 1)]77| singleton j P ih =>78rcases List.mem_cons.mp hi with he | hi79· subst i80simp [NoncommutativeCS.EndpointSkeleton.blockFactors, blockFactor, paddedFamily,81Function.extend_apply' _ _ _ hbad]82· simpa [NoncommutativeCS.EndpointSkeleton.blockFactors, List.prod_append,83ih hi (k + 1)]8485/-- Exact equality of the uniform-register and dependent-profile sums. -/86theorem sum_uniform_eq_dependent [Fintype I]87{m n : ℕ} {a : Fin m → I} {b : Fin n → I}88(P : NoncommutativeCS.EndpointSkeleton I a b) (hc : ∀ i : I, i ∈ P.profileLabels)89(B : Polynomial (FreeGroup (Fin d)) E)90(size : I → ℕ) (profile : I → Profile (Color d)) (hsize : ∀ i, size i ≤ M)91(ordinary : ℕ → Bool) (duration : ℕ → ℕ) (forward : ℕ → I → Bool)92(decode : ℕ → List I → List (Palette d M) → FreeGroup (Fin d)) (k : ℕ) :93(∑ σ : I → Palette d M,94(P.blockFactors (blockFactor B size profile hsize ordinary duration forward decode) k σ).prod) =95∑ σ : ∀ i, Words d (size i) (profile i),96(P.blockFactors (blockFactor B size profile hsize ordinary duration forward decode) k97(embedAssignment size profile hsize σ)).prod := by98classical99let F : (I → Palette d M) → E →L[ℂ] E := fun σ =>100(P.blockFactors (blockFactor B size profile hsize ordinary duration forward decode) k σ).prod101let e := embedAssignment size profile hsize102have he := embedAssignment_injective size profile hsize103have hF : F = Function.extend e (fun σ => F (e σ)) 0 := by104funext σ105by_cases hσ : σ ∈ Set.range e106· obtain ⟨τ, rfl⟩ := hσ107rw [he.extend_apply]108· rw [Function.extend_apply' _ _ _ hσ]109obtain ⟨i, hi⟩ := exists_invalid_of_not_mem_range size profile hsize σ hσ110exact block_product_zero_of_invalid P B size profile hsize ordinary duration forward decode111σ (hc i) hi k112change (∑ σ, F σ) = ∑ σ, F (e σ)113exact (congrArg (fun f : (I → Palette d M) → E →L[ℂ] E => ∑ σ, f σ) hF).trans114(sum_extend_zero e he (fun σ => F (e σ)))115116/-- The fixed-pattern bound now sums over the actual independent profile117families, including their different lengths and letter-count constraints. -/118theorem dependent_profile_sum_norm_le [Fintype I]119(P : NoncommutativeCS.EndpointSkeleton I (Fin.elim0 : Fin 0 → I) (Fin.elim0 : Fin 0 → I))120(hn : P.profileLabels.Nodup) (hc : ∀ i : I, i ∈ P.profileLabels)121(B : Polynomial (FreeGroup (Fin d)) E)122(hB : ∀ g ∈ B.support, g.toWord.length ≤ 1)123(size : I → ℕ) (profile : I → Profile (Color d)) (hsize : ∀ i, size i ≤ M)124(ordinary : ℕ → Bool) (duration : ℕ → ℕ) (forward : ℕ → I → Bool)125(decode : ℕ → List I → List (Palette d M) → FreeGroup (Fin d))126(hduration : ∀ k, 1 ≤ duration k) (k : ℕ) :127‖∑ σ : ∀ i, Words d (size i) (profile i),128(P.blockFactors (blockFactor B size profile hsize ordinary duration forward decode) k129(embedAssignment size profile hsize σ)).prod‖ ≤130P.singletonWeight size d * (HaarMarkedCompositions.markedProduct P.markedFlags (P.times duration k) : ℝ) *131‖regular B‖ ^ (P.times duration k).sum := by132rw [← sum_uniform_eq_dependent P hc B size profile hsize ordinary duration forward decode k]133exact P.profile_sum_norm_le hn hc B hB size profile hsize ordinary duration forward decode hduration k134135end Nonadditivity.HaarProfileAssignmentBound