diff 16a6f80..dc562db erdos_similarity_dyadic_v2.txt
diff --git a/erdos_similarity_dyadic_v2.txt b/erdos_similarity_dyadic_v2.txt
index e69de29..6396e3f 100644
--- a/erdos_similarity_dyadic_v2.txt
+++ b/erdos_similarity_dyadic_v2.txt
@@ -0,0 +1,999 @@
+================================================================================
+THE DYADIC CASE OF THE ERDOS SIMILARITY CONJECTURE
+A complete, elementary proof written for a motivated high-school reader
+================================================================================
+
+
+0. HOW TO READ THIS DOCUMENT
+--------------------------------------------------------------------------------
+
+You need three things to follow everything here:
+
+ (a) powers of two: 2^-1 = 1/2, 2^-2 = 1/4, 2^-n = 1/2^n, and 2^5 = 32;
+ (b) the idea of a "length" of a set of real numbers, called measure;
+ (c) the idea that independent coin flips multiply their probabilities.
+
+Nothing else. No calculus, no complex numbers, no linear algebra. Every
+inequality is written out with the actual constant so you can check it with
+a calculator. If an argument feels like magic, find the boxed "why" that
+follows it: that is where the magic becomes arithmetic.
+
+We will prove one theorem. Everything else in this document is in service
+of that theorem. You can read section 4 (the strategy) first, skip to
+section 15 (the grand finale) to see how it ends, and then come back for
+the details. That order is encouraged.
+
+
+1. THE QUESTION
+--------------------------------------------------------------------------------
+
+A "nontrivial affine copy" of a set A of real numbers is another set
+
+ x + s A = { x + s a : a in A }, where x is any real number
+ and s is any nonzero real number.
+
+Think of x as a shift (translation) and s as a zoom (dilation). If s is
+negative you also flip the set left-to-right. So a copy of A is "A moved,
+stretched or shrunk, and possibly mirrored".
+
+The set A is called MEASURE UNIVERSAL if every measurable set E of real
+numbers with positive length contains some nontrivial affine copy of A.
+("Measurable" means "has a well-defined length"; every set you can draw,
+countably union, and take complements of is measurable. You will not lose
+anything by imagining E as a union of intervals.)
+
+In 1974 Paul Erdos asked:
+
+ ERDOS SIMILARITY CONJECTURE. No infinite set A of real numbers is
+ measure universal.
+
+In other words: given any infinite set A, there should exist a set E of
+positive measure (in fact, of measure as close to 1 as you like) that
+contains no copy of A whatsoever.
+
+The special case we settle here is
+
+ A = D = { 2^-1, 2^-2, 2^-3, ... } = { 1/2, 1/4, 1/8, ... }.
+
+We will build, for each epsilon > 0, a compact set E contained in [0,1]
+of length greater than 1 - epsilon that contains no copy of D.
+
+
+2. WHY FINITE SETS ARE EASY AND INFINITE SETS ARE HARD
+--------------------------------------------------------------------------------
+
+Take a FINITE set F = {a_1, ..., a_k} of real numbers, k >= 1. Then F is
+always measure universal. Here is the one-line reason, written out.
+
+Let E be any measurable set with finite positive length m(E). For a shift
+s, the set of points z such that all of z + s a_1, ..., z + s a_k lie in
+E is
+
+ E_s = E intersect (E - s a_1) intersect ... intersect (E - s a_k).
+
+The length of E_s tends to m(E) as s tends to 0 (this is called continuity
+of measure under translation; it is exactly the property that makes the
+length function behave the way you expect). So for small enough nonzero s
+the set E_s has positive length, hence contains a point z, and then
+z + s F is a copy of F inside E. Done.
+
+This uses that a finite number of shifts small enough still leaves the
+intersection fat. With infinitely many conditions, the intersection can
+collapse. Infinitely many points must be arranged "in the same place" of
+E, and the copies of an infinite set are rigid in a way that finite
+copies are not.
+
+The sequence D is particularly rigid. It has a self-similarity:
+
+ D = {1/2} union (1/2) D.
+
+Also, its gap structure refuses to grow. Suppose a_1 > a_2 > ... > a_n
+are any n points of D with n >= 2. The smallest gap among them is at most
+a_{n-1} (because a_{n-1} is the second largest and a_n is at most a_{n-1}).
+But a_{n-1} <= 2^{-(n-2)} a_1, while the diameter a_1 - a_n is at least
+a_1 / 2. So the ratio (smallest gap)/(diameter) is at most 2^{-(n-3)}.
+Several classical results prove nonuniversality when this ratio decays
+only slowly or when the normalized minimum gap grows with n; D is on the
+wrong side of those criteria. And D is countable, so it cannot carry
+the kind of measure used by other known smoothness criteria. The dyadic
+sequence was a genuinely open case; this document settles it.
+
+
+3. THE MAIN THEOREM
+--------------------------------------------------------------------------------
+
+THEOREM. Let D = {2^-n : n >= 1}. For every epsilon > 0 there is a
+compact set E of [0,1] with length m(E) > 1 - epsilon such that for every
+real x and every nonzero real s,
+
+ x + s D is NOT contained in E.
+
+Equivalently: for every real x and every nonzero real s there is an
+integer n >= 1 with x + s 2^-n outside E.
+
+The set E is a single set that defeats every copy at once, all shifts and
+all zooms, of either sign. The "length greater than 1 - epsilon" is what
+earns the word "large" here.
+
+
+4. THE STRATEGY IN PLAIN WORDS
+--------------------------------------------------------------------------------
+
+The whole proof can be summarised in six sentences, each of which becomes
+a section later.
+
+ (1) It is enough to build a 1-PERIODIC open set H of SMALL density that
+ hits x + t D for every real x and every zoom t in the short window
+ [1,2]. "Periodic" means H + 1 = H, and "density" means the length
+ of H inside one unit interval.
+
+ (2) Because any zoom s can be written s = 2^-k * t with t in [1,2), a
+ periodic H hitting all normalized zooms can be copied, shrunk by
+ 2^-j, and folded together for all j to hit every zoom.
+
+ (3) Inside H we use two layers of randomness. A short random "routing"
+ table sends each spatial point down an M-ary ordered tree, choosing
+ at each node the first child whose coin is heads, or the LAST child
+ if every coin is tails. At the leaf a "terminal" coin with small
+ success probability p decides membership.
+
+ (4) The routing is arranged so that the centre's own path reaches its
+ first "default" (all-tails) node with high probability. At that node
+ all non-default children rejected the centre. Nearby translates of
+ the centre (the points of the dyadic copy) keep the SAME rejections
+ because we put gaps between index windows, and hence they arrive
+ at the same node still free to enter the non-default children.
+
+ (5) For each such child we obtain (M-1) * r independent terminal tests,
+ because the relevant dyadic points are far enough apart that they
+ read DISTINCT table entries. With r chosen large, the chance all
+ these tests fail is (1 - p/2)^{(M-1) r}, exponentially small.
+
+ (6) The zoom t is continuous, not discrete. But the test outcomes
+ change only when a point crosses a grid boundary, and there are
+ only finitely many crossings. A finite union bound kills them all,
+ and a last open-neighbourhood repair handles the leftover centres.
+
+Everything below is bookkeeping that turns these six sentences into
+inequalities that sum to less than what we can afford.
+
+
+5. THE TOOLS, ONE BY ONE
+--------------------------------------------------------------------------------
+
+We use the following facts. Each is standard; none needs proof here.
+
+MEASURE. Lebesgue measure m assigns to a set E in the real line a number
+m(E) in [0, infinity], with these properties:
+
+ m([a,b]) = b - a;
+ if E_1, E_2, ... are disjoint then m(union) = sum of m(E_i);
+ if E_1, E_2, ... are arbitrary then m(union) <= sum of m(E_i);
+ if E_1 superset E_2 superset ... with finite m(E_1) then m(intersection)
+ = lim m(E_i).
+
+The third property is called COUNTABLE SUBADDITIVITY. It is the workhorse
+of every estimate in this document.
+
+DENSITY. A set H is 1-periodic if H + 1 = H. Then the quantity
+rho(H) = m(H intersect [0,1]) is the length of H inside one period; it is
+the same for every unit interval. rho is additive over disjoint sets, and
+rho(H) is exactly the measure of the image of H in the circle R/Z.
+
+PROBABILITY. A random coin with heads probability q has tails probability
+1 - q. Independent coins multiply: the chance that k independent coins all
+show tails is (1 - q)^k. If you have finitely many possible outcomes, the
+chance of at least one bad outcome is at most the SUM of the individual
+chances. This is the UNION BOUND; it is the second workhorse.
+
+DYADIC GRIDS. For an integer b >= 0 and a real z, write {z} for the
+fractional part of z, always in [0,1), and define the grid key
+
+ J_b(z) = floor( 2^(b+2) * {z} ).
+
+The value is an integer from 0 to 2^(b+2) - 1, i.e. one of 2^(b+2) cells
+per unit period. Two points z, z' have the same key exactly when they lie
+in the same half-open cell of width 2^-(b+2). (The "+2" is a small pad:
+we use four times as many cells as 2^b, purely so that later tests have
+room; nothing breaks if you think of it as an arbitrary fixed pad.)
+
+The grids NEST: for B >= b,
+
+ J_b(z) = floor( J_B(z) / 2^(B-b) ).
+
+So knowing the fine key J_B determines every coarser key J_b. Equivalently,
+the boundaries of the b-grid are contained in the boundaries of the B-grid.
+
+
+6. THE TREE AND ITS WINDOWS
+--------------------------------------------------------------------------------
+
+Fix p, the target "success probability" of our random set; eventually
+p will be small. Choose two integers M >= 2 and d >= 1 such that
+
+ p (M-1) / 2 >= 10, (6a)
+ (1 - 2^(1-M))^d < p. (6b)
+
+You can always do this: first (6a) forces M to be large, after which
+1 - 2^(1-M) lies strictly between 0 and 1, so its d-th power can be made
+smaller than any p by taking d large.
+
+Let T be the complete ordered tree of height d where every internal node
+has M children, labelled 1, 2, ..., M from left to right. The root has
+height d and leaves have height 0. An edge e = (P,i) goes from node P to
+its i-th child P_i.
+
+The total number of edges is
+
+ K = M + M^2 + ... + M^d.
+
+We list edges in the PREORDER that is natural for trees: at each node,
+list edge (P,1) and everything below child P_1, then edge (P,2) and
+everything below P_2, and so on. So the edges leaving P for a child i < M,
+together with the entire subtree beneath P_i, form a contiguous block of
+this list.
+
+Choose an integer g >= 1 such that
+
+ K * 2^(2-g) < p. (6c)
+
+This g is the size of a GAP in "dyadic index space" that we will leave
+between consecutive windows.
+
+Now we assign to every edge a window of consecutive integers, to be used
+as dyadic exponents. Say an edge has height h if its parent has height h.
+
+There will be a single window length r_h for all edges of height h. We
+compute the lengths from the bottom up. First choose an integer r_* >= 1
+such that for every integer r >= r_*,
+
+ 20 M r (1 + 2^(2r+2)) * exp( -(p (M-1) / 2) * r ) < p. (6d)
+
+Such an r_* exists because the left side equals, for r >= 1,
+
+ 20 M r (1 + 2^(2r+2)) * exp( -(p(M-1)/2) r )
+ <= 100 M e^(-8r) (using p(M-1)/2 >= 10,
+ 1 + 2^(2r+2) <= 5 e^(2r),
+ and r <= e^r)
+ <= 100 M e^(-7r),
+
+which goes to 0 as r grows.
+
+Now set sigma_0 = 0 and define for h = 1, ..., d:
+
+ r_h = max( r_*, g + sigma_{h-1} ), (6e)
+ sigma_h = M r_1 + (M-1) g if h = 1,
+ = M ( r_h + g + sigma_{h-1} ) + (M-1) g. if h >= 2.
+
+Read sigma_h as "the total span (number of indices, plus gaps) of a whole
+height-h subtree". The recursion is well-defined from the bottom up:
+the right-hand side only mentions smaller heights.
+
+Finally we place the actual integer windows. List the edges of T in
+preorder and give the first one the window {3, 4, ..., 3 + r_h - 1} where
+h is its height. Each subsequent edge e gets a window W_e = {a_e, ...,
+b_e} of the appropriate length r_h, where a_e is one more than the previous
+window's endpoint minus the gap:
+
+ a_e = b_f + g + 1, where f is the immediately preceding edge.
+
+Let N be the union of all these windows (a finite set of positive integers;
+note every index is >= 3).
+
+Two properties are used later.
+
+FIRST, an edge e = (P,i) with parent of height h and the whole child block
+below P_i fit in a span bounded by twice its own window length. Precisely,
+let b_e^* be the largest window endpoint among the edge e and all edges
+below the child P_i. Then
+
+ b_e^* - a_e + 1 <= r_h + g + sigma_{h-1} <= 2 r_h. (6f)
+
+The equality is just the definition of sigma; the inequality uses
+r_h >= g + sigma_{h-1} from (6e). The case h = 1 is immediate because the
+child P_i is a leaf and the block is just e, of length r_1.
+
+SECOND, each r_h is at least r_*, so (6d) applies with r = r_h.
+
+
+7. STABLE CENTRES: WE DO NOT CROSS OLD GRID LINES
+--------------------------------------------------------------------------------
+
+For a non-initial window W_e, let f be the window immediately preceding
+it, ending at b_f, and put b' = b_f and delta_e = 2^(1 - a_e), the largest
+possible displacement caused by this window's dyadic exponents. Call a
+real centre x STABLE if for every non-initial window,
+
+ the interval (x, x + delta_e] contains no point of the lattice
+ Gamma_{b'} = 2^{-(b'+2)} Z. (7a)
+
+The lattice Gamma_{b'} is exactly the set of grid boundaries of the
+b'-grid, and it also contains every integer, so crossing an integer is
+covered automatically.
+
+Let G be the set of all stable centres.
+
+LEMMA 3 (stability). G is a measurable 1-periodic set with rho(G^c) < p,
+and for every x in G, every window W_e, every exponent n in W_e, every
+t in [1,2], and every window W_f EARLIER than W_e,
+
+ J_{b_f}( x + t 2^-n ) = J_{b_f}( x ). (7b)
+
+Proof. Fix a non-initial window e. The centres x that violate (7a) are
+exactly the union over lattice points beta in Gamma_{b'} of the intervals
+[beta - delta_e, beta). Why: beta lies in (x, x + delta_e] iff x lies in
+[beta - delta_e, beta). That union is a 1-periodic measurable set E_e.
+
+The length of this union inside one period: there are 2^(b'+2) points of
+Gamma_{b'} per period, each interval has length delta_e, and, because
+a_e = b' + g + 1, we have
+
+ 2^(b'+2) * delta_e = 2^(b'+2) * 2^(1 - a_e)
+ = 2^(b'+3 - a_e)
+ = 2^(2 - g) < 1.
+
+So the intervals have disjoint interiors modulo 1, and
+
+ rho(E_e) = 2^(2 - g).
+
+The complement of G is the union of E_e over the K - 1 non-initial
+windows, so by subadditivity
+
+ rho(G^c) <= (K - 1) 2^(2-g) < K 2^(2-g) < p,
+
+using (6c). Measurability and periodicity are clear from the definition.
+
+Now prove (7b). If W_e is the initial window there is nothing to prove.
+Otherwise, the displacement t 2^-n satisfies 2^-n <= 2^-a_e and t <= 2,
+so t 2^-n <= 2^(1 - a_e) = delta_e. Stability (7a) says the half-open
+interval (x, x + t 2^-n] contains no point of Gamma_{b'}, so both endpoints
+land in the same half-open cell of the b'-grid and share the same J_{b'}
+key. (If x itself is a boundary, x belongs to the cell on its right, so the
+statement still holds as long as the next boundary to its right is not
+reached, which is exactly what we excluded.) Finally b_f <= b', and grids
+nest, so the same equality holds at the coarser resolution b_f. QED
+
+
+8. THE RANDOM SET
+--------------------------------------------------------------------------------
+
+We build a random 1-periodic set B with expected density E[rho(B)] = p.
+
+For every non-default edge e = (P,i), i < M, create a random table
+
+ S_e : {0, 1, ..., 2^(b_e + 2) - 1} -> {0,1},
+
+whose entries are independent fair coins (probability 1/2 each). There is
+NO selector table for the default edges (P,M). For every leaf L with an
+incoming edge ending at b(L), create a random terminal table
+
+ T_L : {0, 1, ..., 2^(b(L) + 2) - 1} -> {0,1},
+
+whose entries are independent coins with probability p of 1. All entries
+of all tables are mutually independent. There are finitely many of them,
+so this is a finite probability space (call it Omega; call its probability
+P and its expectation E).
+
+ROUTING. Given tables and a real z, start at the root. At an internal node
+P of height h, let (P,i) be the first child with i < M for which
+
+ S_{(P,i)}( J_{b_{(P,i)}}(z) ) = 1.
+
+If none of the M-1 selector values is 1, take the LAST child P_M (this
+edge is the "default"). Continue down. Let L(z) be the leaf reached.
+
+MEMBERSHIP. Define
+
+ B = { z : T_{L(z)}( J_{b(L(z))}(z) ) = 1 }. (8a)
+
+Both the routing and the terminal test use only periodic keys J_b(z),
+which depend only on the fractional part of z. And all grids are nested.
+Therefore membership in B is constant on each cell of the finest grid
+ever used, so every realization of B is a 1-periodic set that is a finite
+union of half-open cells per period. In particular B is measurable.
+
+EXPECTED DENSITY. Let S be the sigma-algebra generated by all selector
+tables. Condition on S. Fix z. Then the leaf L(z) and the terminal key
+are determined, while the terminal entry itself retains its independent
+coin with probability p of 1. So
+
+ P( z in B | S ) = p.
+
+Integrating over z in [0,1], because finitely many outcomes are involved,
+
+ E[ rho(B) ] = integral_0^1 P(z in B) dz = p. (8b)
+
+
+9. THE CENTRE'S PATH AND ITS FIRST DEFAULT
+--------------------------------------------------------------------------------
+
+For a FIXED centre x, look at all the selector entries at x:
+
+ the values S_e( J_{b_e}(x) ), for all non-default edges e.
+
+Call F_x the sigma-algebra these values generate. An "atom" of F_x is a
+specific assignment of all these bits. On every atom, all OTHER table
+entries are still independent. The routing of x is completely determined
+by the atom.
+
+LEMMA 4 (a first default on the centre's path). For every fixed real x,
+
+ P( the path of x never takes the default child ) = (1 - 2^(1-M))^d
+ < p.
+
+Proof. At any node, the default is taken exactly when its M-1 selector
+entries at x are all 0, which has probability 2^-(M-1) = 2^(1-M). Along
+the path, reveal the entries at each node only when the path first reaches
+it. The entries at that node are independent of the entries at all its
+strict ancestors, because table entries are independent and distinct.
+So at each of the d internal-node decisions the conditional probability of
+NOT defaulting is 1 - 2^(1-M). Multiply the d factors. The strict
+inequality is precisely (6b). QED
+
+
+10. ROUTING TRIALS THROUGH THE FIRST DEFAULT
+--------------------------------------------------------------------------------
+
+Fix a stable centre x in G, and condition on an atom of F_x on which the
+first default occurs (call the node of that first default U; U is fixed
+by the atom). Let h be U's height, and put r = r_h. For each i < M, put
+
+ e_i = (U,i), b_i^* = b_{e_i}^*,
+
+where b_{e_i}^* is the "child block endpoint" from (6f), and let
+
+ y_n(t) = x + t 2^-n.
+
+For a point z, let L_i(z) be the leaf obtained by applying the same
+routing rule STARTING at the child U_i (if U_i is itself a leaf, set
+L_i(z) = U_i). Define the local predicate
+
+ Q_i(z) = S_{e_i}( J_{b_{e_i}}(z) ) * T_{L_i(z)}( J_{b(L_i(z))}(z) ).
+ (10a)
+
+This is 1 exactly when z is accepted at the child edge e_i AND the
+terminal coin at its leaf says yes. It is a function of only a part of
+the randomness.
+
+LEMMA 5 (routing preservation). Fix x in G and an atom as above. For every
+i < M, every exponent n in W_{e_i}, and every t in [1,2],
+
+ Q_i( y_n(t) ) = 1 implies y_n(t) is in B. (10b)
+
+Proof. Consider a strict ancestor P of U, and let P_a be the child of P
+on the path of x to U. Because U is the FIRST default, the choice a is
+non-default, so a < M. The decision at P uses exactly: the zero-ness of
+selectors at edges (P,1), ..., (P,a-1), and the value 1 at (P,a). Each of
+these edges precedes every edge in the subtree below P_a, hence precedes
+e_i in the preorder. So each of their windows is earlier than W_{e_i}.
+Lemma 3 (stability) applied to the exponent n in W_{e_i} gives identical
+selector evaluations at x and at y_n(t). Inducting down the ancestor
+chain shows y_n(t) reaches U.
+
+At U itself, for each j < i, the edge (U,j) also precedes e_i in the
+preorder, so by stability J_{b_{(U,j)}}(y_n(t)) = J_{b_{(U,j)}}(x) and
+the corresponding selector at y_n(t) is still 0, matching x's value at
+that child (which is 0 because x defaults at U and picks no non-default
+child).
+
+If Q_i(y_n(t)) = 1, then the selector at edge (U,i) evaluates to 1 at
+y_n(t), so the routing at U chooses child i for y_n(t). From that point
+the rule is exactly the same as when we defined L_i(y_n(t)) -- by
+construction. And the terminal entry in (10a) is 1. So by the membership
+rule (8a), y_n(t) is in B. QED
+
+
+11. WHY THE TESTS ARE INDEPENDENT
+--------------------------------------------------------------------------------
+
+Fix x in G and an atom of F_x with a first default U at height h; let
+r = r_h. Fix a scale t in [1,2]. The set of index pairs we test is
+
+ I = { (i,n) : 1 <= i < M, n in W_{e_i} }.
+
+Its cardinality is exactly (M-1) r, because the M-1 non-default children
+each have a window of r integers.
+
+For (i,n) in I, define the selector bit
+
+ A_{i,n} = S_{e_i}( J_{b_{e_i}}( y_n(t) ) ).
+
+We claim all these A_{i,n} are DISTINCT selector entries, and none of
+them was exposed at x.
+
+Fix i, and write a = a_{e_i}, b = b_{e_i}. For any two exponents
+n < n' both in W_{e_i},
+
+ y_n(t) - y_{n'}(t) = t 2^-n - t 2^-n'
+ = t 2^-n' ( 2^(n'-n) - 1 )
+ >= 2^-n' (2 - 1)
+ >= 2^-b,
+
+since t >= 1, n' <= b, and 2^(n'-n) >= 2. Also y_n(t) - x = t 2^-n
+>= 2^-b. All of these points lie in [x, x + 2^(1-a)], an interval of
+length at most 2^(1-3) = 1/4, because a >= 3. On an interval of length
+less than 1, ordinary distance equals circular distance. So any two of
+x and y_n(t), n in W_{e_i}, are circularly separated by at least 2^-b.
+
+Two points in the SAME half-open b-cell have circular distance strictly
+less than the cell width 2^-(b+2). Since 2^-b > 2^-(b+2), two points
+separated by at least 2^-b must lie in DIFFERENT b-cells. Therefore the
+keys J_b of x and of all the y_n(t) are pairwise distinct. This is where
+the "+2" pad works: it gives us a 4x margin, which survives the endpoint
+cases.
+
+For different values of i, the selector TABLES themselves differ (e_i
+lies in the child-U_i block, and different i give different edges and
+hence different tables). Therefore the bits A_{i,n} for all pairs in I
+are entries of tables whose coordinates are outside the exposed set that
+defines F_x. Conditional on the atom, they are independent fair bits.
+
+Next condition on the sigma-algebra S of ALL selectors. For each pair
+(i,n), its chosen leaf L_{i,n} = L_i(y_n(t)) and its terminal address
+
+ kappa_{i,n} = ( L_{i,n}, J_{b(L_{i,n})}( y_n(t) ) )
+
+are now fixed. These addresses are DISTINCT:
+- different leaf tables differ if L_{i,n} and L_{i,n'} are different leaves;
+- if the same leaf L is being used, and L is below child U_i, then
+ b(L) >= b_{e_i}. By the same spatial separation as above, the two keys
+ at resolution b are already different, and by nesting they remain
+ different at every finer resolution b(L).
+
+(If U_i is a leaf, b(L) = b_{e_i} and the argument still works.)
+
+Terminal tables are independent of S. Given a realization of S, the
+addresses are fixed distinct coordinates, so the terminal bits
+
+ V_{i,n} = T_{L_{i,n}}( J_{b(L_{i,n})}( y_n(t) ) )
+
+have the product probability law with parameter p. Since Q_i(y_n(t)) =
+A_{i,n} * V_{i,n}, we have, conditional on S,
+
+ P( Q_i(y_n(t)) = 0 for all (i,n) in I | S )
+ = (1-p)^( sum_{(i,n) in I} A_{i,n} ).
+
+Now average over the A bits (which are independent fair coins conditional
+on the atom): each A contributes a factor
+
+ 1/2 * 1 + 1/2 * (1 - p) = 1 - p/2.
+
+There are exactly (M-1) r such factors. So
+
+ P( Q_i(y_n(t)) = 0 for all (i,n) in I | atom )
+ = (1 - p/2)^{(M-1) r}. (11a)
+
+
+12. FINITELY MANY SCALES SUFFICE
+--------------------------------------------------------------------------------
+
+The previous estimate holds at ONE fixed scale t. We need every t in
+[1,2] at once. This is the place where the grid structure does real work.
+
+LEMMA 6 (representative scales). Fix x in G and an atom of F_x with first
+default node U at height h; let r = r_h, e_i = (U,i), b_i^* = b_{e_i}^*.
+There is a finite set of scales
+
+ R(x,U) contained in [1,2]
+
+depending only on x, U, and the (deterministic) windows and tree, such
+that
+
+ |R(x,U)| <= 20 M r (1 + 2^(2r+2)), (12a)
+
+and such that, for EVERY realization of the tables compatible with the
+atom, and for EVERY t in [1,2], there is t' in R(x,U) with
+
+ Q_i( x + t 2^-n ) = Q_i( x + t' 2^-n )
+ for all 1 <= i < M and all n in W_{e_i}. (12b)
+
+Proof. For fixed tables, Q_i(z) depends only on J_{b_i^*}(z). Why: the
+initial selector of Q_i is at resolution b_{e_i} <= b_i^*, all internal
+selectors used below U_i are on edges whose window endpoints are at most
+b_i^* (by definition of b_i^*), the leaves below U_i have incoming-window
+endpoints at most b_i^*, and the grids are nested, so J_{b_i^*} determines
+every key the predicate could use.
+
+So it is enough to track the keys J_{b_i^*}(x + t 2^-n) as t varies.
+As t runs over [1,2] the point x + t 2^-n runs over a closed interval of
+length 2^-n. The number of points of the lattice Gamma_{b_i^*} in that
+interval is at most 1 + (interval length) / (lattice spacing), i.e.
+
+ |{ t in [1,2] : x + t 2^-n is on a b_i^*-boundary }|
+ <= 1 + 2^-n / 2^-(b_i^*+2) = 1 + 2^(b_i^* + 2 - n).
+
+The extra 1 allows both endpoints to hit the lattice. Using (6f) we have
+b_i^* - a_{e_i} + 1 <= 2 r, so b_i^* <= a_{e_i} - 1 + 2r, and since
+n >= a_{e_i},
+
+ b_i^* + 2 - n <= 2 r + 1 <= 2r + 2.
+
+So each "crossing set" D_{i,n}(x) has at most 1 + 2^(2r+2) points.
+
+Take
+
+ D(x,U) = {1, 2} union ( union over 1 <= i < M, n in W_{e_i}
+ of D_{i,n}(x) ).
+
+List its distinct elements as d_1 = 1 < d_2 < ... < d_L = 2. Now define
+R(x,U) as D(x,U) TOGETHER with the midpoints of consecutive elements:
+
+ R(x,U) = D(x,U) union { (d_j + d_{j+1})/2 : 1 <= j < L }.
+
+Between consecutive elements d_j and d_{j+1}, NO relevant key changes
+(that is the definition of D(x,U) as the crossing set), so every local
+predicate is constant on the open interval (d_j, d_{j+1}). The midpoint
+therefore represents the whole interval. Each breakpoint and endpoint is
+included in R(x,U) and represents itself. Thus for every t in [1,2] the
+representative t' of its cell gives (12b).
+
+Size. There are at most (M-1) r pairs (i,n) in I, so
+
+ L <= 2 + (M-1) r ( 1 + 2^(2r+2) ),
+ |R(x,U)| = 2 L - 1
+ <= 2 (M-1) r (1 + 2^(2r+2)) + 3
+ <= 20 M r (1 + 2^(2r+2)).
+
+This proves (12a). QED
+
+
+13. THE UNION BOUND OVER ALL SCALES
+--------------------------------------------------------------------------------
+
+We can now prove the central "small probability of missing every scale"
+estimate, conditional on being at a stable centre with a first default.
+
+PROPOSITION 8 (raw failure). For every fixed real x that is stable,
+
+ P( there exists t in [1,2] such that x + t 2^-n is NOT in B
+ for every n in N ) <= 2p. (13a)
+
+Proof. Condition first on an atom of F_x on which the first default node
+U exists. Fix a representative scale t' in R(x,U). Because U and R(x,U)
+are determined by the atom and by the deterministic tree and windows,
+Lemma 7 (the fixed-scale estimate of section 11, equation (11a)) applies
+separately to t'. Therefore
+
+ P( Q_i(x + t' 2^-n) = 0 for all (i,n) in I | atom )
+ = (1 - p/2)^{(M-1) r}
+ <= exp( -(p/2) (M-1) r ). (13b)
+
+Suppose some scale t in [1,2] misses B at every index in N. Then by
+Lemma 5, all the local predicates Q_i(y_n(t)) fail. By Lemma 6 there is
+a representative t' in R(x,U) with the same values, so all the predicates
+fail at t' too. Taking the union bound over t' in R(x,U), and using (13b)
+and (12a):
+
+ P( exists t missing | atom )
+ <= |R(x,U)| * exp( -(p/2)(M-1) r )
+ <= 20 M r (1 + 2^(2r+2)) * exp( -(p/2)(M-1) r )
+ < p, (13c)
+
+which is the choice of r_* in (6d), and is valid here because r = r_h
+>= r_*.
+
+Now AVERAGE over atoms. The bound (13c) holds on every atom that has a
+first default. On the remaining event (the path never defaults) Lemma 4
+bounds its probability by p; on that event we simply bound "miss every
+scale" by 1. Therefore
+
+ P( exists t missing ) <= p * 1 + 1 * p = 2p. QED
+
+
+14. REPAIRING EXCEPTIONAL CENTRES
+--------------------------------------------------------------------------------
+
+We now convert the random statement into a deterministic open periodic
+set H with the desired property.
+
+STEP 1: MAKE B OPEN. Every realization of B is a union of finitely many
+half-open dyadic cells. Take the CLOSURE of each selected cell (adding
+only finitely many endpoints) and then enlarge by tiny open circular
+neighbourhoods of radius p/(4Q), where Q is the number of cells in the
+finest grid used. The added length per period is at most 2 * p/(4Q) *
+(number of selected cells) <= p/2. The result is an OPEN periodic set
+B^+ with
+
+ rho(B^+) <= rho(B) + p, and E[ rho(B^+) ] <= p + p = 2p. (14a)
+
+For the empty set, use the empty enlargement.
+
+STEP 2: THE EXCEPTIONAL CENTRE SET. For an outcome omega, define
+
+ R_omega = { x in R :
+ for some t in [1,2], for ALL n in N,
+ x + t 2^-n is NOT in B^+ }. (14b)
+
+This is the set of centres that are "missed" -- some zoom t avoids B^+ at
+every exponent in N.
+
+Claim: R_omega is closed and 1-periodic. (Closedness.) Work on the
+circle T = R/Z. The map (pi x, t) -> pi(x + t 2^-n) is continuous for each
+fixed n, and it is checked finitely many times (N is finite). The set of
+pairs (pi x, t) in T x [1,2] such that ALL of these images avoid the open
+set B^+_T is closed, hence compact. Its projection to T is compact and
+therefore closed. Its preimage under pi is exactly R_omega. Periodic by
+construction. Done.
+
+Average density of R_omega. On every stable centre x in G, Proposition 8
+gives P(x in R_omega) <= 2p (note: enlarging B to B^+ can only
+SHRINK R_omega, so this is fine). On any non-stable x the probability is
+at most 1. Using Lemma 3 (rho(G^c) < p), and interchanging the finite sum
+over omega with the integral,
+
+ E[ rho(R_omega) ] <= 2p * rho(G) + 1 * rho(G^c)
+ <= 2p + p = 3p. (14c)
+
+STEP 3: PICK A GOOD OUTCOME. Averaging, there must exist a single outcome
+omega with
+
+ rho(B^+) + rho(R) <= 5p. (14d)
+
+(If every outcome had sum > 5p, the average would be > 5p, contradicting
+2p + 3p = 5p.)
+
+STEP 4: OPEN NEIGHBOURHOOD OF R. R_omega is closed and 1-periodic. Its
+image R_T in the circle is closed. For epsilon > 0 the metric
+neighbourhoods V_eps = { z : dist_T(z, R_T) < epsilon } are open and
+decrease to R_T as epsilon decreases. Because m has finite total measure,
+choose epsilon so that the open periodic lift V of V_eps satisfies
+
+ R_omega subset V, and rho(V) <= rho(R_omega) + p. (14e)
+
+Set
+
+ H = B^+ union V.
+
+Then H is open and 1-periodic, and using (14d), (14e),
+
+ rho(H) <= rho(B^+) + rho(V) <= rho(B^+) + rho(R) + p <= 6p.
+
+HITS AT EVERY CENTRE AND EVERY t in [1,2].
+
+Case A: x not in R_omega. By negating (14b), for every t in [1,2] there
+is some n in N (hence n >= 1) with x + t 2^-n in B^+ subset H.
+
+Case B: x in R_omega subset V, with V open. Choose n_0 >= 1 with
+2^(1 - n_0) < epsilon. For every t in [1,2] and every n >= n_0,
+
+ dist_T( pi(x + t 2^-n), R_T )
+ <= dist_T( pi(x + t 2^-n), pi(x) ) (since pi(x) in R_T)
+ <= t 2^-n
+ <= 2^(1 - n) <= 2^(1 - n_0) < epsilon.
+
+So pi(x + t 2^-n) lies in V_eps, hence x + t 2^-n lies in V subset H.
+
+Both cases produce some n >= 1 with x + t 2^-n in H. This completes the
+periodic hitting lemma for the chosen p. QED (Lemma 2)
+
+
+15. FROM PERIODIC TO ALL ZOOMS
+--------------------------------------------------------------------------------
+
+We now use the periodic lemma at a summable sequence of parameters and
+rescale.
+
+Fix epsilon > 0. For j = 1, 2, ... put
+
+ p_j = (epsilon / 24) * 2^-j.
+
+Each p_j is in (0,1). By the periodic hitting lemma, choose a 1-periodic
+open set H_j with
+
+ rho(H_j) <= 6 p_j, and
+ for all x in R and all t in [1,2], there is n >= 1 with
+ x + t 2^-n is in H_j. (15a)
+
+All these sets are chosen BEFORE any centre or zoom is considered.
+
+Define
+
+ C = union_{j >= 1} ( 2^-j H_j union ( -2^-j H_j ) ),
+ E = [0,1] minus C.
+
+Each H_j is open, so 2^-j H_j and -2^-j H_j are open, and C is a countable
+union of open sets (open). It is also SYMMETRIC about 0: C = -C, because
+the union includes both signs for every j. So E is closed. Since
+E subset [0,1], E is compact, and by the definition of C the set E is
+disjoint from C.
+
+SIZE OF C. For each j, using 1-periodicity and a change of variables:
+
+ m( (2^-j H_j) intersect [0,1] )
+ = 2^-j * m( H_j intersect [0, 2^j] )
+ = rho(H_j),
+
+because [0, 2^j] contains exactly 2^j unit periods, and endpoints do not
+affect the length. Similarly for the reflected copy. Therefore
+
+ m(C intersect [0,1])
+ <= 2 * sum_{j >= 1} rho(H_j)
+ <= 12 * sum_{j >= 1} p_j
+ = 12 * (epsilon / 24) * 1
+ = epsilon / 2.
+
+Hence
+
+ m(E) = 1 - m(C intersect [0,1]) >= 1 - epsilon/2 > 1 - epsilon.
+
+HITS ON EVERY SIGNED COPY OF D. Let x be a real number and s a nonzero
+real number. Suppose first that s > 0. Choose an integer k with
+
+ t = 2^k s in [1, 2).
+
+(Because s > 0, such a k exists and is unique. Here t is in [1,2), a
+slightly smaller interval than [1,2], which is fine.)
+
+Set j = max(1, k). Apply (15a) to center 2^j x and scale t. Obtain an
+integer n >= 1 with
+
+ 2^j x + t 2^-n is in H_j.
+
+Multiply by 2^-j:
+
+ x + s 2^-(n + j - k) is in 2^-j H_j subset C.
+
+The index N = n + j - k is an integer. Because j >= k, N >= n >= 1.
+Therefore x + s 2^-N is a genuine point of the copy x + s D, and it lies
+in C. Consequently the copy x + s D is NOT contained in E.
+
+If s < 0, apply the positive-scale result to the center -x and the
+positive scale -s. It gives an N >= 1 with
+
+ -( x + s 2^-N ) = (-x) + (-s) 2^-N in C.
+
+Since C is symmetric, x + s 2^-N is in C as well, and the copy is again
+not contained in E.
+
+This proves the theorem: E is compact, m(E) > 1 - epsilon, and every
+signed affine copy of D leaves E. QED
+
+
+16. SANITY CHECKS AND A TINY WORKED EXAMPLE
+--------------------------------------------------------------------------------
+
+It is worth seeing the constants actually fit together. Take M = 2. Then
+condition (6a) reads p (M-1) / 2 = p/2 >= 10, i.e. p >= 20. That is larger
+than 1 and impossible. So M = 2 does NOT work; the smallest M is governed
+by 2(M-1)/2 = M-1 >= 10/p. For p = 0.001, we need M >= 1 + 10/0.001 =
+10001. The point is not that these constants are tight; they are not.
+The point is that they are finite and explicit.
+
+The tree with M = 10001 children has enormous spans K, but K is finite
+and only appears in the choice of g (6c). The recursion (6e) then defines
+finite window lengths r_1 < r_2 < ... < r_d. The depth d only needs
+(1 - 2^(1-M))^d < p, i.e. d > log(p)/log(1 - 2^(1-M)) ~ (log(1/p)) /
+2^(1-M), which is tiny once M is chosen. So the tree is WIDE but SHALLOW.
+
+A worked mini-economy of the proof, ignoring constants, is:
+
+ - Routing has one default-free path with probability (1 - 2^(1-M))^d,
+ which we make below p by making d just big enough.
+
+ - At a first default U at height h, we have M-1 non-default children,
+ each contributing a window of r = r_h tests, and the fixed-scale
+ estimate gives failure probability (1 - p/2)^{(M-1) r}, exponentially
+ small in r.
+
+ - The number of "representative scales" is polynomial in r and in
+ 2^(2r), i.e. logarithmic in the exponential decay, so the union
+ bound (12a) times (13b) still beats p when r >= r_*.
+
+ - Summing over all scales t in [1,2] loses a factor |R(x,U)|, which is
+ killed by choosing r_* large enough in (6d).
+
+ - Repairing the tiny leftover set R costs one extra p of length; hence
+ rho(H) <= 6p.
+
+ - Rescaling by 2^-j multiplies the length by 2^-j, so the total cost
+ over all j is finite: 12 * (epsilon/24) = epsilon/2, less than the
+ epsilon we are allowed to remove from [0,1].
+
+Every step is a strict inequality where it needs to be, and the constants
+are chosen once and reused.
+
+To check you understood the core, try these three exercises:
+
+ (a) Verify that the map (P,i) |-> J_{b_{(P,i)}} is what determines the
+ routing at P, and explain why two points with equal fine key
+ J_B, B large, take the same route down the whole lower subtree.
+
+ (b) Verify that in (11) the separation 2^-b is at least the cell width
+ times 4, because 2^-b = 4 * 2^-(b+2), and explain why this margin
+ survives the endpoint cases.
+
+ (c) Verify the sum 2 * sum_j rho(H_j) <= 12 * sum_j p_j:
+ rho(H_j) <= 6 p_j, doubled is 12 p_j, and sum p_j = epsilon/24.
+
+
+17. WHAT IS AND IS NOT PROVEN. HONESTY SECTION.
+--------------------------------------------------------------------------------
+
+WHAT IS PROVEN. The dyadic sequence D = {2^-n : n >= 1} is not measure
+universal: for every epsilon > 0 there is a compact E in [0,1] with
+m(E) > 1 - epsilon that defeats every signed affine copy of D. The proof
+is elementary and the constants are explicit. Nothing in the argument
+uses advanced analysis beyond the standard facts listed in section 5.
+
+WHAT IS NOT PROVEN. This does NOT settle the full Erdos similarity
+conjecture for arbitrary infinite sets A. It proves only the case
+A = D. In particular:
+ - Other geometric sequences are covered by a different (recent)
+ published result on two-fold sumsets with a geometric summand.
+ - Slowly decreasing sequences such as 1/n were handled by
+ Falconer and Eigen in the 1980s.
+ - Arbitrary infinite sets remain open in general.
+
+HISTORICAL NOTE. An earlier preprint by Cruz, Lai, and Pramanik claiming
+the full similarity conjecture was WITHDRAWN because of a gap in its
+Proposition 3.3. The present document is not that preprint and does not
+claim its result. The result proven here is the dyadic case only, and its
+proof is independent of the withdrawn manuscript.
+
+SOUNDNESS CHECKLIST. If you want to verify the proof on your own, check
+each of the following in order; each corresponds to one section.
+
+ 1. The definitions of density rho, periodic set, and countably
+ subadditive measure in section 5.
+ 2. The tree and window construction, and properties (6f) and (6c),
+ in section 6.
+ 3. The stability lemma, and in particular that the intervals
+ [beta - delta_e, beta) are disjoint modulo 1 because
+ 2^(b'+2) delta_e = 2^(2-g) < 1, in section 7.
+ 4. The routing theorem, that Q_i(y_n(t)) = 1 implies y_n(t) in B,
+ in section 10.
+ 5. The independence theorem, that the A bits and the V bits are
+ distinct, in section 11.
+ 6. The representatives lemma, that at most 1 + 2^(2r+2) crossings
+ occur per (i,n), in section 12.
+ 7. The union bound 20 M r (1 + 2^(2r+2)) exp(-(p/2)(M-1) r) < p,
+ in section 13, which is exactly (6d).
+ 8. The repair, in section 14, giving rho(H) <= 6p, and the two cases
+ for centres not in R and centres in R.
+ 9. The rescaling 2^-j and the constant p_j = (epsilon/24) 2^-j, in
+ section 15.
+
+
+18. SYMBOL DICTIONARY
+--------------------------------------------------------------------------------
+
+ m(A) Lebesgue measure of A (its "length")
+ rho(H) density of a 1-periodic set H: m(H intersect [0,1])
+ A + 1 = A 1-periodic: shifting by an integer does nothing
+ x + s A nontrivial affine copy: shift by x, zoom by s
+ D {2^-n : n >= 1}, the dyadic sequence
+ epsilon desired loss of length; we build E of length > 1 - epsilon
+ p target expected density of one random periodic set
+ M, d number of children per node and depth of the tree T
+ K total number of edges of T: M + M^2 + ... + M^d
+ g size of the gap of unused integer indices between windows
+ r_h length of every index window at height h
+ sigma_h total span of a height-h subtree, window lengths + gaps
+ r_* threshold in (6d) for the "large enough" window length
+ e = (P,i) edge from node P to its i-th child
+ W_e window of dyadic exponents assigned to edge e: {a_e,...,b_e}
+ N the union of all windows; the "starting" set of exponents
+ b_e^* largest window endpoint of e and its child subtree
+ J_b(z) grid key of z at resolution b: floor(2^(b+2) {z})
+ {z} fractional part of z, always in [0,1)
+ Gamma_b lattice of b-grid boundaries: 2^-(b+2) Z
+ G set of stable centres, those never crossing an old
+ boundary for the corresponding window
+ F_x sigma-algebra of selector values at the fixed centre x
+ U first default node on the centre x's route
+ Q_i(z) local predicate: selector at (U,i) times terminal coin
+ at the leaf L_i(z) reached from child U_i
+ y_n(t) x + t 2^-n; one point of the copy x + t D
+ I the set of test pairs (i,n), of size (M-1) r
+ R(x,U) finite set of representative scales for the predicate Q_i
+ R_omega exceptional centres at outcome omega
+ B, B^+ random periodic set, and its open enlargement
+ H final open 1-periodic set with rho(H) <= 6p
+ H_j the versions of H at parameters p_j = (epsilon/24) 2^-j
+ C union_j (2^-j H_j union -2^-j H_j ), the open "bad" set
+ E [0,1] minus C, the desired compact avoiding set
+
+
+================================================================================
+END OF DOCUMENT
+================================================================================