Commit graph

1389 commits

Author SHA1 Message Date
Leonardo de Moura
8c63045492 feat(library/util): add more auxiliary procedures 2014-12-19 22:00:25 -08:00
Leonardo de Moura
d6f79423e9 feat(library/tactic/class_instance_synth): add mk_class_instance procedures 2014-12-19 20:09:09 -08:00
Leonardo de Moura
4421069e34 refactor(library/tactic): rename placeholder_elaborator to class_instance_synth 2014-12-19 19:57:38 -08:00
Leonardo de Moura
ded869b7e0 refactor(frontends/lean): move placeholder_elaborator to library/tactic 2014-12-19 15:23:22 -08:00
Leonardo de Moura
a22dc773b7 refactor(frontends/lean): move some auxiliary procedures to library/tactic 2014-12-19 15:19:45 -08:00
Leonardo de Moura
69750c50c6 refactor(frontends/lean): move pp_options to library 2014-12-19 15:00:05 -08:00
Leonardo de Moura
caf0a4bf15 refactor(frontends/lean): move type_checker_ptr typedef to library 2014-12-19 14:40:15 -08:00
Leonardo de Moura
02de288a51 refactor(frontends/lean): move choice_iterator to library 2014-12-19 14:29:32 -08:00
Leonardo de Moura
9bd74689be feat(library/util): add mk_refl 2014-12-19 13:54:12 -08:00
Leonardo de Moura
a97bef7df2 feat(library/util): add mk_heq 2014-12-19 13:54:12 -08:00
Leonardo de Moura
1ca8723c54 refactor(library/util): allow mk_telescopic_eq to be used with (terms, locals) 2014-12-19 13:54:12 -08:00
Leonardo de Moura
6f78315aa4 refactor(*): add uniform names for "meta-objects" 2014-12-17 11:42:14 -08:00
Leonardo de Moura
8939351903 refactor(library): add compile_equations function, generic_exception, and cleanup elaborator_exception 2014-12-15 19:22:17 -08:00
Leonardo de Moura
5a9cd9eed4 fix(library/normalize): bug in the "eval" command 2014-12-15 19:22:17 -08:00
Leonardo de Moura
f0b002d5a7 fix(library/aliases): aliases in sections and contexts 2014-12-13 14:57:15 -08:00
Leonardo de Moura
e897bbdeb9 feat(library/util): add auxiliary functions for creating tuples (using sigma types) 2014-12-11 17:31:47 -08:00
Leonardo de Moura
b8f665e561 feat(frontends/lean): elaborate recursive equations
Remark: we are not compiling them yet.
2014-12-10 22:25:40 -08:00
Leonardo de Moura
2867789bec fix(library/unifier): handle missing first-order flex-flex case 2014-12-10 22:11:30 -08:00
Leonardo de Moura
756fae7c2a refactor(frontends/lean): move local_context to library 2014-12-10 12:43:32 -08:00
Leonardo de Moura
bf875d5778 feat(library/definitional/equations): add support for inaccessible patterns 2014-12-10 12:35:08 -08:00
Leonardo de Moura
d98aabe9ab refactor(library): move library/definitional/util module to library 2014-12-10 11:23:23 -08:00
Leonardo de Moura
ac664505e6 refactor(library): move class management to library module 2014-12-09 21:38:55 -08:00
Leonardo de Moura
d67583df44 fix(frontends/lean/parser): do not generate error when 'exit' command is used 2014-12-09 10:14:14 -08:00
Leonardo de Moura
58432d0968 feat(library/definitional): add no_confusion construction that is compatible with the HoTT library 2014-12-08 22:11:48 -08:00
Leonardo de Moura
2bb51554d5 feat(library/definitional/util): add telescope equality for HoTT library
This is needed for implementing no_confusion for HoTT.
We can't use heterogeneous equality in HoTT.
2014-12-07 18:35:55 -08:00
Leonardo de Moura
6736f58548 refactor(library/definitional/util): cleanup 2014-12-07 16:41:28 -08:00
Leonardo de Moura
eb87c18693 feat(*): add support for separate HoTT library 2014-12-05 14:34:02 -08:00
Leonardo de Moura
c8d8e7ac93 chore(library/definitional/equations): fix style 2014-12-04 16:00:33 -08:00
Leonardo de Moura
e267b2d120 feat(library/definitional/equations): add support for serializing equations 2014-12-04 15:11:18 -08:00
Leonardo de Moura
1d401ad862 feat(library/definitional): add "datastructure" for storing recursive equations 2014-12-04 12:39:59 -08:00
Leonardo de Moura
ebda057499 fix(library/tactic/intros_tactic): seg fault at intros tactic, fixes #366 2014-12-04 09:26:10 -08:00
Leonardo de Moura
59d403f7d8 fix(library/tactic/inversion_tactic): warning on clang++ 2014-12-03 21:14:10 -08:00
Leonardo de Moura
d10bb92a7d feat(library/aliases): protected definitions in nested namespaces, closes #331 2014-12-03 14:25:02 -08:00
Leonardo de Moura
0443c1e70c fix(frontends/lean): intro tactic + universe variables, fixes #362 2014-12-03 12:56:30 -08:00
Leonardo de Moura
fca97d5bb2 feat(library/definitional): add brec_on construction, closes #272 2014-12-03 10:39:32 -08:00
Leonardo de Moura
f948241bb9 feat(library/definitional): add auxiliary functions 2014-12-03 10:28:55 -08:00
Leonardo de Moura
050104cdfd fix(library/unifier): assertion violation 2014-12-02 12:17:59 -08:00
Leonardo de Moura
1b13562591 fix(library/flycheck): crash when io_state_stream is destroyed before flycheck_scope 2014-12-02 12:11:20 -08:00
Leonardo de Moura
06f436840f fix(library/unifier): postpone class-instance constraints whose type could not be inferred 2014-12-01 22:27:23 -08:00
Leonardo de Moura
19d14678ef refactor(library/unifier): remove dead code 2014-12-01 21:57:34 -08:00
Leonardo de Moura
e6672b958f fix(library/tactic/inversion_tactic): add missing case 2014-12-01 19:11:44 -08:00
Leonardo de Moura
bc7ee2958f fix(library/tactic/inversion_tactic): bug in mutually recursive case 2014-12-01 18:32:38 -08:00
Leonardo de Moura
6640fbf11b feat(library/definitional/brec_on): simplify universe level constraints for non-reflexive recursive datatypes 2014-12-01 17:11:06 -08:00
Leonardo de Moura
193fed7061 fix(library/tactic/inversion_tactic): uninitialized variable 2014-11-30 22:41:22 -08:00
Leonardo de Moura
c08f4672e4 feat(library/tactic): add 'assert' tactic, closes #349 2014-11-29 21:34:49 -08:00
Leonardo de Moura
f51fa93292 feat(library/tactic): add 'fapply' tactic, closes #356 2014-11-29 19:20:41 -08:00
Leonardo de Moura
2c0472252e feat(frontends/lean): allow expressions to be used to define precedence, closes #335 2014-11-29 18:29:48 -08:00
Leonardo de Moura
a0d650d9cc fix(library/tactic/inversion_tactic): complete 'deletion' transition 2014-11-29 09:36:41 -08:00
Leonardo de Moura
e0debca771 feat(library/tactic/inversion_tactic): add 'case ... with ...' variant that allows user to specify names for new hypotheses 2014-11-28 22:25:37 -08:00
Leonardo de Moura
22b2f3c78c fix(library/tactic/inversion_tactic): bug in injectivity transition 2014-11-28 22:07:35 -08:00
Leonardo de Moura
a6be460166 feat(library/tactic/inversion_tactic): basic 'inversion' tactic 2014-11-28 21:56:13 -08:00
Leonardo de Moura
6768c76b52 feat(library/tactic): refine 'get_unused_name' 2014-11-28 19:39:07 -08:00
Leonardo de Moura
9516cd9ee3 feat(library/tactic): 'exact' tactic report unsolved placeholders in nested expression
Actually, the elaborator is the one reporting the unassigned
placeholders. The 'exact' tactic just makes the request.
To implement this feature we had to extend the elaboration interface
expected by the tactic framework.
2014-11-28 14:59:35 -08:00
Leonardo de Moura
04dfda99ab fix(library/tactic/inversion_tactic): bug in name generation 2014-11-28 14:51:12 -08:00
Leonardo de Moura
13405b2bb0 fix(library/tactic/inversion_tactic): inversion tactic for datatypes with dependent elimination 2014-11-27 10:37:22 -08:00
Leonardo de Moura
db9fd53b80 fix(library/tactic): pretty printer for proof states 2014-11-27 09:43:58 -08:00
Leonardo de Moura
976e907c8a chore(library/tactic/tactic.h): cleanup 2014-11-27 09:15:49 -08:00
Leonardo de Moura
5fff3113a9 refactor(library/tactic/inversion_tactic): add 'cases_on' step to inversion_tactic 2014-11-27 00:06:26 -08:00
Leonardo de Moura
ebd320a6b3 feat(library/tactic): add first step of 'inversion' tactic 2014-11-26 21:28:00 -08:00
Leonardo de Moura
c2f32cd953 refactor(library/tactic/intros_tactic): change approach for generating fresh names for nameless 'intros' 2014-11-26 21:27:09 -08:00
Leonardo de Moura
a311f05add refactor(library/tactic): move 'get_unused_name' to goal 2014-11-26 18:46:08 -08:00
Leonardo de Moura
2a00647089 refactor(library/tactic): cleanup 'revert' and 'clear' tactics 2014-11-26 17:08:14 -08:00
Leonardo de Moura
e55397d422 feat(library/tactic): add 'clears' and 'reverts' variants 2014-11-26 14:49:48 -08:00
Leonardo de Moura
2bd8f969d5 feat(library/tactic): add 'revert' tactic, closes #346 2014-11-26 14:23:42 -08:00
Leonardo de Moura
c28e9b9234 feat(library/tactic): add 'clear' tactic, closes #341 2014-11-26 13:11:36 -08:00
Leonardo de Moura
df51ba8b7c feat(library/definitional/projection): use strict implicit inference, closes #344 2014-11-25 18:04:06 -08:00
Leonardo de Moura
ef75cac1c0 feat(kernel/expr): change the rules for inferring implicit arguments, closes #344 2014-11-25 12:54:07 -08:00
Leonardo de Moura
a005c8f4d0 feat(frontends/lean): display eval/check/find_decl results using flycheck 2014-11-24 08:35:49 -08:00
Leonardo de Moura
f1e915a188 feat(frontends/lean): add 'find_decl' command 2014-11-23 23:00:59 -08:00
Leonardo de Moura
8c8bf41e39 feat(frontends/lean/server): do not unfold definitions in FINDG 2014-11-23 19:03:39 -08:00
Leonardo de Moura
13fba433b0 feat(library/tactic/generalize): add 'generalizes' syntax sugar, closes #327 2014-11-23 17:30:22 -08:00
Leonardo de Moura
28c63e685b feat(frontends/lean): add '[local]' notation, closes #322 2014-11-16 21:15:04 -08:00
Leonardo de Moura
00df34a1c4 feat(library/unifier): generalize method process_succ_eq_max_core 2014-11-14 14:25:41 -08:00
Leonardo de Moura
51719145f9 feat(library/unifier): solved universe constraints of the form succ^k1 a = max k2 ?m (when k1 >= k2) 2014-11-12 17:28:33 -08:00
Leonardo de Moura
6bc89f0916 feat(library/definitional): define ibelow and below
These are helper definitions for brec_on and binduction_on
2014-11-12 16:38:46 -08:00
Leonardo de Moura
b07b82cf43 fix(library/definitional): marking cases_on and rec_on as reducible
The idea is to avoid counter-intuitive behavior
2014-11-12 15:03:30 -08:00
Leonardo de Moura
858538a329 refactor(library/definitional): add new to_telescope procedure, and remove code duplication in no_confusion.cpp 2014-11-12 13:31:31 -08:00
Leonardo de Moura
b4c37d180b refactor(library/definitional): add some helper functions 2014-11-12 12:24:22 -08:00
Leonardo de Moura
e2bfe6ee36 refactor(library/definitional/no_confusion): cleanup API 2014-11-11 16:12:44 -08:00
Leonardo de Moura
f6889951c6 fix(library/definitional/cases_on): bug in inductive datatypes with higher-order recursion 2014-11-11 15:14:08 -08:00
Leonardo de Moura
902a551048 feat(definitional/brec_on): add 'mk_below' skeleton 2014-11-11 14:55:21 -08:00
Leonardo de Moura
5fbf9ee964 refactor(library/definitional/util): remove code duplication 2014-11-11 13:53:41 -08:00
Leonardo de Moura
1079d6b320 refactor(library/definitional): combine auxiliary functions used by definitional package in a single module 2014-11-11 13:46:36 -08:00
Leonardo de Moura
b4be96c980 feat(library/definitional/util): add is_inductive_predicate auxiliary predicate 2014-11-11 13:32:56 -08:00
Leonardo de Moura
4fd1ee7619 feat(library/definitional/util): add is_recursive_datatype auxiliary function 2014-11-11 12:26:26 -08:00
Leonardo de Moura
363d4a7577 fix(library/definitional/no_confusion): assertion violation 2014-11-10 10:32:03 -08:00
Leonardo de Moura
e8bc0f8249 feat(library/defitional): add no_confusion construction for inductive datatypes that are not propositions 2014-11-08 18:56:52 -08:00
Leonardo de Moura
b5da143fc0 feat(library/defitional): add no_confusion_type construction for inductive datatypes that are not propositions 2014-11-08 15:20:19 -08:00
Leonardo de Moura
edd94c00df fix(library/definitional): add missing files 2014-11-03 18:36:25 -08:00
Leonardo de Moura
c306bfa83c feat(frontends/lean/structure_cmd): add 'eta' theorem for structures 2014-11-03 18:33:44 -08:00
Leonardo de Moura
c7406d6ce8 fix(library/scoped_ext): bug when declaring nested namespaces 2014-11-02 15:35:49 -08:00
Leonardo de Moura
df008dc3c3 feat(frontends/lean/inductive_cmd): create a namespace for each declared datatype 2014-11-01 19:15:46 -07:00
Leonardo de Moura
aaad9a3c43 feat(library/definitional/projection): add option for marking main premise as instance implicit (i.e., [] binder decorator) 2014-10-31 19:01:32 -07:00
Leonardo de Moura
84b516994c fix(library/tactic): type check generalization result, fixes #273 2014-10-29 20:34:01 -07:00
Leonardo de Moura
61f333d2c2 chore(library/tactic/expr_to_tactic): fix compilation warning 2014-10-29 19:47:47 -07:00
Leonardo de Moura
9547e2d077 feat(library/tactic): add rotate_left/rotate_right tactics, closes #278 2014-10-29 19:13:55 -07:00
Leonardo de Moura
8e9f97e95e fix(frontends/lean): do not save identifier info 2014-10-29 17:38:59 -07:00
Leonardo de Moura
95e843e8ed feat(library/tactic/proof_state): add empty line between goals, closes #281 2014-10-29 16:51:06 -07:00
Leonardo de Moura
88d55bfef0 fix(library/definitional/projection): remove redundant 'error in' 2014-10-29 16:51:06 -07:00
Leonardo de Moura
30571ce418 fix(library/definitional/projection): error messages for projection generation 2014-10-29 13:39:17 -07:00
Leonardo de Moura
fe4ea48381 feat(library/definitional/projection): add projection generator, closes #257 2014-10-29 13:13:05 -07:00
Leonardo de Moura
0c185fc4ab fix(library/tactic): add relax_main_opaque flag to proof_state objects, closes #274 2014-10-29 08:57:34 -07:00
Leonardo de Moura
e22eb3543c feat(library/tactic): add whnf tactic, closes #270 2014-10-28 23:18:49 -07:00
Leonardo de Moura
83e4c0fcec feat(frontends/lean): hide tactic "types"
it is not very useful to display the type of tactics (e.g., apply,
intros, ...)
2014-10-28 22:38:10 -07:00
Leonardo de Moura
1c2bbcfebc feat(frontends/lean/info_manager): add separator -- when displaying PROOF_STATE info
This feature was implemented to address issue #259
2014-10-28 16:39:21 -07:00
Leonardo de Moura
186e598bf8 feat(library/tactic/goal): add option pp.compact_goals 2014-10-28 16:30:37 -07:00
Leonardo de Moura
a3801e84d4 fix(library/tactic/goal): avoid unnecessary line break when possible 2014-10-28 16:17:33 -07:00
Leonardo de Moura
ea739100b3 fix(library/unifier): broken optimization in the unifier
See new comments and tests for details.
2014-10-28 16:09:41 -07:00
Leonardo de Moura
78bc3ef7e4 feat(library/unifier): improve FailLocal/FailCircular failures in the unifier by using normalization
This improvements was marked as TODO, and was preventing us from
elaborating the example in the new test vector3.lean
2014-10-27 16:49:29 -07:00
Leonardo de Moura
bca2be56ec feat(library/normalize): add new flavors of normalize procedure 2014-10-27 16:25:30 -07:00
Leonardo de Moura
fd60cf6a79 feat(library/tactic/exact_tactic): modify 'exact' tactic semantics, use higher-order unification
See new node.inj4 theorem, we need the extra power to be able to avoid type information at
    exact (assume e₁ e₂, e₁)
