OAI/Probability/CubeShuffle/ModifiedRouting.lean
71 declarations, 0 contain sorry, 0 declared as axioms
- lemma
OAI.CubeShuffle.orbitSet_eq_of_agreeline 9 - def
OAI.CubeShuffle.survivingCycleline 32 - def
OAI.CubeShuffle.perturbCycleMapline 41 - lemma
OAI.CubeShuffle.perturbCycleMap_injectiveline 49 - theorem
OAI.CubeShuffle.selectedCycle_perturb_leline 69Source documentation
Changing a permutation on at most b specified inputs can destroy at most b of its wholly marked cycles. This is the exceptional-block loss in FAC.2.
theorem selectedCycle_perturb_le (p q : Equiv.Perm α) (S B : Finset α) (h : ∀ x ∉ B, p x = q x) : Fintype.card (RoutingNetwork.SelectedCycle p S) ≤ Fintype.card (RoutingNetwork.SelectedCycle q S)+B.card := by … - def
OAI.CubeShuffle.permDistanceline 82 - lemma
OAI.CubeShuffle.permDistance_sumline 85 - lemma
OAI.CubeShuffle.permDistance_reflline 90 - lemma
OAI.CubeShuffle.permDistance_leline 93 - lemma
OAI.CubeShuffle.permDistance_symmline 96 - lemma
OAI.CubeShuffle.permDistance_triangleline 99 - lemma
OAI.CubeShuffle.permDistance_mul_leftline 109 - lemma
OAI.CubeShuffle.permDistance_mul_rightline 118 - lemma
OAI.CubeShuffle.permDistance_invline 124 - lemma
OAI.CubeShuffle.permDistance_mul_leline 131 - lemma
OAI.CubeShuffle.selectedCycle_distance_leline 136 - lemma
OAI.CubeShuffle.permDistance_alternatingline 143 - lemma
OAI.CubeShuffle.alternatingCycles_distance_leline 149 - def
OAI.CubeShuffle.centralBlockPermline 169Source documentation
An arbitrary independent permutation on each fixed central size-2^L block.
def centralBlockPerm (L : ℕ) : (r : ℕ) → (Card r → Equiv.Perm (Card L)) → Equiv.Perm (Card (L+r)) | 0, C => C (fun j => Fin.elim0 j) | r+1, C => childLift (fun b => centralBlockPerm L r (fun u => C (Fin.cons b u))) /-- A genuine palindrome with a specified permutation inserted in each central block. Fair coins below that boundary will later be absorbed or cancelled. -/Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.childLift
- def
OAI.CubeShuffle.centralPalindromePermline 176Source documentation
A genuine palindrome with a specified permutation inserted in each central block. Fair coins below that boundary will later be absorbed or cancelled.
def centralPalindromePerm (L r : ℕ) (C : Card r → Equiv.Perm (Card L)) (ω : BenesCoins (L+r)) : Equiv.Perm (Card (L+r)) := …Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.BenesCoins
- lemma
OAI.CubeShuffle.centralPalindromePerm_stepline 181 - def
OAI.CubeShuffle.centralLevelCostline 202Source documentation
The actual alternating cycles at one expanded height, with the central permutations left arbitrary. No low-level cycles are counted.
noncomputable def centralLevelCost (t L : ℕ) : (r : ℕ) → (Card r → Equiv.Perm (Card L)) → {ι : Type*} → [Fintype ι] → (ι ↪ Card (L+r)) → BenesCoins (L+r) → ℕ | 0, _, _, _, _, _ => 0 | r+1, C, _, _, e, ω => let σ := benesStepEquiv (L+r) ω …Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.BenesCoins, OAI.CubeShuffle.benesStepEquiv
- def
OAI.CubeShuffle.centralSlabCostline 218 - lemma
OAI.CubeShuffle.permDistance_childLiftline 222 - def
OAI.CubeShuffle.centralDistanceline 246 - lemma
OAI.CubeShuffle.centralDistance_stepline 249 - lemma
OAI.CubeShuffle.permDistance_centralBlockline 264 - lemma
OAI.CubeShuffle.permDistance_centralPalindromeline 273 - lemma
OAI.CubeShuffle.centralLevelCost_stepline 280 - lemma
OAI.CubeShuffle.centralLevelCost_perturbline 297 - lemma
OAI.CubeShuffle.centralSlabCost_perturbline 327 - lemma
OAI.CubeShuffle.centralDistance_exceptionalline 335 - inductive
OAI.CubeShuffle.InputTreeline 353Source documentation
A recursively paired input routing that may stop at any central block. The leaf maps are genuine permutations, not probabilistic hypotheses.
inductive InputTree : ℕ → Type | tip {d : ℕ} (p : Equiv.Perm (Card d)) : InputTree d | node {d : ℕ} (ξ : Card d → Bool) (T : Bool → InputTree d) : InputTree (d+1)Mentions: OAI.CubeShuffle.Card
- def
OAI.CubeShuffle.InputTree.permline 357 - def
OAI.CubeShuffle.InputTree.levelCostline 361 - lemma
OAI.CubeShuffle.InputTree.levelCost_nodeline 375 - lemma
OAI.CubeShuffle.InputTree.levelCost_gtline 390 - lemma
OAI.CubeShuffle.InputTree.levelCost_adaptedline 398 - theorem
OAI.CubeShuffle.InputTree.level_partial_mgfline 431Source documentation
The same fresh-layer bound is valid with arbitrary fixed central input maps. This is needed for, and preserves, the exceptional-block construction.
theorem InputTree.level_partial_mgf (r s u : ℕ) (hu : u < r) (T : InputTree (s+r)) {ι : Type*} [Fintype ι] (e : ι ↪ Card (s+r)) (lo : Card r × SwitchIndex s → Bool) (J : ℕ) (hJ : 0 < J) (q : ℝ) (hq : 1 ≤ q) : finiteMean (fun hi : Card s × SwitchIndex r → Bool => q^(T.levelCost (s+u+1) e (assembleBits r s lo hi))) ≤ Real.exp (Fintype.card ι * cycleCoefficient u J q) := by …Mentions: OAI.CubeShuffle.InputTree, OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.finiteMean, OAI.CubeShuffle.assembleBits, OAI.CubeShuffle.cycleCoefficient
- def
OAI.CubeShuffle.InputTree.slabCostline 510Source documentation
Sum over a slab, padded by its actual zero costs when its levels exceed d.
noncomputable def InputTree.slabCost (l d : ℕ) (T : InputTree d) {ι : Type*} [Fintype ι] (e : ι ↪ Card d) (Y : SwitchIndex d → Bool) : ℕ := …Mentions: OAI.CubeShuffle.InputTree, OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex
- lemma
OAI.CubeShuffle.InputTree.slabCost_adaptedline 514 - theorem
OAI.CubeShuffle.InputTree.slab_partial_mgfline 523Source documentation
The genuine conditional slab estimate: no independence is asserted among node cycles or among levels in the slab. Jensen costs l on the exponent.
theorem InputTree.slab_partial_mgf (r s l : ℕ) (hl : 0 < l) (hs : 2*s ≤ l) (T : InputTree (s+r)) {ι : Type*} [Fintype ι] (e : ι ↪ Card (s+r)) (lo : Card r × SwitchIndex s → Bool) (q : ℝ) (hq : 1 ≤ q) (hlog : Real.log q ≤ 1/250) : finiteMean (fun hi : Card s × SwitchIndex r → Bool => q^(InputTree.slabCost l (s+r) T e (assembleBits r s lo hi))) ≤ Real.exp (Fintype.card ι * (68*Real.exp (-(l:ℝ)/64))) := by …Mentions: OAI.CubeShuffle.InputTree, OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.finiteMean, OAI.CubeShuffle.InputTree.slabCost, OAI.CubeShuffle.assembleBits
- def
OAI.CubeShuffle.boundaryTreeline 573Source documentation
A fixed central map in every block, with the genuine input-side fair layers above the boundary. The coins below L are ignored on this side.
def boundaryTree (L : ℕ) : (r : ℕ) → (Card r → Equiv.Perm (Card L)) → (SwitchIndex (L+r) → Bool) → InputTree (L+r) | 0, U, _ => .tip (U (fun j => Fin.elim0 j)) | r+1, U, X => .node (coinStepEquiv (L+r) X).2 (fun b => boundaryTree L r (fun u => U (Fin.cons b u)) (if b then (coinStepEquiv (L+r) X).1.2 else (coinStepEquiv (L+r) X).1.1)) /-- The actual output butterfly in one central block. -/Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.InputTree, OAI.CubeShuffle.coinStepEquiv
- def
OAI.CubeShuffle.boundaryOutputline 581Source documentation
The actual output butterfly in one central block.
def boundaryOutput (L : ℕ) : (r : ℕ) → (SwitchIndex (L+r) → Bool) → Card r → Equiv.Perm (Card L) | 0, Y, _ => butterflyPerm L (decodeButterfly L Y) | r+1, Y, u => boundaryOutput L r (if u 0 then (coinStepEquiv (L+r) Y).1.2 else (coinStepEquiv (L+r) Y).1.1) (Fin.tail u)Mentions: OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.Card, OAI.CubeShuffle.butterflyPerm, OAI.CubeShuffle.decodeButterfly, OAI.CubeShuffle.coinStepEquiv
- lemma
OAI.CubeShuffle.boundaryOutput_adaptedline 587 - def
OAI.CubeShuffle.modifiedBoundaryline 604Source documentation
In an exceptional block the input map equals its output map, so the central permutation is exactly identity. Elsewhere its inverse is uniform.
noncomputable def modifiedBoundary (L r : ℕ) (E : Finset (Card r)) (U : Card r → Equiv.Perm (Card L)) (Y : SwitchIndex (L+r) → Bool) : Card r → Equiv.Perm (Card L) := fun u => if u ∈ E then boundaryOutput L r Y u else U uMentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.boundaryOutput
- lemma
OAI.CubeShuffle.modifiedBoundary_adaptedline 608 - lemma
OAI.CubeShuffle.permDistance_boundaryTreeline 615 - lemma
OAI.CubeShuffle.boundaryTree_levelCost_perturbline 627 - lemma
OAI.CubeShuffle.boundaryTree_slabCost_perturbline 665 - lemma
OAI.CubeShuffle.modifiedBoundary_distance_leline 675 - lemma
OAI.CubeShuffle.InputTree.slabCost_gtline 685 - lemma
OAI.CubeShuffle.InputTree.random_slab_adapted_mul_leline 692 - lemma
OAI.CubeShuffle.InputTree.slab_mgfline 709 - def
OAI.CubeShuffle.InputTree.familyCostline 719 - lemma
OAI.CubeShuffle.InputTree.random_slabCost_adaptedline 724 - lemma
OAI.CubeShuffle.InputTree.familyCost_adaptedline 733 - theorem
OAI.CubeShuffle.InputTree.family_mgf_firstline 743Source documentation
Only the first slab pays for the exceptional central maps. Later slabs condition on them, using independent outward layers, exactly as FAC.2.
theorem InputTree.family_mgf_first (L n d s : ℕ) (hL : 0 < L) (hs : s ≤ L) (T : (SwitchIndex d → Bool) → InputTree d) (hT : LayerAdapted d s T) {ι : Type*} [Fintype ι] (e : ι ↪ Card d) (q : ℝ) (hq : 1 ≤ q) (hlog : Real.log q ≤ 1/250) (p : ℝ) (hp : 0 ≤ p) (hfirst : finiteMean (fun Y => q^(InputTree.slabCost L d (T Y) e Y)) ≤ Real.exp (p+Fintype.card ι*(68*Real.exp (-(L:ℝ)/64)))) : finiteMean (fun Y => q^(InputTree.familyCost L n d T e Y)) ≤ Real.exp (p+Fintype.card ι*(68*∑ j ∈ Finset.range n, Real.exp (-((L*4^j:ℕ):ℝ)/64))) := by …Mentions: OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.InputTree, OAI.CubeShuffle.LayerAdapted, OAI.CubeShuffle.Card, OAI.CubeShuffle.finiteMean, OAI.CubeShuffle.InputTree.slabCost, OAI.CubeShuffle.InputTree.familyCost
- lemma
OAI.CubeShuffle.InputTree.family_mgf_first_decayline 793 - def
OAI.CubeShuffle.modifiedInputTreeline 811 - lemma
OAI.CubeShuffle.modifiedInputTree_adaptedline 815 - lemma
OAI.CubeShuffle.modified_slab_mgfline 822 - lemma
OAI.CubeShuffle.modified_family_mgfline 848 - theorem
OAI.CubeShuffle.modified_high_mgfline 861Source documentation
The actual exceptional-block high-level moment: the exceptional loss is paid in the first slab of each family only, not at every height.
theorem modified_high_mgf (L n r : ℕ) (hL : 0 < L) (E : Finset (Card r)) (U : Card r → Equiv.Perm (Card L)) (X : SwitchIndex (L+r) → Bool) {ι : Type*} [Fintype ι] (e : ι ↪ Card (L+r)) (q : ℝ) (hq : 1 ≤ q) (hlog : Real.log q ≤ 1/500) : finiteMean (fun Y => q^(InputTree.familyCost L n (L+r) (modifiedInputTree L r E U X) e Y+ InputTree.familyCost (2*L) n (L+r) (modifiedInputTree L r E U X) e Y)) ≤ Real.exp (Fintype.card ι*heightDecay L + 3*((L*E.card*2^L:ℕ):ℝ)*Real.log q) := by …Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.finiteMean, OAI.CubeShuffle.InputTree.familyCost, OAI.CubeShuffle.modifiedInputTree, OAI.CubeShuffle.heightDecay
- def
OAI.CubeShuffle.InputTree.lowCostline 890 - lemma
OAI.CubeShuffle.InputTree.lowCost_slabline 894 - lemma
OAI.CubeShuffle.InputTree.cost_familyline 901 - lemma
OAI.CubeShuffle.InputTree.lowCost_geline 915 - lemma
OAI.CubeShuffle.boundaryTree_levelCost_lowline 924 - lemma
OAI.CubeShuffle.boundaryTree_lowCost_zeroline 933 - theorem
OAI.CubeShuffle.modified_cost_mgfline 943Source documentation
Quantitative FAC.2 cycle moment, with fixed outer input layers and fixed independent uniform central seeds. The latter may now be averaged freely.
theorem modified_cost_mgf (L r : ℕ) (hL : 0 < L) (E : Finset (Card r)) (U : Card r → Equiv.Perm (Card L)) (X : SwitchIndex (L+r) → Bool) {ι : Type*} [Fintype ι] (e : ι ↪ Card (L+r)) (q : ℝ) (hq : 1 ≤ q) (hlog : Real.log q ≤ 1/500) : finiteMean (fun Y => q^(InputTree.lowCost (L+r) (L+r) (modifiedInputTree L r E U X Y) e Y)) ≤ Real.exp (Fintype.card ι*heightDecay L + 3*((L*E.card*2^L:ℕ):ℝ)*Real.log q) := by …Mentions: OAI.CubeShuffle.Card, OAI.CubeShuffle.SwitchIndex, OAI.CubeShuffle.finiteMean, OAI.CubeShuffle.InputTree.lowCost, OAI.CubeShuffle.modifiedInputTree, OAI.CubeShuffle.heightDecay