Metamath Proof Explorer


Theorem 2lgsoddprmlem4

Description: Lemma 4 for 2lgsoddprm . (Contributed by AV, 20-Jul-2021)

Ref Expression
Assertion 2lgsoddprmlem4 ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 2 ∥ ( ( ( 𝑁 ↑ 2 ) − 1 ) / 8 ) ↔ ( 𝑁 mod 8 ) ∈ { 1 , 7 } ) )

Proof

Step Hyp Ref Expression
1 eqidd ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 𝑁 mod 8 ) = ( 𝑁 mod 8 ) )
2 2lgsoddprmlem2 ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ∧ ( 𝑁 mod 8 ) = ( 𝑁 mod 8 ) ) → ( 2 ∥ ( ( ( 𝑁 ↑ 2 ) − 1 ) / 8 ) ↔ 2 ∥ ( ( ( ( 𝑁 mod 8 ) ↑ 2 ) − 1 ) / 8 ) ) )
3 1 2 mpd3an3 ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 2 ∥ ( ( ( 𝑁 ↑ 2 ) − 1 ) / 8 ) ↔ 2 ∥ ( ( ( ( 𝑁 mod 8 ) ↑ 2 ) − 1 ) / 8 ) ) )
4 2lgsoddprmlem3 ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ∧ ( 𝑁 mod 8 ) = ( 𝑁 mod 8 ) ) → ( 2 ∥ ( ( ( ( 𝑁 mod 8 ) ↑ 2 ) − 1 ) / 8 ) ↔ ( 𝑁 mod 8 ) ∈ { 1 , 7 } ) )
5 1 4 mpd3an3 ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 2 ∥ ( ( ( ( 𝑁 mod 8 ) ↑ 2 ) − 1 ) / 8 ) ↔ ( 𝑁 mod 8 ) ∈ { 1 , 7 } ) )
6 3 5 bitrd ( ( 𝑁 ∈ ℤ ∧ ¬ 2 ∥ 𝑁 ) → ( 2 ∥ ( ( ( 𝑁 ↑ 2 ) − 1 ) / 8 ) ↔ ( 𝑁 mod 8 ) ∈ { 1 , 7 } ) )