Metamath Proof Explorer


Theorem elimdhyp

Description: Version of elimhyp where the hypothesis is deduced from the final antecedent. See divalg for an example of its use. (Contributed by Paul Chapman, 25-Mar-2008)

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

Proof

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