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
AVA
FloVer
Commits
965cbd91
Commit
965cbd91
authored
Feb 14, 2019
by
Heiko Becker
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type validator for new let structure
parent
12993b6d
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
402 additions
and
53 deletions
+402
-53
coq/Infra/ExpressionAbbrevs.v
coq/Infra/ExpressionAbbrevs.v
+54
-0
coq/TypeValidator.v
coq/TypeValidator.v
+348
-53
No files found.
coq/Infra/ExpressionAbbrevs.v
View file @
965cbd91
...
...
@@ -533,6 +533,60 @@ Proof.
destruct
(
Q_orderedExps
.
exprCompare
e3_1
e1
)
eqn
:?
;
try
congruence
.
destruct
(
Q_orderedExps
.
exprCompare
e3_2
e2
)
eqn
:?
;
try
congruence
.
Qed
.
Lemma
no_cycle_let_left
e1
:
forall
e2
x
m
,
Q_orderedExps
.
exprCompare
e1
(
Let
m
x
e1
e2
)
<>
Eq
.
Proof
.
induction
e1
;
intros
*
;
cbn
in
*
;
try
congruence
.
destruct
(
mTypeEq
m
m0
)
eqn
:?
.
+
destruct
(
n
?=
x
)
%
nat
eqn
:?
;
try
congruence
.
destruct
(
Q_orderedExps
.
exprCompare
e1_1
(
Let
m
n
e1_1
e1_2
))
eqn
:?
;
try
congruence
.
+
destruct
(
n
?=
x
)
%
nat
eqn
:?
;
try
congruence
.
destruct
(
morePrecise
m
m0
)
eqn
:?
;
unfold
morePrecise
in
*
;
destruct
m
;
destruct
m0
;
try
congruence
.
*
rewrite
Pos
.
leb_compare
in
*
.
unfold
mTypeEq
in
*
.
rewrite
POrderedType
.
Positive_as_OT
.
compare_antisym
in
Heqb0
.
rewrite
Pos
.
eqb_compare
in
*
.
destruct
(
w
?=
w0
)
%
positive
eqn
:?
;
simpl
;
try
congruence
.
rewrite
N
.
eqb_compare
in
*
.
destruct
(
f
?=
f0
)
%
N
eqn
:?
;
simpl
in
*
;
congruence
.
*
rewrite
Pos
.
leb_compare
in
*
.
unfold
mTypeEq
in
*
.
rewrite
POrderedType
.
Positive_as_OT
.
compare_antisym
in
Heqb0
.
rewrite
Pos
.
eqb_compare
in
*
.
destruct
(
w
?=
w0
)
%
positive
eqn
:?
;
simpl
;
try
congruence
.
rewrite
N
.
eqb_compare
in
*
.
destruct
(
f
?=
f0
)
%
N
eqn
:?
;
simpl
in
*
;
congruence
.
Qed
.
Lemma
no_cycle_let_right
e2
:
forall
e1
x
m
,
Q_orderedExps
.
exprCompare
e2
(
Let
m
x
e1
e2
)
<>
Eq
.
Proof
.
induction
e2
;
intros
*
;
cbn
in
*
;
try
congruence
.
destruct
(
mTypeEq
m
m0
)
eqn
:?
.
+
destruct
(
n
?=
x
)
%
nat
eqn
:?
;
try
congruence
.
destruct
(
Q_orderedExps
.
exprCompare
e2_1
e1
)
eqn
:?
;
try
congruence
.
+
destruct
(
n
?=
x
)
%
nat
eqn
:?
;
try
congruence
.
destruct
(
morePrecise
m
m0
)
eqn
:?
;
unfold
morePrecise
in
*
;
destruct
m
;
destruct
m0
;
try
congruence
.
*
rewrite
Pos
.
leb_compare
in
*
.
unfold
mTypeEq
in
*
.
rewrite
POrderedType
.
Positive_as_OT
.
compare_antisym
in
Heqb0
.
rewrite
Pos
.
eqb_compare
in
*
.
destruct
(
w
?=
w0
)
%
positive
eqn
:?
;
simpl
;
try
congruence
.
rewrite
N
.
eqb_compare
in
*
.
destruct
(
f
?=
f0
)
%
N
eqn
:?
;
simpl
in
*
;
congruence
.
*
rewrite
Pos
.
leb_compare
in
*
.
unfold
mTypeEq
in
*
.
rewrite
POrderedType
.
Positive_as_OT
.
compare_antisym
in
Heqb0
.
rewrite
Pos
.
eqb_compare
in
*
.
destruct
(
w
?=
w0
)
%
positive
eqn
:?
;
simpl
;
try
congruence
.
rewrite
N
.
eqb_compare
in
*
.
destruct
(
f
?=
f0
)
%
N
eqn
:?
;
simpl
in
*
;
congruence
.
Qed
.
(
*
Lemma
toRExpMap_toRTMap
e
Gamma
m
:
toRExpMap
Gamma
(
toRExp
e
)
=
Some
m
->
...
...
coq/TypeValidator.v
View file @
965cbd91
This diff is collapsed.
Click to expand it.
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