# Metamath Proof Explorer

## Theorem xpnz

Description: The Cartesian product of nonempty classes is nonempty. (Variation of a theorem contributed by Raph Levien, 30-Jun-2006.) (Contributed by NM, 30-Jun-2006)

Ref Expression
Assertion xpnz ${⊢}\left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)↔{A}×{B}\ne \varnothing$

### Proof

Step Hyp Ref Expression
1 n0 ${⊢}{A}\ne \varnothing ↔\exists {x}\phantom{\rule{.4em}{0ex}}{x}\in {A}$
2 n0 ${⊢}{B}\ne \varnothing ↔\exists {y}\phantom{\rule{.4em}{0ex}}{y}\in {B}$
3 1 2 anbi12i ${⊢}\left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)↔\left(\exists {x}\phantom{\rule{.4em}{0ex}}{x}\in {A}\wedge \exists {y}\phantom{\rule{.4em}{0ex}}{y}\in {B}\right)$
4 exdistrv ${⊢}\exists {x}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\left({x}\in {A}\wedge {y}\in {B}\right)↔\left(\exists {x}\phantom{\rule{.4em}{0ex}}{x}\in {A}\wedge \exists {y}\phantom{\rule{.4em}{0ex}}{y}\in {B}\right)$
5 3 4 bitr4i ${⊢}\left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)↔\exists {x}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\left({x}\in {A}\wedge {y}\in {B}\right)$
6 opex ${⊢}⟨{x},{y}⟩\in \mathrm{V}$
7 eleq1 ${⊢}{z}=⟨{x},{y}⟩\to \left({z}\in \left({A}×{B}\right)↔⟨{x},{y}⟩\in \left({A}×{B}\right)\right)$
8 opelxp ${⊢}⟨{x},{y}⟩\in \left({A}×{B}\right)↔\left({x}\in {A}\wedge {y}\in {B}\right)$
9 7 8 syl6bb ${⊢}{z}=⟨{x},{y}⟩\to \left({z}\in \left({A}×{B}\right)↔\left({x}\in {A}\wedge {y}\in {B}\right)\right)$
10 6 9 spcev ${⊢}\left({x}\in {A}\wedge {y}\in {B}\right)\to \exists {z}\phantom{\rule{.4em}{0ex}}{z}\in \left({A}×{B}\right)$
11 n0 ${⊢}{A}×{B}\ne \varnothing ↔\exists {z}\phantom{\rule{.4em}{0ex}}{z}\in \left({A}×{B}\right)$
12 10 11 sylibr ${⊢}\left({x}\in {A}\wedge {y}\in {B}\right)\to {A}×{B}\ne \varnothing$
13 12 exlimivv ${⊢}\exists {x}\phantom{\rule{.4em}{0ex}}\exists {y}\phantom{\rule{.4em}{0ex}}\left({x}\in {A}\wedge {y}\in {B}\right)\to {A}×{B}\ne \varnothing$
14 5 13 sylbi ${⊢}\left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)\to {A}×{B}\ne \varnothing$
15 xpeq1 ${⊢}{A}=\varnothing \to {A}×{B}=\varnothing ×{B}$
16 0xp ${⊢}\varnothing ×{B}=\varnothing$
17 15 16 syl6eq ${⊢}{A}=\varnothing \to {A}×{B}=\varnothing$
18 17 necon3i ${⊢}{A}×{B}\ne \varnothing \to {A}\ne \varnothing$
19 xpeq2 ${⊢}{B}=\varnothing \to {A}×{B}={A}×\varnothing$
20 xp0 ${⊢}{A}×\varnothing =\varnothing$
21 19 20 syl6eq ${⊢}{B}=\varnothing \to {A}×{B}=\varnothing$
22 21 necon3i ${⊢}{A}×{B}\ne \varnothing \to {B}\ne \varnothing$
23 18 22 jca ${⊢}{A}×{B}\ne \varnothing \to \left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)$
24 14 23 impbii ${⊢}\left({A}\ne \varnothing \wedge {B}\ne \varnothing \right)↔{A}×{B}\ne \varnothing$