Commit graph

5435 commits

Author SHA1 Message Date
Leonardo de Moura
53ee205dc6 fix(kernel): memory corruption bugs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
72e1678ad9 refactor(kernel): cleanup instantiate and abstract procedures, implement update procedures
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
db31cc37a1 refactor(kernel/free_vars): cleanup free_vars procedures
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
533f44e224 refactor(kernel/expr): for_each_fn, replace_fn, and find_fn without templates
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:55 -07:00
Leonardo de Moura
69b9f2dd37 refactor(kernel/expr): for_each and find functional objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
23988f528c refactor(kernel/expr): add expr constructors, and expression equality test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
9d3db8de1f fix(kernel/diff_cnstrs): missing include
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
02413d7c44 refactor(kernel/expr): adding suport for universe polymorphism, and simplify metavariable representation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
13cfd60622 fix(kernel/diff_cnstrs): copyright msg
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
76b1ddb967 feat(kernel): add difference constraint solver with backtracking support, and justification generation, this solver will be used to check the satisfiability of universe level constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
9f93b5d97e feat(kernel/level): new universe level datastructure for universe level polymorphism
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
1b6b33b3f5 refactor(kernel): start version 0.2, new kernel with universe polymorphism and better/cleaner support for metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-18 10:27:54 -07:00
Leonardo de Moura
0c1674ab70 feat(builtin): quotient types
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-12 00:20:46 -07:00
Leonardo de Moura
e0eacd1f9f feat(builtin): simpler encoding of sum types
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-03 18:30:45 -08:00
Leonardo de Moura
f8a12363f2 doc(examples/wf): use 'have' construct in wf example
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-03-03 18:29:19 -08:00
Leonardo de Moura
26bf21b91d test(examples/lean): opaque pairs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-27 11:38:34 -08:00
Leonardo de Moura
1d10953da4 fix(library/elaborator): add hack for experimenting with algebraic hierarchy
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-25 11:20:40 -08:00
Leonardo de Moura
aa8240985a test(examples/lean): small version of algebraic hierarchy (proof of concept)
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-24 20:51:19 -08:00
Leonardo de Moura
309e7ba880 fix(library/elaborator): temporary fix for bug reported by Jeremy
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-24 15:26:21 -08:00
Leonardo de Moura
16844fff73 feat(builtin): simulate binary encoding
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-20 20:44:05 -08:00
Leonardo de Moura
d79e9af210 fix(frontends/lean): help msg
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-18 09:31:30 -08:00
Leonardo de Moura
f781ad823c doc(builtin): Diaconescu’s theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-18 09:12:09 -08:00
Leonardo de Moura
e9dada5e14 refactor(builtin/kernel): use standard definition for 'or' and 'and'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-17 12:05:34 -08:00
Leonardo de Moura
4692e04d70 feat(builtin/proof_irrel): prove proof irrelevance
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-16 18:06:10 -08:00
Leonardo de Moura
c526e5ec00 feat(builtin/kernel): prove false_elim without using case
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-15 14:26:13 -08:00
Leonardo de Moura
1739b5c153 fix(kernel/type_checker): caching bug
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-12 10:43:01 -08:00
Leonardo de Moura
c740d9d799 fix(builtin/num): bug in the factorial definition
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-12 10:04:32 -08:00
Leonardo de Moura
45a0dbcc34 feat(builtin/num): define fact and exp
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-12 09:51:49 -08:00
Leonardo de Moura
368fcb5ff9 refactor(builtin/kernel): rename refute to by_contradiction
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-12 08:49:19 -08:00
Leonardo de Moura
69bccb6014 feat(builtin): define list, cons, nil and prove basic theorems
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-11 21:32:05 -08:00
Leonardo de Moura
bfe64a7031 fix(library/elaborator): hack for fixing a bug due to pairs/projs, this is temporary fix until we build a new elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-11 21:30:26 -08:00
Leonardo de Moura
0878b44fc7 feat(frontends/lean): allow user to import several theories using a single import
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-11 17:15:12 -08:00
Leonardo de Moura
fddaa7bc3a doc(examples/lean): add theorem sent by Jeremy Avigad
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-11 14:10:29 -08:00
Leonardo de Moura
1796c2b992 doc(examples/lean): proof of concept
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-11 07:59:49 -08:00
Leonardo de Moura
56ad1c1728 doc(examples/lean/abelian): proof of concept
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 18:17:15 -08:00
Leonardo de Moura
65076816fa doc(examples/lean/group): prove basic theorems
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 15:49:24 -08:00
Leonardo de Moura
acd04d3c2b doc(examples/lean): setoid and group examples
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 14:41:29 -08:00
Leonardo de Moura
11a2b3016f fix(builtin/num): remove hacks for making the elaborator happy
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 14:05:51 -08:00
Leonardo de Moura
b7b868de85 fix(library/elaborator): bug reported by Jeremy Avigad
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 14:01:22 -08:00
Leonardo de Moura
a2d2e36f04 refactor(frontends/lean): remove notation for creating tuples
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 09:03:42 -08:00
Leonardo de Moura
4e08a3233e fix(builtin): build dependency issue
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-10 08:33:07 -08:00
Leonardo de Moura
273f78d1cb feat(builtin/num): prove strong induction and other theorems for num
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 21:09:50 -08:00
Leonardo de Moura
b119c11473 feat(builtin/tactic): add simp_no_assump tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 20:28:30 -08:00
Leonardo de Moura
4317f67bd2 fix(builtin/tactic): more meaningful error message when skip tactic is used in a full proof
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 18:57:33 -08:00
Leonardo de Moura
57982135d9 fix(library/simplifier): bug using congr1 theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 16:24:29 -08:00
Leonardo de Moura
c45c1748d8 refactor(builtin/kernel): reorder congr1 arguments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 16:15:44 -08:00
Leonardo de Moura
fd6f8b1945 refactor(builtin/num): simplify proofs using 'by simp'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 15:03:45 -08:00
Leonardo de Moura
2d70e2f4f2 fix(library/tactic/goal): bug in the proof builder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 15:02:36 -08:00
Leonardo de Moura
4c76f6abb9 chore(builtin/num): remove leftover
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 11:39:26 -08:00
Leonardo de Moura
8df7c7b02d feat(kernel/type_checker): remove fallback that expands opaque definitions in the type checker
We should not rely on this feature. It can be quite expensive.
We invoke is_convertible in several places, in particular, if we are using overloading. For example, the frontend uses is_convertible to check which overload should be used. Thus, it will make several calls such as

   is_convertible(num, Nat)

If is_convertible starts unfolding opaque definitions, we would keep expanding num.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-02-09 11:31:24 -08:00