File tree 3 files changed +15
-12
lines changed
Product/Relation/Binary/Pointwise
Vec/Functional/Relation/Binary/Pointwise
3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ Other major improvements
36
36
37
37
Minor improvements
38
38
------------------
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 ` .
42
47
43
48
Deprecated modules
44
49
------------------
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ module Data.Product.Relation.Binary.Pointwise.NonDependent where
11
11
open import Data.Product.Base as Product
12
12
open import Data.Sum.Base using (inj₁; inj₂)
13
13
open import Level using (Level; _⊔_; 0ℓ)
14
- open import Function.Base using (_on_; id)
14
+ open import Function.Base using (id)
15
15
open import Function.Bundles using (Inverse)
16
16
open import Relation.Nullary.Decidable using (_×-dec_)
17
- open import Relation.Binary.Core using (Rel; _⇒_)
17
+ open import Relation.Binary.Core using (REL; Rel; _⇒_)
18
18
open import Relation.Binary.Bundles
19
19
using (Setoid; DecSetoid; Preorder; Poset; StrictPartialOrder)
20
20
open import Relation.Binary.Definitions
@@ -25,14 +25,14 @@ import Relation.Binary.PropositionalEquality.Properties as ≡
25
25
private
26
26
variable
27
27
a b ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Level
28
- A B : Set a
28
+ A B C D : Set a
29
29
R S ≈₁ ≈₂ : Rel A ℓ₁
30
30
31
31
------------------------------------------------------------------------
32
32
-- Definition
33
33
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 )
36
36
37
37
------------------------------------------------------------------------
38
38
-- Pointwise preserves many relational properties
Original file line number Diff line number Diff line change @@ -172,12 +172,10 @@ module _ {R : REL A B r} {S : REL A′ B′ s} {T : REL A″ B″ t} where
172
172
module _ {R : REL A B r} {S : REL A′ B′ s} {n xs ys xs′ ys′} where
173
173
174
174
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′)
177
176
zip⁺ rs ss i = rs i , ss i
178
177
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′) →
181
179
Pointwise R xs ys × Pointwise S xs′ ys′
182
180
zip⁻ rss = proj₁ ∘ rss , proj₂ ∘ rss
183
181
You can’t perform that action at this time.
0 commit comments