1
; A double-rewrite example based on events from Dave Greve.
17
(set-irrelevant-formals-ok t)
18
(local (defun foo (x) t))
19
(local (defun pred (x) t))
20
(local (defun goo (x) t))
21
(local (defun hoo (x) t))
26
(equiv (goo x) (hoo x)))
27
(defcong equiv iff (pred x) 1)
28
(defthm pred-implies-foo
30
(pred (double-rewrite x)) ; warning eliminated by double-rewrite call
33
(defthm foo-of-goo-equiv-enabled
37
; Let's keep equiv in the mix for experiments below.
38
(in-theory (disable equiv))
44
(defthm foo-of-goo-again
48
(defthm pred-implies-foo-again
50
(and (equiv y (double-rewrite x))
54
(in-theory (disable pred-implies-foo))
56
(defthm foo-of-goo-yet-again
60
; The following modification of pred-implies-foo-again (above) generates a
61
; double-rewrite warning, because without the double-rewrite call, the equiv
62
; hypothesis does not bind y.
63
(defthm pred-implies-foo-again-with-warning
64
(implies (and (equiv y x)
68
; Fails, as the above-mentioned warning suggests could happen:
70
; :hints (("Goal" :in-theory (disable pred-implies-foo-again))))