Commit graph

92 commits

Author SHA1 Message Date
Leonardo de Moura
c0e1d05199 chore(kernel): type_checker ==> old_type_checker 2018-06-06 16:10:40 -07:00
Leonardo de Moura
3c1ccc9b74 refactor(kernel): use m_meta instead of m_trusted 2018-05-31 11:18:00 -07:00
Leonardo de Moura
4af1f31877 feat(util, kernel): add obj_list wrapper for Lean list objects, and use it to implement list of universe levels 2018-05-23 14:48:22 -07:00
Leonardo de Moura
0556412f8d refactor(*): add runtime folder
@kha The runtime folder includes what is needed to link a
standalone Lean program. It is still contains some unnecessary files.
We will be able to remove them after we release Lean4.
2018-05-14 14:23:56 -07:00
Leonardo de Moura
b16f641179 feat(util/name_generator): name generator prefix bookkeeping 2018-02-21 15:04:19 -08:00
Leonardo de Moura
c176faed32 feat(kernel/inductive): make sure constructor types do not contain local constants nor metavariables 2018-02-21 15:04:19 -08:00
Leonardo de Moura
2e5b66a5f1 refactor(kernel): make sure kernel does not use global ::lean::mk_fresh_name 2018-02-21 15:04:19 -08:00
Leonardo de Moura
60d04987c8 chore(kernel/inductive/inductive): remove dead global variable 2018-02-21 15:04:19 -08:00
Leonardo de Moura
bc89ebc19c feat(kernel/inductive): improve how induction hypotheses are named
See doc/changes.md
2017-12-05 15:58:09 -08:00
Leonardo de Moura
458958b9fc feat(kernel/inductive): use ih to name induction hypothesis (instead of ih_1) when there is only one 2017-12-05 13:50:24 -08:00
Sebastian Ullrich
c209cdc8be fix(kernel/inductive/inductive): identify indices modulo whnf 2017-07-06 20:59:58 -07:00
Sebastian Ullrich
42eb0c680e feat(kernel/inductive,library/inductive_compiler): do not enforce positivity rule on meta inductives 2017-05-14 19:17:28 -07:00
Leonardo de Moura
1db1f8b229 feat(kernel/inductive/inductive): do not force recursive arguments to occur after non-recursive ones 2017-01-16 22:59:17 -08:00
Gabriel Ebner
a8df381d20 feat(*): parallel compilation 2016-11-29 11:12:40 -08:00
Leonardo de Moura
1b628930ba feat(kernel/inductive): v_idx ==> ih_idx 2016-10-05 17:13:52 -07:00
Leonardo de Moura
572751c56e feat(frontends/lean): force user to use meta keyword on meta inductive/structure/class
Before this commit, we were inferring whether an
inductive/structure/class were meta or not. This was bad since the user
had no clue whether the type was trusted (non meta) or not.
Moreover, users could get confused by this behavior and assume the
kernel was allowing trusted code to rely on untrusted one.
2016-09-29 17:56:35 -07:00
Leonardo de Moura
d59410cc41 refactor(kernel): support only proof irrelevant mode 2016-09-27 17:18:52 -07:00
Leonardo de Moura
d0d75c0923 refactor(kernel): reduce number of configurations supported in the kernel
Now, eta and impredicativity are assumed to be always true.

Motivation: the rest of the system assumes eta.
Regarding impredicativity, we decided to support only the standard library.
2016-09-27 17:07:01 -07:00
Leonardo de Moura
9765151156 feat(kernel/inductive): relax restriction on metavariables
This change does not affect correctness of the kernel, since QED only
process terms that do not contain metavariables.
2016-09-13 13:50:04 -07:00
Leonardo de Moura
318c94bfce fix(kernel/inductive/inductive): kernel should reject inductive datatype declaration for I where I occurs in an index 2016-09-10 17:45:58 -07:00
Leonardo de Moura
932d14241b chore(kernel): remove support for mutually inductive datatypes from the kernel 2016-09-10 17:39:17 -07:00
Leonardo de Moura
df0d39ccee feat(kernel,library/definitional,frontends/lean/structure_cmd): make sure we can define inductive datatypes and structures containing untrusted declarations
If they contain untrusted declarations, then the associated
declarations (e.g., constructors) will be automatically tagged as untrusted.
2016-06-02 16:19:06 -07:00
Leonardo de Moura
487a1e7f89 refactor(kernel): remove extension_context
We replaced it with abstract_type_context
2016-03-19 15:15:39 -07:00
Leonardo de Moura
63d8a0ed45 refactor(kernel): move justification/constraint/metavar to library
These files will be eventually deleted
2016-03-19 14:39:15 -07:00
Leonardo de Moura
e7f1f409c4 refactor(kernel): simplify kernel type_checker
TODO: cleanup, move justification/metavar/constraints to library
2016-03-18 16:28:42 -07:00
Leonardo de Moura
d8079aa16a refactor(library): create copy of the kernel type_checker in library
Motivation: it will allow us to simplify the kernel type_checker and
make sure it implements the same API provided by type_context
2016-03-18 14:34:10 -07:00
Leonardo de Moura
c9e9fee76a refactor(*): remove name_generator and use simpler mk_fresh_name 2016-02-11 18:05:57 -08:00
Leonardo de Moura
edb4c09bc1 fix(frontends/lean,kernel/inductive): compilation errors in Debug mode 2015-08-16 19:02:48 -07:00
Leonardo de Moura
5f5642c4ce fix(kernel/inductive): compilation error with clang++ 2015-08-15 15:06:57 -07:00
Leonardo de Moura
7bc8673786 feat(library/module): efficient inductive_reader
Do not check imported inductive declarations when trust level is greater than 0.
2015-08-15 14:48:49 -07:00
Leonardo de Moura
e80d9685e5 refactor(kernel/inductive): add certified_inductive_decl object
We will use this object to implement a more efficient import procedure
2015-08-15 13:26:38 -07:00
Leonardo de Moura
7a0e198147 feat(kernel,frontends/lean/builtin_cmds): allow kernel extensions to report their builtin constants 2015-05-29 16:28:16 -07:00
Leonardo de Moura
0ceedbe69e fix(library/normalize): fixes #640 2015-05-29 15:58:59 -07:00
Leonardo de Moura
f63c2d9393 feat(kernel/inductive/inductive): for datatypes that support K, we should try K before normalizing the major premise 2015-05-09 11:23:10 -07:00
Leonardo de Moura
16f237f042 feat(kernel/inductive): remove problematic check
see discussion at issue #563

closes #563
2015-04-28 17:21:41 -07:00
Leonardo de Moura
dcc94dde82 refactor(kernel): rename may_reduce_later to is_stuck, and make is_stuck more precise
It now reflects the definition used in the elaboration paper.
2015-04-27 11:20:15 -07: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
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
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
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
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
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
966366e18e feat(kernel/inductive): relaxed rules for defining datatypes with explicit universes, closes #217 2014-10-01 10:56:05 -07:00