This file is indexed.

/usr/share/acl2-7.2dfsg/books/meta/pseudo-termp-lemmas.lisp is in acl2-books-source 7.2dfsg-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
; By John Cowles, modified by Matt Kaufmann and Sol Swords

(in-package "ACL2")

(defthm pseudo-term-listp-cdr
  (implies (and (pseudo-termp x)
                (not (equal (car x) 'quote)))
           (pseudo-term-listp (cdr x))))

(defthm pseudo-termp-opener
  (implies (and (consp x)
                (symbolp (car x))
                (not (equal (car x) 'quote)))
           (equal (pseudo-termp x)
                  (pseudo-term-listp (cdr x)))))

(defthm pseudo-term-listp-of-atom
  (implies (not (consp x))
           (equal (pseudo-term-listp x)
                  (equal x nil)))
  :rule-classes ((:rewrite :backchain-limit-lst 0)))

(defthm pseudo-term-listp-of-cons
  (equal (pseudo-term-listp (cons a x))
         (and (pseudo-termp a)
              (pseudo-term-listp x))))

(defthm pseudo-termp-list-cdr
  (implies (pseudo-term-listp x)
           (pseudo-term-listp (cdr x))))

(defthm pseudo-termp-car
  (implies (pseudo-term-listp x)
           (pseudo-termp (car x))))

(defthm pseudo-termp-cadr-from-pseudo-term-listp
  (implies (pseudo-term-listp x)
           (pseudo-termp (cadr x))))

(defthm pseudo-term-listp-append
  (implies (and (pseudo-term-listp x)
                (pseudo-term-listp y))
           (pseudo-term-listp (append x y))))



(defund pseudo-term-substp  (x)
  (declare (xargs :guard t))
  (if (atom x)
      (eq x nil)
    (and (consp (car x))
         (symbolp (caar x))
         (pseudo-termp (cdar x))
         (pseudo-term-substp (cdr x)))))

(local (in-theory (enable pseudo-term-substp)))

(defthm pseudo-termp-of-lookup-in-subst
  (implies (pseudo-term-substp x)
           (pseudo-termp (cdr (assoc k x)))))

(defthm pseudo-term-substp-of-acons
  (equal (pseudo-term-substp (cons (cons k v) x))
         (and (symbolp k)
              (pseudo-termp v)
              (pseudo-term-substp x))))

(defthm pseudo-term-substp-of-atom
  (implies (not (consp x))
           (equal (pseudo-term-substp x)
                  (equal x nil)))
  :rule-classes ((:rewrite :backchain-limit-lst 0)))

(defthm pseudo-term-substp-of-pairlis
  (implies (and (symbol-listp x)
                (pseudo-term-listp y))
           (pseudo-term-substp (pairlis$ x y))))

(defthm pseudo-term-substp-of-append
  (implies (and (pseudo-term-substp a)
                (pseudo-term-substp b))
           (pseudo-term-substp (append a b))))


(defund pseudo-term-val-alistp  (x)
  (declare (xargs :guard t))
  (if (atom x)
      (eq x nil)
    (and (consp (car x))
         (pseudo-termp (cdar x))
         (pseudo-term-val-alistp (cdr x)))))

(local (in-theory (enable pseudo-term-val-alistp)))

(defthm pseudo-termp-of-lookup-in-pseudo-term-val-alistp
  (implies (pseudo-term-val-alistp x)
           (pseudo-termp (cdr (assoc k x)))))

(defthm pseudo-term-val-alistp-of-acons
  (equal (pseudo-term-val-alistp (cons (cons k v) x))
         (and (pseudo-termp v)
              (pseudo-term-val-alistp x))))

(defthm pseudo-term-val-alistp-of-atom
  (implies (not (consp x))
           (equal (pseudo-term-val-alistp x)
                  (equal x nil)))
  :rule-classes ((:rewrite :backchain-limit-lst 0)))

(defthm pseudo-term-val-alistp-of-pairlis
  (implies (pseudo-term-listp y)
           (pseudo-term-val-alistp (pairlis$ x y))))

(defthm pseudo-term-val-alistp-of-append
  (implies (and (pseudo-term-val-alistp a)
                (pseudo-term-val-alistp b))
           (pseudo-term-val-alistp (append a b))))