Sebastian Ullrich
f024ccd75d
refactor(frontends/lean/token_table,library): take ~> assume
2017-07-05 11:20:10 -07:00
Leonardo de Moura
5cef84709f
refactor(library): avoid auxiliary definitions such as add/mul/le/etc
...
See Section "Other goodies" at
https://github.com/leanprover/lean/wiki/Refactoring-structures
This commit also improves the support for projections in the
unifier/matcher.
Now, we consider the extra case-split for projections.
Given a projection `proj`, and the constraint `proj s =?= proj t`, we need to try first `s =?= t` and if it fails, then try to reduce.
This is needed in the standard library because we now have constraints such as:
```
@has_le.le ?A ?s ?a ?b =?= @has_le.le nat nat.has_add x y
```
If we reduce the right hand side, we get the unsolvable constraint
```
@has_le.le ?A ?s ?a ?b =?= nat.le x y
```
Before this change, the constraint was `@le ?A ?s ?a ?b =?= @le nat nat.has_add x y`, and we already perform a case-split in this case.
Moreover, projections were eagerly reduced whenever possible.
The extra case-split generates a performance problem in several tests. For example `fib 8 = 34` was timing out.
I worked around this issue by performing the case-split only when the constraint contains meta-variables.
There are also minor issues. Example. `<` is notation for `has_lt.lt`, but `>` is for `gt`.
2017-05-01 08:52:19 -07:00
Leonardo de Moura
32e6442d0a
feat(frontends/lean): no global universes in the frontend
2017-02-08 17:23:04 -08:00
Leonardo de Moura
52db1f1419
feat(library/data/set): add basic lemmas for demoing the AC procedure
2016-12-29 15:29:33 -08:00
Leonardo de Moura
d97e5b5061
chore(library): remove old files
2016-09-21 11:46:40 -07:00
Sebastian Ullrich
fd2c42a8bf
chore(library, tests): switch to new attribute declaration syntax
...
sed -Ei 's/^(\s*)((private |protected )?(noncomputable )?(abbreviation|definition|meta_definition|theorem|lemma|proposition|corollary)\s+\S+\s*)((\s*\[(\S+(\s+[0-9]+)*|priority.*)\])+)\s*/\1attribute \6\n\1\2/' library/**/*.lean tests/**/*.lean
sed -Ei 's/\s+$//' library/**/*.lean # remove trailing whitespace
2016-08-12 15:36:12 -07:00
Sebastian Ullrich
e090326f98
fix(library): remove classical instances from global scope
2016-07-29 23:44:23 -04:00
Leonardo de Moura
de237fa6e4
chore(library/coercion): disable coercion attribute
2016-07-29 13:15:10 -07:00
Jeremy Avigad
87252bbffe
fix(library/data/set/basic): add spaces in notation for bounded quantifiers
2016-03-03 11:50:40 -05:00
Jeremy Avigad
4050892889
refactor(library/*): rename 'compose' to 'comp'
2016-03-02 22:48:05 -05:00
Leonardo de Moura
fbe5188480
refactor(frontends/lean): remove 'by+' and 'begin+' tokens
2016-02-29 13:45:43 -08:00
Leonardo de Moura
79ba2638b7
fix(library/data/set/equinumerosity): add missing 'using'
2016-02-29 13:29:03 -08:00
Leonardo de Moura
faa0031d4e
refactor(library,hott): remove 'by+' and 'begin+'
2016-02-29 13:15:48 -08:00
Leonardo de Moura
deb1b3dc79
refactor(library): replace assert-exprs with have-exprs
2016-02-29 11:53:26 -08:00
Leonardo de Moura
101cf1ec4c
feat(frontends/lean): remove difference between 'have' and 'assert'
2016-02-29 11:28:20 -08:00
Leonardo de Moura
768ba1c363
refactor(library/hott): remove more unnecessary annotations
2016-02-25 14:30:00 -08:00
Jeremy Avigad
158acf878d
feat(library/data/set/filter): work in material from Jacob Gross
2016-02-22 11:25:23 -08:00
Jeremy Avigad
41342f53df
refactor(library/data/set/filter): get filters working with complete lattice notation
2016-02-22 11:25:23 -08:00
Jeremy Avigad
7fe71c972f
feat(library/data/set/basic): add theorems for bounded unions and intersections
2016-02-22 11:25:23 -08:00
Jeremy Avigad
518a77587a
refactor(library/data/{set,finset},library/*): use compl for set and finset complement
2016-02-22 11:25:23 -08:00
Jeremy Avigad
769ae6830d
feat(library/data/set/function): add facts about preimages
2016-02-22 11:25:23 -08:00
Jeremy Avigad
a72f6666e8
feat(library/data/set/basic): add two theorems
2016-02-22 11:25:23 -08:00
Jeremy Avigad
b8d3f34d14
feat(library/data/set/basic): add a couple of theorems
2016-02-22 11:25:23 -08:00
Rob Lewis
68bc41b5fe
feat(data/set): add missing set theorems
2016-02-12 11:50:11 -08:00
Rob Lewis
eb05741ce6
feat(data/set): add missing set membership theorems
2016-02-12 11:50:10 -08:00
Jeremy Avigad
53b2d90c90
feat(library/data/{set,finset}): add some useful facts
2016-01-24 16:26:57 -08:00
Johannes Hölzl
6d6a00f48b
refactor(library/algebra): fix theorem names
2016-01-06 10:57:55 -08:00
Johannes Hölzl
9c28552afb
feat(library/algebra): add lattice instances for Prop, fun, and set
...
Adds weak_order, lattice and complete_lattice instances for Prop, fun, and set. Adds supporting
theorems to various other places.
2016-01-06 10:57:32 -08:00
Jeremy Avigad
4289daddcb
refactor(library/data/{set,finset}/basic,library/*): change notation for image to tick mark
2016-01-03 18:52:25 -08:00
Jeremy Avigad
17f6ab3a71
fix(library/data/set/basic): fix spacing in notation
2016-01-03 18:52:25 -08:00
Jeremy Avigad
173368801b
fix(library/algebra/interval): rename namespace, and move a theorem
2016-01-03 18:52:25 -08:00
Jeremy Avigad
721f6c87bf
feat(library/data/set/basic): add some theorems
2016-01-03 18:52:25 -08:00
Leonardo de Moura
4f1415174e
refactor(library/data): "union." ==> "union_", "inter." ==> "inter_"
2016-01-01 16:13:44 -08:00
Jeremy Avigad
86b64cf43b
feat(library/data/set/*,library/algebra/group_bigops): better finiteness lemmas, reindexing for big operations
2015-12-31 15:16:57 -08:00
Jeremy Avigad
549feb5d7f
feat(library/data/set/basic): add notation and theorems for large unions and intersections
2015-12-26 08:02:04 -08:00
Jeremy Avigad
baf11d0018
feat(library/algebra/ring_bigops): make start on file with more properties of sums and products
2015-12-22 16:39:13 -05:00
Leonardo de Moura
ef546c5c5b
refactor(library): use anonymous instance implicit arguments
2015-12-13 11:46:48 -08:00
Jacob Gross
ab91f8dd5f
feat(library/data/set/basic): add sInter_insert
...
add sInter supporting lemma
2015-12-07 21:39:30 -08:00
Leonardo de Moura
b94e31a72c
refactor(library): remove algebra namespace
2015-12-05 23:50:01 -08:00
Jacob Gross
dd6bed371a
feat(library/data/set/basic): Added a supporting lemma for sUnion, which will be essential for proofs by induction on finite sets
2015-12-02 23:05:59 -08:00
Jeremy Avigad
2beb0030d6
refactor(library/*): protect sub in nat, div in nat and int
2015-11-08 14:04:59 -08:00
Leonardo de Moura
f14d0523ec
refactor(library/data/set/filter): add missing [instance] attribute
2015-11-08 14:04:56 -08:00
Leonardo de Moura
08c061e1fa
refactor(library/data/set): remove [reducible] annotation from set operations
2015-11-08 14:04:56 -08:00
Leonardo de Moura
fbe80d48dc
chore(library): remove "set_option pp.*" commands
2015-11-08 14:04:55 -08:00
Leonardo de Moura
26eb6fa849
feat(*): new numeral encoding
2015-11-08 14:04:55 -08:00
Leonardo de Moura
ede23a3267
feat(hott,library): add additional spacing hints
2015-09-30 17:41:44 -07:00
Sebastian Ullrich
d1b5031dbd
feat(library): add some spacing hints
2015-09-30 17:36:32 -07:00
Jeremy Avigad
719e9043cd
feat(library/data/set/equinumerosity): add Cantor's theorem, Schroeder-Bernstein theorem
2015-09-25 09:32:28 -07:00
Jeremy Avigad
2c7526e1fc
feat(library/*): add various theorems
2015-09-25 09:32:28 -07:00
Jeremy Avigad
9561e379c7
fix(library/data/set/basic): make set_of reducible
2015-09-20 19:54:46 -04:00