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
c41ee66c
Commit
c41ee66c
authored
Oct 06, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tagless interpreter & cfold
parent
bb251a77
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
251 additions
and
4 deletions
+251
-4
MoreDep.v
src/MoreDep.v
+209
-1
Tactics.v
src/Tactics.v
+42
-3
No files found.
src/MoreDep.v
View file @
c41ee66c
This diff is collapsed.
Click to expand it.
src/Tactics.v
View file @
c41ee66c
...
...
@@ -7,7 +7,7 @@
*
http
:
//creativecommons.org/licenses/by-nc-nd/3.0/
*
)
Require
Import
List
.
Require
Import
Eqdep
List
.
Require
Omega
.
...
...
@@ -47,11 +47,11 @@ Ltac simplHyp invOne :=
|
[
H
:
?
F
_
=
?
F
_
|-
_
]
=>
injection
H
;
match
goal
with
|
[
|-
_
=
_
->
_
]
=>
clear
H
;
intros
;
try
subst
|
[
|-
_
=
_
->
_
]
=>
try
clear
H
;
intros
;
try
subst
end
|
[
H
:
?
F
_
_
=
?
F
_
_
|-
_
]
=>
injection
H
;
match
goal
with
|
[
|-
_
=
_
->
_
=
_
->
_
]
=>
clear
H
;
intros
;
try
subst
|
[
|-
_
=
_
->
_
=
_
->
_
]
=>
try
clear
H
;
intros
;
try
subst
end
|
[
H
:
?
F
_
|-
_
]
=>
inList
F
invOne
;
inversion
H
;
[
idtac
]
;
clear
H
;
try
subst
...
...
@@ -119,3 +119,42 @@ Ltac crush' lemmas invOne :=
un_done
;
sintuition
;
try
omega
;
try
(
elimtype
False
;
omega
))
.
Ltac
crush
:=
crush
'
tt
fail
.
Theorem
dep_destruct
:
forall
(
T
:
Type
)
(
T
'
:
T
->
Type
)
x
(
v
:
T
'
x
)
(
P
:
T
'
x
->
Prop
)
,
(
forall
x
'
(
v
'
:
T
'
x
'
)
(
Heq
:
x
'
=
x
)
,
P
(
match
Heq
in
(
_
=
x
)
return
(
T
'
x
)
with
|
refl_equal
=>
v
'
end
))
->
P
v
.
intros
.
generalize
(
H
_
v
(
refl_equal
_
))
;
trivial
.
Qed
.
Ltac
dep_destruct
E
:=
let
doit
A
:=
let
T
:=
type
of
A
in
generalize
dependent
E
;
let
e
:=
fresh
"e"
in
intro
e
;
pattern
e
;
apply
(
@
dep_destruct
T
)
;
let
x
:=
fresh
"x"
with
v
:=
fresh
"v"
in
intros
x
v
;
destruct
v
;
crush
;
let
bestEffort
Heq
E
tac
:=
repeat
match
goal
with
|
[
H
:
context
[
E
]
|-
_
]
=>
match
H
with
|
Heq
=>
fail
1
|
_
=>
generalize
dependent
H
end
end
;
generalize
Heq
;
tac
Heq
;
clear
Heq
;
intro
Heq
;
rewrite
(
UIP_refl
_
_
Heq
)
;
intros
in
repeat
match
goal
with
|
[
Heq
:
?
X
=
?
X
|-
_
]
=>
generalize
(
UIP_refl
_
_
Heq
)
;
intro
;
subst
;
clear
Heq
|
[
Heq
:
?
E
=
_
|-
_
]
=>
bestEffort
Heq
E
ltac
:
(
fun
E
=>
rewrite
E
)
|
[
Heq
:
_
=
?
E
|-
_
]
=>
bestEffort
Heq
E
ltac
:
(
fun
E
=>
rewrite
<-
E
)
end
in
match
type
of
E
with
|
_
_
?
A
=>
doit
A
|
_
?
A
=>
doit
A
end
.
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