Gabriel Ebner
32ddac5f40
feat(library/tactic/kabstract): expose kabstract to VM
2017-08-14 11:41:54 +02:00
Gabriel Ebner
867bc46d99
feat(library/vm/vm_parser): expose parse_command_like to the vm
2017-08-14 11:41:48 +02:00
Gabriel Ebner
e2717ec2c5
fix(library/compiler/inliner): inline auxiliary declarations
...
Fixes #1763 .
2017-08-06 10:24:26 +02:00
Gabriel Ebner
0c15724e8e
fix(library/tactic/simplify): handle universe polymorphic simplification rules
...
The issue was that instantiate_mvars(infer(m)) had a metavariable, while
infer(instantiate_mvars(m)) did not. Changing the call from assign to
is_def_eq also unifies the type, assigning the metavariable inside the
type.
2017-08-03 17:42:07 +01:00
Leonardo de Moura
f39e42bf2d
fix(library/tactic/destruct_tactic): fixes #1766
2017-08-02 15:35:33 +01:00
Leonardo de Moura
fdaa26f2fd
feat(library/equations_compiler/wf_rec): fixes #1782
2017-08-02 15:12:04 +01:00
Gabriel Ebner
ce509e621a
refactor(library/init/algebra): remove order_pair classes
2017-08-02 14:41:35 +01:00
Sebastian Ullrich
4f66673fc2
feat(init/meta/attribute,library/tactic/attribute): user_attribute apply handlers
2017-08-02 14:32:39 +01:00
Gabriel Ebner
89e1b196db
fix(library/compiler/preprocess): do not unfold noncomputable definitions
...
This happened in Johannes' real number formalization. We tried to
unfold a noncomputable definition even though it would have been erased
afterwards, and failed.
The check_computable check was introduced in order to fix the error
message in #1401 , the error message is still intelligible in that
example.
2017-08-01 08:37:18 +01:00
Gabriel Ebner
25aa847aba
fix(library/constructions/brec_on): make motive explicit in *.below
...
Otherwise you can't figure out the type from the pretty-printed output
`nat.below n`.
2017-07-23 09:38:44 +01:00
Gabriel Ebner
537b11f358
fix(library/tactic/cases_tactic): do not let internal exception escape
...
This was doubly ungood since the contained vm_obj was shared across
threads. @digama0 wseq.exists_of_lift_rel_left should work now.
2017-07-22 15:25:56 +01:00
Leonardo de Moura
4faae27069
perf(frontends/lean): add notation #[...]
...
The new notation should be use to input long sequences.
Closes #1755
2017-07-21 04:20:48 -07:00
Leonardo de Moura
3bcbfbf348
perf(library/compiler/elim_recursors): beta_reduce ==> head_beta_reduce
...
This commit fixes the byte code generation performace problem
exposed by #1755
2017-07-21 03:32:23 -07:00
Leonardo de Moura
af80c2890d
chore(library/init/meta/tactic): define focus_aux using is_assigned
2017-07-21 02:39:55 -07:00
Sebastian Ullrich
46c1a1a844
refactor(frontends/lean/elaborator,kernel/error_msgs): remove duplicate code
2017-07-21 01:46:31 -07:00
Sebastian Ullrich
f8cfc4ea1b
feat(kernel/error_msgs,frontends/lean/elaborator): add more context to 'type/function expected' errors
2017-07-21 01:46:31 -07:00
Gabriel Ebner
53898d47b0
fix(library/tactic/smt/congruence_tactics): fix cc_state.add
2017-07-20 09:17:23 +01:00
Gabriel Ebner
776b440d55
fix(library/constructions/projection): fix macro expansion
...
Thanks to @fpvandoorn for noticing this issue in Lean 2! We encountered
this situation when the inferred type of the projection argument did not
reduce to the structure type with the current transparency setting of
the type context.
2017-07-18 19:56:20 +01:00
Gabriel Ebner
ba2718a89d
feat(library/init/meta/environment): expose function to unfold all macros
2017-07-18 19:49:53 +01:00
Gabriel Ebner
e94095cdf3
chore(library/tactic/cases_tactic): add a bit more information to error message
2017-07-18 09:07:09 +01:00
Gabriel Ebner
317319ded3
chore(library/tactic/cases_tactic): improve error message for unsupported equalities
...
@leodemoura Should we add a flag to introduce the equalities as
hypotheses in this case?
2017-07-18 08:55:36 +01:00
Gabriel Ebner
573525fb9f
fix(library/kernel_serializer): fix build error
2017-07-16 16:29:30 +01:00
Leonardo de Moura
9afb53fad5
feat(kernel/expr): allow metavariables to have user-facing names
...
We need this feature for:
1) Defining nonlinear search patterns. Example: (?m <= ?m + 1)
2) Preprocessing recursive equations and support the pattern
refinement approach used in Agda. Example: in Agda, they accept
```
def append {A : Type} : Π (m n : nat), Vec A m -> Vec A n -> Vec A (m + n)
| m n nil ys := ys
| m n (cons m' x xs) ys := cons x (append m' n xs ys)
```
These equations have to be refined. For example, `m` has to be
replaced with `0` (in the first equation), and `succ m'` in the
second. To implement this kind of refinement, we need to convert
the pattern variables (local constants) into metavariables during
elaboration. Then, the unassigned metavariables become local constants
again. This preprocessing step will fix some of the issues on #1594 .
To completely fix #1594 , we will need yet another preprocessing step
which will implement "complete transition" used in the equation
compiler before we start elim_match.cpp
2017-07-16 07:16:41 -07:00
Gabriel Ebner
246d71f3ff
feat(library/equations_compiler): error recovery
2017-07-16 05:17:38 -07:00
Gabriel Ebner
0579e68ab8
feat(library/export): add option to only export a single declaration
2017-07-14 09:49:24 +01:00
Gabriel Ebner
80ec86d230
fix(library/vm/vm_int): tons of fixes for int.shiftl
2017-07-11 22:54:26 +01:00
Gabriel Ebner
138c427bcb
fix(library/vm_int): correct mpz implementation for int.rem
2017-07-11 22:53:59 +01:00
Gabriel Ebner
d0245c4c2f
fix(library/vm/vm_int): unformly unbox small ints
2017-07-11 22:53:18 +01:00
Gabriel Ebner
27a39c4a2d
fix(library/tactic/eval): do not catch exceptions
2017-07-11 22:52:31 +01:00
Mario Carneiro
ced436a707
fix(library/vm/vm_nat): fix VM definition of nat.shiftr
...
fixes #1723
2017-07-11 20:53:15 +01:00
Josh Pollock
ee55a03205
fix(src/library/vm,tests/lean): fixes #1723
2017-07-09 08:05:05 +02:00
Sebastian Ullrich
ac8de2472e
feat(library/tactic/induction_tactic): clear hypothesis before introducing new ones
2017-07-07 10:06:30 -07:00
Leonardo de Moura
91f4fd9507
fix(library/equations_compiler/elim_match): undo bcf44f7
...
See issue #1739
Main problem with this commit: the counter-examples for non-exhaustive matches will be
cryptic when using nested inductive types.
2017-07-07 09:16:07 -07:00
Leonardo de Moura
38c2c7dae8
feat(library/equations_compiler/elim_match): extend is_value_transition trick to other infinite types
2017-07-06 22:10:23 -07:00
Gabriel Ebner
820286c02c
fix(library/equations_compiler/elim_match): check for forward dependencies with string literal matches
2017-07-06 22:04:58 -07:00
Gabriel Ebner
bcf44f7020
fix(library/equations_compiler): do not unfold generalized inductives
2017-07-06 22:04:58 -07:00
Gabriel Ebner
5e94ecc841
chore(library/equations_compiler): style
2017-07-06 22:04:58 -07:00
Gabriel Ebner
de587f938c
fix(library/equations_compiler): always use ite for string literals
2017-07-06 22:04:58 -07:00
Gabriel Ebner
50821c9fac
feat(library/equations_compiler): unpack counter-examples in wf recursion
2017-07-06 22:04:58 -07:00
Gabriel Ebner
4286adf868
feat(library/equations_compiler): use underscores for variables in missing cases
2017-07-06 22:04:58 -07:00
Gabriel Ebner
4fee7eaa70
feat(library/equations_compiler/elim_match): provide counter-examples for non-exhaustive matches
2017-07-06 22:04:58 -07:00
Leonardo de Moura
0cfb48c095
fix(library/equations_compiler/util): PR #1731
2017-07-06 21:29:23 -07:00
Sebastian Ullrich
d386e65775
fix(library/equations_compiler/util): noequation: guess arity modulo whnf
2017-07-06 20:59:58 -07:00
Leonardo de Moura
514c1e30c9
fix(library/tactic/dsimplify): issue reported by @semorrison at gitter
...
`dsimp` option `unfold_reducible` was not working correctly.
2017-07-05 21:48:44 -07:00
Leonardo de Moura
1da0bb8f79
chore(library/tactic/smt/smt_state): remove unnecessary include
2017-07-05 21:03:49 -07:00
Leonardo de Moura
cfab344bcc
fix(library/delayed_abstraction): fixes #1728
2017-07-05 17:10:18 -07:00
Leonardo de Moura
1bfaf19277
chore(library/delayed_abstraction): clarify delayed_abstraction API
2017-07-05 16:40:45 -07:00
Sebastian Ullrich
ad97607307
fix(frontends/lean/tactic_notation): always use quote_scope for parsing interactive parameters
...
Replace now redundant `qexpr` parser with `parser.pexpr`
2017-07-04 12:20:38 -07:00
Gabriel Ebner
b0185774a4
fix(library/vm/vm_expr): do not use expr_var as both function and class name
2017-07-04 09:10:35 +02:00
Leonardo de Moura
abef98c772
refactor(library/init/meta/simp_tactic): make sure dunfold tactics use name convention used at simp, dsimp, ...
2017-07-03 21:36:17 -07:00