Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
cpdt
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
research
cpdt
Commits
41a5f83b
Commit
41a5f83b
authored
Nov 05, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
About to remove Cfold stuff
parent
234d920e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
72 additions
and
1 deletion
+72
-1
Hoas.v
src/Hoas.v
+72
-1
No files found.
src/Hoas.v
View file @
41a5f83b
...
...
@@ -442,6 +442,76 @@ Ltac ssimp := unfold Subst, Cfold in *; simpl in *; autorewrite with fold in *;
end
;
autorewrite
with
fold
in
*.
Lemma
cfold_thorough
:
forall
var
t
(
e
:
exp
var
t
)
,
cfold
(
cfold
e
)
=
cfold
e
.
induction
e
;
crush
;
try
(
f_equal
;
ext_eq
;
eauto
)
;
match
goal
with
|
[
e1
:
exp
_
Nat
,
e2
:
exp
_
Nat
|-
_
]
=>
dep_destruct
(
cfold
e1
)
;
crush
;
dep_destruct
(
cfold
e2
)
;
crush
end
.
Qed
.
Lemma
Cfold_thorough
:
forall
t
(
E
:
Exp
t
)
,
Cfold
(
Cfold
E
)
=
Cfold
E
.
intros
;
unfold
Cfold
,
Exp
;
ext_eq
;
apply
cfold_thorough
.
Qed
.
Hint
Resolve
Cfold_thorough
.
Section
eq_arg
.
Variable
A
:
Type
.
Variable
B
:
A
->
Type
.
Variable
x
:
A
.
Variables
f
g
:
forall
x
,
B
x
.
Hypothesis
Heq
:
f
=
g
.
Theorem
eq_arg
:
f
x
=
g
x
.
congruence
.
Qed
.
End
eq_arg
.
Implicit
Arguments
eq_arg
[
A
B
f
g
]
.
Lemma
Cfold_Subst_thorough
:
forall
t1
(
V
:
Exp
t1
)
t2
(
B
:
Exp1
t1
t2
)
,
Subst
(
Cfold
V
)
(
Cfold1
B
)
=
Cfold
(
Subst
(
Cfold
V
)
(
Cfold1
B
))
.
Lemma
Cfold_Step_thorough
'
:
forall
t
(
E
V
:
Exp
t
)
,
E
===>
V
->
forall
E
'
,
E
=
Cfold
E
'
->
Cfold
V
=
V
.
induction
1
;
crush
.
apply
IHBigStep3
with
(
Subst
V2
B
)
.
generalize
(
closed
E
'
)
;
inversion
1
;
my_crush
.
generalize
(
eq_arg
(
fun
_
=>
Set
)
H2
)
;
ssimp
.
dep_destruct
(
cfold
(
E0
(
fun
_
=>
Set
)))
;
try
discriminate
;
dep_destruct
(
cfold
(
E3
(
fun
_
=>
Set
)))
;
discriminate
.
ssimp
;
my_crush
.
rewrite
<-
(
IHBigStep2
_
(
refl_equal
_
))
.
generalize
(
IHBigStep1
_
(
refl_equal
_
))
.
my_crush
.
ssimp
.
assert
(
B
=
Cfold1
B
)
.
generalize
H2
;
clear_all
;
my_crush
.
unfold
Exp1
;
ext_eq
.
generalize
(
eq_arg
x
H2
)
;
injection
1
;
my_crush
.
rewrite
H8
.
my_crush
.
Lemma
Cfold_thorough
:
forall
t
(
E
V
:
Exp
t
)
,
Cfold
E
===>
V
->
V
=
Cfold
V
.
Lemma
Cfold_Subst
'
:
forall
t
(
E
V
:
Exp
t
)
,
E
===>
V
->
forall
t
'
B
(
V
'
:
Exp
t
'
)
V
''
,
E
=
Cfold
(
Subst
V
'
B
)
...
...
@@ -466,6 +536,7 @@ Lemma Cfold_Subst' : forall t (E V : Exp t),
replace
F
with
(
fun
var
=>
cfold
(
Abs
'
(
fun
x
:
var
_
=>
B
var
x
)))
end
.
apply
IHBigStep1
;
auto
.
ssimp
.
apply
cheat
.
reflexivity
.
...
...
@@ -497,7 +568,7 @@ Hint Resolve Cfold_Subst.
Theorem
Cfold_correct
:
forall
t
(
E
V
:
Exp
t
)
,
E
===>
V
->
Cfold
E
===>
Cfold
V
.
induction
1
;
unfold
Cfold
in
*;
crush
;
ssimp
;
eauto
.
induction
1
;
crush
;
ssimp
;
eauto
.
change
((
fun
H1
:
type
->
Type
=>
match
Cfold
E1
H1
with
...
...
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