• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • Proof-checker-array
      • Soft
      • C
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
        • Semantics
          • Step
          • Write-var
          • Outcome
          • Beval
          • Read-var
          • Config
          • Terminatingp
            • Aeval
            • Step*
            • Stepn
            • Env
          • Abstract-syntax
          • Interpreter
        • Sidekick
        • Leftist-trees
        • Java
        • Taspi
        • Bitcoin
        • Riscv
        • 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
        • Bigmems
        • Builtins
        • Execloader
        • Aleo
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Semantics

    Terminatingp

    Check if a configuration is terminating.

    If we try to exhaustively apply the step function to an initial configuration, either we will reach a final configuration with no commands, or we will keep stepping forever. This function recognizes which situation we are in: it is a property of the initial configuration.

    This function is not executable. It uses an (unbounded) existential quantifier. The configuration is terminating if there is a number of steps after which the final configuration has no commands.

    Definitions and Theorems

    Theorem: terminatingp-suff

    (defthm terminatingp-suff
      (implies (and (natp n)
                    (not (consp (config->comms (stepn cfg n)))))
               (terminatingp cfg)))

    Theorem: booleanp-of-terminatingp

    (defthm booleanp-of-terminatingp
      (b* ((yes/no (terminatingp cfg)))
        (booleanp yes/no))
      :rule-classes :rewrite)

    Theorem: terminatingp-of-config-fix-cfg

    (defthm terminatingp-of-config-fix-cfg
      (equal (terminatingp (config-fix cfg))
             (terminatingp cfg)))

    Theorem: terminatingp-config-equiv-congruence-on-cfg

    (defthm terminatingp-config-equiv-congruence-on-cfg
      (implies (config-equiv cfg cfg-equiv)
               (equal (terminatingp cfg)
                      (terminatingp cfg-equiv)))
      :rule-classes :congruence)

    Theorem: natp-of-terminatingp-witness

    (defthm natp-of-terminatingp-witness
      (implies (terminatingp cfg)
               (natp (terminatingp-witness cfg)))
      :rule-classes :type-prescription)