Commit graph

641 commits

Author SHA1 Message Date
Leonardo de Moura
fe9f4dd95f fix(frontends/lean): another bug in sections with parameters 2015-04-21 19:50:21 -07:00
Leonardo de Moura
3df99e514b fix(frontends/lean): problems with sections 2015-04-21 19:46:57 -07:00
Leonardo de Moura
9fb7aa9f1c chore(tests): remove most occurrences of 'context' command from the test suite 2015-04-21 19:33:21 -07:00
Leonardo de Moura
52e9ad1a98 feat(frontends/lean): allow persistent notation declaration in sections (when they do not contain parameters)
see issue #554
2015-04-21 19:04:06 -07:00
Leonardo de Moura
b7ca2a0ec9 fix(library/tactic/exact_tactic): exact and or_else
fixes #543
2015-04-19 17:23:09 -07:00
Leonardo de Moura
306087b5d3 refactor(library/data): rename 'countable' to 'encodable', define countable in the usual way, and prove all 'encodable' type is 'countable' 2015-04-19 14:20:47 -07:00
Leonardo de Moura
cc63a40a01 feat(library): enforce name conventions on old nat declarations 2015-04-18 10:50:30 -07:00
Leonardo de Moura
f16eaf8f0f test(tests/lean/run/pickle1): add unpickle/pickle test 2015-04-14 21:32:07 -07:00
Leonardo de Moura
795acc70a6 refactor(library/data/finset): move finset to its own directory 2015-04-09 19:30:09 -07:00
Leonardo de Moura
4416d9b2c5 test(tests/lean/run): add basic tests for finset module 2015-04-09 15:56:41 -07:00
Leonardo de Moura
5d95cb0979 feat(library/tactic): add 'refine' tactic
closes #482
2015-04-06 18:36:56 -07:00
Leonardo de Moura
754276a660 feat(frontends/lean): round parenthesis for [tactic1 | tactic2]
This commit also replaces the notation for divides
     `(` a `|` b `)`
with
      a `∣` b

The character `∣` is entered by typing \|

closes #516
2015-04-06 09:24:09 -07:00
Leonardo de Moura
d591c63840 feat(frontends/lean/decl_cmds): allow local coercions in contexts
closes #525
2015-04-04 15:25:07 -07:00
Leonardo de Moura
8c59f17605 feat(frontends/lean): 'using' expression without 'show' or 'have'
closes #536
2015-04-04 15:25:07 -07:00
Leonardo de Moura
4ec0e1b07c feat(frontends/lean): improve calc mode
Now, it automatically supports transitivity of the form
    (R a b) -> (b = c) -> R a c
    (a = b) -> (R b c) -> R a c