2014-10-26 10:27:33 -07:00
Leonardo de Moura
c7f6a6b94e feat(library/definitional/cases_on): automatically add 'cases_on' 2014-10-25 17:22:02 -07:00
Leonardo de Moura
c751bdd9e6 chore(library/definitional): remove dead code 2014-10-25 15:11:48 -07:00
Leonardo de Moura
fa1bf40d0f fix(library/definitional): make sure argument is an inductive datatype 2014-10-25 15:09:24 -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
096c67b2e5 fix(library/unifier): occurs-check bug 2014-10-25 00:16:02 -07:00
Leonardo de Moura
aaad9633fb fix(library/tactic/expr_to_tactic): memory leak 2014-10-24 14:40:36 -07:00
Leonardo de Moura
79d0347721 feat(library/tactic): add generalize tactic, closes #34
Remark: the intros tactic has been added in a different commit: 7d0100a340
2014-10-23 22:40:15 -07:00
Leonardo de Moura
b83b065d00 feat(library/tactic/apply_tactic): modify heuristic for adding arguments to apply tactic. 2014-10-23 22:36:32 -07:00
Leonardo de Moura
f9aa1a1b84 refactor(library/tactic/goal): remove unnecessary parameter 2014-10-23 21:22:52 -07:00
Leonardo de Moura
43cfd5c26a fix(library/tactic): add missing file 2014-10-23 14:04:12 -07:00
Leonardo de Moura
e750c9b67a feat(frontends/lean): add 'info' tactic for producing PROOF_STATE info for emacs mode 2014-10-23 13:18:30 -07:00
Leonardo de Moura
8e3ac023bb feat(library/reducible): expose 'memoize' flag 2014-10-23 13:09:59 -07:00
Leonardo de Moura
38a9aa2a98 feat(frontends/lean): automatically open 'tactic' namespace (if it is not already open) in 'by' and 'begin-end' expressions 2014-10-23 10:26:19 -07:00
Leonardo de Moura
00f9a10e82 refactor(library/tactic/unfold_tactic): use new 'tactic.expr' to implement 'unfold' tactic
This change also enabled us to remove hacks used in the tests modified
by this commit.
2014-10-23 10:26:19 -07:00
Leonardo de Moura
6fcba192b2 refactor(library/tactic): move 'unfold' tactic to separate module 2014-10-23 10:26:19 -07:00
Leonardo de Moura
96d7d9c8d9 feat(library/tactic/elaborate): do not invoke unifier if no constraints were generated during elaboration 2014-10-23 10:26:19 -07:00
Leonardo de Moura
f3fdc70400 refactor(library/tactic): add auxiliary module 'library/tactic/elaborate' 2014-10-23 10:26:11 -07:00
Leonardo de Moura
3aec70b92c feat(library/tactic): elaborate 'exact' tactic argument at tactic execution time 2014-10-22 22:13:37 -07:00
Leonardo de Moura
c50227ea6e feat(library/tactic): change apply tactic semantics: goals are not reversed; and dependent arguments are not included
This commit also adds the tactic rapply that corresponds to the previous
semantics we have been using.
2014-10-22 18:11:09 -07:00
Leonardo de Moura
60132912a4 refactor(library/tactic): remove unnecessary hack
It is not needed anymore.
We had to use this hack when we had tactic_macro_definition_cell.
2014-10-22 17:41:19 -07:00
Leonardo de Moura
7c62446023 refactor(frontends/lean): remove dead code 2014-10-22 17:39:06 -07:00
Leonardo de Moura
e95c7c5f70 refactor(library/tactic/rename_tactic): use new 'tactic.expr' to implement 'intro/intros' tactic
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-10-22 17:29:50 -07:00
Leonardo de Moura
9a316092d1 refactor(library/tactic/rename_tactic): use new 'tactic.expr' to implement rename tactic 2014-10-22 17:29:50 -07:00
Leonardo de Moura
5e15ac0c92 feat(library/tactic): add new approach for embedding non-elaborated expressions into tactics 2014-10-22 17:29:50 -07:00
Leonardo de Moura
7c617955d0 refactor(library/tactic): move 'exact' tactic to separate module 2014-10-22 17:29:44 -07:00
Leonardo de Moura
323715e951 refactor(library/tactic): move 'tracing' tactics to separate module 2014-10-22 14:12:45 -07:00
Leonardo de Moura
815dc9b63d chore(library/tactic/expr_to_tactic): remove dead code 2014-10-20 18:59:57 -07:00
Leonardo de Moura
53a64ac767 refactor(library/tactic): move intros_tactic initialization to intros_tactic module 2014-10-20 17:47:52 -07:00
Leonardo de Moura
3c4419ff23 refactor(library/tactic): move rename_tactic to separate module 2014-10-20 17:41:40 -07:00
Leonardo de Moura
ac9397816f refactor(library/tactic): move apply_tactic initialization to apply_tactic module 2014-10-20 17:32:32 -07:00
Leonardo de Moura
7d0100a340 feat(library/tactic): add 'intros' tactic 2014-10-20 15:26:16 -07:00
Leonardo de Moura
5cba7244ce fix(library/tactic/expr_to_tactic): argument evaluation order is not part of the standard 2014-10-20 15:16:38 -07:00
Leonardo de Moura
8cfb3ae687 fix(library/module): bug in import_module 2014-10-18 21:03:22 -07:00
Leonardo de Moura
d2cbd25985 refactor(kernel): replace_visitor doesn't need to be in the kernel anymore 2014-10-17 10:23:35 -07:00
Leonardo de Moura
8974b52f7b perf(library/unifier): avoid unnecessary wasteful computation 2014-10-16 17:16:49 -07:00
Leonardo de Moura
c4f02bd16a refactor(kernel/expr): remove dead code 2014-10-16 13:09:26 -07:00
Leonardo de Moura
28128e0330 fix(frontends/lean): EXTRA_TYPE info 2014-10-16 12:25:18 -07:00
Leonardo de Moura
d960c1994e refactor(library/tactic/apply_tactic): reuse type_checker object 2014-10-15 09:28:01 -07:00
Leonardo de Moura
bbe4017790 refactor(library/tactic/apply_tactic): remove dead code 2014-10-15 09:15:11 -07:00
Leonardo de Moura
b94d121580 refactor(library): move flycheck "helper" classes to separate module 2014-10-15 09:08:04 -07:00
Leonardo de Moura
e6606ef2ac feat(library/tactic): add 'rename' hypothesis tactic 2014-10-14 18:19:34 -07:00
Leonardo de Moura
90dba868e3 feat(library/tactic/proof_state): apply substitutions when pretty printing state 2014-10-14 17:37:20 -07:00
Leonardo de Moura
58c9421bab refactor(library/tactic): elaborate expressions nested in tactics with respect to current goal, save postponed constraints (e.g., flex-flex constraints) closes #44, fixes #70 2014-10-14 17:18:40 -07:00
Soonho Kong
0f5d88517d chore(library/rewriter): remove lean-0.1 files 2014-10-14 16:03:34 -07:00
Leonardo de Moura
5ff200c516 chore(library/simplifier): delete old simplifier
This was the simplifier used in Lean 0.1.
2014-10-14 15:56:09 -07:00
Leonardo de Moura
a30232b99a fix(library/module): race condition on m_imported 2014-10-14 15:19:50 -07:00
Leonardo de Moura
7231aa0d73 fix(library/module): allow multiple calls to import_modules with the same modules
The idea is to store a set of already imported files.
This feature is useful when using the import_modules API directly (e.g.,
from javascript).
2014-10-14 08:13:41 -07:00
Leonardo de Moura
7d0db4cc60 feat(library/kernel_serializer): compress binder modifier annotations when saving .olean file 2014-10-13 10:14:56 -07:00
Leonardo de Moura
a26618e0f2 feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied 2014-10-12 13:06:00 -07:00
Leonardo de Moura
78b8a67015 refactor(library/scoped_ext): sections are just "nameless" namespaces 2014-10-11 17:36:46 -07:00
Leonardo de Moura
3d65b1c25c fix(frontends/lean/elaborator): incorrect type information being reports in lean-mode, fixes #241 2014-10-10 15:41:55 -07:00
Leonardo de Moura
9ba59c6b25 feat(library/universe): improve support for universe level constraints in the unifier 2014-10-09 20:28:39 -07:00
Leonardo de Moura
86410d392b feat(util/list_fn): generalize map_filter template 2014-10-08 22:23:20 -07:00
Leonardo de Moura
8fa171cb92 refactor(library/unifier): allow general 'unify' procedure to take an initial substitution as argument 2014-10-07 17:30:57 -07:00
Leonardo de Moura
92c424936a refactor(kernel/macro_definition_cell): improve macro get_type API 2014-10-07 16:38:31 -07:00
Soonho Kong
2cf6cf19c0 feat(src): add LEAN_VERSION_PATCH 2014-10-07 12:30:38 -07:00
Leonardo de Moura
60d8369688 fix(library/unifier): missing justification when updating choice constraints
The bug was not producing incorrect results, but really bad error
messages.
See: empty.lean.expected.out
2014-10-04 10:40:53 -07:00
Leonardo de Moura
bf081ed431 refactor(kernel): rename var_decl to constant_assumption
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
ead827d6b7 feat(frontends/lean): add ! operator the "dual" of @, closes #220 2014-10-01 17:13:41 -07:00
Leonardo de Moura
2730e5163e feat(frontends/lean): allow 'sorry' implicit argument to access the whole context, and avoid cryptic error message
See new test for explanation.
2014-09-30 18:04:04 -07:00
Leonardo de Moura
486839881c feat(*): use environment fingerprint to detect when the cache cannot be used because the configuration changed, closes #75
We are not taking into the account the options object yet.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
19dec32844 feat(library): add environment fingerprint 2014-09-29 18:30:00 -07:00
Leonardo de Moura
530997638a feat(library/definition_cache): store the hashcode of direct dependencies
Actually we store the has code of their types.
2014-09-29 18:30:00 -07:00
Leonardo de Moura
a0c37b231f feat(kernel/expr): add hash_bi function that takes binder information into account 2014-09-29 16:44:55 -07:00
Leonardo de Moura
0d6d746d98 feat(frontends/lean): check modification time of imported files
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-29 15:17:27 -07:00
Leonardo de Moura
9f6a8827e0 refactor(*): use name_map 2014-09-28 10:23:11 -07:00
Leonardo de Moura
22e47430b5 feat(library/unifier): add 'on-demand' choice constraints, they are processed as soon as their type does not contain meta-variables anymore 2014-09-27 21:50:39 -07:00
Leonardo de Moura
8e7aac1eb4 fix(frontends/lean): add 'eval' command 2014-09-26 20:16:03 -07:00
Leonardo de Moura
9928390605 fix(library/match): memory leak that only happens with compiling with clang++ 2014-09-26 10:24:38 -07:00
Leonardo de Moura
cd87539de5 fix(library/unifier): bug in the new next_delta_unfold_case_split 2014-09-25 09:56:32 -07:00
Leonardo de Moura
0488ee4ee2 perf(library/unifier): process delta expansion case split lazily 2014-09-24 19:16:12 -07:00
Leonardo de Moura
516c0c73b9 refactor(*): remove dependency to thread_local C++11 keyword, the
current compilers have several bugs associated with it

