Metamath Proof Explorer


Theorem elimhyp

Description: Eliminate a hypothesis containing class variable A when it is known for a specific class B . For more information, see comments in dedth . (Contributed by NM, 15-May-1999)

Ref Expression
Hypotheses elimhyp.1 ( 𝐴 = if ( 𝜑 , 𝐴 , 𝐵 ) → ( 𝜑𝜓 ) )
elimhyp.2 ( 𝐵 = if ( 𝜑 , 𝐴 , 𝐵 ) → ( 𝜒𝜓 ) )
elimhyp.3 𝜒
Assertion elimhyp 𝜓

Proof

Step Hyp Ref Expression
1 elimhyp.1 ( 𝐴 = if ( 𝜑 , 𝐴 , 𝐵 ) → ( 𝜑𝜓 ) )
2 elimhyp.2 ( 𝐵 = if ( 𝜑 , 𝐴 , 𝐵 ) → ( 𝜒𝜓 ) )
3 elimhyp.3 𝜒
4 iftrue ( 𝜑 → if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐴 )
5 4 eqcomd ( 𝜑𝐴 = if ( 𝜑 , 𝐴 , 𝐵 ) )
6 5 1 syl ( 𝜑 → ( 𝜑𝜓 ) )
7 6 ibi ( 𝜑𝜓 )
8 iffalse ( ¬ 𝜑 → if ( 𝜑 , 𝐴 , 𝐵 ) = 𝐵 )
9 8 eqcomd ( ¬ 𝜑𝐵 = if ( 𝜑 , 𝐴 , 𝐵 ) )
10 9 2 syl ( ¬ 𝜑 → ( 𝜒𝜓 ) )
11 3 10 mpbii ( ¬ 𝜑𝜓 )
12 7 11 pm2.61i 𝜓