closes #507
2015-04-04 08:58:35 -07:00
Leonardo de Moura
1150b19598 perf(frontends/lean/elaborator): do not invoke recursive equation compiler when equations still contain metavariables 2015-04-02 23:37:33 -07:00
Leonardo de Moura
f8023403af test(tests/lean/run): add another simple test 2015-04-01 15:49:01 -07:00
Leonardo de Moura
0d66d19ba3 feat(tests/lean/run/finset): show that if A has decidable equality, then (finset A) also has it. 2015-04-01 13:19:16 -07:00
Leonardo de Moura
b960e123b1 feat(kernel): add experimental support for quotient types 2015-03-31 22:04:16 -07:00
Soonho Kong
8243ed6339 fix(test*.sh): allow spaces in filename
fix #515
2015-03-28 23:29:52 -04:00
Leonardo de Moura
75621df52b feat(frontends/lean): uniform notation for lists in tactics
closes #504
2015-03-27 17:54:48 -07:00
Leonardo de Moura
0c3fd7427e feat(frontends/lean): add syntax-sugar for fold
closes #503
2015-03-25 18:25:48 -07:00
Leonardo de Moura
f2b1752807 fix(frontends/lean/parser): add workaround for #461 2015-03-25 18:09:43 -07:00
Leonardo de Moura
b9e3c474c9 feat(library/tactic): add all_goals tactic
closes #501
2015-03-25 17:42:34 -07:00
Leonardo de Moura
a1f933886f fix(frontends/lean/structure_cmd): explicit universe levels for structures
closes #490
2015-03-25 16:10:30 -07:00
Leonardo de Moura
33d2e8d9d3 test(tests/lean/run): workaround for issue #505 2015-03-25 15:53:50 -07:00
Leonardo de Moura
bed0d6df6b fix(frontends/lean/elaborator): inaccessible over coercion 2015-03-13 23:04:45 -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
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
4904f7657f test(tests/lean/run): add definition package tests 2015-03-09 08:42:21 -07:00
Leonardo de Moura
f966634910 feat(frontends/lean): nested dependent pattern matching 2015-03-06 19:18:08 -08:00
Leonardo de Moura
14ca2d407d test(tests/lean/run): add match-with nested in tactic test 2015-03-06 17:47:01 -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
b73a931c70 fix(frontends/lean/elaborator): missing case 'no-equation' annotation 2015-03-05 14:37:29 -08: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
abd238aef0 feat(*): add [quasireducible] attribute 2015-03-04 22:12:49 -08:00
Leonardo de Moura
fa79b214b8 fix(frontends/lean): allow 'attribute <id> [priority ...]' 2015-03-03 16:17:32 -08:00
Leonardo de Moura
3b73e100dc test(tests/lean/run): add [priority] test using num.sub 2015-03-03 15:59:17 -08:00
Leonardo de Moura
efd096e85c feat(library/init/num): define sub and le for binary numerals 2015-03-03 15:55:16 -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
Leonardo de Moura
cf56935b01 feat(frontends/lean): improve support for user defined tactics 2015-02-27 16:58:25 -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
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
3c24461e51 refactor(*): modify '|' binding power, use 'abs a' instead of '|a|', and '(a | b)' instead of 'a | b' 2015-02-25 15:18:21 -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
Jeremy Avigad
e555531eb6 feat(library/data/int/div): start on div for integers 2015-02-25 14:05:07 -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
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
1ff6446a63 feat(frontends/lean): nested begin-end blocks 2015-02-24 11:59:27 -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
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
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
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
4248ad644d fix(frontends/lean): priority expressions parser 2015-02-14 12:26:06 -08:00
Leonardo de Moura
8ffadce4ab feat(frontends/lean): add "premise" and "premises" command
It is just an alternative notation for "variable" and "variables"

