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

Information

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

Files

Theorems

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
    0 < H.nth H.Prime.all (i + j + 1) mod H.nth H.Prime.all i

Input Type Operators

Input Constants

Assumptions

H.Prime.all = Prime.all

H.nth = nth

¬

bit0 0 = 0

p. p

(¬) = λp. p

t. (λx. t x) = t

() = λp. p = λx.

t. t

t. t t

t. t

n. ¬(suc n = 0)

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

n. bit1 n = suc (bit0 n)

() = λp q. p q p

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

n. 0 < n ¬(n = 0)

xy. x y. xy = (x, y)

x y. x = y y = x

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

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

m n. m + n = m n = 0

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

n1 n2. divides (nth Prime.all n1) (nth Prime.all n2) n1 = n2

f. fn. x y. fn (x, y) = f x y

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

m n. m + n = 0 m = 0 n = 0

a b. ¬(a = 0) (divides a b b mod a = 0)