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
53400ba8
Commit
53400ba8
authored
Nov 28, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
map_id
parent
c1bc62a8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
27 deletions
+32
-27
DepList.v
src/DepList.v
+6
-0
Generic.v
src/Generic.v
+26
-27
No files found.
src/DepList.v
View file @
53400ba8
...
...
@@ -207,6 +207,12 @@ Section hmap.
hmap
h1
+++
hmap
h2
=
hmap
(
h1
+++
h2
)
.
induction
ls1
;
crush
.
Qed
.
Theorem
hget_hmap
:
forall
elm
ls
(
hls
:
hlist
B1
ls
)
(
m
:
member
elm
ls
)
,
hget
(
hmap
hls
)
m
=
f
(
hget
hls
m
)
.
induction
ls
;
crush
.
case
a1
;
crush
.
Qed
.
End
hmap
.
Implicit
Arguments
hmap
[
A
B1
B2
ls
]
.
src/Generic.v
View file @
53400ba8
...
...
@@ -206,29 +206,6 @@ Section ok.
(
x
:
nonrecursive
c
)
(
r
:
ilist
T
(
recursive
c
))
,
fx
R
cases
((
hget
dd
m
)
x
r
)
=
(
hget
cases
m
)
x
(
imap
(
fx
R
cases
)
r
)
.
Section
ind
.
Hypothesis
dok
:
datatypeDenoteOk
.
Hypothesis
fok
:
fixDenoteOk
.
Variable
R
:
Type
.
Variable
cases
:
datatypeDenote
R
dt
.
Variable
P
:
R
->
Prop
.
Variable
ind_case
:
forall
c
(
m
:
member
c
dt
)
(
x
:
nonrecursive
c
)
(
r
:
ilist
T
(
recursive
c
))
,
(
forall
i
:
index
(
recursive
c
)
,
P
(
fx
R
cases
(
get
r
i
)))
->
P
((
hget
cases
m
)
x
(
imap
(
fx
R
cases
)
r
))
.
Theorem
ind
:
forall
v
,
P
(
fx
R
cases
v
)
.
intro
;
apply
(
dok
(
fun
v
=>
P
(
fx
R
cases
v
)))
;
intros
.
rewrite
fok
.
auto
.
Qed
.
End
ind
.
End
ok
.
Implicit
Arguments
datatypeDenoteOk
[
T
dt
]
.
...
...
@@ -239,13 +216,35 @@ Lemma foldr_plus : forall n (ils : ilist nat n),
generalize
(
IHn
b
)
;
crush
.
Qed
.
Theorem
size_positive
:
forall
T
dt
(
fx
:
fixDenote
T
dt
)
(
dd
:
datatypeDenote
T
dt
)
(
dok
:
datatypeDenoteOk
dd
)
(
fok
:
fixDenoteOk
dd
fx
)
Theorem
size_positive
:
forall
T
dt
(
dd
:
datatypeDenote
T
dt
)
(
fx
:
fixDenote
T
dt
)
(
dok
:
datatypeDenoteOk
dd
)
(
fok
:
fixDenoteOk
dd
fx
)
(
v
:
T
)
,
size
fx
v
>
0.
Hint
Rewrite
hget_hmake
:
cpdt
.
Hint
Resolve
foldr_plus
.
unfold
size
;
intros
;
apply
(
ind
dok
fok
)
;
crush
.
unfold
size
;
intros
;
pattern
v
;
apply
dok
;
crush
.
Qed
.
Theorem
map_id
:
forall
T
dt
(
dd
:
datatypeDenote
T
dt
)
(
fx
:
fixDenote
T
dt
)
(
dok
:
datatypeDenoteOk
dd
)
(
fok
:
fixDenoteOk
dd
fx
)
(
v
:
T
)
,
map
dd
fx
(
fun
x
=>
x
)
v
=
v
.
Hint
Rewrite
hget_hmap
:
cpdt
.
unfold
map
;
intros
;
pattern
v
;
apply
dok
;
crush
.
match
goal
with
|
[
|-
hget
_
_
_
?
R1
=
hget
_
_
_
?
R2
]
=>
replace
R1
with
R2
end
;
crush
.
induction
(
recursive
c
)
;
crush
.
destruct
r
;
reflexivity
.
destruct
r
;
crush
.
rewrite
(
H
None
)
.
unfold
icons
.
f_equal
.
apply
IHn
;
crush
.
apply
(
H
(
Some
i0
))
.
Qed
.
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