Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
3bdbdd9
[ breaking ] change fieldname `_≟_` to `_≈?_` in `IsDecEquivalence`
jamesmckinna Feb 25, 2026
1dd260a
refactor: knock-ons, plus deprecations
jamesmckinna Feb 25, 2026
d35166d
refactor: MANY MORE knock-ons, plus deprecations
jamesmckinna Feb 25, 2026
9481e20
refactor: last round of knock-ons
jamesmckinna Feb 25, 2026
f7dee08
fix: whitespace
jamesmckinna Feb 25, 2026
8456287
add: `style-guide` entry
jamesmckinna Feb 25, 2026
412eb93
fix: `test/reflection/assumption`
jamesmckinna Feb 25, 2026
377d56e
fix: `data/trie` plus exports from `Data.String`
jamesmckinna Feb 25, 2026
355a427
fix: renaming and deprecation for `Fin` and `Nat`
jamesmckinna Feb 25, 2026
ed86436
fix: more deprecations
jamesmckinna Feb 25, 2026
a6143ab
fix: cosmetic renaming
jamesmckinna Feb 25, 2026
36754ca
add: better entry in `CHANGELOG`, plus tweak to `style-guide`
jamesmckinna Feb 26, 2026
6a895bd
tidy up `Relation.*`
jamesmckinna Feb 27, 2026
93a74c6
tidy up `Reflection.*`
jamesmckinna Feb 27, 2026
1b273e9
tidy up `Reflection.*`
jamesmckinna Feb 27, 2026
d0946ba
tidy up `Effect.Monad.Partiality`
jamesmckinna Feb 27, 2026
2f64039
tidy up `Algebra`
jamesmckinna Feb 27, 2026
b176289
refactor: tidy up the `Data.*` hierarchy
jamesmckinna Feb 27, 2026
651afe1
fix: `README.Design.Decidability`
jamesmckinna Feb 27, 2026
00c55e1
fix: remove module added in error
jamesmckinna Feb 28, 2026
de6e03d
Merge branch 'master' into issue2845
jamesmckinna Mar 3, 2026
4856ebc
Merge branch 'agda:master' into issue2845
jamesmckinna Apr 15, 2026
07a1096
Merge branch 'master' into issue2845
jamesmckinna Jun 8, 2026
fb0b266
fix: Guillaume's changes
jamesmckinna Jun 8, 2026
248524a
Merge branch 'master' into issue2845
gallais Jun 17, 2026
7521713
Merge branch 'master' into issue2845
gallais Jun 18, 2026
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
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,17 @@ Bug-fixes
Non-backwards compatible changes
--------------------------------

* The notation for `Decidable` relations has been (partially) standardised: thus
- `_≡?_` (at `infix 4`) for `DecidableEquality`
- `_≈?_` (ditto.) for the fieldname of the general `IsDecEquivalence`

Despite being non-backwards compatible, because a fieldname has changed, the
old notation `_≟_` (which was used for both of the above) has been retained,
but deprecated. This leads to a large amount of (trivial) deprecations, in
addition to the substantive one under `Relation.Binary.Structures`, and in
`Data.{Nat|Fin}.Properties` for the concrete datatypes. These deprecations
are summarised below, but are not each documented for each affected module.