closes #429
2015-02-11 18:46:03 -08:00
Leonardo de Moura
a35cce38b3 feat(frontends/lean): new semantics for "protected" declarations
closes #426
2015-02-11 14:09:25 -08:00
Leonardo de Moura
1832fb6f54 feat(*): uniform metaclass names, metaclass validation at 'open' command 2015-02-11 10:35:04 -08:00
Leonardo de Moura
9d1cd073c5 feat(frontends/lean): add 'print metaclasses' command 2015-02-11 10:13:20 -08:00
Leonardo de Moura
2126b8ec9a feat(library/tactic/apply_tactic): perform class-instance resolution in the apply tactic
closes #360
2015-02-06 16:14:03 -08:00
Leonardo de Moura
1e8a975daa feat(frontends/lean): extend parser: rewrite "fold" step 2015-02-06 15:22:34 -08:00
Leonardo de Moura
04f8278c90 test(tests/lean/run): add rewrite tactic test 2015-02-06 14:14:42 -08:00
Leonardo de Moura
5b25da8c43 feat(frontends/lean): add esimp tactic based on rewrite tactic
closes #358
2015-02-06 14:13:32 -08:00
Leonardo de Moura
b4139627e5 feat(library/tactic/rewrite_tactic): add option to prevent any kind of constant unfolding when perfoming pattern matching in the rewrite tactic 2015-02-06 13:27:33 -08:00
Leonardo de Moura
78bde6c9e6 test(tests/lean/run): add more rewrite tactic tests 2015-02-06 12:57:42 -08:00
Leonardo de Moura
2e626b29fb feat(library/tactic/rewrite_tactic): allow many constants to be provided in a single rewrite unfold step 2015-02-06 11:03:36 -08:00
Leonardo de Moura
56a46ae61e feat(frontends/lean/parse_tactic_location): make rewrite notation more uniform 2015-02-06 10:31:50 -08:00
Leonardo de Moura
e17ba27596 fix(library/tactic/rewrite_tactic): adjust the behavior of class resolution in rewriter
The solution is not very satisfactory. I should investigate it more.
2015-02-05 19:08:47 -08:00
Leonardo de Moura
e097977bac test(tests/lean/run): add more rewrite tactic tests 2015-02-05 14:09:07 -08:00
Leonardo de Moura
ffe0d1186e feat(library/tactic/rewrite_tactic): add "reduce_to" step at rewrite tactic 2015-02-05 13:59:55 -08:00
Leonardo de Moura
116c65bff5 feat(library/tactic/rewrite_tactic): add reduction step to rewrite tactic 2015-02-05 13:42:50 -08:00
Leonardo de Moura
808521223b feat(library/tactic/rewrite_tactic): support constant unfolding in rewrite tactic 2015-02-05 12:58:30 -08:00
Leonardo de Moura
1b73764ad3 fix(tests/lean/run/elim2): adjust test to reflect recent changes 2015-02-05 10:54:00 -08:00
Leonardo de Moura
d6958be7e7 fix(library/tactic/location): replace cache must not be used when only a subset of all occurrences should be replaced at replace_occurrences 2015-02-05 10:50:40 -08:00
Leonardo de Moura
dfad24e3f5 feat(frontends/lean): polish rewrite tactic notation 2015-02-05 10:15:58 -08:00
Leonardo de Moura
0abfa30ead fix(library/tactic/rewrite_tactic): elaboration bug in the rewrite tactic steps/elements 2015-02-05 10:01:18 -08:00
Leonardo de Moura
15efadfbdc feat(frontends/lean/parse_rewrite_tactic): cleanup rewrite tactic notation
Make a rewrite command sequence explicit.
2015-02-04 20:16:24 -08:00
Leonardo de Moura
14c72e82f6 feat(library/tactic/rewrite_tactic): add support for rewriting hypotheses 2015-02-04 20:04:19 -08:00
Leonardo de Moura
d0171ffe7a test(tests/lean/run): add more rewrite tactic examples 2015-02-04 19:19:46 -08:00
Leonardo de Moura
0c8eaa38c8 test(tests/lean/run): add basic rewriter test 2015-02-04 15:30:18 -08:00
Leonardo de Moura
f79f43c702 refactor(library/match): use "special" meta-variables instead of free variables to represent placholders in the higher-order matcher 2015-02-03 15:15:04 -08:00
Leonardo de Moura
3f37c0e739 test(tests/lean/run): add 'export' command test 2015-02-01 19:57:26 -08:00
Leonardo de Moura
6cd4972a84 fix(tests/lean): adjust tests to reflect changes in the standard library 2015-02-01 11:36:38 -08:00
Leonardo de Moura
15716c1471 feat(frontends/lean/calc_proof_elaborator): reject proofs with metavariables in the calc-assistant 2015-02-01 11:11:27 -08:00
Leonardo de Moura
143143e94c fix(library/tactic/inversion_tactic): missing normalization step in the inversion_tactic 2015-02-01 10:38:30 -08:00
Leonardo de Moura
d52af105d7 feat(frontends/lean/decl_cmds): allow many constants to be set in the same attribute command 2015-01-31 23:55:14 -08:00
Leonardo de Moura
e75828b756 test(tests/lean/interactive): add tests for options structure.eta_thm and structure.proj_mk_thm 2015-01-29 16:52:23 -08:00
Leonardo de Moura
e9e1f86b7f fix(library/app_builder): many bugs, add use_cache option, add tests 2015-01-29 15:30:31 -08:00
Leonardo de Moura
5bb2a41c64 feat(library/reducible): expose Lua API for reducible hints 2015-01-29 10:37:15 -08:00
Leonardo de Moura
e4b5e07498 fix(frontends/lean/elaborator): apply substitution before compiling pre-tactics into tactics
closes #415
2015-01-28 13:32:56 -08:00