Theoremiter_sound
Statement
theorem iter_sound (n : Nat) (r : Nat → Nat → Bool) (i : Nat) : ∀ (k : Nat) (s : List Nat),
(∀ j ∈ s, Plus n r i j) → ∀ j ∈ iter n r k s, Plus n r i j
| 0, _, h => h
| k + 1, s, h => by
unfold iter
split
· exact h
· apply iter_sound n r i k
intro j hj
obtain ⟨hjn, hj | ⟨m, hm, hr⟩⟩Proof
mem_grow.mp hj
· exact h j hj
· have hp := h m hm
exact .trans hp (.step hp.lt.2 hjn hr)Proved by a term, which Lean's kernel checks directly.
Theorems it uses
Used by
In StandardElmMech/Src/Graph.lean: Reachability on graphs over 0 .. n-1 (Plus, Reach) and its decider, proved correct (plusB_iff, reachB_iff).
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.