Skip to content

Commit da62f21

Browse files
committed
refactor: more knock-ons
1 parent 880eeaa commit da62f21

File tree

14 files changed

+28
-28
lines changed

14 files changed

+28
-28
lines changed

src/Data/Fin/Subset/Properties.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ open import Relation.Binary.PropositionalEquality.Core
4646
using (_≡_; refl; cong; cong₂; subst; _≢_; sym)
4747
open import Relation.Binary.PropositionalEquality.Properties
4848
using (module ≡-Reasoning; isEquivalence)
49-
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _⊎-dec_)
49+
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _⊎?_)
5050
open import Relation.Nullary.Negation using (contradiction)
5151
open import Relation.Unary using (Pred; Decidable; Satisfiable)
5252

@@ -879,7 +879,7 @@ module _ {P : Pred (Subset (suc n)) ℓ} where
879879
anySubset? : {P : Pred (Subset n) ℓ} Decidable P Dec ∃⟨ P ⟩
880880
anySubset? {n = zero} P? = Dec.map ∃-Subset-[]-⇔ (P? [])
881881
anySubset? {n = suc n} P? = Dec.map ∃-Subset-∷-⇔
882-
(anySubset? (P? ∘ (inside ∷_)) ⊎-dec anySubset? (P? ∘ (outside ∷_)))
882+
(anySubset? (P? ∘ (inside ∷_)) ⊎? anySubset? (P? ∘ (outside ∷_)))
883883

884884

885885

src/Data/List/Fresh/Relation/Unary/All.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ open import Data.Product.Base using (_×_; _,_; proj₁; uncurry)
1414
open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]′)
1515
open import Function.Base using (_∘_; _$_)
1616
open import Level using (Level; _⊔_; Lift)
17-
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×-dec_)
17+
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×?_)
1818
open import Relation.Unary as U
1919
using (Pred; IUniversal; Universal; Decidable; _⇒_; _∪_; _∩_)
2020
open import Relation.Binary.Core using (Rel)
@@ -67,7 +67,7 @@ module _ {R : Rel A r} {P : Pred A p} (P? : Decidable P) where
6767

