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

Theorem clwlksf1clwwlk 26842
 Description: There is a one-to-one function between the set of closed walks (defined as words) of length n and the set of closed walks of length n (in an undirected simple graph). (Contributed by Alexander van der Vekens, 5-Jul-2018.) (Revised by AV, 3-May-2021.)
Hypotheses
Ref Expression
clwlksfclwwlk.1 𝐴 = (1st𝑐)
clwlksfclwwlk.2 𝐵 = (2nd𝑐)
clwlksfclwwlk.c 𝐶 = {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁}
clwlksfclwwlk.f 𝐹 = (𝑐𝐶 ↦ (𝐵 substr ⟨0, (#‘𝐴)⟩))
Assertion
Ref Expression
clwlksf1clwwlk ((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶1-1→(𝑁 ClWWalksN 𝐺))
Distinct variable groups:   𝐺,𝑐   𝑁,𝑐   𝐶,𝑐   𝐹,𝑐
Allowed substitution hints:   𝐴(𝑐)   𝐵(𝑐)

Proof of Theorem clwlksf1clwwlk
Dummy variables 𝑖 𝑤 𝑢 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 clwlksfclwwlk.1 . . 3 𝐴 = (1st𝑐)
2 clwlksfclwwlk.2 . . 3 𝐵 = (2nd𝑐)
3 clwlksfclwwlk.c . . 3 𝐶 = {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁}
4 clwlksfclwwlk.f . . 3 𝐹 = (𝑐𝐶 ↦ (𝐵 substr ⟨0, (#‘𝐴)⟩))
51, 2, 3, 4clwlksfclwwlk 26835 . 2 ((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶⟶(𝑁 ClWWalksN 𝐺))
6 simprl 793 . . . . . 6 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → 𝑢𝐶)
7 ovex 6635 . . . . . 6 ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) ∈ V
8 fveq2 6150 . . . . . . . . 9 (𝑐 = 𝑢 → (2nd𝑐) = (2nd𝑢))
92, 8syl5eq 2667 . . . . . . . 8 (𝑐 = 𝑢𝐵 = (2nd𝑢))
10 fveq2 6150 . . . . . . . . . . 11 (𝑐 = 𝑢 → (1st𝑐) = (1st𝑢))
111, 10syl5eq 2667 . . . . . . . . . 10 (𝑐 = 𝑢𝐴 = (1st𝑢))
1211fveq2d 6154 . . . . . . . . 9 (𝑐 = 𝑢 → (#‘𝐴) = (#‘(1st𝑢)))
1312opeq2d 4379 . . . . . . . 8 (𝑐 = 𝑢 → ⟨0, (#‘𝐴)⟩ = ⟨0, (#‘(1st𝑢))⟩)
149, 13oveq12d 6625 . . . . . . 7 (𝑐 = 𝑢 → (𝐵 substr ⟨0, (#‘𝐴)⟩) = ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩))
1514, 4fvmptg 6239 . . . . . 6 ((𝑢𝐶 ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) ∈ V) → (𝐹𝑢) = ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩))
166, 7, 15sylancl 693 . . . . 5 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → (𝐹𝑢) = ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩))
17 simpr 477 . . . . . . . 8 ((𝑢𝐶𝑤𝐶) → 𝑤𝐶)
18 ovex 6635 . . . . . . . 8 ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) ∈ V
1917, 18jctir 560 . . . . . . 7 ((𝑢𝐶𝑤𝐶) → (𝑤𝐶 ∧ ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) ∈ V))
2019adantl 482 . . . . . 6 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → (𝑤𝐶 ∧ ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) ∈ V))
21 fveq2 6150 . . . . . . . . 9 (𝑐 = 𝑤 → (2nd𝑐) = (2nd𝑤))
222, 21syl5eq 2667 . . . . . . . 8 (𝑐 = 𝑤𝐵 = (2nd𝑤))
23 fveq2 6150 . . . . . . . . . . 11 (𝑐 = 𝑤 → (1st𝑐) = (1st𝑤))
241, 23syl5eq 2667 . . . . . . . . . 10 (𝑐 = 𝑤𝐴 = (1st𝑤))
2524fveq2d 6154 . . . . . . . . 9 (𝑐 = 𝑤 → (#‘𝐴) = (#‘(1st𝑤)))
2625opeq2d 4379 . . . . . . . 8 (𝑐 = 𝑤 → ⟨0, (#‘𝐴)⟩ = ⟨0, (#‘(1st𝑤))⟩)
2722, 26oveq12d 6625 . . . . . . 7 (𝑐 = 𝑤 → (𝐵 substr ⟨0, (#‘𝐴)⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩))
2827, 4fvmptg 6239 . . . . . 6 ((𝑤𝐶 ∧ ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) ∈ V) → (𝐹𝑤) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩))
2920, 28syl 17 . . . . 5 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → (𝐹𝑤) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩))
3016, 29eqeq12d 2636 . . . 4 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → ((𝐹𝑢) = (𝐹𝑤) ↔ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)))
311, 2, 3, 4clwlksfclwwlk1hashn 26832 . . . . . . . . 9 (𝑤𝐶 → (#‘(1st𝑤)) = 𝑁)
3231eqcomd 2627 . . . . . . . 8 (𝑤𝐶𝑁 = (#‘(1st𝑤)))
3332adantl 482 . . . . . . 7 ((𝑢𝐶𝑤𝐶) → 𝑁 = (#‘(1st𝑤)))
3433ad2antlr 762 . . . . . 6 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → 𝑁 = (#‘(1st𝑤)))
35 prmnn 15315 . . . . . . . . 9 (𝑁 ∈ ℙ → 𝑁 ∈ ℕ)
3635ad2antlr 762 . . . . . . . 8 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → 𝑁 ∈ ℕ)
3717adantl 482 . . . . . . . 8 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → 𝑤𝐶)
381, 2, 3, 4clwlksf1clwwlklem 26841 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝑢𝐶𝑤𝐶) → (((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) → ∀𝑖 ∈ (0...𝑁)((2nd𝑢)‘𝑖) = ((2nd𝑤)‘𝑖)))
3936, 6, 37, 38syl3anc 1323 . . . . . . 7 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → (((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) → ∀𝑖 ∈ (0...𝑁)((2nd𝑢)‘𝑖) = ((2nd𝑤)‘𝑖)))
4039imp 445 . . . . . 6 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → ∀𝑖 ∈ (0...𝑁)((2nd𝑢)‘𝑖) = ((2nd𝑤)‘𝑖))
41 fusgrusgr 26109 . . . . . . . . 9 (𝐺 ∈ FinUSGraph → 𝐺 ∈ USGraph )
42 usgruspgr 25973 . . . . . . . . 9 (𝐺 ∈ USGraph → 𝐺 ∈ USPGraph )
4341, 42syl 17 . . . . . . . 8 (𝐺 ∈ FinUSGraph → 𝐺 ∈ USPGraph )
4443ad3antrrr 765 . . . . . . 7 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → 𝐺 ∈ USPGraph )
45 elrabi 3343 . . . . . . . . . . 11 (𝑢 ∈ {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁} → 𝑢 ∈ (ClWalks‘𝐺))
46 clwlkwlk 26547 . . . . . . . . . . 11 (𝑢 ∈ (ClWalks‘𝐺) → 𝑢 ∈ (Walks‘𝐺))
4745, 46syl 17 . . . . . . . . . 10 (𝑢 ∈ {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁} → 𝑢 ∈ (Walks‘𝐺))
4847, 3eleq2s 2716 . . . . . . . . 9 (𝑢𝐶𝑢 ∈ (Walks‘𝐺))
49 elrabi 3343 . . . . . . . . . . 11 (𝑤 ∈ {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁} → 𝑤 ∈ (ClWalks‘𝐺))
50 clwlkwlk 26547 . . . . . . . . . . 11 (𝑤 ∈ (ClWalks‘𝐺) → 𝑤 ∈ (Walks‘𝐺))
5149, 50syl 17 . . . . . . . . . 10 (𝑤 ∈ {𝑐 ∈ (ClWalks‘𝐺) ∣ (#‘𝐴) = 𝑁} → 𝑤 ∈ (Walks‘𝐺))
5251, 3eleq2s 2716 . . . . . . . . 9 (𝑤𝐶𝑤 ∈ (Walks‘𝐺))
5348, 52anim12i 589 . . . . . . . 8 ((𝑢𝐶𝑤𝐶) → (𝑢 ∈ (Walks‘𝐺) ∧ 𝑤 ∈ (Walks‘𝐺)))
5453ad2antlr 762 . . . . . . 7 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → (𝑢 ∈ (Walks‘𝐺) ∧ 𝑤 ∈ (Walks‘𝐺)))
551, 2, 3, 4clwlksfclwwlk1hashn 26832 . . . . . . . . . 10 (𝑢𝐶 → (#‘(1st𝑢)) = 𝑁)
5655eqcomd 2627 . . . . . . . . 9 (𝑢𝐶𝑁 = (#‘(1st𝑢)))
5756adantr 481 . . . . . . . 8 ((𝑢𝐶𝑤𝐶) → 𝑁 = (#‘(1st𝑢)))
5857ad2antlr 762 . . . . . . 7 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → 𝑁 = (#‘(1st𝑢)))
59 uspgr2wlkeq 26418 . . . . . . 7 ((𝐺 ∈ USPGraph ∧ (𝑢 ∈ (Walks‘𝐺) ∧ 𝑤 ∈ (Walks‘𝐺)) ∧ 𝑁 = (#‘(1st𝑢))) → (𝑢 = 𝑤 ↔ (𝑁 = (#‘(1st𝑤)) ∧ ∀𝑖 ∈ (0...𝑁)((2nd𝑢)‘𝑖) = ((2nd𝑤)‘𝑖))))
6044, 54, 58, 59syl3anc 1323 . . . . . 6 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → (𝑢 = 𝑤 ↔ (𝑁 = (#‘(1st𝑤)) ∧ ∀𝑖 ∈ (0...𝑁)((2nd𝑢)‘𝑖) = ((2nd𝑤)‘𝑖))))
6134, 40, 60mpbir2and 956 . . . . 5 ((((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) ∧ ((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩)) → 𝑢 = 𝑤)
6261ex 450 . . . 4 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → (((2nd𝑢) substr ⟨0, (#‘(1st𝑢))⟩) = ((2nd𝑤) substr ⟨0, (#‘(1st𝑤))⟩) → 𝑢 = 𝑤))
6330, 62sylbid 230 . . 3 (((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) ∧ (𝑢𝐶𝑤𝐶)) → ((𝐹𝑢) = (𝐹𝑤) → 𝑢 = 𝑤))
6463ralrimivva 2965 . 2 ((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) → ∀𝑢𝐶𝑤𝐶 ((𝐹𝑢) = (𝐹𝑤) → 𝑢 = 𝑤))
65 dff13 6469 . 2 (𝐹:𝐶1-1→(𝑁 ClWWalksN 𝐺) ↔ (𝐹:𝐶⟶(𝑁 ClWWalksN 𝐺) ∧ ∀𝑢𝐶𝑤𝐶 ((𝐹𝑢) = (𝐹𝑤) → 𝑢 = 𝑤)))
665, 64, 65sylanbrc 697 1 ((𝐺 ∈ FinUSGraph ∧ 𝑁 ∈ ℙ) → 𝐹:𝐶1-1→(𝑁 ClWWalksN 𝐺))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 196   ∧ wa 384   = wceq 1480   ∈ wcel 1987  ∀wral 2907  {crab 2911  Vcvv 3186  ⟨cop 4156   ↦ cmpt 4675  ⟶wf 5845  –1-1→wf1 5846  ‘cfv 5849  (class class class)co 6607  1st c1st 7114  2nd c2nd 7115  0cc0 9883  ℕcn 10967  ...cfz 12271  #chash 13060   substr csubstr 13237  ℙcprime 15312   USPGraph cuspgr 25943   USGraph cusgr 25944   FinUSGraph cfusgr 26103  Walkscwlks 26369  ClWalkscclwlks 26542   ClWWalksN cclwwlksn 26750 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 4733  ax-sep 4743  ax-nul 4751  ax-pow 4805  ax-pr 4869  ax-un 6905  ax-cnex 9939  ax-resscn 9940  ax-1cn 9941  ax-icn 9942  ax-addcl 9943  ax-addrcl 9944  ax-mulcl 9945  ax-mulrcl 9946  ax-mulcom 9947  ax-addass 9948  ax-mulass 9949  ax-distr 9950  ax-i2m1 9951  ax-1ne0 9952  ax-1rid 9953  ax-rnegex 9954  ax-rrecex 9955  ax-cnre 9956  ax-pre-lttri 9957  ax-pre-lttrn 9958  ax-pre-ltadd 9959  ax-pre-mulgt0 9960  ax-pre-sup 9961 This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-ifp 1012  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 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3419  df-csb 3516  df-dif 3559  df-un 3561  df-in 3563  df-ss 3570  df-pss 3572  df-nul 3894  df-if 4061  df-pw 4134  df-sn 4151  df-pr 4153  df-tp 4155  df-op 4157  df-uni 4405  df-int 4443  df-iun 4489  df-br 4616  df-opab 4676  df-mpt 4677  df-tr 4715  df-eprel 4987  df-id 4991  df-po 4997  df-so 4998  df-fr 5035  df-we 5037  df-xp 5082  df-rel 5083  df-cnv 5084  df-co 5085  df-dm 5086  df-rn 5087  df-res 5088  df-ima 5089  df-pred 5641  df-ord 5687  df-on 5688  df-lim 5689  df-suc 5690  df-iota 5812  df-fun 5851  df-fn 5852  df-f 5853  df-f1 5854  df-fo 5855  df-f1o 5856  df-fv 5857  df-riota 6568  df-ov 6610  df-oprab 6611  df-mpt2 6612  df-om 7016  df-1st 7116  df-2nd 7117  df-wrecs 7355  df-recs 7416  df-rdg 7454  df-1o 7508  df-2o 7509  df-oadd 7512  df-er 7690  df-map 7807  df-pm 7808  df-en 7903  df-dom 7904  df-sdom 7905  df-fin 7906  df-sup 8295  df-card 8712  df-cda 8937  df-pnf 10023  df-mnf 10024  df-xr 10025  df-ltxr 10026  df-le 10027  df-sub 10215  df-neg 10216  df-div 10632  df-nn 10968  df-2 11026  df-3 11027  df-n0 11240  df-xnn0 11311  df-z 11325  df-uz 11635  df-rp 11780  df-fz 12272  df-fzo 12410  df-seq 12745  df-exp 12804  df-hash 13061  df-word 13241  df-lsw 13242  df-substr 13245  df-cj 13776  df-re 13777  df-im 13778  df-sqrt 13912  df-abs 13913  df-dvds 14911  df-prm 15313  df-edg 25847  df-uhgr 25856  df-upgr 25880  df-uspgr 25945  df-usgr 25946  df-fusgr 26104  df-wlks 26372  df-clwlks 26543  df-clwwlks 26751  df-clwwlksn 26752 This theorem is referenced by:  clwlksf1oclwwlk  26843
 Copyright terms: Public domain W3C validator