Commit graph

1031 commits

Author SHA1 Message Date
Leonardo de Moura
1bdf7ae55a feat(kernel/default_converter): make norm_ext virtual 2015-02-07 19:25:56 -08:00
Leonardo de Moura
4c2277fccf feat(kernel/converter): more cleanup 2015-02-07 19:19:01 -08:00
Leonardo de Moura
73acaca21e refactor(kernel/default_converter): remove extra_opaque_pred 2015-02-07 19:05:46 -08:00
Leonardo de Moura
a11d1efb42 refactor(kernel/converter): remove mk_default_converter procedures 2015-02-07 19:03:58 -08:00
Leonardo de Moura
a47615009f refactor(kernel/type_checker): replace mk_default_converter with default_converter 2015-02-07 19:01:59 -08:00
Leonardo de Moura
7823905fc1 fix(kernel/default_converter): use is_opaque at is_delta 2015-02-07 17:30:36 -08:00
Leonardo de Moura
e04250f0d8 refactor(library/tactic/rewrite_tactic): use default_converter 2015-02-07 16:44:51 -08:00
Leonardo de Moura
c04c0e8381 refactor(*): remove transparent_scope hack, replace [strict] with [all-transparent] annotation 2015-02-07 15:19:41 -08:00
Leonardo de Moura
7945b8adab refactor(kernel/type_checker): remove useless procedures 2015-02-07 14:55:36 -08:00
Leonardo de Moura
12d320fa19 refactor(kernel/default_converter): avoid carrying type_checker and delayed_justification around in the default_converter 2015-02-07 14:10:56 -08:00
Leonardo de Moura
71b9215a70 refactor(kernel/default_converter): cleanup 2015-02-07 13:49:42 -08:00
Leonardo de Moura
3f06f7b6fd refactor(kernel): move default_converter to its own module 2015-02-07 11:33:37 -08:00
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