55
54
:long "<p>BOZO this needs a lot of documentation. For now you're best
56
55
off looking at the source code.</p>")
58
;; [Jared] this was causing errors, I think due to the doc-string stripping code
59
;; not working when :doc nil is given. Switching it to use std/util/defredundant
61
;; (include-book "tools/defredundant" :dir :system)
62
;; (defredundant-events
66
(local (include-book "std/util/defredundant" :dir :system))
59
70
; There are too many rules with forced hyps in logops-lemmas. We'll locally
60
71
; include it and redundantly define many of the useful theorems.
65
commutativity-of-logand
67
commutativity-of-logior
69
commutativity-of-logxor
71
simplify-bit-functions
72
unsigned-byte-p-base-case
75
difference-unsigned-byte-p
76
;; signed-byte-p-base-cases
77
;; backchain-signed-byte-p-to-unsigned-byte-p
79
;; loghead-0-i remove hyp
80
;; loghead-size-0 remove hyp
81
;; loghead-leq remove force
84
;; logtail-logtail remove hyps
85
;; logtail-0-i remove hyp
86
;; logtail-size-0 remove hyp
87
;; logtail-leq remove hyp
88
;; logtail-unsigned-byte-p remove hyp
89
;; logtail-loghead remove hyp
90
;; associativity-of-logapp remove hyp
94
;; we'll prove a stronger rewrite rule and disable this
95
;; rw, but it's a good elim
98
;; these are weird but won't hurt much
104
;; logbitp-0-minus-1 remove hyps
105
;; logbit-0-minus-1 remove hyps
107
signed-byte-p-logops)
76
commutativity-of-logand
78
commutativity-of-logior
80
commutativity-of-logxor
82
simplify-bit-functions
83
unsigned-byte-p-base-case
86
difference-unsigned-byte-p
87
;; signed-byte-p-base-cases
88
;; backchain-signed-byte-p-to-unsigned-byte-p
90
;; loghead-0-i remove hyp
91
;; loghead-size-0 remove hyp
92
;; loghead-leq remove force
95
;; logtail-logtail remove hyps
96
;; logtail-0-i remove hyp
97
;; logtail-size-0 remove hyp
98
;; logtail-leq remove hyp
99
;; logtail-unsigned-byte-p remove hyp
100
;; logtail-loghead remove hyp
101
;; associativity-of-logapp remove hyp
105
;; we'll prove a stronger rewrite rule and disable this
106
;; rw, but it's a good elim
109
;; these are weird but won't hurt much
115
;; logbitp-0-minus-1 remove hyps
116
;; logbit-0-minus-1 remove hyps
118
signed-byte-p-logops))
119
(events (std::defredundant-fn imports nil state)))
120
(acl2::value events))))
109
122
(defconst *ihs-extensions-disables*
110
123
'(floor mod expt ash evenp oddp
2936
2949
:in-theory (disable signed-byte-p
2937
2950
minus-to-lognot))))
2953
(equal (< (logapp size i j) 0)
2955
:hints (("goal" :induct (logapp size i j)
2956
:in-theory (disable (force)))))
2939
2958
(add-to-ruleset ihsext-basic-thms '(unsigned-byte-p-of-logapp
2940
signed-byte-p-of-logapp))
2959
signed-byte-p-of-logapp
2942
2962
;; (defthm logapp-zeros
2943
2963
;; (equal (logapp i 0 0) 0))
3332
3352
(local (in-theory (enable* arith-equiv-forwarding)))
3333
3353
(local (in-theory (enable logrev1 logrev)))
3335
(in-theory (disable (:type-prescription logrev))) ;; Too weak (integerp)
3355
(in-theory (disable (:t logrev))) ;; Too weak (integerp)
3337
3357
(defthm logrev-type
3338
3358
;; Redundant with ihs/basic-definitions.lisp
3339
(natp (logrev size i))
3359
(b* ((nat (logrev$inline size i)))
3340
3361
:rule-classes :type-prescription)
3342
3363
(local (defthm natp-of-logrev1
3410
3431
(logior (logrev size (logcdr i))
3411
3432
(ash (logcar i) size)))))
3412
3433
:rule-classes ((:definition
3414
:controller-alist ((logrev t nil))))))
3434
:clique (logrev$inline)
3435
:controller-alist ((logrev$inline t nil))))))
3416
3437
(add-to-ruleset ihsext-recursive-redefs '(logrev**))
3417
3438
(add-to-ruleset ihsext-redefs '(logrev**))