Metamath Proof Explorer


Theorem konigsberg

Description: The Königsberg Bridge problem. If G 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 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)

Ref Expression
Hypotheses konigsberg.v V=03
konigsberg.e E=⟨“01020312122323”⟩
konigsberg.g G=VE
Assertion konigsberg EulerPathsG=

Proof

Step Hyp Ref Expression
1 konigsberg.v V=03
2 konigsberg.e E=⟨“01020312122323”⟩
3 konigsberg.g G=VE
4 1 2 3 konigsberglem5 2<xV|¬2VtxDegGx
5 elpri xV|¬2VtxDegGx02xV|¬2VtxDegGx=0xV|¬2VtxDegGx=2
6 2pos 0<2
7 0re 0
8 2re 2
9 7 8 ltnsymi 0<2¬2<0
10 6 9 ax-mp ¬2<0
11 breq2 xV|¬2VtxDegGx=02<xV|¬2VtxDegGx2<0
12 10 11 mtbiri xV|¬2VtxDegGx=0¬2<xV|¬2VtxDegGx
13 8 ltnri ¬2<2
14 breq2 xV|¬2VtxDegGx=22<xV|¬2VtxDegGx2<2
15 13 14 mtbiri xV|¬2VtxDegGx=2¬2<xV|¬2VtxDegGx
16 12 15 jaoi xV|¬2VtxDegGx=0xV|¬2VtxDegGx=2¬2<xV|¬2VtxDegGx
17 5 16 syl xV|¬2VtxDegGx02¬2<xV|¬2VtxDegGx
18 4 17 mt2 ¬xV|¬2VtxDegGx02
19 1 2 3 konigsbergumgr GUMGraph
20 umgrupgr GUMGraphGUPGraph
21 19 20 ax-mp GUPGraph
22 3 fveq2i VtxG=VtxVE
23 1 ovexi VV
24 s7cli ⟨“01020312122323”⟩WordV
25 2 24 eqeltri EWordV
26 opvtxfv VVEWordVVtxVE=V
27 23 25 26 mp2an VtxVE=V
28 22 27 eqtr2i V=VtxG
29 28 eulerpath GUPGraphEulerPathsGxV|¬2VtxDegGx02
30 21 29 mpan EulerPathsGxV|¬2VtxDegGx02
31 30 necon1bi ¬xV|¬2VtxDegGx02EulerPathsG=
32 18 31 ax-mp EulerPathsG=