• 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
              • Bfr-ite-fn
              • 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-ite

    Bfr-ite-fn

    Signature
    (bfr-ite-fn x y z) → bfr

    Definitions and Theorems

    Function: bfr-ite-fn

    (defun bfr-ite-fn (x y z)
      (declare (xargs :guard t))
      (let ((__function__ 'bfr-ite-fn))
        (declare (ignorable __function__))
        (mbe :logic
             (bfr-case :bdd (acl2::q-ite x y z)
                       :aig (cond ((eq x t) y)
                                  ((eq x nil) z)
                                  (t (acl2::aig-ite x y z))))
             :exec
             (if (booleanp x)
                 (if x y z)
               (bfr-case :bdd (acl2::q-ite x y z)
                         :aig (acl2::aig-ite x y z))))))

    Theorem: bfr-eval-bfr-ite-fn

    (defthm bfr-eval-bfr-ite-fn
      (equal (bfr-eval (bfr-ite-fn x y z) env)
             (if (bfr-eval x env)
                 (bfr-eval y env)
               (bfr-eval z env))))

    Theorem: bfr-ite-fn-bools

    (defthm bfr-ite-fn-bools
      (and (equal (bfr-ite-fn t y z) y)
           (equal (bfr-ite-fn nil y z) z)))

    Theorem: bfr-equiv-implies-bfr-equiv-bfr-ite-fn-1

    (defthm bfr-equiv-implies-bfr-equiv-bfr-ite-fn-1
      (implies (bfr-equiv x x-equiv)
               (bfr-equiv (bfr-ite-fn x y z)
                          (bfr-ite-fn x-equiv y z)))
      :rule-classes (:congruence))

    Theorem: bfr-equiv-implies-bfr-equiv-bfr-ite-fn-2

    (defthm bfr-equiv-implies-bfr-equiv-bfr-ite-fn-2
      (implies (bfr-equiv y y-equiv)
               (bfr-equiv (bfr-ite-fn x y z)
                          (bfr-ite-fn x y-equiv z)))
      :rule-classes (:congruence))

    Theorem: bfr-equiv-implies-bfr-equiv-bfr-ite-fn-3

    (defthm bfr-equiv-implies-bfr-equiv-bfr-ite-fn-3
      (implies (bfr-equiv z z-equiv)
               (bfr-equiv (bfr-ite-fn x y z)
                          (bfr-ite-fn x y z-equiv)))
      :rule-classes (:congruence))