diff 3304467..6cb3152 gaussian_regression_replicas_v2.txt
diff --git a/gaussian_regression_replicas_v2.txt b/gaussian_regression_replicas_v2.txt
index 2fea656..05edd07 100644
--- a/gaussian_regression_replicas_v2.txt
+++ b/gaussian_regression_replicas_v2.txt
@@ -94,7 +94,7 @@ Five remarks are used repeatedly.
       deterministic one.
 
   (5) A learner that stops early may idle: keep drawing fresh rows and
-      ignore them.  So "stops by T" and "runs for exactly T steps" are
+      ignore those rows.  So "stops by T" and "runs for exactly T steps" are
       interchangeable, at the cost of a few extra states used to
       remember where it stopped.
 
@@ -174,9 +174,9 @@ S, then
 In particular this covers Z = f(W) for a fixed function f.  Post-
 processing cannot create information.
 
-TOOL C (the variational bound).  Let Q and R be probabilities with Q
-absolutely continuous with respect to R, and let F >= 0 be measurable
-with E_R F <= 1.  Then
+TOOL C (the variational bound).  Let Q and R be probabilities with Q absolutely continuous with respect
+to R, and let F >= 0 be measurable with E_R F <= 1.  A general treatment
+of this variational form is in Dupuis and Mao (2022).  Then
 
       D(Q || R) >= E_Q log F.                                    (2.3)
 
@@ -239,7 +239,7 @@ pole (0, ..., 0, 1).  Two ingredients.
       that graph is 1/u_q <= 2.  So the cap has area at most twice the
       volume of its shadow.  The shadow lies in the ball of radius r in
       R^{q-1}: the first q-1 coordinates of u - z are the first q-1
-      coordinates of u, and their squared length is at most |u - z|^2.
+      coordinates of u, and the squared length of these coordinates is at most |u - z|^2.
       Hence
 
             area(cap)  <=  2 * v_{q-1} * r^{q-1},
@@ -315,7 +315,7 @@ nothing and the residual radius is one.  Suppose b >= 1.
 
 Write Z for a standard normal vector in R^d and S = Z/|Z|.  Split Z into
 its parts Z_row in the row space of G, of dimension b, and Z_ker in ker G,
-of dimension d-b.  These two parts are independent, and their squared
+of dimension d-b.  These two parts are independent, and the two squared
 lengths are independent chi-squared variables with b and d-b degrees of
 freedom.  Therefore
 
@@ -353,7 +353,10 @@ Outside both events, R^2 >= (d/3)/(4d/3) = 1/4.  Sum.  Done.
 
 This is the heart of the whole argument.  The analyst learns the projection
 GS.  Inside the remaining sphere, an accurate answer still needs a lot of
-information.
+information.  The comparison below is the binary-relative-entropy event
+argument of Bassily et al. (2018).
+
+./bassily-et-al-2018.pdf
 
 LEMMA 4 (information on a residual sphere).  Let S ~ sigma_d and let V be
 a random variable with values in a Borel space, jointly distributed with
@@ -372,9 +375,9 @@ Proof.  Put Z = (G, GS) and compare two joint laws of (S, V, Z).
   The true law: the actual one.
 
   The comparison law: first draw Z with its true law, then draw S and V
-  independently from their true conditional laws given Z.
+  independently from the true conditional laws given Z.
 
-Both laws have the same Z-marginal, so the divergence between them is
+Both laws have the same Z-marginal, so the divergence between the two laws is
 exactly I(S;V|Z).  Now generate S-hat from V by the same kernel in both
 laws.  Conditioned on (S,V) the two laws agree, so the divergence does not
 change.  It is still I(S;V|Z).
@@ -463,7 +466,7 @@ and the conditional law of S is the residual sphere of Lemma 3 with
 radius R.
 
 On the event R >= 1/2, fix a value of the output.  Two successful fiber
-points are both within distance eps of that output, so they are within
+points are both within distance eps of that output, so the two points lie within
 2 eps of each other.  Rescale the fiber sphere to unit radius by dividing
 all distances by R.  In those units the success set lies in a chordal ball
 of radius 2 eps / R <= 4 eps.  By the angular conversion of Corollary 5,
@@ -564,12 +567,12 @@ B is the analyst's projection.  The machine never sees B.  What is measured is
 information about S in W after the analyst has learned B S.
 
 Given the data (A,Y), draw t independent signals
-S_1, ..., S_t from the conditional law of S given (A,Y).  Draw them
-independently of W.  Call them replicas.
+S_1, ..., S_t from the conditional law of S given (A,Y).  Draw these signals
+independently of W.  Call the signals replicas.
 
-The replicas are all equal in distribution but not independent: they all
+The replicas are all equal in distribution but not independent: every replica
 satisfy A S_i = Y with the same matrix A, and once the data are forgotten
-that common event ties them together.  This dependence is what the proof
+that common event ties the replicas together.  This dependence is what the proof
 harvests.
 
 Why a replica is a fair copy.  Conditionally on (A,Y):
