• 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
          • 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-scons

    Like logcons for signed bvecs.

    Signature
    (bfr-scons b v) → s
    Arguments
    v — Guard (true-listp v).
    Returns
    s — Type (true-listp s).

    Definitions and Theorems

    Function: bfr-scons

    (defun bfr-scons (b v)
      (declare (xargs :guard (true-listp v)))
      (let ((__function__ 'bfr-scons))
        (declare (ignorable __function__))
        (if (atom v)
            (if b (list b nil) '(nil))
          (if (and (atom (cdr v))
                   (hons-equal (car v) b))
              (llist-fix v)
            (cons b (llist-fix v))))))

    Theorem: true-listp-of-bfr-scons

    (defthm true-listp-of-bfr-scons
      (b* ((s (bfr-scons b v)))
        (true-listp s))
      :rule-classes :type-prescription)

    Theorem: scdr-of-bfr-scons

    (defthm scdr-of-bfr-scons
      (equal (scdr (bfr-scons b v))
             (bfr-snorm v)))

    Theorem: s-endp-of-bfr-scons

    (defthm s-endp-of-bfr-scons
      (equal (s-endp (bfr-scons b v))
             (and (s-endp v) (hqual b (car v)))))

    Theorem: car-of-bfr-scons

    (defthm car-of-bfr-scons
      (equal (car (bfr-scons b v)) b))

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

    (defthm bfr-list->s-of-bfr-scons
      (equal (bfr-list->s (bfr-scons b x) env)
             (logcons (bool->bit (bfr-eval b env))
                      (bfr-list->s x env))))

    Theorem: pbfr-list-depends-on-of-scons

    (defthm pbfr-list-depends-on-of-scons
      (implies (and (not (pbfr-depends-on k p b))
                    (not (pbfr-list-depends-on k p x)))
               (not (pbfr-list-depends-on k p (bfr-scons b x)))))

    Theorem: bfr-scons-of-list-fix

    (defthm bfr-scons-of-list-fix
      (equal (bfr-scons b (list-fix v))
             (bfr-scons b v)))