API reference
Grids and enclosures
RigorousUlam2D.UlamPartition — Type
UlamPartition(boxes, domain)The cells boxes (a vector of IntervalBox) of a partition of domain, with their number in n_boxes.
RigorousUlam2D.bisect_interval — Function
bisect_interval(I::Interval) -> (I_left, I_right)The two halves of I, split at mid(I).
RigorousUlam2D.bisect_box — Function
bisect_box(box, dimension) -> (left, right)
bisect_box(box) -> (left, right)The two halves of box along the coordinate dimension, or along its widest coordinate.
RigorousUlam2D.quadrisect — Function
quadrisect(box::IntervalBox{2}) -> [SW, SE, NW, NE]The four quadrants of a rectangle, in that order.
RigorousUlam2D.build_uniform_partition — Function
build_uniform_partition(domain, depth) -> UlamPartitionThe uniform partition of domain into 4^depth cells by depth quadrisections (or 2^(N depth) by bisection along the widest coordinate when N ≠ 2), in the order of the recursion. The cells of a dyadic domain have exact floating-point ends.
RigorousUlam2D.grid_order — Function
grid_order(domain, depth) -> permThe permutation from the order of build_uniform_partition(domain, depth) to the grid order: v[perm] and L[perm, perm] are in grid order when v and L are indexed as the partition (perm[(ix - 1) k + iy] is the index in the partition of the cell (ix, iy)).
RigorousUlam2D.wrap_to_torus — Function
wrap_to_torus(x::Real, xmin, xmax)x translated by a multiple of xmax − xmin into [xmin, xmax), in floating point: for the pictures of the maps (paper/dynamics.jl), not for enclosures.
RigorousUlam2D.zeroth_order_enclosure — Function
zeroth_order_enclosure(F, box::IntervalBox)Compute a rigorous enclosure of the image of the rectangle box under the function F by evaluating F directly on the intervals defining the box. This corresponds to the 0-th order (pure interval) method.
RigorousUlam2D.first_order_enclosure — Function
first_order_enclosure(F, box::IntervalBox{2})Compute a rigorous first-order (mean value) enclosure of the image of the rectangle box under the function F. The Jacobian matrix is obtained via automatic differentiation using ForwardDiff and evaluated over the interval box, providing a tighter enclosure than the 0-th order method in many cases.
The deterministic block
RigorousUlam2D.UlamTree — Type
UlamTree(F, domain, d0, d1; bc=:periodic, enclosure_method=first_order_enclosure,
area=nothing, store=mktempdir())The refinement of the file docstring as an object kept on disk: refine!(tree) descends one level, tree.level is the depth of the coarsest uncertain cell, and ulam_matrices(tree, d) reads the graph and the matrices at any depth d0 ≤ d ≤ min(tree.level, d1), so a long refinement hands out the coarse matrices as it goes and each level halves their widths.
The tree is split into one subtree per cell of depth d0, each in its own file root<k>.jls of the directory store, written whole after every refinement of that subtree; only the subtrees being refined are in memory. Constructing a tree on a store that already holds one with the same domain, depths and boundary condition resumes it, so an interrupted refinement is continued by running it again; F and enclosure_method are not stored and must be the ones the store was built with. ulam_hierarchy is the one-shot form.
area(box, W), if given, encloses the fraction of the box box that F maps into the window W, both IntervalBox{2}, with no boundary condition applied; ulam_matrices then reads the uncertain leaves through it (see the file docstring and fibred_area).
RigorousUlam2D.refine! — Function
refine!(tree::UlamTree; targets=nothing) -> treeQuadrisect the uncertain cells, every subtree in turn: the candidates of a child are the cells met by the enclosure of its image among the children of its parent's candidates (above d1), or among its parent's candidates (at or below d1); a child with a single candidate at depth d1 or finer is resolved. With targets, a vector of booleans indexed as build_uniform_partition(domain, d1), only the cells at depth d1 or finer having a candidate among the marked targets are quadrisected, which refines the rows of U that are too heavy; cells coarser than d1 are always quadrisected.
RigorousUlam2D.repair! — Function
repair!(tree::UlamTree; level=tree.level) -> Vector{Int}Read every subtree file and rebuild those that cannot be read or are not well formed, from their cell of depth d0 refined uniformly to the depth level; returns the roots rebuilt. A subtree is written whole to a temporary file and renamed, but a file system may still lose the data of a renamed file when the disk fills during its writeback, which is how a truncated subtree arises.
RigorousUlam2D.ulam_matrices — Function
ulam_matrices(tree::UlamTree, d; level=0) -> (depth, partition, graph, L_lo, U)
ulam_matrices(tree::UlamTree, depths::AbstractRange; level=0) -> Vector of the aboveThe graph and the Ulam matrix enclosure at depth d, d0 ≤ d ≤ min(tree.level, d1), read off the subtrees: every cell, resolved or uncertain, contributes its mass 4^{-(ℓ-d)} relative to its ancestor at depth d to L_lo when the ancestors at depth d of its candidates are a single cell and to U for each of them otherwise. Matrices are indexed as partition = build_uniform_partition(domain, d). Several depths are read in one pass over the subtrees.
With level finer than tree.level, the uncertain cells are quadrisected in memory, depth first and cell by cell, down to the depth level before being read, and nothing is written to the store: the matrices are those refine! would give after the same quadrisections, at the memory cost of one descent, and d may then reach min(level, d1). level may also be a vector of integers indexed as build_uniform_partition(domain, d1), the depth asked for the cells feeding each row: a cell at depth d1 or finer is quadrisected while one of its candidates asks for a finer depth, so a row that is too heavy is refined further than the others, and repeated calls that raise the levels of the heavy rows only keep what the previous calls gave the rest.
RigorousUlam2D.ulam_hierarchy — Function
ulam_hierarchy(F, domain, d0, d1; leaf_depth=8, bc=:periodic,
enclosure_method=first_order_enclosure, area=nothing, store=mktempdir())Transition graphs and Ulam matrix enclosures at the depths d0:d1 (see the file docstring): a UlamTree refined to depth d1 + leaf_depth, read at each depth with ulam_matrices. Returns a vector with one named tuple (depth, partition, graph, L_lo, U) per depth. The uncertain mass of a cell at depth d is at most the mass of a strip of width diam(domain) 2^{-(d1 + leaf_depth)} around the preimages of the grid lines of depth d1.
RigorousUlam2D.transition_graph — Function
transition_graph(F, domain, depth; bc=:periodic, enclosure_method=first_order_enclosure)The transition graph at one depth, with no refinement: G[i, j] = true when the enclosure of F(I_j) meets I_i. Cells are indexed as in build_uniform_partition(domain, depth).
RigorousUlam2D.fibred_area — Function
fibred_area(xonly, xcomp, yof; yint=nothing, xinv=nothing, bisect=12) -> areaAn area function for UlamTree, for a map F(x, y) whose component xonly (1 or 2) depends on x alone, xcomp(x), and whose other component is strictly monotone in y for every fixed x, with yof(x, w) the y at which it equals w, yint(x, δ, w) the integral of yof(·, w) from x to x + δ, and xinv(X, w) an interval holding every x in X at which xcomp(x) = w (empty or wider when convenient). The four are interval extensions: xcomp and yof take an interval x, yint thin x and δ, xinv takes the interval X (to choose a branch of the inverse) and w is always thin. yint is to be written as an increment, not as the difference of an antiderivative at the two ends: the pieces are as small as 2^-bisect of a leaf, and the difference of two values of the antiderivative loses the integral of such a piece in their rounding (for a polynomial antiderivative, expand in δ; for 1/x², write the difference over a common denominator).
The fraction of a box [x0, x1] × [y0, y1] that F maps into a window W is the integral over x of the length of [y0, y1] ∩ {y : F(x, y) ∈ W}. The part of [x0, x1] that xcomp sends into the window's xonly side is found by bisection, and on a piece inside it the length is the difference of the two inverses yof(x, w), w the ends of the other side, each clamped to [y0, y1]: the integral of a clamped inverse over a piece is the piece's width times the clamp value where the inverse lies beyond it, and yint over the piece where it lies within [y0, y1], intersected with the piece's width times the range of the inverse. A piece on which xcomp crosses the window's end, the inverse crosses y0 or y1, or the monotonicity of F in y cannot be told, is bisected, up to bisect times from the whole box, and is then bounded by its width times the range of the integrand over it. Without yint every piece is bounded that way, which makes the enclosure a Riemann sum over 2^bisect pieces.
With xinv a piece on which xcomp crosses the window's end is cut instead of bisected: the crossings with the two ends are enclosed by xinv, and between them, xcomp being continuous, the piece lies within or outside the window throughout, which is read at one point; the crossing enclosures are bounded by their width times the range of the integrand. The residual of such a crossing is then the width of xinv's enclosure in place of 2^-bisect of the box, and the box is bisected only where the inverse crosses y0 or y1 (where a piece cannot be read, it is bisected as without xinv).
The maps of the examples
RigorousUlam2D.henon_system — Function
henon_system(; bisect = 30, xinv = true) -> (; name, F, domain, area)The rescaled Hénon map of the file docstring on [-1, 1]², its fibred_area with bisect bisections, and the cut at the inverse of the x-only component when xinv.
RigorousUlam2D.lorenz_system — Function
lorenz_system(; bisect = 30, xinv = true) -> (; name, F, domain, area)The Lorenz-like map of the file docstring on [-1/2, 1/2]², its fibred_area with bisect bisections, and the cut at the inverse of the x-only component when xinv.
RigorousUlam2D.metzger_lorenz_system — Function
metzger_lorenz_system(; ρ = 18//5, bisect = 30, xinv = true) -> (; name, F, domain, area)The contracting Lorenz map of the paper's third example (Section 6.3), on [-1/2, 1/2]², periodic: for x > 0, F = (ρ x² − 1/2, y x⁶ − 1/4), for x < 0, F = (1/2 − ρ x², −y x⁶ + 1/4). The first component ℓ is increasing on both branches, ℓ′(x) = 2ρ|x|, so K₂|x|^{s−1} ≤ ℓ′ ≤ K₁|x|^{s−1} with s = 2, its Schwarzian derivative −(3/2)(ℓ″/ℓ′)² is negative, and ℓ(0±) = ∓1/2: condition (A0) of Metzger, Ann. IHP 17 (2000) 247, p. 249; ρ ≤ 4 keeps ℓ in [-1/2, 1/2]. The fibre contracts like |x|^r with r = 6. ρ is a rational, entered as an interval quotient; the name carries it (mlorenz_rho<p>-<q>).
The crossings of ℓ = w are x = ((w + 1/2)/ρ)^{1/2} (x > 0) and x = −((1/2 − w)/ρ)^{1/2} (x < 0), empty where the radicand is negative. The fibre inverse is (w + 1/4)/x⁶ (x > 0) and (1/4 − w)/x⁶ (x < 0), and its integral over [x, x + δ] on pieces of one sign is that factor times ((x + δ)⁵ − x⁵)/(5 x⁵ (x + δ)⁵), written as δ(5x⁴ + 10x³δ + 10x²δ² + 5xδ³ + δ⁴) over the same denominator, as fibred_area asks.
RigorousUlam2D.ulam_system — Function
ulam_system(name; kwargs...) -> (; name, F, domain, area)henon_system, lorenz_system or metzger_lorenz_system by name ("henon", "lorenz", or "mlorenz_rho<p>-<q>" for metzger_lorenz_system with ρ = p//q), with kwargs passed on.
The noisy operator and the norms of its powers
RigorousUlam2D.SquareNoise — Type
SquareNoise(domain, depth, a; bc = :periodic, slots = Threads.nthreads())The Ulam projection of the uniform noise on [-a[1], a[1]] × [-a[2], a[2]] (a number a is the same half-width on both axes) on the grid of depth depth of domain, with the boundary condition bc, as an operator applied by apply! or * to vectors in grid order. The widths 2a[i] are turned into fractions of the sides of the domain exactly, so a should be dyadic. slots kernels are kept, so that as many applications may run at once.
RigorousUlam2D.noisy_operator — Function
noisy_operator(L_lo, U, N::SquareNoise) -> infoThe operator P_h = N L of the file docstring, for L_lo and U in grid order: info holds L̂ = fl(L_lo + U/2) (Lhat), the product Amul(x) = fl(N fl(L̂ x)) on a vector, the product column by column of a matrix, Bmul!(Y, X) setting Y = fl(N fl(L̂ X)) with the same arithmetic per column as Amul and so the same rounding model, w and γ_w (γw), γ_N (γN), colL ≥ ‖L̂‖₁, colE ≥ ‖E‖₁, the number of nonzeros of L̂ (nnzL), and the constants η1, eta1A of the file docstring.
RigorousUlam2D.noisy_ulam_operator — Function
noisy_ulam_operator(sys, blk, depth, a) -> (; info, n, k, h, var12ρ, area, N, normP)The noisy Ulam operator P_h = π N_ξ π L π of the map sys (ulam_system) on the grid of depth depth, from a block blk of bench/tree_deepen.jl (L_lo ≤ L ≤ L_lo + U, indexed as build_uniform_partition, permuted here to grid_order), with N_ξ the Ulam-projected uniform noise on [-a, a]², periodic, a a dyadic rational: noisy_operator of L_lo, U and SquareNoise; with the constants of grid_constants and normP ≥ ‖L_lo + U‖₁ ≥ ‖P_h‖₁, upward.
RigorousUlam2D.grid_constants — Function
grid_constants(sys, depth, a) -> (; k, h, var12ρ, area)For the map sys on the grid of depth depth and the uniform noise on [-a, a]²: k = 2^depth cells a side, the side h of a cell (a dyadic fraction, exact), var₁₂(ρ_ξ) = var₁(ρ_ξ) + var₂(ρ_ξ) = 2/a (computed in the paper) rounded upward, and the area of the domain.
RigorousUlam2D.norms_of_powers_columns — Function
norms_of_powers_columns(blockmul!, n, m; η1, eta1A = 0.0, normP = 1.0, u,
block = 64, verbose = false) -> CUpper bounds C[j] ≥ ‖P^j|_{V_h}‖₁, j = 1, …, m, where V_h = {v ∈ ℝⁿ : Σ vᵢ = 0}, for a linear operator P known through a computed product that obeys, column by column,
‖fl(P y) − P y‖₁ ≤ η1 ‖y‖₁ + eta1A, ‖P‖₁ ≤ normP.The bound. For v ∈ V_h and any fixed u ∈ ℝⁿ, v = Σᵢ vᵢ (eᵢ − u) because Σᵢ vᵢ = 0, so P^j v = Σᵢ vᵢ (P^j eᵢ − u) and
‖P^j|_{V_h}‖₁ ≤ maxᵢ ‖P^j eᵢ − u‖₁.No property of P beyond linearity is used; u is a free choice, and near the fixed point of a mixing P it makes the bound decay with j.
The rounding. Each column is iterated in floating point from x₀ = eᵢ, exact; with ε_j ≥ ‖x_j − P^j eᵢ‖₁, ε₀ = 0, and x_{j+1} − P^{j+1} eᵢ = (fl(P x_j) − P x_j) + P (x_j − P^j eᵢ),
ε_{j+1} = η1 ‖x_j‖₁ + eta1A + normP ε_j,so C[j] = maxᵢ (‖x_j − u‖₁ + ε_j), every operation rounded upward.
blockmul!(Y, X) must set every column of Y to the computed product of P with the same column of X (n × b matrices), under the model above; it is called on disjoint blocks of block columns from several threads at once, so it must be thread safe. Cost: n m column products.
With cols, only the columns i ∈ cols are iterated and C[j] is the maximum over them; the entrywise maximum of the results for ranges covering 1:n is the C of the whole run, bit for bit, so a sweep can be split between machines (bench/l1_mixing.jl with COLS, bench/l1_mixing_merge.jl).
RigorousUlam2D.norms_of_powers_sparse — Function
norms_of_powers_sparse(P, m; rigorous = true, u = nothing, block = 64, verbose = false) -> Cnorms_of_powers_columns for an explicit matrix P, taken as the operator itself. With w the largest number of nonzeros in a row or a column of P, an entry of P y is an inner product of at most w terms, so |fl(P y) − P y| ≤ γ_w |P| |y| + (underflow) entrywise [Higham, Accuracy and Stability of Numerical Algorithms, 2nd ed., (3.11)]; whence η1 = γ_w ‖|P|‖₁, eta1A = √n η_A with the underflow term η_A of _eta_stored for w products, and normP = ‖|P|‖₁, all upward. rigorous = false sets η1 = eta1A = 0. u defaults to the power iteration ulam_fixed_point of P.
The L¹ bounds
RigorousUlam2D.ulam_fixed_point — Function
ulam_fixed_point(Amul, n; tol = 1e-14, maxiter = 10_000, v0 = fill(1/n, n)) -> (; v, iterations, diff, converged)Power iteration v ← Amul(v) / Σ Amul(v) from v0 until the ℓ¹ change is below tol. Not a certificate: fixed_point_residual bounds the residual of the result.
RigorousUlam2D.fixed_point_residual — Function
fixed_point_residual(Amul, v, η1, eta1A) -> (; ε1, ε2)ε1 ≥ ‖P_h v − v‖₁ and ε2 ≥ |Σv − 1| for the product Amul(v) = fl(N L̂ v) with the ℓ¹ rounding model ‖fl(N L̂ v) − P_h v‖₁ ≤ η1 ‖v‖₁ + eta1A of noisy_operator: ε1 = Σ_i |fl(Av)_i − v_i| + η1 ‖v‖₁ + eta1A, upward. v ≥ 0 is required, since fixed_point_distance uses ‖v‖₁ = Σv.
RigorousUlam2D.fixed_point_distance — Function
fixed_point_distance(Σgrid, ε1, ε2) -> bound‖f̃ − f_h‖₁ ≤ Σgrid ε1 / (1 − ε2) + ε2 of the file docstring, upward.
RigorousUlam2D.coordinate_variations — Function
coordinate_variations(m, k, h) -> (; var1, var2)Upper bounds on var₁(f) and var₂(f), the variations in the directions e₁ and e₂ on the torus of the function f constant on the cells with masses m (grid order, k × k cells of side h, M[iy, ix]): the jump |m_i − m_j| / h² across an edge of length h, summed over the k² edges normal to e₁ (between horizontal neighbours) for var₁ and over those normal to e₂ for var₂, every operation upward. var₁₂(f) = var₁(f) + var₂(f) is what Theorem C (item 1) uses; the isotropic variation Var(f) is not computed here.
RigorousUlam2D.x_marginal — Function
x_marginal(m, k, h) -> Vector{Float64}The density of the first marginal of the function constant on the cells with masses m (grid order, k × k cells of side h, M[iy, ix]): entry ix is the mass of column ix divided by its width h. Integrating out y is a contraction of L¹, so a bound on ‖f − f̃‖₁ bounds the L¹ distance of the marginals. The sums are in floating point: a value for display, not a bound.
RigorousUlam2D.sigma_from_norms — Function
sigma_from_norms(C) -> (; grid, V, k, α)Σ_{i<k} min(1, C_i) / (1 − α), α = C_k, C_0 = 1, over the k with C_k < 1, at the k giving the smallest value (grid), and V = 1 + grid, for bounds C[i] ≥ ‖P_h^i|_{V_h}‖₁, i = 1, …, length(C): on V_h, Σ_{j ≥ 0} P_h^j = Σ_{m ≥ 0} P_h^{mk} Σ_{i < k} P_h^i and ‖P_h^{mk}|_{V_h}‖ ≤ αᵐ, and C_i ≤ 1 may be used for every i since P_h is a Markov operator; see the file docstring. Upward.
RigorousUlam2D.defect_apriori — Function
defect_apriori(h, var12ρ) -> bound‖(L_ξ − P_h) f_ξ‖₁ ≤ 3θ_h = (3h/2) var₁₂(ρ_ξ) on the grid of squares of side h, with var₁₂(ρ_ξ) = var₁(ρ_ξ) + var₂(ρ_ξ); see the file docstring. Upward.
RigorousUlam2D.coarse_fine_norms — Function
coarse_fine_norms(C, h, var12ρ; first = 1.0) -> FBounds F_k ≥ ‖Λ^k|_V‖_{L¹}, k = 1, …, length(C) + 1, for Λ = σ N_ξ σ L_T σ with σ the Ulam projection of any dyadic refinement of the grid of squares of side h, or the identity (Λ = L_ξ), from bounds C_k ≥ ‖P_h^k|_{V_h}‖₁ for the coarse P_h = π_h N_ξ π_h L_T π_h (norms_of_powers_columns; they bound ‖P_h^k|_V‖₁ as well, P_h ending with π_h). It is the coarse-fine recursion of the paper, with the two constants kept apart, as norms_of_powers_recursive_noise(θ₁, θ₂, C) of RigorousInvariantMeasures, with θ₁ ≥ ‖(I − π_h) N_ξ‖₁ and θ₂ ≥ ‖N_ξ (I − π_h)‖₁ both θ_h = (h/2) var₁₂(ρ_ξ), rounded upward. first ≥ ‖Λ‖ on V is the F_1 of the recursion; 1 for a Markov operator.
RigorousUlam2D.swapped_error — Function
swapped_error(Σ, h, var12ρ, ε1, ε2) -> bound‖f_ξ − f̃‖₁ for a computed f̃ ≥ 0 that is constant on the cells of the grid of squares of side h of P_h, with ε1 ≥ ‖P_h f̃ − f̃‖₁, ε2 ≥ |Σf̃ − 1| (fixed_point_residual) and Σ ≥ ‖(I − L_ξ)⁻¹|_V‖₁ (sigma_from_norms of coarse_fine_norms, which bound the powers of L_ξ itself). With u = f̃/Σf̃, u − f_ξ ∈ V and
(I − L_ξ)(u − f_ξ) = (u − P_h u) + (P_h − L_ξ) u;in L_ξ − P_h = (I − π_h) N_ξ L + π_h N_ξ (I − π_h) L + π_h N_ξ π_h L (I − π_h) the last term vanishes on u, which π_h fixes, and the other two are at most θ_h each (‖u‖₁ = 1; file docstring). Hence, as in the paper's L¹ error bound with θ₁ = θ₂ = θ_h,
‖u − f_ξ‖₁ ≤ Σ (h var₁₂(ρ_ξ) + ε1/(1 − ε2)), ‖f̃ − u‖₁ = |Σf̃ − 1| ≤ ε2,and the bound is their sum, rounded upward; against 3Σθ_h of the direct route it spends 2θ_h.
Records, archival copies and the deposit
RigorousUlam2D.block_file — Function
block_file(dir, map, depth; level = 14, bisect = 30, xinv = true, d1 = 12, host = gethostname())The block L_lo, U written by bench/tree_deepen.jl for map at depth: dir/tree_deepen.<map>_d<depth>_level<level>_area<bisect>[_xinv]_t<d1>.<host>.jls.
RigorousUlam2D.record_file — Function
record_file(dir, prefix, mod; host = gethostname()) -> pathdir/<prefix>.<commit>.<host>.tsv, <commit> the short hash of the package mod: the name under which a driver writes a record of CertifiedRecords and under which latest_record finds it.
RigorousUlam2D.file_sha256 — Function
file_sha256(path) -> StringThe SHA-256 of a file's bytes, in hexadecimal: written in the header of a record so that the parts of a split run can be checked to have read the same input.
RigorousUlam2D.record_column_sweep — Function
record_column_sweep(powers, summary, map, depth, a, C, header, environment, seconds; h, var12ρ, n)What bench/l1_mixing.jl and bench/l1_mixing_merge.jl record of a whole column sweep: the bounds C[j] ≥ ‖P_h^j|_{V_h}‖₁, refined by submultiplicativity, in the record powers (columns j, C, C_refined, bits, exact doubles), and one row of the record summary: sigma_from_norms of the refined bounds, the a priori defect (3h/2) var₁₂(ρ_ξ) (defect_apriori) and Σ_V times it. The two paths are the driver's, named by record_file when the run starts, and header is the run_header of that start: a commit read at the end of a long run would name whatever the checkout had moved to meanwhile. Returns the sigma_from_norms result, or nothing when no bound is below 1.
RigorousUlam2D.write_density_hdf5 — Function
write_density_hdf5(path, record; source = "", domain) -> pathWrite the computed density of a stationary_density record (the named tuple stored by bench/stationary_density.jl, with fields map, depth, a, density, header) to the HDF5 file path: the dataset masses, the vector record.density unchanged (Float64, length 4^depth), and the attributes map, depth, half_width (the noise half-width as the string "p/q"), half_width_numerator, half_width_denominator, domain ([xmin, xmax, ymin, ymax]), ordering (DENSITY_HDF5_ORDERING), source (the name of the record file) and header (the header lines of the record, which name the driver, the host and the commit). Requires using HDF5. Refuses to overwrite an existing file.
RigorousUlam2D.DENSITY_HDF5_ORDERING — Constant
The ordering of the cell masses, written into every archival file as an attribute.
RigorousUlam2D.write_block_hdf5 — Function
write_block_hdf5(path, block, field; perm, source = "", deflate = 6) -> pathWrite one matrix of a deterministic block of bench/tree_deepen.jl (the named tuple with fields L_lo and U, L_lo ≤ L ≤ L_lo + U entrywise, indexed as build_uniform_partition), the field field (:L_lo or :U), to the HDF5 file path, permuted to grid order by perm (grid_order of the map's domain at the block's depth): the matrix written is block[field][perm, perm], the one noisy_ulam_operator multiplies by, with its entries unchanged. It is stored as the datasets colptr, rowval (Int64) and nzval (Float64), chunked and compressed with HDF5's shuffle and deflate filters at level deflate, which every HDF5 library reads; the attributes are matrix (the field), size, nnz, format (BLOCK_HDF5_FORMAT), enclosure, source (the name of the block file), and the block's map, depth, store_level, store_maxlevel, tag, levels, d0, d1, host, script, julia, threads, commits, header and environment, those it has, as strings or integers. Requires using HDF5. Refuses to overwrite an existing file.
RigorousUlam2D.BLOCK_HDF5_FORMAT — Constant
The layout of a sparse matrix in an archival block file, written into every such file as an attribute.
RigorousUlam2D.BLOCK_HDF5_SCRIPT — Constant
The script name that paper/blocks_hdf5.jl writes its files under: <script>.<block>.<L_lo|U>.<commit>.<host>.h5.
RigorousUlam2D.DATAVERSE_FILE_LIMIT — Constant
The largest file, in bytes, that Harvard Dataverse accepts by upload: 2.5 GiB.
RigorousUlam2D.deposit_plan — Function
deposit_plan(sources; data, images, blocks = :none, maxsize = DATAVERSE_FILE_LIMIT)
-> (; commit, host, rows, files, excluded, fine)The files a deposit of the results named by sources holds, where sources is the path of a figures.sources.<commit>.<host>.txt written by paper/figures.jl, data the directory of the records and images that of the figures. Each entry of files is (; path, directory, description), directory the folder of the deposit it goes in:
densities: for every row of the sources file (one row of the table of bounds), the density recordstationary_density.*.jlsand its HDF5 copy, the files the sources file gives a SHA-256 for;records: every record the sources file lists, the record of norms of powers (powers) of every row, and the record each of these names in the header fieldu(authat is not a record, but the density file a run read, goes todensities);environments: everyManifest.tomlcopy that a record names in its columnenvironment;figures: the sources file and every file ofimageswritten by the same script at the same commit and host (the table and the density figures);matrices, only whenblocksis:coarseor:all: the deterministic block a record of norms of powers names in its header (blockfile =), and with:allalso the block a density row of the stationary-density record names, the one the density of the table was computed from.
Unless blocks = :none, the HDF5 copies of the block a density was computed from go to matrices (with :coarse in place of the block itself), the files blocks_hdf5.<block>.L_lo.*.h5 and blocks_hdf5.<block>.U.*.h5 of data that paper/blocks_hdf5.jl writes (write_block_hdf5), when they exist; an error if there is more than one of either. fine holds the paths of the blocks the densities were computed from.
A file larger than maxsize bytes goes to excluded, as (; path, directory, reason), instead of files, and so does a block that blocks leaves out: the deposit can then name it. An error if a file named is missing, or if a file the sources file gives a SHA-256 for does not have it. rows holds, for each row, the map, the noise half-width and the file names.
RigorousUlam2D.write_manifest — Function
write_manifest(path, files) -> Dict{String,String}Write to path the SHA-256 of every entry of files (as deposit_plan returns them), one line <sha256> <directory>/<name> each, sorted by that name, in the format sha256sum -c reads from the root of the deposit; returns the hashes by <directory>/<name>.
The stages of a run
RigorousUlam2D.run_blocks — Function
run_blocks(map; root, d0 = 4, d1 = 12, store_level = 12, level = 14, bisect = 30, xinv = true,
depths = d0:d1, script = "bench/tree_deepen.jl") -> Vector of paths, or nothingThe enclosures L_lo ≤ L ≤ L_lo + U of the Ulam matrices of the map map (ulam_system) on the uniform grids of the depths depths, read off an UlamTree: the tree is refined on disk to the depth store_level (its subtrees in root/bulk/tree_deepen.<map>_d<d0>-<d1>.store.<host>/, resumed if the run is repeated), then read at the depth level by ulam_matrices, which quadrisects the uncertain cells in memory and integrates the uncertain leaves through the map's fibred_area (bisect bisections, the cut at the inverse of the x-only component when xinv). Images are enclosed by the natural interval extension (zeroth_order_enclosure).
Writes, for each depth whose block is not already there, the block block_file(root/data, map, d; level, bisect, xinv, d1), a named tuple (map, depth, store_level, store_maxlevel, tag, levels, d0, d1, graph, L_lo, U, host, script, commits, header, environment, julia, threads, time) with the matrices indexed as build_uniform_partition(domain, d), and a row of the record root/data/tree_deepen.<commit>.<host>.tsv with the counts and the widths of U as floating-point diagnostics (not bounds), read_seconds and the wall clock seconds. Refuses to run when this package has uncommitted changes in src, bench or the project files.
RigorousUlam2D.run_stationary_density — Function
run_stationary_density(map, depth, a; datadir, tol = 1e-14, maxiter = 20_000,
script = "bench/stationary_density.jl", blockfile = block_file(datadir, map, depth))
-> (; P, fp, res, cv, defect, record, density_file), or nothingThe computed stationary density of the noisy Ulam operator P_h = π N_ξ π L π of the map map at the depth depth and the noise half-width a (noisy_ulam_operator of the block of run_blocks on this host, or the file blockfile), with its a posteriori quantities: the density f̃ is the power iteration ulam_fixed_point on the masses; ε₁ ≥ ‖P_h f̃ − f̃‖₁ and ε₂ ≥ |Σ f̃ − 1| (fixed_point_residual, with the ℓ¹ rounding model η₁ of noisy_operator, which covers the rounding of the products and the enclosure of L); var₁(f̃), var₂(f̃) (coordinate_variations); and the a priori defect 3θ_h = (3h/2) var₁₂(ρ_ξ) ≥ ‖(L_ξ − P_h) f_ξ‖₁ (defect_apriori).
Writes the density (cell masses, grid order) to datadir/stationary_density.<map>_d<depth>_a<p>-<q>.<commit>.<host>.jls and a row of datadir/stationary_density.<commit>.<host>.tsv, the bounds as exact doubles.
RigorousUlam2D.run_column_sweep — Function
run_column_sweep(map, depth, a; datadir, M = 150, block = 8, cols = nothing,
script = "bench/l1_mixing.jl", blockfile = block_file(datadir, map, depth)) -> (; C, sigma, n, h, var12ρ, record), or nothingThe ℓ¹ norms of the powers of the noisy Ulam operator P_h on the zero-sum vectors V_h, by columns (norms_of_powers_columns): C_j ≥ ‖P_h^j|_{V_h}‖₁ for j ≤ M, the maximum over the cells i of ‖P_h^j e_i − u‖₁ plus the propagated rounding, every column iterated in floating point with the ℓ¹ rounding model η₁ of noisy_operator and ‖P_h‖₁ ≤ ‖L_lo + U‖₁. The operator is noisy_ulam_operator of the block of run_blocks at this depth on this host, or of the file blockfile. u, a free choice in the bound, is the density of the stationary_density record of the same configuration when there is one, else the power iteration. The bounds are refined by submultiplicativity and recorded by record_column_sweep: datadir/l1_mixing.<map>_d<depth>_a<p>-<q>.<commit>.<host>.tsv (j, C_j, refined C_j, as exact doubles) and a row of datadir/l1_mixing.<commit>.<host>.tsv (Σ_grid, Σ_V = 1 + Σ_grid, and the a priori bound Σ_V · 3θ_h).
With cols (a range) only those columns are iterated and the record is datadir/l1_mixing.<map>_d<depth>_a<p>-<q>_cols<first>-<last>.<commit>.<host>.tsv, the maximum over cols for each j, with the SHA-256 of the block in its header and no summary row; bench/l1_mixing_merge.jl takes the maximum of parts covering all the columns, which is the C of the whole run bit for bit.
RigorousUlam2D.run_transfer — Function
run_transfer(map, depth, a, fine; datadir, script = "bench/l1_transfer.jl") -> Vector of rowsThe L¹ error of the stationary density on the finer grids of the depths fine, from the column sweep of the coarse depth depth. The refined bounds C_k ≥ ‖P_h^k|_{V_h}‖₁ of the latest l1mixing record of this host go through `coarsefinenorms(the paper's coarse-fine recursion, withθ₁ = θ₂ = θh = (h/2) var₁₂(ρξ)of Theorem C) toFk ≥ ‖Λ^k|V‖₁forΛthe noisy Ulam operatorP{h'}of any finer dyadic grid, orLξ;sigmafromnorms(F).gridbounds‖(I − Λ)⁻¹|V‖₁. For each fine depth with a row in the latest stationary_density record (itsε₁,ε₂; the defect is recomputed,defectapriori(h', var₁₂(ρξ))`), as in the paper's L¹ error bound:
‖f_ξ − f_{h'}‖₁ ≤ Σ · 3θ_{h'}, ‖f̃ − f_{h'}‖₁ ≤ fixed_point_distance(Σ, ε₁, ε₂),their sum bounds ‖f_ξ − f̃‖₁, and swapped_error gives Σ (2θ_{h'} + ε₁/(1 − ε₂)) + ε₂. Every operation rounds upward; the inputs are read back exactly. Each fine depth not already in datadir/l1_transfer.<commit>.<host>.tsv gets a row there; the rows written are returned.
RigorousUlam2D.transfer_bounds — Function
transfer_bounds(Σ, g, ε1, ε2) -> (; defect, err_apriori, dist, err, err_swapped)The paper's L¹ error bounds on the grid g = grid_constants(sys, d, a), from Σ ≥ ‖(I − Λ)⁻¹|_V‖₁ (sigma_from_norms of coarse_fine_norms) and the residuals ε₁ ≥ ‖P_h f̃ − f̃‖₁, ε₂ ≥ |Σf̃ − 1| of the computed density on that grid: the defect 3θ_h (defect_apriori), ‖f_ξ − f_h‖₁ ≤ Σ · 3θ_h (err_apriori), ‖f̃ − f_h‖₁ ≤ fixed_point_distance(Σ, ε₁, ε₂) (dist), their sum err ≥ ‖f_ξ − f̃‖₁, and swapped_error(Σ, h, var₁₂(ρ_ξ), ε₁, ε₂) ≥ ‖f_ξ − f̃‖₁; upward.
RigorousUlam2D.PAPER_RECORDS — Constant
PAPER_RECORDSThe records behind Table 1 of the paper, as paper/figures.jl at 2a75ede on ibis read them (figures.sources.2a75ede.ibis.txt): one named tuple (map, a, coarse, density_record, powers_record) per row of the table, coarse the depth of the column sweep and a the noise half-width (ξ = 2a); the bounds are those at depth 12.
RigorousUlam2D.recertify_from_records — Function
recertify_from_records(entry; datadir, fine = 12) -> (; C, C_refined, F, Σ, bounds, ε1, ε2, recorded)The bounds of one row of the table recomputed from the records named by entry (an element of PAPER_RECORDS) in datadir, by one evaluation of each step on the grid the record ended on: the C_j of the column sweep refined by submultiplicativity (refine_norms_of_powers), the coarse-fine recursion to F_k (coarse_fine_norms), Σ = sigma_from_norms(F).grid, and with the residuals ε₁, ε₂ of the density at depth fine the bounds of transfer_bounds. recorded is the C_refined column of the sweep record and the l1transfer row in datadir computed from the same sweep and density record at that depth, the latest one (`latesttransferrows), as strings, for comparison;boundsisnothingwhen noFk` is below 1.
RigorousUlam2D.latest_transfer_rows — Function
latest_transfer_rows(datadir) -> Vector{Dict{String,String}}The rows of every l1transfer record in datadir (all commits and hosts) whose content is on this machine, a row of a later run replacing one of an earlier run with the same `(map, coarsedepth, a, finedepth); a run is dated by the time in the first line of its header (runheader), which, unlike the modification time, the annex does not change. These are the rowspaper/figures.jl` reads: the records of d78ed9d and d0b430a (2026-11-25) hold rows that the recursion as corrected at 07efe52 replaced, and they are not the paper's.