From 78bd91bd983324c2c6dab309d7a533e96b4d185a Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Wed, 19 Feb 2025 11:28:08 -0500
Subject: [PATCH 1/9] add disjoint relation

---
 src/Relation/Unary.agda | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/src/Relation/Unary.agda b/src/Relation/Unary.agda
index 3abc070ace..3a9aaddd3b 100644
--- a/src/Relation/Unary.agda
+++ b/src/Relation/Unary.agda
@@ -207,7 +207,7 @@ infixr 8 _⇒_
 infixr 7 _∩_
 infixr 6 _∪_
 infixr 6 _∖_
-infix 4 _≬_
+infix 4 _≬_ _#_ _#′_
 
 -- Complement.
 
@@ -253,6 +253,14 @@ syntax ⋂ I (λ i → P) = ⋂[ i ∶ I ] P
 _≬_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
 P ≬ Q = ∃ λ x → x ∈ P × x ∈ Q
 
+-- Disjoint
+
+_#_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+P # Q = P ∩ Q ⊆ ∅
+
+_#′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+P #′ Q = P ∩ Q ⊆′ ∅
+
 -- Update.
 
 _⊢_ : (A → B) → Pred B ℓ → Pred A ℓ

From 1a8225e37f3fb6ea143a06bf3b2dd590252f743f Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Wed, 19 Feb 2025 11:28:15 -0500
Subject: [PATCH 2/9] update changelog

---
 CHANGELOG.md | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 468a6e6915..71320bfd24 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -143,3 +143,8 @@ Additions to existing modules
   ```agda
   filter-↭ : ∀ (P? : Pred.Decidable P) → xs ↭ ys → filter P? xs ↭ filter P? ys
   ```
+
+* In `Relation.Unary`:
+  ```agda
+  _#_ _#′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+  ```

From c48d4b8799092307ed00778e66af32edfe40626a Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Wed, 19 Feb 2025 14:15:45 -0500
Subject: [PATCH 3/9] try out perp instead of #

---
 CHANGELOG.md            | 2 +-
 src/Relation/Unary.agda | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 71320bfd24..0977e9a178 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -146,5 +146,5 @@ Additions to existing modules
 
 * In `Relation.Unary`:
   ```agda
-  _#_ _#′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+  _⊥_ _⊥′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
   ```
diff --git a/src/Relation/Unary.agda b/src/Relation/Unary.agda
index 3a9aaddd3b..1d70e5bc8e 100644
--- a/src/Relation/Unary.agda
+++ b/src/Relation/Unary.agda
@@ -255,11 +255,11 @@ P ≬ Q = ∃ λ x → x ∈ P × x ∈ Q
 
 -- Disjoint
 
-_#_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
-P # Q = P ∩ Q ⊆ ∅
+_⊥_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+P ⊥ Q = P ∩ Q ⊆ ∅
 
-_#′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
-P #′ Q = P ∩ Q ⊆′ ∅
+_⊥′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
+P ⊥′ Q = P ∩ Q ⊆′ ∅
 
 -- Update.
 

From 8ff21724d419cd337489a11000eaf793ba5cb556 Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Wed, 19 Feb 2025 14:19:01 -0500
Subject: [PATCH 4/9] fix infix

---
 src/Relation/Unary.agda | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Relation/Unary.agda b/src/Relation/Unary.agda
index 1d70e5bc8e..86bb80f1bb 100644
--- a/src/Relation/Unary.agda
+++ b/src/Relation/Unary.agda
@@ -207,7 +207,7 @@ infixr 8 _⇒_
 infixr 7 _∩_
 infixr 6 _∪_
 infixr 6 _∖_
-infix 4 _≬_ _#_ _#′_
+infix 4 _≬_ _⊥_ _⊥′_
 
 -- Complement.
 

From f77d38bcc8b6ae036cc389e30aa4029bde3c5ad6 Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Fri, 21 Feb 2025 14:58:41 -0500
Subject: [PATCH 5/9] Adds a few properties of disjoint relation

---
 CHANGELOG.md                       |  8 ++++++++
 src/Relation/Unary/Properties.agda | 18 +++++++++++++++++-
 2 files changed, 25 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0977e9a178..e0caa538cd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -148,3 +148,11 @@ Additions to existing modules
   ```agda
   _⊥_ _⊥′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
   ```
+
+* In `Relation.Unary.Definitions`:
+  ```agda
+  ≬-sym : Symmetric {A = Pred A ℓ₁} _≬_
+  ⊥-sym : Symmetric {A = Pred A ℓ₁} _⊥_
+  ≬⇒¬⊥ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≬_ (¬_ ∘₂ _⊥_)
+  ⊥⇒¬≬ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊥_ (¬_ ∘₂ _≬_)
+  ```
diff --git a/src/Relation/Unary/Properties.agda b/src/Relation/Unary/Properties.agda
index 5a108d9081..b10c45f844 100644
--- a/src/Relation/Unary/Properties.agda
+++ b/src/Relation/Unary/Properties.agda
@@ -18,7 +18,8 @@ open import Relation.Binary.Definitions
 open import Relation.Binary.PropositionalEquality.Core using (refl; _≗_)
 open import Relation.Unary
 open import Relation.Nullary.Decidable as Dec using (yes; no; _⊎-dec_; _×-dec_; ¬?; map′; does)
-open import Function.Base using (id; _$_; _∘_)
+open import Relation.Nullary.Negation using (¬_)
+open import Function.Base using (id; _$_; _∘_; _∘₂_)
 
 private
   variable
