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

Theorem wwlksnext 28159
Description: Extension of a walk (as word) by adding an edge/vertex. (Contributed by Alexander van der Vekens, 4-Aug-2018.) (Revised by AV, 16-Apr-2021.)
Hypotheses
Ref Expression
wwlksnext.v 𝑉 = (Vtx‘𝐺)
wwlksnext.e 𝐸 = (Edg‘𝐺)
Assertion
Ref Expression
wwlksnext ((𝑇 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))

Proof of Theorem wwlksnext
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 wwlksnext.v . . . 4 𝑉 = (Vtx‘𝐺)
21wwlknbp 28108 . . 3 (𝑇 ∈ (𝑁 WWalksN 𝐺) → (𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑇 ∈ Word 𝑉))
3 wwlksnext.e . . . . . . . . . . 11 𝐸 = (Edg‘𝐺)
41, 3wwlknp 28109 . . . . . . . . . 10 (𝑇 ∈ (𝑁 WWalksN 𝐺) → (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸))
5 simp1 1134 . . . . . . . . . . . . . . 15 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) → 𝑇 ∈ Word 𝑉)
6 simprl 767 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → 𝑆𝑉)
7 cats1un 14362 . . . . . . . . . . . . . . 15 ((𝑇 ∈ Word 𝑉𝑆𝑉) → (𝑇 ++ ⟨“𝑆”⟩) = (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}))
85, 6, 7syl2an 595 . . . . . . . . . . . . . 14 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (𝑇 ++ ⟨“𝑆”⟩) = (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}))
9 opex 5373 . . . . . . . . . . . . . . . . . . 19 ⟨(♯‘𝑇), 𝑆⟩ ∈ V
109snnz 4709 . . . . . . . . . . . . . . . . . 18 {⟨(♯‘𝑇), 𝑆⟩} ≠ ∅
1110neii 2944 . . . . . . . . . . . . . . . . 17 ¬ {⟨(♯‘𝑇), 𝑆⟩} = ∅
1211intnan 486 . . . . . . . . . . . . . . . 16 ¬ (𝑇 = ∅ ∧ {⟨(♯‘𝑇), 𝑆⟩} = ∅)
13 df-ne 2943 . . . . . . . . . . . . . . . . 17 ((𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) ≠ ∅ ↔ ¬ (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) = ∅)
14 un00 4373 . . . . . . . . . . . . . . . . 17 ((𝑇 = ∅ ∧ {⟨(♯‘𝑇), 𝑆⟩} = ∅) ↔ (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) = ∅)
1513, 14xchbinxr 334 . . . . . . . . . . . . . . . 16 ((𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) ≠ ∅ ↔ ¬ (𝑇 = ∅ ∧ {⟨(♯‘𝑇), 𝑆⟩} = ∅))
1612, 15mpbir 230 . . . . . . . . . . . . . . 15 (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) ≠ ∅
1716a1i 11 . . . . . . . . . . . . . 14 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (𝑇 ∪ {⟨(♯‘𝑇), 𝑆⟩}) ≠ ∅)
188, 17eqnetrd 3010 . . . . . . . . . . . . 13 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (𝑇 ++ ⟨“𝑆”⟩) ≠ ∅)
19 s1cl 14235 . . . . . . . . . . . . . . 15 (𝑆𝑉 → ⟨“𝑆”⟩ ∈ Word 𝑉)
2019ad2antrl 724 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → ⟨“𝑆”⟩ ∈ Word 𝑉)
21 ccatcl 14205 . . . . . . . . . . . . . 14 ((𝑇 ∈ Word 𝑉 ∧ ⟨“𝑆”⟩ ∈ Word 𝑉) → (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉)
225, 20, 21syl2an 595 . . . . . . . . . . . . 13 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉)
23 simplrl 773 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑇 ∈ Word 𝑉)
24 fzossfzop1 13393 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 (𝑁 ∈ ℕ0 → (0..^𝑁) ⊆ (0..^(𝑁 + 1)))
2524ad2antrr 722 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (0..^𝑁) ⊆ (0..^(𝑁 + 1)))
2625sselda 3917 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑖 ∈ (0..^(𝑁 + 1)))
27 oveq2 7263 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 ((♯‘𝑇) = (𝑁 + 1) → (0..^(♯‘𝑇)) = (0..^(𝑁 + 1)))
2827eleq2d 2824 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 ((♯‘𝑇) = (𝑁 + 1) → (𝑖 ∈ (0..^(♯‘𝑇)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
2928adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → (𝑖 ∈ (0..^(♯‘𝑇)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
3029ad2antlr 723 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 ∈ (0..^(♯‘𝑇)) ↔ 𝑖 ∈ (0..^(𝑁 + 1))))
3126, 30mpbird 256 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → 𝑖 ∈ (0..^(♯‘𝑇)))
32 ccats1val1 14260 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑇 ∈ Word 𝑉𝑖 ∈ (0..^(♯‘𝑇))) → ((𝑇 ++ ⟨“𝑆”⟩)‘𝑖) = (𝑇𝑖))
3323, 31, 32syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑇 ++ ⟨“𝑆”⟩)‘𝑖) = (𝑇𝑖))
34 fzonn0p1p1 13394 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (𝑖 ∈ (0..^𝑁) → (𝑖 + 1) ∈ (0..^(𝑁 + 1)))
3534adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 + 1) ∈ (0..^(𝑁 + 1)))
3627adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → (0..^(♯‘𝑇)) = (0..^(𝑁 + 1)))
3736ad2antlr 723 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → (0..^(♯‘𝑇)) = (0..^(𝑁 + 1)))
3835, 37eleqtrrd 2842 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → (𝑖 + 1) ∈ (0..^(♯‘𝑇)))
39 ccats1val1 14260 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑇 ∈ Word 𝑉 ∧ (𝑖 + 1) ∈ (0..^(♯‘𝑇))) → ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1)) = (𝑇‘(𝑖 + 1)))
4023, 38, 39syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1)) = (𝑇‘(𝑖 + 1)))
4133, 40preq12d 4674 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((((𝑁 ∈ ℕ0𝑆𝑉) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) ∧ 𝑖 ∈ (0..^𝑁)) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {(𝑇𝑖), (𝑇‘(𝑖 + 1))})
4241exp31 419 . . . . . . . . . . . . . . . . . . . . . . . . 25 ((𝑁 ∈ ℕ0𝑆𝑉) → ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → (𝑖 ∈ (0..^𝑁) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {(𝑇𝑖), (𝑇‘(𝑖 + 1))})))
4342adantrr 713 . . . . . . . . . . . . . . . . . . . . . . . 24 ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → (𝑖 ∈ (0..^𝑁) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {(𝑇𝑖), (𝑇‘(𝑖 + 1))})))
4443impcom 407 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (𝑖 ∈ (0..^𝑁) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {(𝑇𝑖), (𝑇‘(𝑖 + 1))}))
4544imp 406 . . . . . . . . . . . . . . . . . . . . . 22 ((((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) ∧ 𝑖 ∈ (0..^𝑁)) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {(𝑇𝑖), (𝑇‘(𝑖 + 1))})
4645eleq1d 2823 . . . . . . . . . . . . . . . . . . . . 21 ((((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) ∧ 𝑖 ∈ (0..^𝑁)) → ({((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ {(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸))
4746ralbidva 3119 . . . . . . . . . . . . . . . . . . . 20 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸))
4847exbiri 807 . . . . . . . . . . . . . . . . . . 19 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → (∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸 → ∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)))
4948com23 86 . . . . . . . . . . . . . . . . . 18 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → (∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸 → ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → ∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)))
50493impia 1115 . . . . . . . . . . . . . . . . 17 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) → ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → ∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
5150imp 406 . . . . . . . . . . . . . . . 16 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)
52 oveq1 7262 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((♯‘𝑇) = (𝑁 + 1) → ((♯‘𝑇) − 1) = ((𝑁 + 1) − 1))
5352adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → ((♯‘𝑇) − 1) = ((𝑁 + 1) − 1))
54 nn0cn 12173 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
55 1cnd 10901 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 (𝑁 ∈ ℕ0 → 1 ∈ ℂ)
5654, 55pncand 11263 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑁 ∈ ℕ0 → ((𝑁 + 1) − 1) = 𝑁)
5756adantl 481 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 ((𝑆𝑉𝑁 ∈ ℕ0) → ((𝑁 + 1) − 1) = 𝑁)
5853, 57sylan9eqr 2801 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → ((♯‘𝑇) − 1) = 𝑁)
5958fveq2d 6760 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (𝑇‘((♯‘𝑇) − 1)) = (𝑇𝑁))
60 lsw 14195 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (𝑇 ∈ Word 𝑉 → (lastS‘𝑇) = (𝑇‘((♯‘𝑇) − 1)))
6160ad2antrl 724 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (lastS‘𝑇) = (𝑇‘((♯‘𝑇) − 1)))
62 simprl 767 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → 𝑇 ∈ Word 𝑉)
63 fzonn0p1 13392 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 (𝑁 ∈ ℕ0𝑁 ∈ (0..^(𝑁 + 1)))
6463ad2antlr 723 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → 𝑁 ∈ (0..^(𝑁 + 1)))
6527eleq2d 2824 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 ((♯‘𝑇) = (𝑁 + 1) → (𝑁 ∈ (0..^(♯‘𝑇)) ↔ 𝑁 ∈ (0..^(𝑁 + 1))))
6665ad2antll 725 . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (𝑁 ∈ (0..^(♯‘𝑇)) ↔ 𝑁 ∈ (0..^(𝑁 + 1))))
6764, 66mpbird 256 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → 𝑁 ∈ (0..^(♯‘𝑇)))
68 ccats1val1 14260 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑇 ∈ Word 𝑉𝑁 ∈ (0..^(♯‘𝑇))) → ((𝑇 ++ ⟨“𝑆”⟩)‘𝑁) = (𝑇𝑁))
6962, 67, 68syl2anc 583 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → ((𝑇 ++ ⟨“𝑆”⟩)‘𝑁) = (𝑇𝑁))
7059, 61, 693eqtr4d 2788 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (lastS‘𝑇) = ((𝑇 ++ ⟨“𝑆”⟩)‘𝑁))
71 simpll 763 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → 𝑆𝑉)
72 simprr 769 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (♯‘𝑇) = (𝑁 + 1))
7372eqcomd 2744 . . . . . . . . . . . . . . . . . . . . . . . . . 26 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → (𝑁 + 1) = (♯‘𝑇))
74 ccats1val2 14262 . . . . . . . . . . . . . . . . . . . . . . . . . . 27 ((𝑇 ∈ Word 𝑉𝑆𝑉 ∧ (𝑁 + 1) = (♯‘𝑇)) → ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1)) = 𝑆)
7574eqcomd 2744 . . . . . . . . . . . . . . . . . . . . . . . . . 26 ((𝑇 ∈ Word 𝑉𝑆𝑉 ∧ (𝑁 + 1) = (♯‘𝑇)) → 𝑆 = ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1)))
7662, 71, 73, 75syl3anc 1369 . . . . . . . . . . . . . . . . . . . . . . . . 25 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → 𝑆 = ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1)))
7770, 76preq12d 4674 . . . . . . . . . . . . . . . . . . . . . . . 24 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → {(lastS‘𝑇), 𝑆} = {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))})
7877eleq1d 2823 . . . . . . . . . . . . . . . . . . . . . . 23 (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → ({(lastS‘𝑇), 𝑆} ∈ 𝐸 ↔ {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
7978biimpcd 248 . . . . . . . . . . . . . . . . . . . . . 22 ({(lastS‘𝑇), 𝑆} ∈ 𝐸 → (((𝑆𝑉𝑁 ∈ ℕ0) ∧ (𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1))) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
8079exp4c 432 . . . . . . . . . . . . . . . . . . . . 21 ({(lastS‘𝑇), 𝑆} ∈ 𝐸 → (𝑆𝑉 → (𝑁 ∈ ℕ0 → ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))))
8180impcom 407 . . . . . . . . . . . . . . . . . . . 20 ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑁 ∈ ℕ0 → ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸)))
8281impcom 407 . . . . . . . . . . . . . . . . . . 19 ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
8382impcom 407 . . . . . . . . . . . . . . . . . 18 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1)) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸)
84833adantl3 1166 . . . . . . . . . . . . . . . . 17 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸)
85 fveq2 6756 . . . . . . . . . . . . . . . . . . . . 21 (𝑖 = 𝑁 → ((𝑇 ++ ⟨“𝑆”⟩)‘𝑖) = ((𝑇 ++ ⟨“𝑆”⟩)‘𝑁))
86 fvoveq1 7278 . . . . . . . . . . . . . . . . . . . . 21 (𝑖 = 𝑁 → ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1)) = ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1)))
8785, 86preq12d 4674 . . . . . . . . . . . . . . . . . . . 20 (𝑖 = 𝑁 → {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} = {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))})
8887eleq1d 2823 . . . . . . . . . . . . . . . . . . 19 (𝑖 = 𝑁 → ({((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
8988ralsng 4606 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → (∀𝑖 ∈ {𝑁} {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
9089ad2antrl 724 . . . . . . . . . . . . . . . . 17 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (∀𝑖 ∈ {𝑁} {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ {((𝑇 ++ ⟨“𝑆”⟩)‘𝑁), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑁 + 1))} ∈ 𝐸))
9184, 90mpbird 256 . . . . . . . . . . . . . . . 16 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ∀𝑖 ∈ {𝑁} {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)
92 ralunb 4121 . . . . . . . . . . . . . . . 16 (∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ (∀𝑖 ∈ (0..^𝑁){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ∧ ∀𝑖 ∈ {𝑁} {((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
9351, 91, 92sylanbrc 582 . . . . . . . . . . . . . . 15 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)
94 elnn0uz 12552 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0𝑁 ∈ (ℤ‘0))
95 eluzfz2 13193 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ (ℤ‘0) → 𝑁 ∈ (0...𝑁))
9694, 95sylbi 216 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0𝑁 ∈ (0...𝑁))
97 fzelp1 13237 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ (0...𝑁) → 𝑁 ∈ (0...(𝑁 + 1)))
98 fzosplit 13348 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ (0...(𝑁 + 1)) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ (𝑁..^(𝑁 + 1))))
9996, 97, 983syl 18 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ (𝑁..^(𝑁 + 1))))
100 nn0z 12273 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0𝑁 ∈ ℤ)
101 fzosn 13386 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℤ → (𝑁..^(𝑁 + 1)) = {𝑁})
102100, 101syl 17 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → (𝑁..^(𝑁 + 1)) = {𝑁})
103102uneq2d 4093 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → ((0..^𝑁) ∪ (𝑁..^(𝑁 + 1))) = ((0..^𝑁) ∪ {𝑁}))
10499, 103eqtrd 2778 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℕ0 → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
105104ad2antrl 724 . . . . . . . . . . . . . . . 16 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (0..^(𝑁 + 1)) = ((0..^𝑁) ∪ {𝑁}))
106105raleqdv 3339 . . . . . . . . . . . . . . 15 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ ∀𝑖 ∈ ((0..^𝑁) ∪ {𝑁}){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
10793, 106mpbird 256 . . . . . . . . . . . . . 14 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)
108 ccatlen 14206 . . . . . . . . . . . . . . . . . . 19 ((𝑇 ∈ Word 𝑉 ∧ ⟨“𝑆”⟩ ∈ Word 𝑉) → (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((♯‘𝑇) + (♯‘⟨“𝑆”⟩)))
1095, 20, 108syl2an 595 . . . . . . . . . . . . . . . . . 18 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((♯‘𝑇) + (♯‘⟨“𝑆”⟩)))
110109oveq1d 7270 . . . . . . . . . . . . . . . . 17 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1) = (((♯‘𝑇) + (♯‘⟨“𝑆”⟩)) − 1))
111 simpl2 1190 . . . . . . . . . . . . . . . . . . 19 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (♯‘𝑇) = (𝑁 + 1))
112 s1len 14239 . . . . . . . . . . . . . . . . . . . 20 (♯‘⟨“𝑆”⟩) = 1
113112a1i 11 . . . . . . . . . . . . . . . . . . 19 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (♯‘⟨“𝑆”⟩) = 1)
114111, 113oveq12d 7273 . . . . . . . . . . . . . . . . . 18 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ((♯‘𝑇) + (♯‘⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))
115114oveq1d 7270 . . . . . . . . . . . . . . . . 17 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (((♯‘𝑇) + (♯‘⟨“𝑆”⟩)) − 1) = (((𝑁 + 1) + 1) − 1))
116 peano2nn0 12203 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → (𝑁 + 1) ∈ ℕ0)
117116nn0cnd 12225 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → (𝑁 + 1) ∈ ℂ)
118117, 55pncand 11263 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → (((𝑁 + 1) + 1) − 1) = (𝑁 + 1))
119118ad2antrl 724 . . . . . . . . . . . . . . . . 17 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (((𝑁 + 1) + 1) − 1) = (𝑁 + 1))
120110, 115, 1193eqtrd 2782 . . . . . . . . . . . . . . . 16 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1) = (𝑁 + 1))
121120oveq2d 7271 . . . . . . . . . . . . . . 15 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)) = (0..^(𝑁 + 1)))
122121raleqdv 3339 . . . . . . . . . . . . . 14 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸 ↔ ∀𝑖 ∈ (0..^(𝑁 + 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
123107, 122mpbird 256 . . . . . . . . . . . . 13 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸)
12418, 22, 1233jca 1126 . . . . . . . . . . . 12 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → ((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
125109, 114eqtrd 2778 . . . . . . . . . . . 12 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))
126124, 125jca 511 . . . . . . . . . . 11 (((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) ∧ (𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸))) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1)))
127126ex 412 . . . . . . . . . 10 ((𝑇 ∈ Word 𝑉 ∧ (♯‘𝑇) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑇𝑖), (𝑇‘(𝑖 + 1))} ∈ 𝐸) → ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
1284, 127syl 17 . . . . . . . . 9 (𝑇 ∈ (𝑁 WWalksN 𝐺) → ((𝑁 ∈ ℕ0 ∧ (𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸)) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
129128expd 415 . . . . . . . 8 (𝑇 ∈ (𝑁 WWalksN 𝐺) → (𝑁 ∈ ℕ0 → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1)))))
130129impcom 407 . . . . . . 7 ((𝑁 ∈ ℕ0𝑇 ∈ (𝑁 WWalksN 𝐺)) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
131130adantll 710 . . . . . 6 (((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) ∧ 𝑇 ∈ (𝑁 WWalksN 𝐺)) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
132 iswwlksn 28104 . . . . . . . . . 10 ((𝑁 + 1) ∈ ℕ0 → ((𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ ((𝑇 ++ ⟨“𝑆”⟩) ∈ (WWalks‘𝐺) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
133116, 132syl 17 . . . . . . . . 9 (𝑁 ∈ ℕ0 → ((𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ ((𝑇 ++ ⟨“𝑆”⟩) ∈ (WWalks‘𝐺) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
134133adantl 481 . . . . . . . 8 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) → ((𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ ((𝑇 ++ ⟨“𝑆”⟩) ∈ (WWalks‘𝐺) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
1351, 3iswwlks 28102 . . . . . . . . 9 ((𝑇 ++ ⟨“𝑆”⟩) ∈ (WWalks‘𝐺) ↔ ((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸))
136135anbi1i 623 . . . . . . . 8 (((𝑇 ++ ⟨“𝑆”⟩) ∈ (WWalks‘𝐺) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1)) ↔ (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1)))
137134, 136bitrdi 286 . . . . . . 7 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) → ((𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
138137adantr 480 . . . . . 6 (((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) ∧ 𝑇 ∈ (𝑁 WWalksN 𝐺)) → ((𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ (((𝑇 ++ ⟨“𝑆”⟩) ≠ ∅ ∧ (𝑇 ++ ⟨“𝑆”⟩) ∈ Word 𝑉 ∧ ∀𝑖 ∈ (0..^((♯‘(𝑇 ++ ⟨“𝑆”⟩)) − 1)){((𝑇 ++ ⟨“𝑆”⟩)‘𝑖), ((𝑇 ++ ⟨“𝑆”⟩)‘(𝑖 + 1))} ∈ 𝐸) ∧ (♯‘(𝑇 ++ ⟨“𝑆”⟩)) = ((𝑁 + 1) + 1))))
139131, 138sylibrd 258 . . . . 5 (((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) ∧ 𝑇 ∈ (𝑁 WWalksN 𝐺)) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺)))
140139ex 412 . . . 4 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0) → (𝑇 ∈ (𝑁 WWalksN 𝐺) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))))
1411403adant3 1130 . . 3 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑇 ∈ Word 𝑉) → (𝑇 ∈ (𝑁 WWalksN 𝐺) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))))
1422, 141mpcom 38 . 2 (𝑇 ∈ (𝑁 WWalksN 𝐺) → ((𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺)))
1431423impib 1114 1 ((𝑇 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑆𝑉 ∧ {(lastS‘𝑇), 𝑆} ∈ 𝐸) → (𝑇 ++ ⟨“𝑆”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wcel 2108  wne 2942  wral 3063  Vcvv 3422  cun 3881  wss 3883  c0 4253  {csn 4558  {cpr 4560  cop 4564  cfv 6418  (class class class)co 7255  0cc0 10802  1c1 10803   + caddc 10805  cmin 11135  0cn0 12163  cz 12249  cuz 12511  ...cfz 13168  ..^cfzo 13311  chash 13972  Word cword 14145  lastSclsw 14193   ++ cconcat 14201  ⟨“cs1 14228  Vtxcvtx 27269  Edgcedg 27320  WWalkscwwlks 28091   WWalksN cwwlksn 28092
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-rep 5205  ax-sep 5218  ax-nul 5225  ax-pow 5283  ax-pr 5347  ax-un 7566  ax-cnex 10858  ax-resscn 10859  ax-1cn 10860  ax-icn 10861  ax-addcl 10862  ax-addrcl 10863  ax-mulcl 10864  ax-mulrcl 10865  ax-mulcom 10866  ax-addass 10867  ax-mulass 10868  ax-distr 10869  ax-i2m1 10870  ax-1ne0 10871  ax-1rid 10872  ax-rnegex 10873  ax-rrecex 10874  ax-cnre 10875  ax-pre-lttri 10876  ax-pre-lttrn 10877  ax-pre-ltadd 10878  ax-pre-mulgt0 10879
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3or 1086  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-nel 3049  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-pss 3902  df-nul 4254  df-if 4457  df-pw 4532  df-sn 4559  df-pr 4561  df-tp 4563  df-op 4565  df-uni 4837  df-int 4877  df-iun 4923  df-br 5071  df-opab 5133  df-mpt 5154  df-tr 5188  df-id 5480  df-eprel 5486  df-po 5494  df-so 5495  df-fr 5535  df-we 5537  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-pred 6191  df-ord 6254  df-on 6255  df-lim 6256  df-suc 6257  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426  df-riota 7212  df-ov 7258  df-oprab 7259  df-mpo 7260  df-om 7688  df-1st 7804  df-2nd 7805  df-frecs 8068  df-wrecs 8099  df-recs 8173  df-rdg 8212  df-1o 8267  df-er 8456  df-map 8575  df-en 8692  df-dom 8693  df-sdom 8694  df-fin 8695  df-card 9628  df-pnf 10942  df-mnf 10943  df-xr 10944  df-ltxr 10945  df-le 10946  df-sub 11137  df-neg 11138  df-nn 11904  df-n0 12164  df-z 12250  df-uz 12512  df-fz 13169  df-fzo 13312  df-hash 13973  df-word 14146  df-lsw 14194  df-concat 14202  df-s1 14229  df-wwlks 28096  df-wwlksn 28097
This theorem is referenced by:  wwlksnextbi  28160  wwlksnextsurj  28166
  Copyright terms: Public domain W3C validator