Leonardo de Moura
bed3e6c2fd
feat(library/tactic/smt): add get_config and use it to implement slift
...
smt_tactic.slift was losing the configuration.
2017-02-18 17:52:45 -08:00
Leonardo de Moura
2f6f1eb458
feat(library/init): add helper functions
2017-02-18 16:23:15 -08:00
Leonardo de Moura
b1acaf50ee
feat(library/init/meta/rb_map): add rb_set and helper functions
2017-02-18 16:22:15 -08:00
Leonardo de Moura
c065faaf1f
feat(frontends/lean/elaborator): improve ^. notation
2017-02-18 16:20:21 -08:00
Leonardo de Moura
74f7bc0473
feat(frontends/lean): improve notation for converting infix notation into functions
2017-02-17 23:11:22 -08:00
Leonardo de Moura
077176b82f
feat(frontends/lean): add Haskell-like for converting infix notation into functions
...
Examples:
qsort (<) [20, 5, 10, 3, 2, 14, 1]
foldl (+) 0 [1, 2, 3]
2017-02-17 22:51:50 -08:00
Leonardo de Moura
10c881266b
refactor(frontends/lean): add parse_lparen
2017-02-17 21:46:39 -08:00
diakopter
554e6bad90
chore(library): fix warning
2017-02-17 21:09:23 -08:00
Leonardo de Moura
4f3fd2cba6
feat(library/init/data/list/qsort): add temp qsort as meta definition
2017-02-17 21:07:09 -08:00
Leonardo de Moura
7eef501ae1
chore(*): remove mpfr dependency
...
closes #1380
2017-02-17 20:36:53 -08:00
Johannes Hölzl
bb4920fcbc
feat(library/vm/vm_expr): export instantiate_univ_params
2017-02-17 20:08:18 -08:00
Johannes Hölzl
3db0ebdcf0
feat(library/tactic/match_tactic): return also assignments for universe meta-variables
2017-02-17 20:08:09 -08:00
diakopter
19606fd197
chore(util,kernel,library): clang warnings
2017-02-17 20:01:34 -08:00
Sebastian Ullrich
b9424975b3
refactor(init/meta): replace dynamically-checked quotes where possible
2017-02-17 19:59:57 -08:00
Gabriel Ebner
0c2878e509
fix(frontends/lean/definition_cmds): copy position for equation in meta definitions
...
Fixes #1377 .
2017-02-17 19:57:49 -08:00
Leonardo de Moura
a36e20f0cd
feat(tmp/mini_crush): update
2017-02-17 19:56:14 -08:00
Leonardo de Moura
98b2eb893d
chore(tests/lean/run): fix tests
2017-02-17 19:55:49 -08:00
Leonardo de Moura
a9122a2c0a
chore(library/init/meta): use general when
2017-02-17 19:51:40 -08:00
Leonardo de Moura
632c98aade
feat(library/data/list): cleanup proofs
2017-02-17 19:42:57 -08:00
Leonardo de Moura
a4f43d36a6
feat(library/init/meta/smt): add rsimp
2017-02-17 19:40:38 -08:00
Leonardo de Moura
c51d9ad4f4
feat(library/init/meta): add simph: a shorter simp_using_hs
2017-02-17 13:45:03 -08:00
Leonardo de Moura
03d53b82bd
feat(library/init/meta/contradiction_tactic): minor improvement
2017-02-17 13:44:42 -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
e16c3a0bee
feat(library/init/meta/fun_info): add fold_explicit_args
2017-02-17 10:21:06 -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
69ed7b940f
refactor(init/meta/interactive): query position information dynamically
2017-02-17 15:41:58 +01:00
Sebastian Ullrich
4d41b03168
chore(frontends/lean,library/tactic): remove old tactic_state functions
2017-02-17 15:41:58 +01:00
Sebastian Ullrich
6b611eb030
chore(.travis.yml): fail eagerly
2017-02-17 15:41:58 +01:00
Sebastian Ullrich
e8fa54cc51
refactor(init/meta): move macro creation defs from expr to pexpr
2017-02-17 13:45:57 +01:00
Sebastian Ullrich
9d8c84713c
refactor(*): reduce exception context info from expr to pos_info
2017-02-17 13:45:57 +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
5ed1ac924c
feat(frontends/lean/elaborator): support partially applied eval_expr
2017-02-17 13:03:47 +01:00
Sebastian Ullrich
bdf12a525e
fix(library/vm/vm_string): signed->unsigned cast
2017-02-17 13:03:47 +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
Sebastian Ullrich
260d8789d1
feat(emacs/lean-type): eldoc: always show doc string
2017-02-17 13:03:24 +01:00
Leonardo de Moura
efcebc60f7
feat(library/init/meta/contradiction_tactic): make it more robust
2017-02-16 21:43:34 -08:00
Leonardo de Moura
c4542d5987
chore(tests/lean): fix test
2017-02-16 21:42:51 -08:00
Leonardo de Moura
71950bdf01
fix(frontends/lean/elaborator): expression may not be an application due to error recovery
...
Issue described at https://groups.google.com/forum/#!topic/lean-user/uSSYhgVKKH0
2017-02-16 21:13:21 -08:00
Leonardo de Moura
aabc15823c
feat(tmp/mini_crush): add destruct_best
2017-02-16 20:50:35 -08:00
Leonardo de Moura
54deb6362d
feat(library/init/meta): add helper tactics
2017-02-16 20:49:55 -08:00
Leonardo de Moura
769220fa4e
fix(library/equations_compiler): structural recursion and partial equations
...
The equational compiler was failing to generate equational lemmas for
equations such as:
def f : nat → nat → nat
| (x+1) (y+1) := f (x+10) y
| _ _ := 1
It would fail when trying to prove the following equation:
forall x, f 0 x = 1
using a "refl" proof. This equation does not hold definitionally.
It is not blocked by the internal pattern matching based on the
cases_on recursor, but it is blocked by the outer most brec_on
used to implement structural recursion. The solution is to
"complete" the set of equations. So, the structural_rec
module will replace the equation above with
def f : nat → nat → nat
| (x+1) (y+1) := f (x+10) y
| _ 0 := 1
| _ (y+1) := 1
and then (as before)
def f : Pi (x y : nat), below y → nat
| (x+1) (y+1) F := F^.fst^.fst (x+10)
| _ 0 F := 1
| _ (y+1) F := 1
2017-02-16 14:51:31 -08:00
Leonardo de Moura
3428e9bd59
refactor(library/equations_compiler): add for_each_compatible_constructor
2017-02-16 13:30:15 -08:00
Leonardo de Moura
7886a78967
fix(library/vm/vm): incorrect lean_vm_check
2017-02-16 11:39:23 -08:00
Gabriel Ebner
1437ee9599
fix(kernel/type_checker): disable expression caching in asynchronous proof checking
2017-02-16 07:44:12 -08:00
Leonardo de Moura
ad713c81b4
perf(library/vm/vm_nat): use __builtin_expect to optimize nat operations
...
@gebner I used the __builtin_expect trick to optimize the vm_nat module.
Most of the time, we are processing small numbers.
In the following example, the runtime went from 7.27 secs to 6.6 secs
on my machine.
def mk (a : nat) : nat → list nat
| 0 := []
| (nat.succ n) := a :: mk n
def Sum : list nat → nat → nat
| [] r := r
| (n::ns) r := Sum ns (r + n)
def loop : nat → nat → nat
| s 0 := s
| s (nat.succ n) := loop (s + (Sum (mk (n % 2) 1000000) 0)) n
vm_eval timeit "time" $ loop 0 30
2017-02-15 23:25:26 -08:00
Leonardo de Moura
bff3e44656
fix(library/vm/vm): compilation error when multi threading is disabled
2017-02-15 22:50:44 -08:00
Leonardo de Moura
c1c1cd417a
fix(frontends/lean/builtin_exprs): make sure we use internal names (i.e., names starting with _) when compiling do-blocks
...
@johoelzl This commit fixes the problem you reported at slack.
2017-02-15 22:45:59 -08:00
Leonardo de Moura
368e2bce80
feat(library/compiler/preprocessor): ignore propositions in the preprocessor
...
Suppose we have
def foo : some_proposition :=
by non_trivial_automation
Moreover, assume non_trivial_automation generates a huge proof.
Since this definition is marked with `def`, it is sent to the VM
compiler. In this kind of scenario, the compiler preprocessor was
spending a long time applying "useless" preprocessing steps.
We say they are useless because in the end everything is erased.
I think we should make sure every definition has some bytecode
associated with it in the VM even if the type of the definition
is a proposition. In this way, we have a simple invariant:
every definition has a vm_decl associated with it.
So, we workaround the performance problem above by short-circuiting
the preprocessor for propositions.
2017-02-15 22:11:53 -08:00