Commit graph

1088 commits

Author SHA1 Message Date
Gabriel Ebner
79afaa7421 feat(library/init/meta/tactic): add timetac combinator 2017-02-24 20:17:19 +01:00
Leonardo de Moura
552a185e6a feat(frontends/lean): 'let' in 'do' blocks 2017-02-24 09:10:36 -08:00
Leonardo de Moura
5c7ade4ee4 chore(library/init/meta/vm): indentation 2017-02-23 09:32:20 -08:00
Jared Roesch
9b80e3bb62 feat(library/init/meta/vm): add decidable_eq for vm_obj_kind 2017-02-23 09:31:57 -08:00
Sebastian Ullrich
8c50efeb75 refactor(init/meta/lean/parser): simplify sep_by 2017-02-23 01:52:14 +01:00
Sebastian Ullrich
a443a5b7a6 chore(init/meta,tools/super): remove obsolete set_option eqn_compiler.max_steps 2017-02-23 01:52:13 +01:00
Sebastian Ullrich
908a7bd9f3 feat(frontends/lean/parser): expr patterns 2017-02-23 01:52:13 +01:00
Leonardo de Moura
b9204cefbc feat(library/init/data/array): add helper functions and instances 2017-02-21 13:45:03 -08:00
Leonardo de Moura
19cf5e916b chore(script/gen_constants_cpp): generates a warning if automatically generated C++ function is not used in the source code 2017-02-21 12:05:41 -08:00
Leonardo de Moura
7e6a10bd1b chore(tests/lean): fix tests, and environment.decl_pos 2017-02-21 11:21:02 -08:00
Sebastian Ullrich
69741061b0 refactor(init/meta): drop obsolete X.to_expr functions 2017-02-21 11:06:39 -08:00
Sebastian Ullrich
a053175714 refactor(init/meta,library/vm): use structure for position information 2017-02-21 11:06:39 -08:00
Daniel Selsam
5f630e5866 fix(library/init/data/option/basic.lean): remove unused type parameter in instance 2017-02-21 11:00:40 -08:00
Leonardo de Moura
d1d5428808 feat(library): add check_constants.lean validation, cleanup unused names, minor stdlib fixes 2017-02-21 10:45:31 -08:00
Leonardo de Moura
e9a98362d3 feat(library): functional arrays 2017-02-20 22:00:02 -08:00
Leonardo de Moura
1ca5c78cf8 feat(library/tools/mini_crush): improve mini_crush 2017-02-19 18:33:12 -08:00
Leonardo de Moura
0fb5a01f17 feat(library/tools): add mini_crush 2017-02-19 16:21:12 -08:00
Leonardo de Moura
50f4a28fc3 feat(library/init/meta/smt/interactive): rsimp for smt_tactic 2017-02-19 13:31:03 -08:00
Leonardo de Moura
296d4b0f09 refactor(library/tactic, library/init/meta): simplify_config => simp_config 2017-02-19 13:10:36 -08:00
Leonardo de Moura
b52e8d67be feat(library/init/meta): simp&intro tactics 2017-02-19 13:02:27 -08:00
Leonardo de Moura
d20319693d feat(library/init/meta): cleanup interface using default parameters 2017-02-19 12:12:34 -08:00
Leonardo de Moura
0d22410e2e feat(library/tactic): add zeta option, refactor simplify config option, allow users to change simplify_config in interactive mode 2017-02-19 12:11:22 -08:00
Leonardo de Moura
505efb642a feat(library/init/meta/rb_map): add missing function 2017-02-18 22:44:16 -08:00
Leonardo de Moura
0a99910c52 feat(library/init/meta): add exception set to rsimp attributes, use iff lemmas 2017-02-18 19:43:21 -08:00
Leonardo de Moura
0626835530 feat(library/init/meta): add native name_set 2017-02-18 19:07:50 -08:00
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
10c881266b refactor(frontends/lean): add parse_lparen 2017-02-17 21:46:39 -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
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
Sebastian Ullrich
b9424975b3 refactor(init/meta): replace dynamically-checked quotes where possible 2017-02-17 19:59:57 -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
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
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
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
54deb6362d feat(library/init/meta): add helper tactics 2017-02-16 20:49:55 -08:00
Leonardo de Moura
7ebf16ca26 fix(library/equations_compiler): performance issues at structural_rec module and equational lemma generator
There were two performance bottlenecks in the recursive equation
compiler. Both bottlenecks were due to conversion checking.

1- We allow patterns such as (x+1) in the left-hand-side of a
   recursive equation. This is kind of pattern has to be reduced
   since it is not a constructor. Moreover, when we are trying to
   compile using structural recursion, we need to find an element
   that is structurally smaller in recursive applications.
   Again, we need to use reduction since the pattern may be (x+2),
   and in the recursive application we have (x+1). Now, consider
   the following equation

         f (x+1) (y+1) := f complex_term y

   It will first check whether complex_term is structurally smaller
   than (x+1), and the compiler will timeout trying to reduce
   complex_term.

   This commit adds the following workaround. The structural
   recursion module from now on will only unfold reducible constants
   and constants marked as patterns. This is not a complete
   solution. It will timeout in the following equation:

         f (x+1) (y+1) := f (x+1000000000000) y

   For this one, we need to add a whnf "fuel" option to type_context

2- Equational lemma generation was producing lemmas that are too
   expensive to check. Suppose we the following two definitions

       | f x 0     := 1
       | f x (y+1) := f complex_term y

    and

       | g 0     y    := 1
       | g (x+1) y    := g x complex_term

    Before this commit, we would generate the following proofs for
    the second equation of each definition:

         eq.refl (f complex_term y)
         eq.refl (g x complex_term)

    This proof triggers the following definitionally equality test:

             f x     (y+1)  =?= f complex_term y
             g (x+1) y      =?= g x complex_term

    Since, we have f/g on both sides, the type checker will try
    first to unify the arguments, and may timeout trying to solve

               x  =?= complex_term
               y  =?= complex_term

    since it may take a long time to reduce `complex_term`.

    We workaround this problem by creating a slightly different
    proof.

          eq.refl (unfold_of(f x (y+1)))
          eq.refl (unfold_of(g (x+1) y))

    where unfold_of(t) is the result of applying one delta reduction
    step.
2017-02-15 21:31:28 -08:00
Gabriel Ebner
1d301b7813 feat(init/meta/smt/congruence_closure): add has_to_tactic_format instance 2017-02-15 13:38:30 -08:00