• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Proof-automation
      • Gl
        • Term-level-reasoning
        • Glmc
        • Other-resources
        • Optimization
        • Reference
          • Def-gl-thm
          • Shape-specs
          • Symbolic-objects
          • Gl-aside
          • Def-gl-param-thm
          • Symbolic-arithmetic
          • Bfr
            • Pbfr-depends-on
            • Bfr-varname-p
            • Bfr-varname-fix
            • Bfr-to-param-space
            • Bfr-depends-on
            • Aig-var-fix
            • Bfr-reasoning
            • Bfr-andc2
            • Bfr-andc1
            • Bfr-unparam-env
            • Bfr-set-var
              • Bfr-nor
              • Bfr-nand
              • Bfr-mode
              • Bfr-equiv
              • Bfr-xor
              • Bfr-iff
              • Bfr-eval
              • Bfr-param-env
              • Bfr-lookup
              • Bfr-env-equiv
              • Bfr-and
              • Bfr-var
              • Bfr-or
              • Bfr-not
              • Bfr-ite
              • Bdd-mode-or-p-true
              • Aig-mode-or-p-true
              • Bfr-case
            • Def-gl-boolean-constraint
            • Gl-mbe
            • Bvec
            • Flex-bindings
            • Auto-bindings
            • Gl-interp
            • Gl-set-uninterpreted
            • Def-gl-clause-processor
            • Def-glcp-ctrex-rewrite
            • ACL2::always-equal
            • Gl-hint
            • Def-gl-rewrite
            • Def-gl-branch-merge
            • Gl-force-check
            • Gl-concretize
            • Gl-assert
            • Gl-param-thm
            • Gl-simplify-satlink-mode
            • Gl-satlink-mode
            • Gl-bdd-mode
            • Gl-aig-bddify-mode
            • Gl-fraig-satlink-mode
          • Debugging
          • Basic-tutorial
        • Witness-cp
        • Ccg
        • Install-not-normalized
        • Rewrite$
        • Fgl
        • 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) → *
    Arguments
    n — Guard (bfr-varname-p n).

    Definitions and Theorems

    Function: bfr-set-var

    (defun bfr-set-var (n val env)
     (declare (xargs :guard (bfr-varname-p n)))
     (let ((__function__ 'bfr-set-var))
      (declare (ignorable __function__))
      (let ((n (bfr-varname-fix n)))
       (bfr-case
          :bdd
          (with-guard-checking nil
                               (ec-call (update-nth n (and val t) env)))
          :aig (hons-acons 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 (bfr-varname-fix n)
                        (bfr-varname-fix m))
                 (and val t)
               (bfr-lookup n env))))

    Theorem: bfr-varname-equiv-implies-equal-bfr-set-var-1

    (defthm bfr-varname-equiv-implies-equal-bfr-set-var-1
      (implies (bfr-varname-equiv n n-equiv)
               (equal (bfr-set-var n val env)
                      (bfr-set-var n-equiv val env)))
      :rule-classes (:congruence))