• Top
    • Documentation
    • Books
    • Recursion-and-induction
    • Boolean-reasoning
      • Ipasir
      • Aignet
      • Aig
      • Satlink
      • Truth
        • Index-permute-shrink
        • Permute-stretch
        • Env-mismatch-aux
        • Permute-shrink
        • Permute-polarity
        • Env-permute-polarity
        • Env-permute-shrink
        • Permute-var-down
        • Swap-vars-aux
        • Env-permute-stretch
        • Swap-vars
        • Permute-var-up
        • Negative-cofactor
        • Truth-perm-rev
        • Index-permute-stretch
        • Env-mismatch
        • Truth-perm
        • Swap-polarity
        • Positive-cofactor
        • Index-perm-rev
        • Env-perm-rev
        • Nth-set-bit-pos
        • Index-swap
        • Env-move-var-down
        • Is-xor-with-var
        • Index-perm
        • Env-swap-vars
        • Var
        • Truth-eval
        • Index-move-down
        • Env-update
        • Env-perm
        • Depends-on-witness
        • Env-swap-polarity
        • Var-repetitions
        • Env-move-var-up
        • Index-move-up
        • Depends-on
        • Truth-norm
        • Index-listp
          • Env-diff-index
          • Env-lookup
          • True
          • False
        • Ubdds
        • Bdd
        • Faig
        • Bed
        • 4v
      • Projects
      • Debugging
      • Std
      • Proof-automation
      • Macro-libraries
      • ACL2
      • Interfacing-tools
      • Hardware-verification
      • Software-verification
      • Testing-utilities
      • Math
    • Truth

    Index-listp

    Signature
    (index-listp x numvars) → *
    Arguments
    numvars — Guard (natp numvars).

    Definitions and Theorems

    Function: index-listp

    (defun index-listp (x numvars)
           (declare (xargs :guard (natp numvars)))
           (let ((__function__ 'index-listp))
                (declare (ignorable __function__))
                (if (atom x)
                    (eq x nil)
                    (and (natp (car x))
                         (< (car x) (lnfix numvars))
                         (index-listp (cdr x) numvars)))))

    Theorem: natp-nth-of-index-listp

    (defthm natp-nth-of-index-listp
            (implies (and (index-listp x numvars)
                          (< (nfix n) (len x)))
                     (natp (nth n x))))

    Theorem: nfix-nth-in-index-list-bound

    (defthm nfix-nth-in-index-list-bound
            (implies (and (index-listp x numvars)
                          (posp numvars))
                     (< (nfix (nth n x)) numvars))
            :rule-classes (:rewrite :linear))

    Theorem: nth-in-index-list-bound

    (defthm nth-in-index-list-bound
            (implies (and (index-listp x numvars)
                          (natp numvars)
                          (natp (nth n x)))
                     (< (nth n x) numvars))
            :rule-classes (:rewrite :linear))

    Theorem: nat-listp-when-index-listp

    (defthm nat-listp-when-index-listp
            (implies (index-listp x numvars)
                     (nat-listp x)))

    Theorem: true-listp-when-index-listp

    (defthm true-listp-when-index-listp
            (implies (index-listp x numvars)
                     (true-listp x))
            :rule-classes :forward-chaining)

    Theorem: index-listp-of-nfix-numvars

    (defthm index-listp-of-nfix-numvars
            (equal (index-listp x (nfix numvars))
                   (index-listp x numvars)))

    Theorem: index-listp-nat-equiv-congruence-on-numvars

    (defthm index-listp-nat-equiv-congruence-on-numvars
            (implies (nat-equiv numvars numvars-equiv)
                     (equal (index-listp x numvars)
                            (index-listp x numvars-equiv)))
            :rule-classes :congruence)