Metamath Proof Explorer


Theorem muval2

Description: The value of the MΓΆbius function at a squarefree number. (Contributed by Mario Carneiro, 3-Oct-2014)

Ref Expression
Assertion muval2 ( ( 𝐴 ∈ β„• ∧ ( ΞΌ β€˜ 𝐴 ) β‰  0 ) β†’ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) )

Proof

Step Hyp Ref Expression
1 df-ne ⊒ ( ( ΞΌ β€˜ 𝐴 ) β‰  0 ↔ Β¬ ( ΞΌ β€˜ 𝐴 ) = 0 )
2 ifeqor ⊒ ( if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = 0 ∨ if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) )
3 muval ⊒ ( 𝐴 ∈ β„• β†’ ( ΞΌ β€˜ 𝐴 ) = if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) )
4 3 eqeq1d ⊒ ( 𝐴 ∈ β„• β†’ ( ( ΞΌ β€˜ 𝐴 ) = 0 ↔ if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = 0 ) )
5 3 eqeq1d ⊒ ( 𝐴 ∈ β„• β†’ ( ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ↔ if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) )
6 4 5 orbi12d ⊒ ( 𝐴 ∈ β„• β†’ ( ( ( ΞΌ β€˜ 𝐴 ) = 0 ∨ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) ↔ ( if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = 0 ∨ if ( βˆƒ 𝑝 ∈ β„™ ( 𝑝 ↑ 2 ) βˆ₯ 𝐴 , 0 , ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) ) )
7 2 6 mpbiri ⊒ ( 𝐴 ∈ β„• β†’ ( ( ΞΌ β€˜ 𝐴 ) = 0 ∨ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) )
8 7 ord ⊒ ( 𝐴 ∈ β„• β†’ ( Β¬ ( ΞΌ β€˜ 𝐴 ) = 0 β†’ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) )
9 1 8 biimtrid ⊒ ( 𝐴 ∈ β„• β†’ ( ( ΞΌ β€˜ 𝐴 ) β‰  0 β†’ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) ) )
10 9 imp ⊒ ( ( 𝐴 ∈ β„• ∧ ( ΞΌ β€˜ 𝐴 ) β‰  0 ) β†’ ( ΞΌ β€˜ 𝐴 ) = ( - 1 ↑ ( β™― β€˜ { 𝑝 ∈ β„™ ∣ 𝑝 βˆ₯ 𝐴 } ) ) )