Metamath Proof Explorer


Theorem wspniunwspnon

Description: The set of nonempty simple paths of fixed length is the double union of the simple paths of the fixed length between different vertices. (Contributed by Alexander van der Vekens, 3-Mar-2018) (Revised by AV, 16-May-2021) (Proof shortened by AV, 15-Mar-2022)

Ref Expression
Hypothesis wspniunwspnon.v ⊢ V = Vtx ⁡ G
Assertion wspniunwspnon ⊢ N ∈ ℕ ∧ G ∈ U → N WSPathsN G = ⋃ x ∈ V ⋃ y ∈ V ∖ x x N WSPathsNOn G y

Proof

Step Hyp Ref Expression
1 wspniunwspnon.v ⊢ V = Vtx ⁡ G
2 wspthsnonn0vne ⊢ N ∈ ℕ ∧ x N WSPathsNOn G y ≠ ∅ → x ≠ y
3 2 ex ⊢ N ∈ ℕ → x N WSPathsNOn G y ≠ ∅ → x ≠ y
4 3 adantr ⊢ N ∈ ℕ ∧ G ∈ U → x N WSPathsNOn G y ≠ ∅ → x ≠ y
5 ne0i ⊢ w ∈ x N WSPathsNOn G y → x N WSPathsNOn G y ≠ ∅
6 4 5 impel ⊢ N ∈ ℕ ∧ G ∈ U ∧ w ∈ x N WSPathsNOn G y → x ≠ y
7 6 necomd ⊢ N ∈ ℕ ∧ G ∈ U ∧ w ∈ x N WSPathsNOn G y → y ≠ x
8 7 ex ⊢ N ∈ ℕ ∧ G ∈ U → w ∈ x N WSPathsNOn G y → y ≠ x
9 8 pm4.71rd ⊢ N ∈ ℕ ∧ G ∈ U → w ∈ x N WSPathsNOn G y ↔ y ≠ x ∧ w ∈ x N WSPathsNOn G y
10 9 rexbidv ⊢ N ∈ ℕ ∧ G ∈ U → ∃ y ∈ V w ∈ x N WSPathsNOn G y ↔ ∃ y ∈ V y ≠ x ∧ w ∈ x N WSPathsNOn G y
11 rexdifsn ⊢ ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y ↔ ∃ y ∈ V y ≠ x ∧ w ∈ x N WSPathsNOn G y
12 10 11 bitr4di ⊢ N ∈ ℕ ∧ G ∈ U → ∃ y ∈ V w ∈ x N WSPathsNOn G y ↔ ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y
13 12 rexbidv ⊢ N ∈ ℕ ∧ G ∈ U → ∃ x ∈ V ∃ y ∈ V w ∈ x N WSPathsNOn G y ↔ ∃ x ∈ V ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y
14 1 wspthsnwspthsnon ⊢ w ∈ N WSPathsN G ↔ ∃ x ∈ V ∃ y ∈ V w ∈ x N WSPathsNOn G y
15 vex ⊢ w ∈ V
16 eleq1w ⊢ p = w → p ∈ x N WSPathsNOn G y ↔ w ∈ x N WSPathsNOn G y
17 16 rexbidv ⊢ p = w → ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y ↔ ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y
18 17 rexbidv ⊢ p = w → ∃ x ∈ V ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y ↔ ∃ x ∈ V ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y
19 15 18 elab ⊢ w ∈ p | ∃ x ∈ V ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y ↔ ∃ x ∈ V ∃ y ∈ V ∖ x w ∈ x N WSPathsNOn G y
20 13 14 19 3bitr4g ⊢ N ∈ ℕ ∧ G ∈ U → w ∈ N WSPathsN G ↔ w ∈ p | ∃ x ∈ V ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y
21 20 eqrdv ⊢ N ∈ ℕ ∧ G ∈ U → N WSPathsN G = p | ∃ x ∈ V ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y
22 dfiunv2 ⊢ ⋃ x ∈ V ⋃ y ∈ V ∖ x x N WSPathsNOn G y = p | ∃ x ∈ V ∃ y ∈ V ∖ x p ∈ x N WSPathsNOn G y
23 21 22 eqtr4di ⊢ N ∈ ℕ ∧ G ∈ U → N WSPathsN G = ⋃ x ∈ V ⋃ y ∈ V ∖ x x N WSPathsNOn G y