We use the simpler __thread (gcc and clang) and
__declspec(thread) (visual studio).
2014-09-24 12:51:04 -07:00
Leonardo de Moura
358074ae3d refactor(kernel/record): remove kernel extension for records, we will
implement it outside of the kernel on top of the inductive datatypes
2014-09-24 10:12:28 -07:00
Leonardo de Moura
da481c3274 refactor(kernel): explicit initialization/finalization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-24 10:12:28 -07:00
Leonardo de Moura
4dd7abb14e refactor(library): explicit initialization/finalization 2014-09-23 10:45:14 -07:00
Leonardo de Moura
27ff42d2e0 refactor(library): remove dead files 2014-09-23 10:28:20 -07:00
Leonardo de Moura
83b22823a6 refactor(library/tactic): explicit initialization/finalization 2014-09-23 10:06:15 -07:00
Leonardo de Moura
531046626a refactor(*): explicit initialization/finalization for environment extensions 2014-09-22 17:30:29 -07:00
Leonardo de Moura
b6781711b1 refactor(*): explicit initialization/finalization for serialization
modules, expression annotations, and tactics
2014-09-22 15:26:41 -07:00
Leonardo de Moura
b1ee888aae refactor(*): start move to explicit initialization/finalization,
explicitly initialize/finalize options

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-22 10:41:07 -07:00
Leonardo de Moura
fd5daa8fda feat(frontends/lean): use coercions to function-class and sort-class in
function arguments, closes #203
2014-09-20 09:00:10 -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
93c2c30310 feat(frontends/lean): allow transient coercions, i.e., coercions that
are not saved in .olean files
2014-09-19 15:54:32 -07:00
Leonardo de Moura
cbafa0dbf9 feat(library/scoped_ext): allow extensions to mark whether an entry is
persistent or not
2014-09-19 15:54:32 -07:00
Leonardo de Moura
49d5af473d refactor(kernel): remove support for proof irrelevant classes
Motivation: we can use Prop
2014-09-19 07:32:07 -07:00
Leonardo de Moura
87592cdb43 refactor(library): remove dead code 2014-09-18 22:45:53 -07:00
Leonardo de Moura
dd31ed60b0 refactor(library): remove unnecessary file hott_kernel, HoTT and
standard library have been merged
2014-09-18 20:30:37 -07:00
Leonardo de Moura
243f80231a chore(kernel): fix style and lua bindings 2014-09-17 18:30:28 -07:00
Leonardo de Moura
ea1bae0143 refactor(kernel/converter): replace extra_opaque_set with predicate
It gives us more flexibility.
2014-09-17 17:05:13 -07:00
Leonardo de Moura
1fbb554a16 feat(library/module): provide predicate module::is_definition 2014-09-17 16:32:00 -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
Leonardo de Moura
841658ec37 feat(library/error_handling): generate valid line and column information
when in flycheck mode
2014-09-14 20:15:22 -07:00
Leonardo de Moura
edcbe6fe10 feat(frontends/lean): allow multiple coercions from class A to B, closes #187
See new tests (for examples)
tests/lean/run/coe10.lean
tests/lean/run/coe11.lean
tests/lean/run/coe9.lean

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-14 12:59:43 -07:00
Leonardo de Moura
1b6d4460e9 chore(library/coercion): cleanup 2014-09-14 12:59:43 -07:00
Leonardo de Moura
d647954f93 feat(frontends/lean/elaborator): constraints associated with 'proof-qed'
blocks are solved independently, closes #82
2014-09-13 10:21:10 -07:00
Leonardo de Moura
029acbd1df feat(library/coercion): better support for coercions to function-class. closes #185 2014-09-12 13:17:20 -07:00
Leonardo de Moura
62585f1c56 fix(library/coercion): remove spurious '\n' 2014-09-12 13:08:47 -07:00
Leonardo de Moura
010ecebfea feat(frontends/lean): add proof-qed expression
Remark: we still have to add support to it in the elaborator.
Right now, it is just an embellished parenthesis.
2014-09-11 18:14:49 -07:00
Leonardo de Moura
85f7132efe feat(frontends/lean/placeholder_elaborator): perform class-instance resolution in a completely independent unifier object, it also triggers the resolution when expected type does not contain metavariables, closes #175, closes #173, closes #68 2014-09-11 14:49:35 -07:00
Leonardo de Moura
03902d4b45 refactor(library/unifier): add option m_discard too unifier, if m_discard == false, then unsolved flex-flex constraints are returned, the unifier also does not apply "last resource" techniques that may miss many solutions. 2014-09-11 14:49:35 -07:00
Leonardo de Moura
935ba35292 feat(library/unifier): keep normalization result when processing universe level unification constraints 2014-09-11 14:49:35 -07:00
Leonardo de Moura
c7c35becb2 feat(library/io_state): add default constructor to io_state 2014-09-11 14:49:35 -07:00
Leonardo de Moura
80fd14b39e refactor(frontends/lean): replace collect_metavars with metavar_closure helper class 2014-09-11 14:49:35 -07:00
Leonardo de Moura
bd1bc336fb feat(library/coercion): add simple trick for defining coercions to function-class in a convenient way, closes #31 2014-09-09 14:36:36 -07:00
Leonardo de Moura
65000fa653 feat(library/coercion): rename class to 'coercions' 2014-09-09 14:03:45 -07:00
Leonardo de Moura
ee196bbf1a fix(frontends/lean/pp): pretty printing coercions to functions, fixes #151 2014-09-09 12:49:32 -07:00
Leonardo de Moura
187661aa6a feat(library/unifier): consider whnf case-split on flex-rigid constraints whenever the rhs contains a local constant that is not in the lhs 2014-09-09 09:27:26 -07:00
Leonardo de Moura
a5698a55ec fix(library/unifier): catch type error when checking is_def_eq of type incorrect expressions 2014-09-09 09:27:26 -07:00
Leonardo de Moura
fd85d4702e refactor(library/unifier): move all_local outside of the class 2014-09-09 09:27:26 -07:00
Leonardo de Moura
ebde1bcfad feat(library/unifier): option 'unifier.computation true' will force elaborator to always consider an extra case-split when the right-hand-side of a flex-rigid constraint is not in weak-head-normal-form 2014-09-09 09:27:26 -07:00
Leonardo de Moura
b4793df653 feat(frontends/lean): rename '[fact]' to '[visible]'
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-08 07:47:42 -07:00
Leonardo de Moura
2631979f5c fix(library/scoped_ext): section/context should not affect namespace 2014-09-07 19:59:34 -07:00
Leonardo de Moura
bbff564a1c feat(frontends/lean): persistent notation in sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-06 11:14:20 -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
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
d76218e9d1 fix(frontends/lean/elaborator): bug when elaborating expressions with multiple annotations
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 11:23:58 -07:00
Leonardo de Moura
c532dcfaac feat(library/declaration_index): add 'a|abbreviation-name|declaration-name' entries in .ilean files 2014-09-04 09:30:25 -07:00
Leonardo de Moura
d3ec5ccac1 refactor(library/declaration_index): store declarations in a map
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-04 07:42:18 -07:00
Leonardo de Moura
f9a90b9920 feat(frontends/lean): add 'export' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 18:37:01 -07:00
Leonardo de Moura
5e18e6609c feat(frontends/lean): add 'as' clause to 'open' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 17:37:02 -07:00
Leonardo de Moura
e14814d4bf feat(frontends/lean): add '[protected]' modifier
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 15:01:13 -07:00
Leonardo de Moura
060093cbab refactor(library): add type_util module, and move get_expect_num_args to it
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-03 08:40:03 -07:00
Leonardo de Moura
bbdb13172e feat(frontends/lean/server): add 'FINDP' command
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-02 12:59:48 -07:00
Leonardo de Moura
9a4472cff5 fix(frontends/lean): wrong displayed type in proof with multiple sorry's, fixes #112
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 14:32:53 -07:00
Leonardo de Moura
b9489ce585 fix(frontends/let): let-expression pretty printer
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-29 10:58:27 -07:00
Leonardo de Moura
be56fcf0bd fix(frontends/lean/pp): pretty print 'let-expressions', closes #87
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 18:20:58 -07:00
Leonardo de Moura
b9628842cf feat(library/unifier): remove mk_macro_imitation, we instead expand the macro before solving flex-rigid constraints
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 17:34:03 -07:00
Leonardo de Moura
1e80a9dfe9 feat(frontends/lean): avoid exponential blowup when processing let-expressions with a lot of sharing, cleanup show-expression
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 16:27:52 -07:00
Leonardo de Moura
641624a277 fix(library/unifier): bug in expand_rhs
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 14:35:11 -07:00
Leonardo de Moura
e303651dee refactor(library/unifier): cleanup mk_macro_imitation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-28 13:19:19 -07:00
Leonardo de Moura
c7e9e238ec fix(frontends/lean/server): ignore output produced by worker thread, fixes #98
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:46:49 -07:00
Leonardo de Moura
fab4eb0d69 feat(frontends/lean/server): add CLEAR_CACHE command, closes #100
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-27 10:31:01 -07:00
Leonardo de Moura
4c9723e5ed fix(library/unifier): assertion violation
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 09:07:34 -07:00
Leonardo de Moura
02b7f980b0 fix(library/num): bug in to_pos_num, missing test
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-26 08:18:07 -07:00
Leonardo de Moura
fbf13994d8 refactor(*): use + for concatenating format objects
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-24 09:35:25 -07:00
Leonardo de Moura
2f699fa53a feat(*): make sections 'permanent', and add 'transient' contexts, closes #88
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 15:45:15 -07:00
Leonardo de Moura
b13851ba13 feat(frontends/lean): add kind and type to index, closes #89
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-08-23 12:39:59 -07:00