Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  wwlkext2clwwlk Structured version   Visualization version   GIF version

Theorem wwlkext2clwwlk 26331
 Description: If a word represents a walk in (in a graph) and there are edges between the last vertex of the word and another vertex and between this other vertex and the first vertex of the word, then the concatenation of the word representing the walk with this other vertex represents a closed walk. (Contributed by Alexander van der Vekens, 3-Oct-2018.)
Assertion
Ref Expression
wwlkext2clwwlk ((𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∧ 𝑍𝑉𝑁 ∈ ℕ0) → (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → (𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2))))

Proof of Theorem wwlkext2clwwlk
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 wwlknprop 26214 . . 3 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → ((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)))
2 simplrr 797 . . . . . . . 8 ((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) → 𝑊 ∈ Word 𝑉)
3 s1cl 13235 . . . . . . . . 9 (𝑍𝑉 → ⟨“𝑍”⟩ ∈ Word 𝑉)
43adantr 480 . . . . . . . 8 ((𝑍𝑉𝑁 ∈ ℕ0) → ⟨“𝑍”⟩ ∈ Word 𝑉)
5 ccatcl 13212 . . . . . . . 8 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉) → (𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉)
62, 4, 5syl2an 493 . . . . . . 7 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉)
76adantr 480 . . . . . 6 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → (𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉)
8 wwlknimp 26215 . . . . . . . . . . 11 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸))
9 simpll 786 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑊 ∈ Word 𝑉)
109adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑊 ∈ Word 𝑉)
114ad2antlr 759 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → ⟨“𝑍”⟩ ∈ Word 𝑉)
12 elfzo0 12376 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (𝑖 ∈ (0..^𝑁) ↔ (𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁))
13 simp1 1054 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑖 ∈ ℕ0)
14 peano2nn 10909 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 (𝑁 ∈ ℕ → (𝑁 + 1) ∈ ℕ)
15143ad2ant2 1076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → (𝑁 + 1) ∈ ℕ)
16 nn0re 11178 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝑖 ∈ ℕ0𝑖 ∈ ℝ)
17163ad2ant1 1075 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑖 ∈ ℝ)
18 nnre 10904 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝑁 ∈ ℕ → 𝑁 ∈ ℝ)
19183ad2ant2 1076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑁 ∈ ℝ)
20 peano2re 10088 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 (𝑁 ∈ ℝ → (𝑁 + 1) ∈ ℝ)
2118, 20syl 17 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝑁 ∈ ℕ → (𝑁 + 1) ∈ ℝ)
22213ad2ant2 1076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → (𝑁 + 1) ∈ ℝ)
23 simp3 1056 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑖 < 𝑁)
2418ltp1d 10833 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 (𝑁 ∈ ℕ → 𝑁 < (𝑁 + 1))
25243ad2ant2 1076 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑁 < (𝑁 + 1))
2617, 19, 22, 23, 25lttrd 10077 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑖 < (𝑁 + 1))
27 elfzo0 12376 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (𝑖 ∈ (0..^(𝑁 + 1)) ↔ (𝑖 ∈ ℕ0 ∧ (𝑁 + 1) ∈ ℕ ∧ 𝑖 < (𝑁 + 1)))
2813, 15, 26, 27syl3anbrc 1239 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑖 ∈ ℕ0𝑁 ∈ ℕ ∧ 𝑖 < 𝑁) → 𝑖 ∈ (0..^(𝑁 + 1)))
2912, 28sylbi 206 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑖 ∈ (0..^𝑁) → 𝑖 ∈ (0..^(𝑁 + 1)))
3029adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑖 ∈ (0..^(𝑁 + 1)))
31 oveq2 6557 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((#‘𝑊) = (𝑁 + 1) → (0..^(#‘𝑊)) = (0..^(𝑁 + 1)))
3231adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (0..^(#‘𝑊)) = (0..^(𝑁 + 1)))
3332eleq2d 2673 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (𝑖 ∈ (0..^(#‘𝑊)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
3433adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (𝑖 ∈ (0..^(#‘𝑊)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
3534adantr 480 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 ∈ (0..^(#‘𝑊)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
3630, 35mpbird 246 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑖 ∈ (0..^(#‘𝑊)))
37 ccatval1 13214 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉𝑖 ∈ (0..^(#‘𝑊))) → ((𝑊 ++ ⟨“𝑍”⟩)‘𝑖) = (𝑊𝑖))
3810, 11, 36, 37syl3anc 1318 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑊 ++ ⟨“𝑍”⟩)‘𝑖) = (𝑊𝑖))
3938eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑊𝑖) = ((𝑊 ++ ⟨“𝑍”⟩)‘𝑖))
40 fzonn0p1p1 12413 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑖 ∈ (0..^𝑁) → (𝑖 + 1) ∈ (0..^(𝑁 + 1)))
4140adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 + 1) ∈ (0..^(𝑁 + 1)))
4231eleq2d 2673 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((#‘𝑊) = (𝑁 + 1) → ((𝑖 + 1) ∈ (0..^(#‘𝑊)) ↔ (𝑖 + 1) ∈ (0..^(𝑁 + 1))))
4342ad3antlr 763 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑖 + 1) ∈ (0..^(#‘𝑊)) ↔ (𝑖 + 1) ∈ (0..^(𝑁 + 1))))
4441, 43mpbird 246 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 + 1) ∈ (0..^(#‘𝑊)))
45 ccatval1 13214 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉 ∧ (𝑖 + 1) ∈ (0..^(#‘𝑊))) → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1)) = (𝑊‘(𝑖 + 1)))
4610, 11, 44, 45syl3anc 1318 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1)) = (𝑊‘(𝑖 + 1)))
4746eqcomd 2616 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑊‘(𝑖 + 1)) = ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1)))
4839, 47preq12d 4220 . . . . . . . . . . . . . . . . . . . . . . . 24 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → {(𝑊𝑖), (𝑊‘(𝑖 + 1))} = {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))})
4948eleq1d 2672 . . . . . . . . . . . . . . . . . . . . . . 23 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ 𝑖 ∈ (0..^𝑁)) → ({(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5049ralbidva 2968 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5150biimpd 218 . . . . . . . . . . . . . . . . . . . . 21 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5251ex 449 . . . . . . . . . . . . . . . . . . . 20 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((𝑍𝑉𝑁 ∈ ℕ0) → (∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)))
5352com23 84 . . . . . . . . . . . . . . . . . . 19 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸 → ((𝑍𝑉𝑁 ∈ ℕ0) → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)))
54533impia 1253 . . . . . . . . . . . . . . . . . 18 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → ((𝑍𝑉𝑁 ∈ ℕ0) → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5554com12 32 . . . . . . . . . . . . . . . . 17 ((𝑍𝑉𝑁 ∈ ℕ0) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5655adantr 480 . . . . . . . . . . . . . . . 16 (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
5756impcom 445 . . . . . . . . . . . . . . 15 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
58 oveq1 6556 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((#‘𝑊) = (𝑁 + 1) → ((#‘𝑊) − 1) = ((𝑁 + 1) − 1))
5958ad2antlr 759 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((#‘𝑊) − 1) = ((𝑁 + 1) − 1))
60 nn0cn 11179 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
6160ad2antll 761 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑁 ∈ ℂ)
62 pncan1 10333 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝑁 ∈ ℂ → ((𝑁 + 1) − 1) = 𝑁)
6361, 62syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((𝑁 + 1) − 1) = 𝑁)
6459, 63eqtr2d 2645 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑁 = ((#‘𝑊) − 1))
6564fveq2d 6107 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((𝑊 ++ ⟨“𝑍”⟩)‘𝑁) = ((𝑊 ++ ⟨“𝑍”⟩)‘((#‘𝑊) − 1)))
664adantl 481 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ⟨“𝑍”⟩ ∈ Word 𝑉)
67 nn0p1gt0 11199 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (𝑁 ∈ ℕ0 → 0 < (𝑁 + 1))
6867ad2antll 761 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 0 < (𝑁 + 1))
69 breq2 4587 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((#‘𝑊) = (𝑁 + 1) → (0 < (#‘𝑊) ↔ 0 < (𝑁 + 1)))
7069ad2antlr 759 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (0 < (#‘𝑊) ↔ 0 < (𝑁 + 1)))
7168, 70mpbird 246 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 0 < (#‘𝑊))
72 hashneq0 13016 . . . . . . . . . . . . . . . . . . . . . . . . 25 (𝑊 ∈ Word 𝑉 → (0 < (#‘𝑊) ↔ 𝑊 ≠ ∅))
739, 72syl 17 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (0 < (#‘𝑊) ↔ 𝑊 ≠ ∅))
7471, 73mpbid 221 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑊 ≠ ∅)
75 ccatval1lsw 13221 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉𝑊 ≠ ∅) → ((𝑊 ++ ⟨“𝑍”⟩)‘((#‘𝑊) − 1)) = ( lastS ‘𝑊))
769, 66, 74, 75syl3anc 1318 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((𝑊 ++ ⟨“𝑍”⟩)‘((#‘𝑊) − 1)) = ( lastS ‘𝑊))
7765, 76eqtr2d 2645 . . . . . . . . . . . . . . . . . . . . 21 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ( lastS ‘𝑊) = ((𝑊 ++ ⟨“𝑍”⟩)‘𝑁))
78 fveq2 6103 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑁 + 1) = (#‘𝑊) → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1)) = ((𝑊 ++ ⟨“𝑍”⟩)‘(#‘𝑊)))
7978eqcoms 2618 . . . . . . . . . . . . . . . . . . . . . . 23 ((#‘𝑊) = (𝑁 + 1) → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1)) = ((𝑊 ++ ⟨“𝑍”⟩)‘(#‘𝑊)))
8079ad2antlr 759 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1)) = ((𝑊 ++ ⟨“𝑍”⟩)‘(#‘𝑊)))
81 ccatws1ls 13262 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑊 ∈ Word 𝑉𝑍𝑉) → ((𝑊 ++ ⟨“𝑍”⟩)‘(#‘𝑊)) = 𝑍)
8281ad2ant2r 779 . . . . . . . . . . . . . . . . . . . . . 22 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((𝑊 ++ ⟨“𝑍”⟩)‘(#‘𝑊)) = 𝑍)
8380, 82eqtr2d 2645 . . . . . . . . . . . . . . . . . . . . 21 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑍 = ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1)))
8477, 83preq12d 4220 . . . . . . . . . . . . . . . . . . . 20 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {( lastS ‘𝑊), 𝑍} = {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))})
85843adantl3 1212 . . . . . . . . . . . . . . . . . . 19 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {( lastS ‘𝑊), 𝑍} = {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))})
8685eleq1d 2672 . . . . . . . . . . . . . . . . . 18 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ↔ {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸))
8786biimpd 218 . . . . . . . . . . . . . . . . 17 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 → {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸))
8887impr 647 . . . . . . . . . . . . . . . 16 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸)
89 simprlr 799 . . . . . . . . . . . . . . . . 17 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → 𝑁 ∈ ℕ0)
90 fveq2 6103 . . . . . . . . . . . . . . . . . . . 20 (𝑖 = 𝑁 → ((𝑊 ++ ⟨“𝑍”⟩)‘𝑖) = ((𝑊 ++ ⟨“𝑍”⟩)‘𝑁))
91 oveq1 6556 . . . . . . . . . . . . . . . . . . . . 21 (𝑖 = 𝑁 → (𝑖 + 1) = (𝑁 + 1))
9291fveq2d 6107 . . . . . . . . . . . . . . . . . . . 20 (𝑖 = 𝑁 → ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1)) = ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1)))
9390, 92preq12d 4220 . . . . . . . . . . . . . . . . . . 19 (𝑖 = 𝑁 → {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} = {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))})
9493eleq1d 2672 . . . . . . . . . . . . . . . . . 18 (𝑖 = 𝑁 → ({((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸))
9594ralsng 4165 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℕ0 → (∀𝑖 ∈ {𝑁} {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸))
9689, 95syl 17 . . . . . . . . . . . . . . . 16 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (∀𝑖 ∈ {𝑁} {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ {((𝑊 ++ ⟨“𝑍”⟩)‘𝑁), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑁 + 1))} ∈ ran 𝐸))
9788, 96mpbird 246 . . . . . . . . . . . . . . 15 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ∀𝑖 ∈ {𝑁} {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
98 ralunb 3756 . . . . . . . . . . . . . . 15 (∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ (∀𝑖 ∈ (0..^𝑁){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ ∀𝑖 ∈ {𝑁} {((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
9957, 97, 98sylanbrc 695 . . . . . . . . . . . . . 14 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
100 elnn0uz 11601 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
101100biimpi 205 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
102101ad2antlr 759 . . . . . . . . . . . . . . . . 17 (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → 𝑁 ∈ (ℤ‘0))
103102adantl 481 . . . . . . . . . . . . . . . 16 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → 𝑁 ∈ (ℤ‘0))
104 fzosplitsn 12442 . . . . . . . . . . . . . . . 16 (𝑁 ∈ (ℤ‘0) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
105103, 104syl 17 . . . . . . . . . . . . . . 15 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
106105raleqdv 3121 . . . . . . . . . . . . . 14 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
10799, 106mpbird 246 . . . . . . . . . . . . 13 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
108 simp1 1054 . . . . . . . . . . . . . . . . . 18 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → 𝑊 ∈ Word 𝑉)
109 simpll 786 . . . . . . . . . . . . . . . . . 18 (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → 𝑍𝑉)
110 ccatws1len 13251 . . . . . . . . . . . . . . . . . 18 ((𝑊 ∈ Word 𝑉𝑍𝑉) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = ((#‘𝑊) + 1))
111108, 109, 110syl2an 493 . . . . . . . . . . . . . . . . 17 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = ((#‘𝑊) + 1))
112111oveq1d 6564 . . . . . . . . . . . . . . . 16 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1) = (((#‘𝑊) + 1) − 1))
113 oveq1 6556 . . . . . . . . . . . . . . . . . . . . . . 23 ((#‘𝑊) = (𝑁 + 1) → ((#‘𝑊) + 1) = ((𝑁 + 1) + 1))
114113oveq1d 6564 . . . . . . . . . . . . . . . . . . . . . 22 ((#‘𝑊) = (𝑁 + 1) → (((#‘𝑊) + 1) − 1) = (((𝑁 + 1) + 1) − 1))
115 ax-1cn 9873 . . . . . . . . . . . . . . . . . . . . . . 23 1 ∈ ℂ
116 addcl 9897 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑁 ∈ ℂ ∧ 1 ∈ ℂ) → (𝑁 + 1) ∈ ℂ)
117 simpr 476 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑁 ∈ ℂ ∧ 1 ∈ ℂ) → 1 ∈ ℂ)
118116, 117pncand 10272 . . . . . . . . . . . . . . . . . . . . . . 23 ((𝑁 ∈ ℂ ∧ 1 ∈ ℂ) → (((𝑁 + 1) + 1) − 1) = (𝑁 + 1))
11960, 115, 118sylancl 693 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → (((𝑁 + 1) + 1) − 1) = (𝑁 + 1))
120114, 119sylan9eqr 2666 . . . . . . . . . . . . . . . . . . . . 21 ((𝑁 ∈ ℕ0 ∧ (#‘𝑊) = (𝑁 + 1)) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1))
121120ex 449 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → ((#‘𝑊) = (𝑁 + 1) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1)))
122121ad2antlr 759 . . . . . . . . . . . . . . . . . . 19 (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → ((#‘𝑊) = (𝑁 + 1) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1)))
123122com12 32 . . . . . . . . . . . . . . . . . 18 ((#‘𝑊) = (𝑁 + 1) → (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1)))
1241233ad2ant2 1076 . . . . . . . . . . . . . . . . 17 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → (((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1)))
125124imp 444 . . . . . . . . . . . . . . . 16 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (((#‘𝑊) + 1) − 1) = (𝑁 + 1))
126112, 125eqtrd 2644 . . . . . . . . . . . . . . 15 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1) = (𝑁 + 1))
127126oveq2d 6565 . . . . . . . . . . . . . 14 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)) = (0..^(𝑁 + 1)))
128127raleqdv 3121 . . . . . . . . . . . . 13 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → (∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ↔ ∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
129107, 128mpbird 246 . . . . . . . . . . . 12 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) ∧ ((𝑍𝑉𝑁 ∈ ℕ0) ∧ {( lastS ‘𝑊), 𝑍} ∈ ran 𝐸)) → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
130129exp32 629 . . . . . . . . . . 11 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ ran 𝐸) → ((𝑍𝑉𝑁 ∈ ℕ0) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)))
1318, 130syl 17 . . . . . . . . . 10 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → ((𝑍𝑉𝑁 ∈ ℕ0) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)))
132131adantl 481 . . . . . . . . 9 ((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) → ((𝑍𝑉𝑁 ∈ ℕ0) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)))
133132imp 444 . . . . . . . 8 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
134133adantrd 483 . . . . . . 7 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸))
135134imp 444 . . . . . 6 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸)
136 wwlknimpb 26232 . . . . . . . . . . . . 13 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)))
137 simpll 786 . . . . . . . . . . . . . . . . . . . 20 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) → 𝑊 ∈ Word 𝑉)
138 simpl 472 . . . . . . . . . . . . . . . . . . . 20 ((𝑍𝑉𝑁 ∈ ℕ0) → 𝑍𝑉)
139 lswccats1 13263 . . . . . . . . . . . . . . . . . . . 20 ((𝑊 ∈ Word 𝑉𝑍𝑉) → ( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)) = 𝑍)
140137, 138, 139syl2an 493 . . . . . . . . . . . . . . . . . . 19 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)) = 𝑍)
141140eqcomd 2616 . . . . . . . . . . . . . . . . . 18 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑍 = ( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)))
142137adantr 480 . . . . . . . . . . . . . . . . . . 19 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 𝑊 ∈ Word 𝑉)
1434adantl 481 . . . . . . . . . . . . . . . . . . 19 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ⟨“𝑍”⟩ ∈ Word 𝑉)
14467adantl 481 . . . . . . . . . . . . . . . . . . . . 21 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) → 0 < (𝑁 + 1))
14569ad2antlr 759 . . . . . . . . . . . . . . . . . . . . 21 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) → (0 < (#‘𝑊) ↔ 0 < (𝑁 + 1)))
146144, 145mpbird 246 . . . . . . . . . . . . . . . . . . . 20 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) → 0 < (#‘𝑊))
147146adantr 480 . . . . . . . . . . . . . . . . . . 19 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → 0 < (#‘𝑊))
148 ccatfv0 13220 . . . . . . . . . . . . . . . . . . . 20 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉 ∧ 0 < (#‘𝑊)) → ((𝑊 ++ ⟨“𝑍”⟩)‘0) = (𝑊‘0))
149148eqcomd 2616 . . . . . . . . . . . . . . . . . . 19 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑍”⟩ ∈ Word 𝑉 ∧ 0 < (#‘𝑊)) → (𝑊‘0) = ((𝑊 ++ ⟨“𝑍”⟩)‘0))
150142, 143, 147, 149syl3anc 1318 . . . . . . . . . . . . . . . . . 18 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (𝑊‘0) = ((𝑊 ++ ⟨“𝑍”⟩)‘0))
151141, 150preq12d 4220 . . . . . . . . . . . . . . . . 17 ((((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ 𝑁 ∈ ℕ0) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})
152151exp31 628 . . . . . . . . . . . . . . . 16 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (𝑁 ∈ ℕ0 → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})))
153152com12 32 . . . . . . . . . . . . . . 15 (𝑁 ∈ ℕ0 → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})))
154153adantr 480 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})))
155154adantl 481 . . . . . . . . . . . . 13 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})))
156136, 155syl5com 31 . . . . . . . . . . . 12 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})))
157156impcom 445 . . . . . . . . . . 11 ((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) → ((𝑍𝑉𝑁 ∈ ℕ0) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)}))
158157imp 444 . . . . . . . . . 10 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {𝑍, (𝑊‘0)} = {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)})
159158eleq1d 2672 . . . . . . . . 9 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ({𝑍, (𝑊‘0)} ∈ ran 𝐸 ↔ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸))
160159biimpcd 238 . . . . . . . 8 ({𝑍, (𝑊‘0)} ∈ ran 𝐸 → (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸))
161160adantl 481 . . . . . . 7 (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸))
162161impcom 445 . . . . . 6 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸)
1637, 135, 1623jca 1235 . . . . 5 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸))
164110ad2ant2r 779 . . . . . . . . . . 11 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = ((#‘𝑊) + 1))
165113adantl 481 . . . . . . . . . . . 12 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((#‘𝑊) + 1) = ((𝑁 + 1) + 1))
166115a1i 11 . . . . . . . . . . . . . . 15 (𝑁 ∈ ℕ0 → 1 ∈ ℂ)
16760, 166, 166addassd 9941 . . . . . . . . . . . . . 14 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + (1 + 1)))
168 1p1e2 11011 . . . . . . . . . . . . . . 15 (1 + 1) = 2
169168oveq2i 6560 . . . . . . . . . . . . . 14 (𝑁 + (1 + 1)) = (𝑁 + 2)
170167, 169syl6eq 2660 . . . . . . . . . . . . 13 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + 2))
171170adantl 481 . . . . . . . . . . . 12 ((𝑍𝑉𝑁 ∈ ℕ0) → ((𝑁 + 1) + 1) = (𝑁 + 2))
172165, 171sylan9eq 2664 . . . . . . . . . . 11 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → ((#‘𝑊) + 1) = (𝑁 + 2))
173164, 172eqtrd 2644 . . . . . . . . . 10 (((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))
174173ex 449 . . . . . . . . 9 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → ((𝑍𝑉𝑁 ∈ ℕ0) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2)))
175136, 174syl 17 . . . . . . . 8 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → ((𝑍𝑉𝑁 ∈ ℕ0) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2)))
176175adantl 481 . . . . . . 7 ((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) → ((𝑍𝑉𝑁 ∈ ℕ0) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2)))
177176imp 444 . . . . . 6 (((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))
178177adantr 480 . . . . 5 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))
179 id 22 . . . . . . . . . . . 12 (𝑁 ∈ ℕ0𝑁 ∈ ℕ0)
180 2nn0 11186 . . . . . . . . . . . . 13 2 ∈ ℕ0
181180a1i 11 . . . . . . . . . . . 12 (𝑁 ∈ ℕ0 → 2 ∈ ℕ0)
182179, 181nn0addcld 11232 . . . . . . . . . . 11 (𝑁 ∈ ℕ0 → (𝑁 + 2) ∈ ℕ0)
183182adantr 480 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑁 + 2) ∈ ℕ0)
184183anim2i 591 . . . . . . . . 9 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 + 2) ∈ ℕ0))
185 df-3an 1033 . . . . . . . . 9 ((𝑉 ∈ V ∧ 𝐸 ∈ V ∧ (𝑁 + 2) ∈ ℕ0) ↔ ((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 + 2) ∈ ℕ0))
186184, 185sylibr 223 . . . . . . . 8 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → (𝑉 ∈ V ∧ 𝐸 ∈ V ∧ (𝑁 + 2) ∈ ℕ0))
187 isclwwlkn 26297 . . . . . . . 8 ((𝑉 ∈ V ∧ 𝐸 ∈ V ∧ (𝑁 + 2) ∈ ℕ0) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)) ↔ ((𝑊 ++ ⟨“𝑍”⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))))
188186, 187syl 17 . . . . . . 7 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)) ↔ ((𝑊 ++ ⟨“𝑍”⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))))
189 isclwwlk 26296 . . . . . . . . 9 ((𝑉 ∈ V ∧ 𝐸 ∈ V) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ (𝑉 ClWWalks 𝐸) ↔ ((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸)))
190189adantr 480 . . . . . . . 8 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ (𝑉 ClWWalks 𝐸) ↔ ((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸)))
191190anbi1d 737 . . . . . . 7 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → (((𝑊 ++ ⟨“𝑍”⟩) ∈ (𝑉 ClWWalks 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2)) ↔ (((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))))
192188, 191bitrd 267 . . . . . 6 (((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)) ↔ (((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))))
193192ad3antrrr 762 . . . . 5 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → ((𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)) ↔ (((𝑊 ++ ⟨“𝑍”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((#‘(𝑊 ++ ⟨“𝑍”⟩)) − 1)){((𝑊 ++ ⟨“𝑍”⟩)‘𝑖), ((𝑊 ++ ⟨“𝑍”⟩)‘(𝑖 + 1))} ∈ ran 𝐸 ∧ {( lastS ‘(𝑊 ++ ⟨“𝑍”⟩)), ((𝑊 ++ ⟨“𝑍”⟩)‘0)} ∈ ran 𝐸) ∧ (#‘(𝑊 ++ ⟨“𝑍”⟩)) = (𝑁 + 2))))
194163, 178, 193mpbir2and 959 . . . 4 ((((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) ∧ (𝑍𝑉𝑁 ∈ ℕ0)) ∧ ({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸)) → (𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)))
195194exp31 628 . . 3 ((((𝑉 ∈ V ∧ 𝐸 ∈ V) ∧ (𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉)) ∧ 𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁)) → ((𝑍𝑉𝑁 ∈ ℕ0) → (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → (𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)))))
1961, 195mpancom 700 . 2 (𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) → ((𝑍𝑉𝑁 ∈ ℕ0) → (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → (𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2)))))
1971963impib 1254 1 ((𝑊 ∈ ((𝑉 WWalksN 𝐸)‘𝑁) ∧ 𝑍𝑉𝑁 ∈ ℕ0) → (({( lastS ‘𝑊), 𝑍} ∈ ran 𝐸 ∧ {𝑍, (𝑊‘0)} ∈ ran 𝐸) → (𝑊 ++ ⟨“𝑍”⟩) ∈ ((𝑉 ClWWalksN 𝐸)‘(𝑁 + 2))))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 195   ∧ wa 383   ∧ w3a 1031   = wceq 1475   ∈ wcel 1977   ≠ wne 2780  ∀wral 2896  Vcvv 3173   ∪ cun 3538  ∅c0 3874  {csn 4125  {cpr 4127   class class class wbr 4583  ran crn 5039  ‘cfv 5804  (class class class)co 6549  ℂcc 9813  ℝcr 9814  0cc0 9815  1c1 9816   + caddc 9818   < clt 9953   − cmin 10145  ℕcn 10897  2c2 10947  ℕ0cn0 11169  ℤ≥cuz 11563  ..^cfzo 12334  #chash 12979  Word cword 13146   lastS clsw 13147   ++ cconcat 13148  ⟨“cs1 13149   WWalksN cwwlkn 26206   ClWWalks cclwwlk 26276   ClWWalksN cclwwlkn 26277 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847  ax-cnex 9871  ax-resscn 9872  ax-1cn 9873  ax-icn 9874  ax-addcl 9875  ax-addrcl 9876  ax-mulcl 9877  ax-mulrcl 9878  ax-mulcom 9879  ax-addass 9880  ax-mulass 9881  ax-distr 9882  ax-i2m1 9883  ax-1ne0 9884  ax-1rid 9885  ax-rnegex 9886  ax-rrecex 9887  ax-cnre 9888  ax-pre-lttri 9889  ax-pre-lttrn 9890  ax-pre-ltadd 9891  ax-pre-mulgt0 9892 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3or 1032  df-3an 1033  df-tru 1478  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-nel 2783  df-ral 2901  df-rex 2902  df-reu 2903  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-pss 3556  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-tp 4130  df-op 4132  df-uni 4373  df-int 4411  df-iun 4457  df-br 4584  df-opab 4644  df-mpt 4645  df-tr 4681  df-eprel 4949  df-id 4953  df-po 4959  df-so 4960  df-fr 4997  df-we 4999  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-pred 5597  df-ord 5643  df-on 5644  df-lim 5645  df-suc 5646  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-riota 6511  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-om 6958  df-1st 7059  df-2nd 7060  df-wrecs 7294  df-recs 7355  df-rdg 7393  df-1o 7447  df-oadd 7451  df-er 7629  df-map 7746  df-pm 7747  df-en 7842  df-dom 7843  df-sdom 7844  df-fin 7845  df-card 8648  df-pnf 9955  df-mnf 9956  df-xr 9957  df-ltxr 9958  df-le 9959  df-sub 10147  df-neg 10148  df-nn 10898  df-2 10956  df-n0 11170  df-xnn0 11241  df-z 11255  df-uz 11564  df-rp 11709  df-fz 12198  df-fzo 12335  df-hash 12980  df-word 13154  df-lsw 13155  df-concat 13156  df-s1 13157  df-wwlk 26207  df-wwlkn 26208  df-clwwlk 26279  df-clwwlkn 26280 This theorem is referenced by:  numclwwlk2lem1  26629
 Copyright terms: Public domain W3C validator