Commit graph

136 commits

Author SHA1 Message Date
Leonardo de Moura
bad6233389 chore: remove legacy support for modification objects 2020-10-26 08:10:51 -07:00
Leonardo de Moura
289ba6583c chore: remove dead code 2020-10-26 07:58:15 -07:00
Leonardo de Moura
7a24fe73ca chore: remove dead code 2020-10-25 20:49:30 -07:00
Leonardo de Moura
ba7f2849dc chore: use aux recursor extension implemented in Lean 2019-11-02 11:48:02 -07:00
Leonardo de Moura
d2c567ec61 chore(library): remove dead files 2019-08-15 19:01:01 -07:00
Leonardo de Moura
557dd16864 chore(library,frontends/lean): remove old attribute manager 2019-06-27 14:01:34 -07:00
Leonardo de Moura
1f53c4fd33 feat(library/init/lean/eqncompiler): register [matchPattern] attribute using new attribute manager 2019-06-26 15:38:14 -07:00
Leonardo de Moura
ff07ec70f4 core(library/projection): switch to Lean implementation 2019-06-26 08:12:06 -07:00
Leonardo de Moura
8206ef0dab feat(library/reducible): use new Lean implementation 2019-06-24 15:48:12 -07:00
Leonardo de Moura
6b5408b69c chore(library/derive_attribute): remove derive_attribute
We will reimplement it in Lean after we have the new frontend working.
2019-06-20 10:55:53 -07:00
Leonardo de Moura
c957450d05 feat(library/protected): replace C++ implementation with Lean one 2019-05-14 16:12:56 -07:00
Sebastian Ullrich
2d9a16fd24 refactor(library/module_mgr): remove 2019-01-25 20:12:11 +01:00
Leonardo de Moura
a551fbe892 chore(library): remove dead code: comp_val 2018-11-14 16:50:21 -08:00
Leonardo de Moura
e0bb21ba0b chore(library): remove noncomputable module 2018-10-22 09:39:03 -07:00
Leonardo de Moura
4f53e505b0 fix(library/compiler): we need to unfold auxiliary nested _match applications eagerly 2018-09-18 14:17:37 -07:00
Sebastian Ullrich
75b2b09c08 feat(library/module_mgr): 'trace.import' trace class 2018-09-12 09:14:58 -07:00
Leonardo de Moura
3e5f59d6df chore(kernel): remove expr.quote constructor
In Lean4, we will reify expressions.
2018-09-07 22:08:08 -07:00
Leonardo de Moura
49b5216604 chore(library): remove fingerprint 2018-09-07 12:54:19 -07:00
Leonardo de Moura
c48eaed9a4 chore(library): remove relation_manager 2018-09-07 12:35:04 -07:00
Leonardo de Moura
2315bc4653 chore(library): remove documentation environment extension 2018-09-07 12:09:41 -07:00
Leonardo de Moura
e689d82797 chore(library): remove unique_id 2018-09-07 12:00:13 -07:00
Leonardo de Moura
58e91559d0 feat(*): use new inductive datatype module 2018-09-06 18:09:22 -07:00
Leonardo de Moura
5972a3038d chore(library): remove defeq_canonizer 2018-09-03 17:48:01 -07:00
Leonardo de Moura
4917ab0c65 chore(library): remove congr_lemma 2018-08-23 16:48:43 -07:00
Leonardo de Moura
22ba0a1155 chore(library): remove inverse.cpp
We used this module to implement inductive_compiler pack/unpack functions
2018-08-23 13:16:27 -07:00
Sebastian Ullrich
eda9e4bb3f feat(library/derive_attribute): temporary, hacky C++ implementation of @[derive] 2018-08-01 18:44:23 -07:00
Leonardo de Moura
3356c1d08d refactor(library,frontends/lean): move choice to frontends/lean
Remark: `choice` will be a syntax object in Lean4
2018-06-18 13:43:42 -07:00
Leonardo de Moura
818170d780 refactor(kernel): remove tag from kernel expressions
We are temporarily storing position information in a global table.
2018-06-08 10:29:22 -07:00
Leonardo de Moura
2a79da1ab6 refactor(kernel): move formatting stuff out of the kernel 2018-06-07 16:28:54 -07:00
Leonardo de Moura
2ddb9d1598 refactor(library): remove delayed_abstraction macro
We replace them with a new kind of (delayed) assignment at `metavar_context`
```
mvar := (lctx, locals, v)
```
where `lctx` is a local context, `locals` is a list of local
constants, and `v` is an expression.
When all metavariables in `v` are assigned, this assignment is replaced with
```
mvar := Fun(locals, v)
```
2018-05-30 10:04:04 -07:00
Leonardo de Moura
1332fbabd6 feat(library,frontends): remove sorry macro
Lean4 will not have macros.
2018-05-24 14:00:30 -07:00
Leonardo de Moura
ce0467638e chore(*): remove unification hints 2018-04-10 16:29:04 -07:00
Leonardo de Moura
bcaa0b2ad3 refactor(library/typed_expr): do not use macros for implementing typed_expr
Remark: in Lean4, we will not have macro_defs.
2018-04-09 15:16:46 -07:00
Leonardo de Moura
11a05ae4c5 feat(library/tactic): add tactic_state_context_cache helper class
This commit also renames `token` ==> `unique_id`.
We already use `token` in the scanner.
2018-02-21 15:04:20 -08:00
Leonardo de Moura
70b6e5c958 feat(library): unique token generator 2018-02-21 15:04:20 -08:00
Leonardo de Moura
a175e9393e refactor(library): context_cache ==> abstract_context_cache 2018-02-21 15:04:20 -08:00
Leonardo de Moura
7762dc381a feat(library/type_context): use context_cache interface 2018-02-21 15:04:20 -08:00
Sebastian Ullrich
f247363305 feat(library/time_task): print cumulative times on --profile 2018-02-19 09:13:24 -08:00
Leonardo de Moura
adae5b9fa1 chore(library/mpq_macro): delete mpq_macro 2018-01-24 15:24:28 -08:00
Sebastian Ullrich
84997bf4de refactor(init/meta/expr): unify expr and pexpr 2017-05-17 10:38:12 -07:00
Gabriel Ebner
9424e6fa24 refactor(frontends/lean/definition_cmds): make profiling threshold configurable 2017-04-23 11:22:41 -07:00
Leonardo de Moura
faeac14ed7 feat(library/parray): add trace option for tracking destructive updates 2017-03-07 10:57:40 -08:00
Leonardo de Moura
1a698d9065 refactor(library/arith_instance_manager): rename to arith_instance, avoid copy&paste, and add support for norm_num 2017-02-12 19:11:58 -08:00
Leonardo de Moura
d315e424ff feat(library/congr_lemma, library/fun_info): make sure opt_param gadget do not confuse the simplifier, fun_info, congr_lemma, etc
A definition such as

  def f (a : nat) (b : nat := a) (c : nat := a) :=
  a + b + c

