Commit graph

37 commits

Author SHA1 Message Date
Leonardo de Moura
60eac0195d feat(frontends/lean/structure_cmd): generate projection over constructor theorems for structures 2014-11-04 09:10:25 -08:00
Leonardo de Moura
ae9d11c9c4 refactor(library/data): rename prod_ext and dpair_ext to prod.eta and sigma.eta
Reason: they will be generated automatically by definitional package.
2014-11-03 08:29:05 -08:00
Leonardo de Moura
6c7e23ecaa refactor(library): use 'reserve' notation in the standard library 2014-10-21 15:39:47 -07:00
Leonardo de Moura
86591c7272 refactor(library/data/prod): cleanup 2014-10-05 13:38:08 -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
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
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
05fb3aa060 feat(library/data/int): remove duplicate theorem, fix one sorry 2014-09-26 19:45:23 -04: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
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
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
fa25ddc8e6 chore(library/data/int/basic): remove unnecessary 'hinding' clause
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-07 22:50:43 -07:00
Leonardo de Moura
559dd586f2 feat(library): add 'decidable_eq' class
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-07 22:23:36 -07:00
Leonardo de Moura
9412e604c8 refactor(library/data): cleanup datatypes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 22:31:52 -07:00
Leonardo de Moura
6632a50015 refactor(library): add namespaces 'or', 'and' and 'iff'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 21:25:21 -07:00
Leonardo de Moura
68d9bef860 refactor(library): add 'eq' and 'ne' namespaces
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 18:41:06 -07:00
Leonardo de Moura
364bba2129 feat(frontends/lean/inductive_cmd): prefix introduction rules with the name of the inductive datatype
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:26:36 -07:00
Leonardo de Moura
e51c4ad2e9 feat(frontends/lean): rename 'using' command to 'open'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 16:00:38 -07:00
Leonardo de Moura
6077b3158c fix(library): remove unnecessary [fact] modifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 16:06:55 -07:00
Leonardo de Moura
d536475e49 refactor(library): more implicit_args for: and_assoc, and_comm, or_assoc, or_comm, if_pos, if_neg
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 11:10:04 -07:00
Leonardo de Moura
6b7e79b62f feat(library/data/nat): mark more arguments implicit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 10:38:58 -07:00
Leonardo de Moura
2d78387541 refactor(library/logic/basic): rename absurd_elim to absurd, delete contrapos and trivial_not_true theorems
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 18:34:09 -07:00
Leonardo de Moura
a8d58fdd33 refactor(library): mark absurd_elim argument as implicit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 18:27:39 -07:00
Leonardo de Moura
dbaf81e16d refactor(library): remove unnecessary 'standard' subdirectory
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 18:08:09 -07:00