@@ -581,9 +584,11 @@ Why a replica is a fair copy.  Conditionally on (A,Y):
       and W is drawn from a kernel of (A,Y) alone.
 
 Hence (S_i, W) has the same joint law as (S, W) for every i.  This is the
-one property the inequality of Lemma 9 needs.  (It is often called the
-Nishimori identity: resampling from the posterior leaves the joint law of
-data and signal untouched.)
+one property the inequality of Lemma 9 needs.  (Often called a Nishimori identity: resampling from the posterior leaves
+the joint law of data and signal untouched.  A general probability-space
+form is in Lelarge and Miolane, 2019.)
+
+./lelarge-miolane-2019.pdf
 
 Let Q be the joint law of the tuple
 (S_1, ..., S_t).  Let p be its one-signal marginal, which is the same for
@@ -737,7 +742,9 @@ E_A it equals
       p^0_A(y) = [ Gamma(d/2) / ( pi^{k/2} Gamma((d-k)/2) ) ]
                  * (1 - q_A(y))^{(d-k-2)/2} / sqrt(det Sigma),  (7.1)
 
-where q_A(y) = y^T Sigma^{-1} y.
+where q_A(y) = y^T Sigma^{-1} y.  This is the spherical beta projection
+density; the underlying geometry is discussed by Frankl and Maehara
+(1990).
 
 Proof of (7.1).  Let Z be standard normal in R^d and S = Z/|Z|.  Split Z
 into its row-space part Z_1 and its kernel part Z_2 (d-k coordinates).  Put
@@ -814,7 +821,7 @@ about lambda_{A,y}.
 
 This is the whole reason for writing (7.1) as a general formula rather than
 as a table of constants: (7.1) and the fiber measure are the same object,
-and the identity below is a statement about them.
+and the identity below is a statement about both objects.
 
 The map s -> (As, direction inside the fiber) is a smooth change of
 variables on the complement of the row space of A, which is a set of zero
@@ -822,8 +829,13 @@ sigma_d measure.  Hence for every nonnegative measurable h,
 
       int h(s) nu(ds) = int_{R^k} int h(s) lambda_{A,y}(ds) dy.      (7.2)
 
-Equation (7.2) is the coarea identity in this setting, and it already
-contains (7.1): take h = 1 to recover p_A.
+Equation (7.2) is the regular-submersion case of the coarea formula
+(Federer, 1959), reduced to the volume of a single fiber.
+
+./federer-1959-curvature-measures.pdf
+
+It
+already contains (7.1): take h = 1 to recover p_A.
 
 
 Let t >= 2 and m = t-1.  For a tuple u = (u_1,...,u_t) of points in R^d
@@ -860,7 +872,7 @@ and also int J(u)^{-(k+1)} sigma_d^{otimes t}(du) < infinity when
 k + m <= d-3.
 
 Proof.  Take the factors of (7.3) one at a time, from the last back to the
-first.  Condition on u_1,...,u_{i-1}.  Their affine span is an affine
+first.  Condition on u_1,...,u_{i-1}.  The affine span of these points is an affine
 subspace of dimension at most i-2.  By Lemma 2, with j = i-2,
 
       sigma_d{ u_i : dist(u_i, aff(u_1,..,u_{i-1})) <= r }
@@ -901,11 +913,11 @@ of F = F_u.
 The left side picks a matrix A and a common label y, with
 the label weighted by p_A(y)^t, and then picks the t signals independently
 from the posterior mu_{A,y}.  The right side picks the t signals first and
-then picks a Gaussian matrix that annihilates all their differences, with
+then picks a Gaussian matrix that annihilates all common differences, with
 the inverse-volume weight (7.4).
 
 Both sides are finite measures in (A,y,u), not normalized probabilities.
-Their total masses agree, and the identity says they agree as measures.
+The total masses agree, and the identity says the two sides agree as measures.
 The arguments below prove it, and extract the probability statement.
 
 
@@ -1100,7 +1112,7 @@ by Lemma 11.  So both are finite Borel measures on a second-countable
 space.  Both are carried in a bounded set: L because p^0_A vanishes outside
 the ellipsoid E_A, and R because its label is A u_1 with |u_1| = 1.  Finite
 Borel measures on a metric space, carried in a bounded set, are determined
