@@ -12,14 +12,12 @@ module Relation.Binary.Definitions where
1212
1313open import Agda.Builtin.Equality using (_≡_)
1414
15- open import Data.Maybe.Base using (Maybe)
1615open import Data.Product.Base using (_×_; ∃-syntax)
1716open import Data.Sum.Base using (_⊎_)
1817open import Function.Base using (_on_; flip)
1918open import Level
2019open import Relation.Binary.Core
21- open import Relation.Nullary.Decidable.Core using (Dec)
22- open import Relation.Nullary.Negation.Core using (¬_)
20+ open import Relation.Nullary as Nullary using (¬_; Dec)
2321
2422private
2523 variable
@@ -206,35 +204,40 @@ P Respects₂ _∼_ = (P Respectsʳ _∼_) × (P Respectsˡ _∼_)
206204Substitutive : Rel A ℓ₁ → (ℓ₂ : Level) → Set _
207205Substitutive {A = A} _∼_ p = (P : A → Set p) → P Respects _∼_
208206
209- -- Decidability - it is possible to determine whether a given pair of
210- -- elements are related .
207+ -- Irrelevancy - all proofs that a given pair of elements are related
208+ -- are indistinguishable .
211209
212- Decidable : REL A B ℓ → Set _
213- Decidable _∼_ = ∀ x y → Dec (x ∼ y)
210+ Irrelevant : REL A B ℓ → Set _
211+ Irrelevant _∼_ = ∀ {x y} → Nullary.Irrelevant (x ∼ y)
212+
213+ -- Recomputability - we can rebuild a relevant proof given an
214+ -- irrelevant one.
215+
216+ Recomputable : REL A B ℓ → Set _
217+ Recomputable _∼_ = ∀ {x y} → Nullary.Recomputable (x ∼ y)
218+
219+ -- Stability
220+
221+ Stable : REL A B ℓ → Set _
222+ Stable _∼_ = ∀ x y → Nullary.Stable (x ∼ y)
214223
215224-- Weak decidability - it is sometimes possible to determine if a given
216225-- pair of elements are related.
217226
218227WeaklyDecidable : REL A B ℓ → Set _
219- WeaklyDecidable _∼_ = ∀ x y → Maybe (x ∼ y)
228+ WeaklyDecidable _∼_ = ∀ x y → Nullary.WeaklyDecidable (x ∼ y)
229+
230+ -- Decidability - it is possible to determine whether a given pair of
231+ -- elements are related.
232+
233+ Decidable : REL A B ℓ → Set _
234+ Decidable _∼_ = ∀ x y → Dec (x ∼ y)
220235
221236-- Propositional equality is decidable for the type.
222237
223238DecidableEquality : (A : Set a) → Set _
224239DecidableEquality A = Decidable {A = A} _≡_
225240
226- -- Irrelevancy - all proofs that a given pair of elements are related
227- -- are indistinguishable.
228-
229- Irrelevant : REL A B ℓ → Set _
230- Irrelevant _∼_ = ∀ {x y} (a b : x ∼ y) → a ≡ b
231-
232- -- Recomputability - we can rebuild a relevant proof given an
233- -- irrelevant one.
234-
235- Recomputable : REL A B ℓ → Set _
236- Recomputable _∼_ = ∀ {x y} → .(x ∼ y) → x ∼ y
237-
238241-- Universal - all pairs of elements are related
239242
240243Universal : REL A B ℓ → Set _
0 commit comments