Entry |
Value |
Name |
natural-prime_9 |
Conclusion |
sunfold next_sieve init_sieve = primes |
Constructive Proof |
No |
Axiom |
!t. t \/ ~t
(\a. a = (\b. (\c. c) = (\c. c))) (\d. (\e. d e) = d)
(\a. a = (\b. (\c. c) = (\c. c)))
(\d. (\e. e = (\f. (\c. c) = (\c. c)))
(\g. (\h i.
(\j k.
(\l. l j k) =
(\m. m ((\c. c) = (\c. c)) ((\c. c) = (\c. c))))
h
i <=>
h)
(d g)
(d ((@) d))))
(\a. (\b. b = (\c. (\d. d) = (\d. d)))
(\e. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
((\l. l = (\m. (\d. d) = (\d. d)))
(\n. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
(a n)
e))
e))
(\p. (\h i. (\j. j h i) = (\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
((\q. q = (\r. (\d. d) = (\d. d)))
(\s. (\q. q = (\r. (\d. d) = (\d. d)))
(\t. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
(p s = p t)
(s = t))))
((\u. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
u
((\b. b = (\c. (\d. d) = (\d. d))) (\d. d)))
((\q. q = (\r. (\d. d) = (\d. d)))
(\v. (\w. (\b. b = (\c. (\d. d) = (\d. d)))
(\x. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d)) ((\d. d) = (\d. d))))
f
g <=>
f)
((\q. q = (\r. (\d. d) = (\d. d)))
(\y. (\f g.
(\h i.
(\j. j h i) =
(\k. k ((\d. d) = (\d. d))
((\d. d) = (\d. d))))
f
g <=>
f)
(w y)
x))
x))
(\z. v = p z))))) |
Classical Lemmas |
!h1 h2 t1 t2. CONS h1 t1 = CONS h2 t2 <=> h1 = h2 /\ t1 = t2!a b a' b'. a,b = a',b' <=> a = a' /\ b = b'!a b. FST (a,b) = a!a b. SND (a,b) = b!e f. ?!fn. fn _0 = e /\ (!n. fn (SUC n) = f (fn n) n)!h t n. snth (scons h t) (SUC n) = snth t n!b f. ?fn. fn [] = b /\ (!h t. fn (CONS h t) = f h t (fn t))!t1 t2. ~(t1 /\ t2) <=> ~t1 \/ ~t2!t1 t2. ~(t1 ==> t2) <=> t1 /\ ~t2!t1 t2. ~(t1 \/ t2) <=> ~t1 /\ ~t2!t1 t2. ~t1 ==> ~t2 <=> t2 ==> t1!p q. (!x. p \/ q x) <=> p \/ (!x. q x)!p q. p \/ (!x. q x) <=> (!x. p \/ q x)!t. ~ ~t <=> t!t. (t <=> T) \/ (t <=> F)!f n x. funpow f (SUC n) x = funpow f n (f x)!f n. funpow f (SUC n) = funpow f n o f!f. funpow f 1 = f!p c x y. p (if c then x else y) <=> (c ==> p x) /\ (~c ==> p y)!p q. (!x. p x \/ q) <=> (!x. p x) \/ q!p q. (!x. p x) \/ q <=> (!x. p x \/ q)!p. (?x. ~p x) <=> ~(!x. p x)!p. ~(!x. p x) <=> (?x. ~p x)!p. ~(?x. p x) <=> (!x. ~p x)!f. ?fn. !a b. fn (a,b) = f a b!f b. sunfold f b = (let a,b' = f b in scons a (sunfold f b'))!p. (!b. p b) <=> p T /\ p F!p n. p n /\ (!m. m < n ==> ~p m) ==> (minimal) p = n!p. (?n. p n) <=> (?n. p n /\ (!m. m < n ==> ~p m))!p. (?n. p n) <=> p ((minimal) p) /\ (!m. m < (minimal) p ==> ~p m)!p. (!n. (!m. m < n ==> p m) ==> p n) ==> (!n. p n)!m n q r. m = q * n + r /\ r < n ==> m DIV n = q!m n q r. m = q * n + r /\ r < n ==> m MOD n = r!m n p q. m = n + q * p ==> m MOD p = n MOD p!m n p. m + n < m + p <=> n < p!m n p. m * p <= n * p <=> m <= n \/ p = 0!m n p. m * n <= m * p <=> m = 0 \/ n <= p!m n p. m + n <= m + p <=> n <= p!m n p. m * p = n * p <=> m = n \/ p = 0!m n p. m * n = m * p <=> m = 0 \/ n = p!p m n. m + p = n + p <=> m = n!m n p. m + n = m + p <=> n = p!m n p. m * n * p = n * m * p!m n p. m * n * p = (m * n) * p!m n p. m * (n + p) = m * n + m * p!m n p. (m + n) * p = m * p + n * p!n a b. ~(n = 0) ==> (SUC a MOD n = SUC b MOD n <=> a MOD n = b MOD n)!n a b. ~(n = 0) ==> (a MOD n + b MOD n) MOD n = (a + b) MOD n!m n p. ~(n * p = 0) ==> m MOD (n * p) MOD n = m MOD n!m n p. m <= n /\ n <= p ==> m <= p!a b c. divides a b /\ divides b c ==> divides a c!m n. ~(m < n) <=> n <= m!m n. ~(m <= n) <=> n < m!m n. m <= n /\ n <= m <=> m = n!m n. m < n <=> (?d. n = m + SUC d)!m n. m < n <=> m <= n /\ ~(m = n)!m n. SUC m < SUC n <=> m < n!m n. m <= n <=> (?d. n = m + d)!m n. m <= n <=> m < n \/ m = n!m n. SUC m <= n <=> m < n!m n. SUC m <= SUC n <=> m <= n!m n. SUC m = SUC n <=> m = n!m n. m * n = 0 <=> m = 0 \/ n = 0!m n. m + n = m <=> n = 0!m n. m + n = 0 <=> m = 0 /\ n = 0!m n. m * n = n * m!m n. ~(n = 0) ==> m MOD n < n!m n. ~(n = 0) ==> m DIV n * n + m MOD n = m!a b. ~(a = 0) ==> (divides a b <=> b MOD a = 0)!m n. ~(m = 0) ==> (m * n) DIV m = n!n m. ~(n = 0) ==> m MOD n MOD n = m MOD n!a b. ~(b = 0) /\ divides a b ==> a <= b!m n. m < n ==> m <= n!m n. m <= n \/ n <= m!n. ~(n < n)!n. ~(SUC n = _0)!n. 0 < n <=> ~(n = 0)!a. divides a 2 <=> a = 1 \/ a = 2!n. BIT0 (SUC n) = SUC (SUC (BIT0 n))!m. SUC m = m + 1!m. m * 1 = m!m. 1 * m = m!n. SUC n - 1 = n!n. ~(n = 0) ==> n MOD n = 0!n. ~(n = 0) ==> 0 MOD n = 0!m. m = 0 \/ (?n. m = SUC n)!a. divides a a!x. FST x,SND x = x!s n. shd (sdrop s n) = snth s n!s n. snth s (SUC n) = snth (stl s) n!s n. stake s (SUC n) = APPEND (stake s n) [snth s n]BIT0 0 = 0(minimal n. T) = 0sunfold next_sieve init_sieve = primes |
Constructive Lemmas |
T!x y z. x = y /\ y = z ==> x = z!h1 h2 t1 t2. CONS h1 t1 = CONS h2 t2 <=> h1 = h2 /\ t1 = t2!x h t. MEM x (CONS h t) <=> x = h \/ MEM x t!x y s. x IN y INSERT s <=> x = y \/ x IN s!t1 t2. (if F then t1 else t2) = t2!t1 t2. (if T then t1 else t2) = t1!x y. x = y <=> y = x!x y. x = y ==> y = x!a b a' b'. a,b = a',b' <=> a = a' /\ b = b'!a b. FST (a,b) = a!a b. SND (a,b) = b!e f. ?!fn. fn _0 = e /\ (!n. fn (SUC n) = f (fn n) n)!h t. set_of_list (CONS h t) = h INSERT set_of_list t!x s t. x INSERT s UNION t = x INSERT (s UNION t)!x s. x INSERT s = {y | y = x \/ y IN s}!x s. {x} UNION s = x INSERT s!h t n. snth (scons h t) (SUC n) = snth t n!h t. snth (scons h t) 0 = h!a. ?x. x = a!a. ?!x. x = a!x. ~(x IN {})!x. ~MEM x []!x. x = x!x. (@y. y = x) = x!x. I x = x!b f. ?fn. fn [] = b /\ (!h t. fn (CONS h t) = f h t (fn t))!y s f. y IN IMAGE f s <=> (?x. y = f x /\ x IN s)!p1 p2 q1 q2. (p1 ==> p2) /\ (q1 ==> q2) ==> p1 /\ q1 ==> p2 /\ q2!p1 p2 q1 q2. (p1 ==> p2) /\ (q1 ==> q2) ==> p1 \/ q1 ==> p2 \/ q2!p q r. p /\ (q \/ r) <=> p /\ q \/ p /\ r!t1 t2 t3. (t1 /\ t2) /\ t3 <=> t1 /\ t2 /\ t3!p q r. p ==> q ==> r <=> p /\ q ==> r!t1 t2 t3. (t1 \/ t2) \/ t3 <=> t1 \/ t2 \/ t3!t1 t2. ~(t1 /\ t2) <=> ~t1 \/ ~t2!t1 t2. ~(t1 ==> t2) <=> t1 /\ ~t2!t1 t2. ~(t1 \/ t2) <=> ~t1 /\ ~t2!t1 t2. t1 /\ t2 <=> t2 /\ t1!t1 t2. ~t1 ==> ~t2 <=> t2 ==> t1!t1 t2. t1 \/ t2 <=> t2 \/ t1!p q. (!x. p \/ q x) <=> p \/ (!x. q x)!p q. (?x. p /\ q x) <=> p /\ (?x. q x)!p q. p /\ (?x. q x) <=> (?x. p /\ q x)!p q. p \/ (!x. q x) <=> (!x. p \/ q x)!p q. p \/ (?x. q x) <=> (?x. p \/ q x)!t. (!x. t) <=> t!t. (?x. t) <=> t!t. ~ ~t <=> t!t. F /\ t <=> F!t. T /\ t <=> t!t. t /\ F <=> F!t. t /\ T <=> t!t. t /\ t <=> t!t. (F <=> t) <=> ~t!t. (T <=> t) <=> t!t. (t <=> F) <=> ~t!t. (t <=> T) <=> t!t. F ==> t <=> T!t. T ==> t <=> t!t. t ==> F <=> ~t!t. t ==> T <=> T!t. F \/ t <=> t!t. T \/ t <=> T!t. t \/ F <=> t!t. t \/ T <=> T!t. t \/ t <=> t!t. t ==> t!t. (t <=> T) \/ (t <=> F)!f n x. funpow f (SUC n) x = funpow f n (f x)!f n. funpow f (SUC n) = f o funpow f n!f n. funpow f (SUC n) = funpow f n o f!f. funpow f 0 = I!f. funpow f 1 = f!f h t. MAP f (CONS h t) = CONS (f h) (MAP f t)!f x s. IMAGE f (x INSERT s) = f x INSERT IMAGE f s!f y. (\x. f x) y = f y!f g. (!x. f x = g x) <=> f = g!f g. (!x. f x = g x) ==> f = g!f l. set_of_list (MAP f l) = IMAGE f (set_of_list l)!f s. IMAGE f s = {y | ?x. x IN s /\ y = f x}!f. ONE_ONE f <=> (!x1 x2. f x1 = f x2 ==> x1 = x2)!f. ONTO f <=> (!y. ?x. y = f x)!f. f o I = f!f. I o f = f!t. (\x. t x) = t!f. MAP f [] = []!f. IMAGE f {} = {}!p h t. ALL p (CONS h t) <=> p h /\ ALL p t!p a. (?x. a = x /\ p x) <=> p a!p x. x IN GSPEC p <=> p x!p x. x IN {y | p y} <=> p x!p x. (!y. p y <=> y = x) ==> (@) p = x!p x. p x ==> p ((@) p)!p c x y. p (if c then x else y) <=> (c ==> p x) /\ (~c ==> p y)!p q. (!x. p x \/ q) <=> (!x. p x) \/ q!p q. (?x. p x /\ q) <=> (?x. p x) /\ q!p q. (?x. p x) /\ q <=> (?x. p x /\ q)!p q. (?x. p x) ==> q <=> (!x. p x ==> q)!p q. (!x. p x) \/ q <=> (!x. p x \/ q)!p q. (?x. p x) \/ q <=> (?x. p x \/ q)!p q. (!x. p x /\ q x) <=> (!x. p x) /\ (!x. q x)!p q. (?x. p x \/ q x) <=> (?x. p x) \/ (?x. q x)!p q. (!x. p x) /\ (!x. q x) <=> (!x. p x /\ q x)!p q. (?x. p x) \/ (?x. q x) <=> (?x. p x \/ q x)!p q. (!x. p x ==> q x) ==> (!x. p x) ==> (!x. q x)!p q. (!x. p x ==> q x) ==> (?x. p x) ==> (?x. q x)!p l. (!x. MEM x l ==> p x) <=> ALL p l!p l. ALL p l <=> (!x. x IN set_of_list l ==> p x)!p. (?x. ~p x) <=> ~(!x. p x)!p. (?!x. p x) <=> (?x. !y. p y <=> x = y)!p. (?!x. p x) <=> (?x. p x) /\ (!x x'. p x /\ p x' ==> x = x')!p. ~(!x. p x) <=> (?x. ~p x)!p. ~(?x. p x) <=> (!x. ~p x)!p. ALL p []!f. ?fn. !a b. fn (a,b) = f a b!p. (!x y. p x y) <=> (!y x. p x y)!r. (!x. ?y. r x y) <=> (?f. !x. r x (f x))!p. (!x. ?!y. p x y) <=> (?f. !x y. p x y <=> f x = y)!f g x. (f o g) x = f (g x)!p f l. ALL p (MAP f l) <=> ALL (p o f) l!p f s. (!y. y IN IMAGE f s ==> p y) <=> (!x. x IN s ==> p (f x))!f b. sunfold f b = stream (\n. FST (f (funpow (SND o f) n b)))!f b. sunfold f b = (let a,b' = f b in scons a (sunfold f b'))!f g h. (f o g) o h = f o g o h!p. (!b. p b) <=> p T /\ p F!p. p [] /\ (!h t. p t ==> p (CONS h t)) ==> (!l. p l)!p n. p n /\ (!m. m < n ==> ~p m) ==> (minimal) p = n!p. (?n. p n) <=> (?n. p n /\ (!m. m < n ==> ~p m))!p. (?n. p n) <=> p ((minimal) p) /\ (!m. m < (minimal) p ==> ~p m)!p. (!n. (!m. m < n ==> p m) ==> p n) ==> (!n. p n)!p. p _0 /\ (!n. p n ==> p (SUC n)) ==> (!n. p n)!l h t. APPEND (CONS h t) l = CONS h (APPEND t l)!l x. MEM x l <=> x IN set_of_list l!l1 l2 x. MEM x (APPEND l1 l2) <=> MEM x l1 \/ MEM x l2!l1 l2. set_of_list (APPEND l1 l2) = set_of_list l1 UNION set_of_list l2!l. APPEND [] l = l!l. APPEND l [] = l!m n q r. m = q * n + r /\ r < n ==> m DIV n = q!m n q r. m = q * n + r /\ r < n ==> m MOD n = r!m n p q. m = n + q * p ==> m MOD p = n MOD p!m n p. m + n < m + p <=> n < p!m n p. m * p <= n * p <=> m <= n \/ p = 0!m n p. m * n <= m * p <=> m = 0 \/ n <= p!m n p. m + n <= m + p <=> n <= p!m n p. m * p = n * p <=> m = n \/ p = 0!m n p. m * n = m * p <=> m = 0 \/ n = p!p m n. m + p = n + p <=> m = n!m n p. m + n = m + p <=> n = p!m n p. m * n * p = n * m * p!m n p. m * n * p = (m * n) * p!m n p. m * (n + p) = m * n + m * p!m n p. (m + n) * p = m * p + n * p!m n p. m + n + p = (m + n) + p!n a b. ~(n = 0) ==> (SUC a MOD n = SUC b MOD n <=> a MOD n = b MOD n)!n a b. ~(n = 0) ==> (a MOD n + b MOD n) MOD n = (a + b) MOD n!m n p. ~(n * p = 0) ==> m MOD (n * p) MOD n = m MOD n!m n p. m <= n /\ n <= p ==> m <= p!a b c. divides a b /\ divides b c ==> divides a c!m n. m <= m + n!m n. ~(m < n) <=> n <= m!m n. ~(m <= n) <=> n < m!m n. m <= n /\ n <= m <=> m = n!m n. m < n <=> (?d. n = m + SUC d)!m n. m < n <=> m <= n /\ ~(m = n)!m n. m < SUC n <=> m <= n!m n. m < SUC n <=> m = n \/ m < n!m n. SUC m < SUC n <=> m < n!m n. m <= n <=> (?d. n = m + d)!m n. m <= n <=> m < n \/ m = n!m n. m <= SUC n <=> m = SUC n \/ m <= n!m n. SUC m <= n <=> m < n!m n. SUC m <= SUC n <=> m <= n!m n. SUC m = SUC n <=> m = n!m n. m * n = 0 <=> m = 0 \/ n = 0!m n. m + n = m <=> n = 0!m n. m + n = 0 <=> m = 0 /\ n = 0!a b. divides a b <=> (?c. c * a = b)!m n. m * n = n * m!m n. m * SUC n = m + m * n!m n. SUC m * n = m * n + n!m n. m + n = n + m!m n. m + SUC n = SUC (m + n)!m n. SUC m + n = SUC (m + n)!m n. (m + n) - n = m!m n. ~(n = 0) ==> m MOD n < n!m n. ~(n = 0) ==> m DIV n * n + m MOD n = m!a b. ~(a = 0) ==> (divides a b <=> b MOD a = 0)!m n. ~(m = 0) ==> (m * n) DIV m = n!n m. ~(n = 0) ==> m MOD n MOD n = m MOD n!a b. ~(b = 0) /\ divides a b ==> a <= b!m n. m < n ==> m <= n!m n. m = n ==> m <= n!m n. m <= n \/ n <= m!n. ~(n < n)!m. ~(m < 0)!n. ~(SUC n = _0)!n. n < SUC n!n. 0 < SUC n!n. n <= n!n. 0 <= n!n. 0 < n <=> ~(n = 0)!m. m <= 0 <=> m = 0!a. divides a 2 <=> a = 1 \/ a = 2!a. divides 0 a <=> a = 0!n. BIT0 (SUC n) = SUC (SUC (BIT0 n))!n. BIT1 n = SUC (BIT0 n)!n. PRE (SUC n) = n!m. SUC m = m + 1!m. m * 0 = 0!m. m * 1 = m!n. 0 * n = 0!m. 1 * m = m!m. m + 0 = m!n. 0 + n = n!n. SUC n - 1 = n!n. ~(n = 0) ==> n MOD n = 0!n. ~(n = 0) ==> 0 MOD n = 0!m. m = 0 \/ (?n. m = SUC n)!a. divides a a!a. divides a 0!x. ?a b. x = a,b!x. FST x,SND x = x!s t x. x IN s UNION t <=> x IN s \/ x IN t!s t u. (s UNION t) UNION u = s UNION t UNION u!s t. (!x. x IN s <=> x IN t) <=> s = t!s t. s UNION t = {x | x IN s \/ x IN t}!s t. s UNION t = t UNION s!s t. (!x. x IN s <=> x IN t) ==> s = t!s. {} UNION s = s!s. s UNION {} = s!s n. shd (sdrop s n) = snth s n!s n. snth s (SUC n) = snth (stl s) n!s n. stake s (SUC n) = APPEND (stake s n) [snth s n]!s n. stake s (SUC n) = CONS (shd s) (stake (stl s) n)!s n. sdrop s n = stream (\m. snth s (m + n))!s1 s2. (!n. snth s1 n = snth s2 n) ==> s1 = s2!s. stake s 0 = []!s. stream (snth s) = s?f. ONE_ONE f /\ ~ONTO fF <=> (!p. p)T <=> (\p. p) = (\p. p)~F <=> T~T <=> FI = (\x. x)LET_END = (\t. t)(~) = (\p. p ==> F)COND = (\t t1 t2. @x. ((t <=> T) ==> x = t1) /\ ((t <=> F) ==> x = t2))(/\) = (\p q. (\f. f p q) = (\f. f T T))(==>) = (\p q. p /\ q <=> p)(\/) = (\p q. !r. (p ==> r) ==> (q ==> r) ==> r)LET = (\f. f)(!) = (\p. p = (\x. T))(?) = (\p. !q. (!x. p x ==> q) ==> q)(?) = (\p. p ((@) p))(?!) = (\p. (?) p /\ (!x y. p x /\ p y ==> x = y))(o) = (\f g x. f (g x))NUMERAL = (\n. n)BIT0 0 = 0(minimal n. T) = 0{} = {x | F}set_of_list [] = {}sunfold next_sieve init_sieve = primes |
Contained Package |
natural-prime |
Comment |
Natural-prime package from OpenTheory. |