Leonardo de Moura
60f32fa709
fix(frontends/lean): begin-end
automatic tactic notation bug, fixes #262
2014-10-27 17:12:25 -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
7516fcad97
feat(kernel/type_checker): add is_stuck
method, and improve ensure_pi method, closes #261
2014-10-27 13:16:50 -07:00
Leonardo de Moura
2e5ad274a5
fix(frontends/lean/elaborator): remove invalid assertions
...
These assertions became invalid when we changed the behavior of undef
indentifiers at
8e6de93394
2014-10-27 10:31:09 -07:00
Leonardo de Moura
ee5a982c01
feat(shell/lean): add '--server-trace' flag, closes #264
2014-10-27 10:26:29 -07:00
Leonardo de Moura
d66e5a6c41
fix(frontends/lean/builtin_cmds): bug (name clashing) in 'check' command new meta-variable naming
2014-10-26 19:19:45 -07:00
Leonardo de Moura
81dc201bab
fix(frontends/lean/elaborator): nested begin-end bug
2014-10-26 18:23:30 -07:00
Leonardo de Moura
a544d32fcf
fix(frontends/lean/elaborator): missing information when displaying unsolved placeholders
2014-10-26 16:11:58 -07:00
Leonardo de Moura
cc6a96e8ba
fix(frontends/lean): improve begin-end construct
2014-10-26 15:47:29 -07:00
Leonardo de Moura
08e8161243
feat(emacs/lean-syntax): add 'eassumption' highlight
2014-10-26 15:45:26 -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
aed9a88b38
fix(frontends/lean/parser): save identifier info for undef local
2014-10-26 10:19:44 -07:00
Leonardo de Moura
8e6de93394
fix(frontends/lean/parser): add two kinds of no_undef_id behavior: to (global) constant; to local constant
2014-10-26 09:47:11 -07:00
Leonardo de Moura
50948be66b
fix(emacs/lean-syntax): syntax highlight for composite names in declarations
2014-10-26 09:27:17 -07:00
Leonardo de Moura
707584376a
fix(frontends/lean/inductive_cmd): include 'induction_on', 'cases_on', and 'rec_on' into .ilean index file
2014-10-25 17:56:22 -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
7240a1a640
feat(kernel/inductive): add get_num_minor_premises and get_num_type_formers APIs
2014-10-25 11:17:29 -07:00
Leonardo de Moura
2bc034da2c
feat(kernel/inductive): expose 'get_elim_name' API
2014-10-25 10:47:12 -07:00
Leonardo de Moura
9e69a95b26
feat(kernel/inductive): add API for retrieving the number of indices in an inductive datatype
2014-10-25 10:42:05 -07:00
Leonardo de Moura
c30c0fa3b8
fix(kernel/metavar): avoid crash due to stack overflow, closes #253
2014-10-25 00:20:59 -07:00
Leonardo de Moura
096c67b2e5
fix(library/unifier): occurs-check bug
2014-10-25 00:16:02 -07:00
Leonardo de Moura
5830da9e2d
fix(frontends/lean/tokens): typo
2014-10-24 14:44:59 -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
7a033ac07e
feat(frontends/lean): add 'print axioms' command, close #251
2014-10-24 14:35:03 -07:00
Leonardo de Moura
db25f933b0
feat(frontends/lean): use nice names for meta-variables when executing check c
and c
is a constant
2014-10-24 08:23:26 -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
ab4c292872
fix(build): do not disable unicode chars on Windows
2014-10-23 20:58:23 -07:00
Leonardo de Moura
f027acb5cb
fix(frontends/lean): missing type info in expressions nested in tactics
2014-10-23 18:31:05 -07:00
Leonardo de Moura
a6571c3273
feat(frontends/lean): add 'print definition' command
2014-10-23 14:54:15 -07:00
Soonho Kong
04b4e36701
doc(emacs/README.md): fix typo
...
[skip ci]
2014-10-23 14:32:36 -07:00
Leonardo de Moura
22ae42d3af
fix(frontends/lean/info_manager): use fresh formatter displaying each info object
...
The formatter may cache results.
2014-10-23 14:29:17 -07:00
Leonardo de Moura
20ab59c740
fix(frontends/lean/pp): avoid unnecessary parentheses when pretty printing delimited notation
2014-10-23 14:14:08 -07:00
Leonardo de Moura
43cfd5c26a
fix(library/tactic): add missing file
2014-10-23 14:04:12 -07:00
Leonardo de Moura
212ae0b61c
feat(frontends/lean): automatically add 'info' tactic in begin-end blocks
...
Actually, the tactic is only added when Lean is in collect-info mode.
2014-10-23 13:30:04 -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
40235c6af0
fix(kernel/type_checker): propagate 'memoize' flag to default_converter
2014-10-23 13:15:53 -07:00
Leonardo de Moura
8e3ac023bb
feat(library/reducible): expose 'memoize' flag
2014-10-23 13:09:59 -07:00
Leonardo de Moura
cadc9b3ff3
feat(frontends/lean/info_manager): add proof_state info
2014-10-23 10:40:07 -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
2c330e704e
fix(frontends/lean/elaborator): error localization for 'expr_to_tactic' failures
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
eb2b59ce4f
refactor(frontends/lean): remove unnecessary files
2014-10-22 17:33:16 -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
Soonho Kong
ef60e6abd2
fix(shell/lean.cpp): use temp ios
2014-10-21 17:23:02 -07:00
Leonardo de Moura
33f18b9454
fix(kernel/converter): remove buggy eta-reduction and rely only on eta-expansion
...
The bug is exposed by new unit test
2014-10-21 16:54:25 -07:00
Leonardo de Moura
6b89080b1a
feat(frontends/lean): do not allow user to define notation using tokens !
and @
, closes #248
2014-10-21 16:28:36 -07:00
Leonardo de Moura
e24225fabf
feat(frontends/lean): validate infixl/infixr/postfix/prefix declarations against reserved notations
2014-10-21 15:39:47 -07:00
Leonardo de Moura
1896e6e273
feat(frontends/lean): allow 'reserve' inside namespaces
2014-10-21 15:39:47 -07:00
Leonardo de Moura
bb953b80aa
feat(frontends/lean): reserve notation, closes #95
2014-10-21 15:39:47 -07:00
Soonho Kong
ba9d0a2b7f
fix(shell/CMakeLists.txt): merge into a single lean.js file
2014-10-21 16:18:12 -04:00
Soonho Kong
ec43ad51ca
feat(shell/lean.cpp): use trust_lvl=10000, flycheck for EMSCRIPTEN
2014-10-21 00:43:26 -07:00
Leonardo de Moura
2f62a5e887
fix(frontends/lean/info_manager): disable notation pretty printer when displaying OVERLOAD
information
...
We need that otherwise the Lean emacs mode will display useless overload
information such as:
[+] int.add : ℤ → ℤ → ℤ
overloaded with #1 + #0 , #1 + #0
Note that this only became an issue after we implemented the new pretty printer
2014-10-20 22:06:33 -07:00
Leonardo de Moura
92acd9affc
chore(emacs): do not highlight arbitrary types
2014-10-20 19:17:02 -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
8a44dfc1df
fix(frontends/lean/pp): bug in pretty printer notation match procedure
2014-10-20 18:58:27 -07:00
Leonardo de Moura
40fb66bf07
feat(frontends/lean): change default precedence to 1
2014-10-20 18:40:55 -07:00
Leonardo de Moura
e2fa981e89
fix(frontends/lean/pp): avoid parentheses around atomic notation
2014-10-20 18:08:13 -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
e68007a727
fix(frontends/lean/builtin_tactics): adjust tactics precedence
2014-10-20 17:10:16 -07:00
Leonardo de Moura
9b8f60b739
feat(frontends/lean/builtin_exprs): tolerate dangling ',' in begin-end block
...
This is useful when debugging proofs.
2014-10-20 15:59:49 -07:00
Leonardo de Moura
a3aca96cb9
fix(frontends/lean/builtin_exprs): error position
2014-10-20 15:56:58 -07:00
Leonardo de Moura
fd40999909
feat(frontends/lean): uniform unsolved goals "error" position
2014-10-20 15:52:06 -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
33c4715f4c
fix(frontends/lean/pp): suppress unnecessary '[annotation]' marks
2014-10-20 11:16:21 -07:00
Leonardo de Moura
f0cc17af87
fix(frontends/lean/elaborator): missing type information when !
operator (aka consume_args) is used
2014-10-20 08:31:36 -07:00
Leonardo de Moura
a1006073d4
feat(frontends/lean/notation_cmd): do not allow user to define new tokes containing '(', ')', ',' or change their precedence
2014-10-19 13:39:06 -07:00
Leonardo de Moura
469368f090
refactor(frontends/lean/scanner): move basic UTF8 procedures to separate module
2014-10-19 13:29:15 -07:00
Leonardo de Moura
4d4bc0551f
feat(frontends/lean/pp): minimize number of spaces when pretty printing notation
2014-10-19 13:08:15 -07:00
Leonardo de Moura
ed1afe26bd
feat(frontends/lean/pp): support scopedexpr notation in the pretty printer
2014-10-19 12:50:40 -07:00
Leonardo de Moura
f63d47fef3
feat(frontends/lean/pp): support foldl/foldr notation in the pretty printer
2014-10-19 11:16:24 -07:00
Leonardo de Moura
100b3abf1d
fix(frontends/lean/pp): bug in notation matching procedure
2014-10-19 10:48:41 -07:00
Leonardo de Moura
d7cc7cbd8c
refactor(frontends/lean/pp): remove 'reverse' hack
2014-10-19 09:56:18 -07:00
Leonardo de Moura
eef1cc4ac2
fix(frontends/lean/pp): implicit arguments in notation
2014-10-19 09:04:43 -07:00
Leonardo de Moura
555d26aa61
feat(frontends/lean/pp): take notation declarations into account when pretty printing
...
TODO: support foldl/foldr and binders
2014-10-19 08:41:29 -07:00
Leonardo de Moura
8cfb3ae687
fix(library/module): bug in import_module
2014-10-18 21:03:22 -07:00
Leonardo de Moura
6a31a79265
refactor(frontends/lean/inductive_cmd): move auxiliary method to expr.h
2014-10-18 15:11:26 -07:00
Leonardo de Moura
eb79af98ba
feat(frontends/lean/parse_config): add get_notation_entries auxiliary function for returning the list of notation declarations that start with a given head symbol
...
This API is need to take notation declarations into account when pretty
printing expressions.
2014-10-18 11:49:27 -07:00
Leonardo de Moura
f17e67efcb
feat(frontends/lean/parse_table): add get_head_index auxiliary function for indexing notation declarations
2014-10-18 10:55:39 -07:00
Leonardo de Moura
f76c5bbde9
fix(init): initialization problem
2014-10-18 09:01:24 -07:00