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mod 8 ) → ( ( 𝑁 mod 8 ) ∈ ( { 1 , 7 } ∪ { 3 , 5 } ) → ( 2 ∥ ( ( ( 𝑅 ↑ 2 ) − 1 ) / 8 ) ↔ 𝑅 ∈ { 1 , 7 } ) ) ) |
51 |
1 50
|
syl5com |
⊢ ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 𝑅 = ( 𝑁 mod 8 ) → ( 2 ∥ ( ( ( 𝑅 ↑ 2 ) − 1 ) / 8 ) ↔ 𝑅 ∈ { 1 , 7 } ) ) ) |
52 |
51
|
3impia |
⊢ ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ∧ 𝑅 = ( 𝑁 mod 8 ) ) → ( 2 ∥ ( ( ( 𝑅 ↑ 2 ) − 1 ) / 8 ) ↔ 𝑅 ∈ { 1 , 7 } ) ) |