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
c294d392
Commit
c294d392
authored
Oct 08, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prettify rbtree a bit
parent
1a8d980f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
15 deletions
+10
-15
MoreDep.v
src/MoreDep.v
+10
-15
No files found.
src/MoreDep.v
View file @
c294d392
...
...
@@ -478,7 +478,7 @@ Section insert.
|
Black
=>
{
c
'
:
color
&
rbtree
c
'
n
}
end
.
Definition
make
Black
c
n
:
insResult
c
n
->
insertResult
c
n
:=
Definition
make
Rbtree
c
n
:
insResult
c
n
->
insertResult
c
n
:=
match
c
return
insResult
c
n
->
insertResult
c
n
with
|
Red
=>
fun
r
=>
match
r
in
rtree
n
return
insertResult
Red
n
with
...
...
@@ -487,16 +487,10 @@ Section insert.
|
Black
=>
fun
r
=>
r
end
.
Implicit
Arguments
make
Black
[
c
n
]
.
Implicit
Arguments
make
Rbtree
[
c
n
]
.
Definition
insert
c
n
(
t
:
rbtree
c
n
)
:
insertResult
c
n
:=
makeBlack
(
ins
t
)
.
Record
rbtree
'
:
Set
:=
Rbtree
'
{
rtC
:
color
;
rtN
:
nat
;
rtT
:
rbtree
rtC
rtN
}.
makeRbtree
(
ins
t
)
.
Section
present
.
Variable
z
:
nat
.
...
...
@@ -577,20 +571,21 @@ Section insert.
tauto
.
Qed
.
Theorem
present_insert_Red
:
forall
n
(
t
:
rbtree
Red
n
)
,
present
z
(
insert
t
)
<->
(
z
=
x
\
/
present
z
t
)
.
Ltac
present_insert
t
:=
unfold
insert
;
inversion
t
;
generalize
(
present_ins
t
)
;
simpl
;
dep_destruct
(
ins
t
)
;
tauto
.
Theorem
present_insert_Red
:
forall
n
(
t
:
rbtree
Red
n
)
,
present
z
(
insert
t
)
<->
(
z
=
x
\
/
present
z
t
)
.
intros
;
present_insert
t
.
Qed
.
Theorem
present_insert_Black
:
forall
n
(
t
:
rbtree
Black
n
)
,
present
z
(
projT2
(
insert
t
))
<->
(
z
=
x
\
/
present
z
t
)
.
unfold
insert
;
inversion
t
;
generalize
(
present_ins
t
)
;
simpl
;
dep_destruct
(
ins
t
)
;
tauto
.
intros
;
present_insert
t
.
Qed
.
End
present
.
End
insert
.
...
...
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