* [issue #2547](https://github.com/agda/agda-stdlib/issues/2547)
The names of the *implicit* binders in the following definitions have been
rectified to be consistent with the rest of `Relation.Binary.Definitions`:
Expand All @@ -39,6 +50,7 @@ Non-backwards compatible changes
`Algebra.*`, the field name of the basic homomorphism property `homo` in
`Algebra.Morphism.Structures.IsMagmaHomomorphism` has been renamed to `∙-homo`.


Minor improvements
------------------

Expand All @@ -59,7 +71,7 @@ Deprecated names
inj⇒≟ ↦ inj⇒≡?
≟-≡ ↦ ≡?-≡
≟-≡-refl ↦ ≡?-≡-refl
≟-≢ ↦ ≡?-≢
≟-≢ ↦ ≡?-≢
```

* In `Data.Integer.GCD`:
Expand Down Expand Up @@ -96,6 +108,22 @@ Deprecated names
≢-≟-identity ↦ ≢-≡?-identity
```

* In `Effect.Monad.Partiality`:
```agda
_≟-Kind_ ↦ _≡?-Kind_
```

* In `Reflection.AST.AlphaEquality`:
```agda
≟⇒α ↦ ≡?⇒α
```

* In `Relation.Binary.PropositionalEquality`:
```agda
≡-≟-identity ↦ ≡-≡?-identity
≢-≟-identity ↦ ≢-≡?-identity
```

* In `Relation.Nary`:
```agda
≟-mapₙ ↦ ≡?-mapₙ
Expand Down
2 changes: 1 addition & 1 deletion doc/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ word within a compound word is capitalized except for the first word.
where `R` is the underlying property being asserted to be `Decidable`,
moreover typically sharing the same fixity and precedence as `R`: thus
- `_≡?_` (at `infix 4`) for `DecidableEquality`
- `_≈?_` (ditto.) for the name of the general `IsDecEquivalence`
- `_≈?_` (ditto.) for the fieldname of the general `IsDecEquivalence`

* Any exceptions to these conventions should be flagged on the GitHub
`agda-stdlib` issue tracker in the usual way.
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Bool/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ true ≤? true = yes b≤b
≤-isDecTotalOrder : IsDecTotalOrder _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down
4 changes: 2 additions & 2 deletions src/Data/Char/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ _≤?_ = Refl.decidable <-cmp
≤-isDecPartialOrder : IsDecPartialOrder _≡_ _≤_
≤-isDecPartialOrder = record
{ isPartialOrder = ≤-isPartialOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down Expand Up @@ -245,7 +245,7 @@ x ≈? y = toℕ x ℕ.≡? toℕ y
≈-isDecEquivalence : IsDecEquivalence _≈_
≈-isDecEquivalence = record
{ isEquivalence = ≈-isEquivalence
; _≟_ = _≈?_
; _≈?_ = _≈?_
}
≈-decSetoid : DecSetoid _ _
≈-decSetoid = record
Expand Down
6 changes: 3 additions & 3 deletions src/Data/Fin/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ suc x ≡? suc y = map′ (cong suc) suc-injective (x ≡? y)
≡-isDecEquivalence : IsDecEquivalence {A = Fin n} _≡_
≡-isDecEquivalence = record
{ isEquivalence = ≡.isEquivalence
; _≟_ = _≡?_
; _≈?_ = _≡?_
}

------------------------------------------------------------------------
Expand Down Expand Up @@ -356,7 +356,7 @@ m <? n = suc (toℕ m) ℕ.≤? toℕ n
≤-isDecTotalOrder : IsDecTotalOrder {A = Fin n} _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down Expand Up @@ -1198,7 +1198,7 @@ module _ {ℓ} {S : Setoid a ℓ} (inj : Injection S (≡-setoid n)) where
inj⇒decSetoid = record
{ isDecEquivalence = record
{ isEquivalence = isEquivalence
; __ = inj⇒≡?
; _≈?_ = inj⇒≡?
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Fin/Subset/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ module _ (n : ℕ) where
⊂-isDecStrictPartialOrder : IsDecStrictPartialOrder {A = Subset n} _≡_ _⊂_
⊂-isDecStrictPartialOrder = record
{ isStrictPartialOrder = ⊂-isStrictPartialOrder
; _≟_ = ≡-dec _≡?_
; _≈?_ = ≡-dec _≡?_
; _<?_ = _⊂?_
}

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Float/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ _≈?_ = On.decidable (Maybe.map Word64.toℕ ∘ toWord64) _≡_ (Maybe.≡-dec
≈-isDecEquivalence : IsDecEquivalence _≈_
≈-isDecEquivalence = record
{ isEquivalence = ≈-isEquivalence
; _≟_ = _≈?_
; _≈?_ = _≈?_
}

≈-decSetoid : DecSetoid _ _
Expand Down
3 changes: 1 addition & 2 deletions src/Data/Integer/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ _≤?_ : Decidable _≤_
≤-isDecTotalOrder : IsDecTotalOrder _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down Expand Up @@ -2404,4 +2404,3 @@ _≟_ = _≡?_
"Warning: _≟_ was deprecated in v2.4.
Please use _≡?_ instead."
#-}

Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ isPartialOrder po = record
isDecPartialOrder : IsDecPartialOrder R S → IsDecPartialOrder (Pointwise R) (Infix S)
isDecPartialOrder dpo = record
{ isPartialOrder = isPartialOrder DPO.isPartialOrder
; _≟_ = Pointwise.decidable DPO._≈?_
; _≈?_ = Pointwise.decidable DPO._≈?_
; _≤?_ = infix? DPO._≤?_
} where module DPO = IsDecPartialOrder dpo
4 changes: 2 additions & 2 deletions src/Data/List/Relation/Binary/Lex/Strict.agda
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module _ {a ℓ₁ ℓ₂} {A : Set a} where
IsDecPartialOrder _≋_ _≤_
≤-isDecPartialOrder sto = record
{ isPartialOrder = ≤-isPartialOrder isStrictPartialOrder
; _≟_ = Pointwise.decidable _≈?_
; _≈?_ = Pointwise.decidable _≈?_
; _≤?_ = ≤-decidable _≈?_ _<?_
} where open IsStrictTotalOrder sto

Expand All @@ -218,7 +218,7 @@ module _ {a ℓ₁ ℓ₂} {A : Set a} where
IsDecTotalOrder _≋_ _≤_
≤-isDecTotalOrder sto = record
{ isTotalOrder = ≤-isTotalOrder sto
; _≟_ = Pointwise.decidable _≈?_
; _≈?_ = Pointwise.decidable _≈?_
; _≤?_ = ≤-decidable _≈?_ _<?_
}
where open IsStrictTotalOrder sto
Expand Down
2 changes: 1 addition & 1 deletion src/Data/List/Relation/Binary/Pointwise.agda
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ isEquivalence eq = record
isDecEquivalence : IsDecEquivalence R → IsDecEquivalence (Pointwise R)
isDecEquivalence eq = record
{ isEquivalence = isEquivalence DE.isEquivalence
; _≟_ = decidable DE._≈?_
; _≈?_ = decidable DE._≈?_
} where module DE = IsDecEquivalence eq

isPreorder : IsPreorder R S → IsPreorder (Pointwise R) (Pointwise S)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ isPartialOrder po = record
isDecPartialOrder : IsDecPartialOrder R S → IsDecPartialOrder (Pointwise R) (Prefix S)
isDecPartialOrder dpo = record
{ isPartialOrder = isPartialOrder DPO.isPartialOrder
; _≟_ = Pointwise.decidable DPO._≈?_
; _≈?_ = Pointwise.decidable DPO._≈?_
; _≤?_ = prefix? DPO._≤?_
} where module DPO = IsDecPartialOrder dpo
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ open DecSetoidSublist (decSetoid _≈?_) using (_⊆?_) public
⊆-isDecPartialOrder : IsDecPartialOrder _≡_ _⊆_
⊆-isDecPartialOrder = record
{ isPartialOrder = ⊆-isPartialOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _⊆?_
}

Expand Down
2 changes: 1 addition & 1 deletion src/Data/List/Relation/Binary/Sublist/DecSetoid.agda
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ _⊆?_ = HeterogeneousProperties.sublist? _≈?_
⊆-isDecPartialOrder : IsDecPartialOrder _≋_ _⊆_
⊆-isDecPartialOrder = record
{ isPartialOrder = ⊆-isPartialOrder
; _≟_ = _≋?_
; _≈?_ = _≋?_
; _≤?_ = _⊆?_
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ module _ {E : Rel A e} {R : Rel A r} where
IsDecPartialOrder (Pointwise E) (Sublist R)
isDecPartialOrder ER-isDecPartialOrder = record
{ isPartialOrder = isPartialOrder ER.isPartialOrder
; _≟_ = Pw.decidable ER._≈?_
; _≈?_ = Pw.decidable ER._≈?_
; _≤?_ = sublist? ER._≤?_
} where module ER = IsDecPartialOrder ER-isDecPartialOrder

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ isPartialOrder po = record
isDecPartialOrder : IsDecPartialOrder R S → IsDecPartialOrder (Pointwise R) (Suffix S)
isDecPartialOrder dpo = record
{ isPartialOrder = isPartialOrder DPO.isPartialOrder
; _≟_ = Pointwise.decidable DPO._≈?_
; _≈?_ = Pointwise.decidable DPO._≈?_
; _≤?_ = suffix? DPO._≤?_
} where module DPO = IsDecPartialOrder dpo
2 changes: 1 addition & 1 deletion src/Data/Maybe/Relation/Binary/Pointwise.agda
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ module _ {a r} {A : Set a} {R : Rel A r} where
isDecEquivalence : IsDecEquivalence R → IsDecEquivalence (Pointwise R)
isDecEquivalence R-isDecEquivalence = record
{ isEquivalence = isEquivalence R.isEquivalence
; _≟_ = dec R._≈?_
; _≈?_ = dec R._≈?_
} where module R = IsDecEquivalence R-isDecEquivalence

pointwise⊆any : ∀ {x} → Pointwise R (just x) ⊆ Any (R x)
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Nat/Binary/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ x ≤? y with <-cmp x y
≤-isDecTotalOrder : IsDecTotalOrder _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down
4 changes: 2 additions & 2 deletions src/Data/Nat/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ m ≡? n = map′ (≡ᵇ⇒≡ m n) (≡⇒≡ᵇ m n) (T? (m ≡ᵇ n))
≡-isDecEquivalence : IsDecEquivalence (_≡_ {A = ℕ})
≡-isDecEquivalence = record
{ isEquivalence = isEquivalence
; _≟_ = _≡?_
; _≈?_ = _≡?_
}

≡-decSetoid : DecSetoid 0ℓ 0ℓ
Expand Down Expand Up @@ -253,7 +253,7 @@ _≥?_ = flip _≤?_
≤-isDecTotalOrder : IsDecTotalOrder _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down
2 changes: 1 addition & 1 deletion src/Data/Product/Relation/Binary/Lex/NonStrict.agda
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ module _ {_≈₁_ : Rel A ℓ₁} {_≤₁_ : Rel A ℓ₂}
{ isTotalOrder = ×-isTotalOrder (_≟_ to₁)
(isTotalOrder to₁)
(isTotalOrder to₂)
; _≟_ = Pointwise.×-decidable (_≈?_ to₁) (_≈?_ to₂)
; _≈?_ = Pointwise.×-decidable (_≈?_ to₁) (_≈?_ to₂)
; _≤?_ = ×-decidable (_≈?_ to₁) (_≤?_ to₁) (_≤?_ to₂)
}
where open IsDecTotalOrder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ Pointwise R S (a , c) (b , d) = (R a b) × (S c d)
×-isDecEquivalence eq₁ eq₂ = record
{ isEquivalence = ×-isEquivalence
(isEquivalence eq₁) (isEquivalence eq₂)
; _≟_ = ×-decidable (_≈?_ eq₁) (_≈?_ eq₂)
; _≈?_ = ×-decidable (_≈?_ eq₁) (_≈?_ eq₂)
} where open IsDecEquivalence

×-isPreorder : IsPreorder ≈₁ R → IsPreorder ≈₂ S →
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Rational/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -600,7 +600,7 @@ _≥?_ = flip _≤?_
≤-isDecTotalOrder : IsDecTotalOrder _≡_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≤?_
}

Expand Down
4 changes: 2 additions & 2 deletions src/Data/Rational/Unnormalised/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≡? ↥ q ℤ.*
≃-isDecEquivalence : IsDecEquivalence _≃_
≃-isDecEquivalence = record
{ isEquivalence = ≃-isEquivalence
; _≟_ = _≃?_
; _≈?_ = _≃?_
}

≄-isApartnessRelation : IsApartnessRelation _≃_ _≄_
Expand Down Expand Up @@ -326,7 +326,7 @@ _≥?_ = flip _≤?_
≤-isDecTotalOrder : IsDecTotalOrder _≃_ _≤_
≤-isDecTotalOrder = record
{ isTotalOrder = ≤-isTotalOrder
; _≟_ = _≃?_
; _≈?_ = _≃?_
; _≤?_ = _≤?_
}

Expand Down
2 changes: 1 addition & 1 deletion src/Data/String/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ x ≈? y = Pointwise.decidable Char._≡?_ (toList x) (toList y)
≈-isDecEquivalence : IsDecEquivalence _≈_
≈-isDecEquivalence = record
{ isEquivalence = ≈-isEquivalence
; _≟_ = _≈?_
; _≈?_ = _≈?_
}

≈-decSetoid : DecSetoid _ _
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Sum/Relation/Binary/LeftOrder.agda
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂}
IsDecTotalOrder (Pointwise ≈₁ ≈₂) (∼₁ ⊎-< ∼₂)
⊎-<-isDecTotalOrder to₁ to₂ = record
{ isTotalOrder = ⊎-<-isTotalOrder (isTotalOrder to₁) (isTotalOrder to₂)
; _≟_ = PW.⊎-decidable (_≈?_ to₁) (_≈?_ to₂)
; _≈?_ = PW.⊎-decidable (_≈?_ to₁) (_≈?_ to₂)
; _≤?_ = ⊎-<-decidable (_≤?_ to₁) (_≤?_ to₂)
}
where open IsDecTotalOrder
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Sum/Relation/Binary/Pointwise.agda
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ drop-inj₂ (inj₂ x) = x
⊎-isDecEquivalence eq₁ eq₂ = record
{ isEquivalence =
⊎-isEquivalence (isEquivalence eq₁) (isEquivalence eq₂)
; _≟_ = ⊎-decidable (_≈?_ eq₁) (_≈?_ eq₂)
; _≈?_ = ⊎-decidable (_≈?_ eq₁) (_≈?_ eq₂)
} where open IsDecEquivalence

⊎-isPreorder : IsPreorder ≈₁ R → IsPreorder ≈₂ S →
Expand Down
2 changes: 1 addition & 1 deletion src/Data/Unit/Polymorphic/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ _ ≡? _ = yes refl
≡-isDecTotalOrder : ∀ ℓ → IsDecTotalOrder {ℓ} _≡_ _≡_
≡-isDecTotalOrder ℓ = record
{ isTotalOrder = ≡-isTotalOrder ℓ
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≡?_
}

Expand Down
3 changes: 1 addition & 2 deletions src/Data/Unit/Properties.agda
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ _ ≡? _ = yes refl
≡-isDecTotalOrder : IsDecTotalOrder _≡_ _≡_
≡-isDecTotalOrder = record
{ isTotalOrder = ≡-isTotalOrder
; _≟_ = _≡?_
; _≈?_ = _≡?_
; _≤?_ = _≡?_
}

Expand Down Expand Up @@ -111,4 +111,3 @@ _≟_ = _≡?_
"Warning: _≟_ was deprecated in v2.4.
Please use _≡?_ instead."
#-}

Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ module _ {R : Rel A ℓ} where
∀ n → IsDecEquivalence (Pointwise R {n})
isDecEquivalence isDecEq n = record
{ isEquivalence = isEquivalence Eq.isEquivalence n
; _≟_ = decidable Eq._≈?_
; _≈?_ = decidable Eq._≈?_
} where module Eq = IsDecEquivalence isDecEq

------------------------------------------------------------------------
Expand Down
Loading
Loading