Cslib.URM.Instr.capJump
defimported Lean
Cap a jump target to be at most len. Non-jump instructions are unchanged.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in @[scoped grind =] def Cslib.URM.Instr.capJump (len : ℕ) : Instr → Instr
- Defined in
- CSLib, `Cslib.URM.Instr.capJump`
- 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.capJump← Cslib.URM.Instr.capJump (Cslib/Computability/URM/Basic.lean:137): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 3
- 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.Instr.instDecidableIsJumpCslib.URM.Instr.instDecidableIsJump
- Cslib.URM.Instr.instDecidableJumpsBoundedByCslib.URM.Instr.instDecidableJumpsBoundedBy
- Cslib.URM.InstrURM instructions. -
- Used by 13
- Cslib.URM.Program.toStandardForm_lengthtoStandardForm preserves program length.
- Cslib.URM.Instr.capJump_JCslib.URM.Instr.capJump_J
- Cslib.URM.Instr.capJump_SCslib.URM.Instr.capJump_S
- Cslib.URM.Instr.capJump_TCslib.URM.Instr.capJump_T
- Cslib.URM.Step.toStandardFormForward step correspondence: if p steps from s to s', then either: (1) p.toStandardForm steps from s to s' (same step), or (2) s' is…
- Cslib.URM.Step.from_toStandardFormReverse step correspondence: if p.toStandardForm steps from s to s', then either: (1) p steps from s to s' (same step), or (2) s' is…
- Cslib.URM.Program.toStandardForm_isStandardFormtoStandardForm produces a standard form program.
- Cslib.URM.Program.toStandardFormConvert a program to standard form by capping all jump targets at the program length.
- Cslib.URM.Program.toStandardForm_idempotenttoStandardForm is idempotent: applying it twice equals applying it once.
- Cslib.URM.Instr.capJump_idempotentcapJump is idempotent: capping twice is the same as capping once.
- Cslib.URM.Instr.JumpsBoundedBy.capJumpcapJump always produces an instruction with bounded jump.
- Cslib.URM.Instr.capJump_ZCslib.URM.Instr.capJump_Z
- Cslib.URM.Program.getElem?_toStandardFormAccessing an instruction in toStandardForm gives the capJump'd instruction.
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in /-- Cap a jump target to be at most `len`. Non-jump instructions are unchanged. -/ @[scoped grind =] def Cslib.URM.Instr.capJump (len : ℕ) : Instr → Instr | Z n => Z n | S n => S n | T m n => T m n | J m n q => J m n (min q len)