Metamath Proof Explorer


Theorem elpr2elpr

Description: For an element A of an unordered pair which is a subset of a given set V , there is another (maybe the same) element b of the given set V being an element of the unordered pair. (Contributed by AV, 5-Dec-2020)

Ref Expression
Assertion elpr2elpr ( ( 𝑋𝑉𝑌𝑉𝐴 ∈ { 𝑋 , 𝑌 } ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } )

Proof

Step Hyp Ref Expression
1 simprr ( ( 𝐴 = 𝑋 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → 𝑌𝑉 )
2 preq2 ( 𝑏 = 𝑌 → { 𝐴 , 𝑏 } = { 𝐴 , 𝑌 } )
3 2 eqeq2d ( 𝑏 = 𝑌 → ( { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ↔ { 𝑋 , 𝑌 } = { 𝐴 , 𝑌 } ) )
4 3 adantl ( ( ( 𝐴 = 𝑋 ∧ ( 𝑋𝑉𝑌𝑉 ) ) ∧ 𝑏 = 𝑌 ) → ( { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ↔ { 𝑋 , 𝑌 } = { 𝐴 , 𝑌 } ) )
5 preq1 ( 𝑋 = 𝐴 → { 𝑋 , 𝑌 } = { 𝐴 , 𝑌 } )
6 5 eqcoms ( 𝐴 = 𝑋 → { 𝑋 , 𝑌 } = { 𝐴 , 𝑌 } )
7 6 adantr ( ( 𝐴 = 𝑋 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → { 𝑋 , 𝑌 } = { 𝐴 , 𝑌 } )
8 1 4 7 rspcedvd ( ( 𝐴 = 𝑋 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } )
9 8 ex ( 𝐴 = 𝑋 → ( ( 𝑋𝑉𝑌𝑉 ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ) )
10 simprl ( ( 𝐴 = 𝑌 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → 𝑋𝑉 )
11 preq2 ( 𝑏 = 𝑋 → { 𝐴 , 𝑏 } = { 𝐴 , 𝑋 } )
12 11 eqeq2d ( 𝑏 = 𝑋 → ( { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ↔ { 𝑋 , 𝑌 } = { 𝐴 , 𝑋 } ) )
13 12 adantl ( ( ( 𝐴 = 𝑌 ∧ ( 𝑋𝑉𝑌𝑉 ) ) ∧ 𝑏 = 𝑋 ) → ( { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ↔ { 𝑋 , 𝑌 } = { 𝐴 , 𝑋 } ) )
14 preq2 ( 𝑌 = 𝐴 → { 𝑋 , 𝑌 } = { 𝑋 , 𝐴 } )
15 14 eqcoms ( 𝐴 = 𝑌 → { 𝑋 , 𝑌 } = { 𝑋 , 𝐴 } )
16 prcom { 𝑋 , 𝐴 } = { 𝐴 , 𝑋 }
17 15 16 eqtrdi ( 𝐴 = 𝑌 → { 𝑋 , 𝑌 } = { 𝐴 , 𝑋 } )
18 17 adantr ( ( 𝐴 = 𝑌 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → { 𝑋 , 𝑌 } = { 𝐴 , 𝑋 } )
19 10 13 18 rspcedvd ( ( 𝐴 = 𝑌 ∧ ( 𝑋𝑉𝑌𝑉 ) ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } )
20 19 ex ( 𝐴 = 𝑌 → ( ( 𝑋𝑉𝑌𝑉 ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ) )
21 9 20 jaoi ( ( 𝐴 = 𝑋𝐴 = 𝑌 ) → ( ( 𝑋𝑉𝑌𝑉 ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ) )
22 elpri ( 𝐴 ∈ { 𝑋 , 𝑌 } → ( 𝐴 = 𝑋𝐴 = 𝑌 ) )
23 21 22 syl11 ( ( 𝑋𝑉𝑌𝑉 ) → ( 𝐴 ∈ { 𝑋 , 𝑌 } → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } ) )
24 23 3impia ( ( 𝑋𝑉𝑌𝑉𝐴 ∈ { 𝑋 , 𝑌 } ) → ∃ 𝑏𝑉 { 𝑋 , 𝑌 } = { 𝐴 , 𝑏 } )