• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
      • Apt
      • Zfc
      • Acre
      • Milawa
      • Smtlink
      • Abnf
      • Vwsim
      • Isar
      • Wp-gen
      • Dimacs-reader
      • Pfcs
        • Proof-support
        • Abstract-syntax
        • R1cs-subset
        • Semantics
          • Semantics-deeply-embedded
            • Exec-proof-tree
            • Assertion-list->constr-list
            • Assertion-list->asg-list
            • Eval-expr
            • Eval-expr-list
            • Assertion
            • Assignment-wfp
            • Proof-outcome
            • Proof-list-outcome
            • Assertion-list-from
            • Definition-satp
            • Constraint-satp
            • Assignment
              • Assignmentp
                • Assignment-fix
                • Assignment-equiv
              • System-satp
              • Constraint-list-satp
              • Assertion-list
              • Assignment-list
              • Proof-trees
            • Lifting
            • Semantics-shallowly-embedded
          • Abstract-syntax-operations
          • Indexed-names
          • Well-formedness
          • Concrete-syntax
          • R1cs-bridge
          • Parser-interface
        • Legacy-defrstobj
        • Proof-checker-array
        • Soft
        • C
        • Farray
        • Rp-rewriter
        • Instant-runoff-voting
        • Imp-language
        • 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
    • Assignment

    Assignmentp

    Recognizer for assignment.

    Signature
    (assignmentp x) → *

    Definitions and Theorems

    Function: assignmentp

    (defun assignmentp (x)
      (declare (xargs :guard t))
      (if (atom x)
          (null x)
        (and (consp (car x))
             (stringp (caar x))
             (natp (cdar x))
             (or (null (cdr x))
                 (and (consp (cdr x))
                      (consp (cadr x))
                      (acl2::fast-<< (caar x) (caadr x))
                      (assignmentp (cdr x)))))))

    Theorem: booleanp-of-assignmentp

    (defthm booleanp-of-assignmentp
      (booleanp (assignmentp x)))

    Theorem: mapp-when-assignmentp

    (defthm mapp-when-assignmentp
      (implies (assignmentp x) (omap::mapp x))
      :rule-classes (:rewrite :forward-chaining))

    Theorem: assignmentp-of-tail

    (defthm assignmentp-of-tail
      (implies (assignmentp x)
               (assignmentp (omap::tail x))))

    Theorem: stringp-of-head-key-when-assignmentp

    (defthm stringp-of-head-key-when-assignmentp
      (implies (and (assignmentp x)
                    (not (omap::emptyp x)))
               (stringp (mv-nth 0 (omap::head x)))))

    Theorem: natp-of-head-val-when-assignmentp

    (defthm natp-of-head-val-when-assignmentp
      (implies (and (assignmentp x)
                    (not (omap::emptyp x)))
               (natp (mv-nth 1 (omap::head x)))))

    Theorem: assignmentp-of-update

    (defthm assignmentp-of-update
      (implies (and (assignmentp x)
                    (stringp k)
                    (natp v))
               (assignmentp (omap::update k v x))))

    Theorem: assignmentp-of-update*

    (defthm assignmentp-of-update*
      (implies (and (assignmentp x) (assignmentp y))
               (assignmentp (omap::update* x y))))

    Theorem: assignmentp-of-delete

    (defthm assignmentp-of-delete
      (implies (assignmentp x)
               (assignmentp (omap::delete k x))))

    Theorem: assignmentp-of-delete*

    (defthm assignmentp-of-delete*
      (implies (assignmentp x)
               (assignmentp (omap::delete* k x))))

    Theorem: stringp-when-assoc-assignmentp-binds-free-x

    (defthm stringp-when-assoc-assignmentp-binds-free-x
      (implies (and (omap::assoc k x) (assignmentp x))
               (stringp k)))

    Theorem: stringp-of-car-of-assoc-assignmentp

    (defthm stringp-of-car-of-assoc-assignmentp
      (implies (and (assignmentp x) (omap::assoc k x))
               (stringp (car (omap::assoc k x)))))

    Theorem: natp-of-cdr-of-assoc-assignmentp

    (defthm natp-of-cdr-of-assoc-assignmentp
      (implies (and (assignmentp x) (omap::assoc k x))
               (natp (cdr (omap::assoc k x)))))

    Theorem: natp-of-lookup-when-assignmentp

    (defthm natp-of-lookup-when-assignmentp
      (implies (and (assignmentp x) (omap::assoc k x))
               (natp (omap::lookup k x))))