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

Theorem clwwlksfo 26778
Description: Lemma 4 for clwwlksbij 26780: F is an onto function. (Contributed by Alexander van der Vekens, 29-Sep-2018.) (Revised by AV, 26-Apr-2021.)
Hypotheses
Ref Expression
clwwlksbij.d 𝐷 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ( lastS ‘𝑤) = (𝑤‘0)}
clwwlksbij.f 𝐹 = (𝑡𝐷 ↦ (𝑡 substr ⟨0, 𝑁⟩))
Assertion
Ref Expression
clwwlksfo (𝑁 ∈ ℕ → 𝐹:𝐷onto→(𝑁 ClWWalksN 𝐺))
Distinct variable groups:   𝑤,𝐺   𝑤,𝑁   𝑡,𝐷   𝑡,𝐺,𝑤   𝑡,𝑁
Allowed substitution hints:   𝐷(𝑤)   𝐹(𝑤,𝑡)

Proof of Theorem clwwlksfo
Dummy variables 𝑖 𝑥 𝑝 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 clwwlksbij.d . . 3 𝐷 = {𝑤 ∈ (𝑁 WWalksN 𝐺) ∣ ( lastS ‘𝑤) = (𝑤‘0)}
2 clwwlksbij.f . . 3 𝐹 = (𝑡𝐷 ↦ (𝑡 substr ⟨0, 𝑁⟩))
31, 2clwwlksf 26775 . 2 (𝑁 ∈ ℕ → 𝐹:𝐷⟶(𝑁 ClWWalksN 𝐺))
4 eqid 2626 . . . . . . . 8 (Vtx‘𝐺) = (Vtx‘𝐺)
5 eqid 2626 . . . . . . . 8 (Edg‘𝐺) = (Edg‘𝐺)
64, 5clwwlknp 26748 . . . . . . 7 (𝑝 ∈ (𝑁 ClWWalksN 𝐺) → ((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)))
7 simpr 477 . . . . . . . . . 10 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → 𝑁 ∈ ℕ)
8 simpl1 1062 . . . . . . . . . 10 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → (𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁))
9 3simpc 1058 . . . . . . . . . . 11 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) → (∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)))
109adantr 481 . . . . . . . . . 10 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → (∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)))
111clwwlksel 26774 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ (𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ (∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺))) → (𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷)
127, 8, 10, 11syl3anc 1323 . . . . . . . . 9 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → (𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷)
13 opeq2 4376 . . . . . . . . . . . . . . 15 (𝑁 = (#‘𝑝) → ⟨0, 𝑁⟩ = ⟨0, (#‘𝑝)⟩)
1413eqcoms 2634 . . . . . . . . . . . . . 14 ((#‘𝑝) = 𝑁 → ⟨0, 𝑁⟩ = ⟨0, (#‘𝑝)⟩)
1514oveq2d 6621 . . . . . . . . . . . . 13 ((#‘𝑝) = 𝑁 → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩) = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩))
1615adantl 482 . . . . . . . . . . . 12 ((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩) = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩))
17163ad2ant1 1080 . . . . . . . . . . 11 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩) = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩))
1817adantr 481 . . . . . . . . . 10 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩) = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩))
19 simpll 789 . . . . . . . . . . . . 13 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ 𝑁 ∈ ℕ) → 𝑝 ∈ Word (Vtx‘𝐺))
20 fstwrdne0 13279 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ ∧ (𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁)) → (𝑝‘0) ∈ (Vtx‘𝐺))
2120ancoms 469 . . . . . . . . . . . . . 14 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ 𝑁 ∈ ℕ) → (𝑝‘0) ∈ (Vtx‘𝐺))
2221s1cld 13317 . . . . . . . . . . . . 13 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ 𝑁 ∈ ℕ) → ⟨“(𝑝‘0)”⟩ ∈ Word (Vtx‘𝐺))
2319, 22jca 554 . . . . . . . . . . . 12 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ 𝑁 ∈ ℕ) → (𝑝 ∈ Word (Vtx‘𝐺) ∧ ⟨“(𝑝‘0)”⟩ ∈ Word (Vtx‘𝐺)))
24233ad2antl1 1221 . . . . . . . . . . 11 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → (𝑝 ∈ Word (Vtx‘𝐺) ∧ ⟨“(𝑝‘0)”⟩ ∈ Word (Vtx‘𝐺)))
25 swrdccat1 13390 . . . . . . . . . . 11 ((𝑝 ∈ Word (Vtx‘𝐺) ∧ ⟨“(𝑝‘0)”⟩ ∈ Word (Vtx‘𝐺)) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩) = 𝑝)
2624, 25syl 17 . . . . . . . . . 10 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, (#‘𝑝)⟩) = 𝑝)
2718, 26eqtr2d 2661 . . . . . . . . 9 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → 𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩))
2812, 27jca 554 . . . . . . . 8 ((((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) ∧ 𝑁 ∈ ℕ) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩)))
2928ex 450 . . . . . . 7 (((𝑝 ∈ Word (Vtx‘𝐺) ∧ (#‘𝑝) = 𝑁) ∧ ∀𝑖 ∈ (0..^(𝑁 − 1)){(𝑝𝑖), (𝑝‘(𝑖 + 1))} ∈ (Edg‘𝐺) ∧ {( lastS ‘𝑝), (𝑝‘0)} ∈ (Edg‘𝐺)) → (𝑁 ∈ ℕ → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩))))
306, 29syl 17 . . . . . 6 (𝑝 ∈ (𝑁 ClWWalksN 𝐺) → (𝑁 ∈ ℕ → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩))))
3130impcom 446 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝑝 ∈ (𝑁 ClWWalksN 𝐺)) → ((𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩)))
32 oveq1 6612 . . . . . . 7 (𝑥 = (𝑝 ++ ⟨“(𝑝‘0)”⟩) → (𝑥 substr ⟨0, 𝑁⟩) = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩))
3332eqeq2d 2636 . . . . . 6 (𝑥 = (𝑝 ++ ⟨“(𝑝‘0)”⟩) → (𝑝 = (𝑥 substr ⟨0, 𝑁⟩) ↔ 𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩)))
3433rspcev 3300 . . . . 5 (((𝑝 ++ ⟨“(𝑝‘0)”⟩) ∈ 𝐷𝑝 = ((𝑝 ++ ⟨“(𝑝‘0)”⟩) substr ⟨0, 𝑁⟩)) → ∃𝑥𝐷 𝑝 = (𝑥 substr ⟨0, 𝑁⟩))
3531, 34syl 17 . . . 4 ((𝑁 ∈ ℕ ∧ 𝑝 ∈ (𝑁 ClWWalksN 𝐺)) → ∃𝑥𝐷 𝑝 = (𝑥 substr ⟨0, 𝑁⟩))
361, 2clwwlksfv 26776 . . . . . . 7 (𝑥𝐷 → (𝐹𝑥) = (𝑥 substr ⟨0, 𝑁⟩))
3736eqeq2d 2636 . . . . . 6 (𝑥𝐷 → (𝑝 = (𝐹𝑥) ↔ 𝑝 = (𝑥 substr ⟨0, 𝑁⟩)))
3837adantl 482 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝑝 ∈ (𝑁 ClWWalksN 𝐺)) ∧ 𝑥𝐷) → (𝑝 = (𝐹𝑥) ↔ 𝑝 = (𝑥 substr ⟨0, 𝑁⟩)))
3938rexbidva 3047 . . . 4 ((𝑁 ∈ ℕ ∧ 𝑝 ∈ (𝑁 ClWWalksN 𝐺)) → (∃𝑥𝐷 𝑝 = (𝐹𝑥) ↔ ∃𝑥𝐷 𝑝 = (𝑥 substr ⟨0, 𝑁⟩)))
4035, 39mpbird 247 . . 3 ((𝑁 ∈ ℕ ∧ 𝑝 ∈ (𝑁 ClWWalksN 𝐺)) → ∃𝑥𝐷 𝑝 = (𝐹𝑥))
4140ralrimiva 2965 . 2 (𝑁 ∈ ℕ → ∀𝑝 ∈ (𝑁 ClWWalksN 𝐺)∃𝑥𝐷 𝑝 = (𝐹𝑥))
42 dffo3 6331 . 2 (𝐹:𝐷onto→(𝑁 ClWWalksN 𝐺) ↔ (𝐹:𝐷⟶(𝑁 ClWWalksN 𝐺) ∧ ∀𝑝 ∈ (𝑁 ClWWalksN 𝐺)∃𝑥𝐷 𝑝 = (𝐹𝑥)))
433, 41, 42sylanbrc 697 1 (𝑁 ∈ ℕ → 𝐹:𝐷onto→(𝑁 ClWWalksN 𝐺))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384  w3a 1036   = wceq 1480  wcel 1992  wral 2912  wrex 2913  {crab 2916  {cpr 4155  cop 4159  cmpt 4678  wf 5846  ontowfo 5848  cfv 5850  (class class class)co 6605  0cc0 9881  1c1 9882   + caddc 9884  cmin 10211  cn 10965  ..^cfzo 12403  #chash 13054  Word cword 13225   lastS clsw 13226   ++ cconcat 13227  ⟨“cs1 13228   substr csubstr 13229  Vtxcvtx 25769  Edgcedg 25834   WWalksN cwwlksn 26581   ClWWalksN cclwwlksn 26737
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 1841  ax-6 1890  ax-7 1937  ax-8 1994  ax-9 2001  ax-10 2021  ax-11 2036  ax-12 2049  ax-13 2250  ax-ext 2606  ax-rep 4736  ax-sep 4746  ax-nul 4754  ax-pow 4808  ax-pr 4872  ax-un 6903  ax-cnex 9937  ax-resscn 9938  ax-1cn 9939  ax-icn 9940  ax-addcl 9941  ax-addrcl 9942  ax-mulcl 9943  ax-mulrcl 9944  ax-mulcom 9945  ax-addass 9946  ax-mulass 9947  ax-distr 9948  ax-i2m1 9949  ax-1ne0 9950  ax-1rid 9951  ax-rnegex 9952  ax-rrecex 9953  ax-cnre 9954  ax-pre-lttri 9955  ax-pre-lttrn 9956  ax-pre-ltadd 9957  ax-pre-mulgt0 9958
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 1883  df-eu 2478  df-mo 2479  df-clab 2613  df-cleq 2619  df-clel 2622  df-nfc 2756  df-ne 2797  df-nel 2900  df-ral 2917  df-rex 2918  df-reu 2919  df-rab 2921  df-v 3193  df-sbc 3423  df-csb 3520  df-dif 3563  df-un 3565  df-in 3567  df-ss 3574  df-pss 3576  df-nul 3897  df-if 4064  df-pw 4137  df-sn 4154  df-pr 4156  df-tp 4158  df-op 4160  df-uni 4408  df-int 4446  df-iun 4492  df-br 4619  df-opab 4679  df-mpt 4680  df-tr 4718  df-eprel 4990  df-id 4994  df-po 5000  df-so 5001  df-fr 5038  df-we 5040  df-xp 5085  df-rel 5086  df-cnv 5087  df-co 5088  df-dm 5089  df-rn 5090  df-res 5091  df-ima 5092  df-pred 5642  df-ord 5688  df-on 5689  df-lim 5690  df-suc 5691  df-iota 5813  df-fun 5852  df-fn 5853  df-f 5854  df-f1 5855  df-fo 5856  df-f1o 5857  df-fv 5858  df-riota 6566  df-ov 6608  df-oprab 6609  df-mpt2 6610  df-om 7014  df-1st 7116  df-2nd 7117  df-wrecs 7353  df-recs 7414  df-rdg 7452  df-1o 7506  df-oadd 7510  df-er 7688  df-map 7805  df-pm 7806  df-en 7901  df-dom 7902  df-sdom 7903  df-fin 7904  df-card 8710  df-pnf 10021  df-mnf 10022  df-xr 10023  df-ltxr 10024  df-le 10025  df-sub 10213  df-neg 10214  df-nn 10966  df-n0 11238  df-xnn0 11309  df-z 11323  df-uz 11632  df-rp 11777  df-fz 12266  df-fzo 12404  df-hash 13055  df-word 13233  df-lsw 13234  df-concat 13235  df-s1 13236  df-substr 13237  df-wwlks 26585  df-wwlksn 26586  df-clwwlks 26738  df-clwwlksn 26739
This theorem is referenced by:  clwwlksf1o  26779
  Copyright terms: Public domain W3C validator