Commit graph

4368 commits

Author SHA1 Message Date
Leonardo de Moura
3e4d849a4a refactor(kernel/metavar.h): simplify API 2015-03-12 12:50:53 -07:00
Leonardo de Moura
6a78ae7b46 fix(library/tactic/class_instance_synth): enforce consistent behavior in type class resolution
Auxiliary procedure mk_class_instance was not discarding partial solutions.
This procedure is used by the apply and inversion (aka cases) tactics
2015-03-12 10:27:05 -07:00
Leonardo de Moura
b38c943086 fix(library/tactic/class_instance_synth): discard partial solutions even when option class.unique_instances = true is used 2015-03-12 10:13:16 -07:00
Leonardo de Moura
47a350d888 fix(library/tactic/inversion_tactic): missing condition for applying optimization 2015-03-12 09:11:36 -07:00
Leonardo de Moura
7de3d5771d feat(library/tactic/rewrite_tactic): add eta-reduction support at esimp
closes #469
2015-03-12 00:32:31 -07:00
Leonardo de Moura
a9fa0fead9 feat(library/match): match modulo eta 2015-03-12 00:30:44 -07:00
Leonardo de Moura
a7af8e7c71 feat(library/tactic/inversion_tactic): remove dummy hypotheses of the form (H : a = a)
closes #468
2015-03-11 20:50:06 -07:00
Leonardo de Moura
b5fb7c734e feat(library/tactic/inversion_tactic): remove hypothesis being destructed
addresses second issue in #468
2015-03-11 20:42:50 -07:00
Leonardo de Moura
0a5340aa22 feat(library/tactic/goal): add auxiliary method 2015-03-11 20:39:41 -07:00
Leonardo de Moura
ebdda67812 fix(library/tactic/inversion_tactic.cpp): remove unnecessary hypothesis in HoTT mode
partial solution for #468
2015-03-11 19:30:34 -07:00
Leonardo de Moura
737faecc65 feat(library/tactic/inversion_tactic): fail if is_hset type class synthesis produced term containing meta-variables, improve error messages
fixes #467
2015-03-11 15:54:50 -07:00
Leonardo de Moura
71ce207080 fix(frontends/lean/elaborator): potential memory access violation
Before this commit, the modified method would crash if caching in the
whnf procedure was disabled.
2015-03-11 15:54:50 -07:00
Leonardo de Moura
1c55e2f389 fix(util/memory): memory allocation problem when using clang++ 3.5 on Ubuntu 14.04 2015-03-11 10:06:13 -07:00
Leonardo de Moura
4c6b0dc0e5 fix(library/tactic/expr_to_tactic): tactic_expr_to_id did not take as_atomic annotation into account
fixes #466
2015-03-11 08:49:59 -07:00
Leonardo de Moura
1244f01518 chore(library/unifier): remove dead code 2015-03-09 14:07:14 -07:00
Leonardo de Moura
9a6c675908 feat(library/unifier): add option to disable nonchronological backtracking 2015-03-09 12:08:58 -07:00
Leonardo de Moura
f966634910 feat(frontends/lean): nested dependent pattern matching 2015-03-06 19:18:08 -08:00
Leonardo de Moura
1490bdad49 feat(frontends/lean): add version of 'exact' tactic (sexact) that enforces goal type during term elaboration 2015-03-06 17:34:45 -08:00
Leonardo de Moura
bd8c4315f1 feat(frontends/lean): allow 'match-with' to be used in tactics without prefixing it with 'exact' 2015-03-06 15:49:31 -08:00
Leonardo de Moura
4edd7b9099 fix(library/definitional/equations): allow a function to be the result of a match-with term or recursive definition 2015-03-06 15:08:52 -08:00
Leonardo de Moura
f24d9e84fe feat(frontends/lean): add option 'max_memory'
Default value is 512Mb
2015-03-06 13:56:20 -08:00
Leonardo de Moura
3b721fe675 feat(frontends/lean): add missing 'help' command 2015-03-06 13:56:20 -08:00
Leonardo de Moura
daf36803c4 fix(frontends/lean/builtin_exprs): bug in 'using' construct 2015-03-06 13:56:20 -08:00
Leonardo de Moura
368f9d347e refactor(frontends/lean): approach used to parse tactics
The previous approach was too fragile

