@@ -43,17 +43,17 @@ private
43
43
lift₂ _∙_ g h x = (g x) ∙ (h x)
44
44
45
45
liftRel : Rel C ℓ → Rel (A → C) (a ⊔ ℓ)
46
- liftRel _≈_ g h = ∀ {x} → (g x) ≈ (h x)
46
+ liftRel _≈_ g h = ∀ x → (g x) ≈ (h x)
47
47
48
48
49
49
------------------------------------------------------------------------
50
50
-- Setoid structure: here rather than elsewhere? (could be imported?)
51
51
52
52
isEquivalence : IsEquivalence _≈_ → IsEquivalence (liftRel _≈_)
53
53
isEquivalence isEquivalence = record
54
- { refl = λ {f x} → refl {f x }
55
- ; sym = λ f≈g → sym f≈g
56
- ; trans = λ f≈g g≈h → trans f≈g g≈h
54
+ { refl = λ {f} _ → refl {f _ }
55
+ ; sym = λ f≈g _ → sym ( f≈g _)
56
+ ; trans = λ f≈g g≈h _ → trans ( f≈g _) ( g≈h _)
57
57
}
58
58
where open IsEquivalence isEquivalence
59
59
@@ -63,91 +63,91 @@ isEquivalence isEquivalence = record
63
63
isMagma : IsMagma _≈_ _∙_ → IsMagma (liftRel _≈_) (lift₂ _∙_)
64
64
isMagma isMagma = record
65
65
{ isEquivalence = isEquivalence M.isEquivalence
66
- ; ∙-cong = λ g h → M.∙-cong g h
66
+ ; ∙-cong = λ g h _ → M.∙-cong (g _) (h _)
67
67
}
68
68
where module M = IsMagma isMagma
69
69
70
70
isSemigroup : IsSemigroup _≈_ _∙_ → IsSemigroup (liftRel _≈_) (lift₂ _∙_)
71
71
isSemigroup isSemigroup = record
72
72
{ isMagma = isMagma M.isMagma
73
- ; assoc = λ f g h → M.assoc (f _) (g _) (h _)
73
+ ; assoc = λ f g h _ → M.assoc (f _) (g _) (h _)
74
74
}
75
75
where module M = IsSemigroup isSemigroup
76
76
77
77
isBand : IsBand _≈_ _∙_ → IsBand (liftRel _≈_) (lift₂ _∙_)
78
78
isBand isBand = record
79
79
{ isSemigroup = isSemigroup M.isSemigroup
80
- ; idem = λ f → M.idem (f _)
80
+ ; idem = λ f _ → M.idem (f _)
81
81
}
82
82
where module M = IsBand isBand
83
83
84
84
isCommutativeSemigroup : IsCommutativeSemigroup _≈_ _∙_ →
85
85
IsCommutativeSemigroup (liftRel _≈_) (lift₂ _∙_)
86
86
isCommutativeSemigroup isCommutativeSemigroup = record
87
87
{ isSemigroup = isSemigroup M.isSemigroup
88
- ; comm = λ f g → M.comm (f _) (g _)
88
+ ; comm = λ f g _ → M.comm (f _) (g _)
89
89
}
90
90
where module M = IsCommutativeSemigroup isCommutativeSemigroup
91
91
92
92
isMonoid : IsMonoid _≈_ _∙_ ε → IsMonoid (liftRel _≈_) (lift₂ _∙_) (lift₀ ε)
93
93
isMonoid isMonoid = record
94
94
{ isSemigroup = isSemigroup M.isSemigroup
95
- ; identity = (λ f → M.identityˡ (f _)) , λ f → M.identityʳ (f _)
95
+ ; identity = (λ f _ → M.identityˡ (f _)) , λ f _ → M.identityʳ (f _)
96
96
}
97
97
where module M = IsMonoid isMonoid
98
98
99
99
isCommutativeMonoid : IsCommutativeMonoid _≈_ _∙_ ε →
100
100
IsCommutativeMonoid (liftRel _≈_) (lift₂ _∙_) (lift₀ ε)
101
101
isCommutativeMonoid isCommutativeMonoid = record
102
102
{ isMonoid = isMonoid M.isMonoid
103
- ; comm = λ f g → M.comm (f _) (g _)
103
+ ; comm = λ f g _ → M.comm (f _) (g _)
104
104
}
105
105
where module M = IsCommutativeMonoid isCommutativeMonoid
106
106
107
107
isGroup : IsGroup _≈_ _∙_ ε _⁻¹ →
108
108
IsGroup (liftRel _≈_) (lift₂ _∙_) (lift₀ ε) (lift₁ _⁻¹)
109
109
isGroup isGroup = record
110
110
{ isMonoid = isMonoid M.isMonoid
111
- ; inverse = (λ f → M.inverseˡ (f _)) , λ f → M.inverseʳ (f _)
112
- ; ⁻¹-cong = λ f → M.⁻¹-cong f
111
+ ; inverse = (λ f _ → M.inverseˡ (f _)) , λ f _ → M.inverseʳ (f _)
112
+ ; ⁻¹-cong = λ f _ → M.⁻¹-cong (f _)
113
113
}
114
114
where module M = IsGroup isGroup
115
115
116
116
isAbelianGroup : IsAbelianGroup _≈_ _∙_ ε _⁻¹ →
117
117
IsAbelianGroup (liftRel _≈_) (lift₂ _∙_) (lift₀ ε) (lift₁ _⁻¹)
118
118
isAbelianGroup isAbelianGroup = record
119
119
{ isGroup = isGroup M.isGroup
120
- ; comm = λ f g → M.comm (f _) (g _)
120
+ ; comm = λ f g _ → M.comm (f _) (g _)
121
121
}
122
122
where module M = IsAbelianGroup isAbelianGroup
123
123
124
124
isSemiringWithoutAnnihilatingZero : IsSemiringWithoutAnnihilatingZero _≈_ _+_ _*_ 0# 1# →
125
125
IsSemiringWithoutAnnihilatingZero (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#) (lift₀ 1#)
126
126
isSemiringWithoutAnnihilatingZero isSemiringWithoutAnnihilatingZero = record
127
127
{ +-isCommutativeMonoid = isCommutativeMonoid M.+-isCommutativeMonoid
128
- ; *-cong = λ g h → M.*-cong g h
129
- ; *-assoc = λ f g h → M.*-assoc (f _) (g _) (h _)
130
- ; *-identity = (λ f → M.*-identityˡ (f _)) , λ f → M.*-identityʳ (f _)
131
- ; distrib = (λ f g h → M.distribˡ (f _) (g _) (h _)) , λ f g h → M.distribʳ (f _) (g _) (h _)
128
+ ; *-cong = λ g h _ → M.*-cong (g _) (h _)
129
+ ; *-assoc = λ f g h _ → M.*-assoc (f _) (g _) (h _)
130
+ ; *-identity = (λ f _ → M.*-identityˡ (f _)) , λ f _ → M.*-identityʳ (f _)
131
+ ; distrib = (λ f g h _ → M.distribˡ (f _) (g _) (h _)) , λ f g h _ → M.distribʳ (f _) (g _) (h _)
132
132
}
133
133
where module M = IsSemiringWithoutAnnihilatingZero isSemiringWithoutAnnihilatingZero
134
134
135
135
isSemiring : IsSemiring _≈_ _+_ _*_ 0# 1# →
136
136
IsSemiring (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₀ 0#) (lift₀ 1#)
137
137
isSemiring isSemiring = record
138
138
{ isSemiringWithoutAnnihilatingZero = isSemiringWithoutAnnihilatingZero M.isSemiringWithoutAnnihilatingZero
139
- ; zero = (λ f → M.zeroˡ (f _)) , λ f → M.zeroʳ (f _)
139
+ ; zero = (λ f _ → M.zeroˡ (f _)) , λ f _ → M.zeroʳ (f _)
140
140
}
141
141
where module M = IsSemiring isSemiring
142
142
143
143
isRing : IsRing _≈_ _+_ _*_ -_ 0# 1# →
144
144
IsRing (liftRel _≈_) (lift₂ _+_) (lift₂ _*_) (lift₁ -_) (lift₀ 0#) (lift₀ 1#)
145
145
isRing isRing = record
146
146
{ +-isAbelianGroup = isAbelianGroup M.+-isAbelianGroup
147
- ; *-cong = λ g h → M.*-cong g h
148
- ; *-assoc = λ f g h → M.*-assoc (f _) (g _) (h _)
149
- ; *-identity = (λ f → M.*-identityˡ (f _)) , λ f → M.*-identityʳ (f _)
150
- ; distrib = (λ f g h → M.distribˡ (f _) (g _) (h _)) , λ f g h → M.distribʳ (f _) (g _) (h _)
147
+ ; *-cong = λ g h _ → M.*-cong (g _) (h _)
148
+ ; *-assoc = λ f g h _ → M.*-assoc (f _) (g _) (h _)
149
+ ; *-identity = (λ f _ → M.*-identityˡ (f _)) , λ f _ → M.*-identityʳ (f _)
150
+ ; distrib = (λ f g h _ → M.distribˡ (f _) (g _) (h _)) , λ f g h _ → M.distribʳ (f _) (g _) (h _)
151
151
}
152
152
where module M = IsRing isRing
153
153
0 commit comments