Metamath Proof Explorer


Theorem wlkv0

Description: If there is a walk in the null graph (a class without vertices), it would be the pair consisting of empty sets. (Contributed by Alexander van der Vekens, 2-Sep-2018) (Revised by AV, 5-Mar-2021)

Ref Expression
Assertion wlkv0 ( ( ( Vtx ‘ 𝐺 ) = ∅ ∧ 𝑊 ∈ ( Walks ‘ 𝐺 ) ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) )

Proof

Step Hyp Ref Expression
1 wlkcpr ( 𝑊 ∈ ( Walks ‘ 𝐺 ) ↔ ( 1st𝑊 ) ( Walks ‘ 𝐺 ) ( 2nd𝑊 ) )
2 eqid ( iEdg ‘ 𝐺 ) = ( iEdg ‘ 𝐺 )
3 2 wlkf ( ( 1st𝑊 ) ( Walks ‘ 𝐺 ) ( 2nd𝑊 ) → ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) )
4 eqid ( Vtx ‘ 𝐺 ) = ( Vtx ‘ 𝐺 )
5 4 wlkp ( ( 1st𝑊 ) ( Walks ‘ 𝐺 ) ( 2nd𝑊 ) → ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) )
6 3 5 jca ( ( 1st𝑊 ) ( Walks ‘ 𝐺 ) ( 2nd𝑊 ) → ( ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) ∧ ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) ) )
7 feq3 ( ( Vtx ‘ 𝐺 ) = ∅ → ( ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) ↔ ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ∅ ) )
8 f00 ( ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ∅ ↔ ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) )
9 7 8 bitrdi ( ( Vtx ‘ 𝐺 ) = ∅ → ( ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) ↔ ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) ) )
10 0z 0 ∈ ℤ
11 nn0z ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℤ )
12 fzn ( ( 0 ∈ ℤ ∧ ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℤ ) → ( ( ♯ ‘ ( 1st𝑊 ) ) < 0 ↔ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) )
13 10 11 12 sylancr ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( ( ♯ ‘ ( 1st𝑊 ) ) < 0 ↔ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) )
14 nn0nlt0 ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ¬ ( ♯ ‘ ( 1st𝑊 ) ) < 0 )
15 14 pm2.21d ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( ( ♯ ‘ ( 1st𝑊 ) ) < 0 → ( 1st𝑊 ) = ∅ ) )
16 13 15 sylbird ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ → ( 1st𝑊 ) = ∅ ) )
17 16 com12 ( ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ → ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( 1st𝑊 ) = ∅ ) )
18 17 adantl ( ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) → ( ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 → ( 1st𝑊 ) = ∅ ) )
19 lencl ( ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) → ( ♯ ‘ ( 1st𝑊 ) ) ∈ ℕ0 )
20 18 19 impel ( ( ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) ∧ ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) ) → ( 1st𝑊 ) = ∅ )
21 simpll ( ( ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) ∧ ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) ) → ( 2nd𝑊 ) = ∅ )
22 20 21 jca ( ( ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) ∧ ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) )
23 22 ex ( ( ( 2nd𝑊 ) = ∅ ∧ ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) = ∅ ) → ( ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) ) )
24 9 23 syl6bi ( ( Vtx ‘ 𝐺 ) = ∅ → ( ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) → ( ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) ) ) )
25 24 impcomd ( ( Vtx ‘ 𝐺 ) = ∅ → ( ( ( 1st𝑊 ) ∈ Word dom ( iEdg ‘ 𝐺 ) ∧ ( 2nd𝑊 ) : ( 0 ... ( ♯ ‘ ( 1st𝑊 ) ) ) ⟶ ( Vtx ‘ 𝐺 ) ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) ) )
26 6 25 syl5 ( ( Vtx ‘ 𝐺 ) = ∅ → ( ( 1st𝑊 ) ( Walks ‘ 𝐺 ) ( 2nd𝑊 ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) ) )
27 1 26 syl5bi ( ( Vtx ‘ 𝐺 ) = ∅ → ( 𝑊 ∈ ( Walks ‘ 𝐺 ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) ) )
28 27 imp ( ( ( Vtx ‘ 𝐺 ) = ∅ ∧ 𝑊 ∈ ( Walks ‘ 𝐺 ) ) → ( ( 1st𝑊 ) = ∅ ∧ ( 2nd𝑊 ) = ∅ ) )