/usr/share/acl2-8.0dfsg/books/system/subst-var.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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | ; Copyright (C) 2014, Regents of the University of Texas
; Written by David Rager (original date April, 2012)
; License: A 3-clause BSD license. See the LICENSE file distributed with ACL2.
(in-package "ACL2")
(include-book "sublis-var") ; for verification of cons-term
(local
(include-book "pseudo-termp-lemmas"))
(verify-termination subst-var
(declare (xargs :verify-guards nil)))
(local
(defun subst-var-flg (flg new old x)
(cond (flg ; subst-var-lst
(cond ((endp x) nil)
(t (cons (subst-var-flg nil new old (car x))
(subst-var-flg t new old (cdr x))))))
(t ; subst-var
(cond ((variablep x)
(cond ((eq x old) new)
(t x)))
((fquotep x) x)
(t (cons-term (ffn-symb x)
(subst-var-flg t new old (fargs x)))))))))
(local
(defthmd subst-var-flg-property
(equal (subst-var-flg flg new old x)
(if flg
(subst-var-lst new old x)
(subst-var new old x)))))
(local
(defthm subst-var-flg-preserves-len
(implies flg
(equal (len (subst-var-flg flg vars terms x))
(len x)))))
(local
(defthm pseudo-termp-subst-var-flg
(implies (and (pseudo-termp new)
(variablep old)
(if flg
(pseudo-term-listp x)
(pseudo-termp x)))
(if flg
(pseudo-term-listp (subst-var-flg flg new old x))
(pseudo-termp (subst-var-flg flg new old x))))
:rule-classes nil))
(defthm pseudo-term-listp-subst-var-lst
(implies (and (pseudo-termp new)
(variablep old)
(pseudo-term-listp l))
(pseudo-term-listp (subst-var-lst new old l)))
:hints (("Goal"
:in-theory (enable subst-var-flg-property)
:use ((:instance pseudo-termp-subst-var-flg
(flg t)
(x l))))))
(defthm pseudo-termp-subst-var
(implies (and (pseudo-termp new)
(variablep old)
(pseudo-termp form))
(pseudo-termp (subst-var new old form)))
:hints (("Goal"
:in-theory (enable subst-var-flg-property)
:use ((:instance pseudo-termp-subst-var-flg
(flg nil)
(x form))))))
(verify-guards subst-var)
|