TODO: we should add separate parsing tables for tactics
2015-03-05 18:11:21 -08:00
Leonardo de Moura
28487ede3b feat(frontends/lean/decl_cmds): allow 'empty' set of pattern matching equations 2015-03-05 14:37:29 -08:00
Leonardo de Moura
8e9ccf8b6f chore(frontends/lean): remove 'dead' tokens 2015-03-05 14:37:29 -08:00
Leonardo de Moura
b73a931c70 fix(frontends/lean/elaborator): missing case 'no-equation' annotation 2015-03-05 14:37:29 -08:00
Leonardo de Moura
e4060a5614 feat(frontends/lean): do not force user to type the function name in the left-hand-side of recursive equations 2015-03-05 12:08:36 -08:00
Soonho Kong
87c236613a feat(emacs/lean-mode.el): add configuration menu-item for flycheck
close #451
2015-03-05 14:42:59 -05:00
Soonho Kong
b7c852a5c8 feat(src/lean-mode.el): add 'configuration' menu and add toggle option for 'Show type at point'
close #456
2015-03-05 14:37:44 -05:00
Leonardo de Moura
039afb4578 feat(frontends/lean): treat "proof t qed" as alias for "by exact t" 2015-03-05 11:12:39 -08:00
Leonardo de Moura
bd0f209659 feat(library/tactic/exact_tactic): do not force 'exact' tactic expression to be fully elaborated (i.e., metavariable free) 2015-03-05 11:12:39 -08:00
Leonardo de Moura
8295ef4e57 fix(library/tactic/class_instance_synth): constraint execution order at type class resolution
We could not fix this problem before because we did not have the
[quasireducible] annotation.

