Provedaithercounterexamplenative-stateb846d70
Aither: native pool fallback can exceed capacity and nested calls can lose the outer cursor
What the notation means · or point at any symbol
- +Addition
- 524032 plus 256. (
524032 + 256) - ≤At most
- 524032 + 256 is less than or equal to poolSize. (
524032 + 256 ≤ poolSize) - ∧And
- Both hold: 524032 + 256 ≤ poolSize, and claimBase(524032, 256) + 256 > poolSize. (
524032 + 256 ≤ poolSize ∧ claimBase 524…) - poolSize
- poolSize: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
poolSize) - claimBase
- claimBase: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
claimBase) - f(x)Function application
- claimBase applied to 524032, 256. Lean writes f x; papers write f(x). (
claimBase 524032 256) - >Greater than
- claimBase(524032, 256) + 256 is strictly larger than poolSize. (
claimBase 524032 256 + 256 > poolSize) - nestedOuterBase
- nestedOuterBase: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
nestedOuterBase) - =Equality
- nestedOuterBase(1, 1, 1) and 2 are the same. (
nestedOuterBase 1 1 1 = 2) - ≠Not equal
- nestedOuterBase(1, 1, 1) and 0 are different. (
nestedOuterBase 1 1 1 ≠ 0) - ∀For all
- The statement after the comma holds for every idx, n. (
∀ (idx n : Nat), idx + n ≤ overflowSlot…) - NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
Nat) - ⟹Implies
- If idx + n ≤ overflowSlot, then claimBase(idx, n) = idx ∧ nextCursor(idx, n) = idx + n. (Between types, A → B is the type of functions from A to B.) (
idx + n ≤ overflowSlot → claimBase idx …) - overflowSlot
- overflowSlot: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
overflowSlot) - nextCursor
- nextCursor: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
nextCursor)
theorem aither-b846-native-cursor-counterexamples :
(524032 + 256 ≤ poolSize ∧ claimBase 524032 256 + 256 > poolSize) ∧ (nestedOuterBase 1 1 1 = 2 ∧ nestedOuterBase 1 1 1 ≠ 0) ∧ (∀ (idx n : Nat), idx + n ≤ overflowSlot → claimBase idx n = idx ∧ nextCursor idx n = idx + n)Source-mapped natural arithmetic counterexamples: idx524032,size256 fits compiler pool524288 but fallback base524160 makes end524416; inner base1,size1 leaves outer claim at2 rather than0. Also proves correct nonfallback branch under idx+n<=OverflowSlot. Independent C witnesses reproduced both patterns at -O0/-O2. Not an end-to-end Aither binary test or proof of arbitrary memory safety.
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
- Quot.sound, propext
- Proof
- 18 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.