Metamath Proof Explorer


Theorem 2reurex

Description: Double restricted quantification with existential uniqueness, analogous to 2euex . (Contributed by Alexander van der Vekens, 24-Jun-2017)

Ref Expression
Assertion 2reurex ( ∃! 𝑥𝐴𝑦𝐵 𝜑 → ∃ 𝑦𝐵 ∃! 𝑥𝐴 𝜑 )

Proof

Step Hyp Ref Expression
1 reu5 ( ∃! 𝑥𝐴𝑦𝐵 𝜑 ↔ ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃* 𝑥𝐴𝑦𝐵 𝜑 ) )
2 rexcom ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ↔ ∃ 𝑦𝐵𝑥𝐴 𝜑 )
3 nfcv 𝑦 𝐴
4 nfre1 𝑦𝑦𝐵 𝜑
5 3 4 nfrmow 𝑦 ∃* 𝑥𝐴𝑦𝐵 𝜑
6 rspe ( ( 𝑦𝐵𝜑 ) → ∃ 𝑦𝐵 𝜑 )
7 6 ex ( 𝑦𝐵 → ( 𝜑 → ∃ 𝑦𝐵 𝜑 ) )
8 7 ralrimivw ( 𝑦𝐵 → ∀ 𝑥𝐴 ( 𝜑 → ∃ 𝑦𝐵 𝜑 ) )
9 rmoim ( ∀ 𝑥𝐴 ( 𝜑 → ∃ 𝑦𝐵 𝜑 ) → ( ∃* 𝑥𝐴𝑦𝐵 𝜑 → ∃* 𝑥𝐴 𝜑 ) )
10 8 9 syl ( 𝑦𝐵 → ( ∃* 𝑥𝐴𝑦𝐵 𝜑 → ∃* 𝑥𝐴 𝜑 ) )
11 10 impcom ( ( ∃* 𝑥𝐴𝑦𝐵 𝜑𝑦𝐵 ) → ∃* 𝑥𝐴 𝜑 )
12 rmo5 ( ∃* 𝑥𝐴 𝜑 ↔ ( ∃ 𝑥𝐴 𝜑 → ∃! 𝑥𝐴 𝜑 ) )
13 11 12 sylib ( ( ∃* 𝑥𝐴𝑦𝐵 𝜑𝑦𝐵 ) → ( ∃ 𝑥𝐴 𝜑 → ∃! 𝑥𝐴 𝜑 ) )
14 13 ex ( ∃* 𝑥𝐴𝑦𝐵 𝜑 → ( 𝑦𝐵 → ( ∃ 𝑥𝐴 𝜑 → ∃! 𝑥𝐴 𝜑 ) ) )
15 5 14 reximdai ( ∃* 𝑥𝐴𝑦𝐵 𝜑 → ( ∃ 𝑦𝐵𝑥𝐴 𝜑 → ∃ 𝑦𝐵 ∃! 𝑥𝐴 𝜑 ) )
16 2 15 syl5bi ( ∃* 𝑥𝐴𝑦𝐵 𝜑 → ( ∃ 𝑥𝐴𝑦𝐵 𝜑 → ∃ 𝑦𝐵 ∃! 𝑥𝐴 𝜑 ) )
17 16 impcom ( ( ∃ 𝑥𝐴𝑦𝐵 𝜑 ∧ ∃* 𝑥𝐴𝑦𝐵 𝜑 ) → ∃ 𝑦𝐵 ∃! 𝑥𝐴 𝜑 )
18 1 17 sylbi ( ∃! 𝑥𝐴𝑦𝐵 𝜑 → ∃ 𝑦𝐵 ∃! 𝑥𝐴 𝜑 )