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 |
|---|---|---|---|---|---|---|
tab-boundp (k htable) : (multiple-value-bind (ans boundp)
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-boundp
| |
tab-put (k v htable) :
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-put
| |
tab-rem (k htable) :
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-rem
| |
tab-count (htable) : (hash-table-count (svref htable 0)))
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-count
| |
tab-clear (htable) : (clrhash (svref htable 0)) htable)
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-clear
| |
tab-init (size rehash-size rehash-threshold htable) : (setf (svref htable 0) (make-hash-table :size (or size 60) :rehash-size (if rehash-size (float rehash-size) (float 17/10)) :rehash-threshold (if rehash-threshold (float rehash-threshold) (float 3/4)))) htable) ||#
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
tab-init
| |
init-stuff (n bigstobj state) : (declare (xargs :stobjs (bigstobj state) :verify-guards nil :guard (natp n))) (if (zp n) (mv bigstobj state) (mv-let (rnd state) (random$ 10000 state) (let* ((bigstobj (update-bigarrayi n rnd bigstobj)) (bigstobj (bighash-put n rnd bigstobj)) (bigstobj (slowhash-put (list n) rnd bigstobj)) (bigstobj (eqhash-put (packn (list 'a n)) rnd bigstobj)) (bigstobj (honshash-put (list n) rnd bigstobj))) (init-stuff (- n 1) bigstobj state))))) (make-event (mv-let (bigstobj state) (init-stuff 99 bigstobj st...
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
init-stuff
| |
check-same (n bigstobj) : (declare (xargs :stobjs (bigstobj) :verify-guards nil :guard (natp n))) (if (zp n) t (let ((expect (bigarrayi n bigstobj))) (and (equal (bighash-get n bigstobj) expect) (equal (slowhash-get (list n) bigstobj) expect) (equal (bighash-boundp n bigstobj) t) (equal (slowhash-boundp (list n) bigstobj) t) (equal (eqhash-boundp (packn (list 'a n)) bigstobj) t) (equal (honshash-boundp (list n) bigstobj) t) (equal (mv-list 2 (bighash-get? n bigstobj)) (list expect t)) (equal (mv-list 2 (slowhash-get? (li...
|
function
|
add-ons
|
[
"std/alists/hons-remove-assoc",
"arithmetic/top-with-meta",
"std/testing/assert-bang"
] |
add-ons/hash-stobjs.lisp
|
check-same
| |
abs-* : (implies (and (real/rationalp x) (real/rationalp y)) (equal (abs (* x y)) (* (abs x) (abs y)))))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-*
| |
abs-uminus : (equal (abs (- x)) (abs (fix x))))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-uminus
| |
realp-abs : (implies (real/rationalp x) (real/rationalp (abs x))))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
realp-abs
| |
numberp-abs : (implies (acl2-numberp x) (acl2-numberp (abs x))))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
numberp-abs
| |
abs-x- : >-0 (implies (and (real/rationalp x) (<= 0 x)) (equal (abs x) x)))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-x-
| |
abs-x- : =-0-iff-x=0 (implies (and (real/rationalp x) (not (= 0 x))) (< 0 (abs x))))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-x-
| |
not-abs-x- : <-0 (not (< (abs x) 0)) :rule-classes (:rewrite :type-prescription))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
not-abs-x-
| |
abs-x-generalize-weak : (implies (real/rationalp x) (and (<= 0 (abs x)) (real/rationalp (abs x)))) :rule-classes (:generalize :rewrite))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-x-generalize-weak
| |
abs-x-generalize-strong : (implies (and (real/rationalp x) (not (equal x 0))) (< 0 (abs x))) :rule-classes (:generalize :rewrite))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-x-generalize-strong
| |
abs-triangle : (<= (abs (+ x y)) (+ (abs x) (abs y)))) (in-theory (disable abs))
|
theorem
|
arithmetic
|
[
"top"
] |
arithmetic/abs.lisp
|
abs-triangle
| |
factorial-n : /n-1 (implies (and (integerp n) (<= 1 n)) (equal (* (factorial n) (/ (factorial (+ -1 n)))) n)) :hints (("Goal" :expand ((factorial n)))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
factorial-n
| |
factorial-n : /n-1/x (implies (and (integerp n) (<= 1 n)) (equal (* (factorial n) (/ (factorial (+ -1 n))) x) (* n x)))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
factorial-n
| |
choose-reduction : (implies (and (integerp k) (integerp n) (< 0 k) (< k n)) (equal (choose k n) (+ (choose (1- k) (1- n)) (choose k (1- n))))) ; Matt K. change for v2-9: Subgoal number has changed, probably because of the ; change to call-stack to preserve quote-normal form. :hints (("Subgoal 4'" :expand ((factorial n)))) :rule-classes nil)
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-reduction
| |
choose-mk-choose : (equal (choose-mk k n) (choose k n)) :hints (("Goal" :induct (choose-mk k n)) ("Subgoal *1/1" :use (:instance choose-reduction) :in-theory (disable choose))) :rule-classes nil)
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-mk-choose
| |
choose-is-non-negative-integer : (and (integerp (choose k n)) (<= 0 (choose k n))) :hints (("Goal" :use (:instance choose-mk-choose) :in-theory (disable choose choose-mk))) :rule-classes (:rewrite :type-prescription))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-is-non-negative-integer
| |
binomial-expansion-times-x-correct : (equal (* x (sumlist (binomial-expansion x y k n))) (sumlist (binomial-expansion-times-x x y k n))) :hints (("Goal" :in-theory (disable choose))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-times-x-correct
| |
binomial-expansion-times-y-correct : (equal (* y (sumlist (binomial-expansion x y k n))) (sumlist (binomial-expansion-times-y x y k n))) :hints (("Goal" :in-theory (disable choose))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-times-y-correct
| |
binomial-expansion-times-x-plus-times-y : (equal (+ (sumlist (binomial-expansion-times-x x y k n)) (sumlist (binomial-expansion-times-y x y k n))) (sumlist (binomial-expansion-triangle x y k n))) :hints (("Goal" :in-theory (disable choose expt))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-times-x-plus-times-y
| |
silly-inequality : (implies (and (integerp k) (integerp n) (< k n)) (<= (+ 1 k) n))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
silly-inequality
| |
choose-k-k : (equal (choose k k) (if (and (integerp k) (<= 0 k)) 1 0))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-k-k
| |
expt-x-0 : (equal (expt x 0) 1)))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
expt-x-0
| |
binomial-expansion-triangle-x-y-k-1+k : (equal (binomial-expansion-triangle x y (+ 1 k) k) nil) :hints (("Goal" :expand (binomial-expansion-triangle x y (+ 1 k) K)))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-triangle-x-y-k-1+k
| |
binomial-expansion-triangle-x-y-k-k-lemma : (equal (binomial-expansion-triangle x y k k) (if (and (integerp k) (<= 0 k)) (list (expt x (1+ k)) (* (expt x k) y)) nil))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-triangle-x-y-k-k-lemma
| |
binomial-expansion-pascal-triangle-correct : (implies (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (equal (sumlist (binomial-expansion-triangle x y k n)) (+ (* (choose k n) (expt x k) (expt y (1+ (- n k)))) (sumlist (binomial-expansion-pascal-triangle x y k n))))) :hints (("Goal" :in-theory (disable choose expt right-unicity-of-1-for-expt expt-minus distributivity-of-expt-over-* exponents-multiply functional-commutativity-of-expt-/-base exponents-add exponents-add-for-nonneg-exponents)) ("Subgoal *1/5" :in-theory (disable choose expt)...
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-pascal-triangle-correct
| |
binomial-expansion-zero : (implies (< n k) (equal (binomial-expansion x y k n) nil)))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-zero
| |
pascal-triangle-binomial : (implies (and (integerp k) (integerp n) (<= 0 k)) (equal (sumlist (binomial-expansion-pascal-triangle x y k n)) (sumlist (binomial-expansion x y (1+ k) (1+ n))))) :hints (("Goal" :induct (binomial-expansion-pascal-triangle x y k n) :in-theory (disable choose expt right-unicity-of-1-for-expt expt-minus distributivity-of-expt-over-* exponents-multiply functional-commutativity-of-expt-/-base exponents-add exponents-add-for-nonneg-exponents)) ("Subgoal *1/1''" :use ((:instance choose-reduction (k (+...
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
pascal-triangle-binomial
| |
choose-0-n : (equal (choose 0 n) (if (and (integerp n) (<= 0 n)) 1 0)))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-0-n
| |
binomial-theorem-induction-lemma : (implies (and (integerp n) (< 0 n)) (equal (+ (* x (sumlist (binomial-expansion x y 0 (1- n)))) (* y (sumlist (binomial-expansion x y 0 (1- n))))) (sumlist (binomial-expansion x y 0 n)))) :hints (("Goal" :in-theory (disable expt))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-theorem-induction-lemma
| |
distributivity-2 : (equal (* (+ x y) z) (+ (* x z) (* y z)))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
distributivity-2
| |
binomial-theorem-fake : (implies (and (integerp n) (<= 0 n)) (equal (n-expt (+ x y) n) (sumlist (binomial-expansion x y 0 n)))) :hints (("Goal" :induct (n-expt x n)) ("Subgoal *1/1'" :in-theory (disable binomial-expansion)) ("Subgoal *1/1'''" :by (:instance binomial-theorem-induction-lemma))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-theorem-fake
| |
n-expt-expt : (implies (and (integerp n) (<= 0 n)) (equal (expt x n) (n-expt x n))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
n-expt-expt
| |
binomial-theorem : (implies (and (integerp n) (<= 0 n)) (equal (expt (+ x y) n) (sumlist (binomial-expansion x y 0 n)))))
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-theorem
| |
binomial-sum-commutes : (implies (and (integerp n) (<= 0 n)) (equal (sumlist (binomial-expansion x y 0 n)) (sumlist (binomial-expansion y x 0 n)))) :hints (("Goal" :use ((:instance binomial-theorem) (:instance binomial-theorem (x y) (y x))) :in-theory (disable binomial-theorem))) :rule-classes nil)
|
theorem
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-sum-commutes
| |
choose (k n) : ; (declare (xargs :guard (and (integerp k) (integerp n) (<= 0 k) (<= k n)))) (if (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (/ (factorial n) (* (factorial k) (factorial (- n k)))) 0))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose
| |
choose-mk (k n) : (if (and (integerp k) (integerp n)) (if (and (< 0 k) (< k n)) (+ (choose-mk (1- k) (1- n)) (choose-mk k (1- n))) (if (and (<= 0 k) (<= k n)) 1 0)) 0))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
choose-mk
| |
binomial-expansion (x y k n) : (declare (xargs :measure (nfix (1+ (- n k))))) (if (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (cons (* (choose k n) (expt x k) (expt y (- n k))) (binomial-expansion x y (1+ k) n)) nil))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion
| |
binomial-expansion-times-x (x y k n) : (declare (xargs :measure (nfix (1+ (- n k))))) (if (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (cons (* (choose k n) (expt x (1+ k)) (expt y (- n k))) (binomial-expansion-times-x x y (1+ k) n)) nil))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-times-x
| |
binomial-expansion-times-y (x y k n) : (declare (xargs :measure (nfix (1+ (- n k))))) (if (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (cons (* (choose k n) (expt x k) (expt y (1+ (- n k)))) (binomial-expansion-times-y x y (1+ k) n)) nil))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-times-y
| |
binomial-expansion-triangle (x y k n) : (declare (xargs :measure (nfix (1+ (- n k))))) (if (and (integerp k) (integerp n) (<= 0 k) (<= k n)) (cons (* (choose k n) (expt x (1+ k)) (expt y (- n k))) (cons (* (choose k n) (expt x k) (expt y (1+ (- n k)))) (binomial-expansion-triangle x y (1+ k) n))) nil))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-triangle
| |
binomial-expansion-pascal-triangle (x y k n) : (declare (xargs :measure (nfix (1+ (- n k))))) (if (and (integerp k) (integerp n) (<= 0 k)) (if (< k n) (cons (* (choose k n) (expt x (1+ k)) (expt y (- n k))) (cons (* (choose (1+ k) n) (expt x (1+ k)) (expt y (- n k))) (binomial-expansion-pascal-triangle x y (1+ k) n))) (if (= k n) (list (* (choose k n) (expt x (1+ k)) (expt y (- n k)))) nil)) nil))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
binomial-expansion-pascal-triangle
| |
n-expt (x n) : ; The conjunct (<= 0 n) was formerly (<= n 0), which was wrong (as pointed out ; in an acl2-help email from Dmitry Nadezhin, Sept. 12, 2018). (declare (xargs :guard (and (acl2-numberp x) (integerp n) (<= 0 n)))) (if (and (integerp n) (< 0 n)) (* x (n-expt x (1- n))) 1))
|
function
|
arithmetic
|
[
"top",
"factorial",
"sumlist"
] |
arithmetic/binomial.lisp
|
n-expt
| |
commutativity-2-of-+ : (equal (+ x (+ y z)) (+ y (+ x z))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
commutativity-2-of-+
| |
functional-self-inversion-of-minus : (equal (- (- x)) (fix x)))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
functional-self-inversion-of-minus
| |
distributivity-of-minus-over-+ : (equal (- (+ x y)) (+ (- x) (- y))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
distributivity-of-minus-over-+
| |
minus-cancellation-on-right : (equal (+ x y (- x)) (fix y)))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
minus-cancellation-on-right
| |
minus-cancellation-on-left : (equal (+ x (- x) y) (fix y))) ; Note that the cancellation rules below (and similarly for *) aren't ; complete, in the sense that the element to cancel could be on the ; left side of one expression and the right side of the other. But ; perhaps those situations rarely arise in practice. (?)
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
minus-cancellation-on-left
| |
right-cancellation-for-+ : (equal (equal (+ x z) (+ y z)) (equal (fix x) (fix y))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
right-cancellation-for-+
| |
left-cancellation-for-+ : (equal (equal (+ x y) (+ x z)) (equal (fix y) (fix z))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
left-cancellation-for-+
| |
equal-minus-0 : (equal (equal 0 (- x)) (equal 0 (fix x))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-minus-0
| |
inverse-of-+-as : =0 (equal (equal (- a b) 0) (equal (fix a) (fix b))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
inverse-of-+-as
| |
equal-minus-minus : (equal (equal (- a) (- b)) (equal (fix a) (fix b))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-minus-minus
| |
fold-consts-in-+ : (implies (and (syntaxp (quotep x)) (syntaxp (quotep y))) (equal (+ x (+ y z)) (+ (+ x y) z)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
fold-consts-in-+
| |
commutativity-2-of-* : (equal (* x (* y z)) (* y (* x z))) :hints (("Goal" :use (:functional-instance acl2-asg::commutativity-2-of-op (acl2-asg::equiv equal) (acl2-asg::pred (lambda (x) t)) (acl2-asg::op binary-*)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
commutativity-2-of-*
| |
functional-self-inversion-of- : / (equal (/ (/ x)) (fix x)) :hints (("Goal" :use (:functional-instance acl2-agp::Involution-of-inv (acl2-agp::equiv equal) (acl2-agp::pred (lambda (x) (and (acl2-numberp x) (not (equal x 0))))) (acl2-agp::op binary-*) (acl2-agp::id (lambda () 1)) (acl2-agp::inv unary-/)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
functional-self-inversion-of-
| |
distributivity-of- : /-over-* (equal (/ (* x y)) (* (/ x) (/ y))) :hints (("Goal" :use (:functional-instance acl2-agp::Distributivity-of-inv-over-op (acl2-agp::equiv equal) (acl2-agp::pred (lambda (x) (and (acl2-numberp x) (not (equal x 0))))) (acl2-agp::op binary-*) (acl2-agp::id (lambda () 1)) (acl2-agp::inv unary-/)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
distributivity-of-
| |
right-cancellation-for-*-lemma : (implies (and (equal (* x z) (* y z)) (acl2-numberp z) (not (equal 0 z)) (acl2-numberp x) (acl2-numberp y)) (equal (equal x y) t)) :hints (("Goal" :use (:functional-instance acl2-agp::Right-cancellation-for-op (acl2-agp::equiv equal) (acl2-agp::pred (lambda (x) (and (acl2-numberp x) (not (equal x 0))))) (acl2-agp::op binary-*) (acl2-agp::id (lambda () 1)) (acl2-agp::inv unary-/))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
right-cancellation-for-*-lemma
| |
right-cancellation-for-* : (equal (equal (* x z) (* y z)) (or (equal 0 (fix z)) (equal (fix x) (fix y)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
right-cancellation-for-*
| |
left-cancellation-for-* : (equal (equal (* z x) (* z y)) (or (equal 0 (fix z)) (equal (fix x) (fix y)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
left-cancellation-for-*
| |
Zero-is-only-zero-divisor : (equal (equal (* x y) 0) (or (equal (fix x) 0) (equal (fix y) 0))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Zero-is-only-zero-divisor
| |
equal-*-x-y-x : (equal (equal (* x y) x) (or (equal x 0) (and (equal y 1) (acl2-numberp x)))) :hints (("Goal" :use ((:instance right-cancellation-for-* (z x) (x y) (y 1))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-*-x-y-x
| |
equal-*-x-y-y : (equal (equal (* x y) y) (or (equal y 0) (and (equal x 1) (acl2-numberp y)))) :hints (("Goal" :use ((:instance right-cancellation-for-* (z y) (x x) (y 1)))))) (local (defthm equal-/-lemma (implies (and (acl2-numberp x) (acl2-numberp y) (equal (* x y) 1)) (equal y (/ x))) :rule-classes nil :hints (("Goal" :use (:functional-instance acl2-agp::Uniqueness-of-op-inverses (acl2-agp::equiv equal) (acl2-agp::pred (lambda (x) (and (acl2-numberp x) (not (equal x 0))))) (acl2-agp::op binary-*) (acl2-agp::i...
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-*-x-y-y
| |
equal- : / (implies (and (fc (acl2-numberp x)) (fc (not (equal 0 x)))) (equal (equal (/ x) y) (equal 1 (* x y)))) :hints (("Goal" :use equal-/-lemma))) ; The following hack helps in the application of equal-/ when forcing is ; turned off.
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-
| |
numerator-nonzero-forward : (implies (not (equal (numerator r) 0)) (and (not (equal r 0)) (acl2-numberp r))) :rule-classes ((:forward-chaining :trigger-terms ((numerator r))))) ; The following loops with the lemma equal-/ just proved but is ; sometimes useful. (encapsulate () (local (defthm Uniqueness-of-*-inverses-lemma (equal (equal (* x y) 1) (and (not (equal x 0)) (acl2-numberp x) (equal y (/ x))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
numerator-nonzero-forward
| |
Uniqueness-of-*-inverses : (equal (equal (* x y) 1) (and (not (equal (fix x) 0)) (equal y (/ x)))) :hints (("Goal" :in-theory (disable equal-/))))) (in-theory (disable Uniqueness-of-*-inverses)) (theory-invariant (not (and (active-runep '(:rewrite Uniqueness-of-*-inverses)) (active-runep '(:rewrite equal-/))))) (encapsulate () (local (defthm equal-/-/-lemma (implies (and (fc (acl2-numberp a)) (fc (acl2-numberp b)) (fc (not (equal a 0))) (fc (not (equal b 0)))) (equal (equal (/ a) (/ b)) (equal a b))) :hints (("Goal" :use ...
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Uniqueness-of-*-inverses
| |
equal- : /-/ (equal (equal (/ a) (/ b)) (equal (fix a) (fix b))) :hints (("Goal" :use equal-/-/-lemma :in-theory (disable equal-/)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-
| |
equal-*- : /-1 (implies (and (acl2-numberp x) (not (equal x 0))) (equal (equal (* (/ x) y) z) (and (acl2-numberp z) (equal (fix y) (* x z))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-*-
| |
equal-*- : /-2 (implies (and (acl2-numberp x) (not (equal x 0))) (equal (equal (* y (/ x)) z) (and (acl2-numberp z) (equal (fix y) (* z x))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-*-
| |
fold-consts-in-* : (implies (and (syntaxp (quotep x)) (syntaxp (quotep y))) (equal (* x (* y z)) (* (* x y) z))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
fold-consts-in-*
| |
times-zero : ;; We could prove an analogous rule about non-numeric coefficients, but
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
times-zero
| |
functional-commutativity-of-minus-*-right-lemma : (implies (and (fc (acl2-numberp x)) (fc (acl2-numberp y))) (equal (* x (- y)) (- (* x y)))) :hints (("Goal" :use (:functional-instance acl2-crg::functional-commutativity-of-minus-times-right (acl2-crg::equiv equal) (acl2-crg::pred acl2-numberp) (acl2-crg::plus binary-+) (acl2-crg::times binary-*) (acl2-crg::zero (lambda () 0)) (acl2-crg::minus unary--)))) :rule-classes nil))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
functional-commutativity-of-minus-*-right-lemma
| |
functional-commutativity-of-minus-*-right : (equal (* x (- y)) (- (* x y))) :hints (("Goal" :use functional-commutativity-of-minus-*-right-lemma)))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
functional-commutativity-of-minus-*-right
| |
functional-commutativity-of-minus-*-left : (equal (* (- x) y) (- (* x y))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
functional-commutativity-of-minus-*-left
| |
reciprocal-minus : (equal (/ (- x)) (- (/ x))) :hints (("Goal" :cases ((and (fc (acl2-numberp x)) (fc (not (equal x 0)))))))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
reciprocal-minus
| |
numerator-integerp-lemma-1 : (implies (rationalp x) (equal (* (* (numerator x) (/ (denominator x))) (denominator x)) (numerator x))) :rule-classes nil :hints (("Goal" :in-theory (disable rational-implies2))))) (local (defthm numerator-integerp-lemma (implies (and (rationalp x) (equal (* (numerator x) (/ (denominator x))) x)) (equal (numerator x) (* x (denominator x)))) :rule-classes nil :hints (("Goal" :use (numerator-integerp-lemma-1) :in-theory (disable rational-implies2)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
numerator-integerp-lemma-1
| |
numerator-when-integerp : (implies (integerp x) (equal (numerator x) x)) :hints (("Goal" :in-theory (disable rational-implies2) :use ((:instance lowest-terms (r x) (q 1) (n (denominator x))) rational-implies2 numerator-integerp-lemma))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
numerator-when-integerp
| |
integerp : ==>denominator=1 (implies (integerp x) (equal (denominator x) 1)) :hints (("Goal" :use (rational-implies2 numerator-when-integerp) :in-theory (disable rational-implies2))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
integerp
| |
equal-denominator-1 : (equal (equal (denominator x) 1) (or (integerp x) (not (rationalp x)))) :hints (("Goal" :use (rational-implies2 completion-of-denominator) :in-theory (disable rational-implies2))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
equal-denominator-1
| |
*-r-denominator-r : (equal (* r (denominator r)) (if (rationalp r) (numerator r) (fix r))) :hints (("Goal" :use ((:instance rational-implies2 (x r))) :in-theory (disable rational-implies2))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
*-r-denominator-r
| |
expt-type-prescription-realp : (implies (realp r) (realp (expt r i))) :rule-classes (:type-prescription :generalize))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-type-prescription-realp
| |
expt-type-prescription-rationalp : (implies (rationalp r) (rationalp (expt r i))) :rule-classes (:type-prescription :generalize))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-type-prescription-rationalp
| |
expt-type-prescription-positive : (implies (and (< 0 r) (real/rationalp r)) (< 0 (expt r i))) :rule-classes (:type-prescription :generalize))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-type-prescription-positive
| |
expt-type-prescription-nonzero : (implies (and (fc (acl2-numberp r)) (not (equal r 0))) (not (equal 0 (expt r i)))) :rule-classes (:type-prescription :generalize))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-type-prescription-nonzero
| |
expt-type-prescription-integerp : (implies (and (<= 0 i) (integerp r)) (integerp (expt r i))) :rule-classes (:type-prescription :generalize)) (in-theory
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-type-prescription-integerp
| |
Left-nullity-of-1-for-expt : ;; (equal (expt 1 i) 1))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Left-nullity-of-1-for-expt
| |
Right-unicity-of-1-for-expt : (equal (expt r 1) (fix r)) :hints (("Goal" :expand (expt r 1))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Right-unicity-of-1-for-expt
| |
expt-minus : (equal (expt r (- i)) (/ (expt r i))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-minus
| |
Exponents-add-for-nonneg-exponents : ;; We don't need that r is non-zero for this one. (implies (and (<= 0 i) (<= 0 j) (fc (integerp i)) (fc (integerp j))) (equal (expt r (+ i j)) (* (expt r i) (expt r j))))) (encapsulate () (local (defthm Exponents-add-negative-negative (implies (and (integerp i) (integerp j) (< i 0) (< j 0)) (equal (expt r (+ i j)) (* (expt r i) (expt r j)))) :rule-classes nil)) (local (defthm Exponents-add-positive-negative (implies (and (integerp i) (integerp j) (acl2-numberp r) (not (equal r 0)) (< 0 i) (< j 0...
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Exponents-add-for-nonneg-exponents
| |
Exponents-add : ; The first two (syntaxp) hypotheses below are new for Version_2.6. Without ; this change there can be looping with the definition of expt, for example on ; the following (thanks to Eric Smith for reporting the problem from which this ; example was culled). (By the way, this example is probably not a theorem; ; the point here is to avoid looping.) But see also ; Exponents-add-unrestricted. #| (thm (IMPLIES (AND (NOT (ZIP P)) (< 0 P) (< (* 2 (+ P -1) (/ (EXPT 2 (+ P -1)))) 1) (INTEGERP P) (< 1 P)...
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Exponents-add
| |
Exponents-add-unrestricted : ; The comment above in Exponents-add explains why we do not leave this rule ; enabled. But we include it in case it is of use. For example, Exponents-add ; is not sufficient for the proof of expt-is-increasing-for-base>1 in ; inequalities.lisp. (implies (and (not (equal 0 r)) (fc (acl2-numberp r)) (fc (integerp i)) (fc (integerp j))) (equal (expt r (+ i j)) (* (expt r i) (expt r j))))) (in-theory (disable Exponents-add-unrestricted))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Exponents-add-unrestricted
| |
Distributivity-of-expt-over-* : (equal (expt (* a b) i) (* (expt a i) (expt b i))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Distributivity-of-expt-over-*
| |
expt-1 : (equal (expt 1 x) 1))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
expt-1
| |
Exponents-multiply : (implies (and (fc (integerp i)) (fc (integerp j))) (equal (expt (expt r i) j) (expt r (* i j)))) :hints (("Goal" :cases ((not (acl2-numberp r)) (equal r 0)))))
|
theorem
|
arithmetic
|
[
"xdoc/top",
"cowles/acl2-crg",
"/meru1/cowles/acl2/ver2.5/acl2-sources/books/arithmetic/top-with-meta"
] |
arithmetic/equalities.lisp
|
Exponents-multiply
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.