| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Some properties of reflexive closures which rely on the K rule |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --safe --with-K #-} |
| 8 |
|
| 9 |
module Relation.Binary.Construct.Closure.Reflexive.Properties.WithK where |
| 10 |
|
| 11 |
open import Relation.Binary.Core using (Rel) |
| 12 |
open import Relation.Binary.Definitions using (Irrelevant; Irreflexive) |
| 13 |
open import Relation.Binary.Construct.Closure.Reflexive |
| 14 |
using (ReflClosure; [_]; refl) |
| 15 |
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) |
| 16 |
open import Relation.Nullary.Negation.Core using (contradiction) |
| 17 |
|
| 18 |
open import Relation.Binary.Construct.Closure.Reflexive.Properties public |
| 19 |
|
| 20 |
module _ {a ℓ} {A : Set a} {_∼_ : Rel A ℓ} where |
| 21 |
|
| 22 |
irrel : Irrelevant _∼_ → Irreflexive _≡_ _∼_ → Irrelevant (ReflClosure _∼_) |
| 23 |
irrel irrel irrefl [ x∼y₁ ] [ x∼y₂ ] = cong [_] (irrel x∼y₁ x∼y₂) |
| 24 |
irrel irrel irrefl [ x∼y ] refl = contradiction x∼y (irrefl refl) |
| 25 |
irrel irrel irrefl refl [ x∼y ] = contradiction x∼y (irrefl refl) |
| 26 |
irrel irrel irrefl refl refl = refl |