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

Theorem wwlksnextwrd 27096
Description: Lemma for wwlksnextbij 27101. (Contributed by Alexander van der Vekens, 5-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‘𝑤)} ∈ 𝐸)}
Assertion
Ref Expression
wwlksnextwrd (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 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) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)}
2 3anass 1116 . . . . 5 (((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) ↔ ((♯‘𝑤) = (𝑁 + 2) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)))
32bianass 632 . . . 4 ((𝑤 ∈ Word 𝑉 ∧ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)))
4 wwlksnextbij0.v . . . . . . . . . . 11 𝑉 = (Vtx‘𝐺)
54wwlknbp 27025 . . . . . . . . . 10 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉))
6 simpl 474 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑁 ∈ ℕ0)
7 simpl 474 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ Word 𝑉)
8 nn0re 11547 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0𝑁 ∈ ℝ)
9 2re 11345 . . . . . . . . . . . . . . . . . . . . 21 2 ∈ ℝ
109a1i 11 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 2 ∈ ℝ)
11 nn0ge0 11564 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 0 ≤ 𝑁)
12 2pos 11381 . . . . . . . . . . . . . . . . . . . . 21 0 < 2
1312a1i 11 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → 0 < 2)
148, 10, 11, 13addgegt0d 10854 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → 0 < (𝑁 + 2))
1514adantr 472 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 0 < (𝑁 + 2))
16 breq2 4812 . . . . . . . . . . . . . . . . . . 19 ((♯‘𝑤) = (𝑁 + 2) → (0 < (♯‘𝑤) ↔ 0 < (𝑁 + 2)))
1716ad2antll 720 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (0 < (♯‘𝑤) ↔ 0 < (𝑁 + 2)))
1815, 17mpbird 248 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 0 < (♯‘𝑤))
19 hashgt0n0 13357 . . . . . . . . . . . . . . . . 17 ((𝑤 ∈ Word 𝑉 ∧ 0 < (♯‘𝑤)) → 𝑤 ≠ ∅)
207, 18, 19syl2an2 677 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → 𝑤 ≠ ∅)
21 lswcl 13538 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉𝑤 ≠ ∅) → (lastS‘𝑤) ∈ 𝑉)
227, 20, 21syl2an2 677 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (lastS‘𝑤) ∈ 𝑉)
2322adantrr 708 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (lastS‘𝑤) ∈ 𝑉)
24 swrdcl 13619 . . . . . . . . . . . . . . . . . . . . 21 (𝑤 ∈ Word 𝑉 → (𝑤 substr ⟨0, (𝑁 + 1)⟩) ∈ Word 𝑉)
25 eleq1 2831 . . . . . . . . . . . . . . . . . . . . 21 (𝑊 = (𝑤 substr ⟨0, (𝑁 + 1)⟩) → (𝑊 ∈ Word 𝑉 ↔ (𝑤 substr ⟨0, (𝑁 + 1)⟩) ∈ Word 𝑉))
2624, 25syl5ibr 237 . . . . . . . . . . . . . . . . . . . 20 (𝑊 = (𝑤 substr ⟨0, (𝑁 + 1)⟩) → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2726eqcoms 2772 . . . . . . . . . . . . . . . . . . 19 ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2827adantr 472 . . . . . . . . . . . . . . . . . 18 (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → (𝑤 ∈ Word 𝑉𝑊 ∈ Word 𝑉))
2928com12 32 . . . . . . . . . . . . . . . . 17 (𝑤 ∈ Word 𝑉 → (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → 𝑊 ∈ Word 𝑉))
3029adantr 472 . . . . . . . . . . . . . . . 16 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → 𝑊 ∈ Word 𝑉))
3130imp 395 . . . . . . . . . . . . . . 15 (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑊 ∈ Word 𝑉)
3231adantl 473 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑊 ∈ Word 𝑉)
33 oveq1 6848 . . . . . . . . . . . . . . . . . 18 (𝑊 = (𝑤 substr ⟨0, (𝑁 + 1)⟩) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
3433eqcoms 2772 . . . . . . . . . . . . . . . . 17 ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
3534adantr 472 . . . . . . . . . . . . . . . 16 (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
3635ad2antll 720 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
37 oveq1 6848 . . . . . . . . . . . . . . . . . . . . . 22 ((♯‘𝑤) = (𝑁 + 2) → ((♯‘𝑤) − 1) = ((𝑁 + 2) − 1))
3837adantl 473 . . . . . . . . . . . . . . . . . . . . 21 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → ((♯‘𝑤) − 1) = ((𝑁 + 2) − 1))
39 nn0cn 11548 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑁 ∈ ℕ0𝑁 ∈ ℂ)
40 2cnd 11349 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑁 ∈ ℕ0 → 2 ∈ ℂ)
41 1cnd 10287 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑁 ∈ ℕ0 → 1 ∈ ℂ)
4239, 40, 41addsubassd 10665 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → ((𝑁 + 2) − 1) = (𝑁 + (2 − 1)))
43 2m1e1 11404 . . . . . . . . . . . . . . . . . . . . . . . 24 (2 − 1) = 1
4443a1i 11 . . . . . . . . . . . . . . . . . . . . . . 23 (𝑁 ∈ ℕ0 → (2 − 1) = 1)
4544oveq2d 6857 . . . . . . . . . . . . . . . . . . . . . 22 (𝑁 ∈ ℕ0 → (𝑁 + (2 − 1)) = (𝑁 + 1))
4642, 45eqtrd 2798 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ0 → ((𝑁 + 2) − 1) = (𝑁 + 1))
4738, 46sylan9eqr 2820 . . . . . . . . . . . . . . . . . . . 20 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((♯‘𝑤) − 1) = (𝑁 + 1))
4847opeq2d 4565 . . . . . . . . . . . . . . . . . . 19 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ⟨0, ((♯‘𝑤) − 1)⟩ = ⟨0, (𝑁 + 1)⟩)
4948oveq2d 6857 . . . . . . . . . . . . . . . . . 18 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → (𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) = (𝑤 substr ⟨0, (𝑁 + 1)⟩))
5049oveq1d 6856 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩))
51 swrdccatwrdOLD 13707 . . . . . . . . . . . . . . . . . 18 ((𝑤 ∈ Word 𝑉𝑤 ≠ ∅) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
527, 20, 51syl2an2 677 . . . . . . . . . . . . . . . . 17 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 substr ⟨0, ((♯‘𝑤) − 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5350, 52eqtr3d 2800 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0 ∧ (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))) → ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5453adantrr 708 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → ((𝑤 substr ⟨0, (𝑁 + 1)⟩) ++ ⟨“(lastS‘𝑤)”⟩) = 𝑤)
5536, 54eqtr2d 2799 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → 𝑤 = (𝑊 ++ ⟨“(lastS‘𝑤)”⟩))
56 simprrr 800 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)
57 wwlksnextbij0.e . . . . . . . . . . . . . . 15 𝐸 = (Edg‘𝐺)
584, 57wwlksnextbi 27093 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ0 ∧ (lastS‘𝑤) ∈ 𝑉) ∧ (𝑊 ∈ Word 𝑉𝑤 = (𝑊 ++ ⟨“(lastS‘𝑤)”⟩) ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ 𝑊 ∈ (𝑁 WWalksN 𝐺)))
596, 23, 32, 55, 56, 58syl23anc 1496 . . . . . . . . . . . . 13 ((𝑁 ∈ ℕ0 ∧ ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ↔ 𝑊 ∈ (𝑁 WWalksN 𝐺)))
6059exbiri 845 . . . . . . . . . . . 12 (𝑁 ∈ ℕ0 → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
6160com23 86 . . . . . . . . . . 11 (𝑁 ∈ ℕ0 → (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
62613ad2ant2 1164 . . . . . . . . . 10 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
635, 62mpcom 38 . . . . . . . . 9 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
6463expcomd 406 . . . . . . . 8 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
6564imp 395 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) → 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
664, 57wwlknp 27026 . . . . . . . . . . . 12 (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1) ∧ ∀𝑖 ∈ (0..^(𝑁 + 1)){(𝑤𝑖), (𝑤‘(𝑖 + 1))} ∈ 𝐸))
6739, 41, 41addassd 10315 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + (1 + 1)))
68 1p1e2 11403 . . . . . . . . . . . . . . . . . . . . . 22 (1 + 1) = 2
6968a1i 11 . . . . . . . . . . . . . . . . . . . . 21 (𝑁 ∈ ℕ0 → (1 + 1) = 2)
7069oveq2d 6857 . . . . . . . . . . . . . . . . . . . 20 (𝑁 ∈ ℕ0 → (𝑁 + (1 + 1)) = (𝑁 + 2))
7167, 70eqtrd 2798 . . . . . . . . . . . . . . . . . . 19 (𝑁 ∈ ℕ0 → ((𝑁 + 1) + 1) = (𝑁 + 2))
7271eqeq2d 2774 . . . . . . . . . . . . . . . . . 18 (𝑁 ∈ ℕ0 → ((♯‘𝑤) = ((𝑁 + 1) + 1) ↔ (♯‘𝑤) = (𝑁 + 2)))
7372biimpd 220 . . . . . . . . . . . . . . . . 17 (𝑁 ∈ ℕ0 → ((♯‘𝑤) = ((𝑁 + 1) + 1) → (♯‘𝑤) = (𝑁 + 2)))
7473adantr 472 . . . . . . . . . . . . . . . 16 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → ((♯‘𝑤) = ((𝑁 + 1) + 1) → (♯‘𝑤) = (𝑁 + 2)))
7574com12 32 . . . . . . . . . . . . . . 15 ((♯‘𝑤) = ((𝑁 + 1) + 1) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (♯‘𝑤) = (𝑁 + 2)))
7675adantl 473 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (♯‘𝑤) = (𝑁 + 2)))
77 simpl 474 . . . . . . . . . . . . . 14 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → 𝑤 ∈ Word 𝑉)
7876, 77jctild 521 . . . . . . . . . . . . 13 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1)) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
79783adant3 1162 . . . . . . . . . . . 12 ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = ((𝑁 + 1) + 1) ∧ ∀𝑖 ∈ (0..^(𝑁 + 1)){(𝑤𝑖), (𝑤‘(𝑖 + 1))} ∈ 𝐸) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8066, 79syl 17 . . . . . . . . . . 11 (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8180com12 32 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
82813adant1 1160 . . . . . . . . 9 ((𝐺 ∈ V ∧ 𝑁 ∈ ℕ0𝑊 ∈ Word 𝑉) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
835, 82syl 17 . . . . . . . 8 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8483adantr 472 . . . . . . 7 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) → (𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2))))
8565, 84impbid 203 . . . . . 6 ((𝑊 ∈ (𝑁 WWalksN 𝐺) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ↔ 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺)))
8685ex 401 . . . . 5 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸) → ((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ↔ 𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺))))
8786pm5.32rd 573 . . . 4 (𝑊 ∈ (𝑁 WWalksN 𝐺) → (((𝑤 ∈ Word 𝑉 ∧ (♯‘𝑤) = (𝑁 + 2)) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))))
883, 87syl5bb 274 . . 3 (𝑊 ∈ (𝑁 WWalksN 𝐺) → ((𝑤 ∈ Word 𝑉 ∧ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)) ↔ (𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∧ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸))))
8988rabbidva2 3334 . 2 (𝑊 ∈ (𝑁 WWalksN 𝐺) → {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = (𝑁 + 2) ∧ (𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)} = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)})
901, 89syl5eq 2810 1 (𝑊 ∈ (𝑁 WWalksN 𝐺) → 𝐷 = {𝑤 ∈ ((𝑁 + 1) WWalksN 𝐺) ∣ ((𝑤 substr ⟨0, (𝑁 + 1)⟩) = 𝑊 ∧ {(lastS‘𝑊), (lastS‘𝑤)} ∈ 𝐸)})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 197  wa 384  w3a 1107   = wceq 1652  wcel 2155  wne 2936  wral 3054  {crab 3058  Vcvv 3349  c0 4078  {cpr 4335  cop 4339   class class class wbr 4808  cfv 6067  (class class class)co 6841  cr 10187  0cc0 10188  1c1 10189   + caddc 10191   < clt 10327  cmin 10519  2c2 11326  0cn0 11537  ..^cfzo 12672  chash 13320  Word cword 13485  lastSclsw 13532   ++ cconcat 13540  ⟨“cs1 13565   substr csubstr 13615  Vtxcvtx 26164  Edgcedg 26215   WWalksN cwwlksn 27009
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1890  ax-4 1904  ax-5 2005  ax-6 2069  ax-7 2105  ax-8 2157  ax-9 2164  ax-10 2183  ax-11 2198  ax-12 2211  ax-13 2349  ax-ext 2742  ax-rep 4929  ax-sep 4940  ax-nul 4948  ax-pow 5000  ax-pr 5061  ax-un 7146  ax-cnex 10244  ax-resscn 10245  ax-1cn 10246  ax-icn 10247  ax-addcl 10248  ax-addrcl 10249  ax-mulcl 10250  ax-mulrcl 10251  ax-mulcom 10252  ax-addass 10253  ax-mulass 10254  ax-distr 10255  ax-i2m1 10256  ax-1ne0 10257  ax-1rid 10258  ax-rnegex 10259  ax-rrecex 10260  ax-cnre 10261  ax-pre-lttri 10262  ax-pre-lttrn 10263  ax-pre-ltadd 10264  ax-pre-mulgt0 10265
This theorem depends on definitions:  df-bi 198  df-an 385  df-or 874  df-3or 1108  df-3an 1109  df-tru 1656  df-ex 1875  df-nf 1879  df-sb 2062  df-mo 2564  df-eu 2581  df-clab 2751  df-cleq 2757  df-clel 2760  df-nfc 2895  df-ne 2937  df-nel 3040  df-ral 3059  df-rex 3060  df-reu 3061  df-rab 3063  df-v 3351  df-sbc 3596  df-csb 3691  df-dif 3734  df-un 3736  df-in 3738  df-ss 3745  df-pss 3747  df-nul 4079  df-if 4243  df-pw 4316  df-sn 4334  df-pr 4336  df-tp 4338  df-op 4340  df-uni 4594  df-int 4633  df-iun 4677  df-br 4809  df-opab 4871  df-mpt 4888  df-tr 4911  df-id 5184  df-eprel 5189  df-po 5197  df-so 5198  df-fr 5235  df-we 5237  df-xp 5282  df-rel 5283  df-cnv 5284  df-co 5285  df-dm 5286  df-rn 5287  df-res 5288  df-ima 5289  df-pred 5864  df-ord 5910  df-on 5911  df-lim 5912  df-suc 5913  df-iota 6030  df-fun 6069  df-fn 6070  df-f 6071  df-f1 6072  df-fo 6073  df-f1o 6074  df-fv 6075  df-riota 6802  df-ov 6844  df-oprab 6845  df-mpt2 6846  df-om 7263  df-1st 7365  df-2nd 7366  df-wrecs 7609  df-recs 7671  df-rdg 7709  df-1o 7763  df-oadd 7767  df-er 7946  df-map 8061  df-pm 8062  df-en 8160  df-dom 8161  df-sdom 8162  df-fin 8163  df-card 9015  df-pnf 10329  df-mnf 10330  df-xr 10331  df-ltxr 10332  df-le 10333  df-sub 10521  df-neg 10522  df-nn 11274  df-2 11334  df-n0 11538  df-xnn0 11610  df-z 11624  df-uz 11886  df-fz 12533  df-fzo 12673  df-hash 13321  df-word 13486  df-lsw 13533  df-concat 13541  df-s1 13566  df-substr 13616  df-wwlks 27013  df-wwlksn 27014
This theorem is referenced by:  wwlksnextsur  27099  wwlksnextbij  27101
  Copyright terms: Public domain W3C validator