Reshuffle orders (#91)

This commit is contained in:
Patrick Stevens
2019-12-29 12:11:21 +00:00
committed by GitHub
parent 876396eaaa
commit b6ef9b46f2
57 changed files with 476 additions and 462 deletions

View File

@@ -1,6 +1,5 @@
{-# OPTIONS --safe --warning=error #-}
open import WellFoundedInduction
open import LogicalFormulae
open import Numbers.Naturals.Semiring
open import Numbers.Naturals.Order
@@ -22,7 +21,8 @@ open import Functions
open import Sets.EquivalenceRelations
open import Numbers.Rationals.Definition
open import Semirings.Definition
open import Orders
open import Orders.Total.Definition
open import Orders.WellFounded.Induction
module Numbers.Rationals.Lemmas where
@@ -86,7 +86,7 @@ evil' = rec <NWellfounded (λ z → (x x₁ : ) (pr' : 0 <N x) (x₂ : z ≡
halveDecreased : underlying aEven <N a
halveDecreased with aEven
halveDecreased | zero , even rewrite equalityCommutative even = exFalso (PartialOrder.irreflexive (TotalOrder.order TotalOrder) 0<a)
halveDecreased | zero , even rewrite equalityCommutative even = exFalso (TotalOrder.irreflexive TotalOrder 0<a)
halveDecreased | succ a/2 , even = le a/2 (transitivity (applyEquality succ (transitivity (Semiring.commutative Semiring a/2 _) (applyEquality succ (transitivity (doubleIsAddTwo a/2) (multiplicationNIsCommutative 2 a/2))))) even)
reduced : b +N underlying aEven <N k
@@ -97,7 +97,7 @@ evil' = rec <NWellfounded (λ z → (x x₁ : ) (pr' : 0 <N x) (x₂ : z ≡
0<b with TotalOrder.totality TotalOrder 0 b
0<b | inl (inl 0<b) = 0<b
0<b | inl (inr ())
0<b | inr 0=b rewrite equalityCommutative 0=b = exFalso (PartialOrder.irreflexive (TotalOrder.order TotalOrder) {0} (identityOfIndiscernablesRight _<N_ 0<a (sqrt0 a pr)))
0<b | inr 0=b rewrite equalityCommutative 0=b = exFalso (TotalOrder.irreflexive TotalOrder {0} (identityOfIndiscernablesRight _<N_ 0<a (sqrt0 a pr)))
contr : False
contr = indHyp (b +N underlying aEven) reduced b (underlying aEven) 0<b refl next3