Commit graph

547 commits

Author SHA1 Message Date
Sebastian Ullrich
a5db5ae4de refactor(init/meta/interactive): rw: parse - separately to remove hack 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
9cf80a6c94 feat(init/meta/interactive): rw goal info on ] 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
da7e21696e feat(init/meta/interactive): rw goal info on , 2017-03-22 07:54:12 -07:00
Sebastian Ullrich
793f0baee8 feat(library/tactic/vm_monitor): use attribute for registering VM monitors 2017-03-22 07:34:27 -07:00
Leonardo de Moura
fdadada3a9 fix(frontends/lean): fixes #1468
@kha I had to add yet another hack to fix this issue.

In notation declarations, names are resolved at notation declaration time.
So, users do not expect them to be resolved again at tactic execution time.

I addressed this problem by wrapping constants occurring in notation
declarations with a "frozen_name" annotation. This transformation is
only performed if m_in_quote is true.
Then resolve_names_fn at elaborator.cpp will not try to resolve the
names again.

This change broke two other modules. `-` notation for inverting
equations at `rw`, and `calc` expressions inside quotes.
The broke for the same reason. They were not expecting the constants
to be wrapped with an annotation.
2017-03-18 13:48:21 -07:00
Leonardo de Moura
31b6dc222d feat(library/init/meta/expr): add expr.is_annotation 2017-03-18 13:40:11 -07:00
Sebastian Ullrich
7c31e62b16 feat(init/meta/interactive): improve pretty-printing of list_of and itactic 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
421a6d6f01 feat(frontends/lean/interactive,emacs): highlight current tactic parameter 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
c46936d180 fix(frontends/lean/interactive): hard-code tactic pretty printing 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
803d3073ae feat(frontends/lean): add interactive.type_formatter attribute and use it to pretty print interactive tactics 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
0792bc13db feat(frontends/lean/elaborator,init/meta/interactive): relax expr pattern elaboration and use it to implement a tactic signature pretty printer 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
e3b9190fe2 refactor(library/tactic/user_attribute): use attribute for registering attributes. naturally. 2017-03-15 14:06:34 -07:00
Daniel Selsam
e72d516252 refactor(inductive_compiler): use subst to prove packs injective instead of constructors 2017-03-10 22:27:29 -08:00
Daniel Selsam
538ac8d187 feat(inductive_compiler): generate injectivity lemmas 2017-03-10 22:27:18 -08:00
Leonardo de Moura
98e93b73b2 feat(library/init/meta/name): add name.replace_prefix 2017-03-10 22:16:21 -08:00
Sebastian Ullrich
763097dbd2 refactor(library): revise the monadic hierarchy 2017-03-09 20:30:03 -08:00
Leonardo de Moura
9d3c0497cb chore(frontends/lean): rename transient commands
See issue #1432
2017-03-09 18:41:19 -08:00
Leonardo de Moura
3e757d890a feat(library/tactic/intro_tactic): allow '_' in interactive mode as the anonymous name for intros, cases, induction 2017-03-09 15:42:36 -08:00
Leonardo de Moura
c086c58b4a fix(library/init/meta/simp_tactic): simp_intro_aux tactic should not fail when hypothesis cannot be simplified 2017-03-08 21:20:43 -08:00
Jeremy Avigad
95f75bbbee refactor(library/init/data/subtype/basic): rename subtype constructor and projections 2017-03-08 19:31:27 -08:00
Johannes Hölzl
d6eae3265c feat(library/data/dlist): setup transfer for dlist 2017-03-07 19:30:51 -08:00
Johannes Hölzl
9d62638e9a chore(library/init/meta/transfer): short documentation of transfer rules 2017-03-07 19:30:51 -08:00
Johannes Hölzl
1f45995c16 feat(library/init/meta/transfer): add transfer and use for int
This commit introduces the transfer method. As application it is
used it to prove that the integers form a commutative ring.
2017-03-07 19:30:51 -08:00
Johannes Hölzl
ca0fe37c41 feat(library/init/meta/tactic): add mk_local_pis 2017-03-07 19:30:51 -08:00
Johannes Hölzl
da4f552a7a feat(library/init/meta): add decidable_eq for binder_info 2017-03-07 19:30:51 -08:00
Johannes Hölzl
69ed20f656 feat(library/init/meta/match_tactic): add tactic_format for pattern 2017-03-07 19:30:51 -08:00
Johannes Hölzl
0ad5f5bc89 feat(library/init/meta/expr): add instantiate_local(s) 2017-03-07 19:30:51 -08:00
Leonardo de Moura
51958df84b chore(frontends/lean/token_table): remove dead keywords 2017-03-07 14:00:49 -08:00
Leonardo de Moura
9a263a2766 chore(library/init): instances are reducible and are inlined by the compiler
So, these instances would create two copies of `p` after inlining
2017-03-07 10:58:09 -08:00
Leonardo de Moura
156e5603d6 feat(library/init/category/combinators): put list combinators in the namespace list
In this way we can use them with the ^. notation
2017-03-05 21:30:30 -08:00
Leonardo de Moura
59c0cbd2e4 chore(library): test new '^.' notation in the standard library, and cleanup definitions using it 2017-03-05 21:21:50 -08:00
Leonardo de Moura
1cdf13821c feat(library/init/data/unsigned): add basic unsigned operations 2017-03-05 16:14:16 -08:00
Sebastian Ullrich
ddfdca2e57 chore(init/meta): replace some uses of to_expr `(...) with ``(...) 2017-03-05 08:37:16 -08:00
Sebastian Ullrich
5d68938a9c feat(frontends/lean): expr literals ```(...) 2017-03-05 08:37:16 -08:00
Leonardo de Moura
525242561a fix(library/init/meta/tactic): use zeta reduction by default in the abstract tactic
Abstracting let-exprs may produce type errors.
In the future we may consider another strategy for `abstract`.
First, we try to abstract the `let`, then if it fails, we expand.
Not sure if this is a good idea.
2017-03-02 11:34:28 -08:00
Leonardo de Moura
b1848efbc4 chore(library/init/meta): add head prefix to head reduction tactics, and add zeta tactic (that applies zeta reduction to all subterms) 2017-03-02 10:55:38 -08:00
Leonardo de Moura
2fb5f6a49e feat(library/init/meta): add subst_vars tactic 2017-03-01 15:11:17 -08:00
Leonardo de Moura
04e27eb96f feat(library/init/meta/tactic): add applyc tactic 2017-02-25 12:55:28 -08:00
Leonardo de Moura
7ec0505e94 chore(library/init/meta/vm): style 2017-02-25 12:47:58 -08:00
Leonardo de Moura
35acad642c feat(library/init/meta/tactic): add to_string instance 2017-02-25 12:47:46 -08:00
Leonardo de Moura
57c125c60e chore(library/init/meta/expr): unsigned ==> nat 2017-02-24 19:34:11 -08:00
Leonardo de Moura
921d72b6c4 feat(library/init/meta): add helper tactics 2017-02-24 16:26:47 -08:00
Gabriel Ebner
79afaa7421 feat(library/init/meta/tactic): add timetac combinator 2017-02-24 20:17:19 +01:00
Leonardo de Moura
552a185e6a feat(frontends/lean): 'let' in 'do' blocks 2017-02-24 09:10:36 -08:00
Leonardo de Moura
5c7ade4ee4 chore(library/init/meta/vm): indentation 2017-02-23 09:32:20 -08:00
Jared Roesch
9b80e3bb62 feat(library/init/meta/vm): add decidable_eq for vm_obj_kind 2017-02-23 09:31:57 -08:00
Sebastian Ullrich
8c50efeb75 refactor(init/meta/lean/parser): simplify sep_by 2017-02-23 01:52:14 +01:00
Sebastian Ullrich
a443a5b7a6 chore(init/meta,tools/super): remove obsolete set_option eqn_compiler.max_steps 2017-02-23 01:52:13 +01:00
Sebastian Ullrich
908a7bd9f3 feat(frontends/lean/parser): expr patterns 2017-02-23 01:52:13 +01:00
Leonardo de Moura
7e6a10bd1b chore(tests/lean): fix tests, and environment.decl_pos 2017-02-21 11:21:02 -08:00