Metamath Proof Explorer


Theorem copsex2d

Description: Implicit substitution deduction for ordered pairs. (Contributed by BJ, 25-Dec-2023)

Ref Expression
Hypotheses copsex2d.xph ( 𝜑 → ∀ 𝑥 𝜑 )
copsex2d.yph ( 𝜑 → ∀ 𝑦 𝜑 )
copsex2d.xch ( 𝜑 → Ⅎ 𝑥 𝜒 )
copsex2d.ych ( 𝜑 → Ⅎ 𝑦 𝜒 )
copsex2d.exa ( 𝜑𝐴𝑈 )
copsex2d.exb ( 𝜑𝐵𝑉 )
copsex2d.is ( ( 𝜑 ∧ ( 𝑥 = 𝐴𝑦 = 𝐵 ) ) → ( 𝜓𝜒 ) )
Assertion copsex2d ( 𝜑 → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) )

Proof

Step Hyp Ref Expression
1 copsex2d.xph ( 𝜑 → ∀ 𝑥 𝜑 )
2 copsex2d.yph ( 𝜑 → ∀ 𝑦 𝜑 )
3 copsex2d.xch ( 𝜑 → Ⅎ 𝑥 𝜒 )
4 copsex2d.ych ( 𝜑 → Ⅎ 𝑦 𝜒 )
5 copsex2d.exa ( 𝜑𝐴𝑈 )
6 copsex2d.exb ( 𝜑𝐵𝑉 )
7 copsex2d.is ( ( 𝜑 ∧ ( 𝑥 = 𝐴𝑦 = 𝐵 ) ) → ( 𝜓𝜒 ) )
8 elisset ( 𝐴𝑈 → ∃ 𝑥 𝑥 = 𝐴 )
9 5 8 syl ( 𝜑 → ∃ 𝑥 𝑥 = 𝐴 )
10 elisset ( 𝐵𝑉 → ∃ 𝑦 𝑦 = 𝐵 )
11 6 10 syl ( 𝜑 → ∃ 𝑦 𝑦 = 𝐵 )
12 exdistrv ( ∃ 𝑥𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) ↔ ( ∃ 𝑥 𝑥 = 𝐴 ∧ ∃ 𝑦 𝑦 = 𝐵 ) )
13 nfe1 𝑥𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 )
14 13 a1i ( 𝜑 → Ⅎ 𝑥𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) )
15 14 3 nfbid ( 𝜑 → Ⅎ 𝑥 ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) )
16 15 19.9d ( 𝜑 → ( ∃ 𝑥 ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
17 nfe1 𝑦𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 )
18 17 a1i ( 𝜑 → Ⅎ 𝑦𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) )
19 1 18 bj-nfexd ( 𝜑 → Ⅎ 𝑦𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) )
20 19 4 nfbid ( 𝜑 → Ⅎ 𝑦 ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) )
21 20 19.9d ( 𝜑 → ( ∃ 𝑦 ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
22 opeq12 ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝐴 , 𝐵 ⟩ )
23 copsexgw ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ → ( 𝜓 ↔ ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ) )
24 23 bicomd ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜓 ) )
25 24 eqcoms ( ⟨ 𝑥 , 𝑦 ⟩ = ⟨ 𝐴 , 𝐵 ⟩ → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜓 ) )
26 22 25 syl ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜓 ) )
27 26 adantl ( ( 𝜑 ∧ ( 𝑥 = 𝐴𝑦 = 𝐵 ) ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜓 ) )
28 27 7 bitrd ( ( 𝜑 ∧ ( 𝑥 = 𝐴𝑦 = 𝐵 ) ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) )
29 28 ex ( 𝜑 → ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
30 2 21 29 bj-exlimd ( 𝜑 → ( ∃ 𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
31 1 16 30 bj-exlimd ( 𝜑 → ( ∃ 𝑥𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
32 12 31 syl5bir ( 𝜑 → ( ( ∃ 𝑥 𝑥 = 𝐴 ∧ ∃ 𝑦 𝑦 = 𝐵 ) → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) ) )
33 9 11 32 mp2and ( 𝜑 → ( ∃ 𝑥𝑦 ( ⟨ 𝐴 , 𝐵 ⟩ = ⟨ 𝑥 , 𝑦 ⟩ ∧ 𝜓 ) ↔ 𝜒 ) )