Metamath Proof Explorer


Theorem prime

Description: Two ways to express " A is a prime number (or 1)". See also isprm . (Contributed by NM, 4-May-2005)

Ref Expression
Assertion prime A x A x x = 1 x = A x 1 < x x A A x x = A

Proof

Step Hyp Ref Expression
1 bi2.04 x 1 A x x = A A x x 1 x = A
2 impexp x 1 A x x = A x 1 A x x = A
3 neor x = 1 x = A x 1 x = A
4 3 imbi2i A x x = 1 x = A A x x 1 x = A
5 1 2 4 3bitr4ri A x x = 1 x = A x 1 A x x = A
6 nngt1ne1 x 1 < x x 1
7 6 adantl A x 1 < x x 1
8 7 anbi1d A x 1 < x A x x 1 A x
9 nnz A x A x
10 nnre x x
11 gtndiv x A A < x ¬ A x
12 11 3expia x A A < x ¬ A x
13 10 12 sylan x A A < x ¬ A x
14 13 con2d x A A x ¬ A < x
15 nnre A A
16 lenlt x A x A ¬ A < x
17 10 15 16 syl2an x A x A ¬ A < x
18 14 17 sylibrd x A A x x A
19 18 ancoms A x A x x A
20 9 19 syl5 A x A x x A
21 20 pm4.71rd A x A x x A A x
22 21 anbi2d A x 1 < x A x 1 < x x A A x
23 3anass 1 < x x A A x 1 < x x A A x
24 22 23 bitr4di A x 1 < x A x 1 < x x A A x
25 8 24 bitr3d A x x 1 A x 1 < x x A A x
26 25 imbi1d A x x 1 A x x = A 1 < x x A A x x = A
27 5 26 syl5bb A x A x x = 1 x = A 1 < x x A A x x = A
28 27 ralbidva A x A x x = 1 x = A x 1 < x x A A x x = A