@@ -197,6 +198,21 @@ U-Universal = λ _ → _
 ≐′⇒≐ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≐′_ _≐_
 ≐′⇒≐ = Product.map ⊆′⇒⊆ ⊆′⇒⊆
 
+------------------------------------------------------------------------
+-- Between/Disjoint properties
+
+≬-sym : Symmetric {A = Pred A ℓ₁} _≬_
+≬-sym = Product.map₂ swap
+
+⊥-sym : Symmetric {A = Pred A ℓ₁} _⊥_
+⊥-sym = _∘ swap
+
+≬⇒¬⊥ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≬_ (¬_ ∘₂ _⊥_)
+≬⇒¬⊥ P≬Q ¬P⊥Q = ¬P⊥Q (Product.proj₂ P≬Q)
+
+⊥⇒¬≬ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊥_ (¬_ ∘₂ _≬_)
+⊥⇒¬≬ P⊥Q = P⊥Q ∘ Product.proj₂
+
 ------------------------------------------------------------------------
 -- Decidability properties
 

From 07229e513c5a9be4b27587e2cea53cd8740abdbc Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Mon, 24 Feb 2025 14:44:18 -0500
Subject: [PATCH 6/9] specialize Negation import to Core

---
 src/Relation/Unary/Properties.agda | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/Relation/Unary/Properties.agda b/src/Relation/Unary/Properties.agda
index b10c45f844..3bc0219d8e 100644
--- a/src/Relation/Unary/Properties.agda
+++ b/src/Relation/Unary/Properties.agda
@@ -18,7 +18,7 @@ open import Relation.Binary.Definitions
 open import Relation.Binary.PropositionalEquality.Core using (refl; _≗_)
 open import Relation.Unary
 open import Relation.Nullary.Decidable as Dec using (yes; no; _⊎-dec_; _×-dec_; ¬?; map′; does)
-open import Relation.Nullary.Negation using (¬_)
+open import Relation.Nullary.Negation.Core using (¬_)
 open import Function.Base using (id; _$_; _∘_; _∘₂_)
 
 private

From 289155735a434d2e6b8cd6f427dc450de539bfbb Mon Sep 17 00:00:00 2001
From: Bradley Saul <bradleysaul@fastmail.com>
Date: Wed, 26 Feb 2025 11:47:05 -0500
Subject: [PATCH 7/9] Update CHANGELOG.md

Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
---
 CHANGELOG.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index e0caa538cd..2b1c46f309 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -149,7 +149,7 @@ Additions to existing modules
   _⊥_ _⊥′_ : Pred A ℓ₁ → Pred A ℓ₂ → Set _
   ```
 
-* In `Relation.Unary.Definitions`:
+* In `Relation.Unary.Properties`:
   ```agda
   ≬-sym : Symmetric {A = Pred A ℓ₁} _≬_
   ⊥-sym : Symmetric {A = Pred A ℓ₁} _⊥_

From ec932a1439dee2267ee69196f99c7a60daeb1bb1 Mon Sep 17 00:00:00 2001
From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
Date: Tue, 8 Apr 2025 03:21:32 +0100
Subject: [PATCH 8/9] Update src/Relation/Unary/Properties.agda

Refactor to achieve greater level polymorphism
---
 src/Relation/Unary/Properties.agda | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/Relation/Unary/Properties.agda b/src/Relation/Unary/Properties.agda
index 3bc0219d8e..87f6cdc071 100644
--- a/src/Relation/Unary/Properties.agda
+++ b/src/Relation/Unary/Properties.agda
@@ -201,11 +201,17 @@ U-Universal = λ _ → _
 ------------------------------------------------------------------------
 -- Between/Disjoint properties
 
+≬-symmetric : Sym {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≬_ _≬_
+≬-symmetric = Product.map₂ swap
+
+⊥-symmetric : Sym {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊥_ _⊥_
+⊥-symmetric = _∘ swap
+
 ≬-sym : Symmetric {A = Pred A ℓ₁} _≬_
-≬-sym = Product.map₂ swap
+≬-sym = ≬-symmetric
 
 ⊥-sym : Symmetric {A = Pred A ℓ₁} _⊥_
-⊥-sym = _∘ swap
+⊥-sym = ⊥-symmetric
 
 ≬⇒¬⊥ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≬_ (¬_ ∘₂ _⊥_)
 ≬⇒¬⊥ P≬Q ¬P⊥Q = ¬P⊥Q (Product.proj₂ P≬Q)

From 40ac5a0424cc3808cf40e48e1547128e2033f35f Mon Sep 17 00:00:00 2001
From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com>
Date: Tue, 8 Apr 2025 03:26:30 +0100
Subject: [PATCH 9/9] Update CHANGELOG.md

Simplify types
---
 CHANGELOG.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2b1c46f309..8ecaf5771c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -151,8 +151,8 @@ Additions to existing modules
 
 * In `Relation.Unary.Properties`:
   ```agda
-  ≬-sym : Symmetric {A = Pred A ℓ₁} _≬_
-  ⊥-sym : Symmetric {A = Pred A ℓ₁} _⊥_
-  ≬⇒¬⊥ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _≬_ (¬_ ∘₂ _⊥_)
-  ⊥⇒¬≬ : Binary._⇒_ {A = Pred A ℓ₁} {B = Pred A ℓ₂} _⊥_ (¬_ ∘₂ _≬_)
+  ≬-sym : Symmetric _≬_
+  ⊥-sym : Symmetric _⊥_
+  ≬⇒¬⊥ : _≬_ ⇒  (¬_ ∘₂ _⊥_)
+  ⊥⇒¬≬ : _⊥_ ⇒  (¬_ ∘₂ _≬_)
   ```