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 ) ∈ ℙ |
16 |
14 15
|
eqeltrdi |
⊢ ( 𝑁 = 3 → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
17 |
10 13 16
|
3jaoi |
⊢ ( ( 𝑁 = 1 ∨ 𝑁 = 2 ∨ 𝑁 = 3 ) → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
18 |
7 17
|
syl |
⊢ ( 𝑁 ∈ { 1 , 2 , 3 } → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
19 |
|
fzo1to4tp |
⊢ ( 1 ..^ 4 ) = { 1 , 2 , 3 } |
20 |
18 19
|
eleq2s |
⊢ ( 𝑁 ∈ ( 1 ..^ 4 ) → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
21 |
|
fveq2 |
⊢ ( 𝑁 = 4 → ( FermatNo ‘ 𝑁 ) = ( FermatNo ‘ 4 ) ) |
22 |
|
fmtno4prm |
⊢ ( FermatNo ‘ 4 ) ∈ ℙ |
23 |
21 22
|
eqeltrdi |
⊢ ( 𝑁 = 4 → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
24 |
6 20 23
|
3jaoi |
⊢ ( ( 𝑁 = 0 ∨ 𝑁 ∈ ( 1 ..^ 4 ) ∨ 𝑁 = 4 ) → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |
25 |
3 24
|
sylbi |
⊢ ( 𝑁 ∈ ( 0 ... 4 ) → ( FermatNo ‘ 𝑁 ) ∈ ℙ ) |