Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,16 @@ Deprecated names
truncate-irrelevant ↦ Relation.Binary.PropositionalEquality.Core.refl
```

* In `Relation.Binary.Construct.Intersection`:
```agda
decidable ↦ _∩?_
```

* In `Relation.Binary.Construct.Union`:
```agda
decidable ↦ _∪?_
```

* In `Relation.Nullary.Decidable.Core`:
```agda
⊤-dec ↦ ⊤?
Expand Down
23 changes: 20 additions & 3 deletions src/Relation/Binary/Construct/Intersection.agda
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,10 @@ module _ (≈ : Rel A ℓ₁) (L : Rel A ℓ₂) (R : Rel A ℓ₃) where

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

decidable : Decidable L → Decidable R → Decidable (L ∩ R)
decidable L? R? x y = L? x y ×? R? x y
infixl 6 _∩?_

_∩?_ : Decidable L → Decidable R → Decidable (L ∩ R)
_∩?_ L? R? x y = L? x y ×? R? x y

------------------------------------------------------------------------
-- Structures
Expand All @@ -102,7 +104,7 @@ isEquivalence {L = L} {R = R} eqₗ eqᵣ = record
isDecEquivalence : IsDecEquivalence L → IsDecEquivalence R → IsDecEquivalence (L ∩ R)
isDecEquivalence eqₗ eqᵣ = record
{ isEquivalence = isEquivalence L.isEquivalence R.isEquivalence
; _≟_ = decidable L._≟_ R._≟_
; _≟_ = L._≟_ ∩? R._≟_
Copy link
Copy Markdown
Collaborator Author

@jamesmckinna jamesmckinna Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB this might be blocking on #2952 ?

} where module L = IsDecEquivalence eqₗ; module R = IsDecEquivalence eqᵣ

isPreorder : IsPreorder ≈ L → IsPreorder ≈ R → IsPreorder ≈ (L ∩ R)
Expand Down Expand Up @@ -144,3 +146,18 @@ isStrictPartialOrderʳ {L = L} {≈ = ≈} {R = R} transₗ respₗ Oᵣ = recor
; trans = transitive L R transₗ Oᵣ.trans
; <-resp-≈ = respects₂ ≈ L R respₗ Oᵣ.<-resp-≈
} where module Oᵣ = IsStrictPartialOrder Oᵣ


------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.

-- version 2.4

decidable = _∩?_
{-# WARNING_ON_USAGE decidable
"Warning: decidable was deprecated in v2.4.
Please use _∩?_ instead."
#-}
21 changes: 19 additions & 2 deletions src/Relation/Binary/Construct/Union.agda
Original file line number Diff line number Diff line change
Expand Up @@ -84,5 +84,22 @@ module _ (≈ : REL A B ℓ₁) (L : REL A B ℓ₂) (R : REL A B ℓ₃) where

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

decidable : Decidable L → Decidable R → Decidable (L ∪ R)
decidable L? R? x y = L? x y ⊎? R? x y
infixr 6 _∪?_

_∪?_ : Decidable L → Decidable R → Decidable (L ∪ R)
_∪?_ L? R? x y = L? x y ⊎? R? x y


------------------------------------------------------------------------
-- DEPRECATED NAMES
------------------------------------------------------------------------
-- Please use the new names as continuing support for the old names is
-- not guaranteed.

-- version 2.4

decidable = _∪?_
{-# WARNING_ON_USAGE decidable
"Warning: decidable was deprecated in v2.4.
Please use _∪?_ instead."
#-}