Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cfml
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Packages
Packages
Container Registry
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
CHARGUERAUD Arthur
cfml
Commits
636fc490
Commit
636fc490
authored
Jun 21, 2018
by
Armaël Guéneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
StackDFS: some cleanup
parent
895fadef
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
25 deletions
+12
-25
examples/DFS/StackDFS_proof.v
examples/DFS/StackDFS_proof.v
+12
-25
No files found.
examples/DFS/StackDFS_proof.v
View file @
636fc490
...
...
@@ -117,14 +117,14 @@ Proof.
variante
qui
effectue
des
[
subst
]
sur
les
é
galit
é
s
g
é
n
é
r
é
es
par
[
case_if
]
*
)
}
{
inverts
H
.
}
}
{
introv
Gi
H
.
assert
(
i
=
a
)
as
->
.
{
introv
Gi
H
.
assert
(
i
=
a
)
as
->
.
{
subst
C
.
rew_array
*
in
H
.
case_if
~
.
(
*
idem
,
c
'
est
un
[
rew_array
;
case_if
]
*
)
}
(
*
ici
je
ferai
un
lemma
dans
DFS_proof
pour
reachable_refl
*
)
exists
(
nil
:
path
).
constructors
*
.
}
applys
~
reachable_self
.
}
{
introv
Ci
E
.
assert
(
i
=
a
)
as
->
.
{
subst
C
.
rew_array
*
in
Ci
.
case_if
~
.
}
left
*
.
}
autos
.
}
Qed
.
Lemma
inv_step_push
:
forall
G
n
a
C
L
i
j
js
,
...
...
@@ -137,16 +137,14 @@ Proof.
{
rew_array
~
.
}
{
rew_array
*
.
case_if
~
.
}
{
intros
i
'
M
'
.
rew_listx
in
M
'
.
destruct
M
'
as
[
->
|
M
'
].
-
splits
.
now
applys
~
(
>>
has_edge_nodes
i
j
)
.
rew_array
*
.
case_if
~
.
-
splits
*
.
rew_array
*
.
case_if
~
.
-
forwards
~
(
?&?
)
:
inv_stack0
i
'
.
rew_array
*
.
case_if
~
.
}
{
intros
k
Hk
Ck
.
rew_array
*
in
Ck
.
case_if
~
.
subst
k
.
forwards
~
Ri
:
inv_true_reachable0
i
.
{
applys
~
has_edge_nodes
i
j
.
}
(
*
à
automatiser
*
)
applys
~
reachable_trans_edge
i
.
}
applys
*
reachable_trans_edge
i
.
}
{
intros
i
'
j
'
Ci
'
E
.
rew_array
*
.
case_if
~
.
tests
~:
(
i
'
=
j
).
forwards
~
[
H
|
[
H
|
H
]]
:
inv_true_edges0
i
'
j
'
.
-
rew_array
*
in
Ci
'
.
case_if
~
.
-
rew_set
in
H
.
branches
;
auto
_tilde
.
}
-
rew_set
in
H
.
branches
;
auto
s
.
}
Qed
.
Lemma
inv_step_skip
:
forall
G
n
a
C
L
j
js
,
...
...
@@ -169,10 +167,7 @@ Proof.
{
destruct
H
as
[
p
P
].
lets
PC
:
inv_source
I
.
gen
P
PC
.
generalize
a
as
i
.
intros
i
P
.
induction
P
.
{
auto
.
}
{
introv
Cx
.
lets
[
M
|
[
M
|
M
]]
:
inv_true_edges
I
Cx
H
.
{
inverts
M
.
}
(
*
[
rew_list
in
*
;
auto_false
]
devrait
prouver
les
3
buts
*
)
{
auto
.
}
{
inverts
M
.
}
}
}
{
introv
Cx
.
lets
[
M
|
[
M
|
M
]]
:
inv_true_edges
I
Cx
H
;
rew_listx
~
in
M
.
}
}
{
applys
*
inv_true_reachable
.
}
Qed
.
...
...
@@ -181,21 +176,14 @@ Lemma inv_step_pop : forall G n a C i L,
inv
G
n
a
C
L
(
out_edges
G
i
).
Proof
.
introv
I
.
destruct
I
.
constructors
~
.
{
intros
i
'
j
?
?
.
(
*
nommer
les
hypoth
è
ses
c
'
est
mieux
*
)
{
intros
i
'
j
Ci
'
E
.
forwards
~
[
M
|
[
M
|
M
]]
:
inv_true_edges0
i
'
j
.
(
*
il
faudrait
peut
ê
tre
que
je
d
é
finisse
une
tactic
[
forwards_branches
M
:
inv_true_edges0
i
'
j
]
qui
é
vite
de
se
taper
le
intro_pattern
tout
moche
*
)
rew_listx
in
M
.
branches
;
try
tauto
.
subst
i
'
.
(
*
[
branch
3
]
est
mieux
que
right
;
right
.
*
)
right
.
right
.
rewrite
~
out_edges_has_edge
.
(
*
side
-
condition
à
automatiser
*
)
(
*
du
coup
,
le
[
branch
3
]
n
'
est
plus
n
é
cessaire
techniquement
,
eauto
fera
tout
.
C
'
est
trivial
que
[
has_edge
i
j
]
implique
[
j
\
in
out_edges
i
].
*
)
}
rew_listx
in
M
.
branches
;
autos
*
.
}
Qed
.
Lemma
reachable_imperative_spec
:
forall
g
G
a
b
,
a
\
in
nodes
G
->
b
\
in
nodes
G
->
...
...
@@ -236,15 +224,14 @@ Proof.
c
~>
Array
C2
\
*
s
~>
Stack
L2
\
*
\
[
inv
G
n
a
C2
L2
L
]
\
*
\
[
C2
[
i
]
=
true
]);
hsimpl
*
.
(
*
ç
a
on
automatisera
plus
tard
avec
une
tactique
*
)
}
{
introv
N
Hij
.
xpull
.
intros
C2
L2
?
.
(
*
nommer
toutes
les
hyps
*
)
{
introv
N
Hij
.
xpull
.
intros
C2
L2
C2i
.
xapp_spec
Sf
.
unfold
hinv
at
1.
xpull
.
intros
I
'
.
xapps
*
.
xif
.
{
xapps
*
.
xapp
.
intros
_.
unfold
hinv
.
hsimpl
.
{
rew_array
*
.
case_if
~
.
}
applys
~
inv_step_push
i
.
}
{
(
*
mieux
:
[
unfold
hinv
.
xrets
~
.
applys
~
inv_step_skip
j
.]
*
)
xrets
.
unfold
hinv
.
hsimpl
.
now
applys
~
inv_step_skip
j
.
auto
.
}
}
{
unfold
hinv
.
xrets
~
.
applys
~
inv_step_skip
j
.
}
}
{
unfold
hinv
.
hsimpl
.
apply
~
inv_step_pop
.
}
{
rew_bool_eq
~
.
}
{
hsimpl
.
}
...
...
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