• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • 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
        • Removable-runes
        • Efficiency
        • Rewrite-bounds
        • Bash
        • Def-dag-measure
        • Bdd
        • Remove-hyps
        • Contextual-rewriting
        • Simp
        • Rewrite$-hyps
        • Bash-term-to-dnf
        • Use-trivial-ancestors-check
        • Minimal-runes
        • Clause-processor-tools
        • Fn-is-body
        • Without-subsumption
        • Rewrite-equiv-hint
        • Def-bounds
        • Rewrite$-context
        • Try-gl-concls
        • Hint-utils
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Math
      • Testing-utilities
    • Bfr

    Bfr-negate

    Signature
    (bfr-negate x &optional (bfrstate 'bfrstate)) → new-x
    Arguments
    x — Guard (bfr-p x).
    bfrstate — Guard (bfrstate-p bfrstate).
    Returns
    new-x — Type (bfr-p new-x).

    Definitions and Theorems

    Function: bfr-negate-fn

    (defun bfr-negate-fn (x bfrstate)
     (declare (xargs :guard (and (bfrstate-p bfrstate) (bfr-p x))))
     (let ((__function__ 'bfr-negate))
      (declare (ignorable __function__))
      (mbe
       :logic
       (b* ((x (bfr-fix x)))
        (bfrstate-case
           :aig (acl2::aig-not x)
           :bdd (acl2::q-not x)
           :aignet
           (aignet-lit->bfr (satlink::lit-negate (bfr->aignet-lit x)))))
       :exec
       (if (booleanp x)
           (not x)
         (bfrstate-case :aig (acl2::aig-not x)
                        :bdd (acl2::q-not x)
                        :aignet (satlink::lit-negate x))))))

    Theorem: bfr-p-of-bfr-negate

    (defthm bfr-p-of-bfr-negate
      (b* ((new-x (bfr-negate-fn x bfrstate)))
        (bfr-p new-x))
      :rule-classes :rewrite)

    Theorem: bfr-negate-of-bfr-fix

    (defthm bfr-negate-of-bfr-fix
      (equal (bfr-negate (bfr-fix x))
             (bfr-negate x)))

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

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

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

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