/usr/share/acl2-8.0dfsg/books/misc/simplify-thm.lisp is in acl2-books-source 8.0dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | (in-package "ACL2")
(program)
(set-state-ok t)
(include-book "bash")
(defmacro incat (sym &rest strings)
`(intern-in-package-of-symbol
(concatenate 'string
. ,strings)
,sym))
(defun smpl-clause-to-theorem (clause)
`(implies (and . ,(dumb-negate-lit-lst (butlast clause 1)))
,(car (last clause))))
(defun smpl-clauses-to-theorems (clauses)
(if (atom clauses)
nil
(cons (smpl-clause-to-theorem (car clauses))
(smpl-clauses-to-theorems (cdr clauses)))))
(defun smpl-to-theorems (term hints state)
(er-let* ((clauses (simplify-with-prover term hints 'smpl-to-theorems state)))
(value (smpl-clauses-to-theorems clauses))))
(defun smpl-clauses-to-defthms (namebase n clauses args)
(if (atom clauses)
nil
(cons `(defthm ,(incat namebase (symbol-name namebase) "-"
(explode-atom n 10))
,(car clauses)
. ,args)
(smpl-clauses-to-defthms namebase (1+ n) (cdr clauses) args))))
(defun simplify-thm-fn (namebase form smpl-hints args state)
(er-let* ((forms (smpl-to-theorems form smpl-hints state)))
(value (smpl-clauses-to-defthms
namebase 0 forms args))))
|