Leonardo de Moura
bc8bb1dbd3
feat(kernel/replace_fn): add use_cache flag to replace function
2015-02-05 10:49:18 -08:00
Leonardo de Moura
fc6d9878c9
refactor(kernel): add expr_cache
...
It is the old instantiate_metavars_cache.
2015-02-03 14:59:55 -08:00
Leonardo de Moura
dbc8e9e13a
refactor(*): add method get_num_univ_params
2015-01-28 17:22:18 -08:00
Leonardo de Moura
ad4c7c20f9
fix(kernel/inductive/inductive): fix assertion violation when K is applied to type incorrect term
2015-01-27 11:22:14 -08:00
Leonardo de Moura
1dbe4b8fb7
feat(kernel/extension_context): add auxiliary method is_def_eq
2015-01-27 11:17:54 -08:00
Leonardo de Moura
c51e2ac428
feat(kernel/type_checker): expose get_arity function
2015-01-20 14:25:07 -08:00
Leonardo de Moura
c43b2c8640
feat(kernel/extension_context): add auxiliary methods
2015-01-20 14:23:10 -08:00
Leonardo de Moura
752b54085b
refactor(kernel/type_checker): type checker should not unfold macros, but sign an error if a untrusted macro is used
...
Now, we unfold untrusted macros outside of the Lean kernel.
2015-01-20 12:36:56 -08:00
Leonardo de Moura
c6290f01d0
perf(kernel/free_vars): improve has_free_var
2015-01-15 18:42:56 -08:00
Leonardo de Moura
f397da111a
perf(kernel/error_msgs): avoid unnecessary work
2015-01-15 18:32:52 -08:00
Leonardo de Moura
ce0b1d17a2
perf(kernel/free_vars): improve has_free_var
2015-01-15 18:31:43 -08:00
Leonardo de Moura
907f90096e
feat(kernel): add memory consumption checks at replace_fn and for_each_fn
2015-01-15 16:54:55 -08:00
Leonardo de Moura
8ab775bd6f
feat(*): distinguish between logical and runtime exceptions.
...
Now, we use throwable as the new base class for all Lean exceptions, and
exception is the subclass for "logical" exceptions.
2015-01-15 16:54:55 -08:00
Leonardo de Moura
7a75325416
feat(kernel/abstract): add new abstract_local procedure
...
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-12-20 11:31:48 -08:00
Leonardo de Moura
8b3e97d285
feat(kernel/type_checker): add ensure_type variant
2014-12-11 17:32:17 -08:00
Leonardo de Moura
bc7ee2958f
fix(library/tactic/inversion_tactic): bug in mutually recursive case
2014-12-01 18:32:38 -08:00
Leonardo de Moura
4e572fac4e
feat(kernel/inductive): store whether an inductive datatype supports dependent elimination or not
2014-11-27 10:36:15 -08:00
Leonardo de Moura
5fff3113a9
refactor(library/tactic/inversion_tactic): add 'cases_on' step to inversion_tactic
2014-11-27 00:06:26 -08:00
Leonardo de Moura
ffdeb0edc4
fix(frontends/lean/elaborator): unsolved metavariables, fix #329
2014-11-26 11:56:39 -08:00
Leonardo de Moura
ef75cac1c0
feat(kernel/expr): change the rules for inferring implicit arguments, closes #344
2014-11-25 12:54:07 -08:00
Leonardo de Moura
e81d9c9184
perf(kernel/level): apply two simple normalization rules at mk_max
...
They are variations of:
max l1 (max l1 l2) == (max l1 l2)
2014-11-16 18:16:57 -08:00
Leonardo de Moura
67de3b06f3
feat(kernel/level): improve universe level pretty printer
...
Example: produce `l+2` instead of `succ (succ l)`.
2014-11-14 14:51:03 -08:00
Leonardo de Moura
ffffabad95
feat(kernel/level): improve is_geq procedure for universe levels
...
Now, it also returns true for
(succ^k1 a) =?= k2
where k1 >= k2
2014-11-14 14:20:35 -08:00
Leonardo de Moura
51719145f9
feat(library/unifier): solved universe constraints of the form succ^k1 a = max k2 ?m (when k1 >= k2)
2014-11-12 17:28:33 -08:00
Leonardo de Moura
50973bb4f3
feat(frontends/lean): default 'eval' command ignores opaque/irreducible annotations
...
To retrieve the previous behavior, we should use [strict] modifier
2014-11-10 12:46:04 -08:00
Leonardo de Moura
8d05238533
fix(kernel/error_msgs): ignore binder information when comparing type mismatches, fixes #304
2014-11-06 21:03:51 -08:00
Leonardo de Moura
af88e34588
fix(kernel/inductive): bug in eliminator for recursive datatypes in Prop
2014-11-06 14:03:28 -08:00
Leonardo de Moura
e499f8e20a
feat(kernel/inductive): relax conditions for an inductive datatype in Prop to be able to eliminate into Type
...
The new relaxed version allows us to define the "accessability"
proposition and have an eliminator into Type.
See justification in the new comments at inductive.cpp
2014-11-06 09:36:54 -08:00
Leonardo de Moura
84b516994c
fix(library/tactic): type check generalization result, fixes #273
2014-10-29 20:34:01 -07:00
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