Commit graph

318 commits

Author SHA1 Message Date
Leonardo de Moura
8ee214f133 checkpoint: new numeral encoding 2015-11-08 14:04:55 -08:00
Leonardo de Moura
07b33ec75e fix(library/data/int,library/data/rat): int and rat 2015-11-08 14:04:54 -08:00
Leonardo de Moura
744d1cba3d feat(library,hott,frontends/lean): avoid keywords with hyphen 2015-11-08 14:04:54 -08:00
Leonardo de Moura
3369152559 fix(library/data,library/theories): fin, bag, finset, hf, list, ... 2015-11-08 14:04:54 -08:00
Leonardo de Moura
e6d7e89419 fix(library/data/int,library/data/nat): nat and int 2015-11-08 14:04:54 -08:00
Leonardo de Moura
a618bd7d6c refactor(library): use type classes for encoding all arithmetic operations
Before this commit we were using overloading for concrete structures and
type classes for abstract ones.

This is the first of series of commits that implement this modification
2015-11-08 14:04:54 -08:00
Leonardo de Moura
06e35b4863 fix(library/algebra/numeral): remove redundant definitions 2015-11-08 14:04:54 -08:00
Leonardo de Moura
e4f0f6a9b4 feat(library): numeral normalization skeleton 2015-10-08 12:49:12 -07:00
Sebastian Ullrich
d1b5031dbd feat(library): add some spacing hints 2015-09-30 17:36:32 -07:00
Jeremy Avigad
aa8dfba5a5 feat/fix(library/algebra/*): add some useful theorems, fix implicit arguments 2015-09-20 20:47:30 -04:00
Rob Lewis
8fef4a95d4 chore(library/algebra/ordered_field): generalize theorem from reals 2015-09-17 16:23:22 -04:00
Rob Lewis
f5dcb1e0a9 feat(library/algebra): add missing theorems to algebra library 2015-09-16 08:28:11 -07:00
Jeremy Avigad
948cdee366 feat(library/algebra/ordered_group): add variant of triangle inequality 2015-09-12 21:46:09 -04:00
Jeremy Avigad
1affeec3c6 fix(library/algebra/ordered_filed): rename theorems 2015-09-12 21:46:09 -04:00
Rob Lewis
8d1f449491 refactor(library/data/real): move and rename theorems 2015-09-11 08:52:53 -07:00
Leonardo de Moura
3c1d6ec67a feat(library/algebra/algebra): add link to complete lattices module 2015-09-04 13:04:36 -07:00
Sebastian Reuße
f8a773be11 chore(library/algebra): remove obsolete link. 2015-09-04 09:41:34 +02:00
Jeremy Avigad
2ab7928257 refactor(library/data/set/basic): standardize intro and elim theorem names 2015-09-03 15:38:27 -07:00
Jeremy Avigad
51e0d31304 refactor(library/algebra/ordered_ring,ordered_field): move theorems from ordered_field to ordered_ring 2015-09-01 14:47:19 -07:00
Jeremy Avigad
7d72c9b6b5 refactor(library/algebra/{field,ordered_field}, library/*): more renaming, setting implicit arguments
Many theorems for division rings and fields have stronger versions for discrete fields, where we
assume x / 0 = 0. Before, we used primes to distinguish the versions, but that has the downside
that e.g. for rat and real, all the theorems are equally present. Now, I qualified the weaker ones
with division_ring.foo or field.foo. Maybe that is not ideal, but let's try it.

I also set implicit arguments with the following convention: an argument to a theorem should be
explicit unless it can be inferred from the other arguments and hypotheses.
2015-09-01 14:47:19 -07:00
Jeremy Avigad
93c2d1e9d0 refactor(library/algebra/ordered_field): rename theorems to maintain consistency with other parts of the library 2015-09-01 14:47:19 -07:00
Jeremy Avigad
7dda69fec7 feat/refactor(library/theories/number_theory/irrational_roots,library/*): show nth roots irrational, and add lots of missing theorems 2015-08-16 23:23:23 -04:00
Jeremy Avigad
e416291135 feat(library/algebra/*,library/data/*): small additions and changes 2015-08-14 18:49:57 -07:00
Jeremy Avigad
4a36f843f7 refactor(library/algebra/group_power,library/*): change definition of pow
I changed the definition of pow so that a^(succ n) reduces to a * a^n rather than a^n * a.

This has the nice effect that on nat and int, where multiplication is defined by recursion on the right,
a^1 reduces to a, and a^2 reduces to a * a.

The change was a pain in the neck, and in retrospect maybe not worth it, but oh, well.
2015-08-14 18:49:57 -07:00
Jeremy Avigad
f9f4cd2197 feat(library/algebra/ordered_field,library/data/int/div): prove sign a = a / abs a 2015-08-14 18:49:57 -07:00
Leonardo de Moura
cb9830beaf refactor(library/logic/choice): move prop_decidable instance into namespace 'classical' 2015-08-12 17:06:15 -07:00
Leonardo de Moura
f9b2b93f7a refactor(library/algebra/complete_lattice): add alternative definitions of complete_lattice and convertions between them 2015-08-09 20:40:07 -07:00
Jeremy Avigad
b130a144c8 feat(library/data/set/filter): add filters, show they form a complete lattice 2015-08-09 22:14:25 -04:00
Jeremy Avigad
eca3437388 refactor(library/algebra/ring): add alternate names for dvd.intro, dvd.intro_left 2015-08-09 22:13:18 -04:00
Leonardo de Moura
7ddcfa5225 feat(library/algebra/complete_lattice): add basic theorems for complete_lattices 2015-08-08 23:18:36 -07:00
Jeremy Avigad
f97298394b feat(library/data/nat/bigops,library/data/set/card,library/*): add set versions of bigops for nat
This required splitting data/set/card.lean from data/set/finite.lean, to avoid dependencies
2015-08-08 17:20:23 -04:00
Leonardo de Moura
ecf9c825ac feat(library/algebra/complete_lattice): add 'complete_lattice' structure 2015-08-08 07:38:49 -07:00
Jeremy Avigad
fce042ef79 feat(library/algebra/group_set_bigops.lean): add set versions of bigops 2015-08-08 04:23:52 -07:00
Jeremy Avigad
eaf886cb5a refactor(library/algebra/group_bigops,library/*): put group_bigops in 'finset' namespace, in preparation for set versions 2015-08-08 04:23:52 -07:00
Rob Lewis
00262e4e47 feat(library/algebra): finish adding one-directional versions of iff theorems 2015-08-07 13:30:23 -07:00
François G. Dorais
fc6b41ee0e fix(algebra/group_power): change notation suggested by @avigad 2015-08-04 16:23:31 -04:00
François G. Dorais
155e22c92c feat(library/algebra/group_power): add times (additive variant of power) 2015-08-04 16:23:31 -04:00
Jeremy Avigad
9ff0097223 refactor(library/algebra/{lattice,order},library/data/nat): split lattice from order, make nat an instance of discrete linear order 2015-08-03 22:41:56 -04:00
Jeremy Avigad
0def951efa refactor(library/data/nat/sub,*): get rid of diff, tidy some max and min theorems 2015-08-03 22:41:56 -04:00
François G. Dorais
131b344519 feat(library/algebra/group_power): add times (additive variant of power) 2015-08-04 01:58:57 +02:00
Rob Lewis
e004ed8cba feat(library/algebra): add one directional versions of iff theorems 2015-08-03 17:16:18 -04:00
Rob Lewis
82a9bc757a feat(library/algebra): move theorems from real to algebra 2015-08-03 15:01:32 -04:00
Leonardo de Moura
a53ac25ca8 chore(library): remove outdated comments 2015-07-31 08:37:24 -07:00
Rob Lewis
1693932c9f feat(library/algebra/group): add theorem to comm group 2015-07-31 08:28:37 -07:00
Rob Lewis
f929f82cb4 feat(library/data/real): fill in remaining sorrys in supremum property proof 2015-07-31 08:28:36 -07:00
Rob Lewis
f88038c3e7 feat(library/algebra/field): add missing theorems to field 2015-07-31 08:28:36 -07:00
Rob Lewis
2fdf1e599e feat(library/algebra/ordered_group): add missing theorems to ordered group 2015-07-31 09:10:57 -04:00
Rob Lewis
c9daf7cbb9 feat(library/algebra/ordered_field): add missing theorems to ordered field 2015-07-31 09:10:57 -04:00
Rob Lewis
d63010b7df feat(library/data/real): prove more about embedding Q into R 2015-07-31 09:10:57 -04:00
Leonardo de Moura
88c659c54e feaf(library): make sure basic standard library can be compiled with option "--to_axiom"
We use this option to erase proofs when generating the javascript
version. The proofs are erased to minimize the size of the file that
must be downloaded by users
2015-07-29 16:11:23 -07:00
Leonardo de Moura
308af87b69 feat(library): add 'noncomputable' keyword for the standard library 2015-07-28 21:56:35 -07:00
Mario Carneiro
066b0fcdf9 feat(library): clean up "sorry"s in library
Breaking changes: pnat was redefined to use subtype instead of a custom inductive type, which affects the notation for pnat 2 and 3
2015-07-24 12:21:33 -04:00
Leonardo de Moura
0de715ae54 refactor(library/data): cleanup proofs using new features 2015-07-21 09:57:10 -07:00
Leonardo de Moura
48f8b8f18d refactor(library): use new 'suppose'-expression 2015-07-19 21:15:20 -07:00
Leonardo de Moura
ade60278d0 refactor(library): rename iff.mp' to iff.mpr 2015-07-18 08:52:58 -05:00
Haitao Zhang
5ffcd2a2d8 feat(library/algebra/group): add definitions and lemmas of conjugation 2015-07-15 19:36:18 -07:00
Haitao Zhang
f4cbd98692 feat(library/algebra/group): add theorem eq_inv_of_mul_eq_one 2015-07-15 18:43:47 -07:00
Haitao Zhang
516333ad65 feat(library/algebra/group_bigops): add Prodl theorems 2015-07-15 14:49:53 -04:00
Jeremy Avigad
2e3b1b04cd feat(library/algebra/ring_power): add properties of power in ring structures 2015-07-07 21:05:48 -07:00
Jeremy Avigad
31aeff95d5 refactor(library/algebra/ordered_ring): remove 0 ~= 1 from ordered_semiring, add 0 < 1 to linear_ordered_semiring 2015-07-07 21:05:48 -07:00
Leonardo de Moura
77d5657813 refactor(library/algebra/function): move function.lean to init folder
Motivation: this file defines basic things such as function composition.
In the HoTT library, it is located in the init folder.
2015-07-06 07:29:56 -07:00
Leonardo de Moura
14f7e3de94 fix(library/algebra): missing file 2015-06-30 18:15:13 -07:00
Leonardo de Moura
cf574d0127 feat(library): assign priorities to notation declarations in the standard library
Now, even if the user opens the namespaces in the "wrong" order, the
notation + coercions will behave as expected.
2015-06-30 17:38:13 -07:00
Jeremy Avigad
130eb3f6d9 fix(library/data/int/basic): change notation from -[n+1] to -[1+n] to avoid conflict e.g. with -[coercions] 2015-06-29 15:23:11 +10:00
Jeremy Avigad
3bf18c174e feat(library/algebra/ordered_group): define abs in terms of max, make some theorems constructively valid 2015-06-29 15:23:11 +10:00
Jeremy Avigad
1a164d8fc9 feat(library/algebra/ordered_group): add theorems for max and min 2015-06-29 15:23:11 +10:00
Jeremy Avigad
70e551c6d6 feat(library/algebra/order,library/data/nat/order,library/*): instantiate nat to lattice, add theorems 2015-06-29 15:23:11 +10:00
Jeremy Avigad
93e5124d71 feat(library/algebra/order): add lattices, min, max 2015-06-29 15:23:11 +10:00
Jeremy Avigad
0d25831111 refactor(library/algebra/order): cleanup, and remove unused class 2015-06-29 15:23:11 +10:00
Leonardo de Moura
52564ecc0f refactor(library/algebra/group_power): open namespaces in the "right" order 2015-06-27 14:51:00 -07:00
Leonardo de Moura
ca0aa4eb47 feat(library/composition_manager): simplify compositions of the form (mk ... (proj (mk ...)) ...)
closes #666
2015-06-27 14:07:32 -07:00
Leonardo de Moura
3215af3926 feat(frontends/lean): add '[trans-instance]' attribute
see issue #666
2015-06-27 14:07:29 -07:00
Leonardo de Moura
c9f3b766f8 refactor(library/algebra/category/constructions): modify proof
It was affected by the new way of handling projections that we will implement
2015-06-25 17:48:26 -07:00
Rob Lewis
82950e1c52 chore(library/algebra/ordered_field): remove redundant line in calc 2015-06-25 17:30:12 -07:00
Leonardo de Moura
018518f0cf refactor(library/algebra/ring): more robust proofs 2015-06-22 15:31:03 -07:00
Leonardo de Moura
7ffabeb245 refactor(library/algebra/group): avoid abuse of rewrite tactic
The two instances are relying on the fact that (a - b) reduces to (a + -b)
2015-06-22 15:11:14 -07:00
Leonardo de Moura
cfafc90cc0 refactor(hott,library): make sure files compile even without using "projection macros" 2015-06-22 12:22:11 -07:00
Leonardo de Moura
5f293cee9c refactor(library/algebra/ordered_field): improve compilation time 2015-06-18 16:12:24 -07:00
Rob Lewis
f7ab2780d4 feat(library/algebra): move more theorems from reals to algebra) 2015-06-16 11:30:12 -07:00
Rob Lewis
b94d0a948d chore(library/data/real): replace theorems with more general versions from algebra 2015-06-16 11:30:12 -07:00
Rob Lewis
b23e23061f feat(library/algebra): finish/move more general theorems from reals to algebra) 2015-06-16 11:30:12 -07:00
Rob Lewis
ff0ba6687e feat(library/algebra/ordered_field): move identity about abs to ordered_field 2015-06-16 11:30:12 -07:00
Rob Lewis
1f4765e30a feat(library/algebra/ordered_ring): add theorems used for rational upper bounds 2015-06-16 11:30:12 -07:00
Rob Lewis
4b38e14586 feat(library/algebra/ordered_field): add a couple missing theorems to ordered_field 2015-06-16 11:30:12 -07:00
Jeremy Avigad
3b010b8c92 feat({library,hott}/algebra/group): add abbreviations e.g. for mul.cancel_left 2015-06-15 22:53:11 +10:00
Leonardo de Moura
1bffb89126 fix(library/algebra/function): lean was failing to infer that injective is a decidable predicate for finite types with decidable equality
This is an issue reported by Haitao.
2015-06-09 15:30:58 -07:00
Rob Lewis
d287b20018 chore(library/data/real): move more lemmas to algebra 2015-06-09 16:27:55 +10:00
Rob Lewis
7822ba9dee feat(library/algebra): add lemmas to group and ordered group 2015-06-09 16:14:21 +10:00
Jeremy Avigad
e59400b58c feat(library/data/int/{div,gcd}): add some theorems, to reduce rationals 2015-06-08 22:43:51 +10:00
Jeremy Avigad
df69bb4cfc feat(library/*): add theorems from Haitao on sets and functions, clean up 2015-06-04 11:55:25 -07:00
Jeremy Avigad
03952ae12c feat(library/logic/{connectives,identities},library/algebra/function): cleanup and some additions from Haitao Zhang 2015-06-04 11:55:25 -07:00
Jeremy Avigad
ffa648a090 feat/refactor(library/*): various additions and improvements 2015-06-01 12:35:44 +10:00
Jeremy Avigad
b76445df39 feat(library/data/{nat,int}/div.lean,*): improve and extend div in nat and int 2015-05-30 22:10:21 +10:00
Jeremy Avigad
cc0a620db1 feat(library/data/{nat,int}/div.lean): add to and improve div library 2015-05-30 22:10:21 +10:00
Rob Lewis
4b67cd1f97 feat(library/algebra): update algebraic hierarchy to be more constructive 2015-05-29 14:11:50 +10:00
Rob Lewis
eb537daa1c feat(library/algebra): add min/max to ordered algebraic structures 2015-05-26 11:45:09 +10:00
Jeremy Avigad
39129f112b refactor(library/*): do various renamings 2015-05-25 16:50:42 -07:00
Jeremy Avigad
fdc89cd285 refactor(library/algebra/order.lean,library/{data,algebra}/*): use better names for order theorems 2015-05-25 16:50:42 -07:00
Jeremy Avigad
7c92161e49 refactor(library/data/finset/basic.lean): change order of arguments to induction tactic 2015-05-25 16:50:42 -07:00
Jeremy Avigad
8bebd104ff refactor(library/*): remove 'Module:' lines 2015-05-23 20:52:23 +10:00