Debian Codegraph @

src/Relation/Binary/Construct/Closure/Transitive/WithK.agda

raw
1 ------------------------------------------------------------------------
2 -- The Agda standard library
3 --
4 -- Some code related to transitive closures that relies on the K rule
5 ------------------------------------------------------------------------
6
7 {-# OPTIONS --with-K --safe #-}
8
9 module Relation.Binary.Construct.Closure.Transitive.WithK where
10
11 open import Function.Base using (_∋_)
12 open import Relation.Binary.Core using (Rel)
13 open import Relation.Binary.Construct.Closure.Transitive
14 open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl)
15
16 module _ {a ℓ} {A : Set a} {_∼_ : Rel A ℓ} where
17
18 ∼⁺⟨⟩-injectiveˡ : ∀ {x y z} {p r : x [ _∼_ ]⁺ y} {q s} →
19 (x [ _∼_ ]⁺ z ∋ x ∼⁺⟨ p ⟩ q) ≡ (x ∼⁺⟨ r ⟩ s) → p ≡ r
20 ∼⁺⟨⟩-injectiveˡ refl = refl
21
22 ∼⁺⟨⟩-injectiveʳ : ∀ {x y z} {p r : x [ _∼_ ]⁺ y} {q s} →
23 (x [ _∼_ ]⁺ z ∋ x ∼⁺⟨ p ⟩ q) ≡ (x ∼⁺⟨ r ⟩ s) → q ≡ s
24 ∼⁺⟨⟩-injectiveʳ refl = refl