Rejig key-value (#41)

This commit is contained in:
Patrick Stevens
2019-08-24 08:40:27 +01:00
committed by GitHub
parent 61f3dc7306
commit 077ed6706a
7 changed files with 64 additions and 52 deletions

View File

@@ -7,8 +7,7 @@ open import Numbers.Naturals.Multiplication -- TODO - remove this dependency
open import Numbers.Naturals.Order -- TODO - remove this dependency
open import Numbers.Naturals.WithK
open import WellFoundedInduction
open import KeyValue
open import KeyValueWithDomain
open import KeyValue.KeyValue
open import Orders
open import Vectors
open import Maybe
@@ -249,31 +248,6 @@ module PrimeNumbers where
allNumbersLessThan : (n : ) Vec (numberLessThan n) n
allNumbersLessThan n = vecRev (allNumbersLessThanDescending n)
record extensionalHCF (a b : ) : Set where
field
c :
c|a : c a
c|b : c b
field
zeroCase : ((a 0) & (b 0) & (c 0)) || ((0 <N a) || (0 <N b))
hcfExtension : MapWithDomain (numberLessThan c) (Sg (numberLessThan c) (λ i ((notDiv (numberLessThan.a i) a) || (notDiv (numberLessThan.a i) b)) || ((numberLessThan.a i) a & (numberLessThan.a i) b & (numberLessThan.a i) c))) (numberLessThanOrder c)
hcfExtensionIsRightLength : vecLen (MapWithDomain.domain hcfExtension) c
{-
hcfsContains : {a b r : } → (hcf : extensionalHCF a b) → (r<hcf : r <N extensionalHCF.c hcf) → vecContains (MapWithDomain.domain (extensionalHCF.hcfExtension hcf)) record { a = r ; a<n = r<hcf }
hcfsContains = {!!}
hcfsEquivalent : {a b : } → hcfData a b → extensionalHCF a b
hcfsEquivalent {a} {b} record { c = c ; c|a = c|a ; c|b = c|b ; hcf = hcf } = record { c = c ; c|a = c|a ; c|b = c|b ; hcfExtension = hcfsMap ; hcfExtensionIsRightLength = {!!} ; zeroCase = {!!} }
where
pair : Set
pair = (Sg (numberLessThan c) (λ i → ((notDiv (numberLessThan.a i) a) || (notDiv (numberLessThan.a i) b)) || ((numberLessThan.a i) a & (numberLessThan.a i) b & (numberLessThan.a i) c)))
allHcfs : Map (numberLessThan c) pair (numberLessThanOrder c)
allHcfs = {!!}
hcfsMap : MapWithDomain (numberLessThan c) (Sg (numberLessThan c) (λ i → ((notDiv (numberLessThan.a i) a) || (notDiv (numberLessThan.a i) b)) || ((numberLessThan.a i) a & (numberLessThan.a i) b & (numberLessThan.a i) c))) (numberLessThanOrder c)
hcfsMap = {!!}
-}
positiveTimes : {a b : } (succ a *N succ b <N succ a) False
positiveTimes {a} {b} pr = zeroNeverGreater f'
where