@@ -13,7 +13,7 @@ import Prelude.Maybe
13
13
-- ------------------------------------------------------------------------------
14
14
15
15
||| The negation of equality is symmetric (follows from symmetry of equality)
16
- total negEqSym : {a : t} -> {b : t} -> (a = b -> _|_ ) -> (b = a -> _|_ )
16
+ total negEqSym : {a : t} -> {b : t} -> (a = b -> Void ) -> (b = a -> Void )
17
17
negEqSym p h = p (sym h)
18
18
19
19
@@ -36,7 +36,7 @@ instance DecEq () where
36
36
-- ------------------------------------------------------------------------------
37
37
-- Booleans
38
38
-- ------------------------------------------------------------------------------
39
- total trueNotFalse : True = False -> _|_
39
+ total trueNotFalse : True = False -> Void
40
40
trueNotFalse Refl impossible
41
41
42
42
instance DecEq Bool where
@@ -49,7 +49,7 @@ instance DecEq Bool where
49
49
-- Nat
50
50
-- ------------------------------------------------------------------------------
51
51
52
- total OnotS : Z = S n -> _|_
52
+ total OnotS : Z = S n -> Void
53
53
OnotS Refl impossible
54
54
55
55
instance DecEq Nat where
@@ -64,7 +64,7 @@ instance DecEq Nat where
64
64
-- Maybe
65
65
-- ------------------------------------------------------------------------------
66
66
67
- total nothingNotJust : {x : t} -> (Nothing {a = t} = Just x) -> _|_
67
+ total nothingNotJust : {x : t} -> (Nothing {a = t} = Just x) -> Void
68
68
nothingNotJust Refl impossible
69
69
70
70
instance (DecEq t ) => DecEq (Maybe t) where
@@ -79,7 +79,7 @@ instance (DecEq t) => DecEq (Maybe t) where
79
79
-- Either
80
80
-- ------------------------------------------------------------------------------
81
81
82
- total leftNotRight : {x : a} -> {y : b} -> Left {b = b} x = Right {a = a} y -> _|_
82
+ total leftNotRight : {x : a} -> {y : b} -> Left {b = b} x = Right {a = a} y -> Void
83
83
leftNotRight Refl impossible
84
84
85
85
instance (DecEq a , DecEq b ) => DecEq (Either a b) where
@@ -96,7 +96,7 @@ instance (DecEq a, DecEq b) => DecEq (Either a b) where
96
96
-- Fin
97
97
-- ------------------------------------------------------------------------------
98
98
99
- total FZNotFS : {f : Fin n} -> FZ {k = n} = FS f -> _|_
99
+ total FZNotFS : {f : Fin n} -> FZ {k = n} = FS f -> Void
100
100
FZNotFS Refl impossible
101
101
102
102
instance DecEq (Fin n) where
@@ -111,16 +111,16 @@ instance DecEq (Fin n) where
111
111
-- Tuple
112
112
-- ------------------------------------------------------------------------------
113
113
114
- lemma_both_neq : {x : a, y : b, x' : c, y' : d} -> (x = x' -> _|_ ) -> (y = y' -> _|_ ) -> ((x, y) = (x', y') -> _|_ )
114
+ lemma_both_neq : {x : a, y : b, x' : c, y' : d} -> (x = x' -> Void ) -> (y = y' -> Void ) -> ((x, y) = (x', y') -> Void )
115
115
lemma_both_neq p_x_not_x' p_y_not_y' Refl = p_x_not_x' Refl
116
116
117
- lemma_snd_neq : {x : a, y : b, y' : d} -> (x = x) -> (y = y' -> _|_ ) -> ((x, y) = (x, y') -> _|_ )
117
+ lemma_snd_neq : {x : a, y : b, y' : d} -> (x = x) -> (y = y' -> Void ) -> ((x, y) = (x, y') -> Void )
118
118
lemma_snd_neq Refl p Refl = p Refl
119
119
120
120
lemma_fst_neq_snd_eq : {x : a, x' : b, y : c, y' : d} ->
121
- (x = x' -> _|_ ) ->
121
+ (x = x' -> Void ) ->
122
122
(y = y') ->
123
- ((x, y) = (x', y) -> _|_ )
123
+ ((x, y) = (x', y) -> Void )
124
124
lemma_fst_neq_snd_eq p_x_not_x' Refl Refl = p_x_not_x' Refl
125
125
126
126
instance (DecEq a , DecEq b ) => DecEq (a, b) where
@@ -137,16 +137,16 @@ instance (DecEq a, DecEq b) => DecEq (a, b) where
137
137
-- List
138
138
-- ------------------------------------------------------------------------------
139
139
140
- lemma_val_not_nil : {x : t, xs : List t} -> ((x :: xs) = Prelude.List .Nil {a = t} -> _|_ )
140
+ lemma_val_not_nil : {x : t, xs : List t} -> ((x :: xs) = Prelude.List .Nil {a = t} -> Void )
141
141
lemma_val_not_nil Refl impossible
142
142
143
- lemma_x_eq_xs_neq : {x : t, xs : List t, y : t, ys : List t} -> (x = y) -> (xs = ys -> _|_ ) -> ((x :: xs) = (y :: ys) -> _|_ )
143
+ lemma_x_eq_xs_neq : {x : t, xs : List t, y : t, ys : List t} -> (x = y) -> (xs = ys -> Void ) -> ((x :: xs) = (y :: ys) -> Void )
144
144
lemma_x_eq_xs_neq Refl p Refl = p Refl
145
145
146
- lemma_x_neq_xs_eq : {x : t, xs : List t, y : t, ys : List t} -> (x = y -> _|_ ) -> (xs = ys) -> ((x :: xs) = (y :: ys) -> _|_ )
146
+ lemma_x_neq_xs_eq : {x : t, xs : List t, y : t, ys : List t} -> (x = y -> Void ) -> (xs = ys) -> ((x :: xs) = (y :: ys) -> Void )
147
147
lemma_x_neq_xs_eq p Refl Refl = p Refl
148
148
149
- lemma_x_neq_xs_neq : {x : t, xs : List t, y : t, ys : List t} -> (x = y -> _|_ ) -> (xs = ys -> _|_ ) -> ((x :: xs) = (y :: ys) -> _|_ )
149
+ lemma_x_neq_xs_neq : {x : t, xs : List t, y : t, ys : List t} -> (x = y -> Void ) -> (xs = ys -> Void ) -> ((x :: xs) = (y :: ys) -> Void )
150
150
lemma_x_neq_xs_neq p p' Refl = p Refl
151
151
152
152
instance DecEq a => DecEq (List a) where
@@ -203,7 +203,7 @@ instance DecEq Int where
203
203
decEq x y = if x == y then Yes primitiveEq else No primitiveNotEq
204
204
where primitiveEq : x = y
205
205
primitiveEq = believe_me (Refl {x})
206
- postulate primitiveNotEq : x = y -> _|_
206
+ postulate primitiveNotEq : x = y -> Void
207
207
208
208
-- ------------------------------------------------------------------------------
209
209
-- Char
@@ -213,7 +213,7 @@ instance DecEq Char where
213
213
decEq x y = if x == y then Yes primitiveEq else No primitiveNotEq
214
214
where primitiveEq : x = y
215
215
primitiveEq = believe_me (Refl {x})
216
- postulate primitiveNotEq : x = y -> _|_
216
+ postulate primitiveNotEq : x = y -> Void
217
217
218
218
-- ------------------------------------------------------------------------------
219
219
-- Integer
@@ -223,7 +223,7 @@ instance DecEq Integer where
223
223
decEq x y = if x == y then Yes primitiveEq else No primitiveNotEq
224
224
where primitiveEq : x = y
225
225
primitiveEq = believe_me (Refl {x})
226
- postulate primitiveNotEq : x = y -> _|_
226
+ postulate primitiveNotEq : x = y -> Void
227
227
228
228
-- ------------------------------------------------------------------------------
229
229
-- Float
@@ -233,7 +233,7 @@ instance DecEq Float where
233
233
decEq x y = if x == y then Yes primitiveEq else No primitiveNotEq
234
234
where primitiveEq : x = y
235
235
primitiveEq = believe_me (Refl {x})
236
- postulate primitiveNotEq : x = y -> _|_
236
+ postulate primitiveNotEq : x = y -> Void
237
237
238
238
-- ------------------------------------------------------------------------------
239
239
-- String
@@ -243,6 +243,6 @@ instance DecEq String where
243
243
decEq x y = if x == y then Yes primitiveEq else No primitiveNotEq
244
244
where primitiveEq : x = y
245
245
primitiveEq = believe_me (Refl {x})
246
- postulate primitiveNotEq : x = y -> _|_
246
+ postulate primitiveNotEq : x = y -> Void
247
247
248
248
0 commit comments