Documentation

CslibFrontier.Computability.Circuit.Prefix.OptimalDepth.Trees

Interval and generalized prefix distribution trees for segment extraction #

Internal combinatorial tree structures representing binary interval aggregation trees (IntervalTree) and bounded-fanout segment distribution trees (GenPrefixTree) extracted along the principal chain of a zero-deficiency prefix circuit [Ser25a].

Main definitions #

Main results #

References #

Binary aggregation tree partitioning [a, b) into contiguous subintervals.

Every IntervalTree a b spans a nonempty interval a < b.

Depth of a binary interval aggregation tree.

Set of subintervals (p, q) represented by nodes of an IntervalTree.

An interval tree over [a, b) has span b - a ≤ 2 ^ t.depth.

Every interval (p, q) ∈ t.intervals satisfies a ≤ p < q ≤ b.

theorem Cslib.Circuits.Prefix.IntervalTree.unit_mem_intervals {a b : ℕ} (t : IntervalTree a b) (p : ℕ) :
a ≤ p → p < b → (p, p + 1) ∈ t.intervals

Every unit interval (p, p + 1) inside [a, b) belongs to t.intervals.

Erasing the root interval (a, b) of .node L R leaves L.intervals ∪ R.intervals.

theorem Cslib.Circuits.Prefix.IntervalTree.suffixOfLeftPrefix {a b : ℕ} (t : IntervalTree a b) (s : ℕ) :
(a, s) ∈ t.intervals.erase (a, b) → a < s ∧ s < b ∧ ∃ (J : IntervalTree s b), J.depth ≤ t.depth ∧ ∀ (p q : ℕ), (p, q) ∈ t.intervals.erase (a, b) → s ≤ p → (p, q) ∈ J.intervals

Given a proper left prefix (a, s) ∈ t.intervals.erase (a, b), extracts a suffix interval tree on [s, b) of depth at most t.depth covering all intervals starting at ≥ s.

Generalized bounded-fanout prefix distribution tree extracted from a DAG segment.

Root fanout budget r + (1 if hasOut else 0) of a GenPrefixTree.

Every node in the GenPrefixTree uses total fanout budget at most k.

Every node in the GenPrefixTree carries state strictly below b.

Validity of GenPrefixTree transitions against an allowed interval set iv.

Total number of output-bearing nodes in a GenPrefixTree.

Number of output-bearing nodes at state s in a GenPrefixTree.

Number of mul child transitions landing at state m in a GenPrefixTree.

theorem Cslib.Circuits.Prefix.GenPrefixTree.child_depth_lt {st : ℕ} {hasOut : Bool} {r : ℕ} {isMul : Fin r → Bool} {child : Fin r → GenPrefixTree} (i : Fin r) :
(child i).depth + 1 ≤ (node st hasOut r isMul child).depth

Every child subtree has depth strictly smaller than its parent node.

A fanout-2 GenPrefixTree with at most one output per state has outCount ≤ 2 ^ depth.