Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Proost
Manage
Activity
Members
Labels
Plan
Issues
33
Issue boards
Milestones
Code
Merge requests
18
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
loutr
Proost
Merge requests
!55
Resolve "Add axioms"
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve "Add axioms"
70-add-axioms
into
main
Overview
14
Commits
38
Pipelines
42
Changes
18
Merged
belazy
requested to merge
70-add-axioms
into
main
2 years ago
Overview
14
Commits
38
Pipelines
42
Changes
1
Expand
Closes
#70 (closed)
👍
0
👎
0
Merge request reports
Viewing commit
da0a4102
Show latest version
1 file
+
1
−
17
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Verified
da0a4102
feat(kernel): add type-checking for axioms
· da0a4102
arthur-adjedj
authored
2 years ago
kernel/src/type_checker.rs
+
1
−
17
Options
@@ -111,6 +111,7 @@ impl<'arena> Term<'arena> {
match
*
self
{
Sort
(
lvl
)
=>
Ok
(
Term
::
sort
(
lvl
.succ
(
arena
),
arena
)),
Var
(
_
,
type_
)
=>
Ok
(
type_
),
Axiom
(
ax
)
=>
Ok
(
ax
.get_type
(
arena
)),
Prod
(
t
,
u
)
=>
{
let
univ_t
=
t
.infer
(
arena
)
?
;
@@ -157,7 +158,6 @@ impl<'arena> Term<'arena> {
},
Decl
(
decl
)
=>
decl
.get_type_or_try_init
(
Term
::
infer_raw
,
arena
),
Axiom
(
decl
)
=>
Ok
(
decl
.get_term
(
arena
))
}
}
@@ -559,22 +559,6 @@ mod tests {
});
}
#[test]
fn
axioms
()
{
use_arena
(|
arena
|
{
let
nat
=
crate
::
memory
::
declaration
::
builder
::
Builder
::
Decl
(
crate
::
memory
::
term
::
builder
::
Builder
::
Type
(
crate
::
memory
::
level
::
builder
::
Builder
::
Zero
.into
())
.into
(),
Vec
::
new
())
.realise
(
arena
)
.unwrap
();
let
inst_nat
=
crate
::
memory
::
declaration
::
InstantiatedDeclaration
::
instantiate
(
nat
,
&
Vec
::
new
(),
arena
);
let
nat_type
=
Axiom
(
inst_nat
);
})
}
mod
failed_type_inference
{
use
super
::
*
;
Loading