File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -20,16 +20,25 @@ instance
20
20
ℕ-hasPartialOrder = HasPartialOrder ∋ record
21
21
{ ≤-antisym = Nat.≤-antisym }
22
22
ℕ-hasDecPartialOrder = HasDecPartialOrder {A = ℕ} ∋ record {}
23
+ ℕ-hasTotalOrder = HasTotalOrder ∋ record
24
+ { ≤-total = Nat.≤-total }
25
+ ℕ-hasDecTotalOrder = HasDecTotalOrder {A = ℕ} ∋ record {}
23
26
24
27
import Data.Integer.Properties as Int hiding (_≟_)
25
28
ℤ-hasPreorder = HasPreorder ∋ record {Int; ≤⇔<∨≈ = let open Int in mk⇔
26
29
(λ a≤b → case _ ≟ _ of λ where (yes p) → inj₂ p ; (no ¬p) → inj₁ (≤∧≢⇒< a≤b ¬p))
27
30
[ <⇒≤ , ≤-reflexive ] }
28
31
ℤ-hasPartialOrder = HasPartialOrder ∋ record { ≤-antisym = Int.≤-antisym }
29
32
ℤ-hasDecPartialOrder = HasDecPartialOrder {A = ℤ} ∋ record {}
33
+ ℤ-hasTotalOrder = HasTotalOrder ∋ record
34
+ { ≤-total = Int.≤-total }
35
+ ℤ-hasDecTotalOrder = HasDecTotalOrder {A = ℤ} ∋ record {}
30
36
31
37
import Data.Rational.Properties as Rat hiding (_≟_)
32
38
33
39
ℚ-hasPreorder = hasPreorderFromNonStrict Rat.≤-isPreorder _≟_
34
40
ℚ-hasPartialOrder = HasPartialOrder ∋ record { ≤-antisym = Rat.≤-antisym }
35
41
ℚ-hasDecPartialOrder = HasDecPartialOrder {A = ℚ} ∋ record {}
42
+ ℚ-hasTotalOrder = HasTotalOrder ∋ record
43
+ { ≤-total = Rat.≤-total }
44
+ ℚ-hasDecTotalOrder = HasDecTotalOrder {A = ℚ} ∋ record {}
You can’t perform that action at this time.
0 commit comments