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
299cb670
Commit
299cb670
authored
Oct 07, 2008
by
Adam Chlipala
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish automating regexp
parent
b21dadc2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
16 deletions
+26
-16
MoreDep.v
src/MoreDep.v
+26
-16
No files found.
src/MoreDep.v
View file @
299cb670
...
...
@@ -537,8 +537,8 @@ Lemma substring_suffix_emp' : forall s n m,
Qed
.
Lemma
substring_suffix_emp
:
forall
s
n
m
,
m
>
0
->
substring
n
m
s
=
""
substring
n
m
s
=
""
->
m
>
0
->
n
>=
length
s
.
destruct
m
as
[
|
m
]
;
[
crush
|
intros
;
apply
substring_suffix_emp
'
with
m
;
assumption
]
.
Qed
.
...
...
@@ -656,11 +656,25 @@ Section dec_star.
Defined
.
End
dec_star
''
.
Lemma
star_length_contra
:
forall
n
,
length
s
>
n
->
n
>=
length
s
->
False
.
crush
.
Qed
.
Lemma
star_length_flip
:
forall
n
n
'
,
length
s
-
n
<=
S
n
'
->
length
s
>
n
->
length
s
-
n
>
0.
crush
.
Qed
.
Hint
Resolve
star_length_contra
star_length_flip
substring_suffix_emp
.
Definition
dec_star
'
(
n
n
'
:
nat
)
:
length
s
-
n
'
<=
n
->
{
star
P
(
substring
n
'
(
length
s
-
n
'
)
s
)
}
+
{~
star
P
(
substring
n
'
(
length
s
-
n
'
)
s
)
}.
About
dec_star
''
.
refine
(
fix
F
(
n
n
'
:
nat
)
{
struct
n
}
:
length
s
-
n
'
<=
n
->
{
star
P
(
substring
n
'
(
length
s
-
n
'
)
s
)
}
+
{~
star
P
(
substring
n
'
(
length
s
-
n
'
)
s
)
}
:=
...
...
@@ -671,16 +685,14 @@ Section dec_star.
|
S
n
''
=>
fun
_
=>
le_gt_dec
(
length
s
)
n
'
||
dec_star
''
(
n
:=
n
'
)
(
star
P
)
(
fun
n0
_
=>
Reduce
(
F
n
''
n0
_
))
(
length
s
-
n
'
)
end
)
;
clear
F
;
crush
;
eauto
.
apply
star_substring_inv
in
H
;
crush
;
eauto
.
assert
(
n
'
>=
length
s
)
;
[
|
omega
]
.
apply
substring_suffix_emp
with
(
length
s
-
n
'
)
;
crush
.
assert
(
S
x
<=
length
s
-
n
'
)
;
[
omega
|
]
.
apply
_1
in
H1
.
tauto
.
end
)
;
clear
F
;
crush
;
eauto
;
match
goal
with
|
[
H
:
star
_
_
|-
_
]
=>
apply
star_substring_inv
in
H
;
crush
;
eauto
end
;
match
goal
with
|
[
H1
:
_
<
_
-
_
,
H2
:
forall
l
'
:
nat
,
_
<=
_
-
_
->
_
|-
_
]
=>
generalize
(
H2
_
(
lt_le_S
_
_
H1
))
;
tauto
end
.
Defined
.
Definition
dec_star
:
{
star
P
s
}
+
{
~
star
P
s
}.
...
...
@@ -700,8 +712,6 @@ Qed.
Hint
Resolve
app_cong
.
Definition
matches
P
(
r
:
regexp
P
)
s
:
{
P
s
}
+
{
~
P
s
}.
refine
(
fix
F
P
(
r
:
regexp
P
)
s
:
{
P
s
}
+
{
~
P
s
}
:=
match
r
with
...
...
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