Commit graph

990 commits

Author SHA1 Message Date
Leonardo de Moura
777aa63660 fix(kernel/inductive): relax eliminator generation rules for empty types
This commit also removes the workaround false.rec_type. It is not needed anymore
2014-10-28 10:31:00 -07:00
Leonardo de Moura
7516fcad97 feat(kernel/type_checker): add is_stuck method, and improve ensure_pi method, closes #261 2014-10-27 13:16:50 -07:00
Leonardo de Moura
7240a1a640 feat(kernel/inductive): add get_num_minor_premises and get_num_type_formers APIs 2014-10-25 11:17:29 -07:00
Leonardo de Moura
2bc034da2c feat(kernel/inductive): expose 'get_elim_name' API 2014-10-25 10:47:12 -07:00
Leonardo de Moura
9e69a95b26 feat(kernel/inductive): add API for retrieving the number of indices in an inductive datatype 2014-10-25 10:42:05 -07:00
Leonardo de Moura
c30c0fa3b8 fix(kernel/metavar): avoid crash due to stack overflow, closes #253 2014-10-25 00:20:59 -07:00
Leonardo de Moura
40235c6af0 fix(kernel/type_checker): propagate 'memoize' flag to default_converter 2014-10-23 13:15:53 -07:00
Leonardo de Moura
33f18b9454 fix(kernel/converter): remove buggy eta-reduction and rely only on eta-expansion
The bug is exposed by new unit test
2014-10-21 16:54:25 -07:00
Leonardo de Moura
6a31a79265 refactor(frontends/lean/inductive_cmd): move auxiliary method to expr.h 2014-10-18 15:11:26 -07:00
Leonardo de Moura
2369388629 refactor(kernel/instantiate): cleanup beta-reduce 2014-10-17 20:19:51 -07:00
Leonardo de Moura
1ce3b83d79 fix(kernel/metavar): compilation error in some compilers 2014-10-17 17:22:25 -07:00
Leonardo de Moura
58aff5b4af perf(kernel/metavar): used thread local cache for instantiate_metavars 2014-10-17 17:08:35 -07:00
Leonardo de Moura
6d64da2981 perf(kernel/expr_eq_fn): use thread local cache, and avoid memory allocation/deallocation 2014-10-17 16:44:20 -07:00
Leonardo de Moura
7cc3dd0b4d chore(kernel/replace_fn): "name" constant 2014-10-17 14:20:35 -07:00
Leonardo de Moura
b6afbcb7f5 perf(kernel/replace_fn): use 'recursive' replace_fn for "small" terms 2014-10-17 14:15:09 -07:00
Leonardo de Moura
10b880ce3b perf(kernel/metavar): improve occurs_expr and occurs performance 2014-10-17 14:05:22 -07:00
Leonardo de Moura
d2cbd25985 refactor(kernel): replace_visitor doesn't need to be in the kernel anymore 2014-10-17 10:23:35 -07:00
Leonardo de Moura
14ebbda8cb perf(kernel/metavar): minor improvement 2014-10-16 21:43:54 -07:00
Leonardo de Moura
fe484b26f3 refactor(kernel/expr): remove dead code 2014-10-16 13:45:36 -07:00
Leonardo de Moura
3b6b23c921 refactor(kernel/expr): remove silly overloads 2014-10-16 13:37:55 -07:00
Leonardo de Moura
c4f02bd16a refactor(kernel/expr): remove dead code 2014-10-16 13:09:26 -07:00
Leonardo de Moura
97a7dae12a refactor(kernel/expr): remove code duplication 2014-10-16 12:48:49 -07:00
Leonardo de Moura
814778abb1 refactor(kernel/expr): tag expressions at "creation" time 2014-10-15 13:12:09 -07:00
Leonardo de Moura
de7c850782 feat(kernel/converter): relax is_def_eq test for local constants and meta-variables 2014-10-14 15:31:57 -07:00
Leonardo de Moura
940092a975 fix(kernel/constraint): bug in operator<< 2014-10-14 15:22:03 -07:00
Leonardo de Moura
a26618e0f2 feat(frontends/lean): add '[]' notation for marking arguments where class-instance resolution should be applied 2014-10-12 13:06:00 -07:00
Leonardo de Moura
235b8975d2 feat(kernel/inductive): K-like reduction in the kernel
Given (H_1 : a = a), we have that
      eq.rec H_2 H_1