should *not* be treated as a dependent function.
2017-01-30 20:23:45 -08:00
Leonardo de Moura
418d62ff48 fix(library/tactic/rewrite_tactic): fixes #1277 2017-01-23 16:34:07 -08:00
Leonardo de Moura
d3795b20dd feat(library/defeq_canonizer): remove thread local cache
The goal is to avoid hard to debug behavior because any tactic (e.g., simp/dsimp/cc) using
defeq_canonize was breaking referential transparency.
2016-12-27 12:56:39 -08:00
Leonardo de Moura
97dd2f34d5 feat(library,frontends/lean): add basic doc string support 2016-11-25 18:52:56 -08:00
Leonardo de Moura
680bab8bb8 feat(library/comp_val): add mk_fin_val_ne_proof and mk_char_val_ne_proof 2016-11-23 10:25:04 -08:00
Leonardo de Moura
924b4d3bdc refactor(library, library/tactic): move simp_lemmas and eqn_lemmas to tactic folder
They were at src/library because we hoped we would be able to use them
in the type_context unifier. However, the plan did not work for several
reasons. We saved the partial implementation in the branch: https://github.com/leodemoura/lean/tree/type_context_with_refl_lemmas

Here are the problems:

1) We have to be able to rewrite even when the type context is already in tmp-mode.
   This is an issue because the tmp metavariables in the refl lemma clash with the ones created in the type context.

  Solution: implemented lift operation for idx metavariables, and custom
  match. This solution is not perfect since the lifting is extra overhead.

2) The term being "unfolded" may be stuck. Example:

      nat.add n (@one nat ?m)

  will not match the pattern

      nat.add ?x_0 (nat.succ ?x_1)

  because ?m is not assigned yet.
  We can assign it during the matching process because it is a regular metavariable and the matching is performed in
  tmp_mode.

  Possible workaround a) try to instanciate type class instances before we try the refl lemmas.
  This is a potential performance problem because the term can be arbitrarily big.
  The current heuristics we use to speed up the process do not work for the example above.

  Possible workaround b) allow regular metavariables be assigned by type class resolution even
  when we are in tmp-mode.

  We have not tried to implement any of these workarounds.

3) There are many more lazy-delta steps. Before this feature, when we unfold `nat.add a (succ ... (succ b) ...)`,
   we are done with delta-reduction. It is just iota and beta after that.
   However, with refl-lemmas, the term `nat.add a (succ ... (succ b) ...)` produces one lazy-delta step per succ.
   This produces nasty side-effects because of the
   The heuristic (f t =?= f s) ==> (t =?= s).

   Examples such as
       (fib 8) =?= 34
   will take a very long time because of this heuristic.

   Possible workaround: cache failures like we did in Lean2.
   However, failure are only easy to cache if there are no meta-variables.

4) The type context trace gets very confusing since we use is_def_eq for matching lhs while we are computing is_def_eq.
   Possible workaround: disable trace when trying refl_lemmas.

5) We must be able to temporarily disable the feature.
   Example: when proving a refl_lemma for a definition `f`, we may have
   to expand the nested definitions
   (e.g., for match-end blocks)

6) refl/simp lemmas were designed to rewrite elaborated terms.
   Using them during unification may produce a series of unexpected
   behaviors since terms usually contain many regular and universe meta-variables.

7) We need to define a notion of "refl stuck application".
   Right now, a metavar is stuck, a projection is stuck if the structure
   is stuck, a recursor is stuck is the major premise is stuck.
   An application (f ...) is refl-lemma stuck if f has refl-lemmas
   associated with it, AND metavariables occurring in arguments are
   preventing a refl-lemma from being applied.
2016-10-12 14:36:00 -07:00
Leonardo de Moura
ebd912d243 feat(library/eqn_lemmas): add map function name => equational lemmas 2016-10-09 11:48:55 -07:00