diff 326f9b6..355ce3f exact_derandomization_l_rl_bpl_v2.txt
diff --git a/exact_derandomization_l_rl_bpl_v2.txt b/exact_derandomization_l_rl_bpl_v2.txt
index 997e116..002ee71 100644
--- a/exact_derandomization_l_rl_bpl_v2.txt
+++ b/exact_derandomization_l_rl_bpl_v2.txt
@@ -50,8 +50,38 @@ Notation conventions used throughout:
* We write p0(x) for the acceptance probability of a fixed machine run
started at configuration x.
+Symbols that recur, gathered here so that no reader has to hunt for them:
+
+ n length of the input.
+ B log2(n+2), rounded up and padded to a power of two. Every
+ space bound in this document is O(B).
+ H, q q = 2^H. Each stage of Part 4 divides every entry by q, and
+ H is chosen once, at the very beginning.
+ f, b, u, a rates on the dyadic grid of Section 2.4, with 0 < f <= 1.
+ They are the sampling probabilities of the channels of Part 3.
+ pi_f the probability that one channel at rate f retains a given
+ identifier. It is Theta(f), with constants in (3.1).
+ M the statistical budget of a task. Bigger budget, smaller error.
+ d the slack M - m, i.e. how much budget a child gives up.
+ p the precision exponent of a task, defined in (7.2). The error
+ target of the task is 2^{-p}.
+ K_prec fixed integer: one unit of budget buys a factor 2^{-1/K_prec}.
+ h_* block height of the fingerprint scheme, about epsilon log2 B.
+ s the error power, always 8, so that L_8 norms are used.
+ u_0 the n_j-th largest size in the compression of Part 8.
+ n_j capacity of the exception list at group j; n_j >= K always.
+ C_mass row mass bound a*sum_y d_y <= C_mass, equation (5.2),
+ restated as (8.1).
+ L_1 a fixed level above every sensitivity threshold, used only in
+ the proof of Lemma 8.3 as a sentinel height.
+ C_b the fixed coefficient in every error bound; it may depend on
+ the construction constants but never on the input or on B.
+
================================================================================
PART 1. WHAT IS PROVED, AND HOW
+
+IN ONE SENTENCE. What is proved, in which machine model, and how the thirteen parts fit together.
+
================================================================================
1.1 The three classes.
@@ -134,6 +164,9 @@ the controller space accounting -- is developed here with complete proofs.
================================================================================
PART 2. THE MODEL: FROM MACHINES TO MATRICES
+
+IN ONE SENTENCE. A randomized machine with a time bound is turned into a finite matrix, so its acceptance probability becomes one entry of an inverse.
+
================================================================================
2.1 Conventions for machines.
@@ -254,6 +287,9 @@ probabilistic constants proved in Part 3.
================================================================================
PART 3. THE RANDOM ENVIRONMENT
+
+IN ONE SENTENCE. A small random environment is built whose retention tests pick out identifiers one at a time, with probabilities of a known size.
+
================================================================================
The matrices we must estimate are expectations of functions of a small random
@@ -528,6 +564,9 @@ projection never changes the suffix of the target it produces.
================================================================================
PART 4. THE EXACT HIERARCHY
+
+IN ONE SENTENCE. The matrix is replaced stage by stage, each stage cutting every entry by a factor q and moving the removed mass into a reward that is easy to read off.
+
================================================================================
This part constructs, for each stage, a new strictly-forward substochastic
@@ -663,7 +702,7 @@ Hence each row set A_x = { y : E_*(x,y) > 0 } satisfies
Entry bound. Unroll E_* <= C + E_* C along the support of the row. Every
term for E_*(x,y) is a product of entries of C along an increasing sequence
x < z_1 < ... < z_j < y with all z's in A_x; the source coordinate stays x
-because the recursion is E_*(x,z) * C(z,·). Strict ordering means a choice of
+because the recursion is E_*(x,z) * C(z,.). Strict ordering means a choice of
intermediate vertices determines at most one sequence. There are at most
binom(m_x, j) sequences with m_x = |A_x|, and each product is at most
f^{j+1}. Therefore
@@ -672,7 +711,7 @@ f^{j+1}. Therefore
<= f e^{f m_x} <= f e^{1/theta_1}. (4.5)
Difference recursion. Now put Delta_i = E_* - E_i, which is nonnegative with
-row support in A_x. Since Q is L_Q-Lipschitz and E_i, E_* <= C + (·)C termwise,
+row support in A_x. Since Q is L_Q-Lipschitz and E_i, E_* <= C + (.)C termwise,
Delta_i(x,y) <= L_Q sum_{z<y} Delta_{i-1}(x,z) C(z,y). (4.6)
@@ -763,7 +802,7 @@ F -> f Q((C + F C)/f) g is monotone and starts from zero, so E_i is
nondecreasing in i. The remaining bounds follow from these.
Strict forwardness: a product of strictly forward matrices is strictly
-forward, and C + (·)C preserves the property by induction from E_0 = 0. A zero
+forward, and C + (.)C preserves the property by induction from E_0 = 0. A zero
row of C stays a zero row in all these expressions, and a zero column of C
stays a zero column in every product FC, so the supports are as claimed. QED
@@ -1099,6 +1138,9 @@ resulting error.
================================================================================
PART 5. ATOMS: WRITING A TABLE ENTRY AS AN EXPECTATION
+
+IN ONE SENTENCE. Every entry of every table is written exactly as the average of an explicit nonnegative function of the environment, with few nonzero positions per row.
+
================================================================================
Every quantity we must compute is eventually an entry of a matrix like D, W,
@@ -1339,6 +1381,9 @@ measured against D, never against an individual term that might be larger.
================================================================================
PART 6. AVERAGING: HOW A SHORT WALK REPLACES AN EXPECTATION
+
+IN ONE SENTENCE. A short random walk inside the environment mixes quickly, by property (T), so the walk value is close to the average with an error independent of the field size.
+
================================================================================
6.1 The operator and what it does.
@@ -1403,6 +1448,9 @@ the norm of the difference, which is much smaller than either term.
================================================================================
PART 7. ESTIMATION: THE ADDITIVE SCHEDULE
+
+IN ONE SENTENCE. A budget schedule splits each task into dyadic groups; the averaging error and the sampling noise are shown to add up to 2^{-p} with no loss under nesting.
+
================================================================================
7.1 Budgets and the precision exponent.
@@ -1753,6 +1801,9 @@ constants.
================================================================================
PART 8. COMPRESSION: A WHOLE ARRAY AS A SHORT LIST
+
+IN ONE SENTENCE. Each array is stored as a short list of exceptions to one common default, and the compression is proved not to change the row functions that are read.
+
================================================================================
After each dyadic group the estimation produces a raw array on all retained
@@ -1932,22 +1983,70 @@ from the stationary reference of Lemma 8.2 is at most
The constant does not depend on the largest true first entry.
Proof.
-Write E for the sum in (8.12) without the leading constant. If E exceeds a
-small fixed constant, the bounded output range trivially suffices. Otherwise
-all clipped errors involved are strictly below 1, so
-
- |S_i^1(y) - d_y| <= (1 + d_y) e_i(y) , |S_i^2(y) - v_y| <= e_i(y) ,
-
-and later increments have first magnitude at most (1+d_y)(e_i + e_{i-1}) and
-second magnitude at most e_i + e_{i-1}. The input difference at group j is
-exactly S_j - (d,v), and both calculations include the same preceding preloss.
-The factors (1+d_y) would break a uniform absolute error bound for large d_y;
-the two cases below remove that dependence using the row gate and the
-saturation. Either the row has at least K entries above a high level, in which
-case the gate is closed in both calculations and the outputs vanish; or the
-true first entry is comparable to the computed one, in which case the relative
-error bounds apply. Both cases give at most the right side of (8.12) after
-summing the propagated increments with the factors of (8.7). QED
+Let C be a fixed constant larger than the coefficient in (8.12), let K_0 be the
+fixed rank bound K of Section 8.1 taken over the whole family HH, and assume the
+fixed constants are chosen so that K_0 >= 6 C_mass. Let L_1 be a fixed level above
+every sensitivity threshold of HH and above 1. The whole difficulty is the factor
+(1 + d_y); three observations remove it, and none of them depends on how large
+d_y may be.
+
+Observe first that the default cannot drift upward. For the rows of this section
+the mass bound gives, for every t > 0, that fewer than C_mass / t retained
+positions have size m_y > t. Hence the n_j-th largest size satisfies
+n_j u_0 <= C_mass, so u_0 <= C_mass / n_j <= C_mass / K_0 <= 1/6. Since the
+default z' = max(z, 3u_0) is nondecreasing and 3u_0 <= 1/2, every default arising
+here is at most 1/2.
+
+Observe second that a large coordinate is never discarded. If d_y >= 1 then
+m_y >= d_y/(1+d_y) >= 1/2 >= 3u_0, so by Lemma 8.1(ii) the update is the identity
+at that coordinate: its compressed value equals its input, in the actual and in
+the reference calculation alike, at every group.
+
+Observe third that few coordinates can be both large and numerous. Suppose at
+least K_0 retained positions have d_y > L_1. Then the K_0-th largest first-channel
+size exceeds every close threshold of HH in both calculations, so every gate of HH
+is closed on that row, every relevant row output vanishes, and (8.12) holds.
+Assume therefore that fewer than K_0 positions satisfy d_y > L_1.
+
+Now replace the first input at those positions by one common sentinel larger than
+L_1 in both calculations, and give that coordinate zero later first-channel
+increments; leave second channels unmodified. By the second observation each of
+these coordinates equals its input at every group in both versions, so the
+reference ranks and thresholds, all of which are taken at levels at most L_1,
+are unchanged and every such coordinate lies in an upper saturation region. The
+sentinels are comparison devices in this proof only; no algorithm has to identify
+or store them.
+
+After the replacement each first-coordinate input error and each later
+first-coordinate increment obeys, uniformly in d_y,
+
+ |input error| <= C(1+L_1) e_i , |increment| <= C(1+L_1)(e_i + e_{i-1}) ,
+ |second error| <= e_i , |second increment| <= e_i + e_{i-1} .
+
+Write w^{(i)} and z^{(i)} for the two compressed arrays after group i. By
+Lemma 8.1 the compression map is 28-Lipschitz in sup norm, so
+
+ |w^{(i+1)} - z^{(i+1)}|_inf <= 28 ( |w^{(i)} - z^{(i)}|_inf
+ + C(1+L_1)(e_{i+1} + e_i) ) .
+
+Iterating from group j to the last group m_*, with C_1 = 2*28 absorbing 28^n and
+the factor 2 from the two-term increment, gives
+
+ |w^{(m_*)} - z^{(m_*)}|_inf <= C C_1(1+L_1) sum_{i>=j} C_1^{m_* - i} e_i .
+
+Row functions of HH are bounded and root-Lipschitz on the clipped ranges by
+Lemma 8.1, so their root outputs differ by at most a constant times this sup
+error. This is (8.12), with the fixed factor (1+L_1) absorbed into C.
+
+It remains to remove the sentinels. Restoring a sentinel to its true value changes
+one coordinate whose value exceeds L_1 in both versions, hence lies above every
+sensitivity threshold and above every level at which a gate of HH can be nonzero.
+Such a coordinate is in the identity region of the compression in both versions by
+the second observation. So a K_0-th first rank or an n_i-th size rank, taken over
+values that are at most L_1 elsewhere, is the same in the two versions, defaults
+agree, thresholds agree, and all other coordinates agree already. The relevant
+output behavior is therefore the same in the sentinel and the original
+calculations, which transfers (8.12) to the original pair. QED
8.4 The integrated compression bound.
@@ -2061,6 +2160,9 @@ is 1-Lipschitz, which gives the comparison statement. QED
================================================================================
PART 9. FINGERPRINTS: COMPARING ENDPOINTS WITHOUT STORING ADDRESSES
+
+IN ONE SENTENCE. Two endpoints are compared through short keys instead of stored addresses, and the damage caused by key collisions is bounded.
+
================================================================================
The compression of Part 8 merges increments that sit at the same endpoint. To
@@ -2373,6 +2475,9 @@ power gives (9.12). QED
================================================================================
PART 10. ARITHMETIC: ONE DIGIT OF ONE NUMBER, IN BOUNDED SPACE
+
+IN ONE SENTENCE. Every number is computed one digit at a time from integer approximations, and the live records are shown to shrink as the requested digit place drops.
+
================================================================================
The estimates of Parts 7 to 9 produce, for each required entry and each
@@ -2421,6 +2526,36 @@ fixed constants. An operand place may exceed the output clock by an amount
proportional to d; the structural term pays for that overshoot. Theorem 10.9
verifies (10.4) for every recipe used in the construction.
+LEMMA 10.1a (exact streams from approximation residues).
+Suppose |z| <= 1 and, for each t >= 0, a deterministic integer N_t(z) satisfies
+
+ | N_t(z) - 2^t z | < 2 . (10.3a)
+
+Set z_0 = N_0(z) and z_t = N_t(z) - 2 N_{t-1}(z) for t >= 1. Then z_t lies in
+the alphabet A of (10.1), the digits z_t satisfy (10.2) exactly, and for any fixed
+integer q >= 4 each output digit is determined by the residues of N_t and N_{t-1}
+modulo 2^q.
+
+Proof.
+Writing e_t = N_t - 2^t z gives z_t = e_t - 2 e_{t-1} for t > 0, hence
+|z_t| < 6; the weaker bound |z_t| <= 6 is what (10.1) records. At place zero,
+|N_0| < 3, so |N_0| <= 2. The partial sum through place T is
+sum_{t=0}^{T} z_t 2^{-t} = 2^{-T} N_T, because the intermediate terms cancel in
+pairs; that sum tends to z by (10.3a), which is (10.2). Finally, reduction
+modulo 2^q is injective on the possible signed digits because 2^q > 12, so the
+signed difference z_t is recovered from the two residues without forming the full
+integers: compute (N_t mod 2^q) - 2 (N_{t-1} mod 2^q) modulo 2^q and decode with
+the fixed finite table that sends each occurring residue to its unique
+representative in A. At t = 0 decode the residue of N_0 the same way. QED
+
+So a digit procedure only has to produce, for each place t, an integer within 2 of
+2^t times its exact value; the stream and the exact real number are then defined by
+Lemma 10.1a and never by N_t itself. Different places may use different
+truncations or different circuits, and only determinism plus (10.3a) is required,
+because the consistency between successive approximations is supplied by the
+difference formula. Every primitive below is therefore proved by producing such
+integers, not by producing digits directly.
+
10.2 Evaluating a Boolean circuit gate by gate.
The first and simplest recipe is: evaluate a Boolean circuit of bounded fan-in,
@@ -2452,7 +2587,7 @@ values is stored. QED
LEMMA 10.2 (finite comparisons and bounded elementary operations).
The normalized operations of taking a pair average, a maximum or a minimum, and
-a fixed binary shift admit deterministic integers satisfying (10.3). Their
+a fixed binary shift admit deterministic integers satisfying (10.3a). Their
residue procedures, for any fixed q, have the following properties. There are
constants C_0, C_1 such that an operand place j obeys
@@ -2530,7 +2665,7 @@ in bands, and stop early using the redundancy of the digits.
LEMMA 10.4 (multiplication).
There is a fixed constant C such that multiplication of two admissible operand
streams by banded schoolbook accumulation, with the low bands evaluated first,
-produces digits satisfying (10.3) with suspended-bound constants C_0, C_1 fixed,
+produces integers satisfying (10.3a) with suspended-bound constants C_0, C_1 fixed,
and a full path cost through the bands up to D that satisfies
C (D+1) <= C (1 + (4/3) h_o) + (4C/3)(t - j) . (10.8)
@@ -2666,7 +2801,7 @@ corresponding order statistics differ by at most eta: at least the specified
number of perturbed entries are no larger than the original order statistic plus
eta, and interchanging the lists gives the reverse inequality. Here
eta = 6 * 2^{-K}, so the selected truncation followed by the final floor
-satisfies (10.3) for sufficiently large fixed h. Descriptor ties affect neither
+satisfies (10.3a) for sufficiently large fixed h. Descriptor ties affect neither
this estimate nor the uniqueness of the finite selection.
Cost. Each count has O(d) bits. Carry-save counting, the comparison to the
@@ -2727,7 +2862,7 @@ j = O(d), and increasing a in (10.4) pays also for the term -b j. QED
THEOREM 10.9 (the numerical interface).
Fix the syntactic hypotheses below. Then every numerical recipe used by the
-construction has a deterministic digit procedure satisfying (10.3) and the space
+construction has a deterministic digit procedure satisfying (10.3a) and the space
certificate (10.4), and the recipes compose: a finite composition of admissible
recipes is admissible.
@@ -2762,6 +2897,9 @@ and uses the separate construction of Section 11.8. QED
================================================================================
PART 11. THE CONTROLLER: FITTING ALL LIVE DATA INTO LOG SPACE
+
+IN ONE SENTENCE. All the recipes run with one cursor, one scratch area and one catalyst, so the whole computation fits in O(B) bits.
+
================================================================================
Parts 7 to 10 produce, for every table and vector entry, a finite recipe: which
@@ -3084,6 +3222,9 @@ allowance, and the allowances decrease. Hence (4). QED
================================================================================
PART 12. CONCLUSION: FROM AN ESTIMATOR TO A DECISION
+
+IN ONE SENTENCE. A median over finitely many explicit environments removes the randomness, which yields a log-space decision and hence L = RL = BPL.
+
================================================================================
Everything is now in place. The estimator computes, for each of finitely many
@@ -3362,6 +3503,9 @@ For the reader who wants the shape of the proof in one paragraph:
================================================================================
PART 13. AN EFFECTIVE COMPILER: FROM A PROGRAM TO EXPLICIT BOUNDS
+
+IN ONE SENTENCE. One fixed interpreter plus explicit padding turns the construction into a compiler that also reports integer space and time bounds.
+
================================================================================
Part 12 gives, for each fixed randomized machine and each fixed accuracy exponent,