Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Pierre Letouzey
natded
Commits
6357a694
Commit
6357a694
authored
Jul 26, 2020
by
Samuel Ben Hamou
Browse files
(idem mais en ayant enregistré les modifications...)
parent
e3ed8405
Changes
1
Hide whitespace changes
Inline
Side-by-side
Lambda.v
View file @
6357a694
...
...
@@ -9,20 +9,24 @@ Open Scope list.
Inductive
term
:=
|
Var
:
nat
->
term
|
App
:
term
->
term
->
term
|
Abs
:
term
->
term
.
|
Abs
:
term
->
term
|
Nabla
:
term
->
term
.
Inductive
type
:=
|
Arr
:
type
->
type
->
type
|
Atom
:
name
->
type
.
|
Atom
:
name
->
type
|
Bot
:
type
.
Definition
context
:=
list
type
.
Inductive
typed
:
context
->
term
->
type
->
Prop
:=
|
Type_Ax
:
forall
Γ
τ
n
,
nth_error
Γ
n
=
Some
τ
->
typed
Γ
(
Var
n
)
τ
|
Type_App
:
forall
Γ
u
v
σ
μ
,
typed
Γ
u
(
Arr
σ
μ
)
->
typed
Γ
v
σ
->
typed
Γ
(
App
u
v
)
μ
|
Type_Abs
:
forall
Γ
u
σ
μ
,
typed
(
σ
::
Γ
)
u
μ
->
typed
Γ
(
Abs
u
)
(
Arr
σ
μ
).
|
Type_Abs
:
forall
Γ
u
σ
μ
,
typed
(
σ
::
Γ
)
u
μ
->
typed
Γ
(
Abs
u
)
(
Arr
σ
μ
)
|
Type_Nabla
:
forall
Γ
u
τ
,
typed
Γ
u
Bot
->
typed
Γ
(
Nabla
u
)
τ
.
Notation
"u @ v"
:=
(
App
u
v
)
(
at
level
20
)
:
lambda_scope
.
Notation
"∇ u"
:=
(
Nabla
u
)
(
at
level
20
)
:
lambda_scope
.
Notation
"σ -> μ"
:=
(
Arr
σ
μ
)
:
lambda_scope
.
Notation
"# n"
:=
(
Var
n
)
(
at
level
20
,
format
"# n"
)
:
lambda_scope
.
...
...
@@ -38,6 +42,7 @@ Fixpoint to_form (t : type) : formula :=
match
t
with
|
Arr
u
v
=>
((
to_form
u
)
->
(
to_form
v
))
%
form
|
Atom
a
=>
Pred
a
[]
|
Bot
=>
False
end
.
Definition
to_ctxt
(
Γ
:
context
)
:=
List
.
map
to_form
Γ
.
...
...
@@ -85,4 +90,9 @@ Proof.
specialize
IHu
with
(
τ
:=
μ
)
(
Γ
:=
σ
::
Γ
).
cbn
.
apply
R_Imp_i
.
intuition
.
-
intros
.
inversion
H
.
clear
Γ
0
u0
τ
0
H1
H0
H3
.
specialize
IHu
with
(
τ
:=
Bot
)
(
Γ
:=
Γ
).
cbn
in
IHu
.
apply
R_Fa_e
.
intuition
.
Qed
.
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment