0 | module Data.Refined.Bits64
2 | import Control.Relation.ReflexiveClosure
3 | import Control.Relation
4 | import public Data.Prim.Bits64
5 | import public Data.Refined.Core
9 | public export %inline
10 | {x : Bits64} -> HDec0 Bits64 (< x) where
13 | public export %inline
14 | {x : Bits64} -> HDec0 Bits64 (x <) where
17 | public export %inline
18 | {x : Bits64} -> HDec0 Bits64 (<= x) where
21 | public export %inline
22 | {x : Bits64} -> HDec0 Bits64 (x <=) where
35 | 0 LessThan : Bits64 -> Bits64 -> Type
36 | LessThan m n = n < m
40 | 0 To : Bits64 -> Bits64 -> Type
41 | To m n = ReflexiveClosure (<) n m
49 | 0 GreaterThan : Bits64 -> Bits64 -> Type
54 | 0 From : Bits64 -> Bits64 -> Type
55 | From = ReflexiveClosure (<)
59 | 0 FromTo : Bits64 -> Bits64 -> Bits64 -> Type
60 | FromTo m n = From m && To n
64 | 0 Between : Bits64 -> Bits64 -> Bits64 -> 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)