Package haskell-prime-test: QuickCheck tests for prime numbers

Information

namehaskell-prime-test
version1.29
descriptionQuickCheck tests for prime numbers
authorJoe Leslie-Hurd <joe@gilith.com>
licenseMIT
provenanceHOL Light theory extracted on 2012-12-10
requiresbase
haskell
haskell-prime-def
natural-divides
natural-prime
showData.Bool
Data.List
Data.Pair
Data.Stream
Haskell.Data.Stream as H
Haskell.Number.Natural as H
Number.Natural
Probability.Random

Files

Theorems

¬(H.nth H.Prime.all 0 = 0)

r.
    let (i, r') H.Geometric.fromRandom r in
    let (j, r'') H.Geometric.fromRandom r' in
    H.nth H.Prime.all i H.nth H.Prime.all j i j

r.
    let (i, r') H.Geometric.fromRandom r in
    let (j, r'') H.Geometric.fromRandom r' in
    ¬H.divides (H.nth H.Prime.all i) (H.nth H.Prime.all (i + j + 1))

r.
    let (n, r') H.fromRandom r in
    let (i, r'') H.Geometric.fromRandom r' in
    any (λp. H.divides p (n + 2)) (H.take' H.Prime.all i)
    H.nth H.Prime.all i n + 2

External Type Operators

External Constants

Assumptions

H.Prime.all = Prime.all

H.divides = divides

H.nth = nth

H.take' = take

t. (λx. t x) = t

() = λp. p = λx.

t. ( t) t

t. t

() = λp q. p q p

p x. p x p ((select) p)

x. a b. x = (a, b)

() = λp q. (λf. f p q) = λf. f

() = λp. q. (x. p x q) q

i j. nth Prime.all i nth Prime.all j i j

f. fn. a b. fn (a, b) = f a b

m n p. m + (n + p) = m + n + p

ps.
    ps = Prime.all
    ¬(nth ps 0 = 0) (i j. nth ps i nth ps j i j)
    (i j. ¬divides (nth ps i) (nth ps (i + (j + 1))))
    n i. any (λp. divides p (n + 2)) (take ps i) nth ps i n + 2