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

Theorem wwlksnextwrd 28163
Description: Lemma for wwlksnextbij 28168. (Contributed by Alexander van der Vekens, 5-Aug-2018.) (Revised by AV, 18-Apr-2021.) (Revised by AV, 27-Oct-2022.)
Hypotheses
Ref Expression
wwlksnextbij0.v 𝑉 = (Vtx‘𝐺)
wwlksnextbij0.e 𝐸 = (Edg‘𝐺)
wwlksnextbij0.d 𝐷 = {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)}
Assertion
Ref Expression
wwlksnextwrd (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)})
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑊
Allowed substitution hints:   𝐷(𝑤)   𝐸(𝑤)   𝑉(𝑤)

Proof of Theorem wwlksnextwrd
Dummy variable 𝑖 is distinct from all other variables.
StepHypRef Expression
1 wwlksnextbij0.d . 2 𝐷 = {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)}
2 3anass 1093 . . . . 5 (((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) ↔ ((♯‘𝑤) = (𝑁 + 2) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)))
32bianass 638 . . . 4 ((𝑤 ∈ Word 𝑉 ∧ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)))
4 wwlksnextbij0.v . . . . . . . . . . 11 𝑉 = (Vtx‘𝐺)
54wwlknbp 28108 . . . . . . . . . 10 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉))
6 simpl 482 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑁 ∈ ℕ0)
7 simpl 482 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ Word 𝑉)
8 nn0re 12172 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
9 2re 11977 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ
109a1i 11 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 2 ∈ ℝ)
11 nn0ge0 12188 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 0 ≤ 𝑁)
12 2pos 12006 . . . . . . . . . . . . . . . . . . . . 21 0 < 2
1312a1i 11 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 0 < 2)
148, 10, 11, 13addgegt0d 11478 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → 0 < (𝑁 + 2))
1514adantr 480 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 0 < (𝑁 + 2))
16 breq2 5074 . . . . . . . . . . . . . . . . . . 19 ((♯‘𝑤) = (𝑁 + 2) → (0 < (♯‘𝑤) ↔ 0 < (𝑁 + 2)))
1716ad2antll 725 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (0 < (♯‘𝑤) ↔ 0 < (𝑁 + 2)))
1815, 17mpbird 256 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 0 < (♯‘𝑤))
19 hashgt0n0 14008 . . . . . . . . . . . . . . . . 17 ((𝑤 ∈ Word 𝑉 ∧ 0 < (♯‘𝑤)) → 𝑤 ≠ ∅)
207, 18, 19syl2an2 682 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 𝑤 ≠ ∅)
21 lswcl 14199 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉𝑤 ≠ ∅) → (lastS‘𝑤) ∈ 𝑉)
227, 20, 21syl2an2 682 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (lastS‘𝑤) ∈ 𝑉)
2322adantrr 713 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (lastS‘𝑤) ∈ 𝑉)
24 pfxcl 14318 . . . . . . . . . . . . . . . . . . . . 21 (𝑤 ∈ Word 𝑉 → (𝑤 prefix (𝑁 + 1)) ∈ Word 𝑉)
25 eleq1 2826 . . . . . . . . . . . . . . . . . . . . 21 (𝑊 = (𝑤 prefix (𝑁 + 1)) → (𝑊 ∈ Word 𝑉 ↔ (𝑤 prefix (𝑁 + 1)) ∈ Word 𝑉))
2624, 25syl5ibr 245 . . . . . . . . . . . . . . . . . . . 20 (𝑊 = (𝑤 prefix (𝑁 + 1)) → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2726eqcoms 2746 . . . . . . . . . . . . . . . . . . 19 ((𝑤 prefix (𝑁 + 1)) = 𝑊 → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2827adantr 480 . . . . . . . . . . . . . . . . . 18 (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2928com12 32 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑉 → (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → 𝑊 ∈ Word 𝑉))
3029adantr 480 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → 𝑊 ∈ Word 𝑉))
3130imp 406 . . . . . . . . . . . . . . 15 (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑊 ∈ Word 𝑉)
3231adantl 481 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑊 ∈ Word 𝑉)
33 oveq1 7262 . . . . . . . . . . . . . . . . . 18 (𝑊 = (𝑤 prefix (𝑁 + 1)) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩))
3433eqcoms 2746 . . . . . . . . . . . . . . . . 17 ((𝑤 prefix (𝑁 + 1)) = 𝑊 → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩))
3534adantr 480 . . . . . . . . . . . . . . . 16 (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩))
3635ad2antll 725 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩))
37 oveq1 7262 . . . . . . . . . . . . . . . . . . . . 21 ((♯‘𝑤) = (𝑁 + 2) → ((♯‘𝑤) − 1) = ((𝑁 + 2) − 1))
3837adantl 481 . . . . . . . . . . . . . . . . . . . 20 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → ((♯‘𝑤) − 1) = ((𝑁 + 2) − 1))
39 nn0cn 12173 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
40 2cnd 11981 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → 2 ∈ ℂ)
41 1cnd 10901 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → 1 ∈ ℂ)
4239, 40, 41addsubassd 11282 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ0 → ((𝑁 + 2) − 1) = (𝑁 + (2 − 1)))
43 2m1e1 12029 . . . . . . . . . . . . . . . . . . . . . . 23 (2 − 1) = 1
4443a1i 11 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → (2 − 1) = 1)
4544oveq2d 7271 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ0 → (𝑁 + (2 − 1)) = (𝑁 + 1))
4642, 45eqtrd 2778 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → ((𝑁 + 2) − 1) = (𝑁 + 1))
4738, 46sylan9eqr 2801 . . . . . . . . . . . . . . . . . . 19 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((♯‘𝑤) − 1) = (𝑁 + 1))
4847oveq2d 7271 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (𝑤 prefix ((♯‘𝑤) − 1)) = (𝑤 prefix (𝑁 + 1)))
4948oveq1d 7270 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 prefix ((♯‘𝑤) − 1)) ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩))
50 pfxlswccat 14354 . . . . . . . . . . . . . . . . . 18 ((𝑤 ∈ Word 𝑉𝑤 ≠ ∅) → ((𝑤 prefix ((♯‘𝑤) − 1)) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
517, 20, 50syl2an2 682 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 prefix ((♯‘𝑤) − 1)) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5249, 51eqtr3d 2780 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5352adantrr 713 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → ((𝑤 prefix (𝑁 + 1)) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5436, 53eqtr2d 2779 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑤 = (𝑊 ++ ⟨“(lastS‘𝑤)”⟩))
55 simprrr 778 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)
56 wwlksnextbij0.e . . . . . . . . . . . . . . 15 𝐸 = (Edg‘𝐺)
574, 56wwlksnextbi 28160 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ0 ∧ (lastS‘𝑤) ∈ 𝑉) ∧ (𝑊 ∈ Word 𝑉𝑤 = (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ 𝑊 ∈ (𝑁 WWalksN 𝐺)))
586, 23, 32, 54, 55, 57syl23anc 1375 . . . . . . . . . . . . 13 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ 𝑊 ∈ (𝑁 WWalksN 𝐺)))
5958exbiri 807 . . . . . . . . . . . 12 (𝑁 ∈ ℕ0 → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
6059com23 86 . . . . . . . . . . 11 (𝑁 ∈ ℕ0 → (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
61603ad2ant2 1132 . . . . . . . . . 10 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
625, 61mpcom 38 . . . . . . . . 9 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
6362expcomd 416 . . . . . . . 8 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
6463imp 406 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
654, 56wwlknp 28109 . . . . . . . . . . . 12 (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1) ∧ ∀𝑖 ∈ (0..^(𝑁 + 1)){(𝑤𝑖), (𝑤‘(𝑖 + 1))} ∈ 𝐸))
6639, 41, 41addassd 10928 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + (1 + 1)))
67 1p1e2 12028 . . . . . . . . . . . . . . . . . . . . . 22 (1 + 1) = 2
6867a1i 11 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ0 → (1 + 1) = 2)
6968oveq2d 7271 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → (𝑁 + (1 + 1)) = (𝑁 + 2))
7066, 69eqtrd 2778 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + 2))
7170eqeq2d 2749 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → ((♯‘𝑤) = ((𝑁 + 1) + 1) ↔ (♯‘𝑤) = (𝑁 + 2)))
7271biimpd 228 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℕ0 → ((♯‘𝑤) = ((𝑁 + 1) + 1) → (♯‘𝑤) = (𝑁 + 2)))
7372adantr 480 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → ((♯‘𝑤) = ((𝑁 + 1) + 1) → (♯‘𝑤) = (𝑁 + 2)))
7473com12 32 . . . . . . . . . . . . . . 15 ((♯‘𝑤) = ((𝑁 + 1) + 1) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (♯‘𝑤) = (𝑁 + 2)))
7574adantl 481 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (♯‘𝑤) = (𝑁 + 2)))
76 simpl 482 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → 𝑤 ∈ Word 𝑉)
7775, 76jctild 525 . . . . . . . . . . . . 13 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
78773adant3 1130 . . . . . . . . . . . 12 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1) ∧ ∀𝑖 ∈ (0..^(𝑁 + 1)){(𝑤𝑖), (𝑤‘(𝑖 + 1))} ∈ 𝐸) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
7965, 78syl 17 . . . . . . . . . . 11 (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8079com12 32 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
81803adant1 1128 . . . . . . . . 9 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
825, 81syl 17 . . . . . . . 8 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8382adantr 480 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8464, 83impbid 211 . . . . . 6 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ↔ 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
8584ex 412 . . . . 5 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ↔ 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
8685pm5.32rd 577 . . . 4 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))))
873, 86syl5bb 282 . . 3 (𝑊 ∈ (𝑁 WWalksN 𝐺) → ((𝑤 ∈ Word 𝑉 ∧ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))))
8887rabbidva2 3400 . 2 (𝑊 ∈ (𝑁 WWalksN 𝐺) → {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)} = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)})
891, 88syl5eq 2791 1 (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 prefix (𝑁 + 1)) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395  w3a 1085   = wceq 1539  wcel 2108  wne 2942  wral 3063  {crab 3067  Vcvv 3422  c0 4253  {cpr 4560   class class class wbr 5070  cfv 6418  (class class class)co 7255  cr 10801  0cc0 10802  1c1 10803   + caddc 10805   < clt 10940  cmin 11135  2c2 11958  0cn0 12163  ..^cfzo 13311  chash 13972  Word cword 14145  lastSclsw 14193   ++ cconcat 14201  ⟨“cs1 14228   prefix cpfx 14311  Vtxcvtx 27269  Edgcedg 27320   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-2 11966  df-n0 12164  df-xnn0 12236  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-substr 14282  df-pfx 14312  df-wwlks 28096  df-wwlksn 28097
This theorem is referenced by:  wwlksnextsurj  28166  wwlksnextbij  28168
  Copyright terms: Public domain W3C validator