Metamath Proof Explorer


Theorem 2pwp1prmfmtno

Description: Every prime number of the form ( ( 2 ^ k ) + 1 ) must be a Fermat number. (Contributed by AV, 7-Aug-2021)

Ref Expression
Assertion 2pwp1prmfmtno KP=2K+1Pn0P=FermatNon

Proof

Step Hyp Ref Expression
1 simp1 KP=2K+1PK
2 eleq1 P=2K+1P2K+1
3 2 biimpa P=2K+1P2K+1
4 3 3adant1 KP=2K+1P2K+1
5 2pwp1prm K2K+1n0K=2n
6 1 4 5 syl2anc KP=2K+1Pn0K=2n
7 simpl P=2K+1K=2nP=2K+1
8 oveq2 K=2n2K=22n
9 8 oveq1d K=2n2K+1=22n+1
10 9 adantl P=2K+1K=2n2K+1=22n+1
11 7 10 eqtrd P=2K+1K=2nP=22n+1
12 fmtno n0FermatNon=22n+1
13 12 eqcomd n022n+1=FermatNon
14 11 13 sylan9eqr n0P=2K+1K=2nP=FermatNon
15 14 exp32 n0P=2K+1K=2nP=FermatNon
16 15 com12 P=2K+1n0K=2nP=FermatNon
17 16 3ad2ant2 KP=2K+1Pn0K=2nP=FermatNon
18 17 imp KP=2K+1Pn0K=2nP=FermatNon
19 18 reximdva KP=2K+1Pn0K=2nn0P=FermatNon
20 6 19 mpd KP=2K+1Pn0P=FermatNon