4
(declare (xargs :guard t))
9
(declare (xargs :guard (integerp k)))
15
(declare (xargs :guard (real/rationalp x)))
19
(local (include-book "../../arithmetic/top"))
22
(declare (xargs :guard (and (integerp s) (rationalp x))))
23
(mod (fl (* (expt 2 s) x)) (expt 2 (nfix l))))
25
(defthm shft-nonnegative-integer-type
26
(and (integerp (shft x s l))
28
:rule-classes (:type-prescription))
30
;(:type-prescription shft) is no better than shft-nonnegative-integer-type and might be worse:
31
(in-theory (disable (:type-prescription shft)))
36
(defthm shft-bvecp-simple
37
(bvecp (shft x s n) n)
38
:hints (("Goal" :in-theory (enable bvecp shft))))
40
(local (include-book "bvecp"))
43
(implies (and (<= n k)
44
(case-split (integerp k)))
45
(bvecp (shft x s n) k))
46
:hints (("Goal" :in-theory (disable shft-bvecp-simple)
47
:use shft-bvecp-simple)))