Provednlightninglightningpr-14deep-formalization
Mutual-close weight is monotone in both script lengths
For all , if and , 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
- l₁, l₂, r₁, r₂ range over natural numbers: the statement must hold for every choice. (
(l₁ l₂ r₁ r₂ : Nat)) - ≤At most
- l₁ is less than or equal to l₂. (
l₁ ≤ l₂) - ·Multiplication
- 47 + (9 + l₁) + (9 + r₁) times 4. (
(47 + (9 + l₁) + (9 + r₁)) * 4) - +Addition
- 9 plus l₁. (
9 + l₁)
theorem nlightning-close-weight-monotone (l₁ l₂ r₁ r₂ : Nat) (hl : l₁ ≤ l₂) (hr : r₁ ≤ r₂) :
(47 + (9 + l₁) + (9 + r₁)) * 4 + 224 ≤ (47 + (9 + l₂) + (9 + r₂)) * 4 + 224Repository-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
- Quot.sound, propext
- Proof
- 6 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.