• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Pfcs
      • Wp-gen
      • Dimacs-reader
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
      • Sidekick
      • Leftist-trees
      • Java
      • Taspi
      • Riscv
        • Specification
        • Executable
          • Decoding-left-inverse
          • Decoding-executable
          • Decoding-right-inverse
          • Execution-executable
            • Stepnx
              • Stepx
            • Decoding-correct
          • Specialized
        • Bitcoin
        • Des
        • Ethereum
        • X86isa
        • Sha-2
        • Yul
        • Zcash
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Poseidon
        • Where-do-i-place-my-book
        • Axe
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Community
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Execution-executable

    Stepnx

    Executable multi-step execution function.

    This is obtained from stepn via apt::simplify, passing step-is-stepx to propagate it. The result is the same as stepn, but with a call of stepx instead of step. The generated theorem that unconditionally rewrites stepn to stepnx is stepn-to-stepnx.

    We manually propagate the fixing and state validity preservation theorems that accompany stepn to stepnx.

    Definitions and Theorems

    Function: stepnx

    (defun stepnx (n stat feat)
      (declare (xargs :guard (and (natp n)
                                  (statp stat)
                                  (featp feat)
                                  (stat-validp stat feat))))
      (cond ((zp n) (stat-fix stat))
            ((errorp stat feat) (stat-fix stat))
            (t (stepnx (1- n)
                       (stepx stat feat)
                       feat))))

    Theorem: stepn-is-stepnx

    (defthm stepn-is-stepnx
      (equal (stepn n stat feat)
             (stepnx n stat feat)))

    Theorem: stepnx-of-nfix-n

    (defthm stepnx-of-nfix-n
      (equal (stepnx (nfix n) stat feat)
             (stepnx n stat feat)))

    Theorem: stepnx-nat-equiv-congruence-on-n

    (defthm stepnx-nat-equiv-congruence-on-n
      (implies (acl2::nat-equiv n n-equiv)
               (equal (stepnx n stat feat)
                      (stepnx n-equiv stat feat)))
      :rule-classes :congruence)

    Theorem: stepnx-of-stat-fix-stat

    (defthm stepnx-of-stat-fix-stat
      (equal (stepnx n (stat-fix stat) feat)
             (stepnx n stat feat)))

    Theorem: stepnx-stat-equiv-congruence-on-stat

    (defthm stepnx-stat-equiv-congruence-on-stat
      (implies (stat-equiv stat stat-equiv)
               (equal (stepnx n stat feat)
                      (stepnx n stat-equiv feat)))
      :rule-classes :congruence)

    Theorem: stepnx-of-feat-fix-feat

    (defthm stepnx-of-feat-fix-feat
      (equal (stepnx n stat (feat-fix feat))
             (stepnx n stat feat)))

    Theorem: stepnx-feat-equiv-congruence-on-feat

    (defthm stepnx-feat-equiv-congruence-on-feat
      (implies (feat-equiv feat feat-equiv)
               (equal (stepnx n stat feat)
                      (stepnx n stat feat-equiv)))
      :rule-classes :congruence)

    Theorem: stat-validp-of-stepnx

    (defthm stat-validp-of-stepnx
      (implies (stat-validp stat feat)
               (stat-validp (stepnx n stat feat)
                            feat)))