1 | module Data.Nat.Order.Strict
4 | import Decidable.Order.Strict
9 | Irreflexive Nat LT where
10 | irreflexive {x = 0} _ impossible
11 | irreflexive {x = S _} (LTESucc prf) =
12 | irreflexive {rel = Nat.LT} prf
15 | Transitive Nat LT where
16 | transitive xy yz = transitive (lteSuccRight xy) yz
19 | StrictPreorder Nat LT where
22 | decLT : (a, b : Nat) -> DecOrdering {lt = LT} a b
23 | decLT 0 0 = DecEQ Refl
24 | decLT 0 (S b) = DecLT (LTESucc LTEZero)
25 | decLT (S a) 0 = DecGT (LTESucc LTEZero)
26 | decLT (S a) (S b) = case decLT a b of
27 | DecLT a_lt_b => DecLT (LTESucc a_lt_b)
28 | DecEQ Refl => DecEQ Refl
29 | DecGT b_lt_a => DecGT (LTESucc b_lt_a)
32 | StrictOrdered Nat LT where