Metamath Proof Explorer


Theorem ifpim23g

Description: Restate implication as conditional logic operator. (Contributed by RP, 25-Apr-2020)

Ref Expression
Assertion ifpim23g ( ( ( 𝜑𝜓 ) ↔ if- ( 𝜒 , 𝜓 , ¬ 𝜑 ) ) ↔ ( ( ( 𝜑𝜓 ) → 𝜒 ) ∧ ( 𝜒 → ( 𝜑𝜓 ) ) ) )

Proof

Step Hyp Ref Expression
1 ifpidg ( ( ( 𝜑𝜓 ) ↔ if- ( 𝜒 , 𝜓 , ¬ 𝜑 ) ) ↔ ( ( ( ( 𝜒𝜓 ) → ( 𝜑𝜓 ) ) ∧ ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ) ∧ ( ( ¬ 𝜑 → ( 𝜒 ∨ ( 𝜑𝜓 ) ) ) ∧ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) ) ) )
2 dfor2 ( ( 𝜑𝜓 ) ↔ ( ( 𝜑𝜓 ) → 𝜓 ) )
3 2 imbi2i ( ( 𝜒 → ( 𝜑𝜓 ) ) ↔ ( 𝜒 → ( ( 𝜑𝜓 ) → 𝜓 ) ) )
4 impexp ( ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ↔ ( 𝜒 → ( ( 𝜑𝜓 ) → 𝜓 ) ) )
5 ax-1 ( 𝜓 → ( 𝜑𝜓 ) )
6 5 adantl ( ( 𝜒𝜓 ) → ( 𝜑𝜓 ) )
7 6 biantrur ( ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ↔ ( ( ( 𝜒𝜓 ) → ( 𝜑𝜓 ) ) ∧ ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ) )
8 3 4 7 3bitr2i ( ( 𝜒 → ( 𝜑𝜓 ) ) ↔ ( ( ( 𝜒𝜓 ) → ( 𝜑𝜓 ) ) ∧ ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ) )
9 impexp ( ( ( 𝜑𝜓 ) → 𝜒 ) ↔ ( 𝜑 → ( 𝜓𝜒 ) ) )
10 imdi ( ( 𝜑 → ( 𝜓𝜒 ) ) ↔ ( ( 𝜑𝜓 ) → ( 𝜑𝜒 ) ) )
11 imor ( ( 𝜑𝜒 ) ↔ ( ¬ 𝜑𝜒 ) )
12 orcom ( ( ¬ 𝜑𝜒 ) ↔ ( 𝜒 ∨ ¬ 𝜑 ) )
13 11 12 bitri ( ( 𝜑𝜒 ) ↔ ( 𝜒 ∨ ¬ 𝜑 ) )
14 13 imbi2i ( ( ( 𝜑𝜓 ) → ( 𝜑𝜒 ) ) ↔ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) )
15 10 14 bitri ( ( 𝜑 → ( 𝜓𝜒 ) ) ↔ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) )
16 9 15 bitri ( ( ( 𝜑𝜓 ) → 𝜒 ) ↔ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) )
17 pm2.21 ( ¬ 𝜑 → ( 𝜑𝜓 ) )
18 17 olcd ( ¬ 𝜑 → ( 𝜒 ∨ ( 𝜑𝜓 ) ) )
19 18 biantrur ( ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) ↔ ( ( ¬ 𝜑 → ( 𝜒 ∨ ( 𝜑𝜓 ) ) ) ∧ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) ) )
20 16 19 bitri ( ( ( 𝜑𝜓 ) → 𝜒 ) ↔ ( ( ¬ 𝜑 → ( 𝜒 ∨ ( 𝜑𝜓 ) ) ) ∧ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) ) )
21 8 20 anbi12i ( ( ( 𝜒 → ( 𝜑𝜓 ) ) ∧ ( ( 𝜑𝜓 ) → 𝜒 ) ) ↔ ( ( ( ( 𝜒𝜓 ) → ( 𝜑𝜓 ) ) ∧ ( ( 𝜒 ∧ ( 𝜑𝜓 ) ) → 𝜓 ) ) ∧ ( ( ¬ 𝜑 → ( 𝜒 ∨ ( 𝜑𝜓 ) ) ) ∧ ( ( 𝜑𝜓 ) → ( 𝜒 ∨ ¬ 𝜑 ) ) ) ) )
22 ancom ( ( ( 𝜒 → ( 𝜑𝜓 ) ) ∧ ( ( 𝜑𝜓 ) → 𝜒 ) ) ↔ ( ( ( 𝜑𝜓 ) → 𝜒 ) ∧ ( 𝜒 → ( 𝜑𝜓 ) ) ) )
23 1 21 22 3bitr2i ( ( ( 𝜑𝜓 ) ↔ if- ( 𝜒 , 𝜓 , ¬ 𝜑 ) ) ↔ ( ( ( 𝜑𝜓 ) → 𝜒 ) ∧ ( 𝜒 → ( 𝜑𝜓 ) ) ) )