1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
3
; Copyright reserved by SRC
4
; Author Jun Sawada, University of Texas at Austin
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;'
8
;; Jared: changing this to an include of an identical book
9
(include-book "workshops/1999/pipeline/trivia" :dir :system)
11
;; (include-book "../../../../../../data-structures/array1")
12
;; (include-book "../../../../../../arithmetic/top")
14
;; (deflabel begin-trivia)
16
;; (defmacro quoted-constant-p (x)
17
;; `(and (consp ,x) (equal (car ,x) 'quote)))
20
;; (implies (true-listp x)
21
;; (equal (append x nil) x))
22
;; :hints (("Goal" :in-theory (enable binary-append))))
24
;; (defun natural-induction (i)
26
;; (natural-induction (1- i))))
28
;; ;; in data-structures/list-defthms
29
;; ;; (defthm car-nthcdr
30
;; ;; (equal (car (nthcdr idx lst)) (nth idx lst)))
33
;; (implies (and (integerp idx) (<= 0 idx))
34
;; (equal (cdr (nthcdr idx lst)) (nthcdr (+ 1 idx) lst))))
37
;; (in-theory (disable length))
39
;; (in-theory (disable array1p compress1 default dimensions header
40
;; aref1 aset1 maximum-length))
42
;; (defthm array1p-module-type
45
;; (and (symbolp name)
47
;; (consp (header name l))
48
;; (consp (dimensions name l))
49
;; (true-listp (dimensions name l))
50
;; (integerp (car (dimensions name l)))
51
;; (<= 0 (car (dimensions name l)))
52
;; (integerp (maximum-length name l))
53
;; (<= 0 (maximum-length name l))))
54
;; :hints (("Goal" :in-theory (enable array1p header default dimensions
57
;; ((:type-prescription :corollary
60
;; (and (consp (header name l)))))
61
;; (:type-prescription :corollary
64
;; (and (consp (dimensions name l))
65
;; (true-listp (dimensions name l)))))
66
;; (:type-prescription :corollary
69
;; (and (integerp (car (dimensions name l)))
70
;; (<= 0 (car (dimensions name l))))))
71
;; (:type-prescription :corollary
74
;; (and (integerp (maximum-length name l))
75
;; (<= 0 (maximum-length name l)))))))
79
;; (defthm compress11-empty-array
80
;; (implies (and (integerp n) (>= n 0))
81
;; (equal (compress11 name (list (cons :header info)) n dim default)
83
;; :hints (("Goal" :In-theory (enable compress11)))))
86
;; (defthm compress1-empty-array
87
;; (equal (compress1 tag (list (cons :header x)))
88
;; (list (cons :header x)))
89
;; :hints (("Goal" :in-theory (enable compress1 compress11
92
;; (defthm array1p-cons-with-dimensions
93
;; (implies (and (array1p tag array)
96
;; (> (car (dimensions tag array)) index))
97
;; (array1p tag (cons (cons index val) array)))
98
;; :hints (("goal" :in-theory (enable dimensions header))))