AFTD Auto-Formalizing Theoretical Domains

Cslib.URM.Instr.shiftJumps

defimported Lean

Shift all jump targets in an instruction by offset. Used when concatenating programs to maintain correct jump destinations.

Statement

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
@[scoped grind =]
def Cslib.URM.Instr.shiftJumps (offset : ℕ) : Instr → Instr
Defined in
CSLib, `Cslib.URM.Instr.shiftJumps`
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
none listed
Built on 1
  • Cslib.URM.InstrURM instructions. - Z n: Set register n to zero - S n: Increment register n by one - T m n: Transfer (copy) the contents of register…
Used by 3

Lean source view module on GitHub

set_option autoImplicit true in
set_option relaxedAutoImplicit true in
/-- Shift all jump targets in an instruction by `offset`. Used when concatenating programs to maintain correct jump destinations. -/
@[scoped grind =]
def Cslib.URM.Instr.shiftJumps (offset : ℕ) : Instr → Instr
  | Z n => Z n
  | S n => S n
  | T m n => T m n
  | J m n q => J m n (q + offset)
See it in the graphDiscuss this resultChallenge it