File tree Expand file tree Collapse file tree 3 files changed +15
-12
lines changed
Product/Relation/Binary/Pointwise
Vec/Functional/Relation/Binary/Pointwise Expand file tree Collapse file tree 3 files changed +15
-12
lines changed Original file line number Diff line number Diff line change @@ -36,9 +36,14 @@ Other major improvements
3636
3737Minor 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
4348Deprecated modules
4449------------------
Original file line number Diff line number Diff line change @@ -11,10 +11,10 @@ module Data.Product.Relation.Binary.Pointwise.NonDependent where
1111open import Data.Product.Base as Product
1212open import Data.Sum.Base using (inj₁; inj₂)
1313open import Level using (Level; _⊔_; 0ℓ)
14- open import Function.Base using (_on_; id)
14+ open import Function.Base using (id)
1515open import Function.Bundles using (Inverse)
1616open import Relation.Nullary.Decidable using (_×-dec_)
17- open import Relation.Binary.Core using (Rel; _⇒_)
17+ open import Relation.Binary.Core using (REL; Rel; _⇒_)
1818open import Relation.Binary.Bundles
1919 using (Setoid; DecSetoid; Preorder; Poset; StrictPartialOrder)
2020open import Relation.Binary.Definitions
@@ -25,14 +25,14 @@ import Relation.Binary.PropositionalEquality.Properties as ≡
2525private
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
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
172172module _ {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
You can’t perform that action at this time.
0 commit comments