Commit graph

17 commits

Author SHA1 Message Date
Leonardo de Moura
a4f43d36a6 feat(library/init/meta/smt): add rsimp 2017-02-17 19:40:38 -08: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
Leonardo de Moura
c37634c815 feat(library/init): add helper functions and instances 2017-02-13 14:53:32 -08:00
Leonardo de Moura
5ca18b8d2e feat(library/init/meta): add helper functions 2017-02-11 16:52:06 -08:00
Leonardo de Moura
32e6442d0a feat(frontends/lean): no global universes in the frontend 2017-02-08 17:23:04 -08:00
Leonardo de Moura
55aa2023f4 feat(frontends/lean): add support for monad_fail type class in 'do' blocks 2017-02-05 20:09:08 -08:00
Leonardo de Moura
8b662d19ac feat(library/init/category/monad_fail): add monad_fail type class 2017-02-05 18:46:29 -08:00
Leonardo de Moura
d34386fef7 perf(frontends/lean/tactic_notation): closes #1345
We can now elaborate
https://gist.github.com/gebner/439273deee592603190d4f8b4447295b
in 1.6 secs and using less than 500Kb of stack space.
It was takins 44 secs and 5Mb before this commit.

Two modifications:
1) Use pre_monad.seq instead of pre_monad.and_then.
They have the same implementation, but seq is not marked as [inline].

2) Modify how we concatenate the tactics in a begin...end block.
Before: (((a_1 ++ a_2) ++ a_3) ++ a_4)
After:  ((a_1 ++ a_2) ++ (a_3 ++ a_4))
2017-01-30 14:13:53 -08:00
Leonardo de Moura
bf9f7560f7 feat(frontends/lean): (Type u) can't be a proposition
(Type u)  is the old (Type (u+1))
(PType u) is the old (Type u)
Type*     is the old (Type (_+1))
PType*    is the old Type*

The stdlib can be compiled, but we still have > 70 broken tests

See discussion at #1341
2017-01-30 11:54:00 -08:00
Joe Hendrix
24fc68cef4 feat(library/init/category/combinators.lean): add foldl and when 2017-01-17 17:33:50 -08:00
Leonardo de Moura
82f8eeb280 feat(frontends/lean/definition_cmds): generate equational lemmas for regular definitions that were elaborated without using the equation compiler 2017-01-05 18:02:14 -08:00
Leonardo de Moura
68629b2e5f feat(library/init/category/transformers): disable instance has_monad_lift_t ==> has_coe
It produces non-termination because it triggers sub-problems of the
form (has_monad_lift_t t ?M), and this kind of sub-problem is bad
for the transitive closure rule:

instance has_monad_lift_t_trans (m n o) [has_monad_lift n o] [has_monad_lift_t m n] : has_monad_lift_t m o

The trick above only behaves well for synthesis subproblems that do not
contain sub-variables.

Note that the sub-problem (has_monad_lift_t t ?M) is created by a
similar rule used at has_coe_t.

instance {a : Type u₁} {b : Type u₂} {c : Type u₃} [has_coe a b] [has_coe_t b c] : has_coe_t a c
AND
instance {m n} [has_monad_lift_t m n] {α} : has_coe (m α) (n α) :=

We workaround the issue by disabling

  instance {m n} [has_monad_lift_t m n] {α} : has_coe (m α) (n α)

and adding instances of it. Example:

  meta instance (α : Type) : has_coe (tactic α) (solver α) := ...
  meta instance (α : Type) : has_coe (tactic α) (prover α) := ...
  meta instance (α : Type) : has_coe (tactic α) (smt_tactic α) := ...
2017-01-01 09:15:25 -08:00
Leonardo de Moura
66bc3c796a feat(frontends/lean/elaborator): add extra coercion resolution rule for monads
We also removed the notation (♯tac) since it is not needed anymore.

@gebner, the comment at elaborator.cpp explains why you had to use the ♯
notation. The workaround is a little bit hackish, but I think it is
worth it. We will use monad lifts in many different places.
2016-12-31 13:50:15 -08:00
Leonardo de Moura
85f88c4174 refactor(library/data/monad/transformers): move transformers to init 2016-12-31 11:37:13 -08:00
Gabriel Ebner
6b15f6cef9 feat(library/tools/super): add super prover 2016-12-16 18:18:13 -08:00
Leonardo de Moura
6577cc87a3 feat(library): add pre_monad
closes #1235
2016-12-08 12:48:55 -08:00
Leonardo de Moura
00f5a807af refactor(library/init): create init.category folder 2016-12-02 15:52:49 -08:00