Provedaitherallocationmemory-modelb846d70
Aither: packed state intervals are ordered, disjoint and bounded
For all and :
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
Nat) - List
- List: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
List) - f(x)Function application
- List applied to Nat. Lean writes f x; papers write f(x). (
List Nat) - ∀For all
- The statement after the comma holds for every off, size. (
∀ (off size : Nat), (off, size) ∈ packe…) - (a, b)Tuple
- The ordered pair (or tuple) of off, size. (
(off, size)) - ∈Element of
- (off, size) is a member of packed(base, sizes). (
(off, size) ∈ packed base sizes) - ⟹Implies
- If (off, size) ∈ packed(base, sizes), then base ≤ off ∧ off + size ≤ base + sizes.sum. (Between types, A → B is the type of functions from A to B.) (
(off, size) ∈ packed base sizes → base …) - packed
- packed: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
packed) - ≤At most
- base is less than or equal to off. (
base ≤ off) - ∧And
- Both hold: base ≤ off, and off + size ≤ base + sizes.sum. (
base ≤ off ∧ off + size ≤ base + sizes.…) - +Addition
- off plus size. (
off + size) - e.fsum
- sum of sizes: Lean's dot notation e.sum means sum applied to e. (
sizes.sum) - e.fPairwise
- Pairwise of packed(base, sizes): Lean's dot notation e.Pairwise means Pairwise applied to e. (
(packed base sizes).Pairwise) - x ↦ f(x)Function (λ-abstraction)
- The function sending a, b to a.1 + a.2 ≤ b.1. Lean writes fun x => …; papers write x ↦ …. (
fun a b => a.1 + a.2 ≤ b.1) - p₁Component
- The first component of the pair a. (
a.1)
theorem aither-b846-packed-layout (base : Nat) (sizes : List Nat) :
(∀ (off size : Nat), (off, size) ∈ packed base sizes → base ≤ off ∧ off + size ≤ base + sizes.sum) ∧ (packed base sizes).Pairwise (fun a b => a.1 + a.2 ≤ b.1) ∧ (∀ (capacity off size : Nat), base + sizes.sum ≤ capacity → (off, size) ∈ packed base sizes → off + size ≤ capacity)Abstract nonnegative prefix-sum layout underlying type bases and intra-type offsets. All intervals lie within the summed allocation; list order implies nonoverlap; a capacity bound implies each interval fits. Excludes machine integer overflow and native claim behavior, whose mismatch is proved separately.
How it was proved
- Proved
- 1 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- Classical.choice, Quot.sound, propext
- Proof
- 40 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.