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

Theorem konigsberg 30851
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 30835 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 30850 . . 3 2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)})
5 elpri 4608 . . . 4 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 ∨ (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2))
6 2pos 12440 . . . . . . 7 0 < 2
7 0re 11303 . . . . . . . 8 0 ∈ ℝ
8 2re 12410 . . . . . . . 8 2 ∈ ℝ
97, 8ltnsymi 11422 . . . . . . 7 (0 < 2 → ¬ 2 < 0)
106, 9ax-mp 5 . . . . . 6 ¬ 2 < 0
11 breq2 5107 . . . . . 6 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 → (2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ↔ 2 < 0))
1210, 11mtbiri 330 . . . . 5 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 → ¬ 2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
138ltnri 11412 . . . . . 6 ¬ 2 < 2
14 breq2 5107 . . . . . 6 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2 → (2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ↔ 2 < 2))
1513, 14mtbiri 330 . . . . 5 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2 → ¬ 2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
1612, 15jaoi 871 . . . 4 (((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 0 ∨ (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) = 2) → ¬ 2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
175, 16syl 18 . . 3 ((♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → ¬ 2 < (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}))
184, 17mt2 203 . 2 ¬ (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2}
191, 2, 3konigsbergumgr 30845 . . . . 5 𝐺 ∈ UMGraph
20 umgrupgr 29674 . . . . 5 (𝐺 ∈ UMGraph → 𝐺 ∈ UPGraph)
2119, 20ax-mp 5 . . . 4 𝐺 ∈ UPGraph
223fveq2i 6886 . . . . . 6 (Vtx‘𝐺) = (Vtx‘⟨𝑉, 𝐸⟩)
231ovexi 7452 . . . . . . 7 𝑉 ∈ V
24 s7cli 15029 . . . . . . . 8 ⟨“{0, 1} {0, 2} {0, 3} {1, 2} {1, 2} {2, 3} {2, 3}”⟩ ∈ Word V
252, 24eqeltri 2857 . . . . . . 7 𝐸 ∈ Word V
26 opvtxfv 29575 . . . . . . 7 ((𝑉 ∈ V ∧ 𝐸 ∈ Word V) → (Vtx‘⟨𝑉, 𝐸⟩) = 𝑉)
2723, 25, 26mp2an 705 . . . . . 6 (Vtx‘⟨𝑉, 𝐸⟩) = 𝑉
2822, 27eqtr2i 2785 . . . . 5 𝑉 = (Vtx‘𝐺)
2928eulerpath 30835 . . . 4 ((𝐺 ∈ UPGraph ∧ (EulerPaths‘𝐺) ≠ ∅) → (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2})
3021, 29mpan 703 . . 3 ((EulerPaths‘𝐺) ≠ ∅ → (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2})
3130necon1bi 2984 . 2 (¬ (♯‘{𝑥 ∈ 𝑉 ∣ ¬ 2 ∥ ((VtxDeg‘𝐺)‘𝑥)}) ∈ {0, 2} → (EulerPaths‘𝐺) = ∅)
3218, 31ax-mp 5 1 (EulerPaths‘𝐺) = ∅
Colors of variables:    wff setvar class
This proof depends on syntax axioms:  ¬ wn 3   ∨ wo 861   = wceq 1570   ∈ wcel 2145   ≠ wne 2956  {crab 3413  Vcvv 3451  ∅c0 4279  {cpr 4586  ⟨cop 4590   class class class wbr 5103  ‘cfv 6537  (class class class)co 7418  0cc0 11193  1c1 11194   < clt 11336  2c2 12390  3c3 12391  ...cfz 13632  ♯chash 14467  Word cword 14651  ⟨“cs7 14990   ∥ cdvds 16415  Vtxcvtx 29567  UPGraphcupgr 29651  UMGraphcumgr 29652  VtxDegcvtxdg 30039  EulerPathsceupth 30791
This proof depends on axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1828  ax-4 1842  ax-5 1943  ax-6 2000  ax-7 2041  ax-8 2147  ax-9 2155  ax-10 2178  ax-11 2194  ax-12 2213  ax-ext 2733  ax-rep 5232  ax-sep 5249  ax-nul 5260  ax-pow 5327  ax-pr 5391  ax-un 7749  ax-cnex 11249  ax-resscn 11250  ax-1cn 11251  ax-icn 11252  ax-addcl 11253  ax-addrcl 11254  ax-mulcl 11255  ax-mulrcl 11256  ax-mulcom 11257  ax-addass 11258  ax-mulass 11259  ax-distr 11260  ax-i2m1 11261  ax-1ne0 11262  ax-1rid 11263  ax-rnegex 11264  ax-rrecex 11265  ax-cnre 11266  ax-pre-lttri 11267  ax-pre-lttrn 11268  ax-pre-ltadd 11269  ax-pre-mulgt0 11270  ax-pre-sup 11271
This proof depends on definitions:  df-bi 210  df-an 402  df-or 862  df-ifp 1079  df-3or 1104  df-3an 1105  df-tru 1573  df-fal 1583  df-ex 1813  df-nf 1817  df-sb 2100  df-mo 2565  df-eu 2595  df-clab 2740  df-cleq 2753  df-clel 2836  df-nfc 2910  df-ne 2957  df-nel 3063  df-ral 3078  df-rex 3088  df-rmo 3366  df-reu 3367  df-rab 3414  df-v 3453  df-sbc 3740  df-csb 3848  df-dif 3902  df-un 3904  df-in 3906  df-ss 3916  df-pss 3919  df-nul 4280  df-if 4483  df-pw 4559  df-sn 4585  df-pr 4587  df-tp 4589  df-op 4591  df-uni 4868  df-int 4908  df-iun 4953  df-br 5104  df-opab 5168  df-mpt 5187  df-tr 5213  df-id 5546  df-eprel 5551  df-po 5559  df-so 5560  df-fr 5604  df-we 5606  df-xp 5657  df-rel 5658  df-cnv 5659  df-co 5660  df-dm 5661  df-rn 5662  df-res 5663  df-ima 5664  df-pred 6303  df-ord 6364  df-on 6365  df-lim 6366  df-suc 6367  df-iota 6493  df-fun 6539  df-fn 6540  df-f 6541  df-f1 6542  df-fo 6543  df-f1o 6544  df-fv 6545  df-riota 7375  df-ov 7421  df-oprab 7422  df-mpo 7423  df-om 7876  df-1st 7999  df-2nd 8000  df-frecs 8292  df-wrecs 8323  df-recs 8372  df-rdg 8411  df-1o 8469  df-2o 8470  df-oadd 8473  df-er 8710  df-map 8842  df-pm 8843  df-en 8967  df-dom 8968  df-sdom 8969  df-fin 8970  df-sup 9427  df-inf 9428  df-dju 9975  df-card 10013  df-pnf 11338  df-mnf 11339  df-xr 11340  df-ltxr 11341  df-le 11342  df-sub 11536  df-neg 11537  df-div 11967  df-nn 12329  df-2 12398  df-3 12399  df-4 12400  df-n0 12600  df-xnn0 12673  df-z 12687  df-uz 12959  df-rp 13114  df-xadd 13235  df-fz 13633  df-fzo 13782  df-seq 14138  df-exp 14198  df-hash 14468  df-word 14652  df-concat 14709  df-s1 14736  df-s2 14992  df-s3 14993  df-s4 14994  df-s5 14995  df-s6 14996  df-s7 14997  df-cj 15259  df-re 15260  df-im 15261  df-sqrt 15395  df-abs 15396  df-dvds 16416  df-vtx 29569  df-iedg 29570  df-edg 29619  df-uhgr 29629  df-ushgr 29630  df-upgr 29653  df-umgr 29654  df-uspgr 29724  df-vtxdg 30040  df-wlks 30173  df-trls 30268  df-eupth 30792
This theorem is used by: (None)
  Copyright terms: Public domain W3C validator