0 | module Data.Refined.Int16
2 | import Control.Relation.ReflexiveClosure
3 | import Control.Relation
4 | import public Data.Prim.Int16
5 | import public Data.Refined.Core
9 | public export %inline
10 | {x : Int16} -> HDec0 Int16 (< x) where
13 | public export %inline
14 | {x : Int16} -> HDec0 Int16 (x <) where
17 | public export %inline
18 | {x : Int16} -> HDec0 Int16 (<= x) where
21 | public export %inline
22 | {x : Int16} -> HDec0 Int16 (x <=) where
35 | 0 LessThan : Int16 -> Int16 -> Type
36 | LessThan m n = n < m
40 | 0 To : Int16 -> Int16 -> Type
41 | To m n = ReflexiveClosure (<) n m
49 | 0 GreaterThan : Int16 -> Int16 -> Type
54 | 0 From : Int16 -> Int16 -> Type
55 | From = ReflexiveClosure (<)
59 | 0 FromTo : Int16 -> Int16 -> Int16 -> Type
60 | FromTo m n = From m && To n
64 | 0 Between : Int16 -> Int16 -> Int16 -> Type
65 | Between m n = GreaterThan m && LessThan n
74 | -> {auto 0 p1 : m2 <= m}
75 | -> {auto 0 p2 : n <= n2}
77 | widen (And y z) = And (transitive p1 y) (transitive z p2)
82 | -> {auto 0 p1 : m2 <= m}
83 | -> {auto 0 p2 : n <= n2}
85 | widen' (And y z) = And (strictRight p1 y) (strictLeft z p2)