• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
    • ACL2
    • Macro-libraries
    • Interfacing-tools
    • Hardware-verification
      • Gl
      • Esim
      • Vl2014
      • Sv
      • Fgl
        • Fgl-rewrite-rules
        • Fgl-function-mode
        • Fgl-object
        • Fgl-solving
        • Fgl-handling-if-then-elses
        • Fgl-getting-bits-from-objects
        • Fgl-primitive-and-meta-rules
        • Fgl-counterexamples
        • Fgl-interpreter-overview
        • Fgl-correctness-of-binding-free-variables
        • Fgl-debugging
        • Fgl-testbenches
        • Def-fgl-boolean-constraint
        • Fgl-stack
        • Fgl-rewrite-tracing
        • Def-fgl-param-thm
        • Def-fgl-thm
        • Fgl-fast-alist-support
        • Fgl-array-support
        • Advanced-equivalence-checking-with-fgl
        • Fgl-fty-support
        • Fgl-internals
          • Symbolic-arithmetic
          • Bfr
            • Bfr-eval
            • Bfrstate
            • Bfr->aignet-lit
            • Bfr-p
              • Bounded-lit-fix
              • Bfr-list-fix
              • Aignet-lit->bfr
              • Variable-g-bindings
              • Bfr-listp$
              • Bfrstate>=
              • Bfr-listp-witness
              • Fgl-object-bindings-bfrlist
              • Bfr-set-var
              • Bfr-negate
              • Bfr-fix
              • Fgl-bfr-object-bindings-p
              • Bfr-mode
              • Bfr-mode-is
              • Lbfr-case
              • Bfrstate-case
              • Bfrstate-mode-is
              • Lbfr-mode-is
              • Bfr-mode-p
            • Fgl-interpreter-state
        • Vwsim
        • Vl
        • X86isa
        • Svl
        • Rtl
      • Software-verification
      • Math
      • Testing-utilities
    • Bfr

    Bfr-p

    Recognizer for valid Boolean Function Representation (bfr) objects.

    Signature
    (bfr-p x &optional (bfrstate 'bfrstate)) → *
    Arguments
    bfrstate — Guard (bfrstate-p bfrstate).

    Definitions and Theorems

    Function: bfr-p-fn

    (defun bfr-p-fn (x bfrstate)
      (declare (xargs :guard (bfrstate-p bfrstate)))
      (let ((__function__ 'bfr-p))
        (declare (ignorable __function__))
        (bfrstate-case
             :aig (aig-p x (bfrstate->bound bfrstate))
             :bdd (ubddp x (bfrstate->bound bfrstate))
             :aignet (or (booleanp x)
                         (and (satlink::litp x)
                              (not (eql x 0))
                              (not (eql x 1))
                              (<= (satlink::lit->var x)
                                  (bfrstate->bound bfrstate)))))))

    Theorem: bfr-p-of-constants

    (defthm bfr-p-of-constants
      (and (bfr-p t) (bfr-p nil)))

    Theorem: bfr-p-when-bfrstate>=

    (defthm bfr-p-when-bfrstate>=
      (implies (and (bfrstate>= new old) (bfr-p x old))
               (bfr-p x new)))

    Theorem: bfr-p-in-terms-of-aig-p

    (defthm bfr-p-in-terms-of-aig-p
      (equal (bfr-p x (bfrstate (bfrmode :aig) bound))
             (aig-p x bound)))

    Theorem: bfr-p-in-terms-of-ubddp

    (defthm bfr-p-in-terms-of-ubddp
      (equal (bfr-p x (bfrstate (bfrmode :bdd) bound))
             (ubddp x bound)))

    Theorem: bfr-p-fn-of-bfrstate-fix-bfrstate

    (defthm bfr-p-fn-of-bfrstate-fix-bfrstate
      (equal (bfr-p-fn x (bfrstate-fix bfrstate))
             (bfr-p-fn x bfrstate)))

    Theorem: bfr-p-fn-bfrstate-equiv-congruence-on-bfrstate

    (defthm bfr-p-fn-bfrstate-equiv-congruence-on-bfrstate
      (implies (bfrstate-equiv bfrstate bfrstate-equiv)
               (equal (bfr-p-fn x bfrstate)
                      (bfr-p-fn x bfrstate-equiv)))
      :rule-classes :congruence)