Uhlig's two-copy recovery code #
This file formalizes the exact combinatorial core of the section "The two-copy construction as disjoint recovery" in the Boolean mass-production manuscript.
For a nonempty family f_0, ..., f_last, the resource family is
g_0 = f_0,g_j = f_(j - 1) + f_jat an interior boundary, andg_(last + 1) = f_last.
Addition is kept abstract. The recovery proof assumes explicitly that every element is self-inverse, rather than introducing a typeclass instance. For Boolean-valued functions, Mathlib's existing Boolean-ring addition is XOR.
Each target has a prefix and a suffix recovery set. The file proves both recovery identities, proves the relevant sets disjoint for ordered requests, and packages the comparator choice for requests arriving in either order.
The last + 2 resource values associated with last + 1 source values.
The parameter is the final source index, so the family is nonempty without a
separate positivity assumption.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The prefix representation of one source coordinate.
Equations
- Algebraic.MassProduction.uhligPrefixSet target = Finset.Iic target.castSucc
Instances For
The suffix representation of one source coordinate.
Equations
- Algebraic.MassProduction.uhligSuffixSet target = Finset.Ioi target.castSucc
Instances For
A prefix through left is disjoint from a suffix strictly after right
whenever left <= right. This is the scheduling invariant in Uhlig's
two-copy construction.
Prefix recovery telescopes to the requested value in any commutative additive monoid in which every element is self-inverse.
The XOR-like sum of all resources is zero.
Suffix recovery also telescopes to the requested value.
Recovery sets chosen for two requests in their arrival order. The lower request uses a prefix and the higher request uses a suffix; in the opposite arrival order the two branches are swapped.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The recovery sets selected for any two requests are disjoint.
Both sets selected by uhligRecoveryPair recover their corresponding
requests, in the original arrival order.
Uhlig's complete two-request invariant: the selected representations are resource-disjoint and recover both requested values.
Function-valued Boolean specialization. Here resource addition is pointwise XOR, exactly as in the manuscript.