Metamath Proof Explorer


Theorem uniprg

Description: The union of a pair is the union of its members. Proposition 5.7 of TakeutiZaring p. 16. (Contributed by NM, 25-Aug-2006) Avoid using unipr to prove it from uniprg . (Revised by BJ, 1-Sep-2024)

Ref Expression
Assertion uniprg ( ( 𝐴𝑉𝐵𝑊 ) → { 𝐴 , 𝐵 } = ( 𝐴𝐵 ) )

Proof

Step Hyp Ref Expression
1 vex 𝑦 ∈ V
2 1 elpr ( 𝑦 ∈ { 𝐴 , 𝐵 } ↔ ( 𝑦 = 𝐴𝑦 = 𝐵 ) )
3 2 anbi2i ( ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) ↔ ( 𝑥𝑦 ∧ ( 𝑦 = 𝐴𝑦 = 𝐵 ) ) )
4 ancom ( ( 𝑥𝑦 ∧ ( 𝑦 = 𝐴𝑦 = 𝐵 ) ) ↔ ( ( 𝑦 = 𝐴𝑦 = 𝐵 ) ∧ 𝑥𝑦 ) )
5 andir ( ( ( 𝑦 = 𝐴𝑦 = 𝐵 ) ∧ 𝑥𝑦 ) ↔ ( ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ( 𝑦 = 𝐵𝑥𝑦 ) ) )
6 4 5 bitri ( ( 𝑥𝑦 ∧ ( 𝑦 = 𝐴𝑦 = 𝐵 ) ) ↔ ( ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ( 𝑦 = 𝐵𝑥𝑦 ) ) )
7 3 6 bitri ( ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) ↔ ( ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ( 𝑦 = 𝐵𝑥𝑦 ) ) )
8 7 exbii ( ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) ↔ ∃ 𝑦 ( ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ( 𝑦 = 𝐵𝑥𝑦 ) ) )
9 19.43 ( ∃ 𝑦 ( ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ( 𝑦 = 𝐵𝑥𝑦 ) ) ↔ ( ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ) )
10 8 9 bitri ( ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) ↔ ( ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ) )
11 clel3g ( 𝐴𝑉 → ( 𝑥𝐴 ↔ ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ) )
12 11 bicomd ( 𝐴𝑉 → ( ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ↔ 𝑥𝐴 ) )
13 12 adantr ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ↔ 𝑥𝐴 ) )
14 clel3g ( 𝐵𝑊 → ( 𝑥𝐵 ↔ ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ) )
15 14 bicomd ( 𝐵𝑊 → ( ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ↔ 𝑥𝐵 ) )
16 15 adantl ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ↔ 𝑥𝐵 ) )
17 13 16 orbi12d ( ( 𝐴𝑉𝐵𝑊 ) → ( ( ∃ 𝑦 ( 𝑦 = 𝐴𝑥𝑦 ) ∨ ∃ 𝑦 ( 𝑦 = 𝐵𝑥𝑦 ) ) ↔ ( 𝑥𝐴𝑥𝐵 ) ) )
18 10 17 bitrid ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) ↔ ( 𝑥𝐴𝑥𝐵 ) ) )
19 18 abbidv ( ( 𝐴𝑉𝐵𝑊 ) → { 𝑥 ∣ ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) } = { 𝑥 ∣ ( 𝑥𝐴𝑥𝐵 ) } )
20 df-uni { 𝐴 , 𝐵 } = { 𝑥 ∣ ∃ 𝑦 ( 𝑥𝑦𝑦 ∈ { 𝐴 , 𝐵 } ) }
21 df-un ( 𝐴𝐵 ) = { 𝑥 ∣ ( 𝑥𝐴𝑥𝐵 ) }
22 19 20 21 3eqtr4g ( ( 𝐴𝑉𝐵𝑊 ) → { 𝐴 , 𝐵 } = ( 𝐴𝐵 ) )