reduces to H_2

This is not exclusive to equality.
It applies to any inductive datatype in Prop, containing only one
constructor with zero "arguments" (we say they are nullary).

BTW, the restriction to only one constructor is not needed, but it is
does not buy much to support multiple nullary constructors since Prop is
proof irrelevant.
2014-10-10 14:37:45 -07:00
Leonardo de Moura
5a71542aeb feat(kernel/inductive): track when K-like reduction can be used 2014-10-10 08:50:24 -07:00
Leonardo de Moura
93e0599a0f feat(kernel/level): add missing normalization rule 2014-10-08 22:23:19 -07:00
Leonardo de Moura
92c424936a refactor(kernel/macro_definition_cell): improve macro get_type API 2014-10-07 16:38:31 -07:00
Leonardo de Moura
bf081ed431 refactor(kernel): rename var_decl to constant_assumption
Motivation: it matches the notation used to declare it.
2014-10-02 17:55:34 -07:00
Leonardo de Moura
98e66586e9 feat(frontends/lean/elaborator): elaborator rejects 'Type' if the universe is explicit 2014-10-02 14:29:51 -07:00
Leonardo de Moura
c46ec6a548 fix(frontends/lean): missing type information for INFO, fixes #218 2014-10-01 14:29:07 -07:00
Leonardo de Moura
966366e18e feat(kernel/inductive): relaxed rules for defining datatypes with explicit universes, closes #217 2014-10-01 10:56:05 -07:00
Leonardo de Moura
a0c37b231f feat(kernel/expr): add hash_bi function that takes binder information into account 2014-09-29 16:44:55 -07:00
Leonardo de Moura
9f6a8827e0 refactor(*): use name_map 2014-09-28 10:23:11 -07:00
Leonardo de Moura
22e47430b5 feat(library/unifier): add 'on-demand' choice constraints, they are processed as soon as their type does not contain meta-variables anymore 2014-09-27 21:50:39 -07:00
Leonardo de Moura
8e7aac1eb4 fix(frontends/lean): add 'eval' command 2014-09-26 20:16:03 -07:00
Leonardo de Moura
03f71c73dc perf(kernel/instantiate): cache result of instantiate_type_univ_params
and instantiate_value_univ_params
2014-09-25 13:24:43 -07:00
Leonardo de Moura
28796593e3 fix(kernel/type_checker): bug in new is_opaque method 2014-09-25 12:24:14 -07:00
Leonardo de Moura
1d92097781 refactor(kernel/declaration): return reference to type/value/name 2014-09-25 12:17:04 -07:00
Leonardo de Moura
d4236e40b4 feat(kernel/type_checker): expose is_opaque 2014-09-25 11:19:54 -07:00
Leonardo de Moura
516c0c73b9 refactor(*): remove dependency to thread_local C++11 keyword, the
current compilers have several bugs associated with it

We use the simpler __thread (gcc and clang) and
__declspec(thread) (visual studio).
2014-09-24 12:51:04 -07:00
Leonardo de Moura
ca1b8ca80f refactor(util/memory_pool): simplify memory_pool, it is not a template anymore 2014-09-24 10:48:32 -07:00
Leonardo de Moura
9b61b18eaa perf(kernel/replace_visitor): use more expensive/precise cache
It does not use pointer equality, but structural equality
2014-09-24 10:12:29 -07:00
Leonardo de Moura
358074ae3d refactor(kernel/record): remove kernel extension for records, we will
implement it outside of the kernel on top of the inductive datatypes
2014-09-24 10:12:28 -07:00
Leonardo de Moura
da481c3274 refactor(kernel): explicit initialization/finalization
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-09-24 10:12:28 -07:00
Leonardo de Moura
531046626a refactor(*): explicit initialization/finalization for environment extensions 2014-09-22 17:30:29 -07:00
Leonardo de Moura
b6781711b1 refactor(*): explicit initialization/finalization for serialization
modules, expression annotations, and tactics
2014-09-22 15:26:41 -07:00
Leonardo de Moura
49d5af473d refactor(kernel): remove support for proof irrelevant classes
Motivation: we can use Prop
2014-09-19 07:32:07 -07:00