-by their integrals against bounded continuous functions.  Therefore L = R
+by integrals against bounded continuous functions.  Therefore L = R
 as measures,
 and (7.12) holds for every nonnegative Borel H.  (This is the standard
 monotone class argument: the class of H for which the identity holds
@@ -1236,7 +1248,7 @@ Borel H.  Define R by
       R(dA, du)  =  nu^{otimes t}(du) gamma_{k,d}^{F_u}(dA).
 
 R is a probability law: draw t independent signals from nu, then draw a
-Gaussian matrix annihilating their differences.  Then (8.4) reads
+Gaussian matrix annihilating all common differences.  Then (8.4) reads
 
       E_Q[ H ]  =  (2pi)^{-km/2} E_R [ J(U)^{-k} p_A(A U_1)^{-m} H ],  (8.5)
 
@@ -1336,7 +1348,10 @@ degrees of freedom is integrable in both directions: near zero because
       int_0^{a} |log x| x^{nu/2 - 1} dx < infinity     for nu > 0,
 
 and near infinity because log x <= x.  Summing over the k factors proves
-integrability.  This is a standard Wishart Gram-Schmidt computation.
+integrability.  This is a standard Wishart Gram-Schmidt computation; see Edelman and
+Rao (2005) for a systematic treatment.
+
+./edelman-rao-2005.pdf
 
 The tuple is u = (u_1,...,u_t) with t = m+1 points on the sphere, so each
 simplex height in (7.3) is at most 2 and
@@ -1533,7 +1548,7 @@ A_tilde at the projected label of a replica.
 
 LEMMA 15 (the test is normalized).  For every fixed B, the conditional
 expectation of Lambda given B, computed under the law that draws t
-independent signals from nu and then projects them, equals one.
+independent signals from nu and then projects the tuple, equals one.
 
 Proof.  Work conditionally on B.  By Lemma 16 below, conditionally on the
 projected tuple, A_tilde is a draw from gamma^F_{k,d} and is independent
@@ -1852,7 +1867,7 @@ least 2/3.  Fix such a value xi_0.  Hence:
 
 Nothing is lost: 2/3 >= 3/5, and 3/5 is the threshold in Corollary 5 and in
 Lemma 6.  Measure-theoretic details of choosing Borel versions for
-per-seed kernels are not needed for the bound; they only matter if one
+per-seed kernels are not needed for the bound; the Borel details only matter if one
 wants a deterministic learner whose state path is Borel measurable in the
 data.
 
@@ -1879,7 +1894,7 @@ k = 2 floor(d/16) as in (10.1).  Let
       n  =  ceil(T/k)                                                (11.3)
 
 be the number of blocks, and append extra ignored rows if needed so that
-the last block is complete.  Never let the learner see the extra rows; they
+the last block is complete.  Never let the learner see the extra rows; the rows
 exist only to complete the bookkeeping.
 
 Let V_i be the padded state at the end of block i, and V_0 the initial
@@ -1916,7 +1931,7 @@ value with probability p_h > 0.  Under this conditioning:
         f_h  <=  1/p_h ,     so the prior bound is  L = 1/p_h.        (11.7)
 
   The i-th block consists of k fresh independent Gaussian rows, with
-  matrix A_i and labels A_i S.  They are independent of (S, V_{i-1}).
+  matrix A_i and labels A_i S are independent of (S, V_{i-1}).
 
   The new state V_i is a deterministic function of (h, A_i, A_i S).
   So it is a message drawn from a kernel of (A_i, A_i S), with an alphabet
@@ -2036,8 +2051,6 @@ d, and with the threshold allowed to depend on the sequence M = M(d),
 with an absolute c > 0.
 
 
-This is Theorem 1, the sole conclusion of the argument.
-
 THEOREM 19 (memory-precision tradeoff).  Let M(d) be a nonnegative
 integer-valued sequence with M(d) = o(d^2), meaning M(d)/d^2 -> 0.  Let
 0 < eps(d) <= 1/10.  Consider a learner with all of the following
@@ -2122,6 +2135,25 @@ difference of expected log-determinants; and the normalization (8.7),
 which is where the constant (2 pi)^{-km/2} comes from and where the
 equal-label identity turns into a probability statement.
 
+REMARK 7 (other comparison routes).  The block bound can also be proved
+by comparing replicas against laws built from a different auxiliary
+projection.  Distance bins read off the dyadic scale of each projected
+simplex height, trading the double logarithm of (10.23) for a linear
+prior cost b/d at the price of a slightly larger replica count.
+Haar frames replace the Gaussian side matrix by a uniform orthonormal
+frame; the resulting maximal inequality is the one of Hardy and
+Littlewood (1930), with the exponential-in-dimension constant sharpened
+by Stein and Stromberg (1983).  A synthetic Gaussian selector replaces
+the actual side matrix by fresh Gaussian rows in the orthogonal
+complement of the projected differences, at the cost of a random
+Wishart covariance.  A Stiefel incidence comparison keeps both laws on
+the same regular coarea measure and computes the relative entropy
+directly, using the Stiefel volume of Edelman, Arias, and Smith (1998).
+
+./edelman-arias-smith-1998.pdf
+Each route supplies the same streaming consequence through the
+one-block-to-history iteration used for the Gaussian test above.
+
 
 A concrete instance: with eps = 10^{-3}, d = 1000, and a state of
 10^5 bits (far below d^2/4 = 250000), the theorem requires about d log(1/eps) = 1000 * 6.9 = 6900 rows,
@@ -2137,6 +2169,4 @@ amount, which is of order log(1/eps).
       number of blocks          >=  log(1/eps) / c
       rows                      >=  k * blocks  ~  d log(1/eps)
 
-That is the whole argument, in four lines.
-