Commit graph

1892 commits

Author SHA1 Message Date
Leonardo de Moura
d322f63113 feat(frontends/lea): add commands for creating and managing rewrite rule sets
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 12:03:59 -08:00
Leonardo de Moura
bbf6e6a256 feat(builtin/kernel): create default rule set in the kernel, and adjust unit tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 11:24:20 -08:00
Leonardo de Moura
3bbadddc94 chore(library/simplifier): cleanup and add comments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 10:54:09 -08:00
Leonardo de Moura
7492fd5a2c feat(library/simplifier): add support for simplification by evaluation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 10:34:55 -08:00
Leonardo de Moura
475df3d94e chore(builtin/kernel): add theorem for rewriter/simplifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 10:34:18 -08:00
Leonardo de Moura
e512241c8f fix(emacs): missing keyword
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 10:32:45 -08:00
Leonardo de Moura
11719713ec feat(library/hop_match): optionally unfold constants when performing higher order matching
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 10:32:06 -08:00
Leonardo de Moura
39c3b17eb7 feat(library/simplifier): add support for Eta-reduction in the simplifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 00:40:35 -08:00
Leonardo de Moura
ed009f4c88 feat(kernel/simplifier): add support for Beta-reduction in the simplifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-19 00:40:20 -08:00
Leonardo de Moura
7a3aab60c6 chore(builtin/kernel): remove \bowtie as notation for transitivity
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 21:11:12 -08:00
Leonardo de Moura
2753a0ffc0 fix(builtin/kernel): add ascii notation for transitivity
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 20:56:35 -08:00
Leonardo de Moura
32c5bc25e3 refactor(library/simplifier): cleanup rewrite_rule_set, and use it in the simplifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 20:52:33 -08:00
Leonardo de Moura
466285c577 refactor(library/simplifier): rewriter_rule_set
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 17:26:01 -08:00
Leonardo de Moura
feea96e84d feat(library/simplifier): add rewrite_rule_set extension for managing rewrite rules in an environment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 15:43:24 -08:00
Leonardo de Moura
eae79877ae feat(library/simplifier): add rewrite_rule_set
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 12:50:46 -08:00
Leonardo de Moura
27ab49ae9d feat(library/simplifier): bottom-up simplifier skeleton
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-18 12:49:41 -08:00
Leonardo de Moura
40b7ed13c2 fix(tests/lean): adjust tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 19:27:32 -08:00
Leonardo de Moura
534838a36c chore(build): update automatically generated files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 18:30:45 -08:00
Leonardo de Moura
d711ca4d1b feat(builtin/heq): add heq C++/Lean interface
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 18:30:21 -08:00
Leonardo de Moura
20c8b91d07 feat(builtin/if_then_else): add more theorems for rewriting
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 18:11:23 -08:00
Leonardo de Moura
2434024272 fix(library/rewriter): warning in release mode
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 15:46:49 -08:00
Leonardo de Moura
ba88a3b05a chore(builtin/heq): remove unnecessary import
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 15:40:56 -08:00
Leonardo de Moura
70828af6db refactor(builtin/heq): cleanup universes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 14:52:09 -08:00
Leonardo de Moura
fc4c6454a7 chore(tests/lean): adjust tests to reflect recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 14:36:55 -08:00
Leonardo de Moura
0660cdbdb7 feat(builtin/cast): use heq in the cast library
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 14:31:45 -08:00
Leonardo de Moura
52756c50fc fix(builtin/heq): extensionality axioms
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 12:56:36 -08:00
Leonardo de Moura
64795c6c42 feat(builtin): add heterogeneous equality theory
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 12:32:49 -08:00
Leonardo de Moura
baed98d5be chore(builtin/kernel): adjust emacs mode and fix typo
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-17 10:14:57 -08:00
Leonardo de Moura
5bee259a00 refactor(kernel): remove unnecessary universe
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 18:06:25 -08:00
Leonardo de Moura
a43020b31b refactor(kernel): remove heterogeneous equality
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 17:39:12 -08:00
Leonardo de Moura
1da4294793 refactor(builtin): more theorems, fix iff notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 09:26:50 -08:00
Leonardo de Moura
7d6cd514d1 doc(examples/lean): cleanup
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 05:01:34 -08:00
Leonardo de Moura
fd8a1266d0 doc(examples/lean): update notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 04:52:45 -08:00
Leonardo de Moura
2ce245d68e doc(examples/lean): transitive closure example
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 04:37:36 -08:00
Leonardo de Moura
398d83b6d5 chore(builtin/Nat): use iff
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 02:06:53 -08:00
Leonardo de Moura
4dc98bc73b refactor(builtin/kernel): use iff instead of = for Booleans
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 02:05:09 -08:00
Leonardo de Moura
5453a8f2f1 test(tests/lua): hop_match experiment
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 00:15:31 -08:00
Leonardo de Moura
d063828ff9 feat(library/kernel_bindings): expose abst_name, abst_domain and abst_body in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-16 00:03:16 -08:00
Leonardo de Moura
8d73fb5699 fix(library/hop_match): Lua bindings gotcha
See http://www.luafaq.org/gotchas.html#T6.4

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 23:51:26 -08:00
Leonardo de Moura
14c6218bdc chore(kernel): file name convention
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 20:06:29 -08:00
Leonardo de Moura
3238c7e2a0 feat(library/simplifier): add is_permutation_ceq predicate
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 19:53:52 -08:00
Leonardo de Moura
7fb0aa4800 chore(kernel/expr): remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 17:24:31 -08:00
Leonardo de Moura
2368c936d3 test(tests/lua): exercise fields method for semantic attachments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 17:24:18 -08:00
Leonardo de Moura
438fa8251b test(kernel/expr): check if the serializer works for metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 17:15:56 -08:00
Leonardo de Moura
5058e403b5 test(kernel/expr): check if the serializer works for applications with many argumets
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 17:09:46 -08:00
Leonardo de Moura
c096eec1d6 chore(kernel/expr): remove dead code
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 17:09:04 -08:00
Leonardo de Moura
57e58c598c fix(tests/lean): adjust tests to reflect recent changes
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 16:35:33 -08:00
Leonardo de Moura
8c2f78a756 feat(builtin): minimize use of heterogenous equality in the kernel, add simpler version of congruence theorems for non-dependent types
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 16:34:23 -08:00
Leonardo de Moura
c73398a0b8 refactor(library/simplifier): relax rule for conditional equalities
The idea is to support conditional equations where the left-hand-side does not contain all theorem arguments, but the missing arguments can be inferred using type inference.
For example, we will be able to have the eta theorem as rewrite rule:

theorem eta {A : TypeU} {B : A → TypeU} (f : ∀ x : A, B x) : (λ x : A, f x) = f
:= funext (λ x : A, refl (f x))

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 16:06:00 -08:00
Leonardo de Moura
3daac17ea8 feat(library/simplifier): convert disequalities (a ≠ b) into equations '(a = b) = false'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-15 15:30:16 -08:00