Leonardo de Moura
394e0d5f0a
refactor(library/init): remove has_cmp and is_ordering type classes
...
Now, `cmp` is just a fixed helper function.
In the future, we will be able to use (more efficient) specialized
versions during code generation by defining simp rules.
2017-11-14 08:33:24 -08:00
Sebastian Ullrich
4d1c4aee03
feat(init/meta/mk_has_reflect_instance): add derive_handler for has_reflect
2017-09-11 16:56:03 -07:00
Mario Carneiro
fb2447468b
chore(init/category/combinators): remove monad.for
...
and variations, in favor of monad.map and variations
2017-07-26 11:52:11 +01:00
Leonardo de Moura
5a2b7348f9
feat(library/tactic/apply_tactic): make apply tactic more robust
...
See issue #1342
Support for auto_param and opt_param have not been implemented yet.
2017-06-27 10:42:26 -07:00
Mario Carneiro
d3d5982544
fix(init/meta/mk_dec_eq_instance): bug for dependent structures
2017-06-25 14:55:47 -07:00
Sebastian Ullrich
171a96a8de
refactor(library): remove all instances of `(...)
2017-05-12 19:13:48 +02:00
Leonardo de Moura
6183c7676e
feat(frontends/lean): use . for field access
2017-03-28 15:29:54 -07:00
Leonardo de Moura
8e2dcb8ad8
chore(frontends/lean): remove ^. variants (~> and ↣)
...
This modification was motivated by a discussion at slack.
2017-03-28 12:23:33 -07:00
Johannes Hölzl
da4f552a7a
feat(library/init/meta): add decidable_eq for binder_info
2017-03-07 19:30:51 -08:00
Leonardo de Moura
552a185e6a
feat(frontends/lean): 'let' in 'do' blocks
2017-02-24 09:10:36 -08:00
Sebastian Ullrich
908a7bd9f3
feat(frontends/lean/parser): expr patterns
2017-02-23 01:52:13 +01:00
Sebastian Ullrich
b9424975b3
refactor(init/meta): replace dynamically-checked quotes where possible
2017-02-17 19:59:57 -08:00
Leonardo de Moura
d3c340a30c
feat(library/init/meta): improve induction tactic interface
...
It uses .rec recursor when it is not specified
2017-02-17 10:58:51 -08:00
Leonardo de Moura
1ab2bb7714
feat(frontends/lean/elaborator): eta-expand function applications until we consume all optional and auto parameters
2017-02-14 17:38:08 -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
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
ae06844f57
chore(library/init/meta): remove unnecessarily '| failed' annotations
...
tactic and smt_tactic are instaces of monad_fail
2017-02-05 20:12:42 -08:00
Daniel Selsam
b4644acba4
fix(meta/mk_dec_eq_instance): handle indices and ginductives
2016-10-13 10:12:37 -07:00
Leonardo de Moura
0d74ad97a7
chore(library/init): definition => def
2016-10-06 16:04:12 -07:00
Leonardo de Moura
719481588a
feat(library/init/meta): add coercion from expr to (expr -> expr)
2016-10-01 09:03:43 -07:00
Leonardo de Moura
051b6bd026
feat(frontends/lean/tactic_notation): add notation for entering auto-quotation mode
2016-09-30 16:18:52 -07:00
Leonardo de Moura
148da46481
feat(frontends/lean): 'mutual' and 'meta' are now keywords
2016-09-24 10:44:40 -07:00
Leonardo de Moura
9991d61610
chore(library/init): cleanup
2016-09-23 14:53:17 -07:00
Leonardo de Moura
24f1cb2726
chore(frontends/lean): new_elaborator is now the default
2016-09-19 16:34:06 -07:00
Leonardo de Moura
24049d8f40
refactor(library/init/logic): rename decidable.tt/ff to decidable.is_true/is_false
2016-09-13 13:40:02 -07:00
Leonardo de Moura
e99eb6d47e
feat(frontends/lean): revising inaccessible terms syntax again :(
2016-08-19 13:57:12 -07:00
Leonardo de Moura
7ddf1e817b
chore(frontends/lean): coercions are disabled by default
2016-07-29 13:03:23 -07:00
Leonardo de Moura
85e3f51fd5
feat(library/bin_app): uniform foldr, add helper methods for synthesizing recursive functions
...
foldr combinator is used to define brec_on recursor.
It is easier to access the brec_on "dictionary" if the representation is
uniform.
2016-07-23 12:11:18 -07:00
Leonardo de Moura
212d222047
feat(frontends/lean): quoted names
2016-07-22 19:06:57 -07:00
Leonardo de Moura
1b55507971
refactor(library/init/meta): rename C++ intro to intro_core, and define smarter intro in C++
2016-07-21 16:54:23 -07:00
Leonardo de Moura
9beacebf33
doc(library/init/meta/mk_dec_eq_instance): missing documentation
2016-07-20 20:30:02 -04:00
Leonardo de Moura
40b3410ede
feat(library/init/meta): add tactic mk_dec_eq_instance
2016-07-20 19:57:12 -04:00