Metamath Proof Explorer


Theorem prmdvdsfmtnof

Description: The mapping of a Fermat number to its smallest prime factor is a function. (Contributed by AV, 4-Aug-2021) (Proof shortened by II, 16-Feb-2023)

Ref Expression
Hypothesis prmdvdsfmtnof.1 F = f ran FermatNo sup p | p f <
Assertion prmdvdsfmtnof F : ran FermatNo

Proof

Step Hyp Ref Expression
1 prmdvdsfmtnof.1 F = f ran FermatNo sup p | p f <
2 fmtnorn f ran FermatNo n 0 FermatNo n = f
3 ltso < Or
4 3 a1i n 0 FermatNo n = f < Or
5 fmtnoge3 n 0 FermatNo n 3
6 5 adantr n 0 FermatNo n = f FermatNo n 3
7 eleq1 FermatNo n = f FermatNo n 3 f 3
8 7 adantl n 0 FermatNo n = f FermatNo n 3 f 3
9 6 8 mpbid n 0 FermatNo n = f f 3
10 uzuzle23 f 3 f 2
11 9 10 syl n 0 FermatNo n = f f 2
12 eluz2nn f 2 f
13 prmdvdsfi f p | p f Fin
14 11 12 13 3syl n 0 FermatNo n = f p | p f Fin
15 exprmfct f 2 p p f
16 11 15 syl n 0 FermatNo n = f p p f
17 rabn0 p | p f p p f
18 16 17 sylibr n 0 FermatNo n = f p | p f
19 ssrab2 p | p f
20 prmssnn
21 nnssre
22 20 21 sstri
23 19 22 sstri p | p f
24 23 a1i n 0 FermatNo n = f p | p f
25 fiinfcl < Or p | p f Fin p | p f p | p f sup p | p f < p | p f
26 19 25 sselid < Or p | p f Fin p | p f p | p f sup p | p f <
27 4 14 18 24 26 syl13anc n 0 FermatNo n = f sup p | p f <
28 27 rexlimiva n 0 FermatNo n = f sup p | p f <
29 2 28 sylbi f ran FermatNo sup p | p f <
30 1 29 fmpti F : ran FermatNo