Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
FP
semantics-course
Commits
5c40c02d
Commit
5c40c02d
authored
Nov 19, 2021
by
Lennard Gäher
Browse files
fix
parent
3895a2ef
Changes
2
Hide whitespace changes
Inline
Side-by-side
_CoqProject
View file @
5c40c02d
...
...
@@ -66,4 +66,4 @@ theories/systemf/existential_invariants.v
#theories/stlc/cbn_logrel.v
#theories/systemf/exercices04.v
#theories/systemf/exercises04_sol.v
theories/systemf/exercises05.v
#
theories/systemf/exercises05.v
theories/systemf/exercises05.v
View file @
5c40c02d
...
...
@@ -78,7 +78,7 @@ Section existential.
End
existential
.
Section
ex4
.
Import
semantics
.
systemf_sol
.
logrel
semantics
.
systemf_sol
.
existential_invariants
.
Import
logrel
existential_invariants
.
(** ** Exercise 4: Evenness *)
(* Consider the following existential type: *)
Definition
even_type
:
type
:
=
...
...
@@ -118,7 +118,7 @@ End ex4.
(** ** Exercise 5: Abstract sums *)
Section
ex5
.
Import
semantics
.
systemf_sol
.
logrel
semantics
.
systemf_sol
.
existential_invariants
.
Import
logrel
existential_invariants
.
Definition
sum_ex_type
(
A
B
:
type
)
:
type
:
=
∃:
((
A
.[
ren
(+
1
)]
→
#
0
)
×
(
B
.[
ren
(+
1
)]
→
#
0
)
×
...
...
@@ -140,14 +140,14 @@ End ex5.
(** ** Exercise 8: Contextual equivalence *)
Section
ex8
.
Import
semantics
.
systemf_sol
.
binary_logrel
.
Import
binary_logrel
.
Definition
sum_ex_impl'
:
val
:
=
pack
((
λ
:
"x"
,
InjL
"x"
),
(
λ
:
"x"
,
InjR
"x"
),
(
Λ
,
λ
:
"x"
"f1"
"f2"
,
Case
"x"
"f1"
"f2"
)
(
Λ
,
λ
:
"x"
"f1"
"f2"
,
Case
"x"
"f1"
"f2"
)
).
Lemma
sum_ex_impl'_typed
n
Γ
A
B
:
Lemma
sum_ex_impl'_typed
n
Γ
A
B
:
type_wf
n
A
→
type_wf
n
B
→
TY
n
;
Γ
⊢
sum_ex_impl'
:
sum_ex_type
A
B
.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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