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
Corey Richardson
ed0c3d227a
chore(cmake): let MINGW_INSTALL_PATH be configurable
2017-07-20 21:50:23 +01:00
Corey Richardson
5fd504bec3
dist: add leanpkg.bat script for invocation on Windows
2017-07-20 21:50:23 +01:00
Sebastian Ullrich
ae5bc52d97
fix(frontends/lean/elaborator): pass expected type through visit_function
2017-07-20 01:58:29 -07:00
Sebastian Ullrich
9e8d30ec74
fix(frontends/lean/elaborator): suppress errors in visit_overloaded
2017-07-20 01:58:29 -07:00
Sebastian Ullrich
a1066525ca
feat(init/meta/interactive): auto-generalize inductive major premise args
...
Like Isabelle
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
9ed72acabe
fix(frontends/lean/builtin_exprs): allow constant patterns in do notation
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
20c2232bc6
feat(init/meta/interactive): auto-generalize induct parameter
...
Like Isabelle
2017-07-20 01:51:00 -07:00
Sebastian Ullrich
7d39b3e948
refactor(init/meta/interactive): merge generalize and generalize2 and introduce nicer syntax
2017-07-20 01:51:00 -07:00
Mario Carneiro
89e860ac8b
doc(init/core): Document init_quotient in lean
...
This way people can search for "constant quot" and find it in the lean source. Plus the init_quotient command only occurs once, so this way people know what it means.
2017-07-20 01:36:28 -07:00
Mario Carneiro
dfbcb72f38
chore(init/meta/tactic): remove superfluous fail clause
2017-07-20 01:28:21 -07:00
Mario Carneiro
4ae2f87bc8
refactor(init/meta/tactic): use dite instead of cases in by_cases
...
This fixes the issue in PR #1752 by using `dite`, which is essentially nondependent cases, so that the decidable instances are not substituted.
2017-07-20 01:28:21 -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
Sebastian Ullrich
9c2d42b269
fix(frontends/lean/parser): to_pattern_fn: replace invalid choice pattern with sorry
...
Fixes #1749
2017-07-17 14:59:07 +02:00
Sebastian Ullrich
cbf65c1339
fix(init/meta/interactive): implement generalize2 via generalize/kabstract
2017-07-17 13:59:21 +02: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
bac64d49c9
feat(doc/export_format): advertise trepplein
2017-07-15 22:49:24 +01:00
Gabriel Ebner
9367e94900
fix(frontends/lean/pp): hide proof terms in non-proofs by default
...
This is mainly to reduce clutter. Proof term printing can still be
forced using the `pp.proofs` option.
2017-07-15 22:21:22 +01:00
Gabriel Ebner
37d9e03cc1
feat(frontends/lean/pp): show substituted expressions for delayed abstractions
...
@leodemoura I tried to look up the unique names in the local context,
but this pretty much always fails. AFAICT we never remember the local
context when pretty-printing expression texts.
2017-07-15 21:34:05 +01:00
Gabriel Ebner
9dcd95df2f
chore(tests/lean/anc1): fix tests
2017-07-15 21:13:33 +01:00
Gabriel Ebner
563c1bcffe
chore(library/init/meta/tactic): make first argument of id_locked implicit
2017-07-15 17:47:46 +01:00
Gabriel Ebner
68ee9396c6
fix(frontends/lean/parser): support backtracking from empty expressions
...
Fixes #1745 .
2017-07-15 11:12:09 +01:00
Gabriel Ebner
ee56f71260
fix(library/init/data/nat/lemmas): make various lemmas rfl
2017-07-15 10:38:06 +01:00
Leonardo de Moura
b093b3c1ee
chore(extras/depgraph): remove leandeps
...
There is no reason to implement this tool in Python anymore.
If someone wants (I don't), they should do it in Lean, and store it as
a Lean package in a separate git repository.
Closes #1744
2017-07-15 02:27:17 -07:00
Gabriel Ebner
1d6716d1fb
fix(kernel/type_checker): eagerly check for proof irrelevant definitional equality
...
Fixes #1716 . @leodemoura I did not observe any performance effect on
the standard library.
2017-07-14 21:46:04 +01:00
Gabriel Ebner
2fd50bf460
fix(checker/checker): set the printing function
2017-07-14 21:45:39 +01:00
Gabriel Ebner
0579e68ab8
feat(library/export): add option to only export a single declaration
2017-07-14 09:49:24 +01:00
Scott Morrison
1883576eb8
chore(.github/ISSUE_TEMPLATE): typo
2017-07-14 08:02:08 +01:00
Gabriel Ebner
3392aa90b5
fix(frontends/lean/definition_cmds): support parameters in mutual defs
2017-07-13 15:14:46 +01:00
Gabriel Ebner
ecf7e3d2d8
feat(tests): test overriden VM functions on small values
2017-07-11 23:00:09 +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
Gabriel Ebner
8f31cff99b
chore(tests): move 1723 test to the expected output tests
2017-07-09 08:05:05 +02:00
Josh Pollock
ee55a03205
fix(src/library/vm,tests/lean): fixes #1723
2017-07-09 08:05:05 +02:00
Leonardo de Moura
ee612c8dd6
chore(changes): universe max u v + 1
2017-07-07 12:59:41 -07:00
Leonardo de Moura
8dcccd3bfc
fix(frontends/lean/parser): make sure imax and max level arguments are parsed using the same precendence we use to parse application arguments
...
This commit addresses an issue raised by @digama0 on the Lean slack channel.
2017-07-07 12:43:07 -07:00
Leonardo de Moura
9555a104d6
feat(library/init/meta/tactic): simplify ‹p› notation
...
@jroesch See the new test :)
2017-07-07 12:05:02 -07:00
Leonardo de Moura
b7b331957a
chore(library/init/data/nat/bitwise): we now support rw [f] for applying f-eqn_lemmas
2017-07-07 12:03:47 -07: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
Sebastian Ullrich
aaa59085b3
fix(emacs/lean-mode): lean-execute: don't clobber compile-command
2017-07-07 17:19:23 +02:00