Without this annotation, the fixed TC would loop in some HoTT files.
2015-03-04 22:20:20 -08:00
Leonardo de Moura
abd238aef0 feat(*): add [quasireducible] attribute 2015-03-04 22:12:49 -08:00
Soonho Kong
8265729a82 fix(emacs/README.md): wrong quotation mark
[skip ci]
2015-03-04 17:04:39 -05:00
Floris van Doorn
3d7656078d feat(hott/types): prove that 'is_equiv f' is an hprop 2015-03-04 00:22:51 -05:00
Floris van Doorn
704f2b2697 feat(hott/algebra/category): prove that set is a univalent category assuming is_equiv is an hprop 2015-03-04 00:22:41 -05:00
Leonardo de Moura
51504a1872 feat(library/tactic/class_instance_synth): restrict higher-order unification even more during type class resolution 2015-03-03 20:26:49 -08:00
Leonardo de Moura
7db6ed7c14 refactor(library/unifier): move m_pattern configuration option to unifier_config 2015-03-03 20:24:18 -08:00
Leonardo de Moura
341a9a2010 refactor(library/unifier): remove dead code 2015-03-03 20:14:17 -08:00
Leonardo de Moura
fa79b214b8 fix(frontends/lean): allow 'attribute <id> [priority ...]' 2015-03-03 16:17:32 -08:00
Leonardo de Moura
11aad4449b feat(frontends/lean): add '[semireducible]' attribute
This commit also renames the elements of reducible_status.
The idea is to use in the C++ implementation the same names used in the
Lean front-end.
2015-03-03 10:48:36 -08:00
Leonardo de Moura
8240d7adcd perf(frontends/lean/util): improve univ_metavars_to_params_fn
We moved to replace_visitor because it uses a more precise cache.
2015-03-02 18:25:00 -08:00
Leonardo de Moura
7e2f0f9a36 fix(library/unifier): in the context_check, we should not consider local constants that occur in the type of other constants
This was a performance bug.
We were missing higher-order pattern constraints due to this bug.
2015-03-02 17:28:56 -08:00
Leonardo de Moura
1042bbc06f fix(kernel/metavar): improve error messages by propagating the tag when we execute instantiate_all
This is the real fix for commit ededf4fc6c
2015-03-02 13:01:50 -08:00
Leonardo de Moura
c81762970e fix(frontends/lean/elaborator): revert commit ededf4fc6c
The instantiate_all are needed. See issue #457
2015-03-02 13:00:54 -08:00
Leonardo de Moura
fdb169b8f3 feat(library/tactic): improve error localization when compiling tactics 2015-03-02 12:21:02 -08:00
Leonardo de Moura
ededf4fc6c feat(frontends/lean): remove unnecessary instantiate_all's that were messing with error localization 2015-03-01 14:51:44 -08:00
Leonardo de Moura
ca57b43698 feat(library/tactic): add 'change' tactic 2015-03-01 14:15:39 -08:00
Leonardo de Moura
c8ad5e9406 feat(frontends/lean/builtin_exprs): focus on have-tactic goal 2015-03-01 13:43:33 -08:00
Leonardo de Moura
e07c6675b3 feat(library/tactic/elaborate): better error message for tactics using elaborate_with_respect_to 2015-03-01 13:42:53 -08:00
Leonardo de Moura
c772d7bf84 fix(frontends/lean/elaborator): unassigned metavariable when using nested begin-end blocks
Closes #454
2015-02-28 09:03:56 -08:00
Floris van Doorn
23a248ab28 style(hott): let inverse notation have higher binding power than application 2015-02-28 01:16:23 -05:00
Soonho Kong
05cfb21c4c fix(emacs/lean-server.el): split findp info only up-to 1
close #446
2015-02-27 20:04:13 -05:00
Leonardo de Moura
cf56935b01 feat(frontends/lean): improve support for user defined tactics 2015-02-27 16:58:25 -08:00
Soonho Kong
c9ffc2fec8 fix(emacs/lean-util): add hlean support in lean-path-list
close #450
2015-02-27 15:27:18 -05:00
Leonardo de Moura
7d827a14c9 feat(library/module): expand 'failed to import' error message
see issue #448
2015-02-27 08:00:30 -08:00
Leonardo de Moura
2b65f02f6f feat(shell/lean): do not terminate if an error is detected when loading the cache
see issue #448
2015-02-27 07:54:59 -08:00
Leonardo de Moura
5b736a2268 feat(frontends/lean): add support for empty match-with expressions 2015-02-26 16:36:15 -08:00
Leonardo de Moura
d00c013ad8 fix(shell/lean): display HoTT library path for lean --hlean --path
See #450
2015-02-26 15:09:03 -08:00
Leonardo de Moura
72eed42ac8 feat(library/unifier): ignore irrelevant branches when solving flex-rigid constraints 2015-02-26 13:43:54 -08:00
Floris van Doorn
c091acc55b feat(hott): remove funext as type class, add theorems to prove equalities between functors and natural transformations 2015-02-26 12:52:33 -05:00
Soonho Kong
88e287df5a doc(emacs/README.md): add instructions for unicode-fonts package
related issue: #446
2015-02-26 05:09:40 -05:00
Leonardo de Moura
68110faa4d feat(frontends/lean/inductive_cmd): allow '|' in inductive datatype declarations 2015-02-25 17:00:10 -08:00
Leonardo de Moura
5ca52d81ec feat(frontends/lean): ML-like notation for match and recursive equations 2015-02-25 16:20:44 -08:00
Leonardo de Moura
c04c610b7b feat(frontends/lean): add 'assert H : A, ...' as notation for 'have H [visible] : A, ...' 2015-02-25 14:30:42 -08:00
Leonardo de Moura
96b54a8007 feat(frontends/lean/builtin_exprs): add 'have' notation in 'begin-end' blocks
It is notation for the assert tactic.
2015-02-25 14:04:17 -08:00
Leonardo de Moura
425aba9aa9 feat(library/pp_options): reduce default limits in the pretty printer
The goal is to avoid problems like the one described in issue #428
2015-02-25 14:04:17 -08:00
Soonho Kong
db1fba3ddc fix(emacs/lean-server.el): lean-server-trace-buffer-name was changed to a function 2015-02-25 14:21:23 -05:00
Leonardo de Moura
909ebfc5f1 feat(frontends/lean/elaborator): try coercions after each overload
We try only the easy cases since the more general case is too expensive.

