File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
src/Function/Relation/Binary/Setoid Expand file tree Collapse file tree 1 file changed +10
-9
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,8 @@ module Function.Relation.Binary.Setoid.Equality {a₁ a₂ b₁ b₂ : Level}
1515open import Function.Bundles using (Func; _⟨$⟩_)
1616open import Relation.Binary.Definitions
1717 using (Reflexive; Symmetric; Transitive)
18+ open import Relation.Binary.Structures
19+ using (IsEquivalence)
1820
1921private
2022 module To = Setoid To
@@ -33,17 +35,16 @@ sym = λ f≈g → To.sym f≈g
3335trans : Transitive _≈_
3436trans = λ f≈g g≈h → To.trans f≈g g≈h
3537
36- setoid : Setoid _ _
37- setoid = record
38- { Carrier = Func From To
39- ; _≈_ = _≈_
40- ; isEquivalence = record -- need to η-expand else Agda gets confused
41- { refl = λ {f} → refl {f}
42- ; sym = λ {f} {g} → sym {f} {g}
43- ; trans = λ {f} {g} {h} → trans {f} {g} {h}
44- }
38+ isEquivalence : IsEquivalence _≈_
39+ isEquivalence = record -- need to η-expand else Agda gets confused
40+ { refl = λ {f} → refl {f}
41+ ; sym = λ {f} {g} → sym {f} {g}
42+ ; trans = λ {f} {g} {h} → trans {f} {g} {h}
4543 }
4644
45+ setoid : Setoid _ _
46+ setoid = record { isEquivalence = isEquivalence }
47+
4748-- most of the time, this infix version is nicer to use
4849infixr 9 _⇨_
4950_⇨_ : Setoid _ _
You can’t perform that action at this time.
0 commit comments