• Top
    • Documentation
    • Books
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
        • 4v-sexprs
          • 4v-sexpr-vars
          • 4v-sexpr-eval
          • 4v-sexpr-to-faig
          • 4v-sexpr-restrict-with-rw
          • 4vs-constructors
            • 4vs-not-list
            • 4vs-onehot
            • 4vs-ite*-list-dumb
            • 4vs-and-list-dumb
            • 4vs-not
              • 4vs-and-list
              • 4vs-and-dumb
              • 4vs-and
              • 4vs-zif-dumb
              • 4vs-z
              • 4vs-ite*-dumb
              • 4vs-x
              • 4vs-t
              • 4vs-f
              • 4vs-xor
              • 4vs-or
              • 4vs-iff
              • 4vs-buf
              • 4vs-implies-lists
              • 4vs-xor-lists
              • 4vs-or-lists
              • 4vs-or-list
              • 4vs-implies
              • 4vs-iff-lists
              • 4vs-and-lists
            • 4v-sexpr-compose-with-rw
            • 4v-sexpr-restrict
            • 4v-sexpr-alist-extract
            • 4v-sexpr-compose
            • 4v-nsexpr-p
            • 4v-sexpr-purebool-p
            • 4v-sexpr-<=
            • Sfaig
            • Sexpr-equivs
            • 3v-syntax-sexprp
            • Sexpr-rewriting
            • 4v-sexpr-ind
            • 4v-alist-extract
          • 4v-monotonicity
          • 4v-operations
          • Why-4v-logic
          • 4v-<=
          • 4vp
          • 4vcases
          • 4v-fix
          • 4v-lookup
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • 4vs-constructors

    4vs-not

    (4vs-not a) constructs a 4v-sexpr equivalent to (not a).

    Definitions and Theorems

    Function: 4vs-not

    (defun 4vs-not (a)
      (declare (xargs :guard t))
      (b* (((when (atom a)) (hons-list 'not a))
           (fn (car a))
           (args (cdr a)))
        (case fn
          ((t)
           (if (not args)
               *4vf-sexpr*
             (hons-list 'not a)))
          ((f)
           (if (not args)
               *4vt-sexpr*
             (hons-list 'not a)))
          ((x z)
           (if (not args)
               *4vx-sexpr*
             (hons-list 'not a)))
          (not (if (and (consp args) (not (cdr args)))
                   (4vs-buf (first args))
                 (hons-list 'not a)))
          (buf (if (and (consp args) (not (cdr args)))
                   (hons-list 'not (first args))
                 (hons-list 'not a)))
          (otherwise (hons-list 'not a)))))

    Theorem: 4v-sexpr-eval-of-4vs-not

    (defthm 4v-sexpr-eval-of-4vs-not
      (equal (4v-sexpr-eval (4vs-not a) env)
             (4v-not (4v-sexpr-eval a env))))

    Theorem: 4v-sexpr-vars-of-4vs-not

    (defthm 4v-sexpr-vars-of-4vs-not
      (equal (4v-sexpr-vars (4vs-not a))
             (4v-sexpr-vars a)))