Basic automation for equal-by-logbitp.
The
(implies (and hyp1 hyp2 ...) (equal lhs rhs))
And automatically generates an appropriate
:hints(("Goal" :in-theory (enable foo bar)) (and stable-under-simplificationp (equal-by-logbitp-hint)))
Note that this hint is very aggressive. For instance, it doesn't try to
determine whether
Function:
(defun equal-by-logbitp-hint-fn (clause) (b* ((concl (car (last clause))) ((unless (and (consp concl) (eq (car concl) 'equal))) nil) (lhs (cadr concl)) (rhs (caddr concl)) (hyp (cons 'and (acl2::dumb-negate-lit-lst (butlast clause 1))))) (cons ':use (cons (cons (cons ':functional-instance (cons 'equal-by-logbitp (cons (cons 'logbitp-hyp (cons (cons 'lambda (cons 'nil (cons hyp 'nil))) 'nil)) (cons (cons 'logbitp-lhs (cons (cons 'lambda (cons 'nil (cons lhs 'nil))) 'nil)) (cons (cons 'logbitp-rhs (cons (cons 'lambda (cons 'nil (cons rhs 'nil))) 'nil)) 'nil))))) 'nil) 'nil))))