let n be natural odd number ; ( n > 1 implies ( n is prime iff not n divides (n -' 1) ! ) )
assume A1:
n > 1
; ( n is prime iff not n divides (n -' 1) ! )
A2:
(n -' 1) + 1 = (n - 1) + 1
;
thus
( n is prime implies not n divides (n -' 1) ! )
( not n divides (n -' 1) ! implies n is prime )
assume A4:
not n divides (n -' 1) !
; n is prime
consider k being Nat such that
A5:
n = (2 * k) + 1
by ABIAN:9;
k <> 0
by A1, A5;
then
( k = 1 or k >= 2 )
by NAT_1:23;
per cases then
( k = 1 or k = 2 or k > 2 )
by XXREAL_0:1;
suppose
k > 2
;
n is prime then
k >= 2
+ 1
by NAT_1:13;
then
k * 2
>= 3
* 2
by XREAL_1:64;
then A6:
n >= 6
+ 1
by A5, XREAL_1:6;
assume
not
n is
prime
;
contradictionthen consider a being
Nat such that A7:
(
a divides n &
a <> 1 &
a <> n )
by A6, XXREAL_0:2;
consider b being
Nat such that A8:
n = a * b
by A7, NAT_D:def 3;
A9:
(
a <> 0 &
b <> 0 )
by A8;
then A10:
(
a <= n &
b <= n )
by A8, NAT_1:24;
b <> n
then A11:
(
a < n &
b < n )
by A10, A7, XXREAL_0:1;
per cases
( a <> b or a = b )
;
suppose A13:
a = b
;
contradiction
a > 2
then
a * a > 2
* a
by XREAL_1:68;
then A14:
2
* a <= n -' 1
by A13, A8, A2, NAT_1:13;
1
* a < 2
* a
by XREAL_1:68, A9;
then A15:
a * (2 * a) divides (n -' 1) !
by A14, A9, NUMBER16:37;
a * a divides (a * a) * 2
;
hence
contradiction
by A4, A13, A8, A15, INT_2:9;
verum end; end; end; end;