Commit graph

1600 commits

Author SHA1 Message Date
Leonardo de Moura
ca6453a0ab perf: efficient unsigned hash(expr const & e) 2022-03-15 07:15:00 -07:00
Leonardo de Moura
0ef8aaeda0 feat: make sure minor premises in recursors do not include auxiliary type annotations (e.g., autoParam and optParam) 2022-03-10 08:08:36 -08:00
Leonardo de Moura
1afee372f7 refactor: move consume_type_annotations declaration to expr.h 2022-03-10 08:00:39 -08:00
Leonardo de Moura
164f07a5e5 feat: generalize Expr.abstractRange
It now takes free variables **and** metavariables.
This is the first step to make `mkForallFVars` and `mkLambdaFVars`
more general.
2022-03-08 18:19:17 -08:00
Leonardo de Moura
f16d8acb29 feat: eager normalization for proofs by reflection 2022-03-01 12:43:55 -08:00
Gabriel Ebner
a7c9d2735f fix: do not apply eta for structures in Prop
The eta-expansion contains invalid projections, and the eta-rule is
subsumed by proof irrelevance anyhow.
2022-03-01 09:00:46 -08:00
Gabriel Ebner
3746005f5f fix: reject projection (_ : ∃ x, p).2
The inferred type of this projection does not even type check, in general.
2022-03-01 09:00:46 -08:00
Leonardo de Moura
db38bc4043 fix: missing check at infer_proj
We should not allow `h.1` if `h` is a proposition and the result is
not. The recursor for `h`'s type can only eliminate into `Prop`.
2022-02-25 07:15:34 -08:00
Leonardo de Moura
f0b502aca6 fix: increase the number of heartbeats at Expr.eqv
On issue #906, `simp` spends a lot of time checking the cache. This
process is time consuming and doesn't allocate memory. Before this
commit, it would take a long time to get the "maximum number of
heartbeats" error message on the example included in this issue.

Closes #906
2022-01-26 08:25:33 -08:00
Leonardo de Moura
2d113e83f9 feat: eta struct support for unit-like datatypes
For example, given `a b : Unit`, we have that `a` and `b` are
definitionally equal by `etaStruct`.

See #777
2021-11-26 08:36:25 -08:00
Leonardo de Moura
693a96681a doc: fix eta struct comment 2021-11-26 08:36:25 -08:00
Leonardo de Moura
0fc8c1da77 feat: eta for structures at recursors
see #777
2021-11-25 11:31:00 -08:00
Leonardo de Moura
50ac21d0a6 refactor: move is_constructor_app to inductive.cpp 2021-11-25 11:31:00 -08:00
Leonardo de Moura
e22bffa94f refactor: move is_structure_like to inductive.cpp 2021-11-25 11:31:00 -08:00
Leonardo de Moura
03e346bc66 chore: simplify to_cnstr_when_K 2021-11-25 11:31:00 -08:00
Leonardo de Moura
a8f4146070 feat: support eta struct recursively
Addresses issues raised by @gebner at #777
2021-11-23 17:38:48 -08:00
Leonardo de Moura
d685c545b4 feat: eta for structures 2021-11-23 06:21:25 -08:00
Leonardo de Moura
80a73dd903 feat: basic support for definitions at inductive declarations 2021-10-25 12:44:35 -07:00
Sebastian Ullrich
b13d3e6ca5 fix: dllexport functions not already annotated in header 2021-09-20 18:41:46 +02:00
Leonardo de Moura
c8406a301d chore: reduce src/include/lean 2021-09-07 08:24:54 -07:00
Leonardo de Moura
cf49e6fe8f fix: binder name
Binder names are relevant for the `induction` tactic.
2021-08-26 11:11:37 -07:00
Leonardo de Moura
14b611af96 refactor: move buffer.h and *_ref.h files to runtime 2021-08-16 15:39:38 -07:00
Leonardo de Moura
42561bb93f perf: change is_def_eq_proof_irrel type to lbool 2021-07-26 07:11:55 -07:00
Leonardo de Moura
8a98987e26 chore: use isDefEq heuristic on regular definitions only 2021-07-26 07:11:55 -07:00
Leonardo de Moura
3d402eda3f chore: missing ! 2021-07-23 16:04:02 -07:00
Leonardo de Moura
57b4b8ad1b chore: disable the kernel "tryHeuristic" for abbreviations 2021-07-23 12:10:16 -07:00
Sebastian Ullrich
2b451a3fed chore: remove obsolete serializer code 2021-07-22 18:59:39 +02:00
Leonardo de Moura
7424f9c8b0 chore: remove HashableUSize 2021-06-02 09:58:46 -07:00
Leonardo de Moura
cbab9438c9 chore: Hashable instances for Expr and Level 2021-06-02 08:30:25 -07:00
Wojciech Nawrocki
e5182fe4af fix: exported symbol arities 2021-05-29 07:56:54 +02:00
Leonardo de Moura
4675817a9e fix: projection of string literals 2021-05-07 14:38:21 -07:00
Leonardo de Moura
106952622a chore: modify induction hypotheses generated names 2021-05-01 16:21:12 -07:00
Leonardo de Moura
51200c916e chore: make explicit user and internal panics 2021-03-04 07:37:33 -08:00
Leonardo de Moura
023d7605fb feat: add "transitivity" to "has_loose_bvars_in_domain" 2021-02-06 17:42:38 -08:00
Leonardo de Moura
f4c9f7e163 chore: remove id_delta (aka idDelta)
It is a leftover from Lean 3.
2021-02-02 13:59:37 -08:00
Leonardo de Moura
ae61f2ac67 chore: remove dead code 2021-01-05 18:36:27 -08:00
Leonardo de Moura
f0ac477d2e feat: add sanity checks 2021-01-01 18:31:28 -08:00
Leonardo de Moura
244b72befd feat: simpArrow 2021-01-01 17:15:15 -08:00
Leonardo de Moura
17114cc3e8 feat: make sure kernel generates KernelException.declHasMVars instead of KernelException.other
... when a declaration contains metavariables.
2020-12-24 06:56:22 -08:00
Leonardo de Moura
c71eebde8c chore: remove util/buffer.h dependency from runtime 2020-12-14 18:07:28 -08:00
Leonardo de Moura
612ef66bb4 feat: store whether inductive type is nested or not 2020-12-10 14:25:23 -08:00
Leonardo de Moura
0869f38de4 chore: update structure, class, inductive 2020-11-27 15:09:30 -08:00
Leonardo de Moura
b4012fdd71 chore: remove old comment that is not true anymore 2020-11-23 08:44:50 -08:00
Leonardo de Moura
17fb995348 feat: improve mkLevelMax' 2020-11-14 08:36:23 -08:00
Leonardo de Moura
438494ae3f chore: fix assertion 2020-11-02 06:22:46 -08:00
Leonardo de Moura
7b5f283507 chore: remove Expr.localE constructor
It was used by the old frontend
2020-11-01 09:37:48 -08:00
Leonardo de Moura
de568b1268 chore: remove dead code 2020-10-28 09:33:19 -07:00
Leonardo de Moura
16f7bef88f chore: remove old frontend leftovers 2020-10-26 09:08:07 -07:00
Leonardo de Moura
ec17fcbc1a feat: use motive to name the kernel generated recursor
Motivation: users can use named arguments to provide them.
2020-10-23 05:31:28 -07:00
Sebastian Ullrich
438b3351dd feat: add interpreter.prefer_native option 2020-10-21 11:21:56 +02:00