From 7ed41b0c0901bd59e8fef1dd547c62e38cf15ee3 Mon Sep 17 00:00:00 2001 From: Patrick Stevens Date: Thu, 3 Oct 2019 06:53:13 +0100 Subject: [PATCH] Rearrange some of Naturals (#48) --- Numbers/Modulo/IntegersModN.agda | 19 +-- Numbers/Naturals/Addition.agda | 12 +- Numbers/Naturals/Definition.agda | 7 + Numbers/Naturals/Exponentiation.agda | 22 ++++ Numbers/Naturals/Multiplication.agda | 12 ++ Numbers/Naturals/Naturals.agda | 159 ++++------------------- Numbers/Naturals/Order.agda | 31 ++++- Numbers/Primes/IntegerFactorisation.agda | 8 +- Numbers/Primes/PrimeNumbers.agda | 11 +- Sets/CantorBijection/Proofs.agda | 20 +-- 10 files changed, 135 insertions(+), 166 deletions(-) create mode 100644 Numbers/Naturals/Exponentiation.agda diff --git a/Numbers/Modulo/IntegersModN.agda b/Numbers/Modulo/IntegersModN.agda index f71cd15..3fb516d 100644 --- a/Numbers/Modulo/IntegersModN.agda +++ b/Numbers/Modulo/IntegersModN.agda @@ -65,7 +65,7 @@ module Numbers.Modulo.IntegersModN where plusZnIdentityLeft {zero} {()} plusZnIdentityLeft {succ n} {pr} record { x = x ; xLess = xLess } with orderIsTotal x (succ n) plusZnIdentityLeft {succ n} {pr} record { x = x ; xLess = xLess } | inl (inl x x 1 primeA ; firstFactorBiggerMin = inl (Prime.p>1 primeA) ; firstFactorDivision = record { quot = 1 ; rem = 0 ; pr = ssxDivA ; remIsSmall = r ; quotSmall = inl (TotalOrder.transitive ℕTotalOrder (le zero refl) 11 = Prime.p>1 primeA ; pr = Prime.pr primeA } ; otherFactors = inl record { fst = refl ; snd = refl } ; otherFactorsNumber = 0 } factorIntegerLemma (succ (succ x)) indHyp | a , record { fst = record { fst = divides record {quot = succ (succ qu) ; rem = .0 ; pr = ssxDivA ; remIsSmall = remSmall } refl ; snd = 11 primeA ; firstFactorBiggerMin = inl (Prime.p>1 primeA) ; firstFactorDivision = record { quot = succ (succ qu) ; rem = 0 ; pr = ssxDivA ; remIsSmall = remSmall ; quotSmall = inl (TotalOrder.transitive ℕTotalOrder (le zero refl) 11 = Prime.p>1 primeA ; pr = Prime.pr primeA } ; otherFactors = inr record {fst = succPreservesInequality (succIsPositive qu) ; snd = factNonunit} ; otherFactorsNumber = succ (factorisationNonunit.otherFactorsNumber indHypRes') } @@ -143,7 +143,7 @@ module Numbers.Primes.IntegerFactorisation where ... | indHyp = (indHyp prf) a factA p|a where prf : (x : ℕ) (ind : (y : ℕ) (y