Skip to content

Commit 75fc276

Browse files
authored
[ rename ] decidability for Relation.Binary.Construct.{Intersection|Union}` (#2955)
* [ rename ] decidability for `Relation.Binary.Construct.Intersection` * d'oh
1 parent d8d1047 commit 75fc276

3 files changed

Lines changed: 49 additions & 5 deletions

File tree

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,16 @@ Deprecated names
9999
truncate-irrelevant ↦ Relation.Binary.PropositionalEquality.Core.refl
100100
```
101101

102+
* In `Relation.Binary.Construct.Intersection`:
103+
```agda
104+
decidable ↦ _∩?_
105+
```
106+
107+
* In `Relation.Binary.Construct.Union`:
108+
```agda
109+
decidable ↦ _∪?_
110+
```
111+
102112
* In `Relation.Nullary.Decidable.Core`:
103113
```agda
104114
⊤-dec ↦ ⊤?

src/Relation/Binary/Construct/Intersection.agda

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@ module _ (≈ : Rel A ℓ₁) (L : Rel A ℓ₂) (R : Rel A ℓ₃) where
8686

8787
module _ {L : REL A B ℓ₁} {R : REL A B ℓ₂} where
8888

89-
decidable : Decidable L Decidable R Decidable (L ∩ R)
90-
decidable L? R? x y = L? x y ×? R? x y
89+
infixl 6 _∩?_
90+
91+
_∩?_ : Decidable L Decidable R Decidable (L ∩ R)
92+
_∩?_ L? R? x y = L? x y ×? R? x y
9193

9294
------------------------------------------------------------------------
9395
-- Structures
@@ -102,7 +104,7 @@ isEquivalence {L = L} {R = R} eqₗ eqᵣ = record
102104
isDecEquivalence : IsDecEquivalence L IsDecEquivalence R IsDecEquivalence (L ∩ R)
103105
isDecEquivalence eqₗ eqᵣ = record
104106
{ isEquivalence = isEquivalence L.isEquivalence R.isEquivalence
105-
; _≟_ = decidable L._≟_ R._≟_
107+
; _≟_ = L._≟_ ∩? R._≟_
106108
} where module L = IsDecEquivalence eqₗ; module R = IsDecEquivalence eqᵣ
107109

108110
isPreorder : IsPreorder ≈ L IsPreorder ≈ R IsPreorder ≈ (L ∩ R)
@@ -144,3 +146,18 @@ isStrictPartialOrderʳ {L = L} {≈ = ≈} {R = R} transₗ respₗ Oᵣ = recor
144146
; trans = transitive L R transₗ Oᵣ.trans
145147
; <-resp-≈ = respects₂ ≈ L R respₗ Oᵣ.<-resp-≈
146148
} where module Oᵣ = IsStrictPartialOrder Oᵣ
149+
150+
151+
------------------------------------------------------------------------
152+
-- DEPRECATED NAMES
153+
------------------------------------------------------------------------
154+
-- Please use the new names as continuing support for the old names is
155+
-- not guaranteed.
156+
157+
-- version 2.4
158+
159+
decidable = _∩?_
160+
{-# WARNING_ON_USAGE decidable
161+
"Warning: decidable was deprecated in v2.4.
162+
Please use _∩?_ instead."
163+
#-}

src/Relation/Binary/Construct/Union.agda

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,5 +84,22 @@ module _ (≈ : REL A B ℓ₁) (L : REL A B ℓ₂) (R : REL A B ℓ₃) where
8484

8585
module _ {L : REL A B ℓ₁} {R : REL A B ℓ₂} where
8686

87-
decidable : Decidable L Decidable R Decidable (L ∪ R)
88-
decidable L? R? x y = L? x y ⊎? R? x y
87+
infixr 6 _∪?_
88+
89+
_∪?_ : Decidable L Decidable R Decidable (L ∪ R)
90+
_∪?_ L? R? x y = L? x y ⊎? R? x y
91+
92+
93+
------------------------------------------------------------------------
94+
-- DEPRECATED NAMES
95+
------------------------------------------------------------------------
96+
-- Please use the new names as continuing support for the old names is
97+
-- not guaranteed.
98+
99+
-- version 2.4
100+
101+
decidable = _∪?_
102+
{-# WARNING_ON_USAGE decidable
103+
"Warning: decidable was deprecated in v2.4.
104+
Please use _∪?_ instead."
105+
#-}

0 commit comments

Comments
 (0)