• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
      • Legacy-defrstobj
      • C
      • Proof-checker-array
      • Soft
      • Farray
      • Rp-rewriter
      • Instant-runoff-voting
      • Imp-language
        • Semantics
        • Abstract-syntax
          • Aexp
          • Bexp
          • Comm
            • Comm-case
            • Comm-if
              • Make-comm-if
              • Comm-if->then
                • Comm-if->else
                • Comm-if->cond
                • Change-comm-if
              • Comm-equiv
              • Comm-while
              • Comm-asg
              • Commp
              • Comm-kind
              • Comm-fix
              • Comm-count
            • Comm-list
            • Command-fixtypes
          • Interpreter
        • Sidekick
        • Ethereum
        • Leftist-trees
        • Java
        • Riscv
        • Taspi
        • Bitcoin
        • Zcash
        • Des
        • X86isa
        • Sha-2
        • Yul
        • Proof-checker-itp13
        • Regex
        • ACL2-programming-language
        • Json
        • Jfkr
        • Equational
        • Cryptography
        • Axe
        • Poseidon
        • Where-do-i-place-my-book
        • Aleo
        • Bigmems
        • Builtins
        • Execloader
        • Solidity
        • Paco
        • Concurrent-programs
        • Bls12-377-curves
      • Debugging
      • Community
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Comm-if

    Comm-if->then

    Get the then field from a comm-if.

    Signature
    (comm-if->then x) → then
    Arguments
    x — Guard (commp x).
    Returns
    then — Type (comm-listp then).

    This is an ordinary field accessor created by fty::defprod.

    Definitions and Theorems

    Function: comm-if->then$inline

    (defun comm-if->then$inline (x)
      (declare (xargs :guard (commp x)))
      (declare (xargs :guard (equal (comm-kind x) :if)))
      (let ((__function__ 'comm-if->then))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (comm-kind x) :if) x)))
               (comm-list-fix (std::da-nth 1 (cdr x))))
             :exec (std::da-nth 1 (cdr x)))))

    Theorem: comm-listp-of-comm-if->then

    (defthm comm-listp-of-comm-if->then
      (b* ((then (comm-if->then$inline x)))
        (comm-listp then))
      :rule-classes :rewrite)

    Theorem: comm-if->then$inline-of-comm-fix-x

    (defthm comm-if->then$inline-of-comm-fix-x
      (equal (comm-if->then$inline (comm-fix x))
             (comm-if->then$inline x)))

    Theorem: comm-if->then$inline-comm-equiv-congruence-on-x

    (defthm comm-if->then$inline-comm-equiv-congruence-on-x
      (implies (comm-equiv x x-equiv)
               (equal (comm-if->then$inline x)
                      (comm-if->then$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: comm-if->then-when-wrong-kind

    (defthm comm-if->then-when-wrong-kind
      (implies (not (equal (comm-kind x) :if))
               (equal (comm-if->then x)
                      (comm-list-fix nil))))