mirror of
https://github.com/Smaug123/agdaproofs
synced 2025-10-11 14:48:42 +00:00
Reshuffle in preparation to break the dependency on N's implementation (#75)
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
{-# OPTIONS --safe --warning=error --without-K #-}
|
||||
|
||||
open import LogicalFormulae
|
||||
open import Numbers.Naturals.Naturals
|
||||
open import Numbers.Naturals.Semiring
|
||||
open import Numbers.Naturals.Order
|
||||
open import Numbers.Integers.Definition
|
||||
open import Numbers.Integers.Addition
|
||||
open import Numbers.Integers.Multiplication
|
||||
@@ -68,13 +69,13 @@ _<Z_.proof (lessNegsuccNonneg {zero} {b}) = refl
|
||||
_<Z_.proof (lessNegsuccNonneg {succ a} {b}) = _<Z_.proof (lessNegsuccNonneg {a} {b})
|
||||
|
||||
lessThanTotalZ : {a b : ℤ} → ((a <Z b) || (b <Z a)) || (a ≡ b)
|
||||
lessThanTotalZ {nonneg a} {nonneg b} with orderIsTotal a b
|
||||
lessThanTotalZ {nonneg a} {nonneg b} with TotalOrder.totality ℕTotalOrder a b
|
||||
lessThanTotalZ {nonneg a} {nonneg b} | inl (inl a<b) = inl (inl (lessInherits a<b))
|
||||
lessThanTotalZ {nonneg a} {nonneg b} | inl (inr b<a) = inl (inr (lessInherits b<a))
|
||||
lessThanTotalZ {nonneg a} {nonneg b} | inr a=b = inr (applyEquality nonneg a=b)
|
||||
lessThanTotalZ {nonneg a} {negSucc b} = inl (inr (lessNegsuccNonneg {b} {a}))
|
||||
lessThanTotalZ {negSucc a} {nonneg x} = inl (inl (lessNegsuccNonneg {a} {x}))
|
||||
lessThanTotalZ {negSucc a} {negSucc b} with orderIsTotal a b
|
||||
lessThanTotalZ {negSucc a} {negSucc b} with TotalOrder.totality ℕTotalOrder a b
|
||||
... | inl (inl a<b) = inl (inr (lessInheritsNegsucc a<b))
|
||||
... | inl (inr b<a) = inl (inl (lessInheritsNegsucc b<a))
|
||||
lessThanTotalZ {negSucc a} {negSucc .a} | inr refl = inr refl
|
||||
|
Reference in New Issue
Block a user