OAI/Probability/TraceReconstruction/Shapes.lean
92 declarations, 0 contain sorry, 0 declared as axioms
Shapes
Global schedules, edge labels, forced/extra coordinate splitting, finite shape codes, and occupied-label counts.
- def
OAI.TraceReconstruction.centralThirdline 24Source documentation
Source central third, in the zero-based child label convention. The shift of the source one-based indices is recorded in center parameters.
def centralThird (N : ℕ) : Finset (Fin N) := …
- def
OAI.TraceReconstruction.globalTrialIndexline 29Source documentation
One actual global-pair orientation, ordered by its pre-region block and its local identifier there.
def globalTrialIndex (N t : ℕ) (v : Fin (N/4)) (a : Fin t) : Fin ((N/4)*t) := …
- def
OAI.TraceReconstruction.scheduledGlobalShiftline 35Source documentation
Literal net global displacement immediately before a child window: a pre block at v+1 remains active through its matched post region N-v. The paired displacement has even t trials in each affected region.
def scheduledGlobalShift (N t : ℕ) (bits : Fin ((N/4)*t) → Bool) (u : Fin N) : ℤ := …
- theorem
OAI.TraceReconstruction.centralThird_activeline 39 - theorem
OAI.TraceReconstruction.globalTrialIndex_bijectiveline 47 - theorem
OAI.TraceReconstruction.globalTrial_sumline 73 - theorem
OAI.TraceReconstruction.scheduledGlobalShift_plateauline 79 - def
OAI.TraceReconstruction.sourceGlobalTrialsline 100Source documentation
The actual complete-tree global schedule has the exact plateau identity needed by the already proved correlated anchor energy theorem.
def sourceGlobalTrials (T t : ℕ → ℕ) (b : ℕ) : ℕ := (T b/4)*t b
- def
OAI.TraceReconstruction.sourceGlobalShiftline 102 - theorem
OAI.TraceReconstruction.sourceGlobalShift_hasPlateauline 106 - def
OAI.TraceReconstruction.OccupiedParityTree.Edgeline 120Source documentation
One actual child-label coordinate of an arbitrary ordered occupied shape. Unlike a complete r-ary padding, this contains no unused edges.
def Edge : {b : ℕ} → OccupiedParityTree b → Type | _, .leaf => PEmpty | _, .node n children _ => Fin n ⊕ ((i : Fin n) × Edge (children i)) - instance
OAI.TraceReconstruction.OccupiedParityTree.edgeFintypeline 124 - def
OAI.TraceReconstruction.OccupiedParityTree.Edge.heightline 130 - def
OAI.TraceReconstruction.OccupiedParityTree.Labelsline 138Source documentation
All literal label assignments to this particular ordered shape.
def Labels (T : ℕ → ℕ) {b : ℕ} (t : OccupiedParityTree b) := … - instance
OAI.TraceReconstruction.OccupiedParityTree.labelsFintypeline 141 - def
OAI.TraceReconstruction.OccupiedParityTree.Labels.childline 144 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.labelsline 150Source documentation
Projection to the actual labels of a fixed forced subtree. The shape selection is independent of these labels and of all random orientations.
def Forced.labels (T : ℕ → ℕ) : {b : ℕ} → {t : OccupiedParityTree b} → t.Forced → t.Labels T → BinaryWindowLabels T b | _, _, .leaf, _ => PUnit.unit | _, _, .node a c _ _ _ left right, x => (x (Sum.inl a),x (Sum.inl c),left.labels T (x.child T a),right.labels T (x.child T c)) /-- Edge addresses in a complete binary tree, independent of all actual numeric labels. False and true are its two children. -/Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.BinaryWindowLabels, OAI.TraceReconstruction.OccupiedParityTree.Edge
- def
OAI.TraceReconstruction.OccupiedParityTree.BinaryEdgeline 158Source documentation
Edge addresses in a complete binary tree, independent of all actual numeric labels. False and true are its two children.
def BinaryEdge : ℕ → Type | 0 => PEmpty | b+1 => Bool ⊕ (Bool × BinaryEdge b)
- instance
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeFintypeline 162 - def
OAI.TraceReconstruction.OccupiedParityTree.BinaryEdge.heightline 168 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.edgeline 174Source documentation
The forced binary tree is embedded in the actual occupied edge set.
def Forced.edge : {b : ℕ} → {t : OccupiedParityTree b} → t.Forced → BinaryEdge b → t.Edge | _, _, .leaf, e => e.elim | _, _, .node a _ _ _ _ _ _, Sum.inl false => Sum.inl a | _, _, .node _ c _ _ _ _ _, Sum.inl true => Sum.inl c | _, _, .node a _ _ _ _ left _, Sum.inr (false,e) => Sum.inr ⟨a,left.edge e⟩ | _, _, .node _ c _ _ _ _ right, Sum.inr (true,e) => Sum.inr ⟨c,right.edge e⟩Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.OccupiedParityTree.BinaryEdge
- theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.edge_injectiveline 181 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.edge_heightline 215 - def
OAI.TraceReconstruction.OccupiedParityTree.edgeCountline 225Source documentation
The finite number of edge coordinates at a given child height.
def edgeCount {b : ℕ} (t : OccupiedParityTree b) (h : ℕ) : ℕ := … - theorem
OAI.TraceReconstruction.OccupiedParityTree.edgeCount_leafline 228 - theorem
OAI.TraceReconstruction.OccupiedParityTree.edgeCount_nodeline 232 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Edge.height_ltline 243 - theorem
OAI.TraceReconstruction.OccupiedParityTree.edgeCount_outsideline 251 - theorem
OAI.TraceReconstruction.OccupiedParityTree.edgeCount_levelline 259 - def
OAI.TraceReconstruction.OccupiedParityTree.BinaryEdgeLabelsline 276 - instance
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeLabelsFintypeline 278 - def
OAI.TraceReconstruction.OccupiedParityTree.binaryLabelsEquivline 282Source documentation
Exact coordinates of the recursively defined forced label tuple.
def binaryLabelsEquiv (T : ℕ → ℕ) : (b : ℕ) → BinaryEdgeLabels T b ≃ BinaryWindowLabels T b | 0 => { toFun := fun _ => PUnit.unit …Mentions: OAI.TraceReconstruction.OccupiedParityTree.BinaryEdgeLabels, OAI.TraceReconstruction.BinaryWindowLabels
- def
OAI.TraceReconstruction.OccupiedParityTree.Forced.restrictline 311Source documentation
Restriction to the real forced coordinates, with only equality transport of the child-height index.
def Forced.restrict (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) (x : t.Labels T) : BinaryEdgeLabels T b := fun e => …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.OccupiedParityTree.BinaryEdgeLabels
- theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.restrict_labelsline 315 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.ExtraEdgeline 332 - instance
OAI.TraceReconstruction.OccupiedParityTree.forcedExtraEdgeFintypeline 335 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.ExtraLabelsline 338 - instance
OAI.TraceReconstruction.OccupiedParityTree.forcedExtraLabelsFintypeline 341 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.labelsEquivline 347Source documentation
Exact bijective partition of all actual edge coordinates into the forced binary coordinates and the genuine extra coordinates.
noncomputable def Forced.labelsEquiv (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) : t.Labels T ≃ BinaryWindowLabels T b × F.ExtraLabels T := by …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.BinaryWindowLabels
- theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.labelsEquiv_fstline 359 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.labelsEquiv_sndline 363 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.sum_labelsline 367Source documentation
Literal finite Fubini over forced labels and all remaining labels.
theorem Forced.sum_labels (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) (f : BinaryWindowLabels T b → F.ExtraLabels T → ℝ) : (∑x : t.Labels T,f (F.labels T x) (fun e => x e.val)) = ∑p : BinaryWindowLabels T b, ∑z : F.ExtraLabels T,f p z := by …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.BinaryWindowLabels
- def
OAI.TraceReconstruction.OccupiedParityTree.Forced.ExtraLeafEdgeline 374 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.ExtraInteriorEdgeline 377 - instance
OAI.TraceReconstruction.OccupiedParityTree.extraLeafEdgeFintypeline 380 - instance
OAI.TraceReconstruction.OccupiedParityTree.extraInteriorEdgeFintypeline 383 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.InteriorLabelsline 386 - instance
OAI.TraceReconstruction.OccupiedParityTree.extraInteriorLabelsFintypeline 389 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.extraLabelsEquivline 395Source documentation
Extra bottom labels are separated from all nonleaf labels without introducing any T₁ factor.
noncomputable def Forced.extraLabelsEquiv (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) : F.ExtraLabels T ≃ (F.ExtraLeafEdge → Fin (T 0)) × F.InteriorLabels T := … - def
OAI.TraceReconstruction.OccupiedParityTree.Edge.parentPathline 410Source documentation
The parent address of an edge in the full deterministic numerical index tree. In particular it does not contain the edge's own child label.
def Edge.parentPath (T : ℕ → ℕ) : {b : ℕ} → {t : OccupiedParityTree b} → t.Labels T → t.Edge → List ℕ | _, .leaf, _, e => e.elim | _, .node _n _children _roles, x, e => match e with | Sum.inl _ => [] | Sum.inr z => (x (Sum.inl z.1)).val :: Edge.parentPath T (x.child T z.1) z.2 /-- Every ancestor label of an extra selected leaf is an interior label. -/ - theorem
OAI.TraceReconstruction.OccupiedParityTree.Edge.parentPath_congrline 418Source documentation
Every ancestor label of an extra selected leaf is an interior label.
theorem Edge.parentPath_congr (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (x y : t.Labels T) (h : ∀e : t.Edge, e.height≠0 → (x e).val=(y e).val) (e : t.Edge) : e.parentPath T x=e.parentPath T y := by … - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.labels_value_eqline 434 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.fullLabelsEquivline 442Source documentation
The combined exact split into forced, extra-leaf and extra-interior labels.
noncomputable def Forced.fullLabelsEquiv (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) : t.Labels T ≃ BinaryWindowLabels T b × (F.ExtraLeafEdge → Fin (T 0)) × F.InteriorLabels T := …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.BinaryWindowLabels
- theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.fullLabelsEquiv_fstline 447 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.fullLabelsEquiv_leaf_valueline 451 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.fullLabelsEquiv_interior_valueline 455 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.parentPath_extraLeaf_invariantline 461Source documentation
Changing only extra leaf labels changes no ancestor address, even when all the complete-tree mechanisms share their source global bits.
theorem Forced.parentPath_extraLeaf_invariant (T : ℕ → ℕ) {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) (p : BinaryWindowLabels T b) (h k : F.ExtraLeafEdge → Fin (T 0)) (z : F.InteriorLabels T) (e : t.Edge) : e.parentPath T ((F.fullLabelsEquiv T).symm (p,h,z)) = e.parentPath T ((F.fullLabelsEquiv T).symm (p,k,z)) := by …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.BinaryWindowLabels
- def
OAI.TraceReconstruction.OccupiedParityTree.FiniteRoleShapeline 493Source documentation
A finite ordered-role shape code with at most r children at every vertex. There are no numerical child labels in this type.
def FiniteRoleShape (r : ℕ) : ℕ → Type | 0 => PUnit | b+1 => (n : Fin (r+1)) × (Fin n.val → FiniteRoleShape r b) × (Fin n.val → Fin 3)
- instance
OAI.TraceReconstruction.OccupiedParityTree.finiteRoleShapeFintypeline 497 - def
OAI.TraceReconstruction.OccupiedParityTree.FiniteRoleShape.toTreeline 504 - theorem
OAI.TraceReconstruction.OccupiedParityTree.occupied_arity_le_leavesline 508 - theorem
OAI.TraceReconstruction.OccupiedParityTree.child_le_leavesline 515 - theorem
OAI.TraceReconstruction.OccupiedParityTree.exists_finiteRoleShapeline 522Source documentation
Every occupied shape with r selected leaves really has a finite code whose domain depends only on r and the depth, not on any window size.
theorem exists_finiteRoleShape {b : ℕ} (t : OccupiedParityTree b) (r : ℕ) (ht : t.occupied) (hr : t.leafCount≤r) : ∃x : FiniteRoleShape r b,x.toTree r b=t := by …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.OccupiedParityTree.FiniteRoleShape
- def
OAI.TraceReconstruction.OccupiedParityTree.shapeRoleConstantline 539Source documentation
The manuscript's finite shape/role constant, now a literal natural number independent of the actual child-label sizes and all channel data.
def shapeRoleConstant (r b : ℕ) : ℕ := Fintype.card (FiniteRoleShape r b)
Mentions: OAI.TraceReconstruction.OccupiedParityTree.FiniteRoleShape
- theorem
OAI.TraceReconstruction.OccupiedParityTree.finite_bounded_occupied_shapesline 541 - def
OAI.TraceReconstruction.indexedExtraAverageline 561Source documentation
Extra-leaf index set version of the whole-bit-law sum.
def indexedExtraAverage {Ω E : Type*} [Fintype Ω] [Fintype E] (P : FiniteLaw Ω) (s N : ℕ) (f : Ω → ℝ) (X : Ω → E → ℤ) (h : E → Fin N) : ℝ := …Mentions: OAI.TraceReconstruction.FiniteLaw
- theorem
OAI.TraceReconstruction.indexedExtraAverage_nonnegline 565 - theorem
OAI.TraceReconstruction.indexedExtraAverage_sumline 573 - theorem
OAI.TraceReconstruction.indexedExtraAverage_energyline 597 - def
OAI.TraceReconstruction.OccupiedParityTree.Labels.nodeline 618Source documentation
Node-wise assembly of genuine edge labels.
def OccupiedParityTree.Labels.node (T : ℕ → ℕ) {b k : ℕ} {children : Fin k → OccupiedParityTree b} {roles : Fin k → Fin 3} (h : Fin k → Fin (T b)) (z : (i : Fin k) → (children i).Labels T) : (OccupiedParityTree.node k children roles).Labels T := …Mentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.OccupiedParityTree.Labels
- def
OAI.TraceReconstruction.occupiedTermLabelsline 627Source documentation
The real numeric labels of the selected occupied configuration.
def occupiedTermLabels (T : ℕ → ℕ) : (b : ℕ) → (S : Finset (WindowLeaf T (b+1))) → (a : OccupiedWindowChoice T b S) → (occupiedWindowTerm T b S a).Labels T | 0, S, _ => Labels.node T (fun i => (S.equivFin.symm i).val.1) (fun _ e => e.elim) | b+1, S, a => Labels.node T (fun i => ((selectedChildren S).equivFin.symm i).val) (fun i => occupiedTermLabels T b (selectedChildLeaves S ((selectedChildren S).equivFin.symm i).val) (a.1 i))Mentions: OAI.TraceReconstruction.WindowLeaf, OAI.TraceReconstruction.OccupiedWindowChoice, OAI.TraceReconstruction.occupiedWindowTerm, OAI.TraceReconstruction.selectedChildren, OAI.TraceReconstruction.selectedChildLeaves
- theorem
OAI.TraceReconstruction.occupiedTermLabels_forcedline 635 - def
OAI.TraceReconstruction.OccupiedParityTree.labelledLeavesline 667Source documentation
Reading the set of leaf addresses from a shape and numeric edge labels. Repeated or unordered coordinates are allowed; the true encoding is a particular subset of this unrestricted label domain.
def labelledLeaves (T : ℕ → ℕ) : {b : ℕ} → (t : OccupiedParityTree b) → t.Labels T → Finset (WindowLeaf T b) | 0, .leaf, _ => {(⟨0,by decide⟩ : Fin 1)} | b+1, .node n children roles, x => Finset.univ.biUnion fun i : Fin n => ((children i).labelledLeaves T (x.child T i)).image (fun v => (x (Sum.inl i),v)) end OccupiedParityTreeMentions: OAI.TraceReconstruction.OccupiedParityTree, OAI.TraceReconstruction.WindowLeaf
- theorem
OAI.TraceReconstruction.mem_selectedChildLeavesline 674 - theorem
OAI.TraceReconstruction.occupiedTermLabels_leavesline 684 - theorem
OAI.TraceReconstruction.occupiedWindowTerm_injectiveline 744Source documentation
The shape remembers all the role choices once the actual selected set is fixed.
theorem occupiedWindowTerm_injective (T : ℕ → ℕ) (b : ℕ) (S : Finset (WindowLeaf T (b+1))) : Function.Injective (occupiedWindowTerm T b S) := by …Mentions: OAI.TraceReconstruction.WindowLeaf, OAI.TraceReconstruction.occupiedWindowTerm
- def
OAI.TraceReconstruction.occupiedTermEncodingline 759Source documentation
Unrestricted shape/label space really covers the coefficient index without multiplicity.
def occupiedTermEncoding (T : ℕ → ℕ) (b : ℕ) (w : (S : Finset (WindowLeaf T (b+1))) × OccupiedWindowChoice T b S) : (t : OccupiedParityTree (b+1)) × t.Labels T := …Mentions: OAI.TraceReconstruction.WindowLeaf, OAI.TraceReconstruction.OccupiedWindowChoice, OAI.TraceReconstruction.OccupiedParityTree
- theorem
OAI.TraceReconstruction.occupiedTermEncoding_injectiveline 764 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.edgeEquivline 791 - def
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeCountline 798 - theorem
OAI.TraceReconstruction.OccupiedParityTree.BinaryEdge.height_ltline 800 - theorem
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeCount_outsideline 808 - theorem
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeCount_succline 815 - theorem
OAI.TraceReconstruction.OccupiedParityTree.binaryEdgeCount_eqline 823 - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.extraCountline 836 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.count_partitionline 839 - theorem
OAI.TraceReconstruction.OccupiedParityTree.levelCount_bottomline 851 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.card_extraLeafEdgeline 858Source documentation
The extra bottom coordinates are precisely r-2^b, including the empty height-zero case.
theorem Forced.card_extraLeafEdge {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) : Fintype.card F.ExtraLeafEdge=t.leafCount-2^b := by … - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.extraCount_leline 877Source documentation
Exact source nonforced vertex bound, now for genuine extra edge-label coordinates rather than an abstract level-count surrogate.
theorem Forced.extraCount_le {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) (ht : t.occupied) (h : ℕ) : F.extraCount h≤t.leafCount-2^b := by … - def
OAI.TraceReconstruction.OccupiedParityTree.Forced.interiorHeightline 889Source documentation
Extra nonleaf numeric labels grouped by their actual child height.
def Forced.interiorHeight {b : ℕ} {t : OccupiedParityTree b} (F : t.Forced) (e : F.ExtraInteriorEdge) : Fin b := ⟨e.val.val.height,e.val.val.height_lt⟩ - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.interiorFiber_leline 892 - theorem
OAI.TraceReconstruction.OccupiedParityTree.Forced.card_interiorLabels_leline 905