Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Arthur Azevedo de Amorim
Tutorial POPL20
Commits
e7409376
Commit
e7409376
authored
Jan 20, 2020
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fundamental comments.
parent
6b2fd748
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
exercises/fundamental.v
exercises/fundamental.v
+9
-1
No files found.
exercises/fundamental.v
View file @
e7409376
...
...
@@ -17,6 +17,9 @@ Section fundamental.
Implicit
Types
τ
:
ty
.
Implicit
Types
ρ
:
list
(
sem_ty
Σ
).
(** First we need to prove soundness of operator typing. We declare these
lemmas as instances so they will be used automatically in the proof of the
fundamental theorem. *)
Instance
ty_unboxed_sound
τ
ρ
:
ty_unboxed
τ
→
SemTyUnboxed
(
⟦
τ
⟧
ρ
).
Proof
.
destruct
1
;
simpl
;
apply
_
.
Qed
.
Instance
ty_un_op_sound
op
τ
σ
ρ
:
...
...
@@ -26,7 +29,12 @@ Section fundamental.
ty_bin_op
op
τ
1
τ
2
σ
→
SemTyBinOp
op
(
⟦
τ
1
⟧
ρ
)
(
⟦
τ
2
⟧
ρ
)
(
⟦
σ
⟧
ρ
).
Proof
.
destruct
1
;
simpl
;
apply
_
.
Qed
.
Lemma
fundamental
Γ
e
τ
ρ
(** The fundamental theorem. Since the syntactic typing judgment is defined
in a mutual inductive fashion, we need to prove the fundamental theorem for
expressions mutually with the fundamental theorem for values. Note that for
such mutually inductive proofs, we need to make sure ourselves that the
induction hypotheses is only used on smaller derivations. *)
Theorem
fundamental
Γ
e
τ
ρ
(
Hty
:
Γ
⊢
ₜ
e
:
τ
)
:
(
interp_env
Γ
ρ
⊨
e
:
⟦
τ
⟧
ρ
)%
I
with
fundamental_val
v
τ
ρ
(
Hty
:
⊢
ᵥ
v
:
τ
)
:
(
⊨
ᵥ
v
:
⟦
τ
⟧
ρ
)%
I
.
...
...
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