Cslib.URM.Regs.write
defimported Lean
Write value v to register n.
Statement
set_option autoImplicit true in set_option relaxedAutoImplicit true in @[scoped grind =] def Cslib.URM.Regs.write (σ : Regs) (n : ℕ) (v : ℕ) : Regs
- Defined in
- CSLib, `Cslib.URM.Regs.write`
- 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.Regs.write← Cslib.URM.Regs.write (Cslib/Computability/URM/Defs.lean:117): verbatim
- Verified
- 08 Oct 2026
- Axioms
- none listed
- Built on 1
- Cslib.URM.RegsRegister contents: maps register indices to natural number contents. Uses the functional representation
ℕ → ℕfor efficiency with…
- Cslib.URM.RegsRegister contents: maps register indices to natural number contents. Uses the functional representation
- Used by 9
- Cslib.URM.straight_line_halts_from_regsStraight-line programs halt from any starting registers, not just State.init. Useful for chaining: after running one program, we can run…
- Cslib.URM.Step.of_nonJumpA non-jumping instruction produces a step that increments PC by 1.
- Cslib.URM.Regs.write_read_selfCslib.URM.Regs.write_read_self
- 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.isHalted_iff_normalA state is halted iff it is normal (has no successor) in the reduction system.
- 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.Step.preserves_registerA single step preserves registers not written to by the current instruction. This is a fundamental property of URM execution: each…
- Cslib.URM.Regs.write_read_of_neCslib.URM.Regs.write_read_of_ne
- Cslib.URM.StepSingle-step execution relation for URMs. Each constructor corresponds to one of the four instruction types: -
zero: ExecuteZ n(set…
Lean source view module on GitHub
set_option autoImplicit true in set_option relaxedAutoImplicit true in /-- Write value v to register n. -/ @[scoped grind =] def Cslib.URM.Regs.write (σ : Regs) (n : ℕ) (v : ℕ) : Regs := Function.update σ n v