Metamath Proof Explorer


Theorem wl-ifpimpr

Description: If one case of an if- condition is a consequence of the other, the expression in df-ifp can be shortened. (Contributed by Wolf Lammen, 12-Jun-2024)

Ref Expression
Assertion wl-ifpimpr ( ( 𝜒𝜓 ) → ( if- ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( ( 𝜑𝜓 ) ∨ 𝜒 ) ) )

Proof

Step Hyp Ref Expression
1 pm4.72 ( ( 𝜒𝜓 ) ↔ ( 𝜓 ↔ ( 𝜒𝜓 ) ) )
2 1 biimpi ( ( 𝜒𝜓 ) → ( 𝜓 ↔ ( 𝜒𝜓 ) ) )
3 orcom ( ( 𝜒𝜓 ) ↔ ( 𝜓𝜒 ) )
4 2 3 bitrdi ( ( 𝜒𝜓 ) → ( 𝜓 ↔ ( 𝜓𝜒 ) ) )
5 4 anbi2d ( ( 𝜒𝜓 ) → ( ( 𝜑𝜓 ) ↔ ( 𝜑 ∧ ( 𝜓𝜒 ) ) ) )
6 andi ( ( 𝜑 ∧ ( 𝜓𝜒 ) ) ↔ ( ( 𝜑𝜓 ) ∨ ( 𝜑𝜒 ) ) )
7 5 6 bitrdi ( ( 𝜒𝜓 ) → ( ( 𝜑𝜓 ) ↔ ( ( 𝜑𝜓 ) ∨ ( 𝜑𝜒 ) ) ) )
8 7 orbi1d ( ( 𝜒𝜓 ) → ( ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) ↔ ( ( ( 𝜑𝜓 ) ∨ ( 𝜑𝜒 ) ) ∨ ( ¬ 𝜑𝜒 ) ) ) )
9 df-ifp ( if- ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( ( 𝜑𝜓 ) ∨ ( ¬ 𝜑𝜒 ) ) )
10 biidd ( 𝜑 → ( 𝜒𝜒 ) )
11 biidd ( ¬ 𝜑 → ( 𝜒𝜒 ) )
12 10 11 cases ( 𝜒 ↔ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜒 ) ) )
13 12 orbi2i ( ( ( 𝜑𝜓 ) ∨ 𝜒 ) ↔ ( ( 𝜑𝜓 ) ∨ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜒 ) ) ) )
14 orass ( ( ( ( 𝜑𝜓 ) ∨ ( 𝜑𝜒 ) ) ∨ ( ¬ 𝜑𝜒 ) ) ↔ ( ( 𝜑𝜓 ) ∨ ( ( 𝜑𝜒 ) ∨ ( ¬ 𝜑𝜒 ) ) ) )
15 13 14 bitr4i ( ( ( 𝜑𝜓 ) ∨ 𝜒 ) ↔ ( ( ( 𝜑𝜓 ) ∨ ( 𝜑𝜒 ) ) ∨ ( ¬ 𝜑𝜒 ) ) )
16 8 9 15 3bitr4g ( ( 𝜒𝜓 ) → ( if- ( 𝜑 , 𝜓 , 𝜒 ) ↔ ( ( 𝜑𝜓 ) ∨ 𝜒 ) ) )