Leonardo de Moura
cc3fb0c51f
feat(util/name_generator): allow name generator to be created without providing any argument in the Lua API
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 12:39:41 -07:00
Leonardo de Moura
6ab46396d8
feat(library/tactic): expose 'trace' tactic
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:52:45 -07:00
Leonardo de Moura
e1d909455c
refactor(library/tactic): add namespace 'tactic', improve expr_to_tactic failure error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:45:09 -07:00
Leonardo de Moura
a66a08c89e
feat(frontends/lean): parse strings as expressions of type 'string.string'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 10:00:55 -07:00
Leonardo de Moura
8b8881deae
fix(util/hash): relax pre-condition
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 09:56:50 -07:00
Leonardo de Moura
f464775af6
fix(frontends/lean/parser): bug when parsing identifiers
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:36:25 -07:00
Leonardo de Moura
0198dfc7c5
feat(frontends/lean): parse numerals as expressions of type 'num.num'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:33 -07:00
Leonardo de Moura
7593ee1468
refactor(library/standard): remove parameter from 'tactic' inductive type
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-02 08:09:24 -07:00
Leonardo de Moura
b2b76b078f
feat(frontends/lean): remove build_tactic_cmds, and use expressions for representing tactics
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 20:43:53 -07:00
Leonardo de Moura
cbac21ec7f
feat(library/tactic): add trick for 'embedding' tactics inside Lean expressions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 19:05:22 -07:00
Leonardo de Moura
2df92b0701
refactor(library/tactic): simplify proof_state
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 18:02:17 -07:00
Leonardo de Moura
7abe2e7242
fix(frontends/lean/token_table): precedence for '@'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 17:06:09 -07:00
Leonardo de Moura
5b69f88664
feat(frontends/lean/notation_cmd): make the notation for setting precedence uniform
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:55:41 -07:00
Leonardo de Moura
ec3743dede
fix(frontends/lean/parser): avoid nontermination
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:46:58 -07:00
Leonardo de Moura
8cdf44b87b
feat(frontends/lean/notation_cmd): allow 'max' to use as a precedence level
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:46:32 -07:00
Leonardo de Moura
4cb5f97038
refactor(library/tactic): simplify tactic framework, no more proof builders
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-07-01 16:11:19 -07:00
Leonardo de Moura
ad12abcdb4
fix(library/unifier): bug in process_eq_constraint
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 18:22:05 -07:00
Leonardo de Moura
abe12b0631
fix(shell/lean): only save .olean file if there are no errors
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 18:04:18 -07:00
Leonardo de Moura
c84218e24a
chore(frontends/lean/inductive_cmd): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 17:16:10 -07:00
Leonardo de Moura
3e299a1d5a
refactor(frontends/lean/parser): move parser Lua bindings to a separate file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-30 17:00:10 -07:00
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
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
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
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
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
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
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
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
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
Leonardo de Moura
d84b745241
refactor(library/tactic/cex_builder): simplify cex_builder
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:14:33 -07:00
Leonardo de Moura
b4e4c4d610
chore(library/tactic): remove unnecessary file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:02:13 -07:00
Leonardo de Moura
f1d8d8dcf9
chore(library/tactic): update goal objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
ad70044ae1
chore(library/tactic): remove dead code
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-27 07:00:12 -07:00
Leonardo de Moura
e55b4bf86d
fix(library/unifier): bug in flex_rigid case: binding imitation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 20:43:49 -07:00
Leonardo de Moura
50e21586b0
feat(library/unifier): do not create a case-split for choice constraints that produce only one alternative
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:52:13 -07:00
Leonardo de Moura
443022d840
feat(util/lazy_list): add is_nil predicate
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:51:35 -07:00
Leonardo de Moura
ccce9d90a4
feat(frontends/lean/elaborator): add 'delayed coercions', add example demonstrating why the new feature is useful
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:39:23 -07:00
Leonardo de Moura
ed299c0914
feat(library/coercion): add has_coercions_to function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:38:27 -07:00
Leonardo de Moura
b11e1a5f34
feat(kernel/type_checker): add mk_app_justification auxiliary function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 18:38:09 -07:00
Leonardo de Moura
e769121c2a
fix(frontends/lean/elaborator): memory leaks that only occur when compiling with clang++
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 16:02:54 -07:00
Leonardo de Moura
340dc622c6
fix(kernel/formatter): make sure simple formatter output is not sensitive to internal names
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 14:58:59 -07:00
Leonardo de Moura
150d285b39
fix (library/unifier): occurs_context_check
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 14:45:36 -07:00
Leonardo de Moura
16bdc51fc4
refactor(kernel/type_checker): simplify type checker API, and remove add_cnstr_fn
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 13:36:31 -07:00
Leonardo de Moura
ac03b3204a
fix(kernel/formatter): add missing parentheses
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 12:07:28 -07:00
Leonardo de Moura
a70f8dd98e
feat(kernel/inductive): mark parameters, type formers and indices as implicit parameters in the elimination rule
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 11:05:14 -07:00
Leonardo de Moura
5e0e737213
feat(library/scoped_ext): do not import 'children' namespace objects
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:32:34 -07:00
Leonardo de Moura
930960c54d
fix(frontends/lean/builtin_cmds): abstract section parameters in the 'check' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 10:06:50 -07:00
Leonardo de Moura
0480dab986
feat(frontends/lean/parse_table): avoid duplicates in the parse table
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:19 -07:00
Leonardo de Moura
ab2bbaef3f
feat(util/list_fn): add remove function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 09:32:19 -07:00
Leonardo de Moura
2d2f23cda6
feat(library/lean/lean): improve overload error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:52:40 -07:00
Leonardo de Moura
656bcd55ed
fix(frontends/lean): save 'choice' position
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:50:44 -07:00
Leonardo de Moura
6085a54416
feat(library/error_handling): improve unifier_exception error message
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:49:50 -07:00
Leonardo de Moura
e735a8e5ff
fix(library/unifier): bug in conflict resolution
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:42:40 -07:00
Leonardo de Moura
cdc41244ae
fix(kernel/justification): missing 'const'
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:18:18 -07:00
Leonardo de Moura
52ff29a6f7
feat(frontends/lean): add 'coercion' command
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-26 08:08:39 -07:00
Leonardo de Moura
06f9e7bfdd
fix(build): add missing file
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 18:12:23 -07:00
Leonardo de Moura
acf8c13619
feat(kernel): add strict implicit arguments
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:50:49 -07:00
Leonardo de Moura
9f83ef8f6c
chore(frontends/lean/elaborator): cleanup
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 17:13:03 -07:00
Leonardo de Moura
a42a80407a
fix(library/unifier): when imitating (f a), abstract local constants occurring in f
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 16:11:31 -07:00
Leonardo de Moura
1d4352aeb4
fix(kernel/converter): missing case: two constants c.{l1} and c.{l2} where l1 and l2 are structurally different but equivalent (or can be made equivalent)
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 16:05:41 -07:00
Leonardo de Moura
543b1003a6
fix(frontends/lean/elaborator): typo
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 13:11:35 -07:00
Leonardo de Moura
c9133f33dd
feat(kernel/expr): add flat_app auxiliary function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 12:51:22 -07:00
Leonardo de Moura
f2b41312fb
feat(frontends/lean): add '@' explicit notation
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 12:50:47 -07:00
Leonardo de Moura
905209df1c
fix(frontends/lean/elaborator): to cache values, we must push/pop whenever we update the m_ctx
...
Thus, we are disabling the cache for now.
It is also unclear whether it is useful or not.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 11:05:14 -07:00
Leonardo de Moura
5c40b466cc
fix(kernel/type_checker): use the application to provide error location
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 10:42:58 -07:00
Leonardo de Moura
0791c83731
fix(frontends/lean/parser): add missing save_pos
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 10:32:43 -07:00
Leonardo de Moura
6ec5d768d0
fix(kernel/type_checker): bug in the app_delayed_justification object
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 10:09:45 -07:00
Leonardo de Moura
f981a4c1fe
fix(library/unifier): bug in lambda_abstract_locals auxiliary function
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:59:08 -07:00
Leonardo de Moura
6db6048bf8
feat(library/error_handling): pretty print unifier exceptions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:41:25 -07:00
Leonardo de Moura
18a883ab1b
fix(library/unifier): set conflict if type mismatch during metavariable assignment
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:33:34 -07:00
Leonardo de Moura
5b6589709c
fix(frontends/lean/decl_cmds): allow binders but no type in definitions
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-25 09:00:57 -07:00