Proof Assistant Projects
Collection
Digesting proof assistant libraries for AI ingestion. • 103 items • Updated • 3
statement stringlengths 1 193k | proof stringlengths 0 5.69M | type stringclasses 22
values | symbolic_name stringlengths 1 159 | library stringlengths 3 90 | filename stringlengths 18 123 | imports listlengths 0 0 | deps listlengths 0 64 | docstring stringclasses 1
value | source_url stringclasses 1
value | commit stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|
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)) | defun | acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"+"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-type-fc
(natp (acl2s-size x)) | :rule-classes
((:type-prescription)
(:forward-chaining :trigger-terms ((acl2s-size x)))) | defthm | acl2s-size-type-fc | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"natp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acons-acl2s-size-lemma
(= (acl2s-size (acons x1 x2 x3))
(+ 2 (acl2s-size x1)
(acl2s-size x2)
(acl2s-size x3))) | :rule-classes ((:rewrite)) | defthm | acons-acl2s-size-lemma | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"+",
"=",
"acl2s-size",
"x1",
"x2",
"x3"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-of-prod-cons1
(<= (acl2s-size std::y)
(acl2s-size (std::prod-cons std::x std::y))) | :rule-classes :linear | defthm | acl2s-size-of-prod-cons1 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-of-prod-cons2
(<= (acl2s-size std::x)
(acl2s-size (std::prod-cons std::x std::y))) | :rule-classes :linear | defthm | acl2s-size-of-prod-cons2 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-of-nth-linear | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"nth"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-of-nth-linear-weak
(<= (acl2s-size (nth i x))
(acl2s-size x)) | :rule-classes :linear | defthm | acl2s-size-of-nth-linear-weak | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"nth"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-of-nthcdr-linear | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-of-nthcdr-linear-weak
(<= (acl2s-size (nthcdr n x))
(acl2s-size x)) | :hints (("Goal" :in-theory (enable nthcdr)))
:rule-classes :linear | defthm | acl2s-size-of-nthcdr-linear-weak | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-when-member | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"member-equal"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | acl2s-size-of-remove-assoc-equal-upper-bound | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | tail-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | head-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | split-list-1-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | records-acl2s-size-linear-arith-<= | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"mget",
"no-nil-val-alistp",
"ordered-unique-key-alistp",
"recordp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | records-acl2s-size-linear-arith-<2 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"mget",
"no-nil-val-alistp",
"ordered-unique-key-alistp",
"recordp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | records-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"mget",
"no-nil-val-alistp",
"ordered-unique-key-alistp",
"recordp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-evens-weak
(<= (acl2s-size (evens x))
(acl2s-size x)) | :hints (("Goal" :induct (evens x)))
:rule-classes :linear | defthm | acl2s-size-evens-weak | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"evens"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-evens-strong
(implies (consp (cdr (double-rewrite x)))
(< (acl2s-size (evens x))
(acl2s-size x))) | :rule-classes ((:linear :backchain-limit-lst 1)) | defthm | acl2s-size-evens-strong | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"evens"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2-size-append
(<= (acl2-size (append x y))
(+ (acl2-size x) (acl2-size y) 1)) | :rule-classes ((:linear) (:rewrite)) | defthm | acl2-size-append | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"+",
"acl2-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-append-tlp | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"+",
"=",
"acl2s-size",
"true-listp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
rev-acl2s-size
(<= (acl2s-size (rev x))
(acl2s-size x)) | :hints (("Goal" :in-theory (e/d (rev))))
:rule-classes ((:linear)) | defthm | rev-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"rev"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | rev-acl2s-size-tlp | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"=",
"acl2s-size",
"rev",
"true-listp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-of-hons-remove-duplicates | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
len-<=-acl2s-size
(<= (len x) (acl2s-size x)) | :rule-classes :linear | defthm | len-<=-acl2s-size | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"len"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2-count-remove
(<= (acl2-count (remove a x))
(acl2-count x)) | :rule-classes :linear | defthm | acl2-count-remove | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"remove"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2-count-remove2
(<= (acl2-count (remove-equal a x))
(acl2-count x)) | :rule-classes :linear | defthm | acl2-count-remove2 | acl2s | books/acl2s/acl2s-size.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-built-in-1
(o-p (acl2s-size x)) | :rule-classes :built-in-clause | defthm | acl2s-size-built-in-1 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size",
"o-p"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-built-int
(integerp (acl2s-size x)) | :rule-classes :built-in-clause | defthm | acl2s-size-built-int | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-built-nat
(<= 0 (acl2s-size x)) | :rule-classes :built-in-clause | defthm | acl2s-size-built-nat | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-o<-<
(equal (o< (acl2s-size x) (acl2s-size y))
(< (acl2s-size x) (acl2s-size y))) | defthm | acl2s-size-o<-< | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
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)) | defthm | acl2s-size-built-in-2 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)) | defthm | acl2s-size-built-in-3 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | acl2s-size-built-in-4 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | acl2s-size-built-in-5 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | acl2s-size-built-in-6 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 | defthm | acl2s-size-built-in-7 | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"<",
"acl2s-size",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
acl2s-size-car-cdr-linear
(implies (consp x)
(equal (acl2s-size x)
(+ 1 (acl2s-size (car x))
(acl2s-size (cdr x))))) | :rule-classes :linear | defthm | acl2s-size-car-cdr-linear | acl2s | books/acl2s/acl2s-size.lisp | [] | [
"+",
"acl2s-size"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)
... | :rule-classes ((:rewrite :backchain-limit-lst 0)) | defthm | acl2s-default-mod-ratio | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"fix"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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... | :hints (("goal" :by acl2::cancel-floor-+))
:rule-classes ((:rewrite :backchain-limit-lst 2)) | defthm | acl2s::acl2s-cancel-floor-+ | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"-",
"find-cancelling-addends",
"in-term-order-+"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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... | :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)) | defthm | acl2s::acl2s-cancel-mod-+ | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"find-cancelling-addends",
"in-term-order-+"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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-+)))
... | :rule-classes ((:rewrite :backchain-limit-lst 2)) | defthm | acl2s::acl2s-prefer-positive-addends-<2 | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"-",
"<",
"find-negative-addend",
"fn-symb",
"in-term-order-+",
"lhs",
"rhs"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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)
'bina... | :rule-classes ((:rewrite :backchain-limit-lst 0)) | defthm | acl2s::acl2s-prefer-positive-addends-equal | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"find-negative-addend",
"fn-symb",
"in-term-order-+",
"lhs",
"rhs"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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... | :rule-classes ((:rewrite :backchain-limit-lst 1)) | defthm | acl2s::acl2s-reduce-additive-constant-< | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<",
"find-constant-addend",
"in-term-order-+",
"lhs",
"rhs",
"simplify-ok-p"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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
... | :rule-classes ((:rewrite :backchain-limit-lst 1)) | defthm | acl2s::acl2s-reduce-additive-constant-equal | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"find-constant-addend",
"in-term-order-+",
"lhs",
"rhs",
"simplify-ok-p"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
my-nonlinearp-default-hint (stable-under-simplificationp hist pspv) | ;; (declare (xargs :guard (and (consp pspv)
;; (consp (car pspv))
;; (consp (caar pspv))
;; (consp (cdaar pspv))
;; (consp (cddaar pspv))
;; (consp (cdr (cddaar pspv)))
;; (consp (cddr (cddaar pspv)))
;; ... | defun | my-nonlinearp-default-hint | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"access",
"hist"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
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 (... | defthm | numerator-1-decreases | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"-",
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
nat-ind (n :nat) | :nat
(if (zp n)
n
(nat-ind (- n 1))) | definec | nat-ind | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"-"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
pos-ind (n :pos) | :pos
(if (= n 1)
n
(pos-ind (- n 1))) | definec | pos-ind | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"-",
"="
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
int-ind (x :int) | :nat
(cond ((zip x) x)
((< x 0) (int-ind (1+ x)))
(t (int-ind (1- x)))) | definec | int-ind | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
nat-induction-scheme
t | :rule-classes
((:induction :pattern (integerp x)
:condition (and (integerp x) (>= x 0))
:scheme (nat-ind x))) | defthm | nat-induction-scheme | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"nat-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
pos-induction-scheme
t | :rule-classes
((:induction :pattern (integerp x)
:condition (and (integerp x) (>= x 1))
:scheme (pos-ind x))) | defthm | pos-induction-scheme | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"pos-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
int-induction-scheme
t | :rule-classes
((:induction :pattern (integerp x)
:condition (integerp x)
:scheme (int-ind x))) | defthm | int-induction-scheme | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"int-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
cancel-<-+-1
(equal (< (+ a b) a)
(< b 0)) | defthm | cancel-<-+-1 | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
cancel-<-+-2
(equal (< a (+ a b))
(< 0 b)) | defthm | cancel-<-+-2 | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
cancel-<-*-1
(implies (and (acl2-numberp a)
(< 0 a)
(rationalp b))
(equal (< (* a b) a)
(< b 1))) | :rule-classes ((:rewrite :backchain-limit-lst 1)) | defthm | cancel-<-*-1 | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"*",
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
cancel-<-*-2
(implies (and (acl2-numberp a)
(< 0 a)
(rationalp b))
(equal (< a (* a b))
(< 1 b))) | :rule-classes ((:rewrite :backchain-limit-lst 1)) | defthm | cancel-<-*-2 | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"*",
"<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
numerator-n-decreases
(implies (and (rationalp r)
(<= n r)
(integerp n)
(< 0 n))
(< (numerator (+ (- n) r))
(numerator r))) | :hints (("goal" :induct (pos-ind n))
("subgoal *1/2.2"
:use ((:instance numerator-1-decreases
(n (+ r (- n) 1))))))
:rule-classes ((:linear) (:rewrite)) | defthm | numerator-n-decreases | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"-",
"<",
"numerator-1-decreases",
"pos-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
replace-o<-with-<
(implies (and (natp x)
(natp y))
(equal (o< x y)
(< x y))) | :hints (("goal" :in-theory (enable o<)))
:rule-classes ((:rewrite :backchain-limit-lst 2)) | defthm | replace-o<-with-< | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"<",
"natp",
"o<"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
mod-plus-simplify-a<n-+b
(implies (and (non-neg-rationalp a)
(< a n))
(equal (equal (+ a (mod b n)) b)
(and (equal a 0)
(equal (mod b n) b)))) | :hints (("goal" :cases ((rationalp n)))) | defthm | mod-plus-simplify-a<n-+b | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<",
"non-neg-rationalp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
mod-plus-simplify-b<n-+b
(implies (and (acl2-numberp a)
(non-neg-rationalp b)
(< b n))
(equal (equal (+ a (mod b n)) b)
(equal a 0))) | defthm | mod-plus-simplify-b<n-+b | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<",
"non-neg-rationalp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
mod-plus-simplify-a<n-+b+n
(implies (and (non-neg-rationalp a)
(< a n))
(equal (equal (+ a (mod b n))
(+ n b))
(and (equal a 0)
(< b 0)
(equal (mod b n) (+ b n))))) | defthm | mod-plus-simplify-a<n-+b+n | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<",
"non-neg-rationalp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
mod-plus-simplify-b<n-+b+n
(implies (and (non-neg-rationalp b)
(< b n))
(equal (equal (+ a (mod b n))
(+ n b))
(or (and (equal a 0)
(< b 0)
(equal (mod b n) (+ b n)))
(and ... | defthm | mod-plus-simplify-b<n-+b+n | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"+",
"<",
"non-neg-rationalp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
|(x*y mod m)/y = x|
(implies (and (acl2-numberp y)
(/= y 0)
(acl2-numberp x)
(acl2-numberp m))
(equal (equal (* (/ y) (mod (* x y) m)) x)
(equal (mod (* x y) m) (* x y)))) | defthm | |(x*y mod m)/y = x| | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"*"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
odd-times-odd-is-odd
(implies (and (integerp n)
(integerp m))
(equal (integerp (* 1/2 n m))
(or (integerp (* 1/2 n))
(integerp (* 1/2 m))))) | :hints (("goal" :induct (int-ind m))) | defthm | odd-times-odd-is-odd | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"*",
"int-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
expt-n-m-even-if-n-even
(implies (and (integerp n)
(integerp m)
(< 0 m))
(equal (integerp (* 1/2 (expt n m)))
(integerp (* 1/2 n)))) | :hints (("goal" :induct (nat-ind m))
("subgoal *1/2.2" :in-theory (disable acl2::normalize-factors-gather-exponents)
:expand ((expt n m)))
("subgoal *1/2.1" :in-theory (disable acl2::normalize-factors-gather-exponents)
:expand ((expt n m)))) | defthm | expt-n-m-even-if-n-even | acl2s | books/acl2s/base-arithmetic.lisp | [] | [
"*",
"<",
"nat-ind"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
tl-fix (x) | `(acl2::true-list-fix ,x) | defmacro | tl-fix | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
bin-app (x :tl y :tl) | :tl
(if (endp x)
y
(cons (car x) (bin-app (cdr x) y))) | definec | bin-app | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
app-assoc
(implies (and (tlp x) (tlp y) (tlp z))
(equal (app (app x y) z)
(app x (app y z)))) | defthm | app-assoc | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
app-nil
(implies (tlp x)
(equal (app x nil) x)) | defthm | app-nil | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
app-of-cons
(implies (and (tlp x) (tlp y))
(equal (app (cons a x) y)
(cons a (app x y)))) | defthm | app-of-cons | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
app-of-rcons
(implies (and (tlp x) (tlp y))
(equal (app (acl2::rcons a x) y)
(app x (cons a y)))) | :hints (("goal" :in-theory (enable acl2::rcons))) | defthm | app-of-rcons | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
app-under-iff
(implies (and (tlp x) (tlp y))
(iff (app x y)
(or x y))) | defthm | app-under-iff | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"iff",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
app-of-repeat-to-cons-of-same
(implies (tlp x)
(equal (app (repeat n a) (cons a x))
(cons a (app (repeat n a) x)))) | :hints (("goal" :in-theory (enable repeat))) | defthm | app-of-repeat-to-cons-of-same | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"repeat",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
app-when-prefixp
(implies (and (tlp x) (tlp y) (acl2::prefixp x y))
(equal (app x (nthcdr (len x) y))
y)) | :hints (("goal" :in-theory (enable acl2::prefixp))) | defthm | app-when-prefixp | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"len",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
app-of-take-and-nthcdr
(implies (and (tlp x)
(<= (nfix n) (len x)))
(equal (app (take n x) (nthcdr n x))
x)) | defthm | app-of-take-and-nthcdr | acl2s | books/acl2s/base-lists.lisp | [] | [
"app",
"len",
"tlp"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | ||
== (x y) | `(equal ,x ,y) | defmacro | == | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
=/= (x y) | `(not (equal ,x ,y)) | defmacro | =/= | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
!= (x y) | `(not (equal ,x ,y)) | defmacro | != | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
=> (x y) | `(implies ,x ,y) | defmacro | => | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
-> (x y) | `(implies ,x ,y) | defmacro | -> | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
<- (x y) | `(implies ,y ,x) | defmacro | <- | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
! (x) | `(not ,x) | defmacro | ! | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
^ (&rest args) | `(and ,@args) | defmacro | ^ | acl2s | books/acl2s/base-lists.lisp | [] | [
"args"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
v (&rest args) | `(or ,@args) | defmacro | v | acl2s | books/acl2s/base-lists.lisp | [] | [
"args"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
in (a :all X :tl) | :bool
(and (consp X)
(or (== a (car X))
(in a (cdr X)))) | definec | in | acl2s | books/acl2s/base-lists.lisp | [] | [
"=="
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
nin (a :all X :tl) | :bool
(not (in a X)) | definec | nin | acl2s | books/acl2s/base-lists.lisp | [] | [
"in"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
left (x :cons) | :all
(car x) | definec | left | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
right (x :cons) | :all
(cdr x) | definec | right | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
head (x :ne-tl) | :all
(car x) | definec | head | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
tail (x :ne-tl) | :tl
(cdr x) | definec | tail | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lcons (x :all y :tl) | :ne-tl
(cons x y) | definec | lcons | acl2s | books/acl2s/base-lists.lisp | [] | [] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lnth (n :nat l :tl) | :all
:pre (< n (len l))
(nth n l) | definec | lnth | acl2s | books/acl2s/base-lists.lisp | [] | [
"<",
"len",
"nth"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lnthcdr (n :nat l :tl) | :tl
:pre (<= n (len l))
(nthcdr n l) | definec | lnthcdr | acl2s | books/acl2s/base-lists.lisp | [] | [
"len"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
gen-car-cdr-defs-fn
(l :l-str-all prefix :string suffix :string pkg :string) | :all
:pre (!= pkg "")
(if (endp l)
l
(b* ((mname (defdata::s+ (str::cat prefix (caar l) suffix) :pkg pkg))
(x (fix-intern$ "X" pkg)))
(cons
`(defmacro ,mname (,x)
,(cadar l))
(gen-car-cdr-defs-fn (cdr l) prefix suffix pkg)))) | definec | gen-car-cdr-defs-fn | acl2s | books/acl2s/base-lists.lisp | [] | [
"!=",
"b*",
"fix-intern$",
"prefix",
"suffix"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
gen-car-cdr-macros-fn
(car :var cdr :var carstr :string cdrstr :string prefix :string
suffix :string depth :nat pkg :string) | :all
:pre (!= pkg "")
:skip-tests t
(let ((l (gen-car-cdr-aux car cdr carstr cdrstr depth nil)))
`(encapsulate
()
,@(gen-car-cdr-defs-fn l prefix suffix pkg))) | definec | gen-car-cdr-macros-fn | acl2s | books/acl2s/base-lists.lisp | [] | [
"!=",
"depth",
"gen-car-cdr-defs-fn",
"let",
"prefix",
"suffix"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
gen-car-cdr-macros
(car cdr carstr cdrstr prefix suffix depth) | `(make-event
(gen-car-cdr-macros-fn
',car ',cdr ,carstr ,cdrstr ,prefix ,suffix ,depth
(current-package state))) | defmacro | gen-car-cdr-macros | acl2s | books/acl2s/base-lists.lisp | [] | [
"depth",
"gen-car-cdr-macros-fn",
"prefix",
"suffix"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lcar (x) | `(head ,x) | defmacro | lcar | acl2s | books/acl2s/base-lists.lisp | [] | [
"head"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lcdr (x) | `(tail ,x) | defmacro | lcdr | acl2s | books/acl2s/base-lists.lisp | [] | [
"tail"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 | |
lcaar (x) | `(head (head ,x)) | defmacro | lcaar | acl2s | books/acl2s/base-lists.lisp | [] | [
"head"
] | https://github.com/acl2/acl2 | 07f555a773a64f355faffc8e12f905822cf22956 |
A structured dataset of theorems and functions from the ACL2 Community Books, one of the largest collections of formally verified libraries.
07f555a773a64f355faffc8e12f905822cf22956| Column | Type | Description |
|---|---|---|
| statement | string | Declaration signature/claim with the leading keyword removed (verbatim slice); the full declaration minus its proof |
| proof | string | Verbatim proof/body, empty if the declaration has none |
| type | string | Declaration keyword |
| symbolic_name | string | Declaration identifier |
| library | string | Sub-library |
| filename | string | Repository-relative source path |
| imports | list[string] | File-level Require/Import modules |
| deps | list[string] | Intra-corpus identifiers referenced |
| docstring | string | Preceding documentation comment, empty if absent |
| source_url | string | Upstream repository |
| commit | string | Upstream commit extracted |
| Type | Count |
|---|---|
| defthm | 96,871 |
| defun | 40,084 |
| define | 20,439 |
| defthmd | 15,966 |
| defund | 8,347 |
| defmacro | 6,119 |
| defconst | 4,301 |
| local-defthm | 3,291 |
| defrule | 2,992 |
| defruled | 1,803 |
| defcong | 1,238 |
| defun-sk | 678 |
| property | 628 |
| defstub | 356 |
| defun-nx | 247 |
| definec | 222 |
| defequiv | 172 |
| defrefinement | 109 |
| defaxiom | 72 |
| defchoose | 54 |
| defund-nx | 24 |
| defpred | 5 |
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))
acl2s-size | books/acl2s/acl2s-size.lispEach declaration is split into a statement (signature/claim) and a proof (body) that are disjoint
and together form the complete declaration, for proof modeling, autoformalization, retrieval, and
dependency analysis via deps.
@misc{acl2_dataset,
title = {ACL2},
author = {Norton, Charles},
year = {2026},
note = {Extracted from https://github.com/acl2/acl2, commit 07f555a773a6},
url = {https://huggingface.co/datasets/phanerozoic/ACL2}
}