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
225b083d
Commit
225b083d
authored
Oct 20, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ext_eq axiom and DepList notations
parent
395035cd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
1 deletion
+34
-1
Makefile
Makefile
+1
-1
Axioms.v
src/Axioms.v
+17
-0
DepList.v
src/DepList.v
+16
-0
No files found.
Makefile
View file @
225b083d
MODULES_NODOC
:=
Tactics MoreSpecif DepList
MODULES_NODOC
:=
Axioms
Tactics MoreSpecif DepList
MODULES_PROSE
:=
Intro
MODULES_CODE
:=
StackMachine InductiveTypes Predicates Coinductive Subset
\
MoreDep DataStruct Equality
...
...
src/Axioms.v
0 → 100644
View file @
225b083d
(
*
Copyright
(
c
)
2008
,
Adam
Chlipala
*
*
This
work
is
licensed
under
a
*
Creative
Commons
Attribution
-
Noncommercial
-
No
Derivative
Works
3.0
*
Unported
License
.
*
The
license
text
is
available
at
:
*
http
:
//creativecommons.org/licenses/by-nc-nd/3.0/
*
)
(
*
Additional
axioms
not
in
the
Coq
standard
library
*
)
Axiom
ext_eq
:
forall
(
A
:
Type
)
(
B
:
A
->
Type
)
(
f
g
:
forall
x
,
B
x
)
,
(
forall
x
,
f
x
=
g
x
)
->
f
=
g
.
Ltac
ext_eq
:=
apply
ext_eq
;
intro
.
src/DepList.v
View file @
225b083d
...
...
@@ -52,6 +52,10 @@ Section hlist.
|
x
::
ls
'
=>
B
x
*
hlist
ls
'
end
%
type
.
Definition
hnil
:
hlist
nil
:=
tt
.
Definition
hcons
(
x
:
A
)
(
ls
:
list
A
)
(
v
:
B
x
)
(
hls
:
hlist
ls
)
:
hlist
(
x
::
ls
)
:=
(
v
,
hls
)
.
Variable
elm
:
A
.
Fixpoint
member
(
ls
:
list
A
)
:
Type
:=
...
...
@@ -71,6 +75,18 @@ Section hlist.
|
inr
idx
'
=>
hget
ls
'
(
snd
mls
)
idx
'
end
end
.
Fixpoint
happ
(
ls1
ls2
:
list
A
)
{
struct
ls1
}
:
hlist
ls1
->
hlist
ls2
->
hlist
(
ls1
++
ls2
)
:=
match
ls1
return
hlist
ls1
->
hlist
ls2
->
hlist
(
ls1
++
ls2
)
with
|
nil
=>
fun
_
hls2
=>
hls2
|
_
::
_
=>
fun
hls1
hls2
=>
(
fst
hls1
,
happ
_
_
(
snd
hls1
)
hls2
)
end
.
End
hlist
.
Implicit
Arguments
hnil
[
A
B
]
.
Implicit
Arguments
hcons
[
A
B
x
ls
]
.
Implicit
Arguments
hget
[
A
B
elm
ls
]
.
Implicit
Arguments
happ
[
A
B
ls1
ls2
]
.
Infix
":::"
:=
hcons
(
right
associativity
,
at
level
60
)
.
Infix
"+++"
:=
happ
(
right
associativity
,
at
level
60
)
.
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