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

Theorem wwlksnextprop 26875
 Description: Adding additional properties to the set of walks (as words) of a fixed length starting at a fixed vertex. (Contributed by Alexander van der Vekens, 1-Aug-2018.) (Revised by AV, 20-Apr-2021.)
Hypotheses
Ref Expression
wwlksnextprop.x 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
wwlksnextprop.e 𝐸 = (Edg‘𝐺)
wwlksnextprop.y 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
Assertion
Ref Expression
wwlksnextprop (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)})
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑤,𝑃   𝑦,𝐸   𝑥,𝑁,𝑦   𝑦,𝑃   𝑦,𝑋   𝑦,𝑌   𝑥,𝑤
Allowed substitution hints:   𝑃(𝑥)   𝐸(𝑥,𝑤)   𝐺(𝑥,𝑦)   𝑋(𝑥,𝑤)   𝑌(𝑥,𝑤)

Proof of Theorem wwlksnextprop
StepHypRef Expression
1 eqidd 2652 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩))
2 wwlksnextprop.x . . . . . . . . 9 𝑋 = ((𝑁 + 1) WWalksN 𝐺)
32wwlksnextproplem1 26872 . . . . . . . 8 ((𝑥𝑋𝑁 ∈ ℕ0) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
43ancoms 468 . . . . . . 7 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
54adantr 480 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0))
6 eqeq2 2662 . . . . . . 7 ((𝑥‘0) = 𝑃 → (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
76adantl 481 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = (𝑥‘0) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
85, 7mpbid 222 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃)
9 wwlksnextprop.e . . . . . . . 8 𝐸 = (Edg‘𝐺)
102, 9wwlksnextproplem2 26873 . . . . . . 7 ((𝑥𝑋𝑁 ∈ ℕ0) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
1110ancoms 468 . . . . . 6 ((𝑁 ∈ ℕ0𝑥𝑋) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
1211adantr 480 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)
13 simpr 476 . . . . . . . 8 ((𝑁 ∈ ℕ0𝑥𝑋) → 𝑥𝑋)
1413adantr 480 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑥𝑋)
15 simpr 476 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥‘0) = 𝑃)
16 simpll 805 . . . . . . 7 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → 𝑁 ∈ ℕ0)
17 wwlksnextprop.y . . . . . . . 8 𝑌 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ (𝑤‘0) = 𝑃}
182, 9, 17wwlksnextproplem3 26874 . . . . . . 7 ((𝑥𝑋 ∧ (𝑥‘0) = 𝑃𝑁 ∈ ℕ0) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∈ 𝑌)
1914, 15, 16, 18syl3anc 1366 . . . . . 6 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∈ 𝑌)
20 eqeq2 2662 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ↔ (𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩)))
21 fveq1 6228 . . . . . . . . 9 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → (𝑦‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
2221eqeq1d 2653 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ((𝑦‘0) = 𝑃 ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
23 fveq2 6229 . . . . . . . . . 10 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ( lastS ‘𝑦) = ( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)))
2423preq1d 4306 . . . . . . . . 9 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → {( lastS ‘𝑦), ( lastS ‘𝑥)} = {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)})
2524eleq1d 2715 . . . . . . . 8 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → ({( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸 ↔ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸))
2620, 22, 253anbi123d 1439 . . . . . . 7 (𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)))
2726adantl 481 . . . . . 6 ((((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) ∧ 𝑦 = (𝑥 substr ⟨0, (𝑁 + 1)⟩)) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸)))
2819, 27rspcedv 3344 . . . . 5 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = (𝑥 substr ⟨0, (𝑁 + 1)⟩) ∧ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 ∧ {( lastS ‘(𝑥 substr ⟨0, (𝑁 + 1)⟩)), ( lastS ‘𝑥)} ∈ 𝐸) → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
291, 8, 12, 28mp3and 1467 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ (𝑥‘0) = 𝑃) → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸))
3029ex 449 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 → ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
3121eqcoms 2659 . . . . . . . . 9 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → (𝑦‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3231eqeq1d 2653 . . . . . . . 8 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → ((𝑦‘0) = 𝑃 ↔ ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃))
333eqcomd 2657 . . . . . . . . . . 11 ((𝑥𝑋𝑁 ∈ ℕ0) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3433ancoms 468 . . . . . . . . . 10 ((𝑁 ∈ ℕ0𝑥𝑋) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
3534adantr 480 . . . . . . . . 9 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0))
36 eqeq2 2662 . . . . . . . . . 10 (𝑃 = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0)))
3736eqcoms 2659 . . . . . . . . 9 (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 → ((𝑥‘0) = 𝑃 ↔ (𝑥‘0) = ((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0)))
3835, 37syl5ibr 236 . . . . . . . 8 (((𝑥 substr ⟨0, (𝑁 + 1)⟩)‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
3932, 38syl6bi 243 . . . . . . 7 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 → ((𝑦‘0) = 𝑃 → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃)))
4039imp 444 . . . . . 6 (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
41403adant3 1101 . . . . 5 (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (𝑥‘0) = 𝑃))
4241com12 32 . . . 4 (((𝑁 ∈ ℕ0𝑥𝑋) ∧ 𝑦𝑌) → (((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4342rexlimdva 3060 . . 3 ((𝑁 ∈ ℕ0𝑥𝑋) → (∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸) → (𝑥‘0) = 𝑃))
4430, 43impbid 202 . 2 ((𝑁 ∈ ℕ0𝑥𝑋) → ((𝑥‘0) = 𝑃 ↔ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)))
4544rabbidva 3219 1 (𝑁 ∈ ℕ0 → {𝑥𝑋 ∣ (𝑥‘0) = 𝑃} = {𝑥𝑋 ∣ ∃𝑦𝑌 ((𝑥 substr ⟨0, (𝑁 + 1)⟩) = 𝑦 ∧ (𝑦‘0) = 𝑃 ∧ {( lastS ‘𝑦), ( lastS ‘𝑥)} ∈ 𝐸)})
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 196   ∧ wa 383   ∧ w3a 1054   = wceq 1523   ∈ wcel 2030  ∃wrex 2942  {crab 2945  {cpr 4212  ⟨cop 4216  ‘cfv 5926  (class class class)co 6690  0cc0 9974  1c1 9975   + caddc 9977  ℕ0cn0 11330   lastS clsw 13324   substr csubstr 13327  Edgcedg 25984   WWalksN cwwlksn 26774 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-rep 4804  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051 This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-map 7901  df-pm 7902  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-2 11117  df-n0 11331  df-z 11416  df-uz 11726  df-fz 12365  df-fzo 12505  df-hash 13158  df-word 13331  df-lsw 13332  df-substr 13335  df-wwlks 26778  df-wwlksn 26779 This theorem is referenced by: (None)
 Copyright terms: Public domain W3C validator