Skip to content

Commit b822650

Browse files
authored
fixes #906 (#2401)
1 parent c719430 commit b822650

File tree

3 files changed

+15
-12
lines changed

3 files changed

+15
-12
lines changed

CHANGELOG.md

+8-3
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,14 @@ Other major improvements
3636

3737
Minor improvements
3838
------------------
39-
The size of the dependency graph for many modules has been
40-
reduced. This may lead to speed ups for first-time loading of some
41-
modules.
39+
40+
* The size of the dependency graph for many modules has been
41+
reduced. This may lead to speed ups for first-time loading of some
42+
modules.
43+
44+
* The definition of the `Pointwise` relational combinator in
45+
`Data.Product.Relation.Binary.Pointwise.NonDependent.Pointwise`
46+
has been generalised to take heterogeneous arguments in `REL`.
4247

4348
Deprecated modules
4449
------------------

src/Data/Product/Relation/Binary/Pointwise/NonDependent.agda

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ module Data.Product.Relation.Binary.Pointwise.NonDependent where
1111
open import Data.Product.Base as Product
1212
open import Data.Sum.Base using (inj₁; inj₂)
1313
open import Level using (Level; _⊔_; 0ℓ)
14-
open import Function.Base using (_on_; id)
14+
open import Function.Base using (id)
1515
open import Function.Bundles using (Inverse)
1616
open import Relation.Nullary.Decidable using (_×-dec_)
17-
open import Relation.Binary.Core using (Rel; _⇒_)
17+
open import Relation.Binary.Core using (REL; Rel; _⇒_)
1818
open import Relation.Binary.Bundles
1919
using (Setoid; DecSetoid; Preorder; Poset; StrictPartialOrder)
2020
open import Relation.Binary.Definitions
@@ -25,14 +25,14 @@ import Relation.Binary.PropositionalEquality.Properties as ≡
2525
private
2626
variable
2727
a b ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Level
28-
A B : Set a
28+
A B C D : Set a
2929
R S ≈₁ ≈₂ : Rel A ℓ₁
3030

3131
------------------------------------------------------------------------
3232
-- Definition
3333

34-
Pointwise : Rel A ℓ₁ Rel B ℓ₂ Rel (A × B) (ℓ₁ ⊔ ℓ₂)
35-
Pointwise R S = (R on proj₁) -×- (S on proj₂)
34+
Pointwise : REL A B ℓ₁ REL C D ℓ₂ REL (A × C) (B × D) (ℓ₁ ⊔ ℓ₂)
35+
Pointwise R S (a , c) (b , d) = (R a b) × (S c d)
3636

3737
------------------------------------------------------------------------
3838
-- Pointwise preserves many relational properties

src/Data/Vec/Functional/Relation/Binary/Pointwise/Properties.agda

+2-4
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,10 @@ module _ {R : REL A B r} {S : REL A′ B′ s} {T : REL A″ B″ t} where
172172
module _ {R : REL A B r} {S : REL A′ B′ s} {n xs ys xs′ ys′} where
173173

174174
zip⁺ : Pointwise R xs ys Pointwise S xs′ ys′
175-
Pointwise (λ xx yy R (proj₁ xx) (proj₁ yy) × S (proj₂ xx) (proj₂ yy))
176-
(zip xs xs′) (zip {n = n} ys ys′)
175+
Pointwise (×-Pointwise R S) (zip xs xs′) (zip {n = n} ys ys′)
177176
zip⁺ rs ss i = rs i , ss i
178177

179-
zip⁻ : Pointwise (λ xx yy R (proj₁ xx) (proj₁ yy) × S (proj₂ xx) (proj₂ yy))
180-
(zip xs xs′) (zip {n = n} ys ys′)
178+
zip⁻ : Pointwise (×-Pointwise R S) (zip xs xs′) (zip {n = n} ys ys′)
181179
Pointwise R xs ys × Pointwise S xs′ ys′
182180
zip⁻ rss = proj₁ ∘ rss , proj₂ ∘ rss
183181

0 commit comments

Comments
 (0)