10
10
module Data.Product.Function.NonDependent.Setoid where
11
11
12
12
open import Data.Product.Base as Prod
13
- open import Data.Product.Relation.Binary.Pointwise.NonDependent
13
+ open import Data.Product.Relation.Binary.Pointwise.NonDependent using (_×ₛ_)
14
14
open import Level using (Level)
15
- open import Relation.Binary
16
- open import Function
15
+ open import Relation.Binary using (Setoid)
16
+ open import Function.Bundles -- much of it is used
17
17
18
18
private
19
19
variable
@@ -24,25 +24,25 @@ private
24
24
------------------------------------------------------------------------
25
25
-- Combinators for equality preserving functions
26
26
27
- proj₁ₛ : Func ( A ×ₛ B) A
27
+ proj₁ₛ : A ×ₛ B ⟶ₛ A
28
28
proj₁ₛ = record { to = proj₁ ; cong = proj₁ }
29
29
30
- proj₂ₛ : Func ( A ×ₛ B) B
30
+ proj₂ₛ : A ×ₛ B ⟶ₛ B
31
31
proj₂ₛ = record { to = proj₂ ; cong = proj₂ }
32
32
33
- <_,_>ₛ : Func A B → Func A C → Func A ( B ×ₛ C)
33
+ <_,_>ₛ : A ⟶ₛ B → A ⟶ₛ C → A ⟶ₛ B ×ₛ C
34
34
< f , g >ₛ = record
35
35
{ to = < to f , to g >
36
36
; cong = < cong f , cong g >
37
37
} where open Func
38
38
39
- swapₛ : Func ( A ×ₛ B) ( B ×ₛ A)
39
+ swapₛ : A ×ₛ B ⟶ₛ B ×ₛ A
40
40
swapₛ = < proj₂ₛ , proj₁ₛ >ₛ
41
41
42
42
------------------------------------------------------------------------
43
43
-- Function bundles
44
44
45
- _×-function_ : Func A B → Func C D → Func ( A ×ₛ C) ( B ×ₛ D)
45
+ _×-function_ : A ⟶ₛ B → C ⟶ₛ D → A ×ₛ C ⟶ₛ B ×ₛ D
46
46
f ×-function g = record
47
47
{ to = Prod.map (to f) (to g)
48
48
; cong = Prod.map (cong f) (cong g)
0 commit comments