fact
stringlengths 6
30.1k
| type
stringclasses 2
values | library
stringclasses 46
values | imports
listlengths 0
156
| filename
stringlengths 12
117
| symbolic_name
stringlengths 1
145
| docstring
stringclasses 1
value |
|---|---|---|---|---|---|---|
acl2s-size-string : (implies (stringp x) (equal (acl2s-size x) (length x))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-string
| |
acl2s-size-rational : (implies (rationalp x) (equal (acl2s-size x) (integer-abs (numerator x)))) :rule-classes ((:rewrite :backchain-limit-lst 0))) #| Causes rewrite loops. Seems like an ACL2 bug, or at least there is a potential for improvement since we should catch such rewrite loops. Investigate at some point. (remove similar built-in clauses to reproduce)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-rational
| |
acl2s-size-cons : (implies (consp (double-rewrite x)) (equal (acl2s-size x) (+ 1 (acl2s-size (car (double-rewrite x))) (acl2s-size (cdr (double-rewrite x)))))) :rule-classes ((:rewrite :backchain-limit-lst 0))) |#
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-cons
| |
acl2s-size-else : (implies (and (atom (double-rewrite x)) (not (rationalp x)) (not (stringp x))) (equal (acl2s-size x) 0)) :rule-classes ((:rewrite :backchain-limit-lst 0))) |#
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-else
| |
acl2s-size-type-fc : (natp (acl2s-size x)) :rule-classes ((:type-prescription) (:forward-chaining :trigger-terms ((acl2s-size x)))))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-type-fc
| |
acons-acl2s-size-lemma : (= (acl2s-size (acons x1 x2 x3)) (+ 2 (acl2s-size x1) (acl2s-size x2) (acl2s-size x3))) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acons-acl2s-size-lemma
| |
acl2s-size-of-prod-cons1 : (<= (acl2s-size std::y) (acl2s-size (std::prod-cons std::x std::y))) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-prod-cons1
| |
acl2s-size-of-prod-cons2 : (<= (acl2s-size std::x) (acl2s-size (std::prod-cons std::x std::y))) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-prod-cons2
| |
acl2s-size-of-nth-linear : (implies (consp (double-rewrite x)) (< (acl2s-size (nth i x)) (acl2s-size x))) :rule-classes ((:linear :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-nth-linear
| |
acl2s-size-of-nth-linear-weak : (<= (acl2s-size (nth i x)) (acl2s-size x)) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-nth-linear-weak
| |
acl2s-size-of-nthcdr-linear : (implies (and (not (zp (double-rewrite n))) (consp (double-rewrite x))) (< (acl2s-size (nthcdr n x)) (acl2s-size x))) :hints (("Goal" :in-theory (enable nthcdr))) :rule-classes ((:linear :backchain-limit-lst 1)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-nthcdr-linear
| |
acl2s-size-of-nthcdr-linear-weak : (<= (acl2s-size (nthcdr n x)) (acl2s-size x)) :hints (("Goal" :in-theory (enable nthcdr))) :rule-classes :linear) (encapsulate () (local (include-book "arithmetic-5/top" :dir :system))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-nthcdr-linear-weak
| |
acl2s-size-of-remove-duplicates : (<= (acl2s-size (remove-duplicates-equal x)) (acl2s-size x)) :rule-classes :linear))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-remove-duplicates
| |
acl2s-size-when-member : (implies (member-equal a (double-rewrite x)) (< (acl2s-size a) (acl2s-size x))) :hints (("Goal" :in-theory (enable member-equal))) :rule-classes ((:linear :backchain-limit-lst 1 :match-free :all) (:rewrite :backchain-limit-lst 1 :match-free :all)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-when-member
| |
acl2s-size-of-remove-assoc-equal-upper-bound : (<= (acl2s-size (remove-assoc-equal a x)) (acl2s-size x)) :hints (("Goal" :in-theory (enable remove-assoc-equal))) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-remove-assoc-equal-upper-bound
| |
tail-acl2s-size : (implies (not (set::emptyp x)) (< (acl2s-size (set::tail x)) (acl2s-size x))) :hints (("Goal" :in-theory (enable set::emptyp set::tail))) :rule-classes ((:rewrite :backchain-limit-lst 0) (:linear :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
tail-acl2s-size
| |
head-acl2s-size : (implies (not (set::emptyp x)) (< (acl2s-size (set::head x)) (acl2s-size x))) :hints (("Goal" :in-theory (enable set::emptyp set::head))) :rule-classes ((:rewrite :backchain-limit-lst 0) (:linear :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
head-acl2s-size
| |
split-list-1-acl2s-size : (implies (consp (double-rewrite x)) (< (acl2s-size (mv-nth 1 (str::split-list-1 x str::del))) (acl2s-size x))) :hints (("Goal" :in-theory (enable str::split-list-1))) :rule-classes ((:rewrite :backchain-limit-lst 0) (:linear :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
split-list-1-acl2s-size
| |
records-acl2s-size-linear-arith- : <= (<= (acl2s-size (mget k r)) (acl2s-size r)) :hints (("goal" :in-theory (enable mget recordp no-nil-val-alistp ordered-unique-key-alistp))) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
records-acl2s-size-linear-arith-
| |
records-acl2s-size-linear-arith- : <2 (implies (mget k r) (< (acl2s-size (mget k r)) (acl2s-size r))) :hints (("goal" :in-theory (enable mget recordp no-nil-val-alistp ordered-unique-key-alistp))) :rule-classes ((:linear :backchain-limit-lst 1)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
records-acl2s-size-linear-arith-
| |
records-acl2s-size : (implies (consp r) (< (acl2s-size (mget k r)) (acl2s-size r))) :hints (("goal" :in-theory (enable mget recordp no-nil-val-alistp ordered-unique-key-alistp))) :rule-classes ((:linear :backchain-limit-lst 1)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
records-acl2s-size
| |
acl2s-size-evens-weak : (<= (acl2s-size (evens x)) (acl2s-size x)) :hints (("Goal" :induct (evens x))) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-evens-weak
| |
acl2s-size-evens-strong : (implies (consp (cdr (double-rewrite x))) (< (acl2s-size (evens x)) (acl2s-size x))) :rule-classes ((:linear :backchain-limit-lst 1)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-evens-strong
| |
acl2-size-append : (<= (acl2-size (append x y)) (+ (acl2-size x) (acl2-size y) 1)) :rule-classes ((:linear) (:rewrite)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2-size-append
| |
acl2s-size-append-tlp : (implies (and (true-listp x) (true-listp y)) (= (acl2s-size (append x y)) (+ (acl2s-size x) (acl2s-size y)))) :hints (("goal" :in-theory (enable append))) :rule-classes ((:rewrite :backchain-limit-lst 1))) #| Maybe a replacement for car-of-append
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-append-tlp
| |
car-of-append-backchain : (implies (consp (double-rewrite x)) (equal (car (append x y)) (car x))) :rule-classes ((:rewrite :backchain-limit-lst 0))) |#
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
car-of-append-backchain
| |
rev-acl2s-size : (<= (acl2s-size (rev x)) (acl2s-size x)) :hints (("Goal" :in-theory (e/d (rev)))) :rule-classes ((:linear)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
rev-acl2s-size
| |
rev-acl2s-size-tlp : (implies (true-listp x) (= (acl2s-size (rev x)) (acl2s-size x))) :hints (("Goal" :in-theory (enable rev))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
rev-acl2s-size-tlp
| |
acl2s-size-of-hons-remove-duplicates : (<= (acl2s-size (acl2::hons-remove-duplicates x)) (acl2s-size x)) :hints (("Goal" :in-theory (enable acl2::hons-remove-duplicates))) :rule-classes ((:linear) (:rewrite))) (encapsulate () (local (include-book "arithmetic-5/top" :dir :system))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-of-hons-remove-duplicates
| |
acl2s-size- : <=-acl2-count (<= (acl2s-size x) (acl2-count x)) :rule-classes :linear)) #| There seems to be no way to get rid of the double-rewrite warning without introducing a non-rec warning. Is this what is supposed to happen? |#
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-
| |
len- : <=-acl2s-size (<= (len x) (acl2s-size x)) :rule-classes :linear) ; This came up when I asked openai to write and verify a sorting ; function in ACL2. It used remove and we don't have a theorem like ; this, so here goes.
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
len-
| |
acl2-count-remove : (<= (acl2-count (remove a x)) (acl2-count x)) :rule-classes :linear)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2-count-remove
| |
acl2-count-remove2 : (<= (acl2-count (remove-equal a x)) (acl2-count x)) :rule-classes :linear) #| Maybe be useful for replacing acl2-count with acl2s-size.
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2-count-remove2
| |
acl2s-size-built-in-1 : (o-p (acl2s-size x)) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-1
| |
acl2s-size-built-int : (integerp (acl2s-size x)) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-int
| |
acl2s-size-built-nat : (<= 0 (acl2s-size x)) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-nat
| |
acl2s-size-o : <-< (equal (o< (acl2s-size x) (acl2s-size y)) (< (acl2s-size x) (acl2s-size y)))) ; Car and cdr decrease on consps.
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-o
| |
acl2s-size-built-in-2 : (implies (consp x) (and (< (acl2s-size (car x)) (acl2s-size x)) (o< (acl2s-size (car x)) (acl2s-size x)))) :rule-classes ((:built-in-clause)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-2
| |
acl2s-size-built-in-3 : (implies (consp x) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes ((:built-in-clause))) ; Car and cdr decrease on non-atoms.
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-3
| |
acl2s-size-built-in-4 : (implies (not (atom x)) (and (< (acl2s-size (car x)) (acl2s-size x)) (o< (acl2s-size (car x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-4
| |
acl2s-size-built-in-5 : (implies (not (atom x)) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause) ; Car and cdr decrease on non-endps.
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-5
| |
acl2s-size-built-in-6 : (implies (not (endp x)) (and (< (acl2s-size (car x)) (acl2s-size x)) (o< (acl2s-size (car x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-6
| |
acl2s-size-built-in-7 : (implies (not (endp x)) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause) ; 1- decreases on positives and on non-negatives other than 0. But we ; represent (1- x) three different ways: (1- x), (+ x -1) and (+ -1 x). And to ; say "other than 0" we can use (not (zp x)) or (integerp x) together ; with the negations of any one of (equal x 0), (= x 0) or (= 0 x). The ; symmetry of equal is built into unification, but not so =, so w...
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-7
| |
acl2s-size-built-in-8 : (implies (not (zp x)) (and (< (acl2s-size (binary-+ x -1)) (acl2s-size x)) (o< (acl2s-size (binary-+ x -1)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-8
| |
acl2s-size-built-in-9 : (implies (not (zp x)) (and (< (acl2s-size (binary-+ -1 x)) (acl2s-size x)) (o< (acl2s-size (binary-+ -1 x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-9
| |
acl2s-size-built-in-10 : (implies (and (integerp x) (< 0 x)) (and (< (acl2s-size (binary-+ x -1)) (acl2s-size x)) (o< (acl2s-size (binary-+ x -1)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-10
| |
acl2s-size-built-in-11 : (implies (and (integerp x) (not (< x 0)) (not (= x 0))) (and (< (acl2s-size (binary-+ x -1)) (acl2s-size x)) (o< (acl2s-size (binary-+ x -1)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-11
| |
acl2s-size-built-in-12 : (implies (and (integerp x) (not (< x 0)) (not (= x 0))) (and (< (acl2s-size (binary-+ x -1)) (acl2s-size x)) (o< (acl2s-size (binary-+ x -1)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-12
| |
acl2s-size-built-in-13 : (implies (and (integerp x) (not (< x 0)) (not (equal x 0))) (and (< (acl2s-size (binary-+ x -1)) (acl2s-size x)) (o< (acl2s-size (binary-+ x -1)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-13
| |
acl2s-size-built-in-14 : (implies (and (integerp x) (< 0 x)) (and (< (acl2s-size (binary-+ -1 x)) (acl2s-size x)) (o< (acl2s-size (binary-+ -1 x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-14
| |
acl2s-size-built-in-15 : (implies (and (integerp x) (not (< x 0)) (not (= x 0))) (and (< (acl2s-size (binary-+ -1 x)) (acl2s-size x)) (o< (acl2s-size (binary-+ -1 x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-15
| |
acl2s-size-built-in-16 : (implies (and (integerp x) (not (< x 0)) (not (= 0 x))) (and (< (acl2s-size (binary-+ -1 x)) (acl2s-size x)) (o< (acl2s-size (binary-+ -1 x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-16
| |
acl2s-size-built-in-17 : (implies (and (integerp x) (not (< x 0)) (not (equal 0 x))) (and (< (acl2s-size (binary-+ -1 x)) (acl2s-size x)) (o< (acl2s-size (binary-+ -1 x)) (acl2s-size x)))) :rule-classes :built-in-clause) ; Finally, cdr decreases on non-nil true-listps, but we can say ; "non-nil" as (eq x nil), (eq nil x), (null x) or (equal x nil)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-17
| |
acl2s-size-built-in-18 : (implies (and (true-listp x) (not (eq x nil))) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-18
| |
acl2s-size-built-in-19 : (implies (and (true-listp x) (not (null x))) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-19
| |
acl2s-size-built-in-20 : (implies (and (true-listp x) (not (eq nil x))) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause)
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-20
| |
acl2s-size-built-in-21 : (implies (and (true-listp x) (not (equal x nil))) (and (< (acl2s-size (cdr x)) (acl2s-size x)) (o< (acl2s-size (cdr x)) (acl2s-size x)))) :rule-classes :built-in-clause) )
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-built-in-21
| |
acl2s-size-car-cdr-linear : (implies (consp x) (equal (acl2s-size x) (+ 1 (acl2s-size (car x)) (acl2s-size (cdr x))))) :rule-classes :linear) #|
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-car-cdr-linear
| |
acl2s-size-string : (implies (stringp x) (equal (acl2s-size x) (length x))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-string
| |
acl2s-size-rational : (implies (rationalp x) (equal (acl2s-size x) (integer-abs (numerator x)))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-rational
| |
acl2s-size-cons : (implies (consp x) (equal (acl2s-size x) (+ 1 (acl2s-size (car x)) (acl2s-size (cdr x))))) :rule-classes ((:rewrite :backchain-limit-lst 0)))
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-cons
| |
acl2s-size-else : (implies (and (atom x) (not (rationalp x)) (not (stringp x))) (equal (acl2s-size x) 0)) :rule-classes ((:rewrite :backchain-limit-lst 0))) (thm (implies (consp x) (o< (acl2s-size (cdr x)) (acl2s-size x)))) (thm (implies (consp x) (< (acl2s-size (cdr x)) (acl2s-size x)))) (thm (implies (consp x) (o< (acl2-count (cdr x)) (acl2-count x)))) (thm (implies (consp x) (< (acl2-count (cdr x)) (acl2-count x)))) |#
|
theorem
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size-else
| |
acl2s-size (x) : (declare (xargs :guard t)) (cond ((consp x) (+ 1 (acl2s-size (car x)) (acl2s-size (cdr x)))) ((rationalp x) (integer-abs (numerator x))) ((stringp x) (length x)) (t 0))) #| Added these rules as built-in clauses
|
function
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
acl2s-size
| |
add-acl2s-builtin-clauses (state) : (declare (xargs :mode :program :stobjs state)) (let ((rules *acl2s-size-built-in-clauses*)) (pprogn (f-put-global 'half-length-built-in-clauses (floor (+ (length rules) (length (global-val 'built-in-clauses (w state)))) 2) state) (f-put-global 'built-in-clauses (classify-and-store-built-in-clause-rules rules (global-val 'built-in-clauses (w state)) (w state)) state)))) (add-acl2s-builtin-clauses state) (global-val 'built-in-clauses (w state)) (global-val 'half-length-built-in-clauses (w state)) ...
|
function
|
acl2s
|
[
"acl2s/cons-size",
"arithmetic-5/top",
"arithmetic-5/top",
"arithmetic-5/top"
] |
acl2s/acl2s-size.lisp
|
add-acl2s-builtin-clauses
| |
natp-implies-acl2-numberp : (implies (natp x) (acl2-numberp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
natp-implies-acl2-numberp
| |
posp-implies-acl2-numberp : (implies (posp x) (acl2-numberp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
posp-implies-acl2-numberp
| |
integerp-implies-acl2-numberp : (implies (integerp x) (acl2-numberp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
integerp-implies-acl2-numberp
| |
rationalp-implies-acl2-numberp2 : (implies (rationalp x) (acl2-numberp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
rationalp-implies-acl2-numberp2
| |
natp-implies-rationalp : (implies (natp x) (rationalp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
natp-implies-rationalp
| |
posp-implies-rationalp : (implies (posp x) (rationalp x)) :rule-classes ((:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
posp-implies-rationalp
| |
integerp-implies-rationalp : (implies (integerp x) (rationalp x)) :rule-classes ((:rewrite))) |# #| New versions using only fc rules and disabling natp, posp definitions. The idea is to construct a partial order of the types and only include forward-chaining rules that state a type is a subtype of the types immediately above it. The types are: neg: non-pos-integer, non-0-integer, neg-rational pos: nat, non-0-integer, pos-rational non-pos-integer: integer non-0-integer: integer nat: integer odd: (not recognizer) even: (not r...
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
integerp-implies-rationalp
| |
negp-expand-+ : (implies (and (integerp x) (integerp y)) (equal (negp (+ x y)) (< x (- y)))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
negp-expand-+
| |
posp-expand-+ : (implies (and (integerp x) (integerp y)) (equal (posp (+ x y)) (< (- y) x))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
posp-expand-+
| |
natp-expand-+ : (implies (and (integerp x) (integerp y)) (equal (natp (+ x y)) (<= (- y) x))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
natp-expand-+
| |
non-pos-integerp-expand-+ : (implies (and (integerp x) (integerp y)) (equal (non-pos-integerp (+ x y)) (<= x (- y)))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-pos-integerp-expand-+
| |
non-neg-rational-expand-+ : (implies (and (rationalp x) (rationalp y)) (equal (non-neg-rationalp (+ x y)) (<= (- y) x))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-neg-rational-expand-+
| |
non-pos-rational-expand-+ : (implies (and (rationalp x) (rationalp y)) (equal (non-pos-rationalp (+ x y)) (<= x (- y))))) |# #| Rules like this will probably blow up if I want to get something complete, so instead I use computed hints.
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-pos-rational-expand-+
| |
negp-closed-under-+x : (implies (and (negp x) (non-pos-integerp y)) (negp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
negp-closed-under-+x
| |
negp-closed-under-+y : (implies (and (negp y) (non-pos-integerp x)) (negp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
negp-closed-under-+y
| |
posp-closed-under-+x : (implies (and (posp x) (natp y)) (posp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
posp-closed-under-+x
| |
posp-closed-under-+y : (implies (and (posp y) (natp x)) (posp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
posp-closed-under-+y
| |
natp-closed-under-+ : (implies (and (natp x) (natp y)) (natp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
natp-closed-under-+
| |
non-pos-integerp-closed-under-+ : (implies (and (non-pos-integerp x) (non-pos-integerp y)) (non-pos-integerp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-pos-integerp-closed-under-+
| |
neg-rational-closed-under-+x : (implies (and (neg-rationalp x) (non-pos-rationalp y)) (neg-rationalp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
neg-rational-closed-under-+x
| |
neg-rational-closed-under-+y : (implies (and (neg-rationalp y) (non-pos-rationalp x)) (neg-rationalp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
neg-rational-closed-under-+y
| |
pos-rational-closed-under-+x : (implies (and (pos-rationalp x) (non-neg-rationalp y)) (pos-rationalp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
pos-rational-closed-under-+x
| |
pos-rational-closed-under-+y : (implies (and (pos-rationalp y) (non-neg-rationalp x)) (pos-rationalp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
pos-rational-closed-under-+y
| |
non-neg-rational-closed-under-+ : (implies (and (non-neg-rationalp x) (non-neg-rationalp y)) (non-neg-rationalp (+ x y))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-neg-rational-closed-under-+
| |
non-pos-rational-closed-under-+ : (implies (and (non-pos-rationalp x) (non-pos-rationalp y)) (non-pos-rationalp (+ x y)))) |# (in-theory (disable negp posp natp non-pos-integerp neg-ratiop pos-ratiop ratiop neg-rationalp pos-rationalp non-neg-rationalp non-pos-rationalp)) #| End of new version. |# #| From rtl/rel11/lib/top.lisp, where various arithmetic-5 theorems are disabled. I commented out some disabled theorems that seem fine to me. |# (local (in-theory #!acl2(disable
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
non-pos-rational-closed-under-+
| |
acl2s-default-mod-ratio : (implies (and (not (complex-rationalp x)) (syntaxp (not (acl2::proveably-real/rational 'y (cons (cons 'y y) 'nil) mfc state)))) (equal (mod x y) (if (real/rationalp y) (mod x y) (fix x)))) :rule-classes ((:rewrite :backchain-limit-lst 0))) #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s-default-mod-ratio
| |
acl2s : ::acl2s-cancel-floor-+ (implies (and (real/rationalp (/ x y)) (syntaxp (in-term-order-+ x mfc state)) (bind-free (find-cancelling-addends x y mfc state) (addend)) (equal i (/ addend y)) (integerp i)) (equal (floor x y) (+ (- i) (floor (+ addend x) y)))) :hints (("goal" :by acl2::cancel-floor-+)) :rule-classes ((:rewrite :backchain-limit-lst 2))) #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-cancel-mod-+ (implies (and (acl2-numberp y) (not (equal y 0)) (syntaxp (not (equal x ''0))) (real/rationalp (/ x y)) (syntaxp (in-term-order-+ x mfc state)) (bind-free (find-cancelling-addends x y mfc state) (addend)) (equal i (/ addend y)) (integerp i)) (equal (mod x y) (mod (+ addend x) y))) :hints (("goal" :use ((:instance acl2::cancel-mod-+)) :in-theory (disable acl2::cancel-mod-+ acl2::cancel-floor-+))) :otf-flg t :rule-classes ((:rewrite :backchain-limit-lst 2))) #| This was leadin...
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-prefer-positive-addends-< (implies (and (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (syntaxp (or (equal (fn-symb lhs) 'binary-+) (equal (fn-symb rhs) 'binary-+))) (bind-free (find-negative-addend lhs rhs mfc state) (x))) (equal (< lhs rhs) (< (+ x lhs) (+ x rhs)))) :rule-classes ((:rewrite :backchain-limit-lst 2))) #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-prefer-positive-addends-<1 (implies (and (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (syntaxp (or (equal (fn-symb lhs) 'binary-+) (equal (fn-symb rhs) 'binary-+))) (bind-free (find-negative-addend lhs rhs mfc state) (x)) (equal yyy (- x))) (equal (< lhs (+ yyy rhs)) (< (+ (- yyy) lhs) rhs))) :rule-classes ((:rewrite :backchain-limit-lst 2))) |# #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-prefer-positive-addends-<2 (implies (and (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (syntaxp (or (equal (fn-symb lhs) 'binary-+) (equal (fn-symb rhs) 'binary-+))) (bind-free (find-negative-addend lhs rhs mfc state) (x)) (equal yyy (- x))) (equal (< (+ yyy lhs) rhs) (< lhs (+ (- yyy) rhs)))) :rule-classes ((:rewrite :backchain-limit-lst 2))) #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-prefer-positive-addends-equal (implies (and (acl2-numberp lhs) (acl2-numberp rhs) (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (syntaxp (or (equal (fn-symb lhs) 'binary-+) (equal (fn-symb rhs) 'binary-+))) (bind-free (find-negative-addend lhs rhs mfc state) (x))) (equal (equal lhs rhs) (equal (+ x lhs) (+ x rhs)))) :rule-classes ((:rewrite :backchain-limit-lst 0))) #!acl2
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-reduce-additive-constant-< (implies (and (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (bind-free (find-constant-addend lhs rhs) (c)) (not (equal c 0)) (syntaxp (simplify-ok-p (cons '< (cons lhs (cons rhs 'nil))) '(< (binary-+ c lhs) (binary-+ c rhs)) (cons (cons 'lhs lhs) (cons (cons 'rhs rhs) (cons (cons 'c c) 'nil))) mfc state)) (acl2-numberp lhs) (acl2-numberp rhs) (acl2-numberp c)) (equal (< lhs rhs) (< (+ c lhs) (+ c rhs)))) :rule-classes ((:re...
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
acl2s : ::acl2s-reduce-additive-constant-equal (implies (and (syntaxp (in-term-order-+ lhs mfc state)) (syntaxp (in-term-order-+ rhs mfc state)) (bind-free (find-constant-addend lhs rhs) (c)) (not (equal c 0)) (syntaxp (simplify-ok-p (cons 'equal (cons lhs (cons rhs 'nil))) '(equal (binary-+ c lhs) (binary-+ c rhs)) (cons (cons 'lhs lhs) (cons (cons 'rhs rhs) (cons (cons 'c c) 'nil))) mfc state)) (acl2-numberp lhs) (acl2-numberp rhs) (acl2-numberp c)) (equal (equal lhs rhs) (equal (+ c lhs) (+ c rhs))))...
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
acl2s
| |
numerator-1-decreases : (implies (rationalp n) (< (numerator (- n 1)) (numerator n))) :hints (("goal" :use ((:instance ACL2::|(* r (denominator r))| (acl2::r n)) (:instance ACL2::|(* r (denominator r))| (acl2::r (- n 1))) ) :in-theory (disable ACL2::|(* r (denominator r))|))) :rule-classes ((:linear) (:rewrite)))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
numerator-1-decreases
| |
nat-induction-scheme : t :rule-classes ((:induction :pattern (integerp x) :condition (and (integerp x) (>= x 0)) :scheme (nat-ind x))))
|
theorem
|
acl2s
|
[
"defdata/top",
"tau/bounders/elementary-bounders",
"definec",
"acl2s/ccg/ccg",
"arithmetic-5/lib/basic-ops/simple-equalities-and-inequalities",
"arithmetic-5/lib/basic-ops/simplify",
"arithmetic-5/lib/basic-ops/building-blocks",
"arithmetic-5/lib/floor-mod/floor-mod",
"arithmetic-5/top",
"rtl/rel11/lib/top",
"arithmetic-5/top"
] |
acl2s/base-arithmetic.lisp
|
nat-induction-scheme
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.