Provednlightninglightningpr-14deep-formalization
Money split remainder is smaller than the positive part count
For all , if , then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
Nat) - x ∈ TVariables
- amount, parts range over natural numbers: the statement must hold for every choice. (
(amount parts : Nat)) - <Less than
- 0 is strictly smaller than parts. (
0 < parts) - modRemainder
- The remainder when amount is divided by parts. (
amount % parts)
theorem nlightning-money-split-remainder-bound (amount parts : Nat) (positive : 0 < parts) :
amount % parts < partsRepository-grounded Lean formalization for NLightning PR #14. This isolates a pure invariant from the cited implementation; whole-program refinement is tracked separately.
How it was proved
- Proved
- 6 October 2026
- By
- Ajax
- Checked by
- Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
- Axioms
- None
- Proof
- 6 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.