File tree Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Expand file tree Collapse file tree 3 files changed +21
-2
lines changed Original file line number Diff line number Diff line change 1
1
module Haskell.Law.Eq where
2
2
3
+ open import Haskell.Law.Eq.Char public
3
4
open import Haskell.Law.Eq.Def public
4
5
open import Haskell.Law.Eq.Bool public
5
6
open import Haskell.Law.Eq.Either public
Original file line number Diff line number Diff line change
1
+ module Haskell.Law.Eq.Char where
2
+
3
+ open import Agda.Builtin.Char.Properties renaming (primCharToNatInjective to c2n-injective)
4
+
5
+ open import Haskell.Prim
6
+ open import Haskell.Prim.Eq
7
+
8
+ open import Haskell.Extra.Dec
9
+
10
+ open import Haskell.Law.Eq.Def
11
+ open import Haskell.Law.Eq.Nat
12
+ open import Haskell.Law.Equality
13
+
14
+ instance
15
+ iLawfulEqChar : IsLawfulEq Char
16
+ iLawfulEqChar .isEquality x y with (c2n x) in h₁ | (c2n y) in h₂
17
+ ... | a | b = mapReflects { a ≡ b } { x ≡ y } { eqNat a b }
18
+ (λ h → c2n-injective x y $ sym $ trans (trans h₂ $ sym h) (sym h₁))
19
+ (λ h → trans (sym $ trans (cong c2n (sym h)) h₁) h₂)
20
+ (isEquality a b)
Original file line number Diff line number Diff line change @@ -68,5 +68,3 @@ eqNegation = refl
68
68
69
69
postulate instance
70
70
iLawfulEqDouble : IsLawfulEq Double
71
-
72
- iLawfulEqChar : IsLawfulEq Char
You can’t perform that action at this time.
0 commit comments