Leonardo de Moura
69a446c8d1
feat: add field all to DefinitionVal and TheoremVal
...
Remark: we need an update stage0, and the field is not being updated
correctly set yet.
2022-06-23 16:13:26 -07: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
612ef66bb4
feat: store whether inductive type is nested or not
2020-12-10 14:25:23 -08:00
Sebastian Ullrich
f5565d1d92
fix: mark a few more things as persistent
2020-10-11 17:43:28 +02:00
Leonardo de Moura
1480b39d86
chore: no Task in Theorem
2020-09-03 08:47:55 -07:00
Leonardo de Moura
16d88b04ea
chore: avoid cnstr_set_scalar and cnstr_get_scalar
2020-02-25 13:27:30 -08:00
Leonardo de Moura
6ada62a3ee
feat: export helper functions
...
Motivation: prevent changes in the scalar fields layout from breaking
C++ code.
Ideally, we should do that for all constructors, and implement a tool
that creates the C++ functions automatically for us.
We don't do it because we will delete most of this code after we
finish the Lean4 transition.
2020-02-25 13:00:22 -08:00
Leonardo de Moura
c7d96a6522
fix: theorem values are tasks
2020-01-16 17:20:36 -08:00
Leonardo de Moura
769debf970
fix: is_unsafe
2019-12-30 12:05:28 -08:00
Leonardo de Moura
c650e11d6b
fix: missing isUnsafe fieldat OpaqueVal
2019-12-30 11:53:08 -08:00
Leonardo de Moura
20ba4c4b04
feat(kernel): opaque constants
...
They are very similar to `theorems`, but they are never ever unfolded.
2019-03-15 15:45:06 -07:00
Leonardo de Moura
0888dee25e
chore(*): meta ==> unsafe
2019-03-15 15:04:40 -07:00
Leonardo de Moura
4874e25715
feat(kernel): save constructor idx and nfields at constructor_val
2018-09-14 13:45:58 -07:00
Leonardo de Moura
4863ca071a
chore(runtime): make sure we use the same naming convention for getters and setters
2018-09-09 10:07:00 -07:00
Leonardo de Moura
58e91559d0
feat(*): use new inductive datatype module
2018-09-06 18:09:22 -07:00
Leonardo de Moura
afb9584a63
feat(kernel): store at inductive_val whether the type is reflexive or not
2018-09-05 14:46:03 -07:00
Leonardo de Moura
dd03747d22
chore(kernel): univ_param vs lparam, level_param_names ==> names, and other inconsistencies
2018-09-03 13:05:42 -07:00
Leonardo de Moura
517923d362
feat(kernel/inductive): generate recursors in the new inductive datatype module
2018-08-31 17:47:22 -07:00
Leonardo de Moura
863355c6a0
feat(kernel/inductive): continue new inductive datatype module
...
Add more validation, and create new inductive_val and constant_val objects.
2018-08-29 09:27:06 -07:00
Leonardo de Moura
101886ffae
feat(kernel): proper constant_info and declaration objects for quot type
2018-08-28 13:46:31 -07:00
Leonardo de Moura
161431e995
feat(kernel): implement new mutual_definition declaration object
...
This commit also removes the old `environment::add_meta` hackish method.
2018-08-28 10:30:44 -07:00
Leonardo de Moura
776c977742
refactor(kernel): continue constant_info/declaration refactoring
2018-08-27 17:23:26 -07:00
Leonardo de Moura
27ef29a50f
refactor(kernel/declaration): continue constant_info/declaration refactoring
2018-08-27 13:22:10 -07:00
Leonardo de Moura
82095cc018
refactor(kernel): split declaration into declaration and constant_info
...
This is just another step towards the design described at commit 16598391a07d4a
2018-08-22 17:53:11 -07:00
Leonardo de Moura
47d74e1a5a
chore(kernel/declaration): minor cleanup
2018-08-21 10:11:23 -07:00
Leonardo de Moura
9d35d31529
refactor(kernel): merge constant_assumption and axiom
2018-08-01 09:57:47 -07:00
Leonardo de Moura
bda46cc9ac
feat(kernel): add inductive_decl type on top of runtime/object, and ajust kernel/inductive.cpp
2018-06-26 12:16:33 -07:00
Leonardo de Moura
bb0b43798c
feat(kernel/declaration): add wrappers for accessing inductive/constructor/recursor declarations
2018-06-25 15:01:02 -07:00
Leonardo de Moura
7684860aec
feat(kernel): add C++ wrappers for creating inductive declarations
2018-06-25 14:24:48 -07:00
Leonardo de Moura
ec1aa2553c
refactor(kernel/declaration): implement definition/constant/axiom/theorem using runtime/object
...
TODO: inductive, constructor, recursor
2018-06-25 10:05:45 -07:00
Leonardo de Moura
9c6238e1ac
refactor(kernel/declaration): reducibility hints as runtime/object
2018-06-25 08:04:44 -07:00
Leonardo de Moura
ede1a51d60
refactor(kernel/declaration): remove self_opt flag from reducibility hints
...
This flag was used by the kernel to decide whether the following
heuristic should be used to avoid unfolding `f` at `is_def_eq`.
f a =?= f b
-----------
a =?= b
This heuristic was introduced at Lean1 after a discussion with
Georges Gontier. Since this discussion, we added support for
caching failures of this heuristic. This proved to be much more
effective to attack the performance problems.
Moreover, we do not even use this flag in the `type_context::is_def_eq`
used during elaboration.
The current codebase contains only one place where this flag was set to
`false`: coercions generated at structure_cmd. This change was
made at commit
1c70514231
in the Lean2 codebase when we were not caching failures and
the kernel type checker was also used during elaboration.
2018-06-22 09:02:50 -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
1bc7c0812c
chore(kernel,library): remove task from the kernel and library
2018-05-18 09:06:03 -07:00
Leonardo de Moura
ef784ce7b8
fix(library/tactic/simp_lemmas): auto_params when adding simp lemmas
2017-12-09 09:47:39 -08:00
Gabriel Ebner
595cbb8fe9
refactor(*): task<T>, log_tree, cancellation_token
2017-03-23 08:57:52 +01:00
Gabriel Ebner
1a6629ce3b
feat(frontends/lean/parser): keep list of tasks that have to succeed
2017-01-17 15:31:17 -08:00
Gabriel Ebner
a972c13ce9
refactor(library/task_queue): move task queue to util
2016-12-12 10:01:34 -05:00
Leonardo de Moura
f96d35dc1c
fix(library/aux_definition,frontends/lean/definition_cmds): unfold macros at trust level 0
2016-12-05 13:08:12 -08:00
Leonardo de Moura
d40e97b4bc
chore(*): compilation errors, fix style, fix warnings
2016-11-29 11:35:01 -08:00
Gabriel Ebner
3ecfddcbd5
fix(*): fix build
2016-11-29 11:12:43 -08:00
Gabriel Ebner
385ea13688
feat(kernel/declaration,*): all theorems are delayed, and are revealed on delta-reduction
2016-11-29 11:12:43 -08:00
Gabriel Ebner
8eb4bbd0cb
fix(kernel/declaration): allow introspection of declarations in GDB
...
If the declaration::cell struct is not defined in the same header file
as declaration, GDB will show the cells as <incomplete type>.
2016-11-07 14:55:32 -08:00
Leonardo de Moura
f7df7dc9a7
refactor(kernel): add reducibility_hints
2016-09-04 16:30:02 -07:00
Leonardo de Moura
f4df90d6ac
fix(kernel/declaration): bug at use_untrusted
2016-06-02 17:40:09 -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
7932872487
feat(kernel/declaration): untrusted constant declarations
...
This feature is useful for implementing the new tactic framework
2016-04-28 15:16:24 -07:00
Leonardo de Moura
a29eaf0067
feat(kernel): add 'trusted' flag for definitions
2016-04-11 15:49:29 -07:00
Leonardo de Moura
e635d9be9f
refactor(kernel): rename get_weight to get_height at declaration
...
Motivation:
- It is the standard name for the concept: declaration height
- Avoid confusion with the expression weight
2015-06-30 12:59:10 -07:00