• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Community
    • 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
          • Def-gl-boolean-constraint
          • Gl-mbe
          • Bvec
            • Scdr
            • Bfr-list->s
              • Bfr-eval-list
              • Bfr-scons
              • Bfr-ucons
              • Bfr-list->u
              • Bfr-sterm
              • Bfr-snorm
              • Pbfr-list-depends-on
              • V2i
              • N2v
              • V2n
              • S-endp
              • I2v
              • First/rest/end
              • Bool->sign
            • 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
    • Bvec

    Bfr-list->s

    Signed interpretation of a BFR list under some environment.

    Signature
    (bfr-list->s x env) → *
    Arguments
    x — BFR list to interpret as a signed number.
        Guard (true-listp x).
    env — Environment to evaluate the BFRs under.

    Definitions and Theorems

    Function: bfr-list->s

    (defun bfr-list->s (x env)
      (declare (xargs :guard (true-listp x)))
      (let ((__function__ 'bfr-list->s))
        (declare (ignorable __function__))
        (b* (((mv first rest end)
              (first/rest/end x)))
          (if end (bool->sign (bfr-eval first env))
            (logcons (bool->bit (bfr-eval first env))
                     (bfr-list->s rest env))))))

    Theorem: bfr-list->s-of-list-fix

    (defthm bfr-list->s-of-list-fix
      (equal (bfr-list->s (list-fix x) env)
             (bfr-list->s x env)))

    Theorem: bfr-list->s-when-s-endp

    (defthm bfr-list->s-when-s-endp
      (implies (s-endp x)
               (equal (bfr-list->s x env)
                      (bool->sign (bfr-eval (car x) env))))
      :rule-classes ((:rewrite :backchain-limit-lst 0)))

    Theorem: bfr-list->s-of-scdr

    (defthm bfr-list->s-of-scdr
      (equal (bfr-list->s (scdr x) env)
             (logcdr (bfr-list->s x env))))

    Theorem: logcdr-of-bfr-list->s

    (defthm logcdr-of-bfr-list->s
      (equal (logcdr (bfr-list->s x env))
             (bfr-list->s (scdr x) env)))

    Theorem: logcar-of-bfr-list->s

    (defthm logcar-of-bfr-list->s
      (equal (logcar (bfr-list->s x env))
             (bool->bit (bfr-eval (car x) env))))

    Theorem: bfr-list->s-of-set-non-dep

    (defthm bfr-list->s-of-set-non-dep
      (implies
           (and (not (pbfr-list-depends-on k p x))
                (bfr-eval p env)
                (bfr-eval p (bfr-set-var k v env)))
           (equal (bfr-list->s x
                               (bfr-param-env p (bfr-set-var k v env)))
                  (bfr-list->s x (bfr-param-env p env)))))