Finite dyadic addresses #
Finite Boolean paths are convenient for adaptive provenance. Indexed cells are convenient for fixed-depth arithmetic, serialization, and integration. This module provides both views and exact decoding into closed dyadic intervals.
A finite sequence of left (false) and right (true) decisions.
Equations
Instances For
The ordinary binary integer encoded by a path, most-significant bit first.
Equations
Instances For
A finite binary path always denotes an index at its depth.
Decode a path operationally by following exact interval bisections.
Equations
- LeanCert.Core.DyadicPath.decodeByBisection root [] = root
- LeanCert.Core.DyadicPath.decodeByBisection root (bit :: rest) = LeanCert.Core.DyadicPath.decodeByBisection (if bit = true then root.bisect.2 else root.bisect.1) rest
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Cells are equal when their depths and numeric indices agree.
The root cell at depth zero.
Equations
- LeanCert.Core.DyadicCell.root = { depth := 0, index := ⟨0, LeanCert.Core.DyadicCell.root._proof_1⟩ }
Instances For
The left child has index 2k.
Instances For
The right child has index 2k + 1.
Instances For
Convert a path into the corresponding bounded fixed-depth cell.
Equations
- LeanCert.Core.DyadicCell.ofPath path = { depth := List.length path, index := ⟨path.index, ⋯⟩ }
Instances For
Exact width of one cell at this depth.
Instances For
Decode an indexed cell directly from its affine endpoint formula.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The exact step at any depth is nonnegative.
Prepare the shared arithmetic for every cell at one subdivision depth.
Equations
Instances For
Number of cells at the prepared level.
Instances For
Random-access decoding using the shared precomputed cell width.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Prepared random access agrees with the original direct decoder.
Materialize a complete fixed-depth level by advancing adjacent endpoints.
Equations
- level.materialize = LeanCert.Core.DyadicCell.PreparedDyadicLevel.materializeFrom✝ level level.cellCount level.root.lo
Instances For
Direct decoding gives every depth-n cell the root width divided by 2^n.
Directly decoding the left child agrees semantically with bisecting the parent.
Directly decoding the right child agrees semantically with bisecting the parent.
Recursive bisection and direct affine decoding agree at every finite address.
Closed proof semantics and canonical ownership #
The closed proof cell at a fixed level. This is the interval supplied to certified numerical evaluation.
Equations
- LeanCert.Core.DyadicCell.Ownership.closedCell root depth index = (LeanCert.Core.DyadicCell.PreparedDyadicLevel.prepare root depth).intervalAt index
Instances For
Canonical ownership assigns a point to the greatest-index closed cell that
contains it. Thus an interior seam belongs to the cell on its right, matching
the half-open convention [lo, hi), while the final cell retains the root's
right endpoint.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The set canonically owned by one fixed-depth cell.
Equations
- LeanCert.Core.DyadicCell.Ownership.ownerSet root depth index = {x : ℝ | LeanCert.Core.DyadicCell.Ownership.Owns root depth index x}
Instances For
Canonical ownership never enlarges the closed proof cell.
Distinct cells cannot canonically own the same point.
A point contained in a higher-index cell cannot be owned by a lower cell. This is the abstract seam-welding rule.
Any point in the final closed cell is owned by that cell. In particular, the root's right endpoint remains owned rather than being discarded.
Every point of the root lies in at least one fixed-depth closed proof cell.
Canonical ownership covers the entire root interval.