Commit graph

280 commits

Author SHA1 Message Date
Leonardo de Moura
71bf0bcc5d fix(frontends/lean/builtin_exprs): fixes #1493 2017-03-27 17:57:13 -07:00
Leonardo de Moura
eea46610ea fix(library/tactic/simplify): missing projection reduction, add proj := tt to simp 2017-03-27 17:38:40 -07:00
Leonardo de Moura
b09968a37b feat(library/tactic/simplify): add beta := tt to simp 2017-03-27 17:38:31 -07:00
Sebastian Ullrich
68c1ff6219 feat(frontends/lean/builtin_exprs): use local field inference for info too 2017-03-27 14:01:38 -07:00
Gabriel Ebner
8c1136c1b6 fix(library/module_mgr): get_first_diff_pos: handle newlines correctly 2017-03-27 14:01:04 -07:00
Gabriel Ebner
2da9d72491 chore(tests/lean/interactive): fix test 2017-03-23 09:14:32 +01:00
Gabriel Ebner
a8ba78e20a refactor(frontends/lean/tactic_notation): remove irtactic in favor of itactic 2017-03-23 09:07:08 +01:00
Gabriel Ebner
d90dda01b0 chore(*): fix tests 2017-03-23 09:03:43 +01:00
Gabriel Ebner
9dfd8e1018 fix(shell/server): fix field completion 2017-03-23 09:03:43 +01:00
Gabriel Ebner
ef0e113b4b chore(tests): fix tests 2017-03-23 09:03:43 +01:00
Gabriel Ebner
c8fff9f4ff refactor(init/meta/interaction_monad): replace rstep by istep 2017-03-23 09:03:41 +01:00
Gabriel Ebner
a591e35544 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Gabriel Ebner
d26e870aa5 chore(*): fix tests 2017-03-23 09:00:59 +01:00
Gabriel Ebner
176fb9c81f chore(tests): changed sorry warnings 2017-03-23 08:57:56 +01:00
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
f9854be13f feat(frontends/lean/parser): save id info for non-overloaded constants 2017-03-22 07:35:14 -07:00
Sebastian Ullrich
5e0e19c4ad fix(frontends/lean/{interactive,tactic_notation}): fix tests 2017-03-17 18:20:44 -07:00
Sebastian Ullrich
e0856284b0 feat(frontends/lean,emacs): tactic info before elaboration, fix many edge cases 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
c387c34365 fix(test/lean/interactive/run_single): include stderr 2017-03-17 18:05:19 -07:00
Leonardo de Moura
83fbb605f4 chore(tests/lean): fix tests 2017-03-15 19:40:52 -07:00
Leonardo de Moura
d352ac4bcb chore(tests/lean): fix tests 2017-03-11 12:20:42 -08:00
Daniel Selsam
538ac8d187 feat(inductive_compiler): generate injectivity lemmas 2017-03-10 22:27:18 -08:00
Leonardo de Moura
9d3c0497cb chore(frontends/lean): rename transient commands
See issue #1432
2017-03-09 18:41:19 -08:00
Sebastian Ullrich
b3887f21a4 fix(shell/server): remove unnecessary dependencies of info_task and use intermediate envs 2017-03-08 10:40:59 -08:00
Leonardo de Moura
1ac240e2db chore(tests/lean): fix tests 2017-03-07 19:45:00 -08:00
Leonardo de Moura
fa99861788 feat(frontends/lean/elaborator): add new ^. notation
see #1403
2017-03-05 20:12:49 -08:00
Leonardo de Moura
1ded3b70b8 feat(library/constructions/drec): add dcases_on 2017-03-01 15:46:19 -08:00
Leonardo de Moura
7b0a18167b feat(library/constructions/drec): add drec_on and refactor 2017-03-01 14:12:10 -08:00
Leonardo de Moura
17556758cb feat(library/constructions,library/inductive_compiler): automatically generate dependent eliminator for inductive predicates
The dependent eliminator for an inductive predicate C is called C.drec

