Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
stdpp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
35
Issues
35
List
Boards
Labels
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
stdpp
Commits
89454051
Commit
89454051
authored
Feb 05, 2019
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The different notions of confluence and properties about them.
parent
c73f285d
Changes
1
Hide whitespace changes
Inline
Sidebyside
Showing
1 changed file
with
67 additions
and
1 deletion
+67
1
theories/relations.v
theories/relations.v
+67
1
No files found.
theories/relations.v
View file @
89454051
...
...
@@ 62,6 +62,19 @@ Definition rtsc {A} (R : relation A) := rtc (sc R).
(** Strongly normalizing elements. *)
Notation
sn
R
:
=
(
Acc
(
flip
R
)).
(** The various kinds of "confluence" properties. Any relation that has the
diamond property is confluent, and any confluent relation is locally confluent.
The naming convention are taken from "Term Rewriting and All That" by Baader and
Nipkow. *)
Definition
diamond
{
A
}
(
R
:
relation
A
)
:
=
∀
x
y1
y2
,
R
x
y1
→
R
x
y2
→
∃
z
,
R
y1
z
∧
R
y2
z
.
Definition
confluent
{
A
}
(
R
:
relation
A
)
:
=
diamond
(
rtc
R
).
Definition
locally_confluent
{
A
}
(
R
:
relation
A
)
:
=
∀
x
y1
y2
,
R
x
y1
→
R
x
y2
→
∃
z
,
rtc
R
y1
z
∧
rtc
R
y2
z
.
Hint
Unfold
nf
red
:
core
.
(** * General theorems *)
...
...
@@ 234,7 +247,60 @@ Section properties.
intros
H
.
cut
(
∀
z
,
rtc
R
x
z
→
all_loop
R
z
)
;
[
eauto
].
cofix
FIX
.
constructor
;
eauto
using
rtc_r
.
Qed
.
End
rtc
.
(** An alternative definition of confluence; also known as the ChurchRosser
property. *)
Lemma
confluent_alt
:
confluent
R
↔
(
∀
x
y
,
rtsc
R
x
y
→
∃
z
,
rtc
R
x
z
∧
rtc
R
y
z
).
Proof
.
split
.

intros
Hcr
.
induction
1
as
[
x

x
y1
y1'
[
Hy1

Hy1
]
Hy1'
(
z
&
IH1
&
IH2
)]
;
eauto
.
destruct
(
Hcr
y1
x
z
)
as
(
z'
&?&?)
;
eauto
using
rtc_transitive
.

intros
Hcr
x
y1
y2
Hy1
Hy2
.
apply
Hcr
;
trans
x
;
eauto
using
rtc_rtsc_rl
,
rtc_rtsc_lr
.
Qed
.
Lemma
confluent_nf_r
x
y
:
confluent
R
→
rtsc
R
x
y
→
nf
R
y
→
rtc
R
x
y
.
Proof
.
rewrite
confluent_alt
.
intros
Hcr
??.
destruct
(
Hcr
x
y
)
as
(
z
&
Hx
&
Hy
)
;
auto
.
by
apply
rtc_nf
in
Hy
as
>.
Qed
.
Lemma
confluent_nf_l
x
y
:
confluent
R
→
rtsc
R
x
y
→
nf
R
x
→
rtc
R
y
x
.
Proof
.
intros
.
by
apply
(
confluent_nf_r
y
x
).
Qed
.
Lemma
diamond_confluent
:
diamond
R
→
confluent
R
.
Proof
.
intros
Hdiam
.
assert
(
∀
x
y1
y2
,
rtc
R
x
y1
→
R
x
y2
→
∃
z
,
rtc
R
y1
z
∧
rtc
R
y2
z
)
as
Hstrip
.
{
intros
x
y1
y2
Hy1
;
revert
y2
.
induction
Hy1
as
[
x

x
y1
y1'
Hy1
Hy1'
IH
]
;
[
by
eauto
]
;
intros
y2
Hy2
.
destruct
(
Hdiam
x
y1
y2
)
as
(
z
&
Hy1z
&
Hy2z
)
;
auto
.
destruct
(
IH
z
)
as
(
z'
&?&?)
;
eauto
.
}
intros
x
y1
y2
Hy1
;
revert
y2
.
induction
Hy1
as
[
x

x
y1
y1'
Hy1
Hy1'
IH
]
;
[
by
eauto
]
;
intros
y2
Hy2
.
destruct
(
Hstrip
x
y2
y1
)
as
(
z
&?&?)
;
eauto
.
destruct
(
IH
z
)
as
(
z'
&?&?)
;
eauto
using
rtc_transitive
.
Qed
.
Lemma
confluent_locally_confluent
:
confluent
R
→
locally_confluent
R
.
Proof
.
unfold
confluent
,
locally_confluent
;
eauto
.
Qed
.
(** The following is also known as Newman's lemma *)
Lemma
locally_confluent_confluent
:
(
∀
x
,
sn
R
x
)
→
locally_confluent
R
→
confluent
R
.
Proof
.
intros
Hsn
Hcr
x
.
induction
(
Hsn
x
)
as
[
x
_
IH
].
intros
y1
y2
Hy1
Hy2
.
destruct
Hy1
as
[
x

x
y1
y1'
Hy1
Hy1'
]
;
[
by
eauto
].
destruct
Hy2
as
[
x

x
y2
y2'
Hy2
Hy2'
]
;
[
by
eauto
].
destruct
(
Hcr
x
y1
y2
)
as
(
z
&
Hy1z
&
Hy2z
)
;
auto
.
destruct
(
IH
_
Hy1
y1'
z
)
as
(
z1
&?&?)
;
auto
.
destruct
(
IH
_
Hy2
y2'
z1
)
as
(
z2
&?&?)
;
eauto
using
rtc_transitive
.
Qed
.
End
properties
.
(** * Theorems on sub relations *)
Section
subrel
.
...
...
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