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

Theorem konigsberg 27436
Description: The Königsberg Bridge problem. If 𝐺 is the Königsberg graph, i.e. a graph on four vertices 0, 1, 2, 3, with edges {0, 1}, {0, 2}, {0, 3}, {1, 2}, {1, 2}, {2, 3}, {2, 3}, then vertices 0, 1, 3 each have degree three, and 2 has degree five, so there are four vertices of odd degree and thus by eulerpath 27420 the graph cannot have an Eulerian path. It is sufficient to show that there are 3 vertices of odd degree, since a graph having an Eulerian path can only have 0 or 2 vertices of odd degree. This is Metamath 100 proof #54. (Contributed by Mario Carneiro, 11-Mar-2015.) (Revised by Mario Carneiro, 28-Feb-2016.) (Revised by AV, 9-Mar-2021.)
Hypotheses
Ref Expression
konigsberg.v 𝑉 = (0...3)
konigsberg.e 𝐸 = ⟨“{0, 1} {0, 2} {0, 3} {1, 2} {1, 2} {2, 3} {2, 3}”⟩
konigsberg.g 𝐺 = ⟨𝑉, 𝐸
Assertion
Ref Expression
konigsberg (EulerPaths‘𝐺) = ∅

Proof of Theorem konigsberg
Dummy variable 𝑥 is distinct from all other variables.
StepHypRef Expression
1 konigsberg.v . . . 4 𝑉 = (0...3)
2 konigsberg.e . . . 4 𝐸 = ⟨“{0, 1} {0, 2} {0, 3} {1, 2} {1, 2} {2, 3} {2, 3}”⟩
3 konigsberg.g . . . 4 𝐺 = ⟨𝑉, 𝐸
41, 2, 3konigsberglem5 27435 . . 3 2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)})
5 elpri 4338 . . . 4 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 ∨ (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2))
6 2pos 11317 . . . . . . 7 0 < 2
7 0re 10245 . . . . . . . 8 0 ∈ ℝ
8 2re 11295 . . . . . . . 8 2 ∈ ℝ
97, 8ltnsymi 10361 . . . . . . 7 (0 < 2 → ¬ 2 < 0)
106, 9ax-mp 5 . . . . . 6 ¬ 2 < 0
11 breq2 4791 . . . . . 6 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 → (2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ↔ 2 < 0))
1210, 11mtbiri 316 . . . . 5 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 → ¬ 2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
138ltnri 10351 . . . . . 6 ¬ 2 < 2
14 breq2 4791 . . . . . 6 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2 → (2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ↔ 2 < 2))
1513, 14mtbiri 316 . . . . 5 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2 → ¬ 2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
1612, 15jaoi 846 . . . 4 (((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 ∨ (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2) → ¬ 2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
175, 16syl 17 . . 3 ((♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → ¬ 2 < (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
184, 17mt2 191 . 2 ¬ (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2}
191, 2, 3konigsbergumgr 27430 . . . . 5 𝐺 ∈ UMGraph
20 umgrupgr 26218 . . . . 5 (𝐺 ∈ UMGraph → 𝐺 ∈ UPGraph)
2119, 20ax-mp 5 . . . 4 𝐺 ∈ UPGraph
223fveq2i 6336 . . . . . 6 (Vtx‘𝐺) = (Vtx‘⟨𝑉, 𝐸⟩)
23 ovex 6826 . . . . . . . 8 (0...3) ∈ V
241, 23eqeltri 2846 . . . . . . 7 𝑉 ∈ V
25 s7cli 13838 . . . . . . . 8 ⟨“{0, 1} {0, 2} {0, 3} {1, 2} {1, 2} {2, 3} {2, 3}”⟩ ∈ Word V
262, 25eqeltri 2846 . . . . . . 7 𝐸 ∈ Word V
27 opvtxfv 26104 . . . . . . 7 ((𝑉 ∈ V ∧ 𝐸 ∈ Word V) → (Vtx‘⟨𝑉, 𝐸⟩) = 𝑉)
2824, 26, 27mp2an 672 . . . . . 6 (Vtx‘⟨𝑉, 𝐸⟩) = 𝑉
2922, 28eqtr2i 2794 . . . . 5 𝑉 = (Vtx‘𝐺)
3029eulerpath 27420 . . . 4 ((𝐺 ∈ UPGraph ∧ (EulerPaths‘𝐺) ≠ ∅) → (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2})
3121, 30mpan 670 . . 3 ((EulerPaths‘𝐺) ≠ ∅ → (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2})
3231necon1bi 2971 . 2 (¬ (♯‘{𝑥𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → (EulerPaths‘𝐺) = ∅)
3318, 32ax-mp 5 1 (EulerPaths‘𝐺) = ∅
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wo 836   = wceq 1631  wcel 2145  wne 2943  {crab 3065  Vcvv 3351  c0 4063  {cpr 4319  cop 4323   class class class wbr 4787  cfv 6030  (class class class)co 6795  0cc0 10141  1c1 10142   < clt 10279  2c2 11275  3c3 11276  ...cfz 12532  chash 13320  Word cword 13486  ⟨“cs7 13799  cdvds 15188  Vtxcvtx 26094  UPGraphcupgr 26195  UMGraphcumgr 26196  VtxDegcvtxdg 26595  EulerPathsceupth 27376
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-8 2147  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-rep 4905  ax-sep 4916  ax-nul 4924  ax-pow 4975  ax-pr 5035  ax-un 7099  ax-cnex 10197  ax-resscn 10198  ax-1cn 10199  ax-icn 10200  ax-addcl 10201  ax-addrcl 10202  ax-mulcl 10203  ax-mulrcl 10204  ax-mulcom 10205  ax-addass 10206  ax-mulass 10207  ax-distr 10208  ax-i2m1 10209  ax-1ne0 10210  ax-1rid 10211  ax-rnegex 10212  ax-rrecex 10213  ax-cnre 10214  ax-pre-lttri 10215  ax-pre-lttrn 10216  ax-pre-ltadd 10217  ax-pre-mulgt0 10218  ax-pre-sup 10219
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 837  df-ifp 1050  df-3or 1072  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-nel 3047  df-ral 3066  df-rex 3067  df-reu 3068  df-rmo 3069  df-rab 3070  df-v 3353  df-sbc 3588  df-csb 3683  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-pss 3739  df-nul 4064  df-if 4227  df-pw 4300  df-sn 4318  df-pr 4320  df-tp 4322  df-op 4324  df-uni 4576  df-int 4613  df-iun 4657  df-br 4788  df-opab 4848  df-mpt 4865  df-tr 4888  df-id 5158  df-eprel 5163  df-po 5171  df-so 5172  df-fr 5209  df-we 5211  df-xp 5256  df-rel 5257  df-cnv 5258  df-co 5259  df-dm 5260  df-rn 5261  df-res 5262  df-ima 5263  df-pred 5822  df-ord 5868  df-on 5869  df-lim 5870  df-suc 5871  df-iota 5993  df-fun 6032  df-fn 6033  df-f 6034  df-f1 6035  df-fo 6036  df-f1o 6037  df-fv 6038  df-riota 6756  df-ov 6798  df-oprab 6799  df-mpt2 6800  df-om 7216  df-1st 7318  df-2nd 7319  df-wrecs 7562  df-recs 7624  df-rdg 7662  df-1o 7716  df-2o 7717  df-oadd 7720  df-er 7899  df-map 8014  df-pm 8015  df-en 8113  df-dom 8114  df-sdom 8115  df-fin 8116  df-sup 8507  df-inf 8508  df-card 8968  df-cda 9195  df-pnf 10281  df-mnf 10282  df-xr 10283  df-ltxr 10284  df-le 10285  df-sub 10473  df-neg 10474  df-div 10890  df-nn 11226  df-2 11284  df-3 11285  df-n0 11499  df-xnn0 11570  df-z 11584  df-uz 11893  df-rp 12035  df-xadd 12151  df-fz 12533  df-fzo 12673  df-seq 13008  df-exp 13067  df-hash 13321  df-word 13494  df-concat 13496  df-s1 13497  df-s2 13801  df-s3 13802  df-s4 13803  df-s5 13804  df-s6 13805  df-s7 13806  df-cj 14046  df-re 14047  df-im 14048  df-sqrt 14182  df-abs 14183  df-dvds 15189  df-vtx 26096  df-iedg 26097  df-edg 26160  df-uhgr 26173  df-ushgr 26174  df-upgr 26197  df-umgr 26198  df-uspgr 26266  df-vtxdg 26596  df-wlks 26729  df-trls 26823  df-eupth 27377
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator