Commit graph

57 commits

Author SHA1 Message Date
Jeremy Avigad
e5c25ff7a3 refactor(library/data/nat,int): use nicer definitions of structure instances 2015-02-01 11:17:45 -08:00
Jeremy Avigad
95d79e7bda refactor(library/data/nat): merge comm_semiring, make minor fixes 2015-02-01 11:17:44 -08:00
Leonardo de Moura
7a3a73d931 refactor(library/data/nat): move nat.comm_semiring to separate file 2015-01-08 12:12:30 -08:00
Jeremy Avigad
42c328e781 refactor(library/data/nat/basic): rename pred.zero and pred.succ 2015-01-07 18:18:28 -08:00
Jeremy Avigad
50f03c5a09 refactor(library/data/nat/order): make nat order an instance of linear_ordered_semigroup, rename various theorems 2015-01-07 18:18:28 -08:00
Jeremy Avigad
b11064a90e fix(library/data/nat,int): fix instance declarations for nat and int 2015-01-03 22:27:21 -08:00
Jeremy Avigad
cecabbb401 refactor(library/data/int,library/algebra): make int an instnance of ordered ring, rename theorems 2014-12-26 16:25:05 -05:00
Jeremy Avigad
25394dddb7 refactor(library): change mul.left_id to mul_one, and similarly for mul.right_id, add.left_id, add.right_id 2014-12-23 21:14:36 -05:00
Jeremy Avigad
5bc6dd84cf feat(library/data/nat): make nat an instance of comm_semiring 2014-12-23 21:14:35 -05:00
Jeremy Avigad
486bc321ff refactor(library/data/nat): rename theorems 2014-12-23 21:14:35 -05:00
Leonardo de Moura
5cf8064269 refactor(library): rename exists_elim and exists_intro to exists.elim
and exists.intro
2014-12-15 19:07:38 -08:00
Jeremy Avigad
3e9a484851 refactor(library/logic/connectives): rename theorems 2014-12-15 15:05:44 -05:00
Leonardo de Moura
d6c8e23b03 refactor(library/init/logic): move theorems to library/logic 2014-12-12 13:24:17 -08:00
Leonardo de Moura
b094c1cf43 refactor(library/init): move num->nat coercion to init 2014-12-01 08:23:31 -08:00
Leonardo de Moura
697d4359e3 refactor(library): add 'init' folder 2014-11-30 20:34:12 -08:00
Leonardo de Moura
064ecd3e3d refactor(library/data/nat): declare lt and le asap using inductive definitions, and make key theorems transparent for definitional package
We also define key theorems that will be used to generate the
automatically generated a well-founded subterm relation for inductive
datatypes.
We also prove decidability and wf theorems asap.
2014-11-22 00:19:39 -08:00
Leonardo de Moura
5dc42762de feat(library/data): define 'nat.addl' addition using recursion on the first argument, prove it to be equivalent to 'add', and use it to define vector.append 2014-11-17 22:03:39 -08:00
Leonardo de Moura
b97d437011 refactor(library/data/nat/basic): use no_confusion construction to simplify proofs 2014-11-08 19:00:40 -08:00
Leonardo de Moura
8d3e9fdc20 refactor(library/data/nat/basic): remove unnecessary {} 2014-10-31 09:49:45 -07:00
Leonardo de Moura
8a4d4409cd feat(frontends/lean/calc_proof_elaborator): add '{...⁻¹}' if needed in calc proofs, closes #268
This commit also simplifies library/data/nat/basic.lean
2014-10-31 01:02:49 -07:00
Leonardo de Moura
5f23179388 refactor(library/data/nat): remove unnecessary ! and eq.symm
The calc command automatically adds them now.
2014-10-30 23:28:35 -07:00
Leonardo de Moura
cdcde661ef feat(library/definitional/induction_on): automatically add 'induction_on' 2014-10-25 13:37:04 -07:00
Leonardo de Moura
a7a06ab0f8 feat(library/definitional/rec_on): automatically generate rec_on function for inductive datatypes 2014-10-25 13:08:59 -07: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
73aa024c31 refactor(library/logic): remove 'core' subdirectory 2014-10-05 10:50:13 -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
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
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
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
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
9b9adf8831 refactor(library): replace decidable_eq with abbreviation 2014-09-09 16:09:05 -07:00
Leonardo de Moura
35e68fea76 feat(library/logic/classes/decidable): generalize 'by_cases' theorem 2014-09-08 00:16:20 -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
f9b62c53e6 feat(library/data/nat): add nat.is_inhabited theorem 2014-09-07 19:59:34 -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
2bc6f92d33 refactor(library): add 'and' namespace
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 17:44:53 -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
8743394627 refactor(kernel/inductive): replace recursor name, use '.rec' instead of '_rec'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 15:04:57 -07:00
Leonardo de Moura
7500761114 refactor(library/data/nat/basic): remove unnecessary nat_
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 16:14:29 -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