Metamath Proof Explorer


Theorem rexprg

Description: Convert a restricted existential quantification over a pair to a disjunction. (Contributed by NM, 17-Sep-2011) (Revised by Mario Carneiro, 23-Apr-2015) (Proof shortened by AV, 8-Apr-2023)

Ref Expression
Hypotheses ralprg.1 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
ralprg.2 ( 𝑥 = 𝐵 → ( 𝜑𝜒 ) )
Assertion rexprg ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( 𝜓𝜒 ) ) )

Proof

Step Hyp Ref Expression
1 ralprg.1 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
2 ralprg.2 ( 𝑥 = 𝐵 → ( 𝜑𝜒 ) )
3 nfv 𝑥 𝜓
4 nfv 𝑥 𝜒
5 3 4 1 2 rexprgf ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( 𝜓𝜒 ) ) )