• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
        • Sat-solver-options
        • Config-p
        • Logical-story
        • Dimacs
        • Gather-benchmarks
        • Cnf
          • Litp
            • Lit-negate-cond
            • Lit-negate
            • Make-lit
            • Lit-equiv
            • Lit->var
              • Lit->var^
            • Lit->neg
            • Lit-list
            • Maybe-litp
            • Lit-fix
            • Lit-list-list
          • Varp
          • Env$
          • Eval-formula
          • Max-index-formula
          • Max-index-clause
          • Formula-indices
          • Clause-indices
        • Satlink-extra-hook
        • Sat
      • Truth
      • Ubdds
      • Bdd
      • Faig
      • Bed
      • 4v
    • Projects
    • Debugging
    • Std
    • Proof-automation
    • Macro-libraries
    • ACL2
    • Interfacing-tools
    • Hardware-verification
    • Software-verification
    • Testing-utilities
    • Math
  • Litp

Lit->var

Access the var component of a literal.

Signature
(lit->var lit) → var
Arguments
lit — Guard (litp lit).
Returns
var — Type (varp var).

Definitions and Theorems

Function: lit->var$inline

(defun lit->var$inline (lit)
  (declare (xargs :guard (litp lit)))
  (let ((__function__ 'lit->var))
    (declare (ignorable __function__))
    (ash (the (integer 0 *) (lit-fix lit))
         -1)))

Theorem: varp-of-lit->var

(defthm varp-of-lit->var
  (b* ((var (lit->var$inline lit)))
    (varp var))
  :rule-classes (:rewrite :type-prescription))

Theorem: lit-fix-bound-by-lit->var

(defthm lit-fix-bound-by-lit->var
  (<= (lit-fix x)
      (+ 1 (* 2 (lit->var x))))
  :rule-classes :linear)

Theorem: lit->var$inline-of-lit-fix-lit

(defthm lit->var$inline-of-lit-fix-lit
  (equal (lit->var$inline (lit-fix lit))
         (lit->var$inline lit)))

Theorem: lit->var$inline-lit-equiv-congruence-on-lit

(defthm lit->var$inline-lit-equiv-congruence-on-lit
  (implies (lit-equiv lit lit-equiv)
           (equal (lit->var$inline lit)
                  (lit->var$inline lit-equiv)))
  :rule-classes :congruence)

Subtopics

Lit->var^
Same as lit->var, but with a type declaration that the input is 32 bits unsigned.