• Top
    • Documentation
    • Books
    • Boolean-reasoning
    • Projects
    • Debugging
    • Std
    • Community
    • Proof-automation
      • Gl
      • Witness-cp
      • Ccg
      • Install-not-normalized
      • Rewrite$
      • Fgl
        • Fgl-rewrite-rules
        • Fgl-function-mode
        • Fgl-object
          • Fgl-object-eval
          • Fgl-object-p
          • G-map
          • G-ite
          • G-cons
          • G-concrete
          • G-apply
          • G-integer
            • G-integer->bits
              • Make-g-integer
              • Change-g-integer
            • Fgl-object-equiv
            • G-boolean
            • G-var
            • Fgl-bitvector
            • Fgl-object-kind
            • Summarize-fgl-object
            • Fgl-make-isomorphic
            • Fgl-object-alist
            • Fgl-objectlist
            • Fgl-object-fix
            • Fgl-object-count
          • 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
        • 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
    • G-integer

    G-integer->bits

    Get the bits field from a g-integer.

    Signature
    (g-integer->bits x) → bits
    Arguments
    x — Guard (fgl-object-p x).
    Returns
    bits — Type (true-listp bits).

    This is an ordinary field accessor created by defprod.

    Definitions and Theorems

    Function: g-integer->bits$inline

    (defun g-integer->bits$inline (x)
      (declare (xargs :guard (fgl-object-p x)))
      (declare (xargs :guard (equal (fgl-object-kind x) :g-integer)))
      (let ((__function__ 'g-integer->bits))
        (declare (ignorable __function__))
        (mbe :logic
             (b* ((x (and (equal (fgl-object-kind x) :g-integer)
                          x)))
               (list-fix (cdr x)))
             :exec (cdr x))))

    Theorem: true-listp-of-g-integer->bits

    (defthm true-listp-of-g-integer->bits
      (b* ((bits (g-integer->bits$inline x)))
        (true-listp bits))
      :rule-classes :rewrite)

    Theorem: g-integer->bits$inline-of-fgl-object-fix-x

    (defthm g-integer->bits$inline-of-fgl-object-fix-x
      (equal (g-integer->bits$inline (fgl-object-fix x))
             (g-integer->bits$inline x)))

    Theorem: g-integer->bits$inline-fgl-object-equiv-congruence-on-x

    (defthm g-integer->bits$inline-fgl-object-equiv-congruence-on-x
      (implies (fgl-object-equiv x x-equiv)
               (equal (g-integer->bits$inline x)
                      (g-integer->bits$inline x-equiv)))
      :rule-classes :congruence)

    Theorem: g-integer->bits-when-wrong-kind

    (defthm g-integer->bits-when-wrong-kind
      (implies (not (equal (fgl-object-kind x) :g-integer))
               (equal (g-integer->bits x)
                      (list-fix nil))))