Commit graph

86 commits

Author SHA1 Message Date
Leonardo de Moura
5c1d5133dd fix(library/data/prod): make the notation for tuples and product types consistent 2014-10-13 06:48:37 -07:00
Leonardo de Moura
a26618e0f2 feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied 2014-10-12 13:06:00 -07:00
Leonardo de Moura
d6d0593afb refactor(library): remove some unnecessary sections 2014-10-10 16:33:58 -07:00
Leonardo de Moura
8f1b6178a7 chore(*): minimize the use of parameters 2014-10-09 07:13:06 -07:00
Floris van Doorn
ae3419f82f feat(library): add definition of subsingleton and some other minor changes 2014-10-08 23:14:44 -07:00
Leonardo de Moura
c9e5e40477 refactor(library/data/num): cleanup 2014-10-05 13:47:51 -07:00
Leonardo de Moura
86591c7272 refactor(library/data/prod): cleanup 2014-10-05 13:38:08 -07:00
Leonardo de Moura
d56266c524 refactor(data/sum): use sections 2014-10-05 13:20:04 -07:00
Leonardo de Moura
15779c5d1e refactor(data/list): use '!' operator, and new name convention for declaration names 2014-10-05 13:10:35 -07:00
Leonardo de Moura
efaeeb0726 refactor(data/nat/sub): use new policy for marking implicit arguments and '!' operator 2014-10-05 12:39:13 -07:00
Leonardo de Moura
fa96596bf7 refactor(data/int/order): use '!' operator 2014-10-05 11:44:18 -07:00
Leonardo de Moura
a0d4d82f3f refactor(data/nat/order): use new policy for marking implicit arguments and '!' operator 2014-10-05 11:36:39 -07:00
Leonardo de Moura
73aa024c31 refactor(library/logic): remove 'core' subdirectory 2014-10-05 10:50:13 -07:00
Leonardo de Moura
317e910054 refactor(library/data/bool): use new style 2014-10-05 09:50:55 -07:00
Leonardo de Moura
4946f55290 refactor(frontends/lean): constant/axiom are top-level commands, parameter/variable/hypothesis/conjecture are section/context-level commands
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-10-02 17:55:34 -07:00
Leonardo de Moura
d42fd657fe refactor(library): is_inhabited "theorems" should be "definitions", they are "data" 2014-10-02 09:00:34 -07:00
Leonardo de Moura
153e3927ac feat(frontends/lean/elaborator): modify '!' semantics: it stops consuming arguments as soon it finds an argument that does not occur in the rest of the type. 2014-10-01 18:50:17 -07:00
Leonardo de Moura
e64d5c4a4a refactor(library/data/nat): use new operator '!' 2014-10-01 18:39:47 -07:00
Leonardo de Moura
a978e30c81 refactor(library/data/nat): rename to_nat to of_num 2014-10-01 17:52:33 -07:00
Leonardo de Moura
716cd4d651 refactor(library): rename namespace eq_ops to eq.ops 2014-10-01 17:51:17 -07:00
Leonardo de Moura
bc6ebf34be feat(library/data/bool): do not use ! as notation for bnot, rename band/bor -> and/or 2014-10-01 17:00:03 -07:00
Leonardo de Moura
3657d4c3ab feat(frontends/lean): coercion num -> int even when nat is not open, closes #219
I also had to mark the coercions as reducible.
Otherwise, given the constraint

          ?M (int.of_num 0) =?= (int.of_nat (nat.to_nat 0))

the unifier will not generate the solution

          ?M := fun x, x
