:: NAT_4 semantic presentation begin theorem Th1: :: NAT_4:1 for r, s being real number st 0 <= r & s * s < r * r holds s < r proof let r, s be real number ; ::_thesis: ( 0 <= r & s * s < r * r implies s < r ) assume that A1: 0 <= r and A2: s * s < r * r ; ::_thesis: s < r assume s >= r ; ::_thesis: contradiction then ( r * s <= s * s & r * r <= s * r ) by A1, XREAL_1:64; hence contradiction by A2, XXREAL_0:2; ::_thesis: verum end; theorem Th2: :: NAT_4:2 for r, s being real number st 1 < r & r * r <= s holds r < s proof let r, s be real number ; ::_thesis: ( 1 < r & r * r <= s implies r < s ) assume that A1: 1 < r and A2: r * r <= s ; ::_thesis: r < s r < r * r by A1, XREAL_1:155; hence r < s by A2, XXREAL_0:2; ::_thesis: verum end; theorem Th3: :: NAT_4:3 for a, n being Nat st a > 1 holds a |^ n > n proof defpred S1[ Nat] means for a being Nat st a > 1 holds a |^ $1 > $1; A1: for n being Nat st S1[n] holds S1[n + 1] proof let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_for_a_being_Nat_st_a_>_1_holds_ a_|^_(n_+_1)_>_n_+_1 let a be Nat; ::_thesis: ( a > 1 implies b1 |^ (n + 1) > n + 1 ) assume A3: a > 1 ; ::_thesis: b1 |^ (n + 1) > n + 1 then a >= 1 + 1 by NAT_1:13; then A4: a * n >= 2 * n by XREAL_1:64; percases ( n = 0 or n > 0 ) ; suppose n = 0 ; ::_thesis: b1 |^ (n + 1) > n + 1 hence a |^ (n + 1) > n + 1 by A3, NEWTON:5; ::_thesis: verum end; suppose n > 0 ; ::_thesis: b1 |^ (n + 1) > n + 1 then n >= 0 + 1 by NAT_1:13; then n + n >= n + 1 by XREAL_1:6; then A5: a * n >= n + 1 by A4, XXREAL_0:2; (a |^ n) * a > n * a by A2, A3, XREAL_1:68; then a |^ (n + 1) > n * a by NEWTON:6; hence a |^ (n + 1) > n + 1 by A5, XXREAL_0:2; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; A6: S1[ 0 ] ; for n being Nat holds S1[n] from NAT_1:sch_2(A6, A1); hence for a, n being Nat st a > 1 holds a |^ n > n ; ::_thesis: verum end; theorem Th4: :: NAT_4:4 for n, k, m being Nat st k <= n & m = [\(n / 2)/] holds n choose m >= n choose k proof defpred S1[ Nat] means for k, m being Nat st k <= m & m = [\($1 / 2)/] holds $1 choose m >= $1 choose k; A1: (1 / 2) - 1 < 0 ; A2: for n being Nat st S1[n] holds S1[n + 1] proof let n be Nat; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] A4: n in NAT by ORDINAL1:def_12; for k, m1 being Nat st k <= m1 & m1 = [\((n + 1) / 2)/] holds (n + 1) choose m1 >= (n + 1) choose k proof [\(n / 2)/] <= n / 2 by INT_1:def_6; then - [\(n / 2)/] >= - (n / 2) by XREAL_1:24; then A5: (- [\(n / 2)/]) + (n + 1) >= (- (n / 2)) + (n + 1) by XREAL_1:6; set m = [\(n / 2)/]; let k, m1 be Nat; ::_thesis: ( k <= m1 & m1 = [\((n + 1) / 2)/] implies (n + 1) choose m1 >= (n + 1) choose k ) assume A6: k <= m1 ; ::_thesis: ( not m1 = [\((n + 1) / 2)/] or (n + 1) choose m1 >= (n + 1) choose k ) set nk1 = (n + 1) - k; set l = n - [\(n / 2)/]; reconsider m = [\(n / 2)/] as Element of NAT by INT_1:53; 2 * n >= 1 * n by XREAL_1:64; then A7: ( n / 2 >= [\(n / 2)/] & (2 * n) / 2 >= n / 2 ) by INT_1:def_6, XREAL_1:72; then A8: n >= m by XXREAL_0:2; n - m = n -' m by A7, XREAL_1:233, XXREAL_0:2; then reconsider l = n - [\(n / 2)/] as Element of NAT ; ((n + 1) !) / (n !) = ((n + 1) * (n !)) / (n !) by NEWTON:15 .= (n + 1) * ((n !) / (n !)) by XCMPLX_1:74 .= (n + 1) * 1 by XCMPLX_1:60 ; then A9: (n !) / ((n + 1) !) = 1 / (n + 1) by XCMPLX_1:57; A10: (- (n / 2)) + (n + 1) = (n / 2) + 1 ; set nk = n - k; set l1 = (n + 1) -' m1; A11: 1 * m1 <= 2 * m1 by XREAL_1:64; assume A12: m1 = [\((n + 1) / 2)/] ; ::_thesis: (n + 1) choose m1 >= (n + 1) choose k then m1 <= (n + 1) / 2 by INT_1:def_6; then A13: m1 * 2 <= ((n + 1) / 2) * 2 by XREAL_1:64; then A14: ( n + 1 >= m1 & (n + 1) -' m1 = (n + 1) - m1 ) by A11, XREAL_1:233, XXREAL_0:2; A15: (n + 1) / 2 >= [\((n + 1) / 2)/] by INT_1:def_6; A16: n >= k proof percases ( n = 0 or n <> 0 ) ; suppose n = 0 ; ::_thesis: n >= k hence n >= k by A1, A6, A12, INT_1:def_6; ::_thesis: verum end; suppose n <> 0 ; ::_thesis: n >= k then n + 1 > 0 + 1 by XREAL_1:6; then n >= 1 by NAT_1:13; then n + n >= 1 + n by XREAL_1:6; then (2 * n) / 2 >= (n + 1) / 2 by XREAL_1:72; then n >= [\((n + 1) / 2)/] by A15, XXREAL_0:2; hence n >= k by A6, A12, XXREAL_0:2; ::_thesis: verum end; end; end; then n - k = n -' k by XREAL_1:233; then reconsider nk = n - k as Element of NAT ; (n / 2) - 1 < [\(n / 2)/] by INT_1:def_6; then A17: ((n / 2) - 1) + 1 < [\(n / 2)/] + 1 by XREAL_1:6; (n + 1) - k = nk + 1 ; then reconsider nk1 = (n + 1) - k as Element of NAT ; 0 + n <= 1 + n by XREAL_1:6; then A18: k <= n + 1 by A16, XXREAL_0:2; then A19: (n + 1) choose k = ((n + 1) !) / ((nk1 !) * (k !)) by NEWTON:def_3; A20: (nk1 !) / (nk !) = ((nk + 1) * (nk !)) / (nk !) by NEWTON:15 .= (nk + 1) * ((nk !) / (nk !)) by XCMPLX_1:74 .= (nk + 1) * 1 by XCMPLX_1:60 ; n choose k = (n !) / ((nk !) * (k !)) by A16, NEWTON:def_3; then (n choose k) / ((n + 1) choose k) = ((n !) / ((nk !) * (k !))) / (((n + 1) !) / ((nk1 !) * (k !))) by A18, NEWTON:def_3 .= (((n !) / ((nk !) * (k !))) / ((n + 1) !)) * ((nk1 !) * (k !)) by XCMPLX_1:82 .= ((n !) / (((n + 1) !) * ((nk !) * (k !)))) * ((nk1 !) * (k !)) by XCMPLX_1:78 .= ((1 / (n + 1)) / ((nk !) * (k !))) * ((nk1 !) * (k !)) by A9, XCMPLX_1:78 .= (1 / (n + 1)) / (((nk !) * (k !)) / ((nk1 !) * (k !))) by XCMPLX_1:82 .= (1 / (n + 1)) / (((nk !) / (nk1 !)) / ((k !) / (k !))) by XCMPLX_1:84 .= (1 / (n + 1)) / (((nk !) / (nk1 !)) / 1) by XCMPLX_1:60 .= (1 / (n + 1)) / (1 / (nk + 1)) by A20, XCMPLX_1:57 .= (1 * (nk + 1)) / (1 * (n + 1)) by XCMPLX_1:84 .= (nk + 1) / (n + 1) ; then A21: (n choose k) / (((n + 1) choose k) / ((n + 1) choose k)) = ((nk + 1) / (n + 1)) * ((n + 1) choose k) by XCMPLX_1:82; A22: n choose k = (n choose k) / 1 .= ((nk + 1) / (n + 1)) * ((n + 1) choose k) by A19, A21, XCMPLX_1:60 ; then A23: (n choose k) * ((n + 1) / (l + 1)) = ((((nk + 1) / (n + 1)) * ((n + 1) choose k)) * (n + 1)) / (l + 1) by XCMPLX_1:74 .= ((((nk + 1) / (n + 1)) * (n + 1)) * ((n + 1) choose k)) / (l + 1) .= ((((n + 1) / (n + 1)) * (nk + 1)) * ((n + 1) choose k)) / (l + 1) by XCMPLX_1:75 .= ((1 * (nk + 1)) * ((n + 1) choose k)) / (l + 1) by XCMPLX_1:60 .= ((n + 1) choose k) * ((nk + 1) / (l + 1)) by XCMPLX_1:74 ; A24: (n choose k) * ((n + 1) / (m + 1)) = ((((nk + 1) / (n + 1)) * ((n + 1) choose k)) * (n + 1)) / (m + 1) by A22, XCMPLX_1:74 .= ((((nk + 1) / (n + 1)) * (n + 1)) * ((n + 1) choose k)) / (m + 1) .= ((((n + 1) / (n + 1)) * (nk + 1)) * ((n + 1) choose k)) / (m + 1) by XCMPLX_1:75 .= ((1 * (nk + 1)) * ((n + 1) choose k)) / (m + 1) by XCMPLX_1:60 .= ((n + 1) choose k) * ((nk + 1) / (m + 1)) by XCMPLX_1:74 ; percases ( n is even or not n is even ) ; suppose n is even ; ::_thesis: (n + 1) choose m1 >= (n + 1) choose k then consider k1 being Element of NAT such that A25: n = 2 * k1 by A4, ABIAN:def_2; A26: [\((n + 1) / 2)/] = [\(((2 * k1) / 2) + (1 / 2))/] by A25 .= k1 + [\(1 / 2)/] by INT_1:28 .= k1 + 0 by A1, INT_1:def_6 .= [\(n / 2)/] by A25, INT_1:25 ; then A27: n choose m >= n choose k by A3, A6, A12; - k >= - [\(n / 2)/] by A6, A12, A26, XREAL_1:24; then (- k) + (n + 1) >= (- [\(n / 2)/]) + (n + 1) by XREAL_1:6; then ((n - k) + 1) / ((n - [\(n / 2)/]) + 1) >= ((n - [\(n / 2)/]) + 1) / ((n - [\(n / 2)/]) + 1) by A5, A10, XREAL_1:72; then ((n - k) + 1) / ((n - [\(n / 2)/]) + 1) >= 1 by A5, A10, XCMPLX_1:60; then A28: (((n - k) + 1) / ((n - [\(n / 2)/]) + 1)) * ((n + 1) choose k) >= 1 * ((n + 1) choose k) by XREAL_1:64; A29: (n + 1) -' m1 = (n + 1) - m1 by A13, A11, XREAL_1:233, XXREAL_0:2 .= l + 1 by A12, A26 ; (n + 1) choose m1 = ((n + 1) !) / ((m1 !) * (((n + 1) -' m1) !)) by A14, NEWTON:def_3 .= ((n + 1) * (n !)) / ((m !) * ((l + 1) !)) by A12, A26, A29, NEWTON:15 .= ((n + 1) * (n !)) / ((m !) * ((l + 1) * (l !))) by NEWTON:15 .= ((n + 1) * (n !)) / ((l + 1) * ((m !) * (l !))) .= ((n + 1) / (l + 1)) / (((m !) * (l !)) / (n !)) by XCMPLX_1:84 .= ((n !) / ((m !) * (l !))) * ((n + 1) / (l + 1)) by XCMPLX_1:80 .= (n choose m) * ((n + 1) / (l + 1)) by A8, NEWTON:def_3 ; then (n + 1) choose m >= ((n + 1) choose k) * ((nk + 1) / (l + 1)) by A12, A23, A26, A27, XREAL_1:64; hence (n + 1) choose m1 >= (n + 1) choose k by A12, A26, A28, XXREAL_0:2; ::_thesis: verum end; suppose not n is even ; ::_thesis: (n + 1) choose m1 >= (n + 1) choose k then consider j being Integer such that A30: n = (2 * j) + 1 by ABIAN:1; A31: [\((n + 1) / 2)/] = (j + 0) + 1 by A30, INT_1:25 .= (j + [\(1 / 2)/]) + 1 by A1, INT_1:def_6 .= [\(j + (1 / 2))/] + 1 by INT_1:28 .= [\(n / 2)/] + 1 by A30 ; A32: (n + 1) -' m1 = (n + 1) - m1 by A13, A11, XREAL_1:233, XXREAL_0:2 .= l by A12, A31 ; percases ( k = m + 1 or k < m + 1 ) by A6, A12, A31, XXREAL_0:1; suppose k = m + 1 ; ::_thesis: (n + 1) choose m1 >= (n + 1) choose k hence (n + 1) choose m1 >= (n + 1) choose k by A12, A31; ::_thesis: verum end; suppose k < m + 1 ; ::_thesis: (n + 1) choose m1 >= (n + 1) choose k then A33: k <= m by NAT_1:13; then A34: n choose m >= n choose k by A3; n / 2 >= [\(n / 2)/] by INT_1:def_6; then (n / 2) * 2 >= [\(n / 2)/] * 2 by XREAL_1:64; then n - [\(n / 2)/] >= ([\(n / 2)/] * 2) - [\(n / 2)/] by XREAL_1:9; then n - [\(n / 2)/] >= k by A33, XXREAL_0:2; then (n - [\(n / 2)/]) - (k - [\(n / 2)/]) >= k - (k - [\(n / 2)/]) by XREAL_1:9; then (n - k) + 1 >= [\(n / 2)/] + 1 by XREAL_1:6; then ((n - k) + 1) / ([\(n / 2)/] + 1) >= ([\(n / 2)/] + 1) / ([\(n / 2)/] + 1) by A17, XREAL_1:72; then ((n - k) + 1) / ([\(n / 2)/] + 1) >= 1 by A17, XCMPLX_1:60; then A35: (((n - k) + 1) / ([\(n / 2)/] + 1)) * ((n + 1) choose k) >= 1 * ((n + 1) choose k) by XREAL_1:64; (n + 1) choose m1 = ((n + 1) !) / ((m1 !) * (((n + 1) -' m1) !)) by A14, NEWTON:def_3 .= ((n + 1) * (n !)) / (((m + 1) !) * (l !)) by A12, A31, A32, NEWTON:15 .= ((n + 1) * (n !)) / (((m !) * (m + 1)) * (l !)) by NEWTON:15 .= ((n + 1) * (n !)) / ((m + 1) * ((m !) * (l !))) .= ((n + 1) / (m + 1)) / (((m !) * (l !)) / (n !)) by XCMPLX_1:84 .= ((n !) / ((m !) * (l !))) * ((n + 1) / (m + 1)) by XCMPLX_1:80 .= (n choose m) * ((n + 1) / (m + 1)) by A8, NEWTON:def_3 ; then (n + 1) choose m1 >= ((n + 1) choose k) * ((nk + 1) / (m + 1)) by A24, A34, XREAL_1:64; hence (n + 1) choose m1 >= (n + 1) choose k by A35, XXREAL_0:2; ::_thesis: verum end; end; end; end; end; hence S1[n + 1] ; ::_thesis: verum end; A36: S1[ 0 ] proof let k, m be Nat; ::_thesis: ( k <= m & m = [\(0 / 2)/] implies 0 choose m >= 0 choose k ) assume A37: k <= m ; ::_thesis: ( not m = [\(0 / 2)/] or 0 choose m >= 0 choose k ) assume m = [\(0 / 2)/] ; ::_thesis: 0 choose m >= 0 choose k then m = 0 by INT_1:25; hence 0 choose m >= 0 choose k by A37; ::_thesis: verum end; A38: for n being Nat holds S1[n] from NAT_1:sch_2(A36, A2); for n, k, m being Nat st k <= n & m = [\(n / 2)/] holds n choose m >= n choose k proof let n, k, m be Nat; ::_thesis: ( k <= n & m = [\(n / 2)/] implies n choose m >= n choose k ) A39: n in NAT by ORDINAL1:def_12; assume A40: k <= n ; ::_thesis: ( not m = [\(n / 2)/] or n choose m >= n choose k ) assume A41: m = [\(n / 2)/] ; ::_thesis: n choose m >= n choose k percases ( k <= m or k > m ) ; suppose k <= m ; ::_thesis: n choose m >= n choose k hence n choose m >= n choose k by A38, A41; ::_thesis: verum end; supposeA42: k > m ; ::_thesis: n choose m >= n choose k set r = n -' k; A43: n -' k = n - k by A40, XREAL_1:233; then A44: n choose k = n choose (n -' k) by A40, NEWTON:20; percases ( n is even or not n is even ) ; supposeA45: n is even ; ::_thesis: n choose m >= n choose k - k < - m by A42, XREAL_1:24; then A46: (- k) + n < (- m) + n by XREAL_1:6; ex j being Element of NAT st n = 2 * j by A39, A45, ABIAN:def_2; then n / 2 = [\(n / 2)/] by INT_1:25; hence n choose m >= n choose k by A38, A41, A43, A44, A46; ::_thesis: verum end; suppose not n is even ; ::_thesis: n choose m >= n choose k then consider j being Integer such that A47: n = (2 * j) + 1 by ABIAN:1; A48: k >= m + 1 by A42, NAT_1:13; A49: [\(n / 2)/] = [\(j + (1 / 2))/] by A47 .= j + [\(1 / 2)/] by INT_1:28 .= j + 0 by A1, INT_1:def_6 .= j ; percases ( k = m + 1 or k > m + 1 ) by A48, XXREAL_0:1; supposeA50: k = m + 1 ; ::_thesis: n choose m >= n choose k set nm1 = n - (m + 1); set nm = n - m; 2 * n >= 1 * n by XREAL_1:64; then A51: ( n / 2 >= [\(n / 2)/] & (2 * n) / 2 >= n / 2 ) by INT_1:def_6, XREAL_1:72; then A52: n >= m by A41, XXREAL_0:2; n - m = n -' m by A41, A51, XREAL_1:233, XXREAL_0:2; then reconsider nm = n - m as Element of NAT ; 2 * m >= 1 * m by XREAL_1:64; then A53: n >= m + 1 by A41, A47, A49, XREAL_1:6; then n - (m + 1) = n -' (m + 1) by XREAL_1:233; then reconsider nm1 = n - (m + 1) as Element of NAT ; A54: n choose (m + 1) = (n !) / ((nm1 !) * ((m + 1) !)) by A53, NEWTON:def_3; nm = m + 1 by A41, A47, A49; hence n choose m >= n choose k by A50, A52, A54, NEWTON:def_3; ::_thesis: verum end; suppose k > m + 1 ; ::_thesis: n choose m >= n choose k then - k < - (m + 1) by XREAL_1:24; then (- k) + n < (- (m + 1)) + n by XREAL_1:6; hence n choose m >= n choose k by A38, A41, A43, A44, A47, A49; ::_thesis: verum end; end; end; end; end; end; end; hence for n, k, m being Nat st k <= n & m = [\(n / 2)/] holds n choose m >= n choose k ; ::_thesis: verum end; theorem Th5: :: NAT_4:5 for n, m being Nat st m = [\(n / 2)/] & n >= 2 holds n choose m >= (2 |^ n) / n proof set f2a = <*1*>; let n, m be Nat; ::_thesis: ( m = [\(n / 2)/] & n >= 2 implies n choose m >= (2 |^ n) / n ) assume A1: m = [\(n / 2)/] ; ::_thesis: ( not n >= 2 or n choose m >= (2 |^ n) / n ) set f1 = Newton_Coeff n; set f2b = (n -' 1) |-> (n choose m); set f2 = (<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>; A2: Sum ((n -' 1) |-> (n choose m)) = (n -' 1) * (n choose m) by RVSUM_1:80; assume A3: n >= 2 ; ::_thesis: n choose m >= (2 |^ n) / n then A4: n -' 1 = n - 1 by XREAL_1:233, XXREAL_0:2; A5: len ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) = (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + (len <*1*>) by FINSEQ_1:22 .= (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + 1 by FINSEQ_1:39 .= ((len <*1*>) + (len ((n -' 1) |-> (n choose m)))) + 1 by FINSEQ_1:22 .= ((len <*1*>) + (n - 1)) + 1 by A4, CARD_1:def_7 .= (1 + (n - 1)) + 1 by FINSEQ_1:39 .= n + 1 ; len (Newton_Coeff n) = n + 1 by NEWTON:def_5; then dom (Newton_Coeff n) = Seg (n + 1) by FINSEQ_1:def_3; then A6: dom (Newton_Coeff n) = dom ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) by A5, FINSEQ_1:def_3; A7: for i being Element of NAT st i in dom (Newton_Coeff n) holds (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i proof let i be Element of NAT ; ::_thesis: ( i in dom (Newton_Coeff n) implies (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i ) assume A8: i in dom (Newton_Coeff n) ; ::_thesis: (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i percases ( i in dom (<*1*> ^ ((n -' 1) |-> (n choose m))) or ex j being Nat st ( j in dom <*1*> & i = (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + j ) ) by A6, A8, FINSEQ_1:25; supposeA9: i in dom (<*1*> ^ ((n -' 1) |-> (n choose m))) ; ::_thesis: (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i then A10: ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i = (<*1*> ^ ((n -' 1) |-> (n choose m))) . i by FINSEQ_1:def_7; percases ( i in dom <*1*> or ex j being Nat st ( j in dom ((n -' 1) |-> (n choose m)) & i = (len <*1*>) + j ) ) by A9, FINSEQ_1:25; supposeA11: i in dom <*1*> ; ::_thesis: (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i set k = 1 - 1; 1 - 1 = 0 ; then reconsider k = 1 - 1 as Element of NAT ; A12: ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i = <*1*> . i by A10, A11, FINSEQ_1:def_7; i in Seg 1 by A11, FINSEQ_1:38; then A13: i = 1 by FINSEQ_1:2, TARSKI:def_1; then (Newton_Coeff n) . i = n choose k by A8, NEWTON:def_5 .= 1 by NEWTON:19 ; hence (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i by A12, A13, FINSEQ_1:40; ::_thesis: verum end; supposeA14: ex j being Nat st ( j in dom ((n -' 1) |-> (n choose m)) & i = (len <*1*>) + j ) ; ::_thesis: (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i set k = i -' 1; consider j being Nat such that A15: j in dom ((n -' 1) |-> (n choose m)) and A16: i = (len <*1*>) + j by A14; A17: j in Seg (n -' 1) by A15, FUNCOP_1:13; j + 1 >= 0 + 1 by XREAL_1:6; then i >= 1 by A16, FINSEQ_1:39; then A18: i -' 1 = i - 1 by XREAL_1:233; ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i = ((n -' 1) |-> (n choose m)) . j by A10, A15, A16, FINSEQ_1:def_7; then A19: ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i = n choose m by A17, FUNCOP_1:7; i = 1 + j by A16, FINSEQ_1:39; then ( (- 1) + n < 0 + n & i - 1 <= n - 1 ) by A4, A17, FINSEQ_1:1, XREAL_1:6; then A20: i -' 1 <= n by A18, XXREAL_0:2; (Newton_Coeff n) . i = n choose (i -' 1) by A8, A18, NEWTON:def_5; hence (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i by A1, A19, A20, Th4; ::_thesis: verum end; end; end; supposeA21: ex j being Nat st ( j in dom <*1*> & i = (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + j ) ; ::_thesis: (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i reconsider k = (n + 1) - 1 as Element of NAT by ORDINAL1:def_12; consider j being Nat such that A22: j in dom <*1*> and A23: i = (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + j by A21; A24: j in Seg 1 by A22, FINSEQ_1:38; then A25: j = 1 by FINSEQ_1:2, TARSKI:def_1; i = (len (<*1*> ^ ((n -' 1) |-> (n choose m)))) + 1 by A23, A24, FINSEQ_1:2, TARSKI:def_1 .= ((len <*1*>) + (len ((n -' 1) |-> (n choose m)))) + 1 by FINSEQ_1:22 .= ((len <*1*>) + (n - 1)) + 1 by A4, CARD_1:def_7 .= (1 + (n - 1)) + 1 by FINSEQ_1:39 .= n + 1 ; then A26: (Newton_Coeff n) . i = n choose k by A8, NEWTON:def_5 .= 1 by NEWTON:21 ; ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i = <*1*> . j by A22, A23, FINSEQ_1:def_7; hence (Newton_Coeff n) . i <= ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) . i by A25, A26, FINSEQ_1:40; ::_thesis: verum end; end; end; 1 <= n by A3, XXREAL_0:2; then A27: n choose 1 <= n choose m by A1, Th4; 2 <= n choose 1 by A3, NEWTON:23, XXREAL_0:2; then 2 <= n choose m by A27, XXREAL_0:2; then A28: 2 + ((n - 1) * (n choose m)) <= (n choose m) + ((n - 1) * (n choose m)) by XREAL_1:6; A29: Sum ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) = (Sum (<*1*> ^ ((n -' 1) |-> (n choose m)))) + 1 by RVSUM_1:74 .= (1 + (Sum ((n -' 1) |-> (n choose m)))) + 1 by RVSUM_1:76 .= 2 + ((n -' 1) * (n choose m)) by A2 .= 2 + ((n - 1) * (n choose m)) by A3, XREAL_1:233, XXREAL_0:2 ; len (Newton_Coeff n) = len ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) by A5, NEWTON:def_5; then Sum (Newton_Coeff n) <= Sum ((<*1*> ^ ((n -' 1) |-> (n choose m))) ^ <*1*>) by A7, INTEGRA5:3; then 2 |^ n <= 2 + ((n - 1) * (n choose m)) by A29, NEWTON:32; then 2 |^ n <= n * (n choose m) by A28, XXREAL_0:2; then (2 |^ n) / n <= (n * (n choose m)) / n by XREAL_1:72; hence n choose m >= (2 |^ n) / n by A3, XCMPLX_1:89; ::_thesis: verum end; theorem Th6: :: NAT_4:6 for n being Nat holds (2 * n) choose n >= (4 |^ n) / (2 * n) proof let n be Nat; ::_thesis: (2 * n) choose n >= (4 |^ n) / (2 * n) percases ( n = 0 or n <> 0 ) ; suppose n = 0 ; ::_thesis: (2 * n) choose n >= (4 |^ n) / (2 * n) hence (2 * n) choose n >= (4 |^ n) / (2 * n) ; ::_thesis: verum end; supposeA1: n <> 0 ; ::_thesis: (2 * n) choose n >= (4 |^ n) / (2 * n) set m = [\((2 * n) / 2)/]; A2: 2 |^ 2 = Product <*2,2*> by FINSEQ_2:61 .= 2 * 2 by RVSUM_1:99 .= 4 ; A3: [\((2 * n) / 2)/] = n by INT_1:25; then reconsider m = [\((2 * n) / 2)/] as Element of NAT by ORDINAL1:def_12; 2 * n >= 2 * 1 by A1, NAT_1:14, XREAL_1:64; then (2 * n) choose m >= (2 |^ (2 * n)) / (2 * n) by Th5; hence (2 * n) choose n >= (4 |^ n) / (2 * n) by A2, A3, NEWTON:9; ::_thesis: verum end; end; end; theorem Th7: :: NAT_4:7 for n, p being Nat st p > 0 & n divides p & n <> 1 & n <> p holds ( 1 < n & n < p ) proof let n, p be Nat; ::_thesis: ( p > 0 & n divides p & n <> 1 & n <> p implies ( 1 < n & n < p ) ) assume A1: ( p > 0 & n divides p ) ; ::_thesis: ( not n <> 1 or not n <> p or ( 1 < n & n < p ) ) assume A2: n <> 1 ; ::_thesis: ( not n <> p or ( 1 < n & n < p ) ) assume A3: n <> p ; ::_thesis: ( 1 < n & n < p ) n <> 0 by A1, INT_2:3; hence 1 < n by A2, NAT_1:25; ::_thesis: n < p n <= p by A1, NAT_D:7; hence n < p by A3, XXREAL_0:1; ::_thesis: verum end; theorem Th8: :: NAT_4:8 for p being Nat st ex n being Element of NAT st ( n divides p & 1 < n & n < p ) holds ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) proof let p be Nat; ::_thesis: ( ex n being Element of NAT st ( n divides p & 1 < n & n < p ) implies ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) ) given n being Element of NAT such that A1: n divides p and A2: 1 < n and A3: n < p ; ::_thesis: ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) percases ( n * n <= p or n * n > p ) ; supposeA4: n * n <= p ; ::_thesis: ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) take n ; ::_thesis: ( n divides p & 1 < n & n * n <= p ) thus ( n divides p & 1 < n & n * n <= p ) by A1, A2, A4; ::_thesis: verum end; supposeA5: n * n > p ; ::_thesis: ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) consider k being Nat such that A6: p = n * k by A1, NAT_D:def_3; A7: k * k <= p proof assume k * k > p ; ::_thesis: contradiction then (k * k) * (n * n) > p * p by A5, XREAL_1:96; hence contradiction by A6; ::_thesis: verum end; take k ; ::_thesis: ( k is Element of REAL & k is Element of NAT & k divides p & 1 < k & k * k <= p ) n / n < (n * k) / n by A2, A3, A6, XREAL_1:74; then 1 < (k * n) / n by A2, XCMPLX_1:60; hence ( k is Element of REAL & k is Element of NAT & k divides p & 1 < k & k * k <= p ) by A2, A6, A7, NAT_D:def_3, ORDINAL1:def_12, XCMPLX_1:89; ::_thesis: verum end; end; end; theorem Th9: :: NAT_4:9 for i, j, k, l being Nat st i = (j * k) + l & l < j & 0 < l holds not j divides i proof let i, j, k, l be Nat; ::_thesis: ( i = (j * k) + l & l < j & 0 < l implies not j divides i ) assume A1: i = (j * k) + l ; ::_thesis: ( not l < j or not 0 < l or not j divides i ) assume that A2: l < j and A3: 0 < l ; ::_thesis: not j divides i assume j divides i ; ::_thesis: contradiction then i = j * (i div j) by NAT_D:3; then j * (i div j) = (j * (i div j)) + l by A1, A2, NAT_D:def_1; hence contradiction by A3; ::_thesis: verum end; theorem :: NAT_4:10 for n, q, b being Nat st q gcd b = 1 & q <> 0 & b <> 0 holds (q |^ n) gcd b = 1 proof let n, q, b be Nat; ::_thesis: ( q gcd b = 1 & q <> 0 & b <> 0 implies (q |^ n) gcd b = 1 ) assume that A1: q gcd b = 1 and A2: ( q <> 0 & b <> 0 ) ; ::_thesis: (q |^ n) gcd b = 1 q,b are_relative_prime by A1, INT_2:def_3; then q |^ n,b are_relative_prime by A2, EULER_2:17; hence (q |^ n) gcd b = 1 by INT_2:def_3; ::_thesis: verum end; theorem Th11: :: NAT_4:11 for a, b, c being Nat holds (a |^ (2 * b)) mod c = (((a |^ b) mod c) * ((a |^ b) mod c)) mod c proof let a, b, c be Nat; ::_thesis: (a |^ (2 * b)) mod c = (((a |^ b) mod c) * ((a |^ b) mod c)) mod c reconsider a = a, b = b, c = c as Element of NAT by ORDINAL1:def_12; (a |^ (2 * b)) mod c = (a |^ (b + b)) mod c .= ((a |^ b) * (a |^ b)) mod c by NEWTON:8 .= (((a |^ b) mod c) * ((a |^ b) mod c)) mod c by EULER_2:9 ; hence (a |^ (2 * b)) mod c = (((a |^ b) mod c) * ((a |^ b) mod c)) mod c ; ::_thesis: verum end; theorem Th12: :: NAT_4:12 for p being Nat holds ( ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n < p ) ) iff not p is prime ) proof now__::_thesis:_for_p_being_Nat_st_not_p_is_prime_&_not_p_<=_1_holds_ ex_n_being_Element_of_NAT_st_ (_n_divides_p_&_1_<_n_&_n_<_p_) let p be Nat; ::_thesis: ( not p is prime & not p <= 1 implies ex n being Element of NAT st ( n divides p & 1 < n & n < p ) ) assume that A1: not p is prime and A2: not p <= 1 ; ::_thesis: ex n being Element of NAT st ( n divides p & 1 < n & n < p ) consider n being Nat such that A3: n divides p and A4: ( n <> 1 & n <> p ) by A1, A2, INT_2:def_4; reconsider n = n as Element of NAT by ORDINAL1:def_12; take n = n; ::_thesis: ( n divides p & 1 < n & n < p ) thus n divides p by A3; ::_thesis: ( 1 < n & n < p ) thus ( 1 < n & n < p ) by A2, A3, A4, Th7; ::_thesis: verum end; hence for p being Nat holds ( ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n < p ) ) iff not p is prime ) by INT_2:def_4; ::_thesis: verum end; theorem Th13: :: NAT_4:13 for n, k being Nat st n divides k & 1 < n holds ex p being Element of NAT st ( p divides k & p <= n & p is prime ) proof let n, k be Nat; ::_thesis: ( n divides k & 1 < n implies ex p being Element of NAT st ( p divides k & p <= n & p is prime ) ) assume A1: n divides k ; ::_thesis: ( not 1 < n or ex p being Element of NAT st ( p divides k & p <= n & p is prime ) ) assume A2: 1 < n ; ::_thesis: ex p being Element of NAT st ( p divides k & p <= n & p is prime ) then 1 + 1 < n + 1 by XREAL_1:6; then 2 <= n by NAT_1:13; then consider p being Element of NAT such that A3: p is prime and A4: p divides n by INT_2:31; take p ; ::_thesis: ( p divides k & p <= n & p is prime ) thus p divides k by A1, A4, NAT_D:4; ::_thesis: ( p <= n & p is prime ) thus p <= n by A2, A4, NAT_D:7; ::_thesis: p is prime thus p is prime by A3; ::_thesis: verum end; Lm1: for p being Nat holds ( ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p & n is prime ) ) iff not p is prime ) proof let p be Nat; ::_thesis: ( ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p & n is prime ) ) iff not p is prime ) A1: now__::_thesis:_(_not_p_is_prime_&_not_p_<=_1_implies_ex_n_being_Element_of_NAT_st_ (_n_divides_p_&_1_<_n_&_n_*_n_<=_p_&_n_is_prime_)_) assume A2: not p is prime ; ::_thesis: ( not p <= 1 implies ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p & n is prime ) ) assume not p <= 1 ; ::_thesis: ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p & n is prime ) then ex k being Element of NAT st ( k divides p & 1 < k & k < p ) by A2, Th12; then consider k being Element of NAT such that A3: ( k divides p & 1 < k ) and A4: k * k <= p by Th8; consider n being Element of NAT such that A5: n divides p and A6: n <= k and A7: n is prime by A3, Th13; take n = n; ::_thesis: ( n divides p & 1 < n & n * n <= p & n is prime ) thus n divides p by A5; ::_thesis: ( 1 < n & n * n <= p & n is prime ) thus 1 < n by A7, Th12; ::_thesis: ( n * n <= p & n is prime ) n * n <= k * k by A6, XREAL_1:66; hence n * n <= p by A4, XXREAL_0:2; ::_thesis: n is prime thus n is prime by A7; ::_thesis: verum end; now__::_thesis:_(_(_p_<=_1_or_ex_n_being_Element_of_NAT_st_ (_n_divides_p_&_1_<_n_&_n_*_n_<=_p_)_)_implies_not_p_is_prime_) assume A8: ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) ) ; ::_thesis: not p is prime percases ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) ) by A8; suppose p <= 1 ; ::_thesis: not p is prime hence not p is prime by Th12; ::_thesis: verum end; suppose ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p ) ; ::_thesis: not p is prime then consider n being Element of NAT such that A9: n divides p and A10: 1 < n and A11: n * n <= p ; n < p by A10, A11, Th2; hence not p is prime by A9, A10, Th12; ::_thesis: verum end; end; end; hence ( ( p <= 1 or ex n being Element of NAT st ( n divides p & 1 < n & n * n <= p & n is prime ) ) iff not p is prime ) by A1; ::_thesis: verum end; theorem Th14: :: NAT_4:14 for p being Nat holds ( p is prime iff ( p > 1 & ( for n being Element of NAT st 1 < n & n * n <= p & n is prime holds not n divides p ) ) ) proof now__::_thesis:_for_p_being_Nat_st_p_>_1_&_(_for_n_being_Element_of_NAT_holds_ (_not_1_<_n_or_not_n_*_n_<=_p_or_not_n_is_prime_or_not_n_divides_p_)_)_holds_ p_is_prime let p be Nat; ::_thesis: ( p > 1 & ( for n being Element of NAT holds ( not 1 < n or not n * n <= p or not n is prime or not n divides p ) ) implies p is prime ) assume A1: p > 1 ; ::_thesis: ( ( for n being Element of NAT holds ( not 1 < n or not n * n <= p or not n is prime or not n divides p ) ) implies p is prime ) assume for n being Element of NAT holds ( not 1 < n or not n * n <= p or not n is prime or not n divides p ) ; ::_thesis: p is prime then for n being Element of NAT holds ( not n divides p or not 1 < n or not n * n <= p or not n is prime ) ; hence p is prime by A1, Lm1; ::_thesis: verum end; hence for p being Nat holds ( p is prime iff ( p > 1 & ( for n being Element of NAT st 1 < n & n * n <= p & n is prime holds not n divides p ) ) ) by Lm1; ::_thesis: verum end; theorem Th15: :: NAT_4:15 for a, p, k being Nat st (a |^ k) mod p = 1 & k >= 1 & p is prime holds a,p are_relative_prime proof let a, p, k be Nat; ::_thesis: ( (a |^ k) mod p = 1 & k >= 1 & p is prime implies a,p are_relative_prime ) assume that A1: (a |^ k) mod p = 1 and A2: k >= 1 ; ::_thesis: ( not p is prime or a,p are_relative_prime ) assume A3: p is prime ; ::_thesis: a,p are_relative_prime assume A4: not a,p are_relative_prime ; ::_thesis: contradiction reconsider a = a, p = p, k = k as Element of NAT by ORDINAL1:def_12; a gcd p = p by A3, A4, PEPIN:2; then p divides a by NAT_D:def_5; then consider i being Nat such that A5: a = p * i by NAT_D:def_3; (((p * i) mod p) |^ k) mod p = 1 by A1, A5, PEPIN:12; then (0 |^ k) mod p = 1 by NAT_D:13; then (p * 0) mod p = 1 by A2, NEWTON:11; hence contradiction by NAT_D:13; ::_thesis: verum end; theorem Th16: :: NAT_4:16 for p being Prime for a being Element of NAT for x being set st a <> 0 & x = p |^ (p |-count a) holds ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) proof let p be Prime; ::_thesis: for a being Element of NAT for x being set st a <> 0 & x = p |^ (p |-count a) holds ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) let a be Element of NAT ; ::_thesis: for x being set st a <> 0 & x = p |^ (p |-count a) holds ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) let x be set ; ::_thesis: ( a <> 0 & x = p |^ (p |-count a) implies ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) ) assume A1: a <> 0 ; ::_thesis: ( not x = p |^ (p |-count a) or ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) ) assume A2: x = p |^ (p |-count a) ; ::_thesis: ex b being Element of NAT st ( b = x & 1 <= b & b <= a ) then reconsider b = x as Element of NAT by ORDINAL1:def_12; take b ; ::_thesis: ( b = x & 1 <= b & b <= a ) thus b = x ; ::_thesis: ( 1 <= b & b <= a ) p >= 1 by INT_2:def_4; hence 1 <= b by A2, PREPOWER:11; ::_thesis: b <= a p <> 1 by INT_2:def_4; then b divides a by A1, A2, NAT_3:def_7; hence b <= a by A1, NAT_D:7; ::_thesis: verum end; theorem Th17: :: NAT_4:17 for k, q, n, d being Element of NAT st q is prime & d divides k * (q |^ (n + 1)) & not d divides k * (q |^ n) holds q |^ (n + 1) divides d proof defpred S1[ Nat] means for k, q, d being Element of NAT st q is prime & d divides k * (q |^ ($1 + 1)) & not d divides k * (q |^ $1) holds q |^ ($1 + 1) divides d; A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: for k, q, d being Element of NAT st q is prime & d divides k * (q |^ (n + 1)) & not d divides k * (q |^ n) holds q |^ (n + 1) divides d ; ::_thesis: S1[n + 1] for k, q, d being Element of NAT st q is prime & d divides k * (q |^ ((n + 1) + 1)) & not d divides k * (q |^ (n + 1)) holds q |^ ((n + 1) + 1) divides d proof let k, q, d be Element of NAT ; ::_thesis: ( q is prime & d divides k * (q |^ ((n + 1) + 1)) & not d divides k * (q |^ (n + 1)) implies q |^ ((n + 1) + 1) divides d ) assume A3: q is prime ; ::_thesis: ( not d divides k * (q |^ ((n + 1) + 1)) or d divides k * (q |^ (n + 1)) or q |^ ((n + 1) + 1) divides d ) assume A4: d divides k * (q |^ ((n + 1) + 1)) ; ::_thesis: ( d divides k * (q |^ (n + 1)) or q |^ ((n + 1) + 1) divides d ) then consider i being Nat such that A5: k * (q |^ ((n + 1) + 1)) = d * i by NAT_D:def_3; assume A6: not d divides k * (q |^ (n + 1)) ; ::_thesis: q |^ ((n + 1) + 1) divides d then not d divides k * (q * (q |^ n)) by NEWTON:6; then A7: not d divides (k * q) * (q |^ n) ; d divides k * (q * (q |^ (n + 1))) by A4, NEWTON:6; then d divides (k * q) * (q |^ (n + 1)) ; then q |^ (n + 1) divides d by A2, A3, A7; then consider j being Nat such that A8: d = (q |^ (n + 1)) * j by NAT_D:def_3; A9: not q divides i proof assume q divides i ; ::_thesis: contradiction then consider i1 being Nat such that A10: i = q * i1 by NAT_D:def_3; k * ((q |^ (n + 1)) * q) = d * (q * i1) by A5, A10, NEWTON:6; then (k * (q |^ (n + 1))) * q = (d * i1) * q ; then k * (q |^ (n + 1)) = d * i1 by A3, XCMPLX_1:5; hence contradiction by A6, NAT_D:def_3; ::_thesis: verum end; k * (q |^ ((n + 1) + 1)) = k * ((q |^ (n + 1)) * q) by NEWTON:6 .= (k * q) * (q |^ (n + 1)) ; then (k * q) * (q |^ (n + 1)) = (j * i) * (q |^ (n + 1)) by A5, A8; then k * q = j * i by A3, XCMPLX_1:5; then q divides j * i by NAT_D:def_3; then q divides j by A3, A9, NEWTON:80; then consider j1 being Nat such that A11: j = q * j1 by NAT_D:def_3; d = ((q |^ (n + 1)) * q) * j1 by A8, A11; then d = (q |^ ((n + 1) + 1)) * j1 by NEWTON:6; hence q |^ ((n + 1) + 1) divides d by NAT_D:def_3; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A12: S1[ 0 ] proof let k, q, d be Element of NAT ; ::_thesis: ( q is prime & d divides k * (q |^ (0 + 1)) & not d divides k * (q |^ 0) implies q |^ (0 + 1) divides d ) assume that A13: q is prime and A14: d divides k * (q |^ (0 + 1)) and A15: not d divides k * (q |^ 0) ; ::_thesis: q |^ (0 + 1) divides d d divides k * q by A14, NEWTON:5; then consider i being Nat such that A16: k * q = d * i by NAT_D:def_3; assume not q |^ (0 + 1) divides d ; ::_thesis: contradiction then A17: not q divides d by NEWTON:5; q divides d * i by A16, NAT_D:def_3; then q divides i by A13, A17, NEWTON:80; then consider j being Nat such that A18: i = q * j by NAT_D:def_3; (d * j) * q = k * q by A16, A18; then A19: d * j = k by A13, XCMPLX_1:5; not d divides k * 1 by A15, NEWTON:4; hence contradiction by A19, NAT_D:def_3; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A12, A1); hence for k, q, n, d being Element of NAT st q is prime & d divides k * (q |^ (n + 1)) & not d divides k * (q |^ n) holds q |^ (n + 1) divides d ; ::_thesis: verum end; theorem Th18: :: NAT_4:18 for q1, q, n1 being Element of NAT st q1 divides q |^ n1 & q is prime & q1 is prime holds q = q1 proof let q1, q, n1 be Element of NAT ; ::_thesis: ( q1 divides q |^ n1 & q is prime & q1 is prime implies q = q1 ) assume that A1: q1 divides q |^ n1 and A2: q is prime ; ::_thesis: ( not q1 is prime or q = q1 ) assume A3: q1 is prime ; ::_thesis: q = q1 then q1 > 1 by INT_2:def_4; then consider k being Element of NAT such that A4: q1 = q * k by A1, A2, PEPIN:32; A5: k <> q1 proof assume k = q1 ; ::_thesis: contradiction then q = 1 by A3, A4, XCMPLX_1:7; hence contradiction by A2, INT_2:def_4; ::_thesis: verum end; k divides q1 by A4, NAT_D:def_3; then ( k = 1 or k = q1 ) by A3, INT_2:def_4; hence q = q1 by A4, A5; ::_thesis: verum end; theorem Th19: :: NAT_4:19 for p being Prime for n being Element of NAT st n < p holds not p divides n ! proof defpred S1[ Nat] means for p being Prime st $1 < p holds not p divides $1 ! ; let p be Prime; ::_thesis: for n being Element of NAT st n < p holds not p divides n ! let n be Element of NAT ; ::_thesis: ( n < p implies not p divides n ! ) assume A1: n < p ; ::_thesis: not p divides n ! A2: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] for p being Prime st n + 1 < p holds not p divides (n + 1) ! proof let p be Prime; ::_thesis: ( n + 1 < p implies not p divides (n + 1) ! ) assume A4: n + 1 < p ; ::_thesis: not p divides (n + 1) ! assume p divides (n + 1) ! ; ::_thesis: contradiction then A5: p divides (n !) * (n + 1) by NEWTON:15; n + 0 < n + 1 by XREAL_1:6; then n < p by A4, XXREAL_0:2; then not p divides n ! by A3; then p divides n + 1 by A5, NEWTON:80; hence contradiction by A4, NAT_D:7; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A6: S1[ 0 ] proof let p be Prime; ::_thesis: ( 0 < p implies not p divides 0 ! ) assume 0 < p ; ::_thesis: not p divides 0 ! assume p divides 0 ! ; ::_thesis: contradiction then p <= 1 by NAT_D:7, NEWTON:12; hence contradiction by INT_2:def_4; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A6, A2); hence not p divides n ! by A1; ::_thesis: verum end; theorem Th20: :: NAT_4:20 for a, b being non empty Nat st ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) holds ex c being Element of NAT st b = a * c proof A1: for a, a1, b, b1 being non empty Nat for x being Prime st ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) & a1 = a div (x |^ (x |-count a)) & b1 = b div (x |^ (x |-count b)) holds for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 proof let a, a1, b, b1 be non empty Nat; ::_thesis: for x being Prime st ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) & a1 = a div (x |^ (x |-count a)) & b1 = b div (x |^ (x |-count b)) holds for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 let x be Prime; ::_thesis: ( ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) & a1 = a div (x |^ (x |-count a)) & b1 = b div (x |^ (x |-count b)) implies for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 ) assume A2: for p being Element of NAT st p is prime holds p |-count a <= p |-count b ; ::_thesis: ( not a1 = a div (x |^ (x |-count a)) or not b1 = b div (x |^ (x |-count b)) or for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 ) set xcb = x |-count b; set xca = x |-count a; assume A3: a1 = a div (x |^ (x |-count a)) ; ::_thesis: ( not b1 = b div (x |^ (x |-count b)) or for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 ) assume A4: b1 = b div (x |^ (x |-count b)) ; ::_thesis: for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 let p be Element of NAT ; ::_thesis: ( p is prime implies p |-count a1 <= p |-count b1 ) assume A5: p is prime ; ::_thesis: p |-count a1 <= p |-count b1 then A6: p > 1 by INT_2:def_4; A7: x > 1 by INT_2:def_4; then x |^ (x |-count a) divides a by NAT_3:def_7; then A8: p |-count a1 = (p |-count a) -' (p |-count (x |^ (x |-count a))) by A3, A5, NAT_3:31; x |^ (x |-count b) divides b by A7, NAT_3:def_7; then A9: p |-count b1 = (p |-count b) -' (p |-count (x |^ (x |-count b))) by A4, A5, NAT_3:31; percases ( x = p or x <> p ) ; suppose x = p ; ::_thesis: p |-count a1 <= p |-count b1 then p |-count (x |^ (x |-count a)) = p |-count a by A6, NAT_3:25; hence p |-count a1 <= p |-count b1 by A8, NAT_2:8; ::_thesis: verum end; supposeA10: x <> p ; ::_thesis: p |-count a1 <= p |-count b1 p |-count (x |^ (x |-count b)) = (x |-count b) * (p |-count x) by A5, NAT_3:32 .= (x |-count b) * 0 by A6, A10, NAT_3:24 .= 0 ; then A11: p |-count b1 = (p |-count b) - 0 by A9, XREAL_1:233 .= p |-count b ; p |-count (x |^ (x |-count a)) = (x |-count a) * (p |-count x) by A5, NAT_3:32 .= (x |-count a) * 0 by A6, A10, NAT_3:24 .= 0 ; then p |-count a1 = (p |-count a) - 0 by A8, XREAL_1:233 .= p |-count a ; hence p |-count a1 <= p |-count b1 by A2, A5, A11; ::_thesis: verum end; end; end; A12: for a being non empty Nat for x being Prime holds a div (x |^ (x |-count a)) is non empty Nat proof let a be non empty Nat; ::_thesis: for x being Prime holds a div (x |^ (x |-count a)) is non empty Nat let x be Prime; ::_thesis: a div (x |^ (x |-count a)) is non empty Nat assume A13: a div (x |^ (x |-count a)) is not non empty Nat ; ::_thesis: contradiction set xca = x |^ (x |-count a); x > 1 by INT_2:def_4; then A14: x |^ (x |-count a) divides a by NAT_3:def_7; ex t being Nat st ( a = ((x |^ (x |-count a)) * 0) + t & t < x |^ (x |-count a) ) by A13, NAT_D:def_1; hence contradiction by A14, NAT_D:7; ::_thesis: verum end; defpred S1[ Nat] means for a, b being non empty Nat st card (support (pfexp b)) = $1 & ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) holds ex c being Element of NAT st b = a * c; let a, b be non empty Nat; ::_thesis: ( ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) implies ex c being Element of NAT st b = a * c ) assume A15: for p being Element of NAT st p is prime holds p |-count a <= p |-count b ; ::_thesis: ex c being Element of NAT st b = a * c A16: ex n1 being Element of NAT st n1 = card (support (pfexp b)) ; A17: for n1, n2 being non empty Nat st n1 divides n2 holds (n2 div n1) * n1 = n2 proof let n1, n2 be non empty Nat; ::_thesis: ( n1 divides n2 implies (n2 div n1) * n1 = n2 ) assume n1 divides n2 ; ::_thesis: (n2 div n1) * n1 = n2 then ex a being Nat st n2 = n1 * a by NAT_D:def_3; hence (n2 div n1) * n1 = n2 by NAT_D:18; ::_thesis: verum end; A18: for b, b1 being non empty Nat for x being Prime for n being Element of NAT st card (support (pfexp b)) = n + 1 & b1 = b div (x |^ (x |-count b)) & x in support (pfexp b) holds card (support (pfexp b1)) = n proof let b, b1 be non empty Nat; ::_thesis: for x being Prime for n being Element of NAT st card (support (pfexp b)) = n + 1 & b1 = b div (x |^ (x |-count b)) & x in support (pfexp b) holds card (support (pfexp b1)) = n let x be Prime; ::_thesis: for n being Element of NAT st card (support (pfexp b)) = n + 1 & b1 = b div (x |^ (x |-count b)) & x in support (pfexp b) holds card (support (pfexp b1)) = n let n be Element of NAT ; ::_thesis: ( card (support (pfexp b)) = n + 1 & b1 = b div (x |^ (x |-count b)) & x in support (pfexp b) implies card (support (pfexp b1)) = n ) assume A19: card (support (pfexp b)) = n + 1 ; ::_thesis: ( not b1 = b div (x |^ (x |-count b)) or not x in support (pfexp b) or card (support (pfexp b1)) = n ) set xcb = x |-count b; assume A20: b1 = b div (x |^ (x |-count b)) ; ::_thesis: ( not x in support (pfexp b) or card (support (pfexp b1)) = n ) A21: x > 1 by INT_2:def_4; then x |^ (x |-count b) divides b by NAT_3:def_7; then A22: b = b1 * (x |^ (x |-count b)) by A17, A20; reconsider b1 = b1 as Element of NAT by ORDINAL1:def_12; A23: b1,x are_relative_prime proof assume not b1,x are_relative_prime ; ::_thesis: contradiction then b1 gcd x = x by PEPIN:2; then x divides b1 by NAT_D:def_5; then consider c being Nat such that A24: b1 = x * c by NAT_D:def_3; A25: not x |^ ((x |-count b) + 1) divides b by A21, NAT_3:def_7; x |^ (x |-count b) divides b by A21, NAT_3:def_7; then b = (x * c) * (x |^ (x |-count b)) by A17, A20, A24 .= c * ((x |^ (x |-count b)) * x) .= c * (x |^ ((x |-count b) + 1)) by NEWTON:6 ; hence contradiction by A25, NAT_D:def_3; ::_thesis: verum end; assume x in support (pfexp b) ; ::_thesis: card (support (pfexp b1)) = n then (pfexp b) . x <> 0 by PRE_POLY:def_7; then A26: x |-count b <> 0 by NAT_3:def_8; reconsider b1 = b1 as non empty Nat ; card (support (pfexp ((x |^ (x |-count b)) * b1))) = (card (support (pfexp (x |^ (x |-count b))))) + (card (support (pfexp b1))) by A23, EULER_2:17, NAT_3:47; then n + 1 = (card {x}) + (card (support (pfexp b1))) by A19, A22, A26, NAT_3:42; then n + 1 = 1 + (card (support (pfexp b1))) by CARD_2:42; hence card (support (pfexp b1)) = n ; ::_thesis: verum end; A27: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A28: S1[n] ; ::_thesis: S1[n + 1] for a, b being non empty Nat st card (support (pfexp b)) = n + 1 & ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) holds ex c being Element of NAT st b = a * c proof let a, b be non empty Nat; ::_thesis: ( card (support (pfexp b)) = n + 1 & ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) implies ex c being Element of NAT st b = a * c ) assume A29: card (support (pfexp b)) = n + 1 ; ::_thesis: ( ex p being Element of NAT st ( p is prime & not p |-count a <= p |-count b ) or ex c being Element of NAT st b = a * c ) then support (pfexp b) <> {} ; then consider x being set such that A30: x in support (pfexp b) by XBOOLE_0:def_1; reconsider x = x as Prime by A30, NAT_3:34; set a1 = a div (x |^ (x |-count a)); set b1 = b div (x |^ (x |-count b)); reconsider a1 = a div (x |^ (x |-count a)), b1 = b div (x |^ (x |-count b)) as non empty Nat by A12; assume A31: for p being Element of NAT st p is prime holds p |-count a <= p |-count b ; ::_thesis: ex c being Element of NAT st b = a * c then A32: for p being Element of NAT st p is prime holds p |-count a1 <= p |-count b1 by A1; set xca = x |-count a; set xcb = x |-count b; x in NAT by ORDINAL1:def_12; then A33: (x |-count b) - (x |-count a) = (x |-count b) -' (x |-count a) by A31, XREAL_1:233; card (support (pfexp b1)) = n by A18, A29, A30; then consider d being Element of NAT such that A34: b1 = a1 * d by A28, A32; reconsider e = d * (x |^ ((x |-count b) -' (x |-count a))) as Element of NAT ; take e ; ::_thesis: b = a * e A35: x <> 1 by INT_2:def_4; then A36: x |^ (x |-count a) divides a by NAT_3:def_7; x |^ (x |-count b) divides b by A35, NAT_3:def_7; then b = (d * (a div (x |^ (x |-count a)))) * (x |^ ((x |-count a) + ((x |-count b) -' (x |-count a)))) by A17, A34, A33 .= (d * (a div (x |^ (x |-count a)))) * ((x |^ (x |-count a)) * (x |^ ((x |-count b) -' (x |-count a)))) by NEWTON:8 .= (d * ((a div (x |^ (x |-count a))) * (x |^ (x |-count a)))) * (x |^ ((x |-count b) -' (x |-count a))) .= (d * a) * (x |^ ((x |-count b) -' (x |-count a))) by A17, A36 .= a * (d * (x |^ ((x |-count b) -' (x |-count a)))) ; hence b = a * e ; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A37: S1[ 0 ] proof let a, b be non empty Nat; ::_thesis: ( card (support (pfexp b)) = 0 & ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) implies ex c being Element of NAT st b = a * c ) assume A38: card (support (pfexp b)) = 0 ; ::_thesis: ( ex p being Element of NAT st ( p is prime & not p |-count a <= p |-count b ) or ex c being Element of NAT st b = a * c ) ( ( for p being Element of NAT st p is prime holds p |-count a <= p |-count b ) implies ex c being Element of NAT st b = a * c ) proof set d = 1; assume A39: for p being Element of NAT st p is prime holds p |-count a <= p |-count b ; ::_thesis: ex c being Element of NAT st b = a * c take 1 ; ::_thesis: b = a * 1 A40: support (pfexp b) = {} by A38; support (pfexp a) = {} proof assume support (pfexp a) <> {} ; ::_thesis: contradiction then consider x being set such that A41: x in support (pfexp a) by XBOOLE_0:def_1; reconsider x = x as Prime by A41, NAT_3:34; reconsider x = x as prime Element of NAT by ORDINAL1:def_12; (pfexp a) . x <> 0 by A41, PRE_POLY:def_7; then x |-count a <> 0 by NAT_3:def_8; then x |-count b > 0 by A39; then (pfexp b) . x <> 0 by NAT_3:def_8; hence contradiction by A40, PRE_POLY:def_7; ::_thesis: verum end; then a = 1 by NAT_3:52; hence b = a * 1 by A40, NAT_3:52; ::_thesis: verum end; hence ( ex p being Element of NAT st ( p is prime & not p |-count a <= p |-count b ) or ex c being Element of NAT st b = a * c ) ; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A37, A27); hence ex c being Element of NAT st b = a * c by A15, A16; ::_thesis: verum end; theorem Th21: :: NAT_4:21 for a, b being non empty Nat st ( for p being Element of NAT st p is prime holds p |-count a = p |-count b ) holds a = b proof let a, b be non empty Nat; ::_thesis: ( ( for p being Element of NAT st p is prime holds p |-count a = p |-count b ) implies a = b ) assume A1: for p being Element of NAT st p is prime holds p |-count a = p |-count b ; ::_thesis: a = b then for p being Element of NAT st p is prime holds p |-count a <= p |-count b ; then consider c being Element of NAT such that A2: b = a * c by Th20; for p being Element of NAT st p is prime holds p |-count b <= p |-count a by A1; then consider d being Element of NAT such that A3: a = b * d by Th20; a = a * (c * d) by A2, A3; then c = 1 by NAT_1:15, XCMPLX_1:7; hence a = b by A2; ::_thesis: verum end; theorem Th22: :: NAT_4:22 for p1, p2 being Prime for m being non empty Element of NAT st p1 |^ (p1 |-count m) = p2 |^ (p2 |-count m) & p1 |-count m > 0 holds p1 = p2 proof let p1, p2 be Prime; ::_thesis: for m being non empty Element of NAT st p1 |^ (p1 |-count m) = p2 |^ (p2 |-count m) & p1 |-count m > 0 holds p1 = p2 let m be non empty Element of NAT ; ::_thesis: ( p1 |^ (p1 |-count m) = p2 |^ (p2 |-count m) & p1 |-count m > 0 implies p1 = p2 ) assume A1: p1 |^ (p1 |-count m) = p2 |^ (p2 |-count m) ; ::_thesis: ( not p1 |-count m > 0 or p1 = p2 ) A2: p1 > 1 by INT_2:def_4; assume p1 |-count m > 0 ; ::_thesis: p1 = p2 then p1 to_power (p1 |-count m) > 1 by A2, POWER:35; then A3: p1 |^ (p1 |-count m) > 1 by POWER:41; assume p1 <> p2 ; ::_thesis: contradiction then ( p1 <> 1 & not p1 divides p2 |^ (p2 |-count m) ) by INT_2:def_4, NAT_3:6; then p1 |-count (p1 |^ (p1 |-count m)) = 0 by A1, NAT_3:27; then p1 |-count m = 0 by A2, NAT_3:25; hence contradiction by A3, NEWTON:4; ::_thesis: verum end; begin theorem Th23: :: NAT_4:23 for n, k, q, p, n1, p, a being Element of NAT st n - 1 = k * (q |^ n1) & k > 0 & n1 > 0 & q is prime & (a |^ (n -' 1)) mod n = 1 & p is prime & p divides n & not p divides (a |^ ((n -' 1) div q)) -' 1 holds p mod (q |^ n1) = 1 proof let n, k, q, p, n1, p, a be Element of NAT ; ::_thesis: ( n - 1 = k * (q |^ n1) & k > 0 & n1 > 0 & q is prime & (a |^ (n -' 1)) mod n = 1 & p is prime & p divides n & not p divides (a |^ ((n -' 1) div q)) -' 1 implies p mod (q |^ n1) = 1 ) assume that A1: n - 1 = k * (q |^ n1) and A2: k > 0 and A3: n1 > 0 and A4: q is prime ; ::_thesis: ( not (a |^ (n -' 1)) mod n = 1 or not p is prime or not p divides n or p divides (a |^ ((n -' 1) div q)) -' 1 or p mod (q |^ n1) = 1 ) A5: (n - 1) + 1 > 0 + 1 by A1, A2, A4, XREAL_1:6; assume A6: (a |^ (n -' 1)) mod n = 1 ; ::_thesis: ( not p is prime or not p divides n or p divides (a |^ ((n -' 1) div q)) -' 1 or p mod (q |^ n1) = 1 ) a |^ ((n -' 1) div q) >= 1 proof assume a |^ ((n -' 1) div q) < 1 ; ::_thesis: contradiction then A7: a = 0 by NAT_1:14; (n -' 1) + 1 > 1 by A5, XREAL_1:233; then n -' 1 >= 1 by NAT_1:13; then (a |^ (n -' 1)) mod n = (0 * n) mod n by A7, NEWTON:11 .= 0 by NAT_D:13 ; hence contradiction by A6; ::_thesis: verum end; then A8: (a |^ ((n -' 1) div q)) -' 1 = (a |^ ((n -' 1) div q)) - 1 by XREAL_1:233; n1 + 1 > 0 + 1 by A3, XREAL_1:6; then n1 >= 1 by NAT_1:13; then A9: n1 -' 1 = n1 - 1 by XREAL_1:233; then A10: (n -' 1) div q = ((q |^ ((n1 -' 1) + 1)) * k) div q by A1, A5, XREAL_1:233 .= ((q * (q |^ (n1 -' 1))) * k) div q by NEWTON:6 .= (q * ((q |^ (n1 -' 1)) * k)) div q .= k * (q |^ (n1 -' 1)) by A4, NAT_D:18 ; assume that A11: p is prime and A12: p divides n ; ::_thesis: ( p divides (a |^ ((n -' 1) div q)) -' 1 or p mod (q |^ n1) = 1 ) consider i being Nat such that A13: n = p * i by A12, NAT_D:def_3; assume not p divides (a |^ ((n -' 1) div q)) -' 1 ; ::_thesis: p mod (q |^ n1) = 1 then A14: not (a |^ ((n -' 1) div q)) mod p = 1 by A11, A8, PEPIN:8; set nn = n -' 1; n1 + 1 > 0 + 1 by A3, XREAL_1:6; then n1 >= 1 by NAT_1:13; then A15: n1 -' 1 = n1 - 1 by XREAL_1:233; A16: p > 1 by A11, INT_2:def_4; then p -' 1 = p - 1 by XREAL_1:233; then A17: (p -' 1) + 1 = p ; reconsider i = i as Element of NAT by ORDINAL1:def_12; i * p <> 0 by A1, A13; then A18: (a |^ (n -' 1)) mod p = 1 by A6, A16, A13, PEPIN:9; 0 + 1 < (n -' 1) + 1 by A5, XREAL_1:233; then A19: 1 <= n -' 1 by NAT_1:13; then A20: a,p are_relative_prime by A11, A18, Th15; A21: order (a,p) divides p -' 1 by A11, A18, A19, Th15, PEPIN:49; n -' 1 = n - 1 by A5, XREAL_1:233; then order (a,p) divides k * (q |^ ((n1 -' 1) + 1)) by A1, A16, A15, A18, A20, PEPIN:47; then q |^ n1 divides order (a,p) by A4, A16, A20, A14, A9, A10, Th17, PEPIN:48; then q |^ n1 divides p -' 1 by A21, NAT_D:4; then A22: (p -' 1) mod (q |^ n1) = 0 by A4, PEPIN:6; q > 1 by A4, INT_2:def_4; hence p mod (q |^ n1) = 1 by A3, A17, A22, NAT_D:16, PEPIN:25; ::_thesis: verum end; theorem Th24: :: NAT_4:24 for n, f, c being Element of NAT st n - 1 = f * c & f > c & c > 0 & ( for q being Element of NAT st q divides f & q is prime holds ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ) ) holds n is prime proof let n, f, c be Element of NAT ; ::_thesis: ( n - 1 = f * c & f > c & c > 0 & ( for q being Element of NAT st q divides f & q is prime holds ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ) ) implies n is prime ) assume that A1: n - 1 = f * c and A2: f > c and A3: c > 0 ; ::_thesis: ( ex q being Element of NAT st ( q divides f & q is prime & ( for a being Element of NAT holds ( not (a |^ (n -' 1)) mod n = 1 or not ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ) ) ) or n is prime ) A4: (n - 1) + 1 > 0 + 1 by A1, A2, A3, XREAL_1:6; assume A5: for q being Element of NAT st q divides f & q is prime holds ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ) ; ::_thesis: n is prime assume not n is prime ; ::_thesis: contradiction then consider p being Element of NAT such that A6: p divides n and A7: 1 < p and A8: p * p <= n and A9: p is prime by A4, Lm1; A10: p - 1 = p -' 1 by A7, XREAL_1:233; A11: p - 1 > 1 - 1 by A7, XREAL_1:9; then A12: p -' 1 > 0 by A7, XREAL_1:233; A13: for q1 being Element of NAT st q1 in support (pfexp f) & q1 |-count f > 0 holds p mod (q1 |^ (q1 |-count f)) = 1 proof let q1 be Element of NAT ; ::_thesis: ( q1 in support (pfexp f) & q1 |-count f > 0 implies p mod (q1 |^ (q1 |-count f)) = 1 ) set n1 = q1 |-count f; assume A14: q1 in support (pfexp f) ; ::_thesis: ( not q1 |-count f > 0 or p mod (q1 |^ (q1 |-count f)) = 1 ) then A15: q1 is prime by NAT_3:34; A16: q1 is prime by A14, NAT_3:34; then consider a being Element of NAT such that A17: (a |^ (n -' 1)) mod n = 1 and A18: ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 by A5, A14, NAT_3:36; assume A19: q1 |-count f > 0 ; ::_thesis: p mod (q1 |^ (q1 |-count f)) = 1 A20: not p divides (a |^ ((n -' 1) div q1)) -' 1 proof assume p divides (a |^ ((n -' 1) div q1)) -' 1 ; ::_thesis: contradiction then p divides n gcd ((a |^ ((n -' 1) div q1)) -' 1) by A6, NEWTON:50; hence contradiction by A7, A18, NAT_D:7; ::_thesis: verum end; q1 <> 1 by A16, INT_2:def_4; then q1 |^ (q1 |-count f) divides f by A2, NAT_3:def_7; then consider d being Nat such that A21: f = (q1 |^ (q1 |-count f)) * d by NAT_D:def_3; reconsider d = d as Element of NAT by ORDINAL1:def_12; set k = d * c; A22: d * c > 0 proof assume d * c <= 0 ; ::_thesis: contradiction then d = 0 by A3; hence contradiction by A2, A21; ::_thesis: verum end; n - 1 = (d * c) * (q1 |^ (q1 |-count f)) by A1, A21; hence p mod (q1 |^ (q1 |-count f)) = 1 by A6, A9, A19, A17, A22, A15, A20, Th23; ::_thesis: verum end; for q1 being Element of NAT st q1 is prime holds q1 |-count f <= q1 |-count (p -' 1) proof let q1 be Element of NAT ; ::_thesis: ( q1 is prime implies q1 |-count f <= q1 |-count (p -' 1) ) assume A23: q1 is prime ; ::_thesis: q1 |-count f <= q1 |-count (p -' 1) percases ( q1 in support (pfexp f) or not q1 in support (pfexp f) ) ; supposeA24: q1 in support (pfexp f) ; ::_thesis: q1 |-count f <= q1 |-count (p -' 1) then (pfexp f) . q1 <> 0 by PRE_POLY:def_7; then q1 |-count f > 0 by A23, NAT_3:def_8; then p mod (q1 |^ (q1 |-count f)) = 1 by A13, A24; then A25: q1 |-count (q1 |^ (q1 |-count f)) <= q1 |-count (p -' 1) by A11, A10, A23, NAT_3:30, PEPIN:8; q1 > 1 by A23, INT_2:def_4; hence q1 |-count f <= q1 |-count (p -' 1) by A25, NAT_3:25; ::_thesis: verum end; suppose not q1 in support (pfexp f) ; ::_thesis: q1 |-count f <= q1 |-count (p -' 1) then (pfexp f) . q1 = 0 by PRE_POLY:def_7; hence q1 |-count f <= q1 |-count (p -' 1) by A23, NAT_3:def_8; ::_thesis: verum end; end; end; then ex n2 being Element of NAT st p -' 1 = f * n2 by A2, A12, Th20; then f divides p -' 1 by NAT_D:def_3; then f <= p -' 1 by A12, NAT_D:7; then (p - 1) + 1 >= f + 1 by A10, XREAL_1:6; then p > f by NAT_1:13; then A26: p ^2 > f ^2 by SQUARE_1:16; c >= 0 + 1 by A3, NAT_1:13; then A27: c + 1 >= 1 + 1 by XREAL_1:6; f >= c + 1 by A2, NAT_1:13; then f >= 2 by A27, XXREAL_0:2; then f - 1 >= 2 - 1 by XREAL_1:9; then A28: n + (f - 1) >= n + 1 by XREAL_1:6; f >= c + 1 by A2, NAT_1:13; then f * f >= f * (c + 1) by XREAL_1:64; then p ^2 > f + (n - 1) by A1, A26, XXREAL_0:2; then p ^2 >= n + 1 by A28, XXREAL_0:2; hence contradiction by A8, NAT_1:13; ::_thesis: verum end; theorem Th25: :: NAT_4:25 for n, f, d, n1, a, q being Element of NAT st n - 1 = (q |^ n1) * d & q |^ n1 > d & d > 0 & q is prime & (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 holds n is prime proof let n, f, d, n1, a, q be Element of NAT ; ::_thesis: ( n - 1 = (q |^ n1) * d & q |^ n1 > d & d > 0 & q is prime & (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 implies n is prime ) assume that A1: ( n - 1 = (q |^ n1) * d & q |^ n1 > d & d > 0 ) and A2: q is prime ; ::_thesis: ( not (a |^ (n -' 1)) mod n = 1 or not ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 or n is prime ) set f = q |^ n1; assume A3: (a |^ (n -' 1)) mod n = 1 ; ::_thesis: ( not ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 or n is prime ) assume A4: ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ; ::_thesis: n is prime for q1 being Element of NAT st q1 divides q |^ n1 & q1 is prime holds ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) proof let q1 be Element of NAT ; ::_thesis: ( q1 divides q |^ n1 & q1 is prime implies ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) ) assume A5: q1 divides q |^ n1 ; ::_thesis: ( not q1 is prime or ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) ) assume A6: q1 is prime ; ::_thesis: ex a being Element of NAT st ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) consider a being Element of NAT such that A7: ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q)) -' 1) gcd n = 1 ) by A3, A4; take a ; ::_thesis: ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) thus ( (a |^ (n -' 1)) mod n = 1 & ((a |^ ((n -' 1) div q1)) -' 1) gcd n = 1 ) by A2, A5, A6, A7, Th18; ::_thesis: verum end; hence n is prime by A1, Th24; ::_thesis: verum end; Lm2: for n being Element of NAT st 1 < n & n < 5 & n is prime & not n = 2 holds n = 3 proof let n be Element of NAT ; ::_thesis: ( 1 < n & n < 5 & n is prime & not n = 2 implies n = 3 ) assume that A1: ( 1 < n & n < 5 ) and A2: n is prime ; ::_thesis: ( n = 2 or n = 3 ) ( 1 + 1 < n + 1 & n < 4 + 1 ) by A1, XREAL_1:6; then ( ( 2 <= n & n <= 2 + 1 ) or ( 3 <= n & n <= 3 + 1 ) ) by NAT_1:13; hence ( n = 2 or n = 3 ) by A2, INT_2:29, NAT_1:9; ::_thesis: verum end; Lm3: for k being Element of NAT st k < 25 holds for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 holds n = 3 proof let k be Element of NAT ; ::_thesis: ( k < 25 implies for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 holds n = 3 ) assume A1: k < 25 ; ::_thesis: for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 holds n = 3 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= k & n is prime & not n = 2 implies n = 3 ) assume that A2: 1 < n and A3: n * n <= k and A4: n is prime ; ::_thesis: ( n = 2 or n = 3 ) n * n < 5 * 5 by A1, A3, XXREAL_0:2; then n < 5 by Th1; hence ( n = 2 or n = 3 ) by A2, A4, Lm2; ::_thesis: verum end; begin theorem Th26: :: NAT_4:26 7 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_7_&_n_is_prime_holds_ not_n_divides_7 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 7 & n is prime implies not n divides 7 ) 7 = (2 * 3) + 1 ; then A1: not 2 divides 7 by Th9; 7 = (3 * 2) + 1 ; then A2: not 3 divides 7 by Th9; assume ( 1 < n & n * n <= 7 & n is prime ) ; ::_thesis: not n divides 7 hence not n divides 7 by A1, A2, Lm3; ::_thesis: verum end; hence 7 is prime by Th14; ::_thesis: verum end; theorem :: NAT_4:27 11 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_11_&_n_is_prime_holds_ not_n_divides_11 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 11 & n is prime implies not n divides 11 ) 11 = (2 * 5) + 1 ; then A1: not 2 divides 11 by Th9; 11 = (3 * 3) + 2 ; then A2: not 3 divides 11 by Th9; assume ( 1 < n & n * n <= 11 & n is prime ) ; ::_thesis: not n divides 11 hence not n divides 11 by A1, A2, Lm3; ::_thesis: verum end; hence 11 is prime by Th14; ::_thesis: verum end; theorem Th28: :: NAT_4:28 13 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_13_&_n_is_prime_holds_ not_n_divides_13 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 13 & n is prime implies not n divides 13 ) 13 = (2 * 6) + 1 ; then A1: not 2 divides 13 by Th9; 13 = (3 * 4) + 1 ; then A2: not 3 divides 13 by Th9; assume ( 1 < n & n * n <= 13 & n is prime ) ; ::_thesis: not n divides 13 hence not n divides 13 by A1, A2, Lm3; ::_thesis: verum end; hence 13 is prime by Th14; ::_thesis: verum end; Lm4: ( not 6 is prime & not 8 is prime & not 9 is prime & not 10 is prime & not 12 is prime & not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) proof 6 = 2 * 3 ; then 2 divides 6 by NAT_D:def_3; hence not 6 is prime by INT_2:def_4; ::_thesis: ( not 8 is prime & not 9 is prime & not 10 is prime & not 12 is prime & not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 8 = 2 * 4 ; then 2 divides 8 by NAT_D:def_3; hence not 8 is prime by INT_2:def_4; ::_thesis: ( not 9 is prime & not 10 is prime & not 12 is prime & not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 9 = 3 * 3 ; then 3 divides 9 by NAT_D:def_3; hence not 9 is prime by INT_2:def_4; ::_thesis: ( not 10 is prime & not 12 is prime & not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 10 = 2 * 5 ; then 2 divides 10 by NAT_D:def_3; hence not 10 is prime by INT_2:def_4; ::_thesis: ( not 12 is prime & not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 12 = 2 * 6 ; then 2 divides 12 by NAT_D:def_3; hence not 12 is prime by INT_2:def_4; ::_thesis: ( not 14 is prime & not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 14 = 2 * 7 ; then 2 divides 14 by NAT_D:def_3; hence not 14 is prime by INT_2:def_4; ::_thesis: ( not 15 is prime & not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 15 = 3 * 5 ; then 3 divides 15 by NAT_D:def_3; hence not 15 is prime by INT_2:def_4; ::_thesis: ( not 16 is prime & not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 16 = 4 * 4 ; then 4 divides 16 by NAT_D:def_3; hence not 16 is prime by INT_2:def_4; ::_thesis: ( not 18 is prime & not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 18 = 2 * 9 ; then 2 divides 18 by NAT_D:def_3; hence not 18 is prime by INT_2:def_4; ::_thesis: ( not 20 is prime & not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 20 = 4 * 5 ; then 4 divides 20 by NAT_D:def_3; hence not 20 is prime by INT_2:def_4; ::_thesis: ( not 21 is prime & not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 21 = 3 * 7 ; then 3 divides 21 by NAT_D:def_3; hence not 21 is prime by INT_2:def_4; ::_thesis: ( not 22 is prime & not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 22 = 2 * 11 ; then 2 divides 22 by NAT_D:def_3; hence not 22 is prime by INT_2:def_4; ::_thesis: ( not 24 is prime & not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 24 = 4 * 6 ; then 4 divides 24 by NAT_D:def_3; hence not 24 is prime by INT_2:def_4; ::_thesis: ( not 25 is prime & not 26 is prime & not 27 is prime & not 28 is prime ) 25 = 5 * 5 ; then 5 divides 25 by NAT_D:def_3; hence not 25 is prime by INT_2:def_4; ::_thesis: ( not 26 is prime & not 27 is prime & not 28 is prime ) 26 = 2 * 13 ; then 2 divides 26 by NAT_D:def_3; hence not 26 is prime by INT_2:def_4; ::_thesis: ( not 27 is prime & not 28 is prime ) 27 = 3 * 9 ; then 3 divides 27 by NAT_D:def_3; hence not 27 is prime by INT_2:def_4; ::_thesis: not 28 is prime 28 = 4 * 7 ; then 4 divides 28 by NAT_D:def_3; hence not 28 is prime by INT_2:def_4; ::_thesis: verum end; theorem :: NAT_4:29 19 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_19_&_n_is_prime_holds_ not_n_divides_19 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 19 & n is prime implies not n divides 19 ) 19 = (2 * 9) + 1 ; then A1: not 2 divides 19 by Th9; 19 = (3 * 6) + 1 ; then A2: not 3 divides 19 by Th9; assume ( 1 < n & n * n <= 19 & n is prime ) ; ::_thesis: not n divides 19 hence not n divides 19 by A1, A2, Lm3; ::_thesis: verum end; hence 19 is prime by Th14; ::_thesis: verum end; theorem Th30: :: NAT_4:30 23 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_23_&_n_is_prime_holds_ not_n_divides_23 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 23 & n is prime implies not n divides 23 ) 23 = (2 * 11) + 1 ; then A1: not 2 divides 23 by Th9; 23 = (3 * 7) + 2 ; then A2: not 3 divides 23 by Th9; assume ( 1 < n & n * n <= 23 & n is prime ) ; ::_thesis: not n divides 23 hence not n divides 23 by A1, A2, Lm3; ::_thesis: verum end; hence 23 is prime by Th14; ::_thesis: verum end; Lm5: for n being Element of NAT st 1 < n & n < 29 & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 holds n = 23 proof let n be Element of NAT ; ::_thesis: ( 1 < n & n < 29 & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 implies n = 23 ) assume that A1: 1 < n and A2: n < 29 and A3: n is prime ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) A4: ( 1 + 1 < n + 1 & n < 28 + 1 ) by A1, A2, XREAL_1:6; percases ( ( 2 <= n & n < 5 ) or ( 5 <= n & n <= 27 + 1 ) ) by A4, NAT_1:13; suppose ( 2 <= n & n < 5 ) ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) hence ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) by A1, A3, Lm2; ::_thesis: verum end; supposeA5: ( 5 <= n & n <= 27 + 1 ) ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) percases ( ( 5 <= n & n <= 12 + 1 ) or ( 13 <= n & n <= 20 + 1 ) or ( 21 <= n & n <= 27 + 1 ) ) by A5; suppose ( 5 <= n & n <= 12 + 1 ) ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) then ( ( 5 <= n & n <= 5 + 1 ) or ( 6 <= n & n <= 6 + 1 ) or ( 7 <= n & n <= 7 + 1 ) or ( 8 <= n & n <= 8 + 1 ) or ( 9 <= n & n <= 9 + 1 ) or ( 10 <= n & n <= 10 + 1 ) or ( 11 <= n & n <= 11 + 1 ) or ( 12 <= n & n <= 12 + 1 ) ) ; hence ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) by A3, Lm4, NAT_1:9; ::_thesis: verum end; suppose ( 13 <= n & n <= 20 + 1 ) ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) then ( ( 13 <= n & n <= 13 + 1 ) or ( 14 <= n & n <= 14 + 1 ) or ( 15 <= n & n <= 15 + 1 ) or ( 16 <= n & n <= 16 + 1 ) or ( 17 <= n & n <= 17 + 1 ) or ( 18 <= n & n <= 18 + 1 ) or ( 19 <= n & n <= 19 + 1 ) or ( 20 <= n & n <= 20 + 1 ) ) ; hence ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) by A3, Lm4, NAT_1:9; ::_thesis: verum end; suppose ( 21 <= n & n <= 27 + 1 ) ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) then ( ( 21 <= n & n <= 21 + 1 ) or ( 22 <= n & n <= 22 + 1 ) or ( 23 <= n & n <= 23 + 1 ) or ( 24 <= n & n <= 24 + 1 ) or ( 25 <= n & n <= 25 + 1 ) or ( 26 <= n & n <= 26 + 1 ) or ( 27 <= n & n <= 27 + 1 ) ) ; hence ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) by A3, Lm4, NAT_1:9; ::_thesis: verum end; end; end; end; end; Lm6: for k being Element of NAT st k < 841 holds for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 holds n = 23 proof let k be Element of NAT ; ::_thesis: ( k < 841 implies for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 holds n = 23 ) assume A1: k < 841 ; ::_thesis: for n being Element of NAT st 1 < n & n * n <= k & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 holds n = 23 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= k & n is prime & not n = 2 & not n = 3 & not n = 5 & not n = 7 & not n = 11 & not n = 13 & not n = 17 & not n = 19 implies n = 23 ) assume that A2: 1 < n and A3: n * n <= k and A4: n is prime ; ::_thesis: ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) n * n < 29 * 29 by A1, A3, XXREAL_0:2; then n < 29 by Th1; hence ( n = 2 or n = 3 or n = 5 or n = 7 or n = 11 or n = 13 or n = 17 or n = 19 or n = 23 ) by A2, A4, Lm5; ::_thesis: verum end; theorem Th31: :: NAT_4:31 37 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_37_&_n_is_prime_holds_ not_n_divides_37 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 37 & n is prime implies not n divides 37 ) 37 = (2 * 18) + 1 ; then A1: not 2 divides 37 by Th9; 37 = (3 * 12) + 1 ; then A2: not 3 divides 37 by Th9; 37 = (13 * 2) + 11 ; then A3: not 13 divides 37 by Th9; 37 = (11 * 3) + 4 ; then A4: not 11 divides 37 by Th9; 37 = (19 * 1) + 18 ; then A5: not 19 divides 37 by Th9; 37 = (17 * 2) + 3 ; then A6: not 17 divides 37 by Th9; 37 = (23 * 1) + 14 ; then A7: not 23 divides 37 by Th9; 37 = (7 * 5) + 2 ; then A8: not 7 divides 37 by Th9; 37 = (5 * 7) + 2 ; then A9: not 5 divides 37 by Th9; assume ( 1 < n & n * n <= 37 & n is prime ) ; ::_thesis: not n divides 37 hence not n divides 37 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 37 is prime by Th14; ::_thesis: verum end; theorem Th32: :: NAT_4:32 43 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_43_&_n_is_prime_holds_ not_n_divides_43 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 43 & n is prime implies not n divides 43 ) 43 = (2 * 21) + 1 ; then A1: not 2 divides 43 by Th9; 43 = (3 * 14) + 1 ; then A2: not 3 divides 43 by Th9; 43 = (13 * 3) + 4 ; then A3: not 13 divides 43 by Th9; 43 = (11 * 3) + 10 ; then A4: not 11 divides 43 by Th9; 43 = (19 * 2) + 5 ; then A5: not 19 divides 43 by Th9; 43 = (17 * 2) + 9 ; then A6: not 17 divides 43 by Th9; 43 = (23 * 1) + 20 ; then A7: not 23 divides 43 by Th9; 43 = (7 * 6) + 1 ; then A8: not 7 divides 43 by Th9; 43 = (5 * 8) + 3 ; then A9: not 5 divides 43 by Th9; assume ( 1 < n & n * n <= 43 & n is prime ) ; ::_thesis: not n divides 43 hence not n divides 43 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 43 is prime by Th14; ::_thesis: verum end; theorem Th33: :: NAT_4:33 83 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_83_&_n_is_prime_holds_ not_n_divides_83 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 83 & n is prime implies not n divides 83 ) 83 = (2 * 41) + 1 ; then A1: not 2 divides 83 by Th9; 83 = (3 * 27) + 2 ; then A2: not 3 divides 83 by Th9; 83 = (13 * 6) + 5 ; then A3: not 13 divides 83 by Th9; 83 = (11 * 7) + 6 ; then A4: not 11 divides 83 by Th9; 83 = (19 * 4) + 7 ; then A5: not 19 divides 83 by Th9; 83 = (17 * 4) + 15 ; then A6: not 17 divides 83 by Th9; 83 = (23 * 3) + 14 ; then A7: not 23 divides 83 by Th9; 83 = (7 * 11) + 6 ; then A8: not 7 divides 83 by Th9; 83 = (5 * 16) + 3 ; then A9: not 5 divides 83 by Th9; assume ( 1 < n & n * n <= 83 & n is prime ) ; ::_thesis: not n divides 83 hence not n divides 83 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 83 is prime by Th14; ::_thesis: verum end; theorem Th34: :: NAT_4:34 139 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_139_&_n_is_prime_holds_ not_n_divides_139 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 139 & n is prime implies not n divides 139 ) 139 = (2 * 69) + 1 ; then A1: not 2 divides 139 by Th9; 139 = (3 * 46) + 1 ; then A2: not 3 divides 139 by Th9; 139 = (13 * 10) + 9 ; then A3: not 13 divides 139 by Th9; 139 = (11 * 12) + 7 ; then A4: not 11 divides 139 by Th9; 139 = (19 * 7) + 6 ; then A5: not 19 divides 139 by Th9; 139 = (17 * 8) + 3 ; then A6: not 17 divides 139 by Th9; 139 = (23 * 6) + 1 ; then A7: not 23 divides 139 by Th9; 139 = (7 * 19) + 6 ; then A8: not 7 divides 139 by Th9; 139 = (5 * 27) + 4 ; then A9: not 5 divides 139 by Th9; assume ( 1 < n & n * n <= 139 & n is prime ) ; ::_thesis: not n divides 139 hence not n divides 139 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 139 is prime by Th14; ::_thesis: verum end; theorem Th35: :: NAT_4:35 163 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_163_&_n_is_prime_holds_ not_n_divides_163 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 163 & n is prime implies not n divides 163 ) 163 = (2 * 81) + 1 ; then A1: not 2 divides 163 by Th9; 163 = (3 * 54) + 1 ; then A2: not 3 divides 163 by Th9; 163 = (13 * 12) + 7 ; then A3: not 13 divides 163 by Th9; 163 = (11 * 14) + 9 ; then A4: not 11 divides 163 by Th9; 163 = (19 * 8) + 11 ; then A5: not 19 divides 163 by Th9; 163 = (17 * 9) + 10 ; then A6: not 17 divides 163 by Th9; 163 = (23 * 7) + 2 ; then A7: not 23 divides 163 by Th9; 163 = (7 * 23) + 2 ; then A8: not 7 divides 163 by Th9; 163 = (5 * 32) + 3 ; then A9: not 5 divides 163 by Th9; assume ( 1 < n & n * n <= 163 & n is prime ) ; ::_thesis: not n divides 163 hence not n divides 163 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 163 is prime by Th14; ::_thesis: verum end; theorem Th36: :: NAT_4:36 317 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_317_&_n_is_prime_holds_ not_n_divides_317 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 317 & n is prime implies not n divides 317 ) 317 = (2 * 158) + 1 ; then A1: not 2 divides 317 by Th9; 317 = (3 * 105) + 2 ; then A2: not 3 divides 317 by Th9; 317 = (13 * 24) + 5 ; then A3: not 13 divides 317 by Th9; 317 = (11 * 28) + 9 ; then A4: not 11 divides 317 by Th9; 317 = (19 * 16) + 13 ; then A5: not 19 divides 317 by Th9; 317 = (17 * 18) + 11 ; then A6: not 17 divides 317 by Th9; 317 = (23 * 13) + 18 ; then A7: not 23 divides 317 by Th9; 317 = (7 * 45) + 2 ; then A8: not 7 divides 317 by Th9; 317 = (5 * 63) + 2 ; then A9: not 5 divides 317 by Th9; assume ( 1 < n & n * n <= 317 & n is prime ) ; ::_thesis: not n divides 317 hence not n divides 317 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 317 is prime by Th14; ::_thesis: verum end; theorem Th37: :: NAT_4:37 631 is prime proof now__::_thesis:_for_n_being_Element_of_NAT_st_1_<_n_&_n_*_n_<=_631_&_n_is_prime_holds_ not_n_divides_631 let n be Element of NAT ; ::_thesis: ( 1 < n & n * n <= 631 & n is prime implies not n divides 631 ) 631 = (2 * 315) + 1 ; then A1: not 2 divides 631 by Th9; 631 = (3 * 210) + 1 ; then A2: not 3 divides 631 by Th9; 631 = (13 * 48) + 7 ; then A3: not 13 divides 631 by Th9; 631 = (11 * 57) + 4 ; then A4: not 11 divides 631 by Th9; 631 = (19 * 33) + 4 ; then A5: not 19 divides 631 by Th9; 631 = (17 * 37) + 2 ; then A6: not 17 divides 631 by Th9; 631 = (23 * 27) + 10 ; then A7: not 23 divides 631 by Th9; 631 = (7 * 90) + 1 ; then A8: not 7 divides 631 by Th9; 631 = (5 * 126) + 1 ; then A9: not 5 divides 631 by Th9; assume ( 1 < n & n * n <= 631 & n is prime ) ; ::_thesis: not n divides 631 hence not n divides 631 by A1, A2, A9, A8, A4, A3, A6, A5, A7, Lm6; ::_thesis: verum end; hence 631 is prime by Th14; ::_thesis: verum end; theorem Th38: :: NAT_4:38 1259 is prime proof 1038 * 1038 = (1259 * 855) + 999 ; then A1: (1038 * 1038) mod 1259 = 999 by NAT_D:def_2; A2: 999 * 744 = (1259 * 590) + 446 ; 847 * 847 = (1259 * 569) + 1038 ; then A3: (847 * 847) mod 1259 = 1038 by NAT_D:def_2; A4: 1038 * 1136 = (1259 * 936) + 744 ; 999 * 999 = (1259 * 792) + 873 ; then A5: (999 * 999) mod 1259 = 873 by NAT_D:def_2; A6: 765 * 446 = (1259 * 271) + 1 ; A7: 2128 = (1259 * 1) + 869 ; A8: 847 * 4 = (1259 * 2) + 870 ; 434 * 434 = (1259 * 149) + 765 ; then A9: (434 * 434) mod 1259 = 765 by NAT_D:def_2; A10: (2 |^ 34) -' 1 = (2 |^ 34) - 1 by PREPOWER:11, XREAL_1:233; 873 * 873 = (1259 * 605) + 434 ; then A11: (873 * 873) mod 1259 = 434 by NAT_D:def_2; A12: 1259 -' 1 = 1259 - 1 by XREAL_1:233 .= 1258 ; 68 * 68 = (1259 * 3) + 847 ; then A13: (68 * 68) mod 1259 = 847 by NAT_D:def_2; A14: 847 * 1024 = (1259 * 688) + 1136 ; 256 * 256 = (1259 * 52) + 68 ; then A15: (256 * 256) mod 1259 = 68 by NAT_D:def_2; A16: ( 1259 - 1 = 37 * 34 & 37 = 37 |^ 1 ) by NEWTON:5; 2 |^ 1 = 2 by NEWTON:5; then A17: (2 |^ 1) mod 1259 = 2 by NAT_D:24; A18: (2 |^ 2) mod 1259 = (2 |^ (2 * 1)) mod 1259 .= (2 * 2) mod 1259 by A17, Th11 .= 4 by NAT_D:24 ; A19: (2 |^ 4) mod 1259 = (2 |^ (2 * 2)) mod 1259 .= (4 * 4) mod 1259 by A18, Th11 .= 16 by NAT_D:24 ; A20: (2 |^ 8) mod 1259 = (2 |^ (2 * 4)) mod 1259 .= (16 * 16) mod 1259 by A19, Th11 .= 256 by NAT_D:24 ; A21: (2 |^ 16) mod 1259 = (2 |^ (2 * 8)) mod 1259 .= 68 by A20, A15, Th11 ; A22: (2 |^ 32) mod 1259 = (2 |^ (2 * 16)) mod 1259 .= 847 by A21, A13, Th11 ; A23: (2 |^ 34) mod 1259 = (2 |^ (32 + 2)) mod 1259 .= ((2 |^ 32) * (2 |^ 2)) mod 1259 by NEWTON:8 .= (847 * 4) mod 1259 by A18, A22, EULER_2:9 .= 870 by A8, NAT_D:def_2 ; A24: (2 |^ 64) mod 1259 = (2 |^ (2 * 32)) mod 1259 .= 1038 by A22, A3, Th11 ; 1258 = (37 * 34) + 0 ; then A25: ((2 |^ ((1259 -' 1) div 37)) -' 1) gcd 1259 = ((2 |^ 34) -' 1) gcd 1259 by A12, NAT_D:def_1 .= (((2 |^ 34) -' 1) + (1259 * 1)) gcd 1259 by EULER_1:8 .= 1259 gcd (((2 |^ 34) + 1258) mod 1259) by A10, NAT_D:28 .= 1259 gcd ((870 + (1258 mod 1259)) mod 1259) by A23, EULER_2:6 .= 1259 gcd ((870 + 1258) mod 1259) by NAT_D:24 .= ((869 * 1) + 390) gcd 869 by A7, NAT_D:def_2 .= 390 gcd ((390 * 2) + 89) by EULER_1:8 .= ((89 * 4) + 34) gcd 89 by EULER_1:8 .= 34 gcd ((34 * 2) + 21) by EULER_1:8 .= ((21 * 1) + 13) gcd 21 by EULER_1:8 .= 13 gcd ((13 * 1) + 8) by EULER_1:8 .= ((8 * 1) + 5) gcd 8 by EULER_1:8 .= 5 gcd ((5 * 1) + 3) by EULER_1:8 .= ((3 * 1) + 2) gcd 3 by EULER_1:8 .= 2 gcd ((2 * 1) + 1) by EULER_1:8 .= 2 gcd 1 by EULER_1:8 .= 1 by NEWTON:51 ; A26: (2 |^ 128) mod 1259 = (2 |^ (2 * 64)) mod 1259 .= 999 by A24, A1, Th11 ; A27: (2 |^ 256) mod 1259 = (2 |^ (2 * 128)) mod 1259 .= 873 by A26, A5, Th11 ; A28: (2 |^ 512) mod 1259 = (2 |^ (2 * 256)) mod 1259 .= 434 by A27, A11, Th11 ; A29: (2 |^ 1024) mod 1259 = (2 |^ (2 * 512)) mod 1259 .= 765 by A28, A9, Th11 ; (2 |^ (1259 -' 1)) mod 1259 = (2 |^ (1024 + 234)) mod 1259 by A12 .= ((2 |^ 1024) * (2 |^ 234)) mod 1259 by NEWTON:8 .= (((2 |^ 1024) mod 1259) * ((2 |^ (128 + 106)) mod 1259)) mod 1259 by EULER_2:9 .= (765 * (((2 |^ 128) * (2 |^ 106)) mod 1259)) mod 1259 by A29, NEWTON:8 .= (765 * ((999 * ((2 |^ (64 + 42)) mod 1259)) mod 1259)) mod 1259 by A26, EULER_2:9 .= (765 * ((999 * (((2 |^ 64) * (2 |^ 42)) mod 1259)) mod 1259)) mod 1259 by NEWTON:8 .= (765 * ((999 * ((1038 * ((2 |^ (32 + 10)) mod 1259)) mod 1259)) mod 1259)) mod 1259 by A24, EULER_2:9 .= (765 * ((999 * ((1038 * (((2 |^ 32) * (2 |^ 10)) mod 1259)) mod 1259)) mod 1259)) mod 1259 by NEWTON:8 .= (765 * ((999 * ((1038 * ((847 * ((2 |^ (8 + 2)) mod 1259)) mod 1259)) mod 1259)) mod 1259)) mod 1259 by A22, EULER_2:9 .= (765 * ((999 * ((1038 * ((847 * (((2 |^ 8) * (2 |^ 2)) mod 1259)) mod 1259)) mod 1259)) mod 1259)) mod 1259 by NEWTON:8 .= (765 * ((999 * ((1038 * ((847 * ((256 * 4) mod 1259)) mod 1259)) mod 1259)) mod 1259)) mod 1259 by A18, A20, EULER_2:9 .= (765 * ((999 * ((1038 * ((847 * 1024) mod 1259)) mod 1259)) mod 1259)) mod 1259 by NAT_D:24 .= (765 * ((999 * ((1038 * 1136) mod 1259)) mod 1259)) mod 1259 by A14, NAT_D:def_2 .= (765 * ((999 * 744) mod 1259)) mod 1259 by A4, NAT_D:def_2 .= (765 * 446) mod 1259 by A2, NAT_D:def_2 .= 1 by A6, NAT_D:def_2 ; hence 1259 is prime by A16, A25, Th25, Th31; ::_thesis: verum end; theorem Th39: :: NAT_4:39 2503 is prime proof 733 * 733 = (2503 * 214) + 1647 ; then A1: (733 * 733) mod 2503 = 1647 by NAT_D:def_2; A2: 4334 = (2503 * 1) + 1831 ; 458 * 458 = (2503 * 83) + 2015 ; then A3: (458 * 458) mod 2503 = 2015 by NAT_D:def_2; A4: 359 * 64 = (2503 * 9) + 449 ; 359 * 359 = (2503 * 51) + 1228 ; then A5: (359 * 359) mod 2503 = 1228 by NAT_D:def_2; A6: 1178 * 712 = (2503 * 335) + 231 ; 2015 * 2015 = (2503 * 1622) + 359 ; then A7: (2015 * 2015) mod 2503 = 359 by NAT_D:def_2; A8: 1228 * 449 = (2503 * 220) + 712 ; 1228 * 1228 = (2503 * 602) + 1178 ; then A9: (1228 * 1228) mod 2503 = 1178 by NAT_D:def_2; A10: 1647 * 231 = (2503 * 152) + 1 ; 1178 * 1178 = (2503 * 554) + 1022 ; then A11: (1178 * 1178) mod 2503 = 1022 by NAT_D:def_2; A12: 2503 -' 1 = 2503 - 1 by XREAL_1:233 .= 2502 ; 1022 * 1022 = (2503 * 417) + 733 ; then A13: (1022 * 1022) mod 2503 = 733 by NAT_D:def_2; A14: (2 |^ 18) -' 1 = (2 |^ 18) - 1 by PREPOWER:11, XREAL_1:233; 256 * 256 = (2503 * 26) + 458 ; then A15: (256 * 256) mod 2503 = 458 by NAT_D:def_2; A16: ( 2503 - 1 = 139 * 18 & 139 = 139 |^ 1 ) by NEWTON:5; 2 |^ 1 = 2 by NEWTON:5; then A17: (2 |^ 1) mod 2503 = 2 by NAT_D:24; A18: (2 |^ 2) mod 2503 = (2 |^ (2 * 1)) mod 2503 .= (2 * 2) mod 2503 by A17, Th11 .= 4 by NAT_D:24 ; A19: (2 |^ 4) mod 2503 = (2 |^ (2 * 2)) mod 2503 .= (4 * 4) mod 2503 by A18, Th11 .= 16 by NAT_D:24 ; A20: (2 |^ 8) mod 2503 = (2 |^ (2 * 4)) mod 2503 .= (16 * 16) mod 2503 by A19, Th11 .= 256 by NAT_D:24 ; A21: (2 |^ 16) mod 2503 = (2 |^ (2 * 8)) mod 2503 .= 458 by A20, A15, Th11 ; A22: (2 |^ 32) mod 2503 = (2 |^ (2 * 16)) mod 2503 .= 2015 by A21, A3, Th11 ; A23: (2 |^ 64) mod 2503 = (2 |^ (2 * 32)) mod 2503 .= 359 by A22, A7, Th11 ; A24: (2 |^ 18) mod 2503 = (2 |^ (16 + 2)) mod 2503 .= ((2 |^ 16) * (2 |^ 2)) mod 2503 by NEWTON:8 .= (458 * 4) mod 2503 by A18, A21, EULER_2:9 .= 1832 by NAT_D:24 ; A25: (2 |^ 128) mod 2503 = (2 |^ (2 * 64)) mod 2503 .= 1228 by A23, A5, Th11 ; A26: (2 |^ 256) mod 2503 = (2 |^ (2 * 128)) mod 2503 .= 1178 by A25, A9, Th11 ; 2502 = (139 * 18) + 0 ; then A27: ((2 |^ ((2503 -' 1) div 139)) -' 1) gcd 2503 = ((2 |^ 18) -' 1) gcd 2503 by A12, NAT_D:def_1 .= (((2 |^ 18) -' 1) + (2503 * 1)) gcd 2503 by EULER_1:8 .= 2503 gcd (((2 |^ 18) + 2502) mod 2503) by A14, NAT_D:28 .= 2503 gcd ((1832 + (2502 mod 2503)) mod 2503) by A24, EULER_2:6 .= 2503 gcd ((1832 + 2502) mod 2503) by NAT_D:24 .= ((1831 * 1) + 672) gcd 1831 by A2, NAT_D:def_2 .= 672 gcd ((672 * 2) + 487) by EULER_1:8 .= ((487 * 1) + 185) gcd 487 by EULER_1:8 .= 185 gcd ((185 * 2) + 117) by EULER_1:8 .= ((117 * 1) + 68) gcd 117 by EULER_1:8 .= 68 gcd ((68 * 1) + 49) by EULER_1:8 .= ((49 * 1) + 19) gcd 49 by EULER_1:8 .= 19 gcd ((19 * 2) + 11) by EULER_1:8 .= ((11 * 1) + 8) gcd 11 by EULER_1:8 .= 8 gcd ((8 * 1) + 3) by EULER_1:8 .= ((3 * 2) + 2) gcd 3 by EULER_1:8 .= 2 gcd ((2 * 1) + 1) by EULER_1:8 .= 2 gcd 1 by EULER_1:8 .= 1 by NEWTON:51 ; A28: (2 |^ 512) mod 2503 = (2 |^ (2 * 256)) mod 2503 .= 1022 by A26, A11, Th11 ; A29: (2 |^ 1024) mod 2503 = (2 |^ (2 * 512)) mod 2503 .= 733 by A28, A13, Th11 ; A30: (2 |^ 2048) mod 2503 = (2 |^ (2 * 1024)) mod 2503 .= 1647 by A29, A1, Th11 ; (2 |^ (2503 -' 1)) mod 2503 = (2 |^ (2048 + 454)) mod 2503 by A12 .= ((2 |^ 2048) * (2 |^ 454)) mod 2503 by NEWTON:8 .= (((2 |^ 2048) mod 2503) * ((2 |^ (256 + 198)) mod 2503)) mod 2503 by EULER_2:9 .= (1647 * (((2 |^ 256) * (2 |^ 198)) mod 2503)) mod 2503 by A30, NEWTON:8 .= (1647 * ((1178 * ((2 |^ (128 + 70)) mod 2503)) mod 2503)) mod 2503 by A26, EULER_2:9 .= (1647 * ((1178 * (((2 |^ 128) * (2 |^ 70)) mod 2503)) mod 2503)) mod 2503 by NEWTON:8 .= (1647 * ((1178 * ((1228 * ((2 |^ (64 + 6)) mod 2503)) mod 2503)) mod 2503)) mod 2503 by A25, EULER_2:9 .= (1647 * ((1178 * ((1228 * (((2 |^ 64) * (2 |^ 6)) mod 2503)) mod 2503)) mod 2503)) mod 2503 by NEWTON:8 .= (1647 * ((1178 * ((1228 * ((359 * ((2 |^ (4 + 2)) mod 2503)) mod 2503)) mod 2503)) mod 2503)) mod 2503 by A23, EULER_2:9 .= (1647 * ((1178 * ((1228 * ((359 * (((2 |^ 4) * (2 |^ 2)) mod 2503)) mod 2503)) mod 2503)) mod 2503)) mod 2503 by NEWTON:8 .= (1647 * ((1178 * ((1228 * ((359 * ((16 * 4) mod 2503)) mod 2503)) mod 2503)) mod 2503)) mod 2503 by A18, A19, EULER_2:9 .= (1647 * ((1178 * ((1228 * ((359 * 64) mod 2503)) mod 2503)) mod 2503)) mod 2503 by NAT_D:24 .= (1647 * ((1178 * ((1228 * 449) mod 2503)) mod 2503)) mod 2503 by A4, NAT_D:def_2 .= (1647 * ((1178 * 712) mod 2503)) mod 2503 by A8, NAT_D:def_2 .= (1647 * 231) mod 2503 by A6, NAT_D:def_2 .= 1 by A10, NAT_D:def_2 ; hence 2503 is prime by A16, A27, Th25, Th34; ::_thesis: verum end; theorem Th40: :: NAT_4:40 4001 is prime proof 2 |^ 1 = 2 by NEWTON:5; then A1: (2 |^ 1) mod 4001 = 2 by NAT_D:24; A2: (2 |^ 2) mod 4001 = (2 |^ (2 * 1)) mod 4001 .= (2 * 2) mod 4001 by A1, Th11 .= 4 by NAT_D:24 ; A3: (2 |^ 4) mod 4001 = (2 |^ (2 * 2)) mod 4001 .= (4 * 4) mod 4001 by A2, Th11 .= 16 by NAT_D:24 ; A4: (2 |^ 8) mod 4001 = (2 |^ (2 * 4)) mod 4001 .= (16 * 16) mod 4001 by A3, Th11 .= 256 by NAT_D:24 ; A5: 4001 - 1 = ((5 * 5) * 5) * 32 ; 256 * 256 = (4001 * 16) + 1520 ; then A6: (256 * 256) mod 4001 = 1520 by NAT_D:def_2; A7: (5 * 5) * 5 = ((5 |^ 1) * 5) * 5 by NEWTON:5 .= (5 |^ (1 + 1)) * 5 by NEWTON:6 .= 5 |^ ((1 + 1) + 1) by NEWTON:6 .= 5 |^ 3 ; 1023 * 1023 = (4001 * 261) + 2268 ; then A8: (1023 * 1023) mod 4001 = 2268 by NAT_D:def_2; A9: (2 |^ 800) -' 1 = (2 |^ 800) - 1 by PREPOWER:11, XREAL_1:233; A10: 6311 = (4001 * 1) + 2310 ; A11: 3906 * 1913 = (4001 * 1867) + 2311 ; A12: 1522 * 1823 = (4001 * 693) + 1913 ; 3441 * 3441 = (4001 * 2959) + 1522 ; then A13: (3441 * 3441) mod 4001 = 1522 by NAT_D:def_2; A14: 1023 * 2164 = (4001 * 553) + 1219 ; 2499 * 2499 = (4001 * 1560) + 3441 ; then A15: (2499 * 2499) mod 4001 = 3441 by NAT_D:def_2; A16: 3906 * 988 = (4001 * 964) + 2164 ; 1823 * 1823 = (4001 * 830) + 2499 ; then A17: (1823 * 1823) mod 4001 = 2499 by NAT_D:def_2; A18: 1522 * 3376 = (4001 * 1284) + 988 ; 1520 * 1520 = (4001 * 577) + 1823 ; then A19: (1520 * 1520) mod 4001 = 1823 by NAT_D:def_2; A20: 3441 * 1823 = (4001 * 1567) + 3376 ; 1522 * 1522 = (4001 * 578) + 3906 ; then A21: (1522 * 1522) mod 4001 = 3906 by NAT_D:def_2; A22: 2268 * 1219 = (4001 * 691) + 1 ; 3906 * 3906 = (4001 * 3813) + 1023 ; then A23: (3906 * 3906) mod 4001 = 1023 by NAT_D:def_2; A24: 4001 -' 1 = 4001 - 1 by XREAL_1:233 .= 4000 ; A25: (2 |^ 16) mod 4001 = (2 |^ (2 * 8)) mod 4001 .= 1520 by A4, A6, Th11 ; A26: (2 |^ 32) mod 4001 = (2 |^ (2 * 16)) mod 4001 .= 1823 by A25, A19, Th11 ; A27: (2 |^ 64) mod 4001 = (2 |^ (2 * 32)) mod 4001 .= 2499 by A26, A17, Th11 ; A28: (2 |^ 128) mod 4001 = (2 |^ (2 * 64)) mod 4001 .= 3441 by A27, A15, Th11 ; A29: (2 |^ 256) mod 4001 = (2 |^ (2 * 128)) mod 4001 .= 1522 by A28, A13, Th11 ; A30: (2 |^ 512) mod 4001 = (2 |^ (2 * 256)) mod 4001 .= 3906 by A29, A21, Th11 ; A31: (2 |^ 1024) mod 4001 = (2 |^ (2 * 512)) mod 4001 .= 1023 by A30, A23, Th11 ; A32: (2 |^ 800) mod 4001 = (2 |^ (512 + 288)) mod 4001 .= ((2 |^ 512) * (2 |^ 288)) mod 4001 by NEWTON:8 .= (3906 * ((2 |^ (256 + 32)) mod 4001)) mod 4001 by A30, EULER_2:9 .= (3906 * (((2 |^ 256) * (2 |^ 32)) mod 4001)) mod 4001 by NEWTON:8 .= (3906 * ((1522 * 1823) mod 4001)) mod 4001 by A26, A29, EULER_2:9 .= (3906 * 1913) mod 4001 by A12, NAT_D:def_2 .= 2311 by A11, NAT_D:def_2 ; 4000 = (5 * 800) + 0 ; then A33: ((2 |^ ((4001 -' 1) div 5)) -' 1) gcd 4001 = ((2 |^ 800) -' 1) gcd 4001 by A24, NAT_D:def_1 .= (((2 |^ 800) -' 1) + (4001 * 1)) gcd 4001 by EULER_1:8 .= 4001 gcd (((2 |^ 800) + 4000) mod 4001) by A9, NAT_D:28 .= 4001 gcd ((2311 + (4000 mod 4001)) mod 4001) by A32, EULER_2:6 .= 4001 gcd ((2311 + 4000) mod 4001) by NAT_D:24 .= ((2310 * 1) + 1691) gcd 2310 by A10, NAT_D:def_2 .= 1691 gcd ((1691 * 1) + 619) by EULER_1:8 .= ((619 * 2) + 453) gcd 619 by EULER_1:8 .= ((453 * 1) + 166) gcd 453 by EULER_1:8 .= 166 gcd ((166 * 2) + 121) by EULER_1:8 .= ((121 * 1) + 45) gcd 121 by EULER_1:8 .= 45 gcd ((45 * 2) + 31) by EULER_1:8 .= ((31 * 1) + 14) gcd 31 by EULER_1:8 .= 14 gcd ((14 * 2) + 3) by EULER_1:8 .= ((3 * 4) + 2) gcd 3 by EULER_1:8 .= 2 gcd ((2 * 1) + 1) by EULER_1:8 .= 2 gcd 1 by EULER_1:8 .= 1 by NEWTON:51 ; A34: (2 |^ 2048) mod 4001 = (2 |^ (2 * 1024)) mod 4001 .= 2268 by A31, A8, Th11 ; (2 |^ (4001 -' 1)) mod 4001 = (2 |^ (2048 + 1952)) mod 4001 by A24 .= ((2 |^ 2048) * (2 |^ 1952)) mod 4001 by NEWTON:8 .= (((2 |^ 2048) mod 4001) * ((2 |^ (1024 + 928)) mod 4001)) mod 4001 by EULER_2:9 .= (2268 * (((2 |^ 1024) * (2 |^ 928)) mod 4001)) mod 4001 by A34, NEWTON:8 .= (2268 * ((1023 * ((2 |^ (512 + 416)) mod 4001)) mod 4001)) mod 4001 by A31, EULER_2:9 .= (2268 * ((1023 * (((2 |^ 512) * (2 |^ 416)) mod 4001)) mod 4001)) mod 4001 by NEWTON:8 .= (2268 * ((1023 * ((3906 * ((2 |^ (256 + 160)) mod 4001)) mod 4001)) mod 4001)) mod 4001 by A30, EULER_2:9 .= (2268 * ((1023 * ((3906 * (((2 |^ 256) * (2 |^ 160)) mod 4001)) mod 4001)) mod 4001)) mod 4001 by NEWTON:8 .= (2268 * ((1023 * ((3906 * ((1522 * ((2 |^ (128 + 32)) mod 4001)) mod 4001)) mod 4001)) mod 4001)) mod 4001 by A29, EULER_2:9 .= (2268 * ((1023 * ((3906 * ((1522 * (((2 |^ 128) * (2 |^ 32)) mod 4001)) mod 4001)) mod 4001)) mod 4001)) mod 4001 by NEWTON:8 .= (2268 * ((1023 * ((3906 * ((1522 * ((3441 * 1823) mod 4001)) mod 4001)) mod 4001)) mod 4001)) mod 4001 by A26, A28, EULER_2:9 .= (2268 * ((1023 * ((3906 * ((1522 * 3376) mod 4001)) mod 4001)) mod 4001)) mod 4001 by A20, NAT_D:def_2 .= (2268 * ((1023 * ((3906 * 988) mod 4001)) mod 4001)) mod 4001 by A18, NAT_D:def_2 .= (2268 * ((1023 * 2164) mod 4001)) mod 4001 by A16, NAT_D:def_2 .= (2268 * 1219) mod 4001 by A14, NAT_D:def_2 .= 1 by A22, NAT_D:def_2 ; hence 4001 is prime by A5, A7, A33, Th25, PEPIN:59; ::_thesis: verum end; Lm7: for n being Element of NAT st 1 <= n & n < 4001 holds ex p being Prime st ( n < p & p <= 2 * n ) proof let n be Element of NAT ; ::_thesis: ( 1 <= n & n < 4001 implies ex p being Prime st ( n < p & p <= 2 * n ) ) A1: for a, n, p being Element of NAT st a <= n & p <= 2 * a holds p <= 2 * n proof let a, n, p be Element of NAT ; ::_thesis: ( a <= n & p <= 2 * a implies p <= 2 * n ) assume that A2: a <= n and A3: p <= 2 * a ; ::_thesis: p <= 2 * n 2 * a <= 2 * n by A2, XREAL_1:64; hence p <= 2 * n by A3, XXREAL_0:2; ::_thesis: verum end; assume A4: ( 1 <= n & n < 4001 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) percases ( ( 1 <= n & n < 2 ) or ( 2 <= n & n < 3 ) or ( 3 <= n & n < 5 ) or ( 5 <= n & n < 7 ) or ( 7 <= n & n < 13 ) or ( 13 <= n & n < 23 ) or ( 23 <= n & n < 43 ) or ( 43 <= n & n < 83 ) or ( 83 <= n & n < 163 ) or ( 163 <= n & n < 317 ) or ( 317 <= n & n < 631 ) or ( 631 <= n & n < 1259 ) or ( 1259 <= n & n < 2503 ) or ( 2503 <= n & n < 4001 ) ) by A4; supposeA5: ( 1 <= n & n < 2 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 2 <= 2 * 1 ; then 2 <= 2 * n by A1, A5; hence ex p being Prime st ( n < p & p <= 2 * n ) by A5, INT_2:28; ::_thesis: verum end; supposeA6: ( 2 <= n & n < 3 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 3 <= 2 * 2 ; then 3 <= 2 * n by A1, A6; hence ex p being Prime st ( n < p & p <= 2 * n ) by A6, PEPIN:41; ::_thesis: verum end; supposeA7: ( 3 <= n & n < 5 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 5 <= 2 * 3 ; then 5 <= 2 * n by A1, A7; hence ex p being Prime st ( n < p & p <= 2 * n ) by A7, PEPIN:59; ::_thesis: verum end; supposeA8: ( 5 <= n & n < 7 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 7 <= 2 * 5 ; then 7 <= 2 * n by A1, A8; hence ex p being Prime st ( n < p & p <= 2 * n ) by A8, Th26; ::_thesis: verum end; supposeA9: ( 7 <= n & n < 13 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 13 <= 2 * 7 ; then 13 <= 2 * n by A1, A9; hence ex p being Prime st ( n < p & p <= 2 * n ) by A9, Th28; ::_thesis: verum end; supposeA10: ( 13 <= n & n < 23 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 23 <= 2 * 13 ; then 23 <= 2 * n by A1, A10; hence ex p being Prime st ( n < p & p <= 2 * n ) by A10, Th30; ::_thesis: verum end; supposeA11: ( 23 <= n & n < 43 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 43 <= 2 * 23 ; then 43 <= 2 * n by A1, A11; hence ex p being Prime st ( n < p & p <= 2 * n ) by A11, Th32; ::_thesis: verum end; supposeA12: ( 43 <= n & n < 83 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 83 <= 2 * 43 ; then 83 <= 2 * n by A1, A12; hence ex p being Prime st ( n < p & p <= 2 * n ) by A12, Th33; ::_thesis: verum end; supposeA13: ( 83 <= n & n < 163 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 163 <= 2 * 83 ; then 163 <= 2 * n by A1, A13; hence ex p being Prime st ( n < p & p <= 2 * n ) by A13, Th35; ::_thesis: verum end; supposeA14: ( 163 <= n & n < 317 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 317 <= 2 * 163 ; then 317 <= 2 * n by A1, A14; hence ex p being Prime st ( n < p & p <= 2 * n ) by A14, Th36; ::_thesis: verum end; supposeA15: ( 317 <= n & n < 631 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 631 <= 2 * 317 ; then 631 <= 2 * n by A1, A15; hence ex p being Prime st ( n < p & p <= 2 * n ) by A15, Th37; ::_thesis: verum end; supposeA16: ( 631 <= n & n < 1259 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 1259 <= 2 * 631 ; then 1259 <= 2 * n by A1, A16; hence ex p being Prime st ( n < p & p <= 2 * n ) by A16, Th38; ::_thesis: verum end; supposeA17: ( 1259 <= n & n < 2503 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 2503 <= 2 * 1259 ; then 2503 <= 2 * n by A1, A17; hence ex p being Prime st ( n < p & p <= 2 * n ) by A17, Th39; ::_thesis: verum end; supposeA18: ( 2503 <= n & n < 4001 ) ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) 4001 <= 2 * 2503 ; then 4001 <= 2 * n by A1, A18; hence ex p being Prime st ( n < p & p <= 2 * n ) by A18, Th40; ::_thesis: verum end; end; end; begin theorem Th41: :: NAT_4:41 for f, f0, f1 being FinSequence of REAL st f = f0 + f1 holds dom f = (dom f0) /\ (dom f1) proof let f, f0, f1 be FinSequence of REAL ; ::_thesis: ( f = f0 + f1 implies dom f = (dom f0) /\ (dom f1) ) [:(rng f0),(rng f1):] c= [:REAL,REAL:] by ZFMISC_1:96; then A1: [:(rng f0),(rng f1):] c= dom addreal by FUNCT_2:def_1; assume f = f0 + f1 ; ::_thesis: dom f = (dom f0) /\ (dom f1) hence dom f = (dom f0) /\ (dom f1) by A1, FUNCOP_1:69; ::_thesis: verum end; theorem Th42: :: NAT_4:42 for F being FinSequence of REAL st ( for k being Element of NAT st k in dom F holds F . k > 0 ) holds Product F > 0 proof defpred S1[ Nat] means for F being FinSequence of REAL st ( for k being Element of NAT st k in dom F holds F . k > 0 ) & len F = $1 holds Product F > 0 ; let F be FinSequence of REAL ; ::_thesis: ( ( for k being Element of NAT st k in dom F holds F . k > 0 ) implies Product F > 0 ) A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] for F being FinSequence of REAL st ( for k being Element of NAT st k in dom F holds F . k > 0 ) & len F = n + 1 holds Product F > 0 proof let F be FinSequence of REAL ; ::_thesis: ( ( for k being Element of NAT st k in dom F holds F . k > 0 ) & len F = n + 1 implies Product F > 0 ) assume A3: for k being Element of NAT st k in dom F holds F . k > 0 ; ::_thesis: ( not len F = n + 1 or Product F > 0 ) assume A4: len F = n + 1 ; ::_thesis: Product F > 0 then consider F1, F2 being FinSequence of REAL such that A5: len F1 = n and A6: len F2 = 1 and A7: F = F1 ^ F2 by FINSEQ_2:23; 1 in Seg 1 by FINSEQ_1:3; then 1 in dom F2 by A6, FINSEQ_1:def_3; then A8: F . (n + 1) = F2 . 1 by A5, A7, FINSEQ_1:def_7; for k being Element of NAT st k in dom F1 holds F1 . k > 0 proof let k be Element of NAT ; ::_thesis: ( k in dom F1 implies F1 . k > 0 ) assume A9: k in dom F1 ; ::_thesis: F1 . k > 0 then F . k > 0 by A3, A7, FINSEQ_2:15; hence F1 . k > 0 by A7, A9, FINSEQ_1:def_7; ::_thesis: verum end; then A10: Product F1 > 0 by A2, A5; set x = F2 . 1; Seg (n + 1) = dom F by A4, FINSEQ_1:def_3; then A11: F2 . 1 > 0 by A3, A8, FINSEQ_1:3; Product F = Product (F1 ^ <*(F2 . 1)*>) by A6, A7, FINSEQ_1:40 .= (Product F1) * (F2 . 1) by RVSUM_1:96 ; hence Product F > 0 by A10, A11; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A12: S1[ 0 ] proof let F be FinSequence of REAL ; ::_thesis: ( ( for k being Element of NAT st k in dom F holds F . k > 0 ) & len F = 0 implies Product F > 0 ) assume for k being Element of NAT st k in dom F holds F . k > 0 ; ::_thesis: ( not len F = 0 or Product F > 0 ) assume len F = 0 ; ::_thesis: Product F > 0 then F = <*> REAL ; hence Product F > 0 by RVSUM_1:94; ::_thesis: verum end; A13: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A12, A1); A14: ex n being Element of NAT st n = len F ; assume for k being Element of NAT st k in dom F holds F . k > 0 ; ::_thesis: Product F > 0 hence Product F > 0 by A13, A14; ::_thesis: verum end; theorem Th43: :: NAT_4:43 for X1 being set for X2 being finite set st X1 c= X2 & X2 c= NAT & not {} in X2 holds Product (Sgm X1) <= Product (Sgm X2) proof let X1 be set ; ::_thesis: for X2 being finite set st X1 c= X2 & X2 c= NAT & not {} in X2 holds Product (Sgm X1) <= Product (Sgm X2) defpred S1[ Nat] means for X1 being set for X2 being finite set st X1 c= X2 & X2 c= NAT & not {} in X2 & card X2 = $1 holds Product (Sgm X1) <= Product (Sgm X2); A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_for_X1_being_set_ for_X2_being_finite_set_st_X1_c=_X2_&_X2_c=_NAT_&_not_{}_in_X2_&_card_X2_=_n_+_1_holds_ Product_(Sgm_X1)_<=_Product_(Sgm_X2) let X1 be set ; ::_thesis: for X2 being finite set st X1 c= X2 & X2 c= NAT & not {} in X2 & card X2 = n + 1 holds Product (Sgm b2) <= Product (Sgm b3) let X2 be finite set ; ::_thesis: ( X1 c= X2 & X2 c= NAT & not {} in X2 & card X2 = n + 1 implies Product (Sgm b1) <= Product (Sgm b2) ) assume that A3: X1 c= X2 and A4: X2 c= NAT and A5: not {} in X2 and A6: card X2 = n + 1 ; ::_thesis: Product (Sgm b1) <= Product (Sgm b2) set A = X2; reconsider A = X2 as non empty finite real-membered set by A4, A6; set m = max A; set X11 = X1 \ {(max A)}; set X12 = X2 \ {(max A)}; A7: max A in X2 by XXREAL_2:def_8; then A8: (X2 \ {(max A)}) \/ {(max A)} = X2 by ZFMISC_1:116; A9: (X2 \ {(max A)}) /\ {(max A)} = (X2 /\ {(max A)}) \ {(max A)} by XBOOLE_1:49 .= {(max A)} \ {(max A)} by A7, ZFMISC_1:46 .= {} by XBOOLE_1:37 ; card ((X2 \ {(max A)}) \/ {(max A)}) = ((card (X2 \ {(max A)})) + (card {(max A)})) - (card ((X2 \ {(max A)}) /\ {(max A)})) by CARD_2:45; then A10: card X2 = ((card (X2 \ {(max A)})) + 1) - (card {}) by A8, A9, CARD_1:30; reconsider m = max A as Element of NAT by A4, A7; A11: X1 \ {(max A)} c= X2 \ {(max A)} by A3, XBOOLE_1:33; A12: X2 \ {(max A)} c= X2 by XBOOLE_1:36; then A13: ( X2 \ {(max A)} c= NAT & not {} in X2 \ {(max A)} ) by A4, A5, XBOOLE_1:1; then A14: Product (Sgm (X1 \ {(max A)})) <= Product (Sgm (X2 \ {(max A)})) by A2, A3, A6, A10, XBOOLE_1:33; now__::_thesis:_for_x_being_set_st_x_in_X2_\_{(max_A)}_holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in X2 \ {(max A)} implies x in Seg m ) set r = x; assume A15: x in X2 \ {(max A)} ; ::_thesis: x in Seg m then x in A by A12; then reconsider r = x as Element of NAT by A4; not r = 0 by A5, A12, A15; then 0 + 1 < r + 1 by XREAL_1:6; then A16: 1 <= r by NAT_1:13; r <= m by A12, A15, XXREAL_2:def_8; hence x in Seg m by A16, FINSEQ_1:1; ::_thesis: verum end; then A17: X2 \ {(max A)} c= Seg m by TARSKI:def_3; A18: not m = 0 by A5, XXREAL_2:def_8; then 0 + 1 < m + 1 by XREAL_1:6; then A19: 1 <= m by NAT_1:13; then m in Seg m by FINSEQ_1:1; then A20: {m} c= Seg m by ZFMISC_1:31; now__::_thesis:_for_n1,_n2_being_Element_of_NAT_st_n1_in_X2_\_{(max_A)}_&_n2_in_{m}_holds_ n1_<_n2 let n1, n2 be Element of NAT ; ::_thesis: ( n1 in X2 \ {(max A)} & n2 in {m} implies n1 < n2 ) assume that A21: n1 in X2 \ {(max A)} and A22: n2 in {m} ; ::_thesis: n1 < n2 not n1 in {m} by A21, XBOOLE_0:def_5; then A23: n1 <> m by TARSKI:def_1; ( n2 = m & n1 <= m ) by A12, A21, A22, TARSKI:def_1, XXREAL_2:def_8; hence n1 < n2 by A23, XXREAL_0:1; ::_thesis: verum end; then Product (Sgm X2) = Product ((Sgm (X2 \ {(max A)})) ^ (Sgm {m})) by A8, A17, A20, FINSEQ_3:42; then A24: Product (Sgm X2) = (Product (Sgm (X2 \ {(max A)}))) * (Product (Sgm {m})) by RVSUM_1:97 .= (Product (Sgm (X2 \ {(max A)}))) * (Product <*m*>) by A18, FINSEQ_3:44 .= (Product (Sgm (X2 \ {(max A)}))) * m by RVSUM_1:95 ; A25: 1 * (Product (Sgm (X2 \ {(max A)}))) <= m * (Product (Sgm (X2 \ {(max A)}))) by A19, XREAL_1:64; percases ( m in X1 or not m in X1 ) ; supposeA26: m in X1 ; ::_thesis: Product (Sgm b1) <= Product (Sgm b2) A27: now__::_thesis:_for_n1,_n2_being_Element_of_NAT_st_n1_in_X1_\_{(max_A)}_&_n2_in_{m}_holds_ n1_<_n2 let n1, n2 be Element of NAT ; ::_thesis: ( n1 in X1 \ {(max A)} & n2 in {m} implies n1 < n2 ) assume that A28: n1 in X1 \ {(max A)} and A29: n2 in {m} ; ::_thesis: n1 < n2 not n1 in {m} by A28, XBOOLE_0:def_5; then A30: n1 <> m by TARSKI:def_1; n1 in X2 \ {(max A)} by A11, A28; then A31: n1 <= m by A12, XXREAL_2:def_8; n2 = m by A29, TARSKI:def_1; hence n1 < n2 by A30, A31, XXREAL_0:1; ::_thesis: verum end; now__::_thesis:_for_x_being_set_st_x_in_X1_\_{(max_A)}_holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in X1 \ {(max A)} implies x in Seg m ) set r = x; assume x in X1 \ {(max A)} ; ::_thesis: x in Seg m then A32: x in X1 by XBOOLE_0:def_5; then x in A by A3; then reconsider r = x as Element of NAT by A4; not r = 0 by A3, A5, A32; then 0 + 1 < r + 1 by XREAL_1:6; then A33: 1 <= r by NAT_1:13; r <= m by A3, A32, XXREAL_2:def_8; hence x in Seg m by A33, FINSEQ_1:1; ::_thesis: verum end; then A34: X1 \ {(max A)} c= Seg m by TARSKI:def_3; X1 = (X1 \ {(max A)}) \/ {m} by A26, ZFMISC_1:116; then Product (Sgm X1) = Product ((Sgm (X1 \ {(max A)})) ^ (Sgm {m})) by A20, A34, A27, FINSEQ_3:42 .= (Product (Sgm (X1 \ {(max A)}))) * (Product (Sgm {m})) by RVSUM_1:97 .= (Product (Sgm (X1 \ {(max A)}))) * (Product <*m*>) by A18, FINSEQ_3:44 .= (Product (Sgm (X1 \ {(max A)}))) * m by RVSUM_1:95 ; hence Product (Sgm X1) <= Product (Sgm X2) by A2, A6, A11, A10, A13, A24, XREAL_1:64; ::_thesis: verum end; suppose not m in X1 ; ::_thesis: Product (Sgm b1) <= Product (Sgm b2) then Product (Sgm X1) <= Product (Sgm (X2 \ {(max A)})) by A14, ZFMISC_1:57; hence Product (Sgm X1) <= Product (Sgm X2) by A24, A25, XXREAL_0:2; ::_thesis: verum end; end; end; hence S1[n + 1] ; ::_thesis: verum end; let X2 be finite set ; ::_thesis: ( X1 c= X2 & X2 c= NAT & not {} in X2 implies Product (Sgm X1) <= Product (Sgm X2) ) assume A35: ( X1 c= X2 & X2 c= NAT & not {} in X2 ) ; ::_thesis: Product (Sgm X1) <= Product (Sgm X2) A36: ex n being Element of NAT st card X2 = n ; A37: S1[ 0 ] proof let X1 be set ; ::_thesis: for X2 being finite set st X1 c= X2 & X2 c= NAT & not {} in X2 & card X2 = 0 holds Product (Sgm X1) <= Product (Sgm X2) let X2 be finite set ; ::_thesis: ( X1 c= X2 & X2 c= NAT & not {} in X2 & card X2 = 0 implies Product (Sgm X1) <= Product (Sgm X2) ) assume that A38: X1 c= X2 and X2 c= NAT and not {} in X2 and A39: card X2 = 0 ; ::_thesis: Product (Sgm X1) <= Product (Sgm X2) X2 = {} by A39; hence Product (Sgm X1) <= Product (Sgm X2) by A38, XBOOLE_1:3; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A37, A1); hence Product (Sgm X1) <= Product (Sgm X2) by A35, A36; ::_thesis: verum end; theorem Th44: :: NAT_4:44 for a, k being Element of NAT for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) proof let a, k be Element of NAT ; ::_thesis: for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let X be set ; ::_thesis: for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let F be FinSequence of SetPrimes ; ::_thesis: for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let p be Prime; ::_thesis: ( X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F implies ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) ) defpred S1[ Nat] means for a, k being Element of NAT for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = $1 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ); now__::_thesis:_for_F_being_FinSequence_of_SetPrimes_holds_F_is_FinSequence_of_REAL let F be FinSequence of SetPrimes ; ::_thesis: F is FinSequence of REAL rng F c= REAL ; hence F is FinSequence of REAL by FINSEQ_1:def_4; ::_thesis: verum end; then reconsider F = F as FinSequence of REAL ; A1: ex n being Element of NAT st n = len F ; A2: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] for a, k being Element of NAT for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = n + 1 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) proof let a, k be Element of NAT ; ::_thesis: for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = n + 1 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let X be set ; ::_thesis: for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = n + 1 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let F be FinSequence of SetPrimes ; ::_thesis: for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = n + 1 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let p be Prime; ::_thesis: ( X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = n + 1 implies ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) ) assume that A4: X c= SetPrimes and A5: X c= Seg k and A6: F = Sgm X and A7: a = Product F ; ::_thesis: ( not len F = n + 1 or ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) ) set x = F . (n + 1); assume A8: len F = n + 1 ; ::_thesis: ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) then A9: Seg (n + 1) = dom F by FINSEQ_1:def_3; then n + 1 in dom F by FINSEQ_1:3; then A10: F . (n + 1) in rng F by FUNCT_1:def_3; rng F c= SetPrimes by FINSEQ_1:def_4; then reconsider x = F . (n + 1) as Prime by A10, NEWTON:def_6; set X1 = X \ {x}; A11: X \ {x} c= X by XBOOLE_1:36; then A12: X \ {x} c= Seg k by A5, XBOOLE_1:1; A13: rng F = X by A5, A6, FINSEQ_1:def_13; now__::_thesis:_for_y_being_set_st_y_in_{x}_holds_ y_in_Seg_k let y be set ; ::_thesis: ( y in {x} implies y in Seg k ) assume y in {x} ; ::_thesis: y in Seg k then y = x by TARSKI:def_1; hence y in Seg k by A5, A10, A13; ::_thesis: verum end; then A14: {x} c= Seg k by TARSKI:def_3; A15: for m1, n1 being Element of NAT st m1 in X \ {x} & n1 in {x} holds m1 < n1 proof set n9 = n + 1; let m1, n1 be Element of NAT ; ::_thesis: ( m1 in X \ {x} & n1 in {x} implies m1 < n1 ) assume that A16: m1 in X \ {x} and A17: n1 in {x} ; ::_thesis: m1 < n1 set l = (F ") . m1; A18: F is one-to-one by A5, A6, FINSEQ_3:92; m1 in rng F by A11, A13, A16; then m1 in dom (F ") by A18, FUNCT_1:33; then (F ") . m1 in rng (F ") by FUNCT_1:def_3; then A19: (F ") . m1 in Seg (n + 1) by A9, A18, FUNCT_1:33; then reconsider l = (F ") . m1 as Element of NAT ; A20: l <= n + 1 by A19, FINSEQ_1:1; A21: m1 = F . l by A11, A13, A16, A18, FUNCT_1:35; then not n + 1 = l by A16, ZFMISC_1:56; then A22: l < n + 1 by A20, XXREAL_0:1; A23: n1 = F . (n + 1) by A17, TARSKI:def_1; 1 <= l by A19, FINSEQ_1:1; hence m1 < n1 by A5, A6, A8, A21, A23, A22, FINSEQ_1:def_13; ::_thesis: verum end; set F2 = Sgm {x}; set F1 = Sgm (X \ {x}); reconsider F1 = Sgm (X \ {x}) as FinSequence of NAT ; set a1 = Product F1; A24: Sgm {x} = <*x*> by FINSEQ_3:44; then A25: rng (Sgm {x}) = {x} by FINSEQ_1:39; A26: (X \ {x}) \/ {x} = X \/ {x} by XBOOLE_1:39 .= X by A10, A13, ZFMISC_1:40 ; then A27: F = F1 ^ (Sgm {x}) by A6, A12, A14, A15, FINSEQ_3:42; then ( rng F c= SetPrimes & rng F1 c= rng F ) by FINSEQ_1:29, FINSEQ_1:def_4; then A28: rng F1 c= SetPrimes by XBOOLE_1:1; len F = (len F1) + (len (Sgm {x})) by A27, FINSEQ_1:22; then A29: n + 1 = (len F1) + 1 by A8, A24, FINSEQ_1:39; reconsider F1 = F1 as FinSequence of SetPrimes by A28, FINSEQ_1:def_4; now__::_thesis:_for_k_being_Element_of_NAT_st_k_in_dom_F1_holds_ F1_._k_>_0 let k be Element of NAT ; ::_thesis: ( k in dom F1 implies F1 . k > 0 ) assume k in dom F1 ; ::_thesis: F1 . k > 0 then F1 . k in rng F1 by FUNCT_1:def_3; then F1 . k is Prime by A28, NEWTON:def_6; hence F1 . k > 0 ; ::_thesis: verum end; then A30: Product F1 <> 0 by Th42; Product F = Product (F1 ^ (Sgm {x})) by A6, A12, A14, A15, A26, FINSEQ_3:42 .= Product (F1 ^ <*x*>) by FINSEQ_3:44 .= (Product F1) * x by RVSUM_1:96 ; then A31: p |-count a = (p |-count (Product F1)) + (p |-count x) by A7, A30, NAT_3:28; A32: X \ {x} c= SetPrimes by A4, A11, XBOOLE_1:1; A33: rng F1 = X \ {x} by A12, FINSEQ_1:def_13; A34: now__::_thesis:_(_p_in_rng_F_implies_p_|-count_a_=_1_) assume p in rng F ; ::_thesis: p |-count a = 1 then p in (rng F1) \/ (rng (Sgm {x})) by A27, FINSEQ_1:31; then A35: ( p in rng F1 or p in {x} ) by A25, XBOOLE_0:def_3; A36: p > 1 by INT_2:def_4; percases ( p in rng F1 or p = x ) by A35, TARSKI:def_1; supposeA37: p in rng F1 ; ::_thesis: p |-count a = 1 then not p in {x} by A33, XBOOLE_0:def_5; then p <> x by TARSKI:def_1; then p |-count x = 0 by A36, NAT_3:24; hence p |-count a = 1 by A3, A32, A12, A29, A31, A37; ::_thesis: verum end; supposeA38: p = x ; ::_thesis: p |-count a = 1 then p in {x} by TARSKI:def_1; then not p in rng F1 by A33, XBOOLE_0:def_5; then p |-count (Product F1) = 0 by A3, A32, A12, A29; hence p |-count a = 1 by A31, A36, A38, NAT_3:22; ::_thesis: verum end; end; end; now__::_thesis:_(_not_p_in_rng_F_implies_p_|-count_a_=_0_) assume not p in rng F ; ::_thesis: p |-count a = 0 then A39: not p in (rng F1) \/ (rng (Sgm {x})) by A27, FINSEQ_1:31; then not p in {x} by A25, XBOOLE_0:def_3; then A40: p <> x by TARSKI:def_1; not p in rng F1 by A39, XBOOLE_0:def_3; then A41: p |-count (Product F1) = 0 by A3, A32, A12, A29; p <> 1 by INT_2:def_4; hence p |-count a = 0 by A31, A41, A40, NAT_3:24; ::_thesis: verum end; hence ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) by A34; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A42: S1[ 0 ] proof let a, k be Element of NAT ; ::_thesis: for X being set for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = 0 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let X be set ; ::_thesis: for F being FinSequence of SetPrimes for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = 0 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let F be FinSequence of SetPrimes ; ::_thesis: for p being Prime st X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = 0 holds ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) let p be Prime; ::_thesis: ( X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F & len F = 0 implies ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) ) assume that X c= SetPrimes and X c= Seg k and F = Sgm X and A43: a = Product F and A44: len F = 0 ; ::_thesis: ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) A45: F = <*> REAL by A44; assume A46: ( ( p in rng F & not p |-count a = 1 ) or ( not p in rng F & not p |-count a = 0 ) ) ; ::_thesis: contradiction percases ( ( p in rng F & not p |-count a = 1 ) or ( not p in rng F & not p |-count a = 0 ) ) by A46; suppose ( p in rng F & not p |-count a = 1 ) ; ::_thesis: contradiction hence contradiction by A45; ::_thesis: verum end; supposeA47: ( not p in rng F & not p |-count a = 0 ) ; ::_thesis: contradiction F = <*> SetPrimes by A44; then ( a = 1 & p <> 1 ) by A43, INT_2:def_4, RVSUM_1:94; hence contradiction by A47, NAT_3:21; ::_thesis: verum end; end; end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A42, A2); hence ( X c= SetPrimes & X c= Seg k & F = Sgm X & a = Product F implies ( ( p in rng F implies p |-count a = 1 ) & ( not p in rng F implies p |-count a = 0 ) ) ) by A1; ::_thesis: verum end; theorem Th45: :: NAT_4:45 for n being Element of NAT holds Product (Sgm { p where p is prime Element of NAT : p <= n + 1 } ) <= 4 to_power n proof defpred S1[ Nat] means Product (Sgm { p where p is prime Element of NAT : p <= $1 + 1 } ) <= 4 to_power $1; let n be Element of NAT ; ::_thesis: Product (Sgm { p where p is prime Element of NAT : p <= n + 1 } ) <= 4 to_power n A1: for m being Nat st ( for n being Nat st n < m holds S1[n] ) holds S1[m] proof let m be Nat; ::_thesis: ( ( for n being Nat st n < m holds S1[n] ) implies S1[m] ) assume A2: for n being Nat st n < m holds S1[n] ; ::_thesis: S1[m] percases ( m < 1 or m = 1 or m > 1 ) by XXREAL_0:1; supposeA3: m < 1 ; ::_thesis: S1[m] A4: now__::_thesis:_not__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_0_+_1__}__<>_{} assume { p where p is prime Element of NAT : p <= 0 + 1 } <> {} ; ::_thesis: contradiction then consider y being set such that A5: y in { p where p is prime Element of NAT : p <= 1 } by XBOOLE_0:def_1; ex y9 being prime Element of NAT st ( y9 = y & y9 <= 1 ) by A5; hence contradiction by Lm1; ::_thesis: verum end; m = 0 by A3, NAT_1:14; hence S1[m] by A4, FINSEQ_3:43, POWER:24, RVSUM_1:94; ::_thesis: verum end; supposeA6: m = 1 ; ::_thesis: S1[m] A7: 4 to_power 1 = 4 by POWER:25; A8: now__::_thesis:_for_y_being_set_st_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_2__}__holds_ y_=_2 let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= 2 } implies y = 2 ) assume y in { p where p is prime Element of NAT : p <= 2 } ; ::_thesis: y = 2 then consider y9 being prime Element of NAT such that A9: ( y9 = y & y9 <= 2 ) ; y9 > 1 by Lm1; then y9 >= 1 + 1 by NAT_1:13; hence y = 2 by A9, XXREAL_0:1; ::_thesis: verum end; for y being set st y = 2 holds y in { p where p is prime Element of NAT : p <= 2 } by INT_2:28; then A10: { p where p is prime Element of NAT : p <= 2 } = {2} by A8, TARSKI:def_1; Product (Sgm {2}) = Product <*2*> by FINSEQ_3:44 .= 2 by RVSUM_1:95 ; hence S1[m] by A6, A10, A7; ::_thesis: verum end; supposeA11: m > 1 ; ::_thesis: S1[m] percases ( m + 1 is odd or m + 1 is even ) ; suppose m + 1 is odd ; ::_thesis: S1[m] then consider k being Element of NAT such that A12: m + 1 = (2 * k) + 1 by ABIAN:9; A13: ((2 * k) + 1) choose k <= 2 to_power (2 * k) proof defpred S2[ Nat] means ((2 * $1) + 1) choose $1 <= 2 to_power (2 * $1); A14: for k being Element of NAT st S2[k] holds S2[k + 1] proof let k be Element of NAT ; ::_thesis: ( S2[k] implies S2[k + 1] ) set r = ((2 * k) + 1) - k; set r9 = ((2 * k) + 3) - (k + 1); set r99 = k + 1; A15: 2 * ((2 to_power (2 * k)) * 2) = 2 * ((2 to_power (2 * k)) * (2 to_power 1)) by POWER:25 .= 2 * (2 to_power ((2 * k) + 1)) by POWER:27 .= (2 to_power 1) * (2 to_power ((2 * k) + 1)) by POWER:25 .= 2 to_power ((1 + (2 * k)) + 1) by POWER:27 ; A16: k + 1 >= 0 ; then reconsider r = ((2 * k) + 1) - k as Element of NAT ; A17: (((2 * k) + 1) - k) + k >= 0 + k by A16, XREAL_1:6; (2 * k) + 3 < (2 * k) + 4 by XREAL_1:6; then ((2 * k) + 3) / (k + 2) < (2 * (k + 2)) / (k + 2) by XREAL_1:74; then ((2 * k) + 3) / (k + 2) < 2 * ((k + 2) / (k + 2)) by XCMPLX_1:74; then A18: ((2 * k) + 3) / (k + 2) < 2 * 1 by XCMPLX_1:60; assume ((2 * k) + 1) choose k <= 2 to_power (2 * k) ; ::_thesis: S2[k + 1] then (((2 * k) + 1) choose k) * (((2 * k) + 3) / (k + 2)) <= (2 to_power (2 * k)) * 2 by A18, XREAL_1:66; then A19: 2 * ((((2 * k) + 1) choose k) * (((2 * k) + 3) / (k + 2))) <= 2 * ((2 to_power (2 * k)) * 2) by XREAL_1:64; A20: k + 2 >= 0 ; then reconsider r9 = ((2 * k) + 3) - (k + 1) as Element of NAT ; ((k + 1) !) * (r9 !) = ((k !) * (k + 1)) * ((r + 1) !) by NEWTON:15 .= ((k !) * (k + 1)) * ((r !) * (r + 1)) by NEWTON:15 .= (((k !) * (r !)) * (k + 1)) * (r + 1) ; then A21: ((k !) * (r !)) / (((k + 1) !) * (r9 !)) = ((k !) * (r !)) / (((k !) * (r !)) * ((k + 1) * (r + 1))) .= (((k !) * (r !)) / ((k !) * (r !))) / ((k + 1) * (r + 1)) by XCMPLX_1:78 .= 1 / ((k + 1) * (r + 1)) by XCMPLX_1:60 ; A22: ((2 * k) + 1) ! = ((((2 * k) + 1) !) / ((k !) * (r !))) * ((k !) * (r !)) by XCMPLX_1:87 .= (((2 * k) + 1) choose k) * ((k !) * (r !)) by A17, NEWTON:def_3 ; (((2 * k) + 3) - (k + 1)) + (k + 1) >= 0 + (k + 1) by A20, XREAL_1:6; then ((2 * (k + 1)) + 1) choose (k + 1) = ((((2 * k) + 2) + 1) !) / (((k + 1) !) * (r9 !)) by NEWTON:def_3 .= (((((2 * k) + 1) + 1) !) * ((2 * k) + 3)) / (((k + 1) !) * (r9 !)) by NEWTON:15 .= (((((2 * k) + 1) !) * ((2 * k) + 2)) * ((2 * k) + 3)) / (((k + 1) !) * (r9 !)) by NEWTON:15 .= ((((2 * k) + 2) * ((2 * k) + 3)) * (((2 * k) + 1) !)) / (((k + 1) !) * (r9 !)) .= ((2 * (k + 1)) * ((2 * k) + 3)) * (((((2 * k) + 1) choose k) * ((k !) * (r !))) / (((k + 1) !) * (r9 !))) by A22, XCMPLX_1:74 .= ((2 * (k + 1)) * ((2 * k) + 3)) * ((((2 * k) + 1) choose k) * (((k !) * (r !)) / (((k + 1) !) * (r9 !)))) by XCMPLX_1:74 .= (((2 * (k + 1)) * ((2 * k) + 3)) * (((2 * k) + 1) choose k)) * (1 / ((k + 1) * (r + 1))) by A21 .= ((2 * (((2 * k) + 1) choose k)) * ((k + 1) * ((2 * k) + 3))) / ((k + 1) * (r + 1)) by XCMPLX_1:99 .= (2 * (((2 * k) + 1) choose k)) * (((k + 1) * ((2 * k) + 3)) / ((k + 1) * (r + 1))) by XCMPLX_1:74 .= (2 * (((2 * k) + 1) choose k)) * (((k + 1) / (k + 1)) * (((2 * k) + 3) / (r + 1))) by XCMPLX_1:76 .= (2 * (((2 * k) + 1) choose k)) * (1 * (((2 * k) + 3) / (r + 1))) by XCMPLX_1:60 .= (2 * (((2 * k) + 1) choose k)) * (((2 * k) + 3) / (k + 2)) ; hence S2[k + 1] by A15, A19; ::_thesis: verum end; ((2 * 0) + 1) choose 0 = 1 by NEWTON:19; then A23: S2[ 0 ] by POWER:24; for k being Element of NAT holds S2[k] from NAT_1:sch_1(A23, A14); hence ((2 * k) + 1) choose k <= 2 to_power (2 * k) ; ::_thesis: verum end; set Y = { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; set SY = Sgm { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; A24: rng (Sgm { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) c= REAL ; set X = { p where p is prime Element of NAT : p <= k + 1 } ; set SX = Sgm { p where p is prime Element of NAT : p <= k + 1 } ; rng (Sgm { p where p is prime Element of NAT : p <= k + 1 } ) c= REAL ; then reconsider SX = Sgm { p where p is prime Element of NAT : p <= k + 1 } as FinSequence of REAL by FINSEQ_1:def_4; m / 2 = (k * 2) / 2 by A12; then A25: Product SX <= 4 to_power k by A2, A11, XREAL_1:216; for y being set st y in { p where p is prime Element of NAT : p <= k + 1 } holds y in Seg (k + 1) proof let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= k + 1 } implies y in Seg (k + 1) ) assume y in { p where p is prime Element of NAT : p <= k + 1 } ; ::_thesis: y in Seg (k + 1) then A26: ex y9 being prime Element of NAT st ( y9 = y & y9 <= k + 1 ) ; then reconsider y = y as prime Element of NAT ; y >= 1 by Lm1; hence y in Seg (k + 1) by A26, FINSEQ_1:1; ::_thesis: verum end; then A27: { p where p is prime Element of NAT : p <= k + 1 } c= Seg (k + 1) by TARSKI:def_3; for k9 being Element of NAT st k9 in dom SX holds SX . k9 > 0 proof let k9 be Element of NAT ; ::_thesis: ( k9 in dom SX implies SX . k9 > 0 ) assume A28: k9 in dom SX ; ::_thesis: SX . k9 > 0 rng SX = { p where p is prime Element of NAT : p <= k + 1 } by A27, FINSEQ_1:def_13; then SX . k9 in { p where p is prime Element of NAT : p <= k + 1 } by A28, FUNCT_1:3; then ex y9 being prime Element of NAT st ( y9 = SX . k9 & y9 <= k + 1 ) ; hence SX . k9 > 0 ; ::_thesis: verum end; then A29: 0 <= Product SX by Th42; reconsider SY = Sgm { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } as FinSequence of REAL by A24, FINSEQ_1:def_4; A30: for a, b being Element of NAT st a in { p where p is prime Element of NAT : p <= k + 1 } & b in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } holds a < b proof let a, b be Element of NAT ; ::_thesis: ( a in { p where p is prime Element of NAT : p <= k + 1 } & b in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } implies a < b ) assume a in { p where p is prime Element of NAT : p <= k + 1 } ; ::_thesis: ( not b in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } or a < b ) then A31: ex y9 being prime Element of NAT st ( y9 = a & y9 <= k + 1 ) ; assume b in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: a < b then ex y99 being prime Element of NAT st ( y99 = b & y99 > k + 1 & y99 <= (2 * k) + 1 ) ; hence a < b by A31, XXREAL_0:2; ::_thesis: verum end; for y being set st y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } holds y in Seg ((2 * k) + 1) proof let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } implies y in Seg ((2 * k) + 1) ) assume y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: y in Seg ((2 * k) + 1) then A32: ex y9 being prime Element of NAT st ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; then reconsider y = y as prime Element of NAT ; y >= 1 by Lm1; hence y in Seg ((2 * k) + 1) by A32, FINSEQ_1:1; ::_thesis: verum end; then A33: { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } c= Seg ((2 * k) + 1) by TARSKI:def_3; A34: for k9 being Element of NAT st k9 in dom SY holds SY . k9 > 0 proof let k9 be Element of NAT ; ::_thesis: ( k9 in dom SY implies SY . k9 > 0 ) assume A35: k9 in dom SY ; ::_thesis: SY . k9 > 0 rng SY = { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } by A33, FINSEQ_1:def_13; then SY . k9 in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } by A35, FUNCT_1:3; then ex y9 being prime Element of NAT st ( y9 = SY . k9 & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; hence SY . k9 > 0 ; ::_thesis: verum end; A36: Product SY <= ((2 * k) + 1) choose k proof set r = ((2 * k) + 1) - k; set b = ((2 * k) + 1) choose k; reconsider SY = SY as FinSequence of NAT ; set a = Product SY; A37: k + 1 >= 0 ; then reconsider r = ((2 * k) + 1) - k as Element of NAT ; A38: (((2 * k) + 1) - k) + k >= 0 + k by A37, XREAL_1:6; then ((2 * k) + 1) choose k = (((2 * k) + 1) !) / ((k !) * (r !)) by NEWTON:def_3; then A39: ((2 * k) + 1) choose k > 0 ; A40: for p being Element of NAT st p is prime holds p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) proof now__::_thesis:_for_y_being_set_st_y_in__{__p_where_p_is_prime_Element_of_NAT_:_(_p_>_k_+_1_&_p_<=_(2_*_k)_+_1_)__}__holds_ y_in_SetPrimes let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } implies y in SetPrimes ) assume y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: y in SetPrimes then ex y9 being prime Element of NAT st ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; hence y in SetPrimes by NEWTON:def_6; ::_thesis: verum end; then { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } c= SetPrimes by TARSKI:def_3; then rng SY c= SetPrimes by A33, FINSEQ_1:def_13; then reconsider SY = SY as FinSequence of SetPrimes by FINSEQ_1:def_4; let p be Element of NAT ; ::_thesis: ( p is prime implies p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) ) assume A41: p is prime ; ::_thesis: p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) A42: rng (Sgm { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) = { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } by A33, FINSEQ_1:def_13; A43: ( p divides Product SY implies ( p > k + 1 & p <= (2 * k) + 1 ) ) proof assume p divides Product SY ; ::_thesis: ( p > k + 1 & p <= (2 * k) + 1 ) then p in rng SY by A41, NAT_3:8; then ex y9 being prime Element of NAT st ( y9 = p & y9 > k + 1 & y9 <= (2 * k) + 1 ) by A42; hence ( p > k + 1 & p <= (2 * k) + 1 ) ; ::_thesis: verum end; percases ( ( p > k + 1 & p <= (2 * k) + 1 ) or not p > k + 1 or not p <= (2 * k) + 1 ) ; supposeA44: ( p > k + 1 & p <= (2 * k) + 1 ) ; ::_thesis: p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) set c = (k !) * (r !); A45: (((2 * k) + 1) choose k) * ((k !) * (r !)) = ((((2 * k) + 1) !) / ((k !) * (r !))) * ((k !) * (r !)) by A38, NEWTON:def_3 .= ((2 * k) + 1) ! by XCMPLX_1:87 ; A46: p divides ((2 * k) + 1) choose k proof assume not p divides ((2 * k) + 1) choose k ; ::_thesis: contradiction then A47: p divides (k !) * (r !) by A41, A44, A45, NEWTON:41, NEWTON:80; percases ( p divides k ! or p divides r ! ) by A41, A47, NEWTON:80; supposeA48: p divides k ! ; ::_thesis: contradiction k + 0 < k + 1 by XREAL_1:6; then k < p by A44, XXREAL_0:2; hence contradiction by A41, A48, Th19; ::_thesis: verum end; suppose p divides r ! ; ::_thesis: contradiction hence contradiction by A41, A44, Th19; ::_thesis: verum end; end; end; p <> 1 by A41, INT_2:def_4; then p |-count (((2 * k) + 1) choose k) <> 0 by A39, A46, NAT_3:27; then 0 + 1 < (p |-count (((2 * k) + 1) choose k)) + 1 by XREAL_1:6; then A49: 1 <= p |-count (((2 * k) + 1) choose k) by NAT_1:13; now__::_thesis:_for_y_being_set_st_y_in__{__p_where_p_is_prime_Element_of_NAT_:_(_p_>_k_+_1_&_p_<=_(2_*_k)_+_1_)__}__holds_ y_in_SetPrimes let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } implies y in SetPrimes ) assume y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: y in SetPrimes then ex y9 being prime Element of NAT st ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; hence y in SetPrimes by NEWTON:def_6; ::_thesis: verum end; then A50: { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } c= SetPrimes by TARSKI:def_3; p in rng SY by A41, A42, A44; hence p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) by A33, A41, A50, A49, Th44; ::_thesis: verum end; suppose ( not p > k + 1 or not p <= (2 * k) + 1 ) ; ::_thesis: p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) then A51: not p |^ (0 + 1) divides Product SY by A43, NEWTON:5; 1 divides Product SY by NAT_D:6; then A52: p |^ 0 divides Product SY by NEWTON:4; ( p <> 1 & Product SY <> 0 ) by A34, A41, Th42, INT_2:def_4; hence p |-count (Product SY) <= p |-count (((2 * k) + 1) choose k) by A52, A51, NAT_3:def_7; ::_thesis: verum end; end; end; Product SY is non empty Nat by A34, Th42; then ex n being Element of NAT st ((2 * k) + 1) choose k = (Product SY) * n by A39, A40, Th20; then Product SY divides ((2 * k) + 1) choose k by NAT_D:def_3; hence Product SY <= ((2 * k) + 1) choose k by A39, NAT_D:7; ::_thesis: verum end; for y being set holds ( y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } iff y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) proof let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } iff y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) A53: now__::_thesis:_(_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_k_+_1__}__\/__{__p_where_p_is_prime_Element_of_NAT_:_(_p_>_k_+_1_&_p_<=_(2_*_k)_+_1_)__}__implies_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_(2_*_k)_+_1__}__) assume A54: y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } percases ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) by A54, XBOOLE_0:def_3; suppose y in { p where p is prime Element of NAT : p <= k + 1 } ; ::_thesis: y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } then consider y9 being prime Element of NAT such that A55: y9 = y and A56: y9 <= k + 1 ; 1 * k <= 2 * k by XREAL_1:68; then k + 1 <= (2 * k) + 1 by XREAL_1:6; then y9 <= (2 * k) + 1 by A56, XXREAL_0:2; hence y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } by A55; ::_thesis: verum end; suppose y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ; ::_thesis: y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } then ex y9 being prime Element of NAT st ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; hence y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } ; ::_thesis: verum end; end; end; now__::_thesis:_(_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_(2_*_k)_+_1__}__implies_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_k_+_1__}__\/__{__p_where_p_is_prime_Element_of_NAT_:_(_p_>_k_+_1_&_p_<=_(2_*_k)_+_1_)__}__) assume y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } ; ::_thesis: y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } then consider y9 being prime Element of NAT such that A57: ( y9 = y & y9 <= (2 * k) + 1 ) ; ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) proof percases ( ( y9 = y & y9 <= k + 1 ) or ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ) by A57; suppose ( y9 = y & y9 <= k + 1 ) ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) hence ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) ; ::_thesis: verum end; suppose ( y9 = y & y9 > k + 1 & y9 <= (2 * k) + 1 ) ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) hence ( y in { p where p is prime Element of NAT : p <= k + 1 } or y in { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) ; ::_thesis: verum end; end; end; hence y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } by XBOOLE_0:def_3; ::_thesis: verum end; hence ( y in { p where p is prime Element of NAT : p <= (2 * k) + 1 } iff y in { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } ) by A53; ::_thesis: verum end; then A58: { p where p is prime Element of NAT : p <= (2 * k) + 1 } = { p where p is prime Element of NAT : p <= k + 1 } \/ { p where p is prime Element of NAT : ( p > k + 1 & p <= (2 * k) + 1 ) } by TARSKI:1; 2 to_power (2 * k) = 2 to_power (k + k) .= (2 to_power k) * (2 to_power k) by POWER:27 .= (2 * 2) to_power k by POWER:30 ; then A59: Product SY <= 4 to_power k by A36, A13, XXREAL_0:2; 0 < Product SY by A34, Th42; then ( Product (SX ^ SY) = (Product SX) * (Product SY) & (Product SX) * (Product SY) <= (4 to_power k) * (4 to_power k) ) by A25, A59, A29, RVSUM_1:97, XREAL_1:66; then Product (SX ^ SY) <= 4 to_power (k + k) by POWER:27; hence S1[m] by A12, A27, A33, A58, A30, FINSEQ_3:42; ::_thesis: verum end; supposeA60: m + 1 is even ; ::_thesis: S1[m] set k = m - 1; m - 1 > 1 - 1 by A11, XREAL_1:9; then reconsider k = m - 1 as Element of NAT by INT_1:3; for y being set holds ( y in { p where p is prime Element of NAT : p <= m + 1 } iff y in { p where p is prime Element of NAT : p <= m } ) proof let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= m + 1 } iff y in { p where p is prime Element of NAT : p <= m } ) A61: now__::_thesis:_(_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_m_+_1__}__implies_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_m__}__) assume y in { p where p is prime Element of NAT : p <= m + 1 } ; ::_thesis: y in { p where p is prime Element of NAT : p <= m } then consider y9 being prime Element of NAT such that A62: y = y9 and A63: y9 <= m + 1 ; m + 1 > 1 + 1 by A11, XREAL_1:6; then m + 1 is not Prime by A60, PEPIN:17; then y9 < m + 1 by A63, XXREAL_0:1; then y9 <= m by NAT_1:13; hence y in { p where p is prime Element of NAT : p <= m } by A62; ::_thesis: verum end; now__::_thesis:_(_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_m__}__implies_y_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_m_+_1__}__) assume y in { p where p is prime Element of NAT : p <= m } ; ::_thesis: y in { p where p is prime Element of NAT : p <= m + 1 } then consider y9 being prime Element of NAT such that A64: y = y9 and A65: y9 <= m ; 0 + m <= 1 + m by XREAL_1:6; then y9 <= m + 1 by A65, XXREAL_0:2; hence y in { p where p is prime Element of NAT : p <= m + 1 } by A64; ::_thesis: verum end; hence ( y in { p where p is prime Element of NAT : p <= m + 1 } iff y in { p where p is prime Element of NAT : p <= m } ) by A61; ::_thesis: verum end; then A66: { p where p is prime Element of NAT : p <= m + 1 } = { p where p is prime Element of NAT : p <= m } by TARSKI:1; k + 1 = m ; then k < m by NAT_1:13; then ( Product (Sgm { p where p is prime Element of NAT : p <= k + 1 } ) <= 4 to_power k & 4 to_power k <= 4 to_power m ) by A2, POWER:39; hence S1[m] by A66, XXREAL_0:2; ::_thesis: verum end; end; end; end; end; for n being Nat holds S1[n] from NAT_1:sch_4(A1); hence Product (Sgm { p where p is prime Element of NAT : p <= n + 1 } ) <= 4 to_power n ; ::_thesis: verum end; theorem Th46: :: NAT_4:46 for x being Real st x >= 2 holds Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) proof let x be Real; ::_thesis: ( x >= 2 implies Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) ) set A = { p where p is prime Element of NAT : p <= x } ; A1: { p where p is prime Element of NAT : p <= x } is finite proof ex m being Element of NAT st x < m proof set m = (abs [/x\]) + 1; take (abs [/x\]) + 1 ; ::_thesis: x < (abs [/x\]) + 1 ( [/x\] <= abs [/x\] & abs [/x\] < (abs [/x\]) + 1 ) by ABSVALUE:4, NAT_1:13; then ( x <= [/x\] & [/x\] < (abs [/x\]) + 1 ) by INT_1:def_7, XXREAL_0:2; hence x < (abs [/x\]) + 1 by XXREAL_0:2; ::_thesis: verum end; then consider m being Element of NAT such that A2: x < m ; set B = SetPrimenumber m; { p where p is prime Element of NAT : p <= x } c= SetPrimenumber m proof let y be set ; :: according to TARSKI:def_3 ::_thesis: ( not y in { p where p is prime Element of NAT : p <= x } or y in SetPrimenumber m ) assume y in { p where p is prime Element of NAT : p <= x } ; ::_thesis: y in SetPrimenumber m then consider y9 being prime Element of NAT such that A3: y9 = y and A4: y9 <= x ; y9 < m by A2, A4, XXREAL_0:2; hence y in SetPrimenumber m by A3, NEWTON:def_7; ::_thesis: verum end; hence { p where p is prime Element of NAT : p <= x } is finite ; ::_thesis: verum end; A5: { p where p is prime Element of NAT : p <= x } is real-membered proof let y be set ; :: according to MEMBERED:def_3 ::_thesis: ( not y in { p where p is prime Element of NAT : p <= x } or y is real ) ( y in { p where p is prime Element of NAT : p <= x } implies y is real ) proof assume y in { p where p is prime Element of NAT : p <= x } ; ::_thesis: y is real then ex y9 being prime Element of NAT st ( y9 = y & y9 <= x ) ; hence y is real ; ::_thesis: verum end; hence ( not y in { p where p is prime Element of NAT : p <= x } or y is real ) ; ::_thesis: verum end; assume A6: x >= 2 ; ::_thesis: Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) not { p where p is prime Element of NAT : p <= x } is empty proof assume A7: { p where p is prime Element of NAT : p <= x } is empty ; ::_thesis: contradiction 2 in { p where p is prime Element of NAT : p <= x } by A6, INT_2:28; hence contradiction by A7; ::_thesis: verum end; then reconsider A = { p where p is prime Element of NAT : p <= x } as non empty finite real-membered set by A1, A5; set q = max A; max A in A by XXREAL_2:def_8; then A8: ex q9 being prime Element of NAT st ( q9 = max A & q9 <= x ) ; then reconsider q = max A as Prime ; for y being set holds ( y in { p where p is prime Element of NAT : p <= q } iff y in { p where p is prime Element of NAT : p <= x } ) proof let y be set ; ::_thesis: ( y in { p where p is prime Element of NAT : p <= q } iff y in { p where p is prime Element of NAT : p <= x } ) hereby ::_thesis: ( y in { p where p is prime Element of NAT : p <= x } implies y in { p where p is prime Element of NAT : p <= q } ) assume y in { p where p is prime Element of NAT : p <= q } ; ::_thesis: y in { p where p is prime Element of NAT : p <= x } then consider y9 being prime Element of NAT such that A9: y9 = y and A10: y9 <= q ; y9 <= x by A8, A10, XXREAL_0:2; hence y in { p where p is prime Element of NAT : p <= x } by A9; ::_thesis: verum end; assume A11: y in { p where p is prime Element of NAT : p <= x } ; ::_thesis: y in { p where p is prime Element of NAT : p <= q } then consider y9 being prime Element of NAT such that A12: y9 = y and y9 <= x ; y9 <= q by A11, A12, XXREAL_2:def_8; hence y in { p where p is prime Element of NAT : p <= q } by A12; ::_thesis: verum end; then A13: { p where p is prime Element of NAT : p <= q } = { p where p is prime Element of NAT : p <= x } by TARSKI:1; A14: 4 to_power (q - 1) <= 4 to_power (x - 1) proof percases ( q = x or q < x ) by A8, XXREAL_0:1; suppose q = x ; ::_thesis: 4 to_power (q - 1) <= 4 to_power (x - 1) hence 4 to_power (q - 1) <= 4 to_power (x - 1) ; ::_thesis: verum end; suppose q < x ; ::_thesis: 4 to_power (q - 1) <= 4 to_power (x - 1) then q - 1 < x - 1 by XREAL_1:14; hence 4 to_power (q - 1) <= 4 to_power (x - 1) by POWER:39; ::_thesis: verum end; end; end; Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) proof set b = 4 to_power (q - 1); set a = Product (Sgm { p where p is prime Element of NAT : p <= q } ); set n = q -' 1; q > 1 by Lm1; then q -' 1 = q - 1 by XREAL_1:233; then q = (q -' 1) + 1 ; then Product (Sgm { p where p is prime Element of NAT : p <= q } ) <= 4 to_power (q - 1) by Th45; hence Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) by A13, A14, XXREAL_0:2; ::_thesis: verum end; hence Product (Sgm { p where p is prime Element of NAT : p <= x } ) <= 4 to_power (x - 1) ; ::_thesis: verum end; theorem Th47: :: NAT_4:47 for n being Element of NAT for p being Prime st n <> 0 holds ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) proof let n be Element of NAT ; ::_thesis: for p being Prime st n <> 0 holds ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) let p be Prime; ::_thesis: ( n <> 0 implies ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) ) defpred S1[ Nat, set ] means ( ( $2 = 1 implies p |^ $1 divides n ) & ( p |^ $1 divides n implies $2 = 1 ) & ( $2 = 0 implies not p |^ $1 divides n ) & ( not p |^ $1 divides n implies $2 = 0 ) ); set f1 = ((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0); set n1 = p |-count n; set n2 = n -' (p |-count n); set fa = (p |-count n) |-> 1; set fb = (n -' (p |-count n)) |-> 0; A1: Sum (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) = (Sum ((p |-count n) |-> 1)) + (Sum ((n -' (p |-count n)) |-> 0)) by RVSUM_1:75 .= ((p |-count n) * 1) + (Sum ((n -' (p |-count n)) |-> 0)) by RVSUM_1:80 .= (p |-count n) + ((n -' (p |-count n)) * 0) by RVSUM_1:80 ; assume A2: n <> 0 ; ::_thesis: ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) A3: now__::_thesis:_not_n_<_p_|-count_n p <> 1 by INT_2:def_4; then p |^ (p |-count n) divides n by A2, NAT_3:def_7; then A4: p |^ (p |-count n) <= n by A2, NAT_D:7; A5: p > 1 by INT_2:def_4; assume n < p |-count n ; ::_thesis: contradiction then p to_power n < p to_power (p |-count n) by A5, POWER:39; then p |^ n < p to_power (p |-count n) by POWER:41; then p |^ n < p |^ (p |-count n) by POWER:41; then p |^ n < n by A4, XXREAL_0:2; hence contradiction by A5, Th3; ::_thesis: verum end; A6: for k being Nat st k in Seg n holds ex x being set st S1[k,x] proof let k be Nat; ::_thesis: ( k in Seg n implies ex x being set st S1[k,x] ) assume k in Seg n ; ::_thesis: ex x being set st S1[k,x] percases ( p |^ k divides n or not p |^ k divides n ) ; supposeA7: p |^ k divides n ; ::_thesis: ex x being set st S1[k,x] set x = 1; take 1 ; ::_thesis: S1[k,1] thus S1[k,1] by A7; ::_thesis: verum end; supposeA8: not p |^ k divides n ; ::_thesis: ex x being set st S1[k,x] set x = 0 ; take 0 ; ::_thesis: S1[k, 0 ] thus S1[k, 0 ] by A8; ::_thesis: verum end; end; end; consider f being FinSequence such that A9: dom f = Seg n and A10: for k being Nat st k in Seg n holds S1[k,f . k] from FINSEQ_1:sch_1(A6); now__::_thesis:_for_x_being_set_st_x_in_rng_f_holds_ x_in_NAT let x be set ; ::_thesis: ( x in rng f implies x in NAT ) assume x in rng f ; ::_thesis: x in NAT then consider k being set such that A11: k in dom f and A12: f . k = x by FUNCT_1:def_3; reconsider k = k as Element of NAT by A11; S1[k,f . k] by A9, A10, A11; hence x in NAT by A12; ::_thesis: verum end; then rng f c= NAT by TARSKI:def_3; then reconsider f = f as FinSequence of NAT by FINSEQ_1:def_4; A13: len (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) = (len ((p |-count n) |-> 1)) + (len ((n -' (p |-count n)) |-> 0)) by FINSEQ_1:22 .= (p |-count n) + (len ((n -' (p |-count n)) |-> 0)) by CARD_1:def_7 .= (p |-count n) + (n -' (p |-count n)) by CARD_1:def_7 .= (p |-count n) + (n - (p |-count n)) by A3, XREAL_1:233 ; A14: for x being set st x in dom f holds f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x proof set ff2 = (n -' (p |-count n)) |-> 0; set ff1 = (p |-count n) |-> 1; let x be set ; ::_thesis: ( x in dom f implies f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x ) assume A15: x in dom f ; ::_thesis: f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x then reconsider x1 = x as Element of NAT ; A16: x in dom (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) by A9, A13, A15, FINSEQ_1:def_3; percases ( x1 in dom ((p |-count n) |-> 1) or ex m being Nat st ( m in dom ((n -' (p |-count n)) |-> 0) & x1 = (len ((p |-count n) |-> 1)) + m ) ) by A16, FINSEQ_1:25; supposeA17: x1 in dom ((p |-count n) |-> 1) ; ::_thesis: f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x then A18: x in Seg (p |-count n) by FUNCOP_1:13; A19: p |^ x1 divides n proof percases ( x1 = 0 or x1 > 0 ) ; suppose x1 = 0 ; ::_thesis: p |^ x1 divides n then p |^ x1 = 1 by NEWTON:4; hence p |^ x1 divides n by NAT_D:6; ::_thesis: verum end; suppose x1 > 0 ; ::_thesis: p |^ x1 divides n then x1 + 1 > 0 + 1 by XREAL_1:6; then x1 >= 1 by NAT_1:13; then A20: x1 -' 1 = x1 - 1 by XREAL_1:233; set j = p |-count n; set i = x1 -' 1; p <> 1 by INT_2:def_4; then A21: p |^ (p |-count n) divides n by A2, NAT_3:def_7; ( (- 1) + x1 < 0 + x1 & x1 <= p |-count n ) by A18, FINSEQ_1:1, XREAL_1:6; then A22: x1 -' 1 < p |-count n by A20, XXREAL_0:2; (x1 -' 1) + 1 = x1 by A20; hence p |^ x1 divides n by A22, A21, NAT_3:4; ::_thesis: verum end; end; end; ((p |-count n) |-> 1) . x = 1 by A18, FUNCOP_1:7; then (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x1 = 1 by A17, FINSEQ_1:def_7; hence f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x by A9, A10, A15, A19; ::_thesis: verum end; suppose ex m being Nat st ( m in dom ((n -' (p |-count n)) |-> 0) & x1 = (len ((p |-count n) |-> 1)) + m ) ; ::_thesis: f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x then consider m being Nat such that A23: m in dom ((n -' (p |-count n)) |-> 0) and A24: x = (len ((p |-count n) |-> 1)) + m ; m in Seg (n -' (p |-count n)) by A23, FUNCOP_1:13; then m >= 1 by FINSEQ_1:1; then m + (p |-count n) > 0 + (p |-count n) by XREAL_1:6; then A25: x1 > p |-count n by A24, CARD_1:def_7; A26: not p |^ x1 divides n proof assume p |^ x1 divides n ; ::_thesis: contradiction then A27: p |-count (p |^ x1) <= p |-count n by A2, NAT_3:30; p > 1 by INT_2:def_4; hence contradiction by A25, A27, NAT_3:25; ::_thesis: verum end; ((n -' (p |-count n)) |-> 0) . m = 0 ; then (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x = 0 by A23, A24, FINSEQ_1:def_7; hence f . x = (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) . x by A9, A10, A15, A26; ::_thesis: verum end; end; end; take f ; ::_thesis: ( len f = n & ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) thus len f = n by A9, FINSEQ_1:def_3; ::_thesis: ( ( for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) ) & p |-count n = Sum f ) thus for k being Element of NAT st k in dom f holds ( ( f . k = 1 implies p |^ k divides n ) & ( p |^ k divides n implies f . k = 1 ) & ( f . k = 0 implies not p |^ k divides n ) & ( not p |^ k divides n implies f . k = 0 ) ) by A9, A10; ::_thesis: p |-count n = Sum f dom f = dom (((p |-count n) |-> 1) ^ ((n -' (p |-count n)) |-> 0)) by A9, A13, FINSEQ_1:def_3; hence p |-count n = Sum f by A14, A1, FUNCT_1:2; ::_thesis: verum end; theorem Th48: :: NAT_4:48 for n being Element of NAT for p being Prime ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) proof defpred S1[ Nat] means for p being Prime ex f being FinSequence of NAT st ( len f = $1 & ( for k being Element of NAT st k in dom f holds f . k = [\($1 / (p |^ k))/] ) & p |-count ($1 !) = Sum f ); let n be Element of NAT ; ::_thesis: for p being Prime ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) let p be Prime; ::_thesis: ex f being FinSequence of NAT st ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] for p being Prime ex f being FinSequence of NAT st ( len f = n + 1 & ( for k being Element of NAT st k in dom f holds f . k = [\((n + 1) / (p |^ k))/] ) & p |-count ((n + 1) !) = Sum f ) proof let p be Prime; ::_thesis: ex f being FinSequence of NAT st ( len f = n + 1 & ( for k being Element of NAT st k in dom f holds f . k = [\((n + 1) / (p |^ k))/] ) & p |-count ((n + 1) !) = Sum f ) consider fn being FinSequence of NAT such that A3: len fn = n and A4: for k being Element of NAT st k in dom fn holds fn . k = [\(n / (p |^ k))/] and A5: p |-count (n !) = Sum fn by A2; set fn0 = fn ^ <*0*>; consider fn1 being FinSequence of NAT such that A6: len fn1 = n + 1 and A7: for k being Element of NAT st k in dom fn1 holds ( ( fn1 . k = 1 implies p |^ k divides n + 1 ) & ( p |^ k divides n + 1 implies fn1 . k = 1 ) & ( fn1 . k = 0 implies not p |^ k divides n + 1 ) & ( not p |^ k divides n + 1 implies fn1 . k = 0 ) ) and A8: p |-count (n + 1) = Sum fn1 by Th47; A9: Seg (n + 1) = dom fn1 by A6, FINSEQ_1:def_3; set f = (fn ^ <*0*>) + fn1; now__::_thesis:_for_y_being_set_st_y_in_rng_((fn_^_<*0*>)_+_fn1)_holds_ y_in_NAT let y be set ; ::_thesis: ( y in rng ((fn ^ <*0*>) + fn1) implies y in NAT ) assume y in rng ((fn ^ <*0*>) + fn1) ; ::_thesis: y in NAT then ex x being set st ( x in dom ((fn ^ <*0*>) + fn1) & y = ((fn ^ <*0*>) + fn1) . x ) by FUNCT_1:def_3; hence y in NAT ; ::_thesis: verum end; then rng ((fn ^ <*0*>) + fn1) c= NAT by TARSKI:def_3; then reconsider f = (fn ^ <*0*>) + fn1 as FinSequence of NAT by FINSEQ_1:def_4; take f ; ::_thesis: ( len f = n + 1 & ( for k being Element of NAT st k in dom f holds f . k = [\((n + 1) / (p |^ k))/] ) & p |-count ((n + 1) !) = Sum f ) A10: dom f = (dom (fn ^ <*0*>)) /\ (dom fn1) by Th41; A11: len (fn ^ <*0*>) = (len fn) + (len <*0*>) by FINSEQ_1:22 .= n + 1 by A3, FINSEQ_1:39 ; then Seg (n + 1) = dom (fn ^ <*0*>) by FINSEQ_1:def_3; hence len f = n + 1 by A10, A9, FINSEQ_1:def_3; ::_thesis: ( ( for k being Element of NAT st k in dom f holds f . k = [\((n + 1) / (p |^ k))/] ) & p |-count ((n + 1) !) = Sum f ) thus for k being Element of NAT st k in dom f holds f . k = [\((n + 1) / (p |^ k))/] ::_thesis: p |-count ((n + 1) !) = Sum f proof let k be Element of NAT ; ::_thesis: ( k in dom f implies f . k = [\((n + 1) / (p |^ k))/] ) A12: (p |^ k) / (p |^ k) = 1 by XCMPLX_1:60; p > 1 by INT_2:def_4; then A13: p |^ k >= 1 by PREPOWER:11; assume A14: k in dom f ; ::_thesis: f . k = [\((n + 1) / (p |^ k))/] then A15: f . k = ((fn ^ <*0*>) . k) + (fn1 . k) by VALUED_1:def_1; A16: k in dom (fn ^ <*0*>) by A10, A14, XBOOLE_0:def_4; A17: (fn ^ <*0*>) . k = [\(n / (p |^ k))/] proof percases ( k in dom fn or ex n1 being Nat st ( n1 in dom <*0*> & k = (len fn) + n1 ) ) by A16, FINSEQ_1:25; supposeA18: k in dom fn ; ::_thesis: (fn ^ <*0*>) . k = [\(n / (p |^ k))/] then fn . k = [\(n / (p |^ k))/] by A4; hence (fn ^ <*0*>) . k = [\(n / (p |^ k))/] by A18, FINSEQ_1:def_7; ::_thesis: verum end; suppose ex n1 being Nat st ( n1 in dom <*0*> & k = (len fn) + n1 ) ; ::_thesis: (fn ^ <*0*>) . k = [\(n / (p |^ k))/] then consider n1 being Nat such that A19: n1 in dom <*0*> and A20: k = (len fn) + n1 ; n1 in Seg 1 by A19, FINSEQ_1:38; then A21: n1 = 1 by FINSEQ_1:2, TARSKI:def_1; p > 1 by INT_2:def_4; then A22: ( p * (p |^ n) > 1 * (p |^ n) & p |^ n > n ) by Th3, XREAL_1:68; p |^ (n + 1) = (p |^ n) * p by NEWTON:6; then p |^ k > n by A3, A20, A21, A22, XXREAL_0:2; then n / (p |^ k) < 1 by XREAL_1:189; then A23: (n / (p |^ k)) - 1 < 1 - 1 by XREAL_1:9; (fn ^ <*0*>) . (n + 1) = <*0*> . 1 by A3, A19, A21, FINSEQ_1:def_7; then (fn ^ <*0*>) . k = 0 by A3, A20, A21, FINSEQ_1:40; hence (fn ^ <*0*>) . k = [\(n / (p |^ k))/] by A23, INT_1:def_6; ::_thesis: verum end; end; end; A24: k in dom fn1 by A10, A14, XBOOLE_0:def_4; percases ( p |^ k divides n + 1 or not p |^ k divides n + 1 ) ; supposeA25: p |^ k divides n + 1 ; ::_thesis: f . k = [\((n + 1) / (p |^ k))/] then consider r being Nat such that A26: n + 1 = (p |^ k) * r by NAT_D:def_3; A27: (n + 1) / (p |^ k) = r / ((p |^ k) / (p |^ k)) by A26, XCMPLX_1:77 .= r / (1 / 1) by XCMPLX_1:60 .= r ; (((p |^ k) / (p |^ k)) + ((- 1) / (p |^ k))) - 1 < 0 by A12; then A28: (((p |^ k) + (- 1)) / (p |^ k)) - 1 < 0 by XCMPLX_1:62; A29: (p |^ k) - 1 >= 1 - 1 by A13, XREAL_1:9; [\(n / (p |^ k))/] + 1 = [\((n / (p |^ k)) + 1)/] by INT_1:28 .= [\((n / (p |^ k)) + ((p |^ k) / (p |^ k)))/] by XCMPLX_1:60 .= [\((n + (p |^ k)) / (p |^ k))/] by XCMPLX_1:62 .= [\(((n + 1) + ((p |^ k) - 1)) / (p |^ k))/] .= [\(((n + 1) / (p |^ k)) + (((p |^ k) - 1) / (p |^ k)))/] by XCMPLX_1:62 .= ((n + 1) / (p |^ k)) + [\(((p |^ k) - 1) / (p |^ k))/] by A27, INT_1:28 .= ((n + 1) / (p |^ k)) + 0 by A29, A28, INT_1:def_6 .= [\((n + 1) / (p |^ k))/] by A27, INT_1:25 ; hence f . k = [\((n + 1) / (p |^ k))/] by A7, A15, A24, A17, A25; ::_thesis: verum end; supposeA30: not p |^ k divides n + 1 ; ::_thesis: f . k = [\((n + 1) / (p |^ k))/] set m = (n + 1) mod (p |^ k); set d = (n + 1) div (p |^ k); A31: n + 1 = ((p |^ k) * ((n + 1) div (p |^ k))) + ((n + 1) mod (p |^ k)) by NAT_D:2; then not (n + 1) mod (p |^ k) = 0 by A30, NAT_D:def_3; then ((n + 1) mod (p |^ k)) + 1 > 0 + 1 by XREAL_1:6; then (n + 1) mod (p |^ k) >= 1 by NAT_1:13; then A32: ((n + 1) mod (p |^ k)) - 1 >= 1 - 1 by XREAL_1:9; ( (n + 1) mod (p |^ k) < p |^ k & 0 + (p |^ k) < 1 + (p |^ k) ) by NAT_D:1, XREAL_1:6; then (n + 1) mod (p |^ k) < (p |^ k) + 1 by XXREAL_0:2; then ((n + 1) mod (p |^ k)) - 1 < ((p |^ k) + 1) - 1 by XREAL_1:9; then (((n + 1) mod (p |^ k)) - 1) / (p |^ k) < (p |^ k) / (p |^ k) by XREAL_1:74; then A33: ((((n + 1) mod (p |^ k)) - 1) / (p |^ k)) - 1 < 1 - 1 by A12, XREAL_1:9; ((n + 1) mod (p |^ k)) / (p |^ k) < (p |^ k) / (p |^ k) by NAT_D:1, XREAL_1:74; then A34: (((n + 1) mod (p |^ k)) / (p |^ k)) - 1 < 1 - 1 by A12, XREAL_1:9; A35: fn1 . k = 0 by A7, A24, A30; n = ((p |^ k) * ((n + 1) div (p |^ k))) + (((n + 1) mod (p |^ k)) - 1) by A31; then [\(n / (p |^ k))/] = [\((((p |^ k) * ((n + 1) div (p |^ k))) / (p |^ k)) + ((((n + 1) mod (p |^ k)) - 1) / (p |^ k)))/] by XCMPLX_1:62 .= [\((((n + 1) div (p |^ k)) * ((p |^ k) / (p |^ k))) + ((((n + 1) mod (p |^ k)) - 1) / (p |^ k)))/] by XCMPLX_1:74 .= [\((((n + 1) div (p |^ k)) * 1) + ((((n + 1) mod (p |^ k)) - 1) / (p |^ k)))/] by XCMPLX_1:60 .= ((n + 1) div (p |^ k)) + [\((((n + 1) mod (p |^ k)) - 1) / (p |^ k))/] by INT_1:28 .= ((n + 1) div (p |^ k)) + 0 by A32, A33, INT_1:def_6 .= ((n + 1) div (p |^ k)) + [\(((n + 1) mod (p |^ k)) / (p |^ k))/] by A34, INT_1:def_6 .= [\((((n + 1) div (p |^ k)) * 1) + (((n + 1) mod (p |^ k)) / (p |^ k)))/] by INT_1:28 .= [\((((n + 1) div (p |^ k)) * ((p |^ k) / (p |^ k))) + (((n + 1) mod (p |^ k)) / (p |^ k)))/] by XCMPLX_1:60 .= [\((((p |^ k) * ((n + 1) div (p |^ k))) / (p |^ k)) + (((n + 1) mod (p |^ k)) / (p |^ k)))/] by XCMPLX_1:74 .= [\((((p |^ k) * ((n + 1) div (p |^ k))) + ((n + 1) mod (p |^ k))) / (p |^ k))/] by XCMPLX_1:62 .= [\((n + 1) / (p |^ k))/] by NAT_D:2 ; hence f . k = [\((n + 1) / (p |^ k))/] by A15, A17, A35; ::_thesis: verum end; end; end; reconsider fn1 = fn1 as Element of (n + 1) -tuples_on REAL by A6, FINSEQ_2:92; reconsider fn0 = fn ^ <*0*> as Element of (n + 1) -tuples_on REAL by A11, FINSEQ_2:92; A36: (p |-count (n !)) + (p |-count (n + 1)) = p |-count ((n !) * (n + 1)) by NAT_3:28 .= p |-count ((n + 1) !) by NEWTON:15 ; Sum f = (Sum fn0) + (Sum fn1) by RVSUM_1:89 .= ((Sum fn) + 0) + (p |-count (n + 1)) by A8, RVSUM_1:74 .= (p |-count (n !)) + (p |-count (n + 1)) by A5 ; hence p |-count ((n + 1) !) = Sum f by A36; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A37: S1[ 0 ] proof set f = <*> NAT; let p be Prime; ::_thesis: ex f being FinSequence of NAT st ( len f = 0 & ( for k being Element of NAT st k in dom f holds f . k = [\(0 / (p |^ k))/] ) & p |-count (0 !) = Sum f ) take <*> NAT ; ::_thesis: ( len (<*> NAT) = 0 & ( for k being Element of NAT st k in dom (<*> NAT) holds (<*> NAT) . k = [\(0 / (p |^ k))/] ) & p |-count (0 !) = Sum (<*> NAT) ) thus len (<*> NAT) = 0 ; ::_thesis: ( ( for k being Element of NAT st k in dom (<*> NAT) holds (<*> NAT) . k = [\(0 / (p |^ k))/] ) & p |-count (0 !) = Sum (<*> NAT) ) thus for k being Element of NAT st k in dom (<*> NAT) holds (<*> NAT) . k = [\(0 / (p |^ k))/] ; ::_thesis: p |-count (0 !) = Sum (<*> NAT) p <> 1 by INT_2:def_4; hence p |-count (0 !) = Sum (<*> NAT) by NAT_3:21, NEWTON:12, RVSUM_1:72; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A37, A1); then consider f being FinSequence of NAT such that A38: ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) ; take f ; ::_thesis: ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) thus ( len f = n & ( for k being Element of NAT st k in dom f holds f . k = [\(n / (p |^ k))/] ) & p |-count (n !) = Sum f ) by A38; ::_thesis: verum end; theorem Th49: :: NAT_4:49 for n being Element of NAT for p being Prime ex f being FinSequence of REAL st ( len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum f ) proof let n be Element of NAT ; ::_thesis: for p being Prime ex f being FinSequence of REAL st ( len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum f ) let p be Prime; ::_thesis: ex f being FinSequence of REAL st ( len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum f ) set f0 = n |-> 0; consider f1 being FinSequence of NAT such that A1: len f1 = n and A2: for k being Element of NAT st k in dom f1 holds f1 . k = [\(n / (p |^ k))/] and A3: p |-count (n !) = Sum f1 by Th48; consider f2 being FinSequence of NAT such that A4: len f2 = 2 * n and A5: for k being Element of NAT st k in dom f2 holds f2 . k = [\((2 * n) / (p |^ k))/] and A6: p |-count ((2 * n) !) = Sum f2 by Th48; reconsider f2 = f2 as FinSequence of REAL ; set f = f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0)))); take f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0)))) ; ::_thesis: ( len (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) = 2 * n & ( for k being Element of NAT st k in dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) holds (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) ) A7: dom (f1 ^ (n |-> 0)) = Seg ((len f1) + (len (n |-> 0))) by FINSEQ_1:def_7 .= Seg (n + n) by A1, CARD_1:def_7 .= Seg (2 * n) ; A8: dom ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0)))) = (dom (- (f1 ^ (n |-> 0)))) /\ (dom (- (f1 ^ (n |-> 0)))) by Th41 .= Seg (2 * n) by A7, VALUED_1:8 ; A9: dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) = (dom f2) /\ (dom ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) by Th41 .= (Seg (2 * n)) /\ (Seg (2 * n)) by A4, A8, FINSEQ_1:def_3 ; hence len (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) = 2 * n by FINSEQ_1:def_3; ::_thesis: ( ( for k being Element of NAT st k in dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) holds (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) ) thus for k being Element of NAT st k in dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) holds (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ::_thesis: p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) proof let k be Element of NAT ; ::_thesis: ( k in dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) implies (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) assume A10: k in dom (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) ; ::_thesis: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) then A11: k in dom f2 by A4, A9, FINSEQ_1:def_3; A12: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = (f2 . k) + (((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0)))) . k) by A10, VALUED_1:def_1 .= (f2 . k) + (((- (f1 ^ (n |-> 0))) . k) + ((- (f1 ^ (n |-> 0))) . k)) by A8, A9, A10, VALUED_1:def_1 .= (f2 . k) + (2 * ((- (f1 ^ (n |-> 0))) . k)) .= (f2 . k) + (2 * (- ((f1 ^ (n |-> 0)) . k))) by RVSUM_1:17 .= (f2 . k) - (2 * ((f1 ^ (n |-> 0)) . k)) .= [\((2 * n) / (p |^ k))/] - (2 * ((f1 ^ (n |-> 0)) . k)) by A5, A11 ; percases ( k in dom f1 or ex e being Nat st ( e in dom (n |-> 0) & k = (len f1) + e ) ) by A7, A9, A10, FINSEQ_1:25; supposeA13: k in dom f1 ; ::_thesis: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) then (f1 ^ (n |-> 0)) . k = f1 . k by FINSEQ_1:def_7 .= [\(n / (p |^ k))/] by A2, A13 ; hence (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) by A12; ::_thesis: verum end; suppose ex e being Nat st ( e in dom (n |-> 0) & k = (len f1) + e ) ; ::_thesis: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) then consider e being Nat such that A14: e in dom (n |-> 0) and A15: k = (len f1) + e ; dom (n |-> 0) = Seg n by FUNCOP_1:13; then e >= 1 by A14, FINSEQ_1:1; then e + (len f1) >= 1 + (len f1) by XREAL_1:6; then A16: ( k > 1 + n or k = 1 + n ) by A1, A15, XXREAL_0:1; A17: (f1 ^ (n |-> 0)) . k = (n |-> 0) . e by A14, A15, FINSEQ_1:def_7 .= 0 ; p > 1 by INT_2:def_4; then p to_power k >= p to_power (1 + n) by A16, POWER:39; then p |^ k >= p to_power (1 + n) by POWER:41; then A18: p |^ k >= p |^ (1 + n) by POWER:41; A19: p > 1 by INT_2:def_4; then p * (p |^ n) > 1 * (p |^ n) by XREAL_1:68; then p |^ (1 + n) > p |^ n by NEWTON:6; then A20: p |^ k > p |^ n by A18, XXREAL_0:2; percases ( n = 0 or n <> 0 ) ; suppose n = 0 ; ::_thesis: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) hence (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) by A12, A17, INT_1:25; ::_thesis: verum end; supposeA21: n <> 0 ; ::_thesis: (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) (p |^ n) / (p |^ n) > n / (p |^ n) by A19, Th3, XREAL_1:74; then A22: 1 > n / (p |^ n) by XCMPLX_1:60; n / (p |^ n) > n / (p |^ k) by A20, A21, XREAL_1:76; then 1 > n / (p |^ k) by A22, XXREAL_0:2; then 1 - 1 > (n / (p |^ k)) - 1 by XREAL_1:9; hence (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) by A12, A17, INT_1:def_6; ::_thesis: verum end; end; end; end; end; p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) proof percases ( n = 0 or n <> 0 ) ; supposeA23: n = 0 ; ::_thesis: p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) then A24: (2 * n) choose n = 1 by NEWTON:19; p > 1 by INT_2:def_4; then A25: p |-count ((2 * n) choose n) = 0 by A24, NAT_3:21; len (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) = 0 by A9, A23, FINSEQ_1:def_3; hence p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) by A25, PROB_3:62; ::_thesis: verum end; supposeA26: n <> 0 ; ::_thesis: p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) A27: (2 * n) - n = n ; A28: n + n > n + 0 by A26, XREAL_1:6; then ((2 * n) choose n) * ((n !) * (n !)) = (((2 * n) !) / ((n !) * (n !))) * ((n !) * (n !)) by A27, NEWTON:def_3 .= (2 * n) ! by XCMPLX_1:87 ; then A29: (n !) * (n !) divides (2 * n) ! by NAT_D:def_3; (2 * n) choose n = ((2 * n) !) / ((n !) * (n !)) by A28, A27, NEWTON:def_3; then A30: (2 * n) choose n = (((n !) * (n !)) * (((2 * n) !) div ((n !) * (n !)))) / ((n !) * (n !)) by A29, NAT_D:3 .= ((2 * n) !) div ((n !) * (n !)) by XCMPLX_1:89 ; A31: - (f1 ^ (n |-> 0)) is Element of (len (- (f1 ^ (n |-> 0)))) -tuples_on REAL by FINSEQ_2:92; A32: p |-count (((2 * n) !) div ((n !) * (n !))) = (p |-count ((2 * n) !)) -' (p |-count ((n !) * (n !))) by A29, NAT_3:31 .= (p |-count ((2 * n) !)) - (p |-count ((n !) * (n !))) by A29, NAT_3:30, XREAL_1:233 ; A33: (- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))) is Element of (len ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) -tuples_on REAL by FINSEQ_2:92; ( len ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0)))) = len f2 & f2 is Element of (len f2) -tuples_on REAL ) by A4, A8, FINSEQ_1:def_3, FINSEQ_2:92; then Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) = (Sum f2) + (Sum ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) by A33, RVSUM_1:89 .= (Sum f2) + ((Sum (- (f1 ^ (n |-> 0)))) + (Sum (- (f1 ^ (n |-> 0))))) by A31, RVSUM_1:89 .= (Sum f2) + ((- (Sum (f1 ^ (n |-> 0)))) + (Sum (- (f1 ^ (n |-> 0))))) by RVSUM_1:88 .= (Sum f2) + ((- (Sum (f1 ^ (n |-> 0)))) + (- (Sum (f1 ^ (n |-> 0))))) by RVSUM_1:88 .= (Sum f2) - (2 * (Sum (f1 ^ (n |-> 0)))) .= (Sum f2) - (2 * ((Sum f1) + (Sum (n |-> 0)))) by RVSUM_1:75 .= (Sum f2) - (2 * ((Sum f1) + (n * 0))) by RVSUM_1:80 .= (p |-count ((2 * n) !)) - ((p |-count (n !)) + (p |-count (n !))) by A3, A6 .= p |-count (((2 * n) !) div ((n !) * (n !))) by A32, NAT_3:28 ; hence p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) by A30; ::_thesis: verum end; end; end; hence p |-count ((2 * n) choose n) = Sum (f2 + ((- (f1 ^ (n |-> 0))) + (- (f1 ^ (n |-> 0))))) ; ::_thesis: verum end; Lm8: for n, r being Element of NAT for p being Prime for f being FinSequence of REAL st p |^ r <= 2 * n & 2 * n < p |^ (r + 1) & len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) holds Sum f <= r proof let n, r be Element of NAT ; ::_thesis: for p being Prime for f being FinSequence of REAL st p |^ r <= 2 * n & 2 * n < p |^ (r + 1) & len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) holds Sum f <= r let p be Prime; ::_thesis: for f being FinSequence of REAL st p |^ r <= 2 * n & 2 * n < p |^ (r + 1) & len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) holds Sum f <= r let f be FinSequence of REAL ; ::_thesis: ( p |^ r <= 2 * n & 2 * n < p |^ (r + 1) & len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) implies Sum f <= r ) set f0 = (r |-> 1) ^ (((2 * n) -' r) |-> 0); A1: p > 1 by INT_2:def_4; assume A2: p |^ r <= 2 * n ; ::_thesis: ( not 2 * n < p |^ (r + 1) or not len f = 2 * n or ex k being Element of NAT st ( k in dom f & not f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) or Sum f <= r ) A3: 2 * n >= r proof assume 2 * n < r ; ::_thesis: contradiction then p to_power (2 * n) < p to_power r by A1, POWER:39; then p |^ (2 * n) < p to_power r by POWER:41; then p |^ (2 * n) < p |^ r by POWER:41; then p |^ (2 * n) < 2 * n by A2, XXREAL_0:2; hence contradiction by A1, Th3; ::_thesis: verum end; assume A4: 2 * n < p |^ (r + 1) ; ::_thesis: ( not len f = 2 * n or ex k being Element of NAT st ( k in dom f & not f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) or Sum f <= r ) assume A5: len f = 2 * n ; ::_thesis: ( ex k being Element of NAT st ( k in dom f & not f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) or Sum f <= r ) A6: len ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) = (len (r |-> 1)) + (len (((2 * n) -' r) |-> 0)) by FINSEQ_1:22 .= r + (len (((2 * n) -' r) |-> 0)) by CARD_1:def_7 .= r + ((2 * n) -' r) by CARD_1:def_7 .= r + ((2 * n) - r) by A3, XREAL_1:233 .= len f by A5 ; assume A7: for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ; ::_thesis: Sum f <= r A8: for k being Element of NAT st k in dom f holds f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k proof let k be Element of NAT ; ::_thesis: ( k in dom f implies f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k ) assume A9: k in dom f ; ::_thesis: f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k then A10: f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) by A7; k in Seg (2 * n) by A5, A9, FINSEQ_1:def_3; then A11: k in dom ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) by A5, A6, FINSEQ_1:def_3; percases ( k in dom (r |-> 1) or ex n0 being Nat st ( n0 in dom (((2 * n) -' r) |-> 0) & k = (len (r |-> 1)) + n0 ) ) by A11, FINSEQ_1:25; supposeA12: k in dom (r |-> 1) ; ::_thesis: f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k [\(n / (p |^ k))/] <= n / (p |^ k) by INT_1:def_6; then - [\(n / (p |^ k))/] >= - (n / (p |^ k)) by XREAL_1:24; then ( ((2 * n) / (p |^ k)) - 1 < [\((2 * n) / (p |^ k))/] & (- [\(n / (p |^ k))/]) * 2 >= (- (n / (p |^ k))) * 2 ) by INT_1:def_6, XREAL_1:64; then (((2 * n) / (p |^ k)) - 1) + (2 * (- (n / (p |^ k)))) < [\((2 * n) / (p |^ k))/] + (- (2 * [\(n / (p |^ k))/])) by XREAL_1:8; then [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) > ((2 * (n / (p |^ k))) - 1) + (2 * (- (n / (p |^ k)))) by XCMPLX_1:74; then f . k >= (- 1) + 1 by A10, INT_1:7; then A13: f . k is Element of NAT by A10, INT_1:3; (n / (p |^ k)) - 1 < [\(n / (p |^ k))/] by INT_1:def_6; then - [\(n / (p |^ k))/] < - ((n / (p |^ k)) - 1) by XREAL_1:24; then ( [\((2 * n) / (p |^ k))/] <= (2 * n) / (p |^ k) & (- [\(n / (p |^ k))/]) * 2 < (- ((n / (p |^ k)) - 1)) * 2 ) by INT_1:def_6, XREAL_1:68; then ( (2 * n) / (p |^ k) = 2 * (n / (p |^ k)) & (- (2 * [\(n / (p |^ k))/])) + [\((2 * n) / (p |^ k))/] < (2 * ((- (n / (p |^ k))) + 1)) + ((2 * n) / (p |^ k)) ) by XCMPLX_1:74, XREAL_1:8; then A14: f . k < 1 + 1 by A10; A15: k in Seg r by A12, FUNCOP_1:13; ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k = (r |-> 1) . k by A12, FINSEQ_1:def_7 .= 1 by A15, FUNCOP_1:7 ; hence f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k by A13, A14, NAT_1:13; ::_thesis: verum end; supposeA16: ex n0 being Nat st ( n0 in dom (((2 * n) -' r) |-> 0) & k = (len (r |-> 1)) + n0 ) ; ::_thesis: f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k reconsider k1 = k as Element of NAT ; consider n0 being Nat such that A17: n0 in dom (((2 * n) -' r) |-> 0) and A18: k = (len (r |-> 1)) + n0 by A16; n0 in Seg ((2 * n) -' r) by A17, FUNCOP_1:13; then 1 <= n0 by FINSEQ_1:1; then A19: 1 + r <= n0 + r by XREAL_1:6; k = r + n0 by A18, CARD_1:def_7; then ( r + 1 < k or r + 1 = k ) by A19, XXREAL_0:1; then p to_power (r + 1) <= p to_power k by A1, POWER:39; then p |^ (r + 1) <= p to_power k by POWER:41; then p |^ (r + 1) <= p |^ k1 by POWER:41; then 2 * n < p |^ k by A4, XXREAL_0:2; then (2 * n) / (p |^ k) < (p |^ k) / (p |^ k) by XREAL_1:74; then A20: (2 * n) / (p |^ k) < 1 by XCMPLX_1:60; then ((2 * n) / (p |^ k)) / 2 < 1 / 2 by XREAL_1:74; then ((2 * n) / 2) / (p |^ k) < 1 / 2 by XCMPLX_1:48; then n / (p |^ k) < 1 by XXREAL_0:2; then (n / (p |^ k)) - 1 < 1 - 1 by XREAL_1:9; then A21: [\(n / (p |^ k))/] = 0 by INT_1:def_6; ((2 * n) / (p |^ k)) - 1 < 1 - 1 by A20, XREAL_1:9; hence f . k <= ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) . k by A10, A21, INT_1:def_6; ::_thesis: verum end; end; end; Sum ((r |-> 1) ^ (((2 * n) -' r) |-> 0)) = (Sum (r |-> 1)) + (Sum (((2 * n) -' r) |-> 0)) by RVSUM_1:75 .= (r * 1) + (Sum (((2 * n) -' r) |-> 0)) by RVSUM_1:80 .= r + (((2 * n) -' r) * 0) by RVSUM_1:80 .= r ; hence Sum f <= r by A6, A8, INTEGRA5:3; ::_thesis: verum end; Lm9: for n being Element of NAT for p being Prime st n >= 3 holds ( ( p > 2 * n implies p |-count ((2 * n) choose n) = 0 ) & ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) & ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) proof let n be Element of NAT ; ::_thesis: for p being Prime st n >= 3 holds ( ( p > 2 * n implies p |-count ((2 * n) choose n) = 0 ) & ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) & ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) let p be Prime; ::_thesis: ( n >= 3 implies ( ( p > 2 * n implies p |-count ((2 * n) choose n) = 0 ) & ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) & ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) ) assume A1: n >= 3 ; ::_thesis: ( ( p > 2 * n implies p |-count ((2 * n) choose n) = 0 ) & ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) & ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) A2: for n, r being Element of NAT for p being Prime st n >= 2 & p |^ r <= 2 * n & 2 * n < p |^ (r + 1) holds p |-count ((2 * n) choose n) <= r proof let n, r be Element of NAT ; ::_thesis: for p being Prime st n >= 2 & p |^ r <= 2 * n & 2 * n < p |^ (r + 1) holds p |-count ((2 * n) choose n) <= r let p be Prime; ::_thesis: ( n >= 2 & p |^ r <= 2 * n & 2 * n < p |^ (r + 1) implies p |-count ((2 * n) choose n) <= r ) assume that n >= 2 and A3: ( p |^ r <= 2 * n & 2 * n < p |^ (r + 1) ) ; ::_thesis: p |-count ((2 * n) choose n) <= r ex f being FinSequence of REAL st ( len f = 2 * n & ( for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) ) & p |-count ((2 * n) choose n) = Sum f ) by Th49; hence p |-count ((2 * n) choose n) <= r by A3, Lm8; ::_thesis: verum end; thus ( p > 2 * n implies p |-count ((2 * n) choose n) = 0 ) ::_thesis: ( ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) & ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) proof set r = 0 ; assume p > 2 * n ; ::_thesis: p |-count ((2 * n) choose n) = 0 then A4: p |^ (0 + 1) > 2 * n by NEWTON:5; A5: n >= 2 by A1, XXREAL_0:2; then n * 2 >= 2 * 2 by XREAL_1:64; then 2 * n >= 1 by XXREAL_0:2; then p |^ 0 <= 2 * n by NEWTON:4; hence p |-count ((2 * n) choose n) = 0 by A2, A5, A4; ::_thesis: verum end; thus ( n < p & p <= 2 * n implies p |-count ((2 * n) choose n) <= 1 ) ::_thesis: ( ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) & ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) proof set r = 1; assume A6: n < p ; ::_thesis: ( not p <= 2 * n or p |-count ((2 * n) choose n) <= 1 ) then A7: n * 2 < p * 2 by XREAL_1:68; A8: n >= 2 by A1, XXREAL_0:2; then 2 < p by A6, XXREAL_0:2; then 2 * p < p * p by XREAL_1:68; then 2 * n < p * p by A7, XXREAL_0:2; then 2 * n < (p |^ 1) * p by NEWTON:5; then A9: 2 * n < p |^ (1 + 1) by NEWTON:6; assume p <= 2 * n ; ::_thesis: p |-count ((2 * n) choose n) <= 1 then p |^ 1 <= 2 * n by NEWTON:5; hence p |-count ((2 * n) choose n) <= 1 by A2, A8, A9; ::_thesis: verum end; thus ( (2 * n) / 3 < p & p <= n implies p |-count ((2 * n) choose n) = 0 ) ::_thesis: ( ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) & ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) ) proof set q = (2 * n) |-> 0; assume A10: (2 * n) / 3 < p ; ::_thesis: ( not p <= n or p |-count ((2 * n) choose n) = 0 ) consider f being FinSequence of REAL such that A11: len f = 2 * n and A12: for k being Element of NAT st k in dom f holds f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) and A13: p |-count ((2 * n) choose n) = Sum f by Th49; A14: dom f = Seg (2 * n) by A11, FINSEQ_1:def_3; assume A15: p <= n ; ::_thesis: p |-count ((2 * n) choose n) = 0 A16: for k being Element of NAT st k in dom f holds f . k = 0 proof let k be Element of NAT ; ::_thesis: ( k in dom f implies f . k = 0 ) A17: for m being Element of NAT holds (m * p) / p = m proof let m be Element of NAT ; ::_thesis: (m * p) / p = m p / p = 1 by XCMPLX_1:60; then m * (p / p) = m ; hence (m * p) / p = m by XCMPLX_1:74; ::_thesis: verum end; p * 2 <= n * 2 by A15, XREAL_1:64; then (2 * p) / p <= (2 * n) / p by XREAL_1:72; then A18: 2 <= (2 * n) / p by A17; assume A19: k in dom f ; ::_thesis: f . k = 0 then A20: k in Seg (len f) by FINSEQ_1:def_3; then A21: 1 <= k by FINSEQ_1:1; A22: ((2 * n) / 3) * 3 < p * 3 by A10, XREAL_1:68; then (2 * n) / p < (3 * p) / p by XREAL_1:74; then (2 * n) / p < 3 by A17; then A23: ((2 * n) / p) - 1 < 3 - 1 by XREAL_1:9; percases ( k = 1 or ( 1 < k & k <= 2 * n ) ) by A11, A20, A21, FINSEQ_1:1, XXREAL_0:1; supposeA24: k = 1 ; ::_thesis: f . k = 0 3 * p < 4 * p by XREAL_1:68; then 2 * n < 4 * p by A22, XXREAL_0:2; then (n * 2) / 2 < ((2 * p) * 2) / 2 by XREAL_1:74; then n / p < (2 * p) / p by XREAL_1:74; then n / p < 2 by A17; then A25: (n / p) - 1 < 2 - 1 by XREAL_1:9; (1 * p) / p <= n / p by A15, XREAL_1:72; then 1 <= n / p by A17; then A26: [\(n / p)/] = 1 by A25, INT_1:def_6; f . k = [\((2 * n) / (p |^ 1))/] - (2 * [\(n / (p |^ 1))/]) by A12, A19, A24 .= [\((2 * n) / p)/] - (2 * [\(n / (p |^ 1))/]) by NEWTON:5 .= [\((2 * n) / p)/] - (2 * [\(n / p)/]) by NEWTON:5 .= 2 - (2 * 1) by A18, A23, A26, INT_1:def_6 ; hence f . k = 0 ; ::_thesis: verum end; suppose ( 1 < k & k <= 2 * n ) ; ::_thesis: f . k = 0 then 1 + 1 < k + 1 by XREAL_1:6; then 2 <= k by NAT_1:13; then A27: ( k = 2 or 2 < k ) by XXREAL_0:1; 3 * 2 <= n * 2 by A1, XREAL_1:64; then 2 * 3 < 3 * p by A22, XXREAL_0:2; then (2 * 3) / 3 < (p * 3) / 3 by XREAL_1:74; then 2 + 1 < p + 1 by XREAL_1:6; then 3 <= p by NAT_1:13; then 3 * p <= p * p by XREAL_1:64; then 2 * n < p * p by A22, XXREAL_0:2; then 2 * n < (p |^ 1) * p by NEWTON:5; then A28: 2 * n < p |^ (1 + 1) by NEWTON:6; p > 1 by INT_2:def_4; then p to_power 2 <= p to_power k by A27, POWER:39; then p |^ 2 <= p to_power k by POWER:41; then A29: p |^ 2 <= p |^ k by POWER:41; then 2 * n < p |^ k by A28, XXREAL_0:2; then (2 * n) / (p |^ k) < (p |^ k) / (p |^ k) by XREAL_1:74; then (2 * n) / (p |^ k) < 1 by XCMPLX_1:60; then ((2 * n) / (p |^ k)) - 1 < 1 - 1 by XREAL_1:9; then A30: [\((2 * n) / (p |^ k))/] = 0 by INT_1:def_6; 1 * n <= 2 * n by XREAL_1:64; then n < p |^ 2 by A28, XXREAL_0:2; then n < p |^ k by A29, XXREAL_0:2; then n / (p |^ k) < (p |^ k) / (p |^ k) by XREAL_1:74; then n / (p |^ k) < 1 by XCMPLX_1:60; then A31: (n / (p |^ k)) - 1 < 1 - 1 by XREAL_1:9; f . k = [\((2 * n) / (p |^ k))/] - (2 * [\(n / (p |^ k))/]) by A12, A19 .= 0 - (2 * 0) by A31, A30, INT_1:def_6 ; hence f . k = 0 ; ::_thesis: verum end; end; end; A32: for k being Nat st k in dom f holds f . k = ((2 * n) |-> 0) . k by A16; dom ((2 * n) |-> 0) = Seg (2 * n) by FUNCOP_1:13; then (2 * n) |-> 0 = f by A14, A32, FINSEQ_1:13; then Sum f = (2 * n) * 0 by RVSUM_1:80; hence p |-count ((2 * n) choose n) = 0 by A13; ::_thesis: verum end; thus ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies p |-count ((2 * n) choose n) <= 1 ) ::_thesis: ( p <= sqrt (2 * n) implies p |^ (p |-count ((2 * n) choose n)) <= 2 * n ) proof set r = 1; assume A33: sqrt (2 * n) < p ; ::_thesis: ( not p <= (2 * n) / 3 or p |-count ((2 * n) choose n) <= 1 ) then A34: (sqrt (2 * n)) * p < p * p by XREAL_1:68; sqrt (2 * n) > 0 by A1, SQUARE_1:25; then (sqrt (2 * n)) * (sqrt (2 * n)) < p * (sqrt (2 * n)) by A33, XREAL_1:68; then (sqrt (2 * n)) ^2 < p * p by A34, XXREAL_0:2; then 2 * n < p * p by SQUARE_1:def_2; then 2 * n < (p |^ 1) * p by NEWTON:5; then A35: 2 * n < p |^ (1 + 1) by NEWTON:6; assume p <= (2 * n) / 3 ; ::_thesis: p |-count ((2 * n) choose n) <= 1 then ( (1 / 3) * (2 * n) <= 1 * (2 * n) & p |^ 1 <= (2 * n) / 3 ) by NEWTON:5, XREAL_1:64; then A36: p |^ 1 <= 2 * n by XXREAL_0:2; n >= 2 by A1, XXREAL_0:2; hence p |-count ((2 * n) choose n) <= 1 by A2, A36, A35; ::_thesis: verum end; assume p <= sqrt (2 * n) ; ::_thesis: p |^ (p |-count ((2 * n) choose n)) <= 2 * n then ( (sqrt (2 * n)) * p >= p * p & (sqrt (2 * n)) * (sqrt (2 * n)) >= p * (sqrt (2 * n)) ) by XREAL_1:64; then (sqrt (2 * n)) ^2 >= p * p by XXREAL_0:2; then A37: 2 * n >= p * p by SQUARE_1:def_2; set k0 = p |-count ((2 * n) choose n); set r = [\(log (p,(2 * n)))/]; A38: [\(log (p,(2 * n)))/] <= log (p,(2 * n)) by INT_1:def_6; A39: (log (p,(2 * n))) - 1 < [\(log (p,(2 * n)))/] by INT_1:def_6; A40: p > 1 by INT_2:def_4; then p * p > 1 * p by XREAL_1:68; then 2 * n > p by A37, XXREAL_0:2; then log (p,(2 * n)) > log (p,p) by A40, POWER:57; then log (p,(2 * n)) > 1 by A40, POWER:52; then (log (p,(2 * n))) - 1 > 1 - 1 by XREAL_1:9; then reconsider r = [\(log (p,(2 * n)))/] as Element of NAT by A39, INT_1:3; ( r < log (p,(2 * n)) or r = log (p,(2 * n)) ) by A38, XXREAL_0:1; then p to_power r <= p to_power (log (p,(2 * n))) by A40, POWER:39; then p |^ r <= p to_power (log (p,(2 * n))) by POWER:41; then A41: p |^ r <= 2 * n by A40, A37, POWER:def_3; ((log (p,(2 * n))) - 1) + 1 < r + 1 by A39, XREAL_1:6; then p to_power (log (p,(2 * n))) < p to_power (r + 1) by A40, POWER:39; then p to_power (log (p,(2 * n))) < p |^ (r + 1) by POWER:41; then A42: 2 * n < p |^ (r + 1) by A40, POWER:def_3; n >= 2 by A1, XXREAL_0:2; then p |-count ((2 * n) choose n) <= r by A2, A41, A42; then ( p |-count ((2 * n) choose n) = r or p |-count ((2 * n) choose n) < r ) by XXREAL_0:1; then p to_power (p |-count ((2 * n) choose n)) <= p to_power r by A40, POWER:39; then p |^ (p |-count ((2 * n) choose n)) <= p to_power r by POWER:41; then p |^ (p |-count ((2 * n) choose n)) <= p |^ r by POWER:41; hence p |^ (p |-count ((2 * n) choose n)) <= 2 * n by A41, XXREAL_0:2; ::_thesis: verum end; definition let f be FinSequence of NAT ; let p be Prime; funcp |-count f -> FinSequence of NAT means :Def1: :: NAT_4:def 1 ( len it = len f & ( for i being set st i in dom it holds it . i = p |-count (f . i) ) ); existence ex b1 being FinSequence of NAT st ( len b1 = len f & ( for i being set st i in dom b1 holds b1 . i = p |-count (f . i) ) ) proof deffunc H1( Nat) -> Element of NAT = p |-count (f . $1); consider g being FinSequence such that A1: len g = len f and A2: for k being Nat st k in dom g holds g . k = H1(k) from FINSEQ_1:sch_2(); now__::_thesis:_for_y_being_set_st_y_in_rng_g_holds_ y_in_NAT let y be set ; ::_thesis: ( y in rng g implies y in NAT ) assume y in rng g ; ::_thesis: y in NAT then consider x being set such that A3: x in dom g and A4: y = g . x by FUNCT_1:def_3; reconsider x = x as Element of NAT by A3; y = H1(x) by A2, A3, A4; hence y in NAT ; ::_thesis: verum end; then rng g c= NAT by TARSKI:def_3; then reconsider g = g as FinSequence of NAT by FINSEQ_1:def_4; take g ; ::_thesis: ( len g = len f & ( for i being set st i in dom g holds g . i = p |-count (f . i) ) ) thus len g = len f by A1; ::_thesis: for i being set st i in dom g holds g . i = p |-count (f . i) let i be set ; ::_thesis: ( i in dom g implies g . i = p |-count (f . i) ) assume i in dom g ; ::_thesis: g . i = p |-count (f . i) hence g . i = p |-count (f . i) by A2; ::_thesis: verum end; uniqueness for b1, b2 being FinSequence of NAT st len b1 = len f & ( for i being set st i in dom b1 holds b1 . i = p |-count (f . i) ) & len b2 = len f & ( for i being set st i in dom b2 holds b2 . i = p |-count (f . i) ) holds b1 = b2 proof let g, h be FinSequence of NAT ; ::_thesis: ( len g = len f & ( for i being set st i in dom g holds g . i = p |-count (f . i) ) & len h = len f & ( for i being set st i in dom h holds h . i = p |-count (f . i) ) implies g = h ) assume that A5: len g = len f and A6: for i being set st i in dom g holds g . i = p |-count (f . i) and A7: len h = len f and A8: for i being set st i in dom h holds h . i = p |-count (f . i) ; ::_thesis: g = h A9: ( dom g = Seg (len g) & dom h = Seg (len h) ) by FINSEQ_1:def_3; for k being Nat st k in dom g holds g . k = h . k proof let k be Nat; ::_thesis: ( k in dom g implies g . k = h . k ) assume A10: k in dom g ; ::_thesis: g . k = h . k hence g . k = p |-count (f . k) by A6 .= h . k by A5, A7, A8, A9, A10 ; ::_thesis: verum end; hence g = h by A5, A7, A9, FINSEQ_1:13; ::_thesis: verum end; end; :: deftheorem Def1 defines |-count NAT_4:def_1_:_ for f being FinSequence of NAT for p being Prime for b3 being FinSequence of NAT holds ( b3 = p |-count f iff ( len b3 = len f & ( for i being set st i in dom b3 holds b3 . i = p |-count (f . i) ) ) ); theorem Th50: :: NAT_4:50 for p being Prime for f being FinSequence of NAT st f = {} holds p |-count f = {} proof let p be Prime; ::_thesis: for f being FinSequence of NAT st f = {} holds p |-count f = {} let f be FinSequence of NAT ; ::_thesis: ( f = {} implies p |-count f = {} ) assume f = {} ; ::_thesis: p |-count f = {} then len (p |-count f) = len {} by Def1; hence p |-count f = {} ; ::_thesis: verum end; theorem Th51: :: NAT_4:51 for p being Prime for f1, f2 being FinSequence of NAT holds p |-count (f1 ^ f2) = (p |-count f1) ^ (p |-count f2) proof let p be Prime; ::_thesis: for f1, f2 being FinSequence of NAT holds p |-count (f1 ^ f2) = (p |-count f1) ^ (p |-count f2) let f1, f2 be FinSequence of NAT ; ::_thesis: p |-count (f1 ^ f2) = (p |-count f1) ^ (p |-count f2) A1: len (p |-count f2) = len f2 by Def1; A2: dom (p |-count (f1 ^ f2)) = Seg (len (p |-count (f1 ^ f2))) by FINSEQ_1:def_3 .= Seg (len (f1 ^ f2)) by Def1 ; A3: for k being Nat st k in dom (p |-count (f1 ^ f2)) holds (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k proof let k be Nat; ::_thesis: ( k in dom (p |-count (f1 ^ f2)) implies (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k ) assume A4: k in dom (p |-count (f1 ^ f2)) ; ::_thesis: (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k then A5: k in dom (f1 ^ f2) by A2, FINSEQ_1:def_3; percases ( k in dom f1 or ex n being Nat st ( n in dom f2 & k = (len f1) + n ) ) by A5, FINSEQ_1:25; supposeA6: k in dom f1 ; ::_thesis: (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k A7: dom f1 = Seg (len f1) by FINSEQ_1:def_3 .= Seg (len (p |-count f1)) by Def1 .= dom (p |-count f1) by FINSEQ_1:def_3 ; (p |-count (f1 ^ f2)) . k = p |-count ((f1 ^ f2) . k) by A4, Def1 .= p |-count (f1 . k) by A6, FINSEQ_1:def_7 .= (p |-count f1) . k by A6, A7, Def1 ; hence (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k by A6, A7, FINSEQ_1:def_7; ::_thesis: verum end; supposeA8: ex n being Nat st ( n in dom f2 & k = (len f1) + n ) ; ::_thesis: (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k A9: dom f2 = Seg (len f2) by FINSEQ_1:def_3 .= Seg (len (p |-count f2)) by Def1 .= dom (p |-count f2) by FINSEQ_1:def_3 ; consider n being Nat such that A10: n in dom f2 and A11: k = (len f1) + n by A8; A12: ((p |-count f1) ^ (p |-count f2)) . k = ((p |-count f1) ^ (p |-count f2)) . ((len (p |-count f1)) + n) by A11, Def1 .= (p |-count f2) . n by A10, A9, FINSEQ_1:def_7 ; (f1 ^ f2) . k = f2 . n by A10, A11, FINSEQ_1:def_7; then (p |-count (f1 ^ f2)) . k = p |-count (f2 . n) by A4, Def1 .= (p |-count f2) . n by A10, A9, Def1 ; hence (p |-count (f1 ^ f2)) . k = ((p |-count f1) ^ (p |-count f2)) . k by A12; ::_thesis: verum end; end; end; Seg (len (f1 ^ f2)) = Seg ((len f1) + (len f2)) by FINSEQ_1:22 .= Seg ((len (p |-count f1)) + (len (p |-count f2))) by A1, Def1 .= Seg (len ((p |-count f1) ^ (p |-count f2))) by FINSEQ_1:22 .= dom ((p |-count f1) ^ (p |-count f2)) by FINSEQ_1:def_3 ; hence p |-count (f1 ^ f2) = (p |-count f1) ^ (p |-count f2) by A2, A3, FINSEQ_1:13; ::_thesis: verum end; theorem Th52: :: NAT_4:52 for p being Prime for n being non empty Element of NAT holds p |-count <*n*> = <*(p |-count n)*> proof let p be Prime; ::_thesis: for n being non empty Element of NAT holds p |-count <*n*> = <*(p |-count n)*> let n be non empty Element of NAT ; ::_thesis: p |-count <*n*> = <*(p |-count n)*> A1: dom (p |-count <*n*>) = Seg (len (p |-count <*n*>)) by FINSEQ_1:def_3 .= Seg (len <*n*>) by Def1 .= Seg 1 by FINSEQ_1:39 ; A2: for k being Nat st k in dom (p |-count <*n*>) holds (p |-count <*n*>) . k = <*(p |-count n)*> . k proof let k be Nat; ::_thesis: ( k in dom (p |-count <*n*>) implies (p |-count <*n*>) . k = <*(p |-count n)*> . k ) assume A3: k in dom (p |-count <*n*>) ; ::_thesis: (p |-count <*n*>) . k = <*(p |-count n)*> . k then ( 1 <= k & k <= 1 ) by A1, FINSEQ_1:1; then A4: k = 1 by XXREAL_0:1; (p |-count <*n*>) . k = p |-count (<*n*> . k) by A3, Def1; then (p |-count <*n*>) . k = p |-count n by A4, FINSEQ_1:40; hence (p |-count <*n*>) . k = <*(p |-count n)*> . k by A4, FINSEQ_1:40; ::_thesis: verum end; Seg 1 = Seg (len <*(p |-count n)*>) by FINSEQ_1:39; then dom (p |-count <*n*>) = dom <*(p |-count n)*> by A1, FINSEQ_1:def_3; hence p |-count <*n*> = <*(p |-count n)*> by A2, FINSEQ_1:13; ::_thesis: verum end; theorem Th53: :: NAT_4:53 for f being FinSequence of NAT for p being Prime st Product f <> 0 holds p |-count (Product f) = Sum (p |-count f) proof let f be FinSequence of NAT ; ::_thesis: for p being Prime st Product f <> 0 holds p |-count (Product f) = Sum (p |-count f) defpred S1[ Nat] means for f being FinSequence of NAT for p being Prime st $1 = len f & Product f <> 0 holds p |-count (Product f) = Sum (p |-count f); let p be Prime; ::_thesis: ( Product f <> 0 implies p |-count (Product f) = Sum (p |-count f) ) assume A1: Product f <> 0 ; ::_thesis: p |-count (Product f) = Sum (p |-count f) A2: ex n being Element of NAT st n = len f ; A3: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A4: S1[n] ; ::_thesis: S1[n + 1] for f being FinSequence of NAT for p being Prime st n + 1 = len f & Product f <> 0 holds p |-count (Product f) = Sum (p |-count f) proof let f be FinSequence of NAT ; ::_thesis: for p being Prime st n + 1 = len f & Product f <> 0 holds p |-count (Product f) = Sum (p |-count f) let p be Prime; ::_thesis: ( n + 1 = len f & Product f <> 0 implies p |-count (Product f) = Sum (p |-count f) ) assume that A5: n + 1 = len f and A6: Product f <> 0 ; ::_thesis: p |-count (Product f) = Sum (p |-count f) consider g being FinSequence of NAT , d being Element of NAT such that A7: f = g ^ <*d*> by A5, FINSEQ_2:19; len f = (len g) + (len <*d*>) by A7, FINSEQ_1:22; then A8: n + 1 = (len g) + 1 by A5, FINSEQ_1:39; A9: (Product g) * d <> 0 by A6, A7, RVSUM_1:96; then A10: Product g <> 0 ; A11: d <> 0 by A9; p |-count (Product f) = p |-count ((Product g) * d) by A7, RVSUM_1:96 .= (p |-count (Product g)) + (p |-count d) by A10, A11, NAT_3:28 .= (Sum (p |-count g)) + (p |-count d) by A4, A10, A8 .= Sum ((p |-count g) ^ <*(p |-count d)*>) by RVSUM_1:74 .= Sum ((p |-count g) ^ (p |-count <*d*>)) by A11, Th52 .= Sum (p |-count (g ^ <*d*>)) by Th51 ; hence p |-count (Product f) = Sum (p |-count f) by A7; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A12: S1[ 0 ] proof let f be FinSequence of NAT ; ::_thesis: for p being Prime st 0 = len f & Product f <> 0 holds p |-count (Product f) = Sum (p |-count f) let p be Prime; ::_thesis: ( 0 = len f & Product f <> 0 implies p |-count (Product f) = Sum (p |-count f) ) assume that A13: 0 = len f and Product f <> 0 ; ::_thesis: p |-count (Product f) = Sum (p |-count f) A14: p <> 1 by INT_2:def_4; A15: f = {} by A13; then Sum (p |-count f) = 0 by Th50, RVSUM_1:72; hence p |-count (Product f) = Sum (p |-count f) by A15, A14, NAT_3:21, RVSUM_1:94; ::_thesis: verum end; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A12, A3); hence p |-count (Product f) = Sum (p |-count f) by A1, A2; ::_thesis: verum end; theorem Th54: :: NAT_4:54 for f1, f2 being FinSequence of REAL st len f1 = len f2 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) holds Product f1 <= Product f2 proof let f1, f2 be FinSequence of REAL ; ::_thesis: ( len f1 = len f2 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) implies Product f1 <= Product f2 ) defpred S1[ Nat] means for f1, f2 being FinSequence of REAL st len f1 = len f2 & $1 = len f1 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) holds Product f1 <= Product f2; assume A1: len f1 = len f2 ; ::_thesis: ( ex k being Element of NAT st ( k in dom f1 & not ( f1 . k <= f2 . k & f1 . k > 0 ) ) or Product f1 <= Product f2 ) A2: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A3: S1[n] ; ::_thesis: S1[n + 1] for f1, f2 being FinSequence of REAL st len f1 = len f2 & n + 1 = len f1 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) holds Product f1 <= Product f2 proof let f1, f2 be FinSequence of REAL ; ::_thesis: ( len f1 = len f2 & n + 1 = len f1 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) implies Product f1 <= Product f2 ) assume that A4: len f1 = len f2 and A5: n + 1 = len f1 ; ::_thesis: ( ex k being Element of NAT st ( k in dom f1 & not ( f1 . k <= f2 . k & f1 . k > 0 ) ) or Product f1 <= Product f2 ) consider g2 being FinSequence of REAL , r2 being Real such that A6: f2 = g2 ^ <*r2*> by A4, A5, FINSEQ_2:19; len f2 = (len g2) + (len <*r2*>) by A6, FINSEQ_1:22; then A7: n + 1 = (len g2) + 1 by A4, A5, FINSEQ_1:39; A8: Product f2 = (Product g2) * r2 by A6, RVSUM_1:96; consider g1 being FinSequence of REAL , r1 being Real such that A9: f1 = g1 ^ <*r1*> by A5, FINSEQ_2:19; set k1 = (len g1) + 1; A10: Product f1 = (Product g1) * r1 by A9, RVSUM_1:96; len f1 = (len g1) + (len <*r1*>) by A9, FINSEQ_1:22; then A11: n + 1 = (len g1) + 1 by A5, FINSEQ_1:39; assume A12: for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ; ::_thesis: Product f1 <= Product f2 A13: now__::_thesis:_for_k_being_Element_of_NAT_st_k_in_dom_g1_holds_ (_g1_._k_<=_g2_._k_&_g1_._k_>_0_) let k be Element of NAT ; ::_thesis: ( k in dom g1 implies ( g1 . k <= g2 . k & g1 . k > 0 ) ) A14: dom g1 c= dom f1 by A9, FINSEQ_1:26; assume A15: k in dom g1 ; ::_thesis: ( g1 . k <= g2 . k & g1 . k > 0 ) then k in Seg (len g2) by A11, A7, FINSEQ_1:def_3; then k in dom g2 by FINSEQ_1:def_3; then A16: f2 . k = g2 . k by A6, FINSEQ_1:def_7; f1 . k = g1 . k by A9, A15, FINSEQ_1:def_7; hence ( g1 . k <= g2 . k & g1 . k > 0 ) by A12, A15, A16, A14; ::_thesis: verum end; then A17: for k being Element of NAT st k in dom g1 holds g1 . k > 0 ; Product g1 <= Product g2 by A3, A11, A7, A13; then A18: Product g2 > 0 by A17, Th42; n + 1 >= 0 + 1 by XREAL_1:6; then (len g1) + 1 in Seg (n + 1) by A11, FINSEQ_1:1; then A19: (len g1) + 1 in dom f1 by A5, FINSEQ_1:def_3; then f1 . ((len g1) + 1) <= f2 . ((len g1) + 1) by A12; then r1 <= f2 . ((len g1) + 1) by A9, FINSEQ_1:42; then r1 <= r2 by A6, A11, A7, FINSEQ_1:42; then A20: r1 * (Product g2) <= r2 * (Product g2) by A18, XREAL_1:64; f1 . ((len g1) + 1) > 0 by A12, A19; then r1 > 0 by A9, FINSEQ_1:42; then (Product g1) * r1 <= (Product g2) * r1 by A3, A11, A7, A13, XREAL_1:64; hence Product f1 <= Product f2 by A10, A8, A20, XXREAL_0:2; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A21: S1[ 0 ] proof let f1, f2 be FinSequence of REAL ; ::_thesis: ( len f1 = len f2 & 0 = len f1 & ( for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ) implies Product f1 <= Product f2 ) assume ( len f1 = len f2 & 0 = len f1 ) ; ::_thesis: ( ex k being Element of NAT st ( k in dom f1 & not ( f1 . k <= f2 . k & f1 . k > 0 ) ) or Product f1 <= Product f2 ) then ( f1 = {} & f2 = {} ) ; hence ( ex k being Element of NAT st ( k in dom f1 & not ( f1 . k <= f2 . k & f1 . k > 0 ) ) or Product f1 <= Product f2 ) ; ::_thesis: verum end; A22: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A21, A2); assume for k being Element of NAT st k in dom f1 holds ( f1 . k <= f2 . k & f1 . k > 0 ) ; ::_thesis: Product f1 <= Product f2 hence Product f1 <= Product f2 by A22, A1; ::_thesis: verum end; theorem Th55: :: NAT_4:55 for n being Element of NAT for r being Real st r > 0 holds Product (n |-> r) = r to_power n proof defpred S1[ Nat] means for r being Real st r > 0 holds Product ($1 |-> r) = r to_power $1; A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_for_r_being_Real_st_r_>_0_holds_ Product_((n_+_1)_|->_r)_=_r_to_power_(n_+_1) let r be Real; ::_thesis: ( r > 0 implies Product ((n + 1) |-> r) = r to_power (n + 1) ) assume A3: r > 0 ; ::_thesis: Product ((n + 1) |-> r) = r to_power (n + 1) Product ((n + 1) |-> r) = Product ((n |-> r) ^ <*r*>) by FINSEQ_2:60 .= (Product (n |-> r)) * r by RVSUM_1:96 .= (r to_power n) * r by A2, A3 .= (r to_power n) * (r to_power 1) by POWER:25 ; hence Product ((n + 1) |-> r) = r to_power (n + 1) by A3, POWER:27; ::_thesis: verum end; hence S1[n + 1] ; ::_thesis: verum end; A4: S1[ 0 ] by POWER:24, RVSUM_1:94; for n being Element of NAT holds S1[n] from NAT_1:sch_1(A4, A1); hence for n being Element of NAT for r being Real st r > 0 holds Product (n |-> r) = r to_power n ; ::_thesis: verum end; scheme :: NAT_4:sch 1 scheme1{ P1[ set , set , set ] } : for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 proof let p be Prime; ::_thesis: for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 let n be Element of NAT ; ::_thesis: for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 let m be non empty Element of NAT ; ::_thesis: for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 let X be set ; ::_thesis: ( X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } implies Product (Sgm X) > 0 ) set f = Sgm X; assume A1: X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } ; ::_thesis: Product (Sgm X) > 0 A2: for k being Element of NAT st k in dom (Sgm X) holds (Sgm X) . k > 0 proof set XX = Seg m; let k be Element of NAT ; ::_thesis: ( k in dom (Sgm X) implies (Sgm X) . k > 0 ) now__::_thesis:_for_x_being_set_st_x_in_X_holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in X implies x in Seg m ) assume x in X ; ::_thesis: x in Seg m then ex y9 being prime Element of NAT st ( y9 |^ (y9 |-count m) = x & P1[n,m,y9] ) by A1; then ex b being Element of NAT st ( b = x & 1 <= b & b <= m ) by Th16; hence x in Seg m by FINSEQ_1:1; ::_thesis: verum end; then X c= Seg m by TARSKI:def_3; then A3: rng (Sgm X) = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } by A1, FINSEQ_1:def_13; assume k in dom (Sgm X) ; ::_thesis: (Sgm X) . k > 0 then (Sgm X) . k in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } by A3, FUNCT_1:3; then ex y9 being prime Element of NAT st ( y9 |^ (y9 |-count m) = (Sgm X) . k & P1[n,m,y9] ) ; hence (Sgm X) . k > 0 ; ::_thesis: verum end; rng (Sgm X) c= REAL ; then Sgm X is FinSequence of REAL by FINSEQ_1:def_4; hence Product (Sgm X) > 0 by A2, Th42; ::_thesis: verum end; scheme :: NAT_4:sch 2 scheme2{ P1[ set , set , set ] } : for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 proof let p be Prime; ::_thesis: for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 let n be Element of NAT ; ::_thesis: for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 let m be non empty Element of NAT ; ::_thesis: for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 let X be set ; ::_thesis: ( X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & not p |^ (p |-count m) in X implies p |-count (Product (Sgm X)) = 0 ) assume A1: X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } ; ::_thesis: ( p |^ (p |-count m) in X or p |-count (Product (Sgm X)) = 0 ) set f = p |-count (Sgm X); set g = (len (p |-count (Sgm X))) |-> 0; assume A2: not p |^ (p |-count m) in X ; ::_thesis: p |-count (Product (Sgm X)) = 0 A3: for k being Nat st 1 <= k & k <= len (p |-count (Sgm X)) holds (p |-count (Sgm X)) . k = ((len (p |-count (Sgm X))) |-> 0) . k proof set XX = Seg m; let k be Nat; ::_thesis: ( 1 <= k & k <= len (p |-count (Sgm X)) implies (p |-count (Sgm X)) . k = ((len (p |-count (Sgm X))) |-> 0) . k ) assume A4: 1 <= k ; ::_thesis: ( not k <= len (p |-count (Sgm X)) or (p |-count (Sgm X)) . k = ((len (p |-count (Sgm X))) |-> 0) . k ) assume k <= len (p |-count (Sgm X)) ; ::_thesis: (p |-count (Sgm X)) . k = ((len (p |-count (Sgm X))) |-> 0) . k then A5: k in Seg (len (p |-count (Sgm X))) by A4, FINSEQ_1:1; then k in dom (p |-count (Sgm X)) by FINSEQ_1:def_3; then A6: (p |-count (Sgm X)) . k = p |-count ((Sgm X) . k) by Def1; now__::_thesis:_for_x_being_set_st_x_in_X_holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in X implies x in Seg m ) assume x in X ; ::_thesis: x in Seg m then ex y9 being prime Element of NAT st ( y9 |^ (y9 |-count m) = x & P1[n,m,y9] ) by A1; then ex b being Element of NAT st ( b = x & 1 <= b & b <= m ) by Th16; hence x in Seg m by FINSEQ_1:1; ::_thesis: verum end; then X c= Seg m by TARSKI:def_3; then A7: rng (Sgm X) = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } by A1, FINSEQ_1:def_13; len (p |-count (Sgm X)) = len (Sgm X) by Def1; then k in dom (Sgm X) by A5, FINSEQ_1:def_3; then (Sgm X) . k in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } by A7, FUNCT_1:3; then consider p1 being prime Element of NAT such that A8: p1 |^ (p1 |-count m) = (Sgm X) . k and A9: P1[n,m,p1] ; p1 <> p by A1, A2, A9; then ( p <> 1 & not p divides p1 |^ (p1 |-count m) ) by INT_2:def_4, NAT_3:6; then (p |-count (Sgm X)) . k = 0 by A6, A8, NAT_3:27; hence (p |-count (Sgm X)) . k = ((len (p |-count (Sgm X))) |-> 0) . k ; ::_thesis: verum end; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 from NAT_4:sch_1(); then Product (Sgm X) <> 0 by A1; then A10: p |-count (Product (Sgm X)) = Sum (p |-count (Sgm X)) by Th53; ( len (p |-count (Sgm X)) = len ((len (p |-count (Sgm X))) |-> 0) & Sum ((len (p |-count (Sgm X))) |-> 0) = (len (p |-count (Sgm X))) * 0 ) by CARD_1:def_7, RVSUM_1:80; hence p |-count (Product (Sgm X)) = 0 by A10, A3, FINSEQ_1:14; ::_thesis: verum end; scheme :: NAT_4:sch 3 scheme3{ P1[ set , set , set ] } : for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m proof let p be Prime; ::_thesis: for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m let n be Element of NAT ; ::_thesis: for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m let m be non empty Element of NAT ; ::_thesis: for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m let X be set ; ::_thesis: ( X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } & p |^ (p |-count m) in X implies p |-count (Product (Sgm X)) = p |-count m ) set XX = Seg m; defpred S1[ Element of NAT , Element of NAT , Prime] means ( P1[$1,$2,$3] & $3 |^ ($3 |-count $2) <= p |^ (p |-count $2) ); defpred S2[ Element of NAT , Element of NAT , Prime] means ( P1[$1,$2,$3] & $3 |^ ($3 |-count $2) > p |^ (p |-count $2) ); set X1 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ; set X2 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ; A1: now__::_thesis:_for_k1,_k2_being_Element_of_NAT_st_k1_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}__&_k2_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S2[n,m,p9]__}__holds_ k1_<_k2 let k1, k2 be Element of NAT ; ::_thesis: ( k1 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } & k2 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } implies k1 < k2 ) assume ( k1 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } & k2 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ) ; ::_thesis: k1 < k2 then ( ex p1 being prime Element of NAT st ( p1 |^ (p1 |-count m) = k1 & S1[n,m,p1] ) & ex p2 being prime Element of NAT st ( p2 |^ (p2 |-count m) = k2 & S2[n,m,p2] ) ) ; hence k1 < k2 by XXREAL_0:2; ::_thesis: verum end; A2: now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S2[n,m,p9]__}_ assume p |^ (p |-count m) in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; hence contradiction ; ::_thesis: verum end; set m1 = p |^ (p |-count m); defpred S3[ Element of NAT , Element of NAT , Prime] means ( P1[$1,$2,$3] & $3 |^ ($3 |-count $2) = p |^ (p |-count $2) ); defpred S4[ Element of NAT , Element of NAT , Prime] means ( P1[$1,$2,$3] & $3 |^ ($3 |-count $2) < p |^ (p |-count $2) ); set X11 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ; set X12 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ; A3: now__::_thesis:_for_k1,_k2_being_Element_of_NAT_st_k1_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S4[n,m,p9]__}__&_k2_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S3[n,m,p9]__}__holds_ k1_<_k2 let k1, k2 be Element of NAT ; ::_thesis: ( k1 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } & k2 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } implies k1 < k2 ) assume ( k1 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } & k2 in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ) ; ::_thesis: k1 < k2 then ( ex p1 being prime Element of NAT st ( p1 |^ (p1 |-count m) = k1 & S4[n,m,p1] ) & ex p2 being prime Element of NAT st ( p2 |^ (p2 |-count m) = k2 & S3[n,m,p2] ) ) ; hence k1 < k2 ; ::_thesis: verum end; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}__holds_ x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S4[n,m,p9]__}__\/__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S3[n,m,p9]__}_ let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } implies x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ; ::_thesis: x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } then consider p9 being prime Element of NAT such that A4: ( p9 |^ (p9 |-count m) = x & S1[n,m,p9] ) ; ( ( p9 |^ (p9 |-count m) = x & S4[n,m,p9] ) or ( p9 |^ (p9 |-count m) = x & S3[n,m,p9] ) ) by A4, XXREAL_0:1; then ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } or x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ) ; hence x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } by XBOOLE_0:def_3; ::_thesis: verum end; then A5: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } by TARSKI:def_3; assume A6: X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } ; ::_thesis: ( not p |^ (p |-count m) in X or p |-count (Product (Sgm X)) = p |-count m ) now__::_thesis:_for_x_being_set_st_x_in_X_holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in X implies x in Seg m ) assume x in X ; ::_thesis: x in Seg m then ex y9 being prime Element of NAT st ( y9 |^ (y9 |-count m) = x & P1[n,m,y9] ) by A6; then ex b being Element of NAT st ( b = x & 1 <= b & b <= m ) by Th16; hence x in Seg m by FINSEQ_1:1; ::_thesis: verum end; then A7: X c= Seg m by TARSKI:def_3; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S3[n,m,p9]__}__holds_ x_in_{(p_|^_(p_|-count_m))} let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } implies x in {(p |^ (p |-count m))} ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ; ::_thesis: x in {(p |^ (p |-count m))} then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = x & S3[n,m,p9] ) ; hence x in {(p |^ (p |-count m))} by TARSKI:def_1; ::_thesis: verum end; then A8: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } c= {(p |^ (p |-count m))} by TARSKI:def_3; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : P1[n,m,p9] } holds Product (Sgm X) > 0 from NAT_4:sch_1(); then A9: Product (Sgm X) <> 0 by A6; A10: 1 < p by INT_2:def_4; A11: p |-count (p |^ (p |-count m)) = (p |-count m) * (p |-count p) by NAT_3:32 .= (p |-count m) * 1 by A10, NAT_3:22 ; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}__holds_ x_in_X let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } implies x in X ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ; ::_thesis: x in X then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = x & S1[n,m,p9] ) ; hence x in X by A6; ::_thesis: verum end; then A12: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } c= X by TARSKI:def_3; then A13: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } c= Seg m by A7, XBOOLE_1:1; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S3[n,m,p9]__}__holds_ x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}_ let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } implies x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ; ::_thesis: x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = x & S3[n,m,p9] ) ; hence x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ; ::_thesis: verum end; then A14: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } by TARSKI:def_3; then A15: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } c= Seg m by A13, XBOOLE_1:1; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S4[n,m,p9]__}__holds_ x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}_ let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } implies x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ; ::_thesis: x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = x & S4[n,m,p9] ) ; hence x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ; ::_thesis: verum end; then A16: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } by TARSKI:def_3; then A17: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } c= Seg m by A13, XBOOLE_1:1; { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } by A16, A14, XBOOLE_1:13; then A18: Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } )) = Sum (p |-count (Sgm ( { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ))) by A5, XBOOLE_0:def_10 .= Sum (p |-count ((Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ) ^ (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ))) by A17, A15, A3, FINSEQ_3:42 .= Sum ((p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } )) ^ (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ))) by Th51 .= (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ))) + (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ))) by RVSUM_1:75 ; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X2 being set st X2 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } & not p |^ (p |-count m) in X2 holds p |-count (Product (Sgm X2)) = 0 from NAT_4:sch_2(); then A19: p |-count (Product (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } )) = 0 by A2; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X2 being set st X2 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } holds Product (Sgm X2) > 0 from NAT_4:sch_1(); then A20: Product (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ) <> 0 ; now__::_thesis:_for_x_being_set_st_x_in_X_holds_ x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S1[n,m,p9]__}__\/__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S2[n,m,p9]__}_ let x be set ; ::_thesis: ( x in X implies x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ) assume x in X ; ::_thesis: x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } then consider p9 being prime Element of NAT such that A21: ( p9 |^ (p9 |-count m) = x & P1[n,m,p9] ) by A6; ( ( p9 |^ (p9 |-count m) = x & S1[n,m,p9] ) or ( p9 |^ (p9 |-count m) = x & S2[n,m,p9] ) ) by A21; then ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } or x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ) ; hence x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } by XBOOLE_0:def_3; ::_thesis: verum end; then A22: X c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } by TARSKI:def_3; now__::_thesis:_for_x_being_set_st_x_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S2[n,m,p9]__}__holds_ x_in_X let x be set ; ::_thesis: ( x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } implies x in X ) assume x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ; ::_thesis: x in X then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = x & S2[n,m,p9] ) ; hence x in X by A6; ::_thesis: verum end; then A23: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } c= X by TARSKI:def_3; then A24: { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } c= Seg m by A7, XBOOLE_1:1; reconsider m1 = p |^ (p |-count m) as non empty Element of NAT by ORDINAL1:def_12; A25: now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p9_|^_(p9_|-count_m))_where_p9_is_prime_Element_of_NAT_:_S4[n,m,p9]__}_ assume p |^ (p |-count m) in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S4[n,m,p9] ) ; hence contradiction ; ::_thesis: verum end; assume p |^ (p |-count m) in X ; ::_thesis: p |-count (Product (Sgm X)) = p |-count m then p |^ (p |-count m) in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } by A22, A2, XBOOLE_0:def_3; then p |^ (p |-count m) in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } by A5, A25, XBOOLE_0:def_3; then for x being set st x in {(p |^ (p |-count m))} holds x in { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } by TARSKI:def_1; then A26: {(p |^ (p |-count m))} c= { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } by TARSKI:def_3; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X11 being set st X11 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } & not p |^ (p |-count m) in X11 holds p |-count (Product (Sgm X11)) = 0 from NAT_4:sch_2(); then A27: p |-count (Product (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } )) = 0 by A25; for p being Prime for n being Element of NAT for m being non empty Element of NAT for X11 being set st X11 = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } holds Product (Sgm X11) > 0 from NAT_4:sch_1(); then A28: Product (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S4[n,m,p9] } ) <> 0 ; { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } c= X \/ X by A12, A23, XBOOLE_1:13; then Sum (p |-count (Sgm X)) = Sum (p |-count (Sgm ( { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } \/ { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ))) by A22, XBOOLE_0:def_10 .= Sum (p |-count ((Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ) ^ (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ))) by A13, A24, A1, FINSEQ_3:42 .= Sum ((p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } )) ^ (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ))) by Th51 .= (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ))) + (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ))) by RVSUM_1:75 ; then p |-count (Product (Sgm X)) = (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ))) + (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } ))) by A9, Th53 .= (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } ))) + 0 by A20, A19, Th53 .= 0 + (Sum (p |-count (Sgm { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } ))) by A18, A28, A27, Th53 .= Sum (p |-count (Sgm {(p |^ (p |-count m))})) by A26, A8, XBOOLE_0:def_10 .= Sum (p |-count <*m1*>) by FINSEQ_3:44 .= Sum <*(p |-count m1)*> by Th52 .= p |-count m1 by RVSUM_1:73 ; hence p |-count (Product (Sgm X)) = p |-count m by A11; ::_thesis: verum end; Lm10: for n, m being Element of NAT st m = (2 * n) choose n & n >= 3 holds m = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count m > 0 ) } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count m > 0 ) } )) proof defpred S1[ Element of NAT , Element of NAT , Prime] means ( $1 < $3 & $3 <= 2 * $1 & $3 |-count $2 > 0 ); defpred S2[ Element of NAT , Element of NAT , Prime] means ( sqrt (2 * $1) < $3 & $3 <= (2 * $1) / 3 & $3 |-count $2 > 0 ); defpred S3[ Element of NAT , Element of NAT , Prime] means ( $3 <= sqrt (2 * $1) & $3 |-count $2 > 0 ); let n, m be Element of NAT ; ::_thesis: ( m = (2 * n) choose n & n >= 3 implies m = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count m > 0 ) } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count m > 0 ) } )) ) assume A1: m = (2 * n) choose n ; ::_thesis: ( not n >= 3 or m = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count m > 0 ) } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count m > 0 ) } )) ) set X3 = { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; set X2 = { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; set X1 = { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; set f1 = Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; set f2 = Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; set f3 = Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; set n1 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ); set n2 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ); set n3 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ); A2: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 from NAT_4:sch_2(); set k = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )); A3: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } holds Product (Sgm X) > 0 from NAT_4:sch_1(); assume A4: n >= 3 ; ::_thesis: m = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count m > 0 ) } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count m > 0 ) } )) A5: now__::_thesis:_not_n_<_(2_*_n)_/_3 2 * n < 3 * n by A4, XREAL_1:68; then A6: (2 * n) / 3 < (3 * n) / 3 by XREAL_1:74; assume n < (2 * n) / 3 ; ::_thesis: contradiction hence contradiction by A6; ::_thesis: verum end; A7: now__::_thesis:_not_n_<_sqrt_(2_*_n) ( sqrt 2 < sqrt 3 & sqrt 3 <= sqrt n ) by A4, SQUARE_1:26, SQUARE_1:27; then A8: sqrt 2 < sqrt n by XXREAL_0:2; sqrt n > 0 by A4, SQUARE_1:25; then (sqrt 2) * (sqrt n) < (sqrt n) * (sqrt n) by A8, XREAL_1:68; then sqrt (2 * n) < (sqrt n) * (sqrt n) by SQUARE_1:29; then A9: sqrt (2 * n) < sqrt (n ^2) by SQUARE_1:29; assume n < sqrt (2 * n) ; ::_thesis: contradiction hence contradiction by A9, SQUARE_1:def_2; ::_thesis: verum end; m * (2 * n) >= ((4 |^ n) / (2 * n)) * (2 * n) by A1, Th6, XREAL_1:64; then A10: m <> 0 by A4; A11: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } holds Product (Sgm X) > 0 from NAT_4:sch_1(); then A12: Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ) > 0 by A10; A13: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } holds Product (Sgm X) > 0 from NAT_4:sch_1(); then A14: Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ) > 0 by A10; A15: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 from NAT_4:sch_2(); A16: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } & not p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = 0 from NAT_4:sch_2(); A17: for p being Prime st p > 2 * n holds ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) proof let p be Prime; ::_thesis: ( p > 2 * n implies ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) ) assume A18: p > 2 * n ; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) then A19: p |-count m = 0 by A1, A4, Lm9; now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S3[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S3[n,m,p9] ) ; hence contradiction by A10, A19, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 by A10, A16; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S2[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; hence contradiction by A10, A19, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 by A10, A2; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S1[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S1[n,m,p9] ) ; hence contradiction by A10, A18, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 by A10, A15; ::_thesis: verum end; A20: for p being Prime st (2 * n) / 3 < p & p <= n holds ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) proof let p be Prime; ::_thesis: ( (2 * n) / 3 < p & p <= n implies ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) ) assume that A21: (2 * n) / 3 < p and A22: p <= n ; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) A23: p |-count m = 0 by A1, A4, A21, A22, Lm9; now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S3[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S3[n,m,p9] ) ; hence contradiction by A10, A23, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 by A10, A16; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S2[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; hence contradiction by A10, A21, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 by A10, A2; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S1[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S1[n,m,p9] ) ; hence contradiction by A10, A22, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 by A10, A15; ::_thesis: verum end; A24: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S2[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m from NAT_4:sch_3(); A25: for p being Prime st sqrt (2 * n) < p & p <= (2 * n) / 3 holds ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m ) proof let p be Prime; ::_thesis: ( sqrt (2 * n) < p & p <= (2 * n) / 3 implies ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m ) ) assume that A26: sqrt (2 * n) < p and A27: p <= (2 * n) / 3 ; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S3[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S3[n,m,p9] ) ; hence contradiction by A10, A26, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 by A10, A16; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S1[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S1[n,m,p9] ) ; then n < p by A10, Th22; hence contradiction by A5, A27, XXREAL_0:2; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 by A10, A15; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m A28: p in NAT by ORDINAL1:def_12; percases ( p |-count m > 0 or p |-count m = 0 ) ; suppose p |-count m > 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m then p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } by A26, A27, A28; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m by A10, A24; ::_thesis: verum end; supposeA29: p |-count m = 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S2[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; hence contradiction by A10, A29, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = p |-count m by A10, A2, A29; ::_thesis: verum end; end; end; A30: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S1[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m from NAT_4:sch_3(); A31: for p being Prime st n < p & p <= 2 * n holds ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m ) proof let p be Prime; ::_thesis: ( n < p & p <= 2 * n implies ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m ) ) assume that A32: n < p and A33: p <= 2 * n ; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S3[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S3[n,m,p9] ) ; then p <= sqrt (2 * n) by A10, Th22; hence contradiction by A7, A32, XXREAL_0:2; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = 0 by A10, A16; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S2[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; then p <= (2 * n) / 3 by A10, Th22; hence contradiction by A5, A32, XXREAL_0:2; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 by A10, A2; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m A34: p in NAT by ORDINAL1:def_12; percases ( p |-count m > 0 or p |-count m = 0 ) ; suppose p |-count m > 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m then p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } by A32, A33, A34; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m by A10, A30; ::_thesis: verum end; supposeA35: p |-count m = 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S1[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S1[n,m,p9] ) ; hence contradiction by A10, A35, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = p |-count m by A10, A15, A35; ::_thesis: verum end; end; end; A36: for p being Prime for n being Element of NAT for m being non empty Element of NAT for X being set st X = { (p9 |^ (p9 |-count m)) where p9 is prime Element of NAT : S3[n,m,p9] } & p |^ (p |-count m) in X holds p |-count (Product (Sgm X)) = p |-count m from NAT_4:sch_3(); A37: for p being Prime st p <= sqrt (2 * n) holds ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m ) proof let p be Prime; ::_thesis: ( p <= sqrt (2 * n) implies ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m ) ) A38: p in NAT by ORDINAL1:def_12; assume A39: p <= sqrt (2 * n) ; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S2[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S2[n,m,p9] ) ; hence contradiction by A10, A39, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } )) = 0 by A10, A2; ::_thesis: ( p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 & p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m ) now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S1[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S1[n,m,p9] ) ; then n < p by A10, Th22; hence contradiction by A7, A39, XXREAL_0:2; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } )) = 0 by A10, A15; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m percases ( p |-count m > 0 or p |-count m = 0 ) ; suppose p |-count m > 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m then p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } by A39, A38; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m by A10, A36; ::_thesis: verum end; supposeA40: p |-count m = 0 ; ::_thesis: p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m now__::_thesis:_not_p_|^_(p_|-count_m)_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_S3[n,m,p]__}_ assume p |^ (p |-count m) in { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ; ::_thesis: contradiction then ex p9 being prime Element of NAT st ( p9 |^ (p9 |-count m) = p |^ (p |-count m) & S3[n,m,p9] ) ; hence contradiction by A10, A40, Th22; ::_thesis: verum end; hence p |-count (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) = p |-count m by A10, A16, A40; ::_thesis: verum end; end; end; A41: for p being Element of NAT st p is prime holds p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) proof reconsider n3 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ) as non empty Element of NAT by A10, A11; reconsider n2 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ) as non empty Element of NAT by A10, A13; reconsider n1 = Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ) as non empty Element of NAT by A10, A3; let p be Element of NAT ; ::_thesis: ( p is prime implies p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) ) assume A42: p is prime ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then A43: p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) = (p |-count (n1 * n2)) + (p |-count n3) by NAT_3:28 .= ((p |-count n1) + (p |-count n2)) + (p |-count n3) by A42, NAT_3:28 ; percases ( p > 2 * n or ( n < p & p <= 2 * n ) or ( (2 * n) / 3 < p & p <= n ) or ( sqrt (2 * n) < p & p <= (2 * n) / 3 ) or p <= sqrt (2 * n) ) ; supposeA44: p > 2 * n ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then A45: p |-count n2 = 0 by A17, A42; ( p |-count m = 0 & p |-count n1 = 0 ) by A1, A4, A17, A42, A44, Lm9; hence p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) by A17, A42, A43, A44, A45; ::_thesis: verum end; supposeA46: ( n < p & p <= 2 * n ) ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then ( p |-count n1 = 0 & p |-count n2 = 0 ) by A31, A42; hence p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) by A31, A42, A43, A46; ::_thesis: verum end; supposeA47: ( (2 * n) / 3 < p & p <= n ) ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then A48: p |-count n2 = 0 by A20, A42; ( p |-count m = 0 & p |-count n1 = 0 ) by A1, A4, A20, A42, A47, Lm9; hence p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) by A20, A42, A43, A47, A48; ::_thesis: verum end; supposeA49: ( sqrt (2 * n) < p & p <= (2 * n) / 3 ) ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then ( p |-count n1 = 0 & p |-count n2 = p |-count m ) by A25, A42; hence p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) by A25, A42, A43, A49; ::_thesis: verum end; supposeA50: p <= sqrt (2 * n) ; ::_thesis: p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) then ( p |-count n1 = p |-count m & p |-count n2 = 0 ) by A37, A42; hence p |-count m = p |-count (((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S2[n,m,p] } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S1[n,m,p] } ))) by A37, A42, A43, A50; ::_thesis: verum end; end; end; Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : S3[n,m,p] } ) > 0 by A10, A3; hence m = ((Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count m > 0 ) } ))) * (Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count m > 0 ) } )) by A10, A14, A12, A41, Th21; ::_thesis: verum end; scheme :: NAT_4:sch 4 scheme4{ F1( set , set ) -> set , P1[ set , set ] } : for n, m being Element of NAT for r being Real for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 holds card X <= [\r/] proof let n, m be Element of NAT ; ::_thesis: for r being Real for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 holds card X <= [\r/] defpred S1[ Nat] means for n, m being Element of NAT for r being Real for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & $1 = [\r/] holds card X <= [\r/]; A1: for n being Element of NAT st S1[n] holds S1[n + 1] proof let n be Element of NAT ; ::_thesis: ( S1[n] implies S1[n + 1] ) assume A2: S1[n] ; ::_thesis: S1[n + 1] now__::_thesis:_for_m_being_Element_of_NAT_ for_r_being_Real for_X_being_finite_set_st_X_=__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_p_<=_r_&_P1[p,m]_)__}__&_r_>=_0_&_n_+_1_=_[\r/]_holds_ card_X_<=_[\r/] let m be Element of NAT ; ::_thesis: for r being Real for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & n + 1 = [\r/] holds card b5 <= [\b4/] let r be Real; ::_thesis: for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & n + 1 = [\r/] holds card b4 <= [\b3/] let X be finite set ; ::_thesis: ( X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & n + 1 = [\r/] implies card b3 <= [\b2/] ) set r1 = r - 1; set X1 = { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } ; set X2 = { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; A3: 0 + n <= 1 + n by XREAL_1:6; assume A4: X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } ; ::_thesis: ( r >= 0 & n + 1 = [\r/] implies card b3 <= [\b2/] ) now__::_thesis:_for_x_being_set_st_x_in__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_p_<=_r_-_1_&_P1[p,m]_)__}__\/__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_r_-_1_<_p_&_p_<=_r_&_P1[p,m]_)__}__holds_ x_in_X let x be set ; ::_thesis: ( x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } implies b1 in X ) assume A5: x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; ::_thesis: b1 in X percases ( x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } or x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ) by A5, XBOOLE_0:def_3; suppose x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } ; ::_thesis: b1 in X then consider p being prime Element of NAT such that A6: F1(p,m) = x and A7: p <= r - 1 and A8: P1[p,m] ; (- 1) + r <= 0 + r by XREAL_1:6; then p <= r by A7, XXREAL_0:2; hence x in X by A4, A6, A8; ::_thesis: verum end; suppose x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; ::_thesis: b1 in X then ex p being prime Element of NAT st ( F1(p,m) = x & r - 1 < p & p <= r & P1[p,m] ) ; hence x in X by A4; ::_thesis: verum end; end; end; then A9: { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } c= X by TARSKI:def_3; assume r >= 0 ; ::_thesis: ( n + 1 = [\r/] implies card b3 <= [\b2/] ) now__::_thesis:_for_x_being_set_st_x_in_X_holds_ x_in__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_p_<=_r_-_1_&_P1[p,m]_)__}__\/__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_r_-_1_<_p_&_p_<=_r_&_P1[p,m]_)__}_ let x be set ; ::_thesis: ( x in X implies x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ) assume x in X ; ::_thesis: x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } then consider p being prime Element of NAT such that A10: ( F1(p,m) = x & p <= r & P1[p,m] ) by A4; ( ( F1(p,m) = x & p <= r - 1 & P1[p,m] ) or ( F1(p,m) = x & r - 1 < p & p <= r & P1[p,m] ) ) by A10; then ( x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } or x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ) ; hence x in { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } by XBOOLE_0:def_3; ::_thesis: verum end; then X c= { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } by TARSKI:def_3; then A11: X = { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } \/ { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } by A9, XBOOLE_0:def_10; then reconsider X1 = { F1(p,m) where p is prime Element of NAT : ( p <= r - 1 & P1[p,m] ) } as finite set by FINSET_1:1, XBOOLE_1:7; assume A12: n + 1 = [\r/] ; ::_thesis: card b3 <= [\b2/] then A13: n = [\r/] + (- 1) .= [\(r + (- 1))/] by INT_1:28 .= [\(r - 1)/] ; then A14: r - 1 >= 0 by INT_1:def_6; then A15: card X1 <= [\(r - 1)/] by A2, A13; percases ( for x being set holds not x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } or ex x being set st x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ) ; suppose for x being set holds not x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; ::_thesis: card b3 <= [\b2/] then { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } = {} by XBOOLE_0:def_1; hence card X <= [\r/] by A12, A13, A11, A15, A3, XXREAL_0:2; ::_thesis: verum end; supposeA16: ex x being set st x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; ::_thesis: card b3 <= [\b2/] then consider x being set such that A17: x in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } ; A18: now__::_thesis:_not__{__F1(p,m)_where_p_is_prime_Element_of_NAT_:_(_r_-_1_<_p_&_p_<=_r_&_P1[p,m]_)__}__<>_{x} assume { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } <> {x} ; ::_thesis: contradiction then consider y being set such that A19: y in { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } and A20: y <> x by A16, ZFMISC_1:35; consider p1 being prime Element of NAT such that A21: F1(p1,m) = x and A22: ( r - 1 < p1 & p1 <= r ) and P1[p1,m] by A17; A23: p1 = [\r/] by A22, INT_1:def_6; ex p2 being prime Element of NAT st ( F1(p2,m) = y & r - 1 < p2 & p2 <= r & P1[p2,m] ) by A19; hence contradiction by A20, A21, A23, INT_1:def_6; ::_thesis: verum end; percases ( not x in X1 or x in X1 ) ; suppose not x in X1 ; ::_thesis: card b3 <= [\b2/] then card X = (card X1) + 1 by A11, A18, CARD_2:41; hence card X <= [\r/] by A12, A13, A15, XREAL_1:6; ::_thesis: verum end; suppose x in X1 ; ::_thesis: card b3 <= [\b2/] then { F1(p,m) where p is prime Element of NAT : ( r - 1 < p & p <= r & P1[p,m] ) } c= X1 by A18, ZFMISC_1:31; then card X <= n by A2, A13, A14, A11, XBOOLE_1:12; hence card X <= [\r/] by A12, A3, XXREAL_0:2; ::_thesis: verum end; end; end; end; end; hence S1[n + 1] ; ::_thesis: verum end; A24: S1[ 0 ] proof let n, m be Element of NAT ; ::_thesis: for r being Real for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & 0 = [\r/] holds card X <= [\r/] let r be Real; ::_thesis: for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & 0 = [\r/] holds card X <= [\r/] let X be finite set ; ::_thesis: ( X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 & 0 = [\r/] implies card X <= [\r/] ) assume A25: X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } ; ::_thesis: ( not r >= 0 or not 0 = [\r/] or card X <= [\r/] ) assume r >= 0 ; ::_thesis: ( not 0 = [\r/] or card X <= [\r/] ) assume A26: 0 = [\r/] ; ::_thesis: card X <= [\r/] then r - 1 < 0 by INT_1:def_6; then A27: (r - 1) + 1 < 0 + 1 by XREAL_1:6; now__::_thesis:_for_x_being_set_holds_not_x_in_X let x be set ; ::_thesis: not x in X assume x in X ; ::_thesis: contradiction then consider p being prime Element of NAT such that F1(p,m) = x and A28: p <= r and P1[p,m] by A25; p < 1 by A27, A28, XXREAL_0:2; hence contradiction by INT_2:def_4; ::_thesis: verum end; hence card X <= [\r/] by A26, CARD_1:27, XBOOLE_0:def_1; ::_thesis: verum end; A29: for n being Element of NAT holds S1[n] from NAT_1:sch_1(A24, A1); let r be Real; ::_thesis: for X being finite set st X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 holds card X <= [\r/] let X be finite set ; ::_thesis: ( X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } & r >= 0 implies card X <= [\r/] ) assume that A30: X = { F1(p,m) where p is prime Element of NAT : ( p <= r & P1[p,m] ) } and A31: r >= 0 ; ::_thesis: card X <= [\r/] [\r/] is Element of NAT by A31, INT_1:53; hence card X <= [\r/] by A29, A30, A31; ::_thesis: verum end; Lm11: for n, m being Element of NAT st m = (2 * n) choose n & n >= 3 holds Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) proof deffunc H1( Element of NAT , Element of NAT ) -> Element of NAT = $1 |^ ($1 |-count $2); defpred S1[ Element of NAT , Element of NAT ] means $1 |-count $2 > 0 ; let n, m be Element of NAT ; ::_thesis: ( m = (2 * n) choose n & n >= 3 implies Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) ) assume A1: m = (2 * n) choose n ; ::_thesis: ( not n >= 3 or Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) ) set r = sqrt (2 * n); A2: sqrt (2 * n) >= 0 by SQUARE_1:def_2; A3: for n, m being Element of NAT for r being Real for X being finite set st X = { H1(k,m) where k is prime Element of NAT : ( k <= r & S1[k,m] ) } & r >= 0 holds card X <= [\r/] from NAT_4:sch_4(); set XX = Seg m; set X = { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ; assume A4: n >= 3 ; ::_thesis: Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) set f1 = Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ; set f2 = (len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n); m * (2 * n) >= ((4 |^ n) / (2 * n)) * (2 * n) by A1, Th6, XREAL_1:64; then A5: m <> 0 by A4; now__::_thesis:_for_x_being_set_st_x_in__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_(_p_<=_sqrt_(2_*_n)_&_p_|-count_m_>_0_)__}__holds_ x_in_Seg_m let x be set ; ::_thesis: ( x in { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } implies x in Seg m ) assume x in { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ; ::_thesis: x in Seg m then ex p being prime Element of NAT st ( p |^ (p |-count m) = x & p <= sqrt (2 * n) & p |-count m > 0 ) ; then ex b being Element of NAT st ( b = x & 1 <= b & b <= m ) by A5, Th16; hence x in Seg m by FINSEQ_1:1; ::_thesis: verum end; then A6: { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } c= Seg m by TARSKI:def_3; A7: now__::_thesis:_for_k_being_Element_of_NAT_st_k_in_dom_(Sgm__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_(_p_<=_sqrt_(2_*_n)_&_p_|-count_m_>_0_)__}__)_holds_ (_(Sgm__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_(_p_<=_sqrt_(2_*_n)_&_p_|-count_m_>_0_)__}__)_._k_<=_((len_(Sgm__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_(_p_<=_sqrt_(2_*_n)_&_p_|-count_m_>_0_)__}__))_|->_(2_*_n))_._k_&_(Sgm__{__(p_|^_(p_|-count_m))_where_p_is_prime_Element_of_NAT_:_(_p_<=_sqrt_(2_*_n)_&_p_|-count_m_>_0_)__}__)_._k_>_0_) let k be Element of NAT ; ::_thesis: ( k in dom (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) implies ( (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k <= ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) . k & (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k > 0 ) ) assume A8: k in dom (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) ; ::_thesis: ( (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k <= ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) . k & (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k > 0 ) rng (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) = { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } by A6, FINSEQ_1:def_13; then (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k in { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } by A8, FUNCT_1:3; then A9: ex p being prime Element of NAT st ( p |^ (p |-count m) = (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k & p <= sqrt (2 * n) & p |-count m > 0 ) ; k in Seg (len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) by A8, FINSEQ_1:def_3; then ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) . k = 2 * n by FUNCOP_1:7; hence ( (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k <= ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) . k & (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) . k > 0 ) by A1, A4, A9, Lm9; ::_thesis: verum end; reconsider X = { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } as finite set by A6; A10: len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) = len ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) by CARD_1:def_7; rng (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) c= REAL ; then reconsider f1 = Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } as FinSequence of REAL by FINSEQ_1:def_4; A11: rng ((len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n)) c= REAL ; len f1 = card X by A6, FINSEQ_3:39; then ( [\(sqrt (2 * n))/] <= sqrt (2 * n) & len f1 <= [\(sqrt (2 * n))/] ) by A2, A3, INT_1:def_6; then len f1 <= sqrt (2 * n) by XXREAL_0:2; then A12: ( len f1 < sqrt (2 * n) or len f1 = sqrt (2 * n) ) by XXREAL_0:1; reconsider f2 = (len (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } )) |-> (2 * n) as FinSequence of REAL by A11, FINSEQ_1:def_4; Product f1 <= Product f2 by A10, A7, Th54; then A13: Product f1 <= (2 * n) to_power (len f1) by A4, Th55; n * 2 >= 3 * 2 by A4, XREAL_1:64; then 2 * n > 1 by XXREAL_0:2; then (2 * n) to_power (len f1) <= (2 * n) to_power (sqrt (2 * n)) by A12, POWER:39; hence Product (Sgm { (p |^ (p |-count m)) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count m > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) by A13, XXREAL_0:2; ::_thesis: verum end; begin theorem :: NAT_4:56 for n being Element of NAT st n >= 1 holds ex p being Prime st ( n < p & p <= 2 * n ) proof let n be Element of NAT ; ::_thesis: ( n >= 1 implies ex p being Prime st ( n < p & p <= 2 * n ) ) assume A1: n >= 1 ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) percases ( n < 4000 or n >= 4000 ) ; suppose n < 4000 ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) then n < 4001 by XXREAL_0:2; hence ex p being Prime st ( n < p & p <= 2 * n ) by A1, Lm7; ::_thesis: verum end; supposeA2: n >= 4000 ; ::_thesis: ex p being Prime st ( n < p & p <= 2 * n ) set m = (2 * n) choose n; set X1 = { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count ((2 * n) choose n) > 0 ) } ; set X2 = { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } ; set X3 = { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count ((2 * n) choose n) > 0 ) } ; assume A3: for p being Prime holds ( not n < p or not p <= 2 * n ) ; ::_thesis: contradiction now__::_thesis:_not__{__(p_|^_(p_|-count_((2_*_n)_choose_n)))_where_p_is_prime_Element_of_NAT_:_(_n_<_p_&_p_<=_2_*_n_&_p_|-count_((2_*_n)_choose_n)_>_0_)__}__<>_{} assume { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count ((2 * n) choose n) > 0 ) } <> {} ; ::_thesis: contradiction then consider x being set such that A4: x in { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( n < p & p <= 2 * n & p |-count ((2 * n) choose n) > 0 ) } by XBOOLE_0:def_1; ex p being prime Element of NAT st ( p |^ (p |-count ((2 * n) choose n)) = x & n < p & p <= 2 * n & p |-count ((2 * n) choose n) > 0 ) by A4; hence contradiction by A3; ::_thesis: verum end; then A5: (2 * n) choose n = ((Product (Sgm { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count ((2 * n) choose n) > 0 ) } )) * (Product (Sgm { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } ))) * 1 by A2, Lm10, FINSEQ_3:43, RVSUM_1:94, XXREAL_0:2; A6: (4 |^ n) / (2 * n) <= (2 * n) choose n by Th6; set X = { p where p is prime Element of NAT : p <= (2 * n) / 3 } ; A7: n >= 3 by A2, XXREAL_0:2; then n / 3 >= 3 / 3 by XREAL_1:72; then (n / 3) * 2 >= 1 * 2 by XREAL_1:64; then A8: Product (Sgm { p where p is prime Element of NAT : p <= (2 * n) / 3 } ) <= 4 to_power (((2 * n) / 3) - 1) by Th46; set mm = [/((2 * n) / 3)\]; reconsider mm = [/((2 * n) / 3)\] as Element of NAT by INT_1:53; set XX = Seg mm; A9: now__::_thesis:_not_{}_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_(2_*_n)_/_3__}_ assume {} in { p where p is prime Element of NAT : p <= (2 * n) / 3 } ; ::_thesis: contradiction then ex p being prime Element of NAT st ( p = {} & p <= (2 * n) / 3 ) ; hence contradiction ; ::_thesis: verum end; (- 1) + ((2 * n) / 3) < 0 + ((2 * n) / 3) by XREAL_1:6; then A10: 4 to_power (((2 * n) / 3) - 1) < 4 to_power ((2 * n) / 3) by POWER:39; now__::_thesis:_for_x_being_set_st_x_in__{__(p_|^_(p_|-count_((2_*_n)_choose_n)))_where_p_is_prime_Element_of_NAT_:_(_sqrt_(2_*_n)_<_p_&_p_<=_(2_*_n)_/_3_&_p_|-count_((2_*_n)_choose_n)_>_0_)__}__holds_ x_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_(2_*_n)_/_3__}_ let x be set ; ::_thesis: ( x in { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } implies x in { p where p is prime Element of NAT : p <= (2 * n) / 3 } ) assume x in { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } ; ::_thesis: x in { p where p is prime Element of NAT : p <= (2 * n) / 3 } then consider p being prime Element of NAT such that A11: p |^ (p |-count ((2 * n) choose n)) = x and A12: sqrt (2 * n) < p and A13: p <= (2 * n) / 3 and A14: p |-count ((2 * n) choose n) > 0 ; p |-count ((2 * n) choose n) <= 1 by A7, A12, A13, Lm9; then p |-count ((2 * n) choose n) < 1 + 1 by NAT_1:13; then p |-count ((2 * n) choose n) = 1 by A14, NAT_1:23; then p = x by A11, NEWTON:5; hence x in { p where p is prime Element of NAT : p <= (2 * n) / 3 } by A13; ::_thesis: verum end; then A15: { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } c= { p where p is prime Element of NAT : p <= (2 * n) / 3 } by TARSKI:def_3; now__::_thesis:_for_x_being_set_st_x_in__{__p_where_p_is_prime_Element_of_NAT_:_p_<=_(2_*_n)_/_3__}__holds_ x_in_Seg_mm let x be set ; ::_thesis: ( x in { p where p is prime Element of NAT : p <= (2 * n) / 3 } implies x in Seg mm ) assume x in { p where p is prime Element of NAT : p <= (2 * n) / 3 } ; ::_thesis: x in Seg mm then consider p being prime Element of NAT such that A16: p = x and A17: p <= (2 * n) / 3 ; A18: 1 <= p by INT_2:def_4; (2 * n) / 3 <= [/((2 * n) / 3)\] by INT_1:def_7; then p <= [/((2 * n) / 3)\] by A17, XXREAL_0:2; hence x in Seg mm by A16, A18, FINSEQ_1:1; ::_thesis: verum end; then A19: { p where p is prime Element of NAT : p <= (2 * n) / 3 } c= Seg mm by TARSKI:def_3; then { p where p is prime Element of NAT : p <= (2 * n) / 3 } c= NAT by XBOOLE_1:1; then Product (Sgm { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } ) <= Product (Sgm { p where p is prime Element of NAT : p <= (2 * n) / 3 } ) by A19, A9, A15, Th43; then A20: Product (Sgm { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( sqrt (2 * n) < p & p <= (2 * n) / 3 & p |-count ((2 * n) choose n) > 0 ) } ) <= 4 to_power (((2 * n) / 3) - 1) by A8, XXREAL_0:2; n >= 3 by A2, XXREAL_0:2; then Product (Sgm { (p |^ (p |-count ((2 * n) choose n))) where p is prime Element of NAT : ( p <= sqrt (2 * n) & p |-count ((2 * n) choose n) > 0 ) } ) <= (2 * n) to_power (sqrt (2 * n)) by Lm11; then (2 * n) choose n <= ((2 * n) to_power (sqrt (2 * n))) * (4 to_power (((2 * n) / 3) - 1)) by A20, A5, XREAL_1:66; then A21: (4 |^ n) / (2 * n) <= ((2 * n) to_power (sqrt (2 * n))) * (4 to_power (((2 * n) / 3) - 1)) by A6, XXREAL_0:2; A22: 4 to_power ((2 * n) / 3) > 0 by POWER:34; (2 * n) to_power (sqrt (2 * n)) > 0 by A2, POWER:34; then (4 to_power (((2 * n) / 3) - 1)) * ((2 * n) to_power (sqrt (2 * n))) < (4 to_power ((2 * n) / 3)) * ((2 * n) to_power (sqrt (2 * n))) by A10, XREAL_1:68; then (4 |^ n) / (2 * n) <= ((2 * n) to_power (sqrt (2 * n))) * (4 to_power ((2 * n) / 3)) by A21, XXREAL_0:2; then ((4 |^ n) / (2 * n)) * (2 * n) <= (((2 * n) to_power (sqrt (2 * n))) * (4 to_power ((2 * n) / 3))) * (2 * n) by XREAL_1:64; then ( 4 |^ n = 4 to_power ((3 * n) / 3) & 4 |^ n <= (((2 * n) to_power (sqrt (2 * n))) * (2 * n)) * (4 to_power ((2 * n) / 3)) ) by A2, POWER:41, XCMPLX_1:87; then (4 to_power ((3 * n) / 3)) / (4 to_power ((2 * n) / 3)) <= ((((2 * n) to_power (sqrt (2 * n))) * (2 * n)) * (4 to_power ((2 * n) / 3))) / (4 to_power ((2 * n) / 3)) by A22, XREAL_1:72; then (4 to_power ((3 * n) / 3)) / (4 to_power ((2 * n) / 3)) <= ((2 * n) to_power (sqrt (2 * n))) * (2 * n) by A22, XCMPLX_1:89; then 4 to_power (((3 * n) / 3) - ((2 * n) / 3)) <= ((2 * n) to_power (sqrt (2 * n))) * (2 * n) by POWER:29; then 4 to_power (n / 3) <= ((2 * n) to_power (sqrt (2 * n))) * ((2 * n) to_power 1) by POWER:25; then 4 to_power (n / 3) <= (2 * n) to_power ((sqrt (2 * n)) + 1) by A2, POWER:27; then A23: ( 4 to_power (n / 3) < (2 * n) to_power ((sqrt (2 * n)) + 1) or 4 to_power (n / 3) = (2 * n) to_power ((sqrt (2 * n)) + 1) ) by XXREAL_0:1; 4 to_power (n / 3) > 0 by POWER:34; then (4 to_power (n / 3)) to_power 3 <= ((2 * n) to_power ((sqrt (2 * n)) + 1)) to_power 3 by A23, POWER:37; then 4 to_power ((n / 3) * 3) <= ((2 * n) to_power ((sqrt (2 * n)) + 1)) to_power 3 by POWER:33; then A24: 4 to_power n <= (2 * n) to_power (((sqrt (2 * n)) + 1) * 3) by A2, POWER:33; reconsider 2n = 2 * n as real number ; A25: (6 -root (2 * n)) to_power 6 = (6 -root 2n) |^ 6 by POWER:41 .= 2n by COMPTRIG:4 ; 2 to_power 2 = 2 |^ 2 by POWER:41 .= Product <*2,2*> by FINSEQ_2:61 .= 2 * 2 by RVSUM_1:99 ; then A26: ( 2 to_power (2 * n) > 0 & 4 to_power n = 2 to_power (2 * n) ) by POWER:33, POWER:34; set n1 = [\(6 -root (2 * n))/]; (6 -root (2 * n)) - 1 < [\(6 -root (2 * n))/] by INT_1:def_6; then A27: ((6 -root (2 * n)) - 1) + 1 < [\(6 -root (2 * n))/] + 1 by XREAL_1:6; 6 -root (2 * n) > 6 -root 0 by A2, POWER:17; then A28: 6 -root (2 * n) > 0 by POWER:5; then reconsider n1 = [\(6 -root (2 * n))/] as Element of NAT by INT_1:53; n1 <= 6 -root (2 * n) by INT_1:def_6; then ( n1 < 6 -root (2 * n) or n1 = 6 -root (2 * n) ) by XXREAL_0:1; then A29: 2 to_power n1 <= 2 to_power (6 -root (2 * n)) by POWER:39; n1 + 1 <= 2 |^ n1 by NEWTON:85; then n1 + 1 <= 2 to_power n1 by POWER:41; then n1 + 1 <= 2 to_power (6 -root (2 * n)) by A29, XXREAL_0:2; then ( n1 + 1 < 2 to_power (6 -root (2 * n)) or n1 + 1 = 2 to_power (6 -root (2 * n)) ) by XXREAL_0:1; then A30: (n1 + 1) to_power 6 <= (2 to_power (6 -root (2 * n))) to_power 6 by POWER:37; (6 -root (2 * n)) to_power 6 < (n1 + 1) to_power 6 by A27, A28, POWER:37; then 2 * n < (2 to_power (6 -root (2 * n))) to_power 6 by A30, A25, XXREAL_0:2; then A31: 2 * n < 2 to_power ((6 -root (2 * n)) * 6) by POWER:33; sqrt (2 * n) > 0 by A2, SQUARE_1:25; then (2 * n) to_power (((sqrt (2 * n)) + 1) * 3) < (2 to_power ((6 -root (2 * n)) * 6)) to_power (((sqrt (2 * n)) + 1) * 3) by A2, A31, POWER:37; then 4 to_power n < (2 to_power ((6 -root (2 * n)) * 6)) to_power (((sqrt (2 * n)) + 1) * 3) by A24, XXREAL_0:2; then 4 to_power n < 2 to_power (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)) by POWER:33; then log (2,(2 to_power (2 * n))) < log (2,(2 to_power (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)))) by A26, POWER:57; then (2 * n) * (log (2,2)) < log (2,(2 to_power (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)))) by POWER:55; then (2 * n) * (log (2,2)) < (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)) * (log (2,2)) by POWER:55; then (2 * n) * 1 < (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)) * (log (2,2)) by POWER:52; then A32: 2 * n < (((6 -root (2 * n)) * 6) * (((sqrt (2 * n)) + 1) * 3)) * 1 by POWER:52; 42 < n by A2, XXREAL_0:2; then 42 * 2 < n * 2 by XREAL_1:68; then 81 < 2 * n by XXREAL_0:2; then A33: sqrt 81 < sqrt (2 * n) by SQUARE_1:27; 81 = 9 ^2 ; then sqrt 81 = 9 by SQUARE_1:22; then 9 * 2 < (sqrt (2 * n)) * 2 by A33, XREAL_1:68; then 18 + (18 * (sqrt (2 * n))) < (2 * (sqrt (2 * n))) + (18 * (sqrt (2 * n))) by XREAL_1:6; then (18 + (18 * (sqrt (2 * n)))) * (6 -root (2 * n)) < (20 * (sqrt (2 * n))) * (6 -root (2 * n)) by A28, XREAL_1:68; then 2 * n < 20 * ((sqrt (2 * n)) * (6 -root (2 * n))) by A32, XXREAL_0:2; then 2 * n < 20 * ((2 -Root (2 * n)) * (6 -root (2 * n))) by PREPOWER:32; then 2 * n < 20 * ((2 -root (2 * n)) * (6 -root (2 * n))) by POWER:def_1; then 2 * n < 20 * (((2 * n) to_power (1 / 2)) * (6 -root (2 * n))) by POWER:45; then 2 * n < 20 * (((2 * n) to_power (1 / 2)) * ((2 * n) to_power (1 / 6))) by POWER:45; then A34: 2 * n < 20 * ((2 * n) to_power ((1 / 2) + (1 / 6))) by A2, POWER:27; A35: (2 * n) to_power (2 / 3) <> 0 by A2, POWER:34; (2 * n) to_power (2 / 3) > 0 by A2, POWER:34; then (2 * n) / ((2 * n) to_power (2 / 3)) < (20 * ((2 * n) to_power (2 / 3))) / ((2 * n) to_power (2 / 3)) by A34, XREAL_1:74; then (2 * n) / ((2 * n) to_power (2 / 3)) < 20 by A35, XCMPLX_1:89; then ((2 * n) to_power 1) / ((2 * n) to_power (2 / 3)) < 20 by POWER:25; then A36: (2 * n) to_power (1 - (2 / 3)) < 20 by A2, POWER:29; (2 * n) to_power (1 / 3) > 0 by A2, POWER:34; then ((2 * n) to_power (1 / 3)) to_power 3 < 20 to_power 3 by A36, POWER:37; then (2 * n) to_power ((1 / 3) * 3) < 20 to_power 3 by A2, POWER:33; then 2 * n < 20 to_power (2 + 1) by POWER:25; then 2 * n < (20 to_power 2) * (20 to_power 1) by POWER:27; then 2 * n < (20 to_power (1 + 1)) * 20 by POWER:25; then 2 * n < ((20 to_power 1) * (20 to_power 1)) * 20 by POWER:27; then 2 * n < ((20 to_power 1) * 20) * 20 by POWER:25; then 2 * n < (20 * 20) * 20 by POWER:25; then (2 * n) / 2 < 8000 / 2 by XREAL_1:74; hence contradiction by A2; ::_thesis: verum end; end; end;