Metamath Proof Explorer


Theorem rextpg

Description: Convert a restricted existential quantification over a triple to a disjunction. (Contributed by Mario Carneiro, 23-Apr-2015)

Ref Expression
Hypotheses ralprg.1 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
ralprg.2 ( 𝑥 = 𝐵 → ( 𝜑𝜒 ) )
raltpg.3 ( 𝑥 = 𝐶 → ( 𝜑𝜃 ) )
Assertion rextpg ( ( 𝐴𝑉𝐵𝑊𝐶𝑋 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 , 𝐶 } 𝜑 ↔ ( 𝜓𝜒𝜃 ) ) )

Proof

Step Hyp Ref Expression
1 ralprg.1 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
2 ralprg.2 ( 𝑥 = 𝐵 → ( 𝜑𝜒 ) )
3 raltpg.3 ( 𝑥 = 𝐶 → ( 𝜑𝜃 ) )
4 1 2 rexprg ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( 𝜓𝜒 ) ) )
5 4 orbi1d ( ( 𝐴𝑉𝐵𝑊 ) → ( ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) ↔ ( ( 𝜓𝜒 ) ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) ) )
6 3 rexsng ( 𝐶𝑋 → ( ∃ 𝑥 ∈ { 𝐶 } 𝜑𝜃 ) )
7 6 orbi2d ( 𝐶𝑋 → ( ( ( 𝜓𝜒 ) ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) ↔ ( ( 𝜓𝜒 ) ∨ 𝜃 ) ) )
8 5 7 sylan9bb ( ( ( 𝐴𝑉𝐵𝑊 ) ∧ 𝐶𝑋 ) → ( ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) ↔ ( ( 𝜓𝜒 ) ∨ 𝜃 ) ) )
9 8 3impa ( ( 𝐴𝑉𝐵𝑊𝐶𝑋 ) → ( ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) ↔ ( ( 𝜓𝜒 ) ∨ 𝜃 ) ) )
10 df-tp { 𝐴 , 𝐵 , 𝐶 } = ( { 𝐴 , 𝐵 } ∪ { 𝐶 } )
11 10 rexeqi ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 , 𝐶 } 𝜑 ↔ ∃ 𝑥 ∈ ( { 𝐴 , 𝐵 } ∪ { 𝐶 } ) 𝜑 )
12 rexun ( ∃ 𝑥 ∈ ( { 𝐴 , 𝐵 } ∪ { 𝐶 } ) 𝜑 ↔ ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) )
13 11 12 bitri ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 , 𝐶 } 𝜑 ↔ ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∨ ∃ 𝑥 ∈ { 𝐶 } 𝜑 ) )
14 df-3or ( ( 𝜓𝜒𝜃 ) ↔ ( ( 𝜓𝜒 ) ∨ 𝜃 ) )
15 9 13 14 3bitr4g ( ( 𝐴𝑉𝐵𝑊𝐶𝑋 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 , 𝐶 } 𝜑 ↔ ( 𝜓𝜒𝜃 ) ) )