• 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-set-var

    Set the nth BFR variable to some value in an AIG/BDD environment.

    Signature
    (bfr-set-var n val env &optional (logicman 'logicman)) → *
    Arguments
    n — Guard (natp n).

    Definitions and Theorems

    Function: bfr-set-var-fn

    (defun bfr-set-var-fn (n val env logicman)
     (declare (xargs :stobjs (logicman)))
     (declare (xargs :guard (natp n)))
     (let ((__function__ 'bfr-set-var))
      (declare (ignorable __function__))
      (lbfr-case
          :bdd
          (with-guard-checking nil
                               (ec-call (update-nth n (and val t) env)))
          :aig (hons-acons (lnfix n) (and val t) env)
          :aignet (hons-acons (lnfix n)
                              (and val t)
                              env))))

    Theorem: bfr-lookup-bfr-set-var

    (defthm bfr-lookup-bfr-set-var
      (equal (bfr-lookup n (bfr-set-var m val env))
             (if (equal (nfix n) (nfix m))
                 (and val t)
               (bfr-lookup n env))))

    Theorem: bfr-set-var-of-logicman-extension

    (defthm bfr-set-var-of-logicman-extension
      (implies (bind-logicman-extension new old)
               (equal (bfr-set-var n val env new)
                      (bfr-set-var n val env old))))

    Theorem: bfr-set-var-fn-of-nfix-n

    (defthm bfr-set-var-fn-of-nfix-n
      (equal (bfr-set-var-fn (nfix n)
                             val env logicman)
             (bfr-set-var-fn n val env logicman)))

    Theorem: bfr-set-var-fn-nat-equiv-congruence-on-n

    (defthm bfr-set-var-fn-nat-equiv-congruence-on-n
      (implies (acl2::nat-equiv n n-equiv)
               (equal (bfr-set-var-fn n val env logicman)
                      (bfr-set-var-fn n-equiv val env logicman)))
      :rule-classes :congruence)