6868
all? : (xs : List# A R) Dec (All P xs)
6969
all? [] = yes []
70-
all? (x ∷# xs) = Dec.map′ (uncurry _∷_) uncons (P? x ×-dec all? xs)
70+
all? (x ∷# xs) = Dec.map′ (uncurry _∷_) uncons (P? x ×? all? xs)
7171

7272
------------------------------------------------------------------------
7373
-- Generalised decidability procedure

src/Data/List/Fresh/Relation/Unary/Any.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ open import Data.Sum.Base using (_⊎_; [_,_]′; inj₁; inj₂)
1515
open import Function.Bundles using (_⇔_; mk⇔)
1616
open import Level using (Level; _⊔_; Lift)
1717
open import Relation.Nullary.Negation using (¬_; contradiction)
18-
open import Relation.Nullary.Decidable as Dec using (Dec; no; _⊎-dec_)
18+
open import Relation.Nullary.Decidable as Dec using (Dec; no; _⊎?_)
1919
open import Relation.Unary as U using (Pred; IUniversal; Universal; Decidable; _⇒_; _∪_; _∩_)
2020
open import Relation.Binary.Core using (Rel)
2121

@@ -78,4 +78,4 @@ module _ {R : Rel A r} {P : Pred A p} (P? : Decidable P) where
7878

7979
any? : (xs : List# A R) Dec (Any P xs)
8080
any? [] = no (λ ())
81-
any? (x ∷# xs) = Dec.map ⊎⇔Any (P? x ⊎-dec any? xs)
81+
any? (x ∷# xs) = Dec.map ⊎⇔Any (P? x ⊎? any? xs)

src/Data/List/Relation/Unary/Grouped.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ open import Relation.Binary.Core using (REL; Rel)
1616
open import Relation.Binary.Definitions as B
1717
open import Relation.Unary as U using (Pred)
1818
open import Relation.Nullary.Negation using (¬_)
19-
open import Relation.Nullary.Decidable as Dec using (yes; ¬?; _⊎-dec_; _×-dec_)
19+
open import Relation.Nullary.Decidable as Dec using (yes; ¬?; _⊎?_; _×?_)
2020
open import Level using (Level; _⊔_)
2121

2222
private
@@ -45,7 +45,7 @@ module _ {_≈_ : Rel A ℓ} where
4545
grouped? _≟_ [] = yes []
4646
grouped? _≟_ (x ∷ []) = yes ([] ∷≉ [])
4747
grouped? _≟_ (x ∷ y ∷ xs) =
48-
Dec.map′ from to ((x ≟ y ⊎-dec all? (λ z ¬? (x ≟ z)) (y ∷ xs)) ×-dec (grouped? _≟_ (y ∷ xs)))
48+
Dec.map′ from to ((x ≟ y ⊎? all? (λ z ¬? (x ≟ z)) (y ∷ xs)) ×? (grouped? _≟_ (y ∷ xs)))
4949
where
5050
from : ((x ≈ y) ⊎ All (λ z ¬ (x ≈ z)) (y ∷ xs)) × Grouped _≈_ (y ∷ xs) Grouped _≈_ (x ∷ y ∷ xs)
5151
from (inj₁ x≈y , grouped[y∷xs]) = x≈y ∷≈ grouped[y∷xs]

src/Data/These/Properties.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ open import Function.Base using (_∘_)
1414
open import Relation.Binary.Definitions using (DecidableEquality)
1515
open import Relation.Binary.PropositionalEquality.Core
1616
using (_≡_; refl; cong; cong₂)
17-
open import Relation.Nullary.Decidable using (yes; no; map′; _×-dec_)
17+
open import Relation.Nullary.Decidable using (yes; no; map′; _×?_)
1818

1919
------------------------------------------------------------------------
2020
-- Equality
@@ -48,4 +48,4 @@ module _ {a b} {A : Set a} {B : Set b} where
4848
≡-dec dec₁ dec₂ (these x a) (this y) = no λ()
4949
≡-dec dec₁ dec₂ (these x a) (that y) = no λ()
5050
≡-dec dec₁ dec₂ (these x a) (these y b) =
51-
map′ (uncurry (cong₂ these)) these-injective (dec₁ x y ×-dec dec₂ a b)
51+
map′ (uncurry (cong₂ these)) these-injective (dec₁ x y ×? dec₂ a b)

src/Data/Tree/AVL/Indexed/Relation/Unary/All.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ open import Function.Base using (flip; _∘_; const)
2020
open import Function.Nary.NonDependent using (congₙ)
2121
open import Level using (Level; _⊔_)
2222
open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl)
23-
open import Relation.Nullary.Decidable.Core using (Dec; yes; map′; _×-dec_)
23+
open import Relation.Nullary.Decidable.Core using (Dec; yes; map′; _×?_)
2424
open import Relation.Unary using (Pred; Decidable; Universal; Irrelevant; _⊆_; _∪_)
2525

2626
open StrictTotalOrder strictTotalOrder renaming (Carrier to Key)
@@ -80,7 +80,7 @@ unnode (node p l r) = p , l , r
8080
all? : Decidable P (t : Tree V l u n) Dec (All P t)
8181
all? p? (leaf l<u) = yes leaf
8282
all? p? (node kv l r bal) = map′ (uncurryₙ 3 node) unnode
83-
(p? kv ×-dec all? p? l ×-dec all? p? r)
83+
(p? kv ×? all? p? l ×? all? p? r)
8484

8585
universal : Universal P (t : Tree V l u n) All P t
8686
universal u (leaf l<u) = leaf

src/Data/Tree/AVL/Indexed/Relation/Unary/Any.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ open import Data.Product.Base using (_,_; ∃; -,_; proj₁; proj₂)
1717
open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]′)
1818
open import Function.Base using (_∘′_; _∘_)
1919
open import Level using (Level; _⊔_)
20-
open import Relation.Nullary.Decidable.Core using (Dec; no; map′; _⊎-dec_)
20+
open import Relation.Nullary.Decidable.Core using (Dec; no; map′; _⊎?_)
2121
open import Relation.Unary
2222

2323
open StrictTotalOrder strictTotalOrder renaming (Carrier to Key)
@@ -107,7 +107,7 @@ module _ {hˡ hʳ h} {kv : K& V}
107107
any? : Decidable P (t : Tree V l u n) Dec (Any P t)
108108
any? P? (leaf _) = no λ ()
109109
any? P? (node kv l r bal) = map′ fromSum toSum
110-
(P? kv ⊎-dec any? P? l ⊎-dec any? P? r)
110+
(P? kv ⊎? any? P? l ⊎? any? P? r)
111111

112112
satisfiable : {k l u} l <⁺ [ k ] [ k ] <⁺ u
113113
Satisfiable (P ∘ (k ,_))

src/Data/Vec/Functional/Properties.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ open import Relation.Binary.PropositionalEquality.Core
2828
open import Relation.Binary.PropositionalEquality.Properties
2929
using (module ≡-Reasoning)
3030
open import Relation.Nullary.Decidable
31-
using (Dec; does; yes; no; map′; _×-dec_)
31+
using (Dec; does; yes; no; map′; _×?_)
3232
open import Relation.Nullary.Negation using (contradiction)
3333

3434
import Data.Fin.Properties as Finₚ
@@ -54,7 +54,7 @@ module _ {xs ys : Vector A (suc n)} where
5454
≗-dec {n = zero} _≟_ xs ys = yes λ ()
5555
≗-dec {n = suc n} _≟_ xs ys =
5656
map′ (Product.uncurry ∷-cong) ∷-injective
57-
(head xs ≟ head ys ×-dec ≗-dec _≟_ (tail xs) (tail ys))
57+
(head xs ≟ head ys ×? ≗-dec _≟_ (tail xs) (tail ys))
5858

5959
------------------------------------------------------------------------
6060
-- updateAt

src/Data/Vec/Relation/Binary/Lex/Core.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ open import Relation.Binary.Structures using (IsPartialEquivalence)
2525
open import Relation.Binary.PropositionalEquality.Core as ≡
2626
using (_≡_; refl; cong)
2727
import Relation.Nullary as Nullary
28-
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×-dec_; _⊎-dec_)
28+
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×?_; _⊎?_)
2929
open import Relation.Nullary.Negation.Core using (¬_; contradiction)
3030

3131
private
@@ -138,7 +138,7 @@ module _ {P : Set} {_≈_ : Rel A ℓ₁} {_≺_ : Rel A ℓ₂} where
138138
decidable : {m n} Decidable (_<ₗₑₓ_ {m} {n})
139139
decidable {m} {n} xs ys with m ℕ.≟ n
140140
decidable {_} {_} [] [] | yes refl = Dec.map P⇔[]<[] P?
141-
decidable {_} {_} (x ∷ xs) (y ∷ ys) | yes refl = Dec.map ∷<∷-⇔ ((x ≺? y) ⊎-dec (x ≈? y) ×-dec (decidable xs ys))
141+
decidable {_} {_} (x ∷ xs) (y ∷ ys) | yes refl = Dec.map ∷<∷-⇔ ((x ≺? y) ⊎? (x ≈? y) ×? (decidable xs ys))
142142
decidable {_} {_} _ _ | no m≢n = no (λ xs<ys contradiction (length-equal xs<ys) m≢n)
143143

144144
module _ (P-irrel : Nullary.Irrelevant P)

src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ open import Relation.Binary.Structures
2525
open import Relation.Binary.Definitions
2626
using (Trans; Decidable; Reflexive; Sym)
2727
open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_)
28-
open import Relation.Nullary.Decidable using (yes; no; _×-dec_; map′)
28+
open import Relation.Nullary.Decidable using (yes; no; _×?_; map′)
2929
open import Relation.Unary using (Pred)
3030

3131
private
@@ -111,7 +111,7 @@ decidable dec [] [] = yes []
111111
decidable dec [] (y ∷ ys) = no λ()
112112
decidable dec (x ∷ xs) [] = no λ()
113113
decidable dec (x ∷ xs) (y ∷ ys) =
114-
map′ (uncurry _∷_) uncons (dec x y ×-dec decidable dec xs ys)
114+
map′ (uncurry _∷_) uncons (dec x y ×? decidable dec xs ys)
115115

116116
------------------------------------------------------------------------
117117
-- Structures

0 commit comments

Comments
 (0)