TODO: construct dcases_on and drec_on using C.drec

We need this recursor for implementing dependent elimination for
inductive predicates.

We don't need to define acc.drec and eq.drec in the standard library anymore.
2017-02-28 20:58:04 -08:00
Leonardo de Moura
7e6a10bd1b chore(tests/lean): fix tests, and environment.decl_pos 2017-02-21 11:21:02 -08:00
Sebastian Ullrich
d402b2a467 feat(frontends/lean/print_cmd): add to info_manager when not overloaded 2017-02-17 15:41:58 +01:00
Sebastian Ullrich
84f3e2a492 refacotr(init/meta/interactive): clean up parameter gadgets 2017-02-17 15:41:58 +01:00
Sebastian Ullrich
e14eab2db8 chore(test/lean/interactive): do not test for exact source information 2017-02-17 13:45:56 +01:00
Sebastian Ullrich
d15591a2d8 feat(library,frontends/lean): expose parser to Lean and use for parsing tactic parameters 2017-02-17 13:45:56 +01:00
Sebastian Ullrich
339713091f refactor(frontends/lean): simpler field notation info that also works with implicit parameters 2017-02-17 13:03:47 +01:00
Leonardo de Moura
11d5773560 refactor(library/init/meta): remove whnf_core 2017-02-14 18:39:57 -08:00
Leonardo de Moura
304b5b6a20 fix(library/tactic/generalize_tactic): we must check whether the abstracted type is type correct or not 2017-02-14 13:41:49 -08:00
Leonardo de Moura
f650a1b873 refactor(library/init/meta): avoid '_core' idiom using default parameters
I kept a few core methods (e.g., exact_core and apply_core). Reason:
if we use default parameters

    meta constant exact (e : expr) (md := semireducible) : tactic unit

then, we will not be able to write

    to_expr p >>= exact

The workaround is

    do t <- to_expr p, exact t

or
    to_expr p >>= (fun x, exact x)

One alternative is to change how we handle default parameters, and
eta-expand applications that involve default parameters.
We may also have an attribute [eta_expand]. Then

    attribute [eta_expand] foo

instructs the elaborator to automatically eta-expand foo-applications.
The attribute would give users more control, and avoid potential
performance problems. Without the attribute, then for every function
application the elaborator has to check the type and decide whether it
must be eta-expanded or not.

@gebner @kha What do you think?
2017-02-14 09:46:55 -08:00
Leonardo de Moura
ae0577d26e chore(tests/lean): fix tests 2017-02-12 16:50:42 -08:00
Leonardo de Moura
7112f6d685 feat(library/tactic): add try_for tactic 2017-02-11 20:35:42 -08:00
Leonardo de Moura
73b1e927ff chore(tests/lean): fix tests 2017-02-11 18:37:15 -08:00
Johannes Hölzl
9902a0d4d1 feat(src/library/tactic): apply_core returns list of all generated metavariables 2017-02-10 16:07:33 -08:00
Johannes Hölzl
bb136d63ab feat(src/library/tactic): tactic.cases_core returns for each new goal the used constructor, a list of introduced hypotheses, and substitutions for dependent hypotheses 2017-02-10 16:07:33 -08:00
Johannes Hölzl
d7af5515d2 feat(src/library/tactic): tactic.induction_core returns for each new goal the list of introduced hypotheses and substitutions for dependent hypotheses
Also add to_obj(buffer<vm_obj>) to construct a vm-list of vm objects.
2017-02-10 16:07:33 -08:00
Leonardo de Moura
c0e6314f14 fix(library/init/meta,library/tactic/elaborate): bad error position when to_expr is used outside of interactive mode 2017-02-09 18:44:50 -08:00
Leonardo de Moura
5e397795cf fix(library/init/meta): focus tactic
This commit also add the interactive tactic 'focus'
2017-02-09 10:02:19 -08:00
Leonardo de Moura
c5dc8e651a chore(library/init/meta): cleanup 2017-02-08 15:33:25 -08:00