This commit is contained in:
Wen Kokke 2020-07-08 11:10:15 +01:00
parent dedf93666d
commit 6bc9ccd609

View file

@ -53,12 +53,13 @@ four.
## Imports
```
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
open import Data.String using (String; _≟_)
open import Data.Nat using (; zero; suc)
open import Data.Empty using (⊥; ⊥-elim)
open import Relation.Nullary using (Dec; yes; no; ¬_)
open import Data.List using (List; _∷_; [])
open import Data.Nat using (; zero; suc)
open import Data.Product using (∃-syntax; _×_)
open import Data.String using (String; _≟_)
open import Relation.Nullary using (Dec; yes; no; ¬_)
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl)
```
## Syntax of terms
@ -788,24 +789,30 @@ while if the top two lines stand for a single reduction
step and the bottom two stand for zero or more reduction
steps it is called the diamond property. In symbols:
confluence : ∀ {L M N} → ∃[ P ]
( ((L —↠ M) × (L —↠ N))
```
postulate
confluence : ∀ {L M N}
→ ((L —↠ M) × (L —↠ N))
--------------------
→ ((M —↠ P) × (N —↠ P)) )
→ ∃[ P ] ((M —↠ P) × (N —↠ P))
diamond : ∀ {L M N} → ∃[ P ]
( ((L —→ M) × (L —→ N))
diamond : ∀ {L M N}
((L —→ M) × (L —→ N))
--------------------
→ ((M —↠ P) × (N —↠ P)) )
→ ∃[ P ] ((M —↠ P) × (N —↠ P))
```
The reduction system studied in this chapter is deterministic.
In symbols:
```
postulate
deterministic : ∀ {L M N}
→ L —→ M
→ L —→ N
------
→ M ≡ N
```
It is easy to show that every deterministic relation satisfies
the diamond property, and that every relation that satisfies