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

Theorem wwlksnextsur 26698
Description: Lemma for wwlksnextbij 26700. (Contributed by Alexander van der Vekens, 7-Aug-2018.) (Revised by AV, 18-Apr-2021.)
Hypotheses
Ref Expression
wwlksnextbij0.v 𝑉 = (Vtx‘𝐺)
wwlksnextbij0.e 𝐸 = (Edg‘𝐺)
wwlksnextbij0.d 𝐷 = {𝑤 ∈ Word 𝑉 ∣ ((#‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)}
wwlksnextbij.r 𝑅 = {𝑛𝑉 ∣ {( lastS ‘𝑊), 𝑛} ∈ 𝐸}
wwlksnextbij.f 𝐹 = (𝑡𝐷 ↦ ( lastS ‘𝑡))
Assertion
Ref Expression
wwlksnextsur (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐹:𝐷onto𝑅)
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑊   𝑡,𝐷   𝑛,𝐸,𝑤   𝑡,𝑁,𝑤   𝑡,𝑅   𝑛,𝑉,𝑤   𝑛,𝑊   𝑡,𝑛,𝑁,𝑤
Allowed substitution hints:   𝐷(𝑤,𝑛)   𝑅(𝑤,𝑛)   𝐸(𝑡)   𝐹(𝑤,𝑡,𝑛)   𝐺(𝑡,𝑛)   𝑉(𝑡)   𝑊(𝑡)

Proof of Theorem wwlksnextsur
Dummy variables 𝑖 𝑑 𝑟 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 wwlksnextbij0.v . . . 4 𝑉 = (Vtx‘𝐺)
21wwlknbp 26636 . . 3 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉))
3 simp2 1060 . . 3 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → 𝑁 ∈ ℕ0)
4 wwlksnextbij0.e . . . 4 𝐸 = (Edg‘𝐺)
5 wwlksnextbij0.d . . . 4 𝐷 = {𝑤 ∈ Word 𝑉 ∣ ((#‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)}
6 wwlksnextbij.r . . . 4 𝑅 = {𝑛𝑉 ∣ {( lastS ‘𝑊), 𝑛} ∈ 𝐸}
7 wwlksnextbij.f . . . 4 𝐹 = (𝑡𝐷 ↦ ( lastS ‘𝑡))
81, 4, 5, 6, 7wwlksnextfun 26696 . . 3 (𝑁 ∈ ℕ0𝐹:𝐷𝑅)
92, 3, 83syl 18 . 2 (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐹:𝐷𝑅)
10 preq2 4246 . . . . . 6 (𝑛 = 𝑟 → {( lastS ‘𝑊), 𝑛} = {( lastS ‘𝑊), 𝑟})
1110eleq1d 2683 . . . . 5 (𝑛 = 𝑟 → ({( lastS ‘𝑊), 𝑛} ∈ 𝐸 ↔ {( lastS ‘𝑊), 𝑟} ∈ 𝐸))
1211, 6elrab2 3353 . . . 4 (𝑟𝑅 ↔ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸))
131, 4wwlksnext 26691 . . . . . . . . . . 11 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸) → (𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))
14133expb 1263 . . . . . . . . . 10 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → (𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺))
15 s1cl 13337 . . . . . . . . . . . . . . . . . 18 (𝑟𝑉 → ⟨“𝑟”⟩ ∈ Word 𝑉)
16 swrdccat1 13411 . . . . . . . . . . . . . . . . . 18 ((𝑊 ∈ Word 𝑉 ∧ ⟨“𝑟”⟩ ∈ Word 𝑉) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊)
1715, 16sylan2 491 . . . . . . . . . . . . . . . . 17 ((𝑊 ∈ Word 𝑉𝑟𝑉) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊)
1817ex 450 . . . . . . . . . . . . . . . 16 (𝑊 ∈ Word 𝑉 → (𝑟𝑉 → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊))
1918adantr 481 . . . . . . . . . . . . . . 15 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (𝑟𝑉 → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊))
20 opeq2 4378 . . . . . . . . . . . . . . . . . . 19 ((𝑁 + 1) = (#‘𝑊) → ⟨0, (𝑁 + 1)⟩ = ⟨0, (#‘𝑊)⟩)
2120eqcoms 2629 . . . . . . . . . . . . . . . . . 18 ((#‘𝑊) = (𝑁 + 1) → ⟨0, (𝑁 + 1)⟩ = ⟨0, (#‘𝑊)⟩)
2221oveq2d 6631 . . . . . . . . . . . . . . . . 17 ((#‘𝑊) = (𝑁 + 1) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩))
2322eqeq1d 2623 . . . . . . . . . . . . . . . 16 ((#‘𝑊) = (𝑁 + 1) → (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ↔ ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊))
2423adantl 482 . . . . . . . . . . . . . . 15 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ↔ ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (#‘𝑊)⟩) = 𝑊))
2519, 24sylibrd 249 . . . . . . . . . . . . . 14 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1)) → (𝑟𝑉 → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
26253adant3 1079 . . . . . . . . . . . . 13 ((𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ 𝐸) → (𝑟𝑉 → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
271, 4wwlknp 26637 . . . . . . . . . . . . 13 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝑊 ∈ Word 𝑉 ∧ (#‘𝑊) = (𝑁 + 1) ∧ ∀𝑖 ∈ (0..^𝑁){(𝑊𝑖), (𝑊‘(𝑖 + 1))} ∈ 𝐸))
2826, 27syl11 33 . . . . . . . . . . . 12 (𝑟𝑉 → (𝑊 ∈ (𝑁 WWalksN 𝐺) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
2928adantr 481 . . . . . . . . . . 11 ((𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
3029impcom 446 . . . . . . . . . 10 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊)
31 lswccats1 13365 . . . . . . . . . . . . . . . . . . 19 ((𝑊 ∈ Word 𝑉𝑟𝑉) → ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)) = 𝑟)
3231eqcomd 2627 . . . . . . . . . . . . . . . . . 18 ((𝑊 ∈ Word 𝑉𝑟𝑉) → 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)))
3332ex 450 . . . . . . . . . . . . . . . . 17 (𝑊 ∈ Word 𝑉 → (𝑟𝑉𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
34333ad2ant3 1082 . . . . . . . . . . . . . . . 16 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑟𝑉𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
352, 34syl 17 . . . . . . . . . . . . . . 15 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝑟𝑉𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
3635imp 445 . . . . . . . . . . . . . 14 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑉) → 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)))
3736preq2d 4252 . . . . . . . . . . . . 13 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑉) → {( lastS ‘𝑊), 𝑟} = {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))})
3837eleq1d 2683 . . . . . . . . . . . 12 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑉) → ({( lastS ‘𝑊), 𝑟} ∈ 𝐸 ↔ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸))
3938biimpd 219 . . . . . . . . . . 11 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑉) → ({( lastS ‘𝑊), 𝑟} ∈ 𝐸 → {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸))
4039impr 648 . . . . . . . . . 10 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)
4114, 30, 40jca32 557 . . . . . . . . 9 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)))
4234, 2syl11 33 . . . . . . . . . . 11 (𝑟𝑉 → (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
4342adantr 481 . . . . . . . . . 10 ((𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
4443impcom 446 . . . . . . . . 9 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)))
45 ovexd 6645 . . . . . . . . . 10 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → (𝑊 ++ ⟨“𝑟”⟩) ∈ V)
46 eleq1 2686 . . . . . . . . . . . . . . 15 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → (𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ (𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺)))
47 oveq1 6622 . . . . . . . . . . . . . . . . 17 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → (𝑑 substr ⟨0, (𝑁 + 1)⟩) = ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩))
4847eqeq1d 2623 . . . . . . . . . . . . . . . 16 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ↔ ((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
49 fveq2 6158 . . . . . . . . . . . . . . . . . 18 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → ( lastS ‘𝑑) = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)))
5049preq2d 4252 . . . . . . . . . . . . . . . . 17 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → {( lastS ‘𝑊), ( lastS ‘𝑑)} = {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))})
5150eleq1d 2683 . . . . . . . . . . . . . . . 16 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → ({( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸 ↔ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸))
5248, 51anbi12d 746 . . . . . . . . . . . . . . 15 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → (((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸) ↔ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)))
5346, 52anbi12d 746 . . . . . . . . . . . . . 14 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → ((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ↔ ((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸))))
5449eqeq2d 2631 . . . . . . . . . . . . . 14 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → (𝑟 = ( lastS ‘𝑑) ↔ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))))
5553, 54anbi12d 746 . . . . . . . . . . . . 13 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → (((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑)) ↔ (((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩)))))
5655bicomd 213 . . . . . . . . . . . 12 (𝑑 = (𝑊 ++ ⟨“𝑟”⟩) → ((((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))) ↔ ((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑))))
5756adantl 482 . . . . . . . . . . 11 (((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) ∧ 𝑑 = (𝑊 ++ ⟨“𝑟”⟩)) → ((((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))) ↔ ((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑))))
5857biimpd 219 . . . . . . . . . 10 (((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) ∧ 𝑑 = (𝑊 ++ ⟨“𝑟”⟩)) → ((((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))) → ((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑))))
5945, 58spcimedv 3282 . . . . . . . . 9 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ((((𝑊 ++ ⟨“𝑟”⟩) ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ (((𝑊 ++ ⟨“𝑟”⟩) substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘(𝑊 ++ ⟨“𝑟”⟩))) → ∃𝑑((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑))))
6041, 44, 59mp2and 714 . . . . . . . 8 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ∃𝑑((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑)))
61 oveq1 6622 . . . . . . . . . . . . 13 (𝑤 = 𝑑 → (𝑤 substr ⟨0, (𝑁 + 1)⟩) = (𝑑 substr ⟨0, (𝑁 + 1)⟩))
6261eqeq1d 2623 . . . . . . . . . . . 12 (𝑤 = 𝑑 → ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ↔ (𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊))
63 fveq2 6158 . . . . . . . . . . . . . 14 (𝑤 = 𝑑 → ( lastS ‘𝑤) = ( lastS ‘𝑑))
6463preq2d 4252 . . . . . . . . . . . . 13 (𝑤 = 𝑑 → {( lastS ‘𝑊), ( lastS ‘𝑤)} = {( lastS ‘𝑊), ( lastS ‘𝑑)})
6564eleq1d 2683 . . . . . . . . . . . 12 (𝑤 = 𝑑 → ({( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸 ↔ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸))
6662, 65anbi12d 746 . . . . . . . . . . 11 (𝑤 = 𝑑 → (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸) ↔ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)))
6766elrab 3351 . . . . . . . . . 10 (𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)} ↔ (𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)))
6867anbi1i 730 . . . . . . . . 9 ((𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)} ∧ 𝑟 = ( lastS ‘𝑑)) ↔ ((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑)))
6968exbii 1771 . . . . . . . 8 (∃𝑑(𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)} ∧ 𝑟 = ( lastS ‘𝑑)) ↔ ∃𝑑((𝑑 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑑 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑑)} ∈ 𝐸)) ∧ 𝑟 = ( lastS ‘𝑑)))
7060, 69sylibr 224 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ∃𝑑(𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)} ∧ 𝑟 = ( lastS ‘𝑑)))
71 df-rex 2914 . . . . . . 7 (∃𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)}𝑟 = ( lastS ‘𝑑) ↔ ∃𝑑(𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)} ∧ 𝑟 = ( lastS ‘𝑑)))
7270, 71sylibr 224 . . . . . 6 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ∃𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)}𝑟 = ( lastS ‘𝑑))
731, 4, 5wwlksnextwrd 26695 . . . . . . . 8 (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)})
7473adantr 481 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)})
7574rexeqdv 3138 . . . . . 6 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → (∃𝑑𝐷 𝑟 = ( lastS ‘𝑑) ↔ ∃𝑑 ∈ {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {( lastS ‘𝑊), ( lastS ‘𝑤)} ∈ 𝐸)}𝑟 = ( lastS ‘𝑑)))
7672, 75mpbird 247 . . . . 5 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ∃𝑑𝐷 𝑟 = ( lastS ‘𝑑))
77 fveq2 6158 . . . . . . . 8 (𝑡 = 𝑑 → ( lastS ‘𝑡) = ( lastS ‘𝑑))
78 fvex 6168 . . . . . . . 8 ( lastS ‘𝑑) ∈ V
7977, 7, 78fvmpt 6249 . . . . . . 7 (𝑑𝐷 → (𝐹𝑑) = ( lastS ‘𝑑))
8079eqeq2d 2631 . . . . . 6 (𝑑𝐷 → (𝑟 = (𝐹𝑑) ↔ 𝑟 = ( lastS ‘𝑑)))
8180rexbiia 3035 . . . . 5 (∃𝑑𝐷 𝑟 = (𝐹𝑑) ↔ ∃𝑑𝐷 𝑟 = ( lastS ‘𝑑))
8276, 81sylibr 224 . . . 4 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ (𝑟𝑉 ∧ {( lastS ‘𝑊), 𝑟} ∈ 𝐸)) → ∃𝑑𝐷 𝑟 = (𝐹𝑑))
8312, 82sylan2b 492 . . 3 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ 𝑟𝑅) → ∃𝑑𝐷 𝑟 = (𝐹𝑑))
8483ralrimiva 2962 . 2 (𝑊 ∈ (𝑁 WWalksN 𝐺) → ∀𝑟𝑅𝑑𝐷 𝑟 = (𝐹𝑑))
85 dffo3 6340 . 2 (𝐹:𝐷onto𝑅 ↔ (𝐹:𝐷𝑅 ∧ ∀𝑟𝑅𝑑𝐷 𝑟 = (𝐹𝑑)))
869, 84, 85sylanbrc 697 1 (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐹:𝐷onto𝑅)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wex 1701  wcel 1987  wral 2908  wrex 2909  {crab 2912  Vcvv 3190  {cpr 4157  cop 4161  cmpt 4683  wf 5853  ontowfo 5855  cfv 5857  (class class class)co 6615  0cc0 9896  1c1 9897   + caddc 9899  2c2 11030  0cn0 11252  ..^cfzo 12422  #chash 13073  Word cword 13246   lastS clsw 13247   ++ cconcat 13248  ⟨“cs1 13249   substr csubstr 13250  Vtxcvtx 25808  Edgcedg 25873   WWalksN cwwlksn 26621
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4741  ax-sep 4751  ax-nul 4759  ax-pow 4813  ax-pr 4877  ax-un 6914  ax-cnex 9952  ax-resscn 9953  ax-1cn 9954  ax-icn 9955  ax-addcl 9956  ax-addrcl 9957  ax-mulcl 9958  ax-mulrcl 9959  ax-mulcom 9960  ax-addass 9961  ax-mulass 9962  ax-distr 9963  ax-i2m1 9964  ax-1ne0 9965  ax-1rid 9966  ax-rnegex 9967  ax-rrecex 9968  ax-cnre 9969  ax-pre-lttri 9970  ax-pre-lttrn 9971  ax-pre-ltadd 9972  ax-pre-mulgt0 9973
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2913  df-rex 2914  df-reu 2915  df-rab 2917  df-v 3192  df-sbc 3423  df-csb 3520  df-dif 3563  df-un 3565  df-in 3567  df-ss 3574  df-pss 3576  df-nul 3898  df-if 4065  df-pw 4138  df-sn 4156  df-pr 4158  df-tp 4160  df-op 4162  df-uni 4410  df-int 4448  df-iun 4494  df-br 4624  df-opab 4684  df-mpt 4685  df-tr 4723  df-eprel 4995  df-id 4999  df-po 5005  df-so 5006  df-fr 5043  df-we 5045  df-xp 5090  df-rel 5091  df-cnv 5092  df-co 5093  df-dm 5094  df-rn 5095  df-res 5096  df-ima 5097  df-pred 5649  df-ord 5695  df-on 5696  df-lim 5697  df-suc 5698  df-iota 5820  df-fun 5859  df-fn 5860  df-f 5861  df-f1 5862  df-fo 5863  df-f1o 5864  df-fv 5865  df-riota 6576  df-ov 6618  df-oprab 6619  df-mpt2 6620  df-om 7028  df-1st 7128  df-2nd 7129  df-wrecs 7367  df-recs 7428  df-rdg 7466  df-1o 7520  df-oadd 7524  df-er 7702  df-map 7819  df-pm 7820  df-en 7916  df-dom 7917  df-sdom 7918  df-fin 7919  df-card 8725  df-pnf 10036  df-mnf 10037  df-xr 10038  df-ltxr 10039  df-le 10040  df-sub 10228  df-neg 10229  df-nn 10981  df-2 11039  df-n0 11253  df-xnn0 11324  df-z 11338  df-uz 11648  df-rp 11793  df-fz 12285  df-fzo 12423  df-hash 13074  df-word 13254  df-lsw 13255  df-concat 13256  df-s1 13257  df-substr 13258  df-wwlks 26625  df-wwlksn 26626
This theorem is referenced by:  wwlksnextbij0  26699
  Copyright terms: Public domain W3C validator