Commit graph

3062 commits

Author SHA1 Message Date
Leonardo de Moura
bccc3df1aa chore(frontends/lean): reduce code duplication
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 16:52:20 -07:00
Leonardo de Moura
af230e73c6 feat(library/standard): define heq, and configure 'calc' for '='
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 14:35:57 -07:00
Leonardo de Moura
e3f9b21c30 fix(kernel/inductive): bug in inductive datatype computational rule, we *must* first instantiate universe variables, *and then* the arguments
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 14:15:16 -07:00
Leonardo de Moura
6e6f778ecf fix(kernel/converter): missing case for local constants
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 12:57:25 -07:00
Leonardo de Moura
2ea1e68f25 feat(library/standard): add equal_f theorem
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 12:00:47 -07:00
Leonardo de Moura
c5828dcf6c feat(library/standard): add function extensionality axiom
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 11:53:04 -07:00
Leonardo de Moura
15e4b18d62 chore(library/standard): add copyright to library files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 11:44:47 -07:00
Leonardo de Moura
cb000eda13 refactor(kernel): store binder_infor in local constants
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 11:37:46 -07:00
Leonardo de Moura
c2ab31113f refactor(library/tactic): remove cex_builder and 'precision' for proof_state's
These two features make sense for solvers, but not in a general purpose tactic framework for building proofs like the one in Lean.

In most cases, we cannot build a counterexample anyway. These two features should be added in a custom framework for combining preprocessing techniques like in Z3.

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 08:48:07 -07:00
Leonardo de Moura
8d584e54da feat(frontends/lean): add exact_apply
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 00:51:11 -07:00
Leonardo de Moura
3650ffdd4f feat(library/standard): add iff_mp_right and iff_mp_left
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 00:29:42 -07:00
Leonardo de Moura
ccdb96775f feat(frontends/lean/parser): allow 'assume'/'take'/'fun' as notation for apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 23:00:41 -07:00
Leonardo de Moura
6b538c5fc8 feat(library/standard): add 'iff' and 'cast'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 22:56:56 -07:00
Leonardo de Moura
33cb9382aa feat(frontends/lean): add beta-reduction tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 19:41:54 -07:00
Leonardo de Moura
e1d807a077 feat(library/standard): add inhabited, and files option and unit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 19:30:38 -07:00
Leonardo de Moura
360e9b9486 feat(library/tactic): add apply tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 18:33:53 -07:00
Leonardo de Moura
6645fdeae0 feat(frontends/lean): add repeat tactic command, refactor tactic sequence notation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:24:13 -07:00
Leonardo de Moura
a8f9594046 refactor(kernel/instantiate): rename instantiate_params to instantiate_univ_params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:09:55 -07:00
Leonardo de Moura
2510d5722a feat(frontends/lean): add unfold tactic command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:05:45 -07:00
Leonardo de Moura
937d7b2813 fix(library/tactic): unfold tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 12:04:58 -07:00
Leonardo de Moura
6d09d82a7c feat(frontends/lean): add notation for orelse tactic, add show and now tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:39:18 -07:00
Leonardo de Moura
a1bbb09de4 feat(frontends/lean): add notation for then tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:24:56 -07:00
Leonardo de Moura
15f270d9f3 fix(library/tactic): memory leak that only happens when compiling with clang++
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 11:07:06 -07:00
Leonardo de Moura
6891f48c67 fix(library/module): do not store full path of imported modules
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 10:48:57 -07:00
Leonardo de Moura
e59889d84f fix(build): do not build libraries when cross compiling
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 10:00:08 -07:00
Leonardo de Moura
1f0171cd57 fix(frontends/lean/dependencies): compilation warning
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:55:30 -07:00
Leonardo de Moura
ffa175009b feat(frontends/lean): use tactics for solving unassigned metavariables
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:50:16 -07:00
Leonardo de Moura
1e39a21823 feat(frontends/lean): add basic tactics
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
3aa59cebb5 chore(.): add make.deps to .gitignore
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
7d5522e36a chore(tests): add missing tests
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:51 -07:00
Leonardo de Moura
f5f3816596 chore(tests): cleanup test scripts
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 09:03:39 -07:00
Leonardo de Moura
cf28981f45 feat(tests/lean/run): add test_single script that sets the LEAN_PATH
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:47:46 -07:00
Leonardo de Moura
ec18bd93f9 feat(frontends/lean): send tactic hint table to elaborator
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-29 07:03:25 -07:00
Leonardo de Moura
5a7e198583 feat(build): add Makefile for libraries
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 18:41:53 -07:00
Leonardo de Moura
65c63e146f feat(frontends/lean): add display_deps function, and --deps command line option
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 18:35:18 -07:00
Leonardo de Moura
193ce35419 refactor(frontends/lean/inductive_cmd): redesign inductive datatype elaboration, use the new elaborator, and use simpler algorithm to infer the resulting universe
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 15:33:56 -07:00
Leonardo de Moura
0adacb5191 feat(kernel): add infer implicit, and use it to infer implicit arguments of inductive datatype eliminators, and tag whether parameters should be implicit or not in introduction rules in the module inductive_cmd
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 13:57:36 -07:00
Leonardo de Moura
0e015974ca fix(library/unifier): bug in process_flex_rigid, also cleanup the code and break it into different cases
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 11:19:56 -07:00
Leonardo de Moura
7075f6e94a fix(library/module): make sure decls from imported modules have module_idx > 0
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:36:54 -07:00
Leonardo de Moura
58b6169e8b fix(library/max_sharing): take binder annotations into account
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 08:31:09 -07:00
Leonardo de Moura
47ff300d1a fix(frontends/lean): '@' explicit mark
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 07:30:36 -07:00
Leonardo de Moura
1019cd60ef feat(library/logic): add basic definitions
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-28 00:29:42 -07:00
Leonardo de Moura
cf9b486179 feat(frontends/lean): automatically import lua modules imported by imported lean files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 23:23:51 -07:00
Leonardo de Moura
2673a33bf3 fix(util/thread_script_state): new state was being added twice to g_states, use import_explicit
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 19:58:28 -07:00
Leonardo de Moura
9fb8fd0e7b test(tests/lua): add simple tactic framework test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:51:55 -07:00
Leonardo de Moura
e408998e06 fix(library/tactic): name convention
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:42:59 -07:00
Leonardo de Moura
fa72e7b874 refactor(library/tactic): simplify tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 18:35:59 -07:00
Leonardo de Moura
5524c6c3d8 refactor(library/tactic/proof_state): simplify proof state
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 14:49:48 -07:00
Leonardo de Moura
c6ac89d967 refactor(library/tactic/proof_builder): simplify proof builder
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 12:25:04 -07:00
Leonardo de Moura
aaa7960b75 refactor(library/tactic/goal): use local names for hypotheses
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 11:11:12 -07:00