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.Cslib.URM.Instr.shiftJumps← Cslib.URM.Instr.shiftJumps (Cslib/Computability/URM/Defs.lean:80): verbatim
- 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…
- Cslib.URM.InstrURM instructions. -
- Used by 3
- Cslib.URM.Instr.JumpsBoundedBy.shiftJumpsshiftJumps preserves bounded jumps with adjusted bound.
- Cslib.URM.Program.shiftJumpsShift all jump targets in a program by
offset. Used when concatenating programs: the second program's jumps must be adjusted by the… - Cslib.URM.Instr.shiftJumps_of_nonJumpshiftJumps is identity for non-jumping instructions.
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)