proofs
Provednlightninglightningpr-14deep-formalization

HTLC deadline activation is upward closed in block height

For all deadline,h1,h2∈N\htmlData{mx=1}{\mathit{deadline}, h_{1}, h_{2} \in \htmlData{mx=0}{\mathbb{N}}}, if deadline≤h1\htmlData{mx=0}{\mathit{deadline}} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{h_{1}} and h1≤h2\htmlData{mx=0}{h_{1}} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{h_{2}}, then

deadline≤h2\htmlData{mx=0}{\mathit{deadline}} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{h_{2}}
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
deadline, h₁, h₂ range over natural numbers: the statement must hold for every choice. ((deadline h₁ h₂ : Nat))
≤At most
deadline is less than or equal to h₁. (deadline ≤ h₁)

Repository-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.

More proved statements

HTLC deadline activation is upward closed in block height · proofs