Metamath Proof Explorer


Theorem cases

Description: Case disjunction according to the value of ph . (Contributed by NM, 25-Apr-2019)

Ref Expression
Hypotheses cases.1 ( 𝜑 → ( 𝜓𝜒 ) )
cases.2 ( ¬ 𝜑 → ( 𝜓𝜃 ) )
Assertion cases ( 𝜓 ↔ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜃 ) ) )

Proof

Step Hyp Ref Expression
1 cases.1 ( 𝜑 → ( 𝜓𝜒 ) )
2 cases.2 ( ¬ 𝜑 → ( 𝜓𝜃 ) )
3 exmid ( 𝜑 ∨ ¬ 𝜑 )
4 3 biantrur ( 𝜓 ↔ ( ( 𝜑 ∨ ¬ 𝜑 ) ∧ 𝜓 ) )
5 andir ( ( ( 𝜑 ∨ ¬ 𝜑 ) ∧ 𝜓 ) ↔ ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜓 ) ) )
6 1 pm5.32i ( ( 𝜑𝜓 ) ↔ ( 𝜑𝜒 ) )
7 2 pm5.32i ( ( ¬ 𝜑𝜓 ) ↔ ( ¬ 𝜑𝜃 ) )
8 6 7 orbi12i ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜓 ) ) ↔ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜃 ) ) )
9 4 5 8 3bitri ( 𝜓 ↔ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜃 ) ) )