Skip to content

Commit 3bda172

Browse files
authored
Change some dependencies to use the new function hierarchy (#1808)
1 parent f9429d6 commit 3bda172

File tree

9 files changed

+34
-28
lines changed

9 files changed

+34
-28
lines changed

CHANGELOG.md

+13
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ Non-backwards compatible changes
168168

169169
* The switch to the new function hierarchy is complete and the following definitions
170170
now use the new definitions instead of the old ones:
171+
* `Algebra.Lattice.Properties.BooleanAlgebra`
172+
* `Algebra.Properties.CommutativeMonoid.Sum`
173+
* `Algebra.Properties.Lattice`
174+
* `replace-equality`
171175
* `Data.Fin.Properties`
172176
* `∀-cons-⇔`
173177
* `⊎⇔∃`
@@ -186,6 +190,7 @@ Non-backwards compatible changes
186190
* `empty`
187191
* `Data.List.Fresh.Relation.Unary.Any`
188192
* `⊎⇔Any`
193+
* `Data.List.NonEmpty`
189194
* `Data.List.Relation.Binary.Lex`
190195
* `[]<[]-⇔`
191196
* `∷<∷-⇔`
@@ -197,6 +202,7 @@ Non-backwards compatible changes
197202
* `∷⁻¹`
198203
* `∷ʳ⁻¹`
199204
* `[x]⊆xs⤖x∈xs`
205+
* `Data.List.Relation.Unary.Grouped.Properties`
200206
* `Data.Maybe.Relation.Binary.Connected`
201207
* `just-equivalence`
202208
* `Data.Maybe.Relation.Binary.Pointwise`
@@ -209,6 +215,9 @@ Non-backwards compatible changes
209215
* `m%n≡0⇔n∣m`
210216
* `Data.Nat.Properties`
211217
* `eq?`
218+
* `Data.Vec.N-ary`
219+
* `uncurry-∀ⁿ`
220+
* `uncurry-∃ⁿ`
212221
* `Data.Vec.Relation.Binary.Lex.Core`
213222
* `P⇔[]<[]`
214223
* `∷<∷-⇔`
@@ -217,10 +226,14 @@ Non-backwards compatible changes
217226
* `Pointwise-≡↔≡`
218227
* `Data.Vec.Relation.Binary.Pointwise.Inductive`
219228
* `Pointwise-≡↔≡`
229+
* `Effect.Monad.Partiality`
230+
* `correct`
220231
* `Relation.Binary.Construct.Closure.Reflexive.Properties`
221232
* `⊎⇔Refl`
222233
* `Relation.Binary.Construct.Closure.Transitive`
223234
* `equivalent`
235+
* `Relation.Binary.Reflection`
236+
* `solve₁`
224237
* `Relation.Nullary.Decidable`
225238
* `map`
226239

src/Algebra/Lattice/Properties/BooleanAlgebra.agda

+1-2
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,7 @@ open import Algebra.Lattice.Structures _≈_
2424
open import Relation.Binary.Reasoning.Setoid setoid
2525
open import Relation.Binary
2626
open import Function.Base
27-
open import Function.Equality using (_⟨$⟩_)
28-
open import Function.Equivalence using (_⇔_; module Equivalence)
27+
open import Function.Bundles using (_⇔_; module Equivalence)
2928
open import Data.Product using (_,_)
3029

3130
------------------------------------------------------------------------

src/Algebra/Properties/CommutativeMonoid/Sum.agda

-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ open import Data.Fin.Permutation as Perm using (Permutation; _⟨$⟩ˡ_; _⟨$
1414
open import Data.Fin.Patterns using (0F)
1515
open import Data.Vec.Functional
1616
open import Function.Base using (_∘_)
17-
open import Function.Equality using (_⟨$⟩_)
1817
open import Relation.Binary.PropositionalEquality as P using (_≡_)
1918
open import Relation.Nullary.Negation using (contradiction)
2019

src/Algebra/Properties/Lattice.agda

+12-13
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
open import Algebra.Lattice.Bundles
1111
open import Relation.Binary
1212
open import Function.Base
13-
open import Function.Equality using (_⟨$⟩_)
14-
open import Function.Equivalence using (_⇔_; module Equivalence)
13+
open import Function.Bundles using (module Equivalence; _⇔_)
1514
open import Data.Product using (_,_; swap)
1615

1716
module Algebra.Properties.Lattice {l₁ l₂} (L : Lattice l₁ l₂) where
@@ -39,18 +38,18 @@ replace-equality : {_≈′_ : Rel Carrier l₂} →
3938
replace-equality {_≈′_} ≈⇔≈′ = record
4039
{ isLattice = record
4140
{ isEquivalence = record
42-
{ refl = to ⟨$⟩ refl
43-
; sym = λ x≈y to ⟨$⟩ sym (from ⟨$⟩ x≈y)
44-
; trans = λ x≈y y≈z to ⟨$⟩ trans (from ⟨$⟩ x≈y) (from ⟨$⟩ y≈z)
41+
{ refl = to refl
42+
; sym = λ x≈y to (sym (from x≈y))
43+
; trans = λ x≈y y≈z to (trans (from x≈y) (from y≈z))
4544
}
46-
; ∨-comm = λ x y to ⟨$⟩ ∨-comm x y
47-
; ∨-assoc = λ x y z to ⟨$⟩ ∨-assoc x y z
48-
; ∨-cong = λ x≈y u≈v to ⟨$⟩ ∨-cong (from ⟨$⟩ x≈y) (from ⟨$⟩ u≈v)
49-
; ∧-comm = λ x y to ⟨$⟩ ∧-comm x y
50-
; ∧-assoc = λ x y z to ⟨$⟩ ∧-assoc x y z
51-
; ∧-cong = λ x≈y u≈v to ⟨$⟩ ∧-cong (from ⟨$⟩ x≈y) (from ⟨$⟩ u≈v)
52-
; absorptive = (λ x y to ⟨$⟩ ∨-absorbs-∧ x y)
53-
, (λ x y to ⟨$⟩ ∧-absorbs-∨ x y)
45+
; ∨-comm = λ x y to (∨-comm x y)
46+
; ∨-assoc = λ x y z to (∨-assoc x y z)
47+
; ∨-cong = λ x≈y u≈v to (∨-cong (from x≈y) (from u≈v))
48+
; ∧-comm = λ x y to (∧-comm x y)
49+
; ∧-assoc = λ x y z to (∧-assoc x y z)
50+
; ∧-cong = λ x≈y u≈v to (∧-cong (from x≈y) (from u≈v))
51+
; absorptive = (λ x y to (∨-absorbs-∧ x y))
52+
, (λ x y to (∧-absorbs-∨ x y))
5453
}
5554
} where open module E {x y} = Equivalence (≈⇔≈′ {x} {y})
5655
{-# WARNING_ON_USAGE replace-equality

src/Data/List/NonEmpty.agda

+1-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,7 @@ open import Data.These.Base as These using (These; this; that; these)
2121
open import Data.Unit.Base using (tt)
2222
open import Data.Vec.Base as Vec using (Vec; []; _∷_)
2323
open import Function.Base
24-
open import Function.Equality using (_⟨$⟩_)
25-
open import Function.Equivalence
26-
using () renaming (module Equivalence to Eq)
24+
open import Function.Bundles using () renaming (module Equivalence to Eq)
2725
open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_; refl)
2826
open import Relation.Nullary.Decidable using (isYes)
2927

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

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import Data.List.Relation.Unary.All.Properties as All
1515
open import Data.List.Relation.Unary.AllPairs as AllPairs using (AllPairs; []; _∷_)
1616
open import Data.List.Relation.Unary.Grouped
1717
open import Function using (_∘_; _⇔_; Equivalence)
18-
open import Function.Equality using (_⟨$⟩_)
1918
open import Relation.Binary as B using (REL; Rel)
2019
open import Relation.Unary as U using (Pred)
2120
open import Relation.Nullary using (¬_; does; yes; no)

src/Data/Vec/N-ary.agda

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ open import Data.Nat.Base hiding (_⊔_)
1414
open import Data.Product as Prod
1515
open import Data.Vec.Base
1616
open import Function.Base
17-
open import Function.Equivalence using (_⇔_; equivalence)
17+
open import Function.Bundles using (_⇔_; mk⇔)
1818
open import Level using (Level; _⊔_)
1919
open import Relation.Binary hiding (_⇔_)
2020
open import Relation.Binary.PropositionalEquality
@@ -104,7 +104,7 @@ right-inverse (suc n) f = λ x → right-inverse n (f x)
104104

105105
uncurry-∀ⁿ : n {P : N-ary n A (Set ℓ)}
106106
∀ⁿ n P ⇔ ( (xs : Vec A n) P $ⁿ xs)
107-
uncurry-∀ⁿ {a} {A} {ℓ} n = equivalence (⇒ n) (⇐ n)
107+
uncurry-∀ⁿ {a} {A} {ℓ} n = mk⇔ (⇒ n) (⇐ n)
108108
where
109109
: n {P : N-ary n A (Set ℓ)}
110110
∀ⁿ n P ( (xs : Vec A n) P $ⁿ xs)
@@ -120,7 +120,7 @@ uncurry-∀ⁿ {a} {A} {ℓ} n = equivalence (⇒ n) (⇐ n)
120120

121121
uncurry-∃ⁿ : n {P : N-ary n A (Set ℓ)}
122122
∃ⁿ n P ⇔ (∃ λ (xs : Vec A n) P $ⁿ xs)
123-
uncurry-∃ⁿ {a} {A} {ℓ} n = equivalence (⇒ n) (⇐ n)
123+
uncurry-∃ⁿ {a} {A} {ℓ} n = mk⇔ (⇒ n) (⇐ n)
124124
where
125125
: n {P : N-ary n A (Set ℓ)}
126126
∃ⁿ n P (∃ λ (xs : Vec A n) P $ⁿ xs)

src/Effect/Monad/Partiality.agda

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ open import Data.Nat using (ℕ; zero; suc; _+_)
1515
open import Data.Product as Prod hiding (map)
1616
open import Data.Sum.Base using (_⊎_; inj₁; inj₂)
1717
open import Function.Base
18-
open import Function.Equivalence using (_⇔_; equivalence)
18+
open import Function.Bundles using (_⇔_; mk⇔)
1919
open import Level using (Level; _⊔_)
2020
open import Relation.Binary as B hiding (Rel; _⇔_)
2121
import Relation.Binary.Properties.Setoid as SetoidProperties
@@ -875,7 +875,7 @@ module AlternativeEquality {a ℓ} where
875875
-- equivalence).
876876

877877
correct : {S k x y} RelP S k x y ⇔ Rel (Eq S) k x y
878-
correct = equivalence sound complete
878+
correct = mk⇔ sound complete
879879

880880
------------------------------------------------------------------------
881881
-- Another lemma

src/Relation/Binary/Reflection.agda

+2-3
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ open import Data.Fin.Base
1111
open import Data.Nat.Base
1212
open import Data.Vec.Base as Vec
1313
open import Function.Base
14-
open import Function.Equality using (_⟨$⟩_)
15-
open import Function.Equivalence using (module Equivalence)
14+
open import Function.Bundles using (module Equivalence)
1615
open import Level
1716
open import Relation.Binary
1817
import Relation.Binary.PropositionalEquality as P
@@ -91,7 +90,7 @@ solve₁ : ∀ n (f : N-ary n (Expr n) (Expr n × Expr n)) →
9190
⟦ proj₁ (close n f) ⇓⟧ ρ ≈ ⟦ proj₂ (close n f) ⇓⟧ ρ
9291
⟦ proj₁ (close n f) ⟧ ρ ≈ ⟦ proj₂ (close n f) ⟧ ρ)
9392
solve₁ n f =
94-
Equivalence.from (uncurry-∀ⁿ n) ⟨$⟩ λ ρ
93+
Equivalence.from (uncurry-∀ⁿ n) λ ρ
9594
P.subst id (P.sym (left-inverse (λ _ _ ≈ _ _ ≈ _) ρ))
9695
(prove ρ (proj₁ (close n f)) (proj₂ (close n f)))
9796

0 commit comments

Comments
 (0)