Metamath Proof Explorer


Theorem reuxfrd

Description: Transfer existential uniqueness from a variable x to another variable y contained in expression A . (Contributed by NM, 16-Jan-2012) Separate variables B and C . (Revised by Thierry Arnoux, 8-Oct-2017)

Ref Expression
Hypotheses reuxfrd.1 ( ( 𝜑𝑦𝐶 ) → 𝐴𝐵 )
reuxfrd.2 ( ( 𝜑𝑥𝐵 ) → ∃* 𝑦𝐶 𝑥 = 𝐴 )
Assertion reuxfrd ( 𝜑 → ( ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) ↔ ∃! 𝑦𝐶 𝜓 ) )

Proof

Step Hyp Ref Expression
1 reuxfrd.1 ( ( 𝜑𝑦𝐶 ) → 𝐴𝐵 )
2 reuxfrd.2 ( ( 𝜑𝑥𝐵 ) → ∃* 𝑦𝐶 𝑥 = 𝐴 )
3 rmoan ( ∃* 𝑦𝐶 𝑥 = 𝐴 → ∃* 𝑦𝐶 ( 𝜓𝑥 = 𝐴 ) )
4 2 3 syl ( ( 𝜑𝑥𝐵 ) → ∃* 𝑦𝐶 ( 𝜓𝑥 = 𝐴 ) )
5 ancom ( ( 𝜓𝑥 = 𝐴 ) ↔ ( 𝑥 = 𝐴𝜓 ) )
6 5 rmobii ( ∃* 𝑦𝐶 ( 𝜓𝑥 = 𝐴 ) ↔ ∃* 𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) )
7 4 6 sylib ( ( 𝜑𝑥𝐵 ) → ∃* 𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) )
8 7 ralrimiva ( 𝜑 → ∀ 𝑥𝐵 ∃* 𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) )
9 2reuswap ( ∀ 𝑥𝐵 ∃* 𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) → ( ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) → ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ) )
10 8 9 syl ( 𝜑 → ( ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) → ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ) )
11 2reuswap2 ( ∀ 𝑦𝐶 ∃* 𝑥 ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) ) → ( ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) → ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) ) )
12 moeq ∃* 𝑥 𝑥 = 𝐴
13 12 moani ∃* 𝑥 ( ( 𝑥𝐵𝜓 ) ∧ 𝑥 = 𝐴 )
14 ancom ( ( ( 𝑥𝐵𝜓 ) ∧ 𝑥 = 𝐴 ) ↔ ( 𝑥 = 𝐴 ∧ ( 𝑥𝐵𝜓 ) ) )
15 an12 ( ( 𝑥 = 𝐴 ∧ ( 𝑥𝐵𝜓 ) ) ↔ ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) ) )
16 14 15 bitri ( ( ( 𝑥𝐵𝜓 ) ∧ 𝑥 = 𝐴 ) ↔ ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) ) )
17 16 mobii ( ∃* 𝑥 ( ( 𝑥𝐵𝜓 ) ∧ 𝑥 = 𝐴 ) ↔ ∃* 𝑥 ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) ) )
18 13 17 mpbi ∃* 𝑥 ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) )
19 18 a1i ( 𝑦𝐶 → ∃* 𝑥 ( 𝑥𝐵 ∧ ( 𝑥 = 𝐴𝜓 ) ) )
20 11 19 mprg ( ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) → ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) )
21 10 20 impbid1 ( 𝜑 → ( ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) ↔ ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ) )
22 biidd ( 𝑥 = 𝐴 → ( 𝜓𝜓 ) )
23 22 ceqsrexv ( 𝐴𝐵 → ( ∃ 𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ↔ 𝜓 ) )
24 1 23 syl ( ( 𝜑𝑦𝐶 ) → ( ∃ 𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ↔ 𝜓 ) )
25 24 reubidva ( 𝜑 → ( ∃! 𝑦𝐶𝑥𝐵 ( 𝑥 = 𝐴𝜓 ) ↔ ∃! 𝑦𝐶 𝜓 ) )
26 21 25 bitrd ( 𝜑 → ( ∃! 𝑥𝐵𝑦𝐶 ( 𝑥 = 𝐴𝜓 ) ↔ ∃! 𝑦𝐶 𝜓 ) )