AFTD Auto-Formalizing Theoretical Domains

Cslib.URM.Step.of_nonJump

theoremverifiedformalizationimported Lean

A non-jumping instruction produces a step that increments PC by 1.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
theorem Cslib.URM.Step.of_nonJump {p : Program} {s : State} (hlt : s.pc < p.length)
    (hnonjump : ¬(p[s.pc]'hlt).IsJump) :
    ∃ s', Step p s s' ∧ s'.pc = s.pc + 1
Formalizes
CSLib, `Cslib.URM.Step.of_nonJump`
Lean proof
By Jesse Alama, from github.com/leanprover/cslib at 3951377e5a3f (Copyright (c) 2026 Jesse Alama. All rights reserved, Apache-2.0). Compiled here against leanprover/lean4:v4.33.1, Mathlib v4.33.1; written for leanprover/lean4:v4.33.0.
Verified
08 Oct 2026
Axioms
Classical.choiceQuot.soundpropext
Built on 17
Used by 2

Lean source view module on GitHub

set_option autoImplicit true inset_option relaxedAutoImplicit true in/-- A non-jumping instruction produces a step that increments PC by 1. -/theorem Cslib.URM.Step.of_nonJump {p : Program} {s : State} (hlt : s.pc < p.length)    (hnonjump : ¬(p[s.pc]'hlt).IsJump) :    ∃ s', Step p s s' ∧ s'.pc = s.pc + 1 := by  cases hp : (p[s.pc]'hlt) with  | Z n =>    use {pc := s.pc + 1, regs := s.regs.write n 0}    grind  | S n =>    use { pc := s.pc + 1, regs := s.regs.write n (s.regs.read n + 1) }    grind  | T m n =>    use { pc := s.pc + 1, regs := s.regs.write n (s.regs.read m) }    grind  | J _ _ _ => grind [Instr.IsJump]
See it in the graphDiscuss this resultChallenge it