2014-10-01 11:09:10 -07:00
Leonardo de Moura
3ca1264f61 refactor(library): mark 'decidable' theorems as definitions
If we don't do that, then any 'if' term that uses one of these theorems
will get "stuck". That is, the kernel will not be able to reduce them
because theorems are always opaque
2014-09-30 09:02:37 -07:00
Floris van Doorn
3a95734fae feat(library): changes in eq.lean sigma.lean and category.lean
in eq.lean, make rec_on depend on the proof, and add congruence theorems for n-ary functions with n between 2 and 5
in sigma.lean, finish proving equality of triples
in category.lean, define the functor category, and make the proofs of the arrow and slice categories easier for the elaborator
2014-09-26 19:45:23 -04:00
Floris van Doorn
05fb3aa060 feat(library/data/int): remove duplicate theorem, fix one sorry 2014-09-26 19:45:23 -04:00
Floris van Doorn
5396e422d2 feat(library): add constructions of categories, some changes in eq, sigma and path
in eq, add theorem for proof irrelevance and congruence for binary functions
in sigma, add some support for triplets
in path, comment out two unneccesary definitions
in category, add Cat, slice, coslice, product and arrow categories, also add fully bundled approach
2014-09-26 19:45:23 -04:00
Leonardo de Moura
86f06a54ea refactor(library/data/vector): rename 'vec' to 'vector' 2014-09-19 16:20:50 -07:00
Leonardo de Moura
e430dc8bab feat(frontends/lean): add 'irreducible' as syntax sugar for 'reducible [off]' 2014-09-19 15:54:32 -07:00
Leonardo de Moura
4e2377ddfc refactor(frontends/lean): replace '[protected]' modifier with 'protected definition' and 'protected theorem', '[protected]' is not a hint.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-19 15:54:32 -07:00
Leonardo de Moura
5d8c7fbdf1 refactor(frontends/lean): replace '[private]' modifier with 'private
definition' and 'private theorem', '[private]' is not a hint.
2014-09-19 15:54:32 -07:00
Leonardo de Moura
97b1998def refactor(frontends/lean): replace '[opaque]' modifier with 'opaque
definition', '[opaque]' is not a hint, but a kind of definition
2014-09-19 15:54:32 -07:00
Leonardo de Moura
08ccd58eb6 feat(frontends/lean): add 'reducible' modifier for controlling which
definitions are unfolded during elaboration

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-19 15:54:32 -07:00
Leonardo de Moura
baf4c01de8 feat(frontends/lean): definitions are opaque by default 2014-09-19 15:54:32 -07:00
Leonardo de Moura
93c2c30310 feat(frontends/lean): allow transient coercions, i.e., coercions that
are not saved in .olean files
2014-09-19 15:54:32 -07:00
Leonardo de Moura
e3e2370a38 feat(frontends/lean): split 'opaque_hint' command into 'opaque' and 'transparent'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-16 18:03:40 -07:00
Jeremy Avigad
74cb289d48 refactor(library): rename algebra directory to struc, move categories.lean to algebra 2014-09-16 13:13:01 -07:00
Jeremy Avigad
9988914189 refactor(library/logic): move files in classes directory to core 2014-09-16 13:13:01 -07:00
Leonardo de Moura
7ea6a17ae8 feat(library/data/num): add 'mul' and 'add' for binary numerals 2014-09-16 08:05:00 -07:00
Leonardo de Moura
8e52c478b1 refactor(library/data/num): add 'succ', 'pred' and 'size' (aka number of bits),
rename is_inhabited theorems
2014-09-15 16:05:17 -07:00
Leonardo de Moura
b7023ce1d8 fix(frontends/lean/placeholder_elaborator): do not truncate stream of
solutions during class-instance resolution, closes #183

For example, in theorem inverse_unique at category.lean, implicit
arguments are synthesized for inverse_compose. The first solution H' is
not good, and produces a type incorrect solution
2014-09-12 16:12:23 -07:00
Leonardo de Moura
a305012ce5 fix(library/data/category): mark definitions as abbreviations 2014-09-12 09:28:33 -07:00
Leonardo de Moura
c8e20ff3c0 fix(library/data/category): minor problem that was being masked by bug #182, fixes #183 2014-09-11 16:58:32 -07:00
Floris van Doorn
7f1977694f feat(library/data/category.lean) the definition of category doesn't depend on 'mor' anymore; make iso a class; add theorems 2014-09-11 16:39:47 -07:00
Leonardo de Moura
7ffe73b8ca fix(frontends/lean): name clash inside section, fixes #181 2014-09-11 16:37:23 -07:00
Leonardo de Moura
8c11dc1ecd chore(library/data/quotient): rename aux.lean to util.lean (fix problem with cloning lean repository on Windows machine)
See
http://stackoverflow.com/questions/3689137/error-git-checkout-index-unable-to-create-file
for additional details
2014-09-11 14:57:15 -07:00
Leonardo de Moura
746f5bff0d refactor(library/data/list/basic): cleanup
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-10 16:42:49 -07:00
Leonardo de Moura
1a896a670c refactor(library/data/list): cleanup, rename concat to assoc 2014-09-10 08:02:18 -07:00
Leonardo de Moura
9b9adf8831 refactor(library): replace decidable_eq with abbreviation 2014-09-09 16:09:05 -07:00
Leonardo de Moura
ff9a07500d feat(library/data/int/basic): create alias for int.int 2014-09-09 14:03:44 -07:00
Leonardo de Moura
b4793df653 feat(frontends/lean): rename '[fact]' to '[visible]'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-08 07:47:42 -07:00