closes #444
2015-02-24 17:41:20 -08:00
Leonardo de Moura
34c36648bb fix(frontends/lean/decl_cmds): constants command
closes #445
2015-02-24 16:27:13 -08:00
Leonardo de Moura
42289d4334 feat(library/tactic/class_instance_synth): create class instance synthesis subproblems only for arguments marked with the [] binder annotation 2015-02-24 16:12:39 -08:00
Leonardo de Moura
1cd44e894b feat(library/tactic/class_instance_synth): conservative class-instance resolution: expand only definitions marked as reducible
closes #442
2015-02-24 16:12:35 -08:00
Leonardo de Moura
4364b7f926 feat(frontends/lean): pp.beta is true by default
Remark: there is one exception (command: print definition). For this
command pp.beta is still false.
2015-02-24 12:27:53 -08:00
Leonardo de Moura
1ff6446a63 feat(frontends/lean): nested begin-end blocks 2015-02-24 11:59:27 -08:00
Leonardo de Moura
21e972e34a fix(emacs/lean-syntax): syntax-highlight problem in tactics 2015-02-24 11:57:34 -08:00
Leonardo de Moura
dc2ac92846 fix(library/definitional/equations): use whnf on recursive definition arguments
The idea is to expose "hidden" datatypes.
2015-02-23 22:27:30 -08:00
Leonardo de Moura
3197e6d403 feat(frontends/lean/parse_rewrite_tactic): improve rewrite tactic parser 2015-02-23 19:40:03 -08:00
Leonardo de Moura
787fed95aa fix(library/tactic/inversion_tactic): bug in simpler case (hypotheses were being lost) 2015-02-23 16:10:49 -08:00
Leonardo de Moura
7adecaf494 fix(frontends/lean/structure_cmd): include context/section parameteres/variables that are used in explicit structure parameters 2015-02-23 15:28:43 -08:00
Leonardo de Moura
923fed8612 fix(frontends/lean/structure_cmd): bug in alias generation in the structure command
This commit (and 75acb3bc66) closes #443
2015-02-23 15:17:05 -08:00
Leonardo de Moura
75acb3bc66 fix(frontends/lean/structure_cmd): internal name of parameter/variable was being erased 2015-02-23 15:01:27 -08:00
Leonardo de Moura
7d35d18cad fix(library/tactic/rewrite_tactic): bug when matching terms that expanded into projections 2015-02-22 18:23:10 -08:00
Leonardo de Moura
a8554b6ed9 fix(kernel/default_converter): avoid assertion violation when normalizing type incorrect expressions 2015-02-22 16:17:43 -08:00
Leonardo de Moura
af787d9b7f fix(library/constants): regenerate constants.cpp and fix affected files 2015-02-22 09:22:51 -08:00
Floris van Doorn
61901cff81 feat(hott): rename definition and cleanup in HoTT library
also add more definitions in types.pi, types.path, algebra.precategory

the (pre)category library still needs cleanup
authors of this commit: @avigad, @javra, @fpvandoorn
2015-02-20 21:40:42 -05:00
Leonardo de Moura
33e562a7ce fix(frontends/lean/structure_cmd): effect of "include" command in the structure command
closes #438
2015-02-19 22:44:51 -08:00
Leonardo de Moura
7fc216183e feat(library/tactic): produce better error message when a tactic fails
closes #348
2015-02-16 18:42:15 -08:00
Leonardo de Moura
3a67ddb7c5 feat(library/locals): use optional<expr> instead of bool at depends_on (for arrays) 2015-02-16 18:42:05 -08:00
Leonardo de Moura
4248ad644d fix(frontends/lean): priority expressions parser 2015-02-14 12:26:06 -08:00
Soonho Kong
8b8267c7ce feat(emacs/lean-company.el): show meta and annotation for auto-complete options
close #435
2015-02-13 19:41:42 -05:00
Soonho Kong
382bf860fd fix(emacs/lean-company): import auto-completion for .hlean files
fix #434
2015-02-13 19:41:42 -05:00
Soonho Kong
a791953705 chore(emacs/lean-server): make lean-server-restart-all-processes interactive 2015-02-13 19:41:41 -05:00
Soonho Kong
6bcd1a9980 feat(emacs/lean-server): add support for hlean/standard minor-mode
Related issue: #389, #398, #400, #428
2015-02-13 19:41:41 -05:00
Soonho Kong
46d99c8077 chore(emacs): move lean-choose-minor-mode-based-on-extension to lean-util.el 2015-02-13 19:41:41 -05:00
Soonho Kong
dcee8ddb1f feat(emacs/lean-mode): add Standard/HoTT minor modes for lean-mode 2015-02-13 19:41:41 -05:00
Leonardo de Moura
c532a4a4b8 feat(frontends/lean/server): add option 'auto_completion.max_results'
Default value is 100
2015-02-13 12:58:11 -08:00
Leonardo de Moura
5cbdd77ad0 feat(library/tactic/rewrite_tactic): improve matcher in rewrite_tactic
closes #433
2015-02-13 12:40:55 -08:00
Leonardo de Moura
db71a29c81 feat(frontends/lean/parse_rewrite_tactic): improve esimp tactic 2015-02-13 12:22:17 -08:00
Leonardo de Moura
98960cbeda fix(library/tactic/rewrite_tactic): bug in HoTT mode 2015-02-13 10:09:18 -08:00