Metamath Proof Explorer


Theorem reurexprg

Description: Convert a restricted existential uniqueness over a pair to a restricted existential quantification and an implication . (Contributed by AV, 3-Apr-2023)

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

Proof

Step Hyp Ref Expression
1 reuprg.1 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) )
2 reuprg.2 ( 𝑥 = 𝐵 → ( 𝜑𝜒 ) )
3 1 2 reuprg ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃! 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( ( 𝜓𝜒 ) ∧ ( ( 𝜒𝜓 ) → 𝐴 = 𝐵 ) ) ) )
4 1 2 rexprg ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( 𝜓𝜒 ) ) )
5 4 bicomd ( ( 𝐴𝑉𝐵𝑊 ) → ( ( 𝜓𝜒 ) ↔ ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ) )
6 5 anbi1d ( ( 𝐴𝑉𝐵𝑊 ) → ( ( ( 𝜓𝜒 ) ∧ ( ( 𝜒𝜓 ) → 𝐴 = 𝐵 ) ) ↔ ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∧ ( ( 𝜒𝜓 ) → 𝐴 = 𝐵 ) ) ) )
7 3 6 bitrd ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃! 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ↔ ( ∃ 𝑥 ∈ { 𝐴 , 𝐵 } 𝜑 ∧ ( ( 𝜒𝜓 ) → 𝐴 = 𝐵 ) ) ) )