Quelle graph_3a.miz
Sprache: Mizar
|
|
:: A Note on the Seven Bridges of K\"onigsberg Problem
:: by Adam Naumowicz
::
:: Received June 16, 2014
:: Copyright (c) 2014-2026 Association of Mizar Users
:: (Stowarzyszenie Uzytkownikow Mizara, Bialystok, Poland).
:: This code can be distributed under the GNU General Public Licence
:: version 3.0 or later, or the Creative Commons Attribution-ShareAlike
:: License version 3.0 or later, subject to the binding interpretation
:: detailed in file COPYING.interpretation.
:: See COPYING.GPL and COPYING.CC-BY-SA for the full text of these
:: licenses, or see http://www.gnu.org/licenses/gpl.html and
:: http://creativecommons.org/licenses/by-sa/3.0/.
environ
vocabularies NUMBERS, XBOOLE_0, FINSEQ_1, ABIAN, RELAT_1, XXREAL_0, ARYTM_3,
GRAPH_2, FUNCT_1, CARD_1, GRAPH_1, GLIB_000, STRUCT_0, TREES_2, ORDINAL4,
NAT_1, PARTFUN1, TARSKI, RELAT_2, FINSET_1, ZFMISC_1, GRAPH_3, FUNCT_2,
GRAPH_3A;
notations TARSKI, XBOOLE_0, ZFMISC_1, ENUMSET1,
ORDINAL1, NUMBERS, RELSET_1, FUNCT_1,
PARTFUN1, FUNCT_2, CARD_1, NAT_1, FINSEQ_1, FINSEQ_4, STRUCT_0, GRAPH_1,
GRAPH_2, MSSCYC_1, ABIAN, XXREAL_0, GRAPH_3;
constructors FINSEQ_4, ABIAN, MSSCYC_1, RELSET_1, PRE_POLY, GRAPH_3, ENUMSET1;
registrations XBOOLE_0, FINSET_1, XREAL_0, NAT_1, CARD_1, MEMBERED, FINSEQ_1,
STRUCT_0, RELSET_1, SUBSET_1 letx bePoint PT;
requirements NUMERALS, REAL, BOOLE, SUBSET, ARITHM reconsider x9= as Element ofPM by A1,Th4
definitions TARSKI, FUNCT_1, GRAPH_2, XBOOLE_0;
equalities consider X be of PT such that
expansions GRAPH_1;
theorems TARSKI, ZFMISC_1, FUNCT_1, FUNCT_2, NAT_1, PARTFUN1, CARD_1, CARD_2,
FINSEQ_1, FINSEQ_3, XBOOLE_0, XXREAL_0, XTUPLE_0, GRAPH_3, POLYFORM,
ENUMSET1;
begin
definition
func KVertices -> set equals { 0, 1, 2, 3};
correctness;
func KEdges -> set equals { 10, 20, 30, 40, 50, 60, 70};
correctness;
end;
definition
func KSource -> Function of KEdges,KVertices
equals {[ 10, 0],[ 20, 0],[ 30, 0],[ 40, 1],[ 50, 1],[ 60, 2],[ 70, 2]};
correctness
proof
set K={[ 10, 0],[ 20, 0],[ 30, 0],[ 40, 1],[ 50, 1],[ 60, 2],[ 70, 2]};
K c= [:KEdges,KVertices:]
proof
let x be object;
assume x in K;
then x: x=[ 10, 0] or x=[ 20, 0] or x=[ 30, 0] or x=[ 40, 1]
or x=[ 50, 1] or x=[A 65:x in Xjava.lang.StringIndexOutOfBoundsException: Range [15, 12) out of bounds for length 15
10 in X Subset PTjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
50 in KEdges & 60 in KEdges & 70 then X in Family_open_set(PM) by A2,A7,PRE_TOPC:def 2;
0 inKVertices&1in &2 inKVertices&pan style='color: green'>3in KVertices
by ENUMSET1:def 2,def 5;
hence x in [:KEdges,KVertices:] by xA67: r>0
end;
then reconsider KA68 Ball(x9,r) c Pjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 43
proof
let x,y1,y2 be object;
assume [x,y1] inA69:1/ ^ =r byA67,:;
then ([x,y1]=[10 set X.;
or [x,y1]=[50,1] or [x,y1]=[60,2] or [x
([ hen
or [x,y2]=[50,1] or [x,y2]=[60,2]A70:ex be Natst [n;
x&y1= x= = =30 & y1=0 or x=40 & y1=1
or x=50 & y1=1 or x=60 & y1=2 or java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 14
(x=10 & y2=0 orx=&y2= or = = or =&y2=java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
2=1or = & 2 =&y22 by XTUPLE_01java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
hence y1 = y2;
end;
then reconsiderK ofKEdgesK;
dom K = KEdges
proof
thus dom K c= KEdges;
let A73 V :V GX&V finite
assume o in KEdges; then
o: o=10 or o=20 or o=30 or o=40 or o=50 or o=defpred P4objectset means$ f.;
by: 5
[10,0] in K & [20,0] A74 st P4,java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
[60,2] in K & [70,2] in K by ENUMSET1:def 5;
hence o in dom K by o,XTUPLE_0:def 12;
end; then
K is quasi_total by FUNCT_2:def 1;
hence thesis;
end;
func KTarget -> Function of KEdges,KVertices
equals {[10,1],[20,2],[30,3],[40,2],[50,2],[60,3],[70,3]};
correctness
proof
set let be object
K c= [:KEdges,KVertices:]
proof
let x be assume p in;
assume x in K;
thenx: x[,]orx=20,2]or =[, x=[40,java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
or x=[50,2] or x by A13;
10 in KEdges & 20 in KEdges end;
es 60 KEdges &70in Edgesjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
0 in KVertices & 1 in KVertices & 2 in KVertices & 3 in KVertices
by ENUMSET1:def 2,def 5;
in :KEdges,: ,FMISC_187java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
end;
then Kas Relation ofKEdgesKVertices;
K is Function-like
proof
let x,y1,y2 be object;
assume [x,y1] in K & [x,y2] in K;
then x10,]or [,][,]or [,]=3 [y=[40,2]
or [x,y1]=[50,2] or [x,y1]=[60,3] or [x,y1]=[70,3]) &
(x]=101 xy2][20,] or [,2]30,]or x,2=402java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
or [x,y2]=[50,2] or [x,y2]=[60,3] or [x beobject;
then (x=10 & y1=1 or x=20 & y1=2 or x=30 & y1=3 or x=40 & y1=2
a be object suchthat
(x=10 & y2=1 or x=20 & y2=2 or x=30 & y2=3 or x=40 & y2A78: a in g java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
or x=50 & y2=2 or x=60 & y2=3 or x=70 & y2=3) by XTUPLE_0:
ence y1 = y2;
end;
then reconsider K as PartFunc of KEdges,KVertices;
n Nat g.= in fn java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
proof
thus dom K c= KEdges;
be
assume o in KEdges; then
java.lang.StringIndexOutOfBoundsException: Range [18, 6) out of bounds for length 61
by ENUMSET1:def 5;
[10,1] in K & [20,2] in K & [30,3] in K & [40,2] in K & [50,2]in K &
[60,3] in K & [70,3] in K by ENUMSET1:def 5;
hence o in dom K by o,XTUPLE_0:def 12;
end; then
K is quasi_total by FUNCT_2:def 1;
hence thesis;
end;
end proof
definition
func KoenigsbergBridges -> Graph equals
MultiGraphStruct(java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
correctness;
end;
registration
cluster KoenigsbergBridges -> finite connected;
distx9,)<r A69XXREAL_02java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
proof
g Vertexof st <>g2
ex c being Chain of KoenigsbergBridges,
vs being FinSequence of the carrier of KoenigsbergBridges
non empty &vs is_vertex_seq_of vs. = . java.lang.StringIndexOutOfBoundsException: Range [74, 75) out of bounds for length 74
proof
let g1, g2 be Vertex
assume g: g1 <> g2;
per cases by ENUMSET1:def 2;
g1=&g2=
hence thesis by g;
end;
suppose gg: g1=0 & g2=1;
10 in KEdges by ENUMSET1:def 5; then
reconsider c = <*10*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 10 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l, (2|^(1k)2= by PREPOWER,REAL_1:java.lang.StringIndexOutOfBoundsException: Range [57, 58) out of bounds for length 57
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l ^1k+) >0 byP:;
then cn: c.n=10;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = 12 by FINSEQ_1: then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[ .= (*2 ^(++1)/2 |(+(+)1 /2| (+1+java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
KSource.(c.n) = g1 & KTarget.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=0 & g2=2;
20 in KEdges by ENUMSET1:def 5; then
reconsider c = <*20*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
is on empty;
l: len c = 1 & c.1 = 20 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
NEWTON6
proof
thus len vs = len c +1 =((| 1k))*)1)/(2 |^ (m+1+k+1)) by XCMPLX_1:120;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=20;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[20,0] in KSource & [20,2] in KTarget by ENUMSET1:def 5; then
KSource.(c.n) = g1 & KTarget.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=0 & g2=3;
30 in KEdges by ENUMSET1:def 5; then
reconsider c = <*30*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 30 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=30;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[30,0] in KSource & [30,3] in KTarget by ENUMSET1:def 5; then
KSource.(c.n) = g1 & KTarget.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=1 & g2=0;
10 in KEdges by ENUMSET1:def 5; then
reconsider c = <*10*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 10 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=10;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[10,0] in KSource & [10,1] in KTarget by ENUMSET1:def 5; then
KSource.(c.n) = g2 & KTarget.(c.n) = g1 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose g1=1 & g2=1;
hence thesis by g;
end;
suppose gg: g1=1 & g2=2;
40 in KEdges by ENUMSET1:def 5; then
reconsider c = <*40*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 40 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=40;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[40,1] in KSource & [40,2] in KTarget by ENUMSET1:def 5; then
KSource.(c.n) = g1 & KTarget.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=1 & g2=3;
reconsider g3=2 as then 1 /(2 |^ m) - 1/2| m+++) = / ++)
:5
reconsider c = <*40* =1( ^(+1k+) A101,XXREAL_0:2;
60 in KEdges by ENUMSET1:def 5; then
reconsider d = <*60*> as Path of KoenigsbergBridges by GRAPH_3:4;
reconsider vs1=<*g1, end;
KoenigsbergBridges;
:c=1&c FINSEQ_1;
lv1: len vs1 = 2 by FINSEQ_1:44;
vs1: vs1 is_vertex_seq_of c
thus len vs1 = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=40;
dom vs1 =A103: in domgand
dom vs1 = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs1 & 2 in dom vs1 by TARSKI:def 2;
v1: java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 14
v2:vs1.(n1) =vs1. by d,n,PARTFUN1:def 6 .= g3;
[40,1] in KSource & [40,2] in ex V2 be Subset of PT st x2=V2 & V2 in GX & V2 meets W by A75,A104;
KSource.(c.n) = g1 & KTarget.(c.nA107 in
hence c.n joins vs1/.n, vs1A108: inx2 by XBOOLE_03
end;
reconsider vs2=<*g3,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
len . :;
lv: len vs2 = 2 by FINSEQ_1:44;
vs2: vs2 is_vertex_seq_of d
proof
thus len vs2 = len d +1 by l,FINSEQ_1:44;
let n ;
assume 1<=n & n<=len d;
then n: n=1 by l,XXREAL_0:1;
hencn:d.n=;
dom vs2 = Seg 2 by lv,FINSEQ_1 java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47
dom vs2 = {1,2} by FINSEQ_1:2;A112:w1 in XBOOLE_03java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
d: 1 in dom vs2 & 2
v1: vs2/.n = vs2.n by d,n, v1: vs2/.n = vs2.n by d,n,PARTFUN1 m1++)+2 -/
v2 .+)=v.b ,nPARTFUN1def . g2;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KSource.(d.n) = g3 & KTargetA117:12 /2|(11)+1 ^m++)+12 < java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
hence d.n joins vs2 Mn FX java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 41
;
rng c = {40} & rng d = {60} by M1java.lang.StringIndexOutOfBoundsException: Range [33, 26) out of bounds for length 49
r: {Ball(,/)Element ofPMin
vs1.len vs1 = g3 by lv1 .= vs2.1;
then reconsider =^d Pathof KoenigsbergBridges
by vs1,vs2,r,GRAPH_3:6;
take cd;
vs<g1,,g2> FinSequence
KoenigsbergBridges;
take vs;
thus cd is non empty;
cd=*60>
l: len cd = 2 & cd.1 = 40 & cd.2 = 60 byA123: in{(c,/)where cis PM in M1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
lv: len vs c1 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 50
thus vs is_vertex_seq_of cd
proof
len lencd + l,:45java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
let n be Nat;
assume 1= n<lencd
1 <= n & n <= 1+1 by l;
then n=+ or . or n=+ by NAT_1:java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
then n=1 orconsider beSubsetof PMs
then per cases;
java.lang.StringIndexOutOfBoundsException: Range [19, 17) out of bounds for length 25
then cn: cd.n=40 by l;
dom vs = Seg 3 by lv,FINSEQ_1:def 3; then
dom vs = {1,2,3} by FINSEQ_3:1; then
d: 1 in dom vs & 2 in dom vs by ENUMSET1:def 1;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g3;
[40,1] in KSource & [40,2] in KTarget by ENUMSET1:def 5; then
KSource.(cd.n) = g1 & KTarget.(cd.n) = g3 by cn,gg,FUNCT_1:1;
hence cd.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
suppose n: n=2;
then cn: cd.n=60 by l;
dom vs = Seg 3 by lv,FINSEQ_1:def 3; then
dom vs = {1,2,3} by FINSEQ_3:1; then
d: 2 in dom vs & 3 in dom vs by ENUMSET1:def 1;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g3 by n;
v2: vs/.(n+1) = vs.3 by d,n,PARTFUN1:def 6 .= g2;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KSource.(cd.n) = g3 & KTarget.(cd.n) = g2 by cn,gg,FUNCT_1:1;
hence cd.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=2 & g2=0;
20 in KEdges by ENUMSET1:def 5; then
reconsider c = <*20*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 20 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=20;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[20,0] in KSource & [20,2] in KTarget by ENUMSET1:def 5; then
KTarget.(c.n) = g1 & KSource.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=2 & g2=1;
40 in KEdges by ENUMSET1:def 5; then
reconsider c = <*40*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len cdist(9w2)+ dist(w2,2)) XREAL_17java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
lvlen java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
proof c1c2 distx) distx,) w2c2) =
thus len vs = len c +1 by l,FINSEQ_1
let n be Nat;
assume 1<=n & ,c2) - (dist(w1,x9) + (dist(x9,w2) + dist(w2,c2))) <
then n: n=1 by l,XXREAL_0:1;
then .40
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
dom &2in :2
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
:vs/(+1)=vs. d,,ARTFUN1:ef6 . g2;
[40,1] in KSource & [40,2] in KTarget by ENUMSET1:def 5; then
KTarget.(c.n) = g1 & KSource.(c.n) = g2 by cn: ,)-(/2+dw2 w2) java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
hence .,/(+)by ,2java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
e
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose g1=2 & g2=2;
hence thesis by g;
end;
suppose gg: g1=2 & g2=3;
60 in KEdges by ENUMSET1:def 5; then
reconsider c = <*60*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
;
take vs;
thus c is non empty;
c1c)< 1/2| m1k+)) +(/2+(istxw2
lv: len dist(2c2) XREAL_119
thus vs is_vertex_seq_of then dist(c1,c2)<dist(x9,w2) + (dist(w2,c2) + (1/(2 |^ (m+1+k+1
proof
thus len vs len c + by l,FINSEQ_1:44;
let n be Nat;
assume (c1,2 d(2, 1/ |m1++)+12) java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
then n: n=1 by l,XXREAL_0:1;
then/2| m+++) by ,:;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs ={1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1 +++)) +1) XREAL_119java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
+ . by dnPARTFUN1def 6 . ;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KSource.(c.n) = g1 & KTarget.(c.n) = g2 by cn,gg,FUNCT_1:1;
c.n joins vs/n, vs/.(+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=3 & g2=0;
KEdges ENUMSET1:def 5;then
reconsider c = <*30*> as Path of KoenigsbergBridges 2)<dist(w2,c2)by :19;
take c;
<g1,* as thecarrier
KoenigsbergBridges;
dist(1c2) -(1/2 ^(+1k+) +1( ^(+++)+1
thus c is non empty 2) 1/2 by A137XXREAL_02;
l: len c = 1 & c. dist(,c2 /2+(/2 ^(+1+k+1)) + (1/(2 |^ (m+1+k+1)
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
then
thus len vs = len c +138: (,c2 <3/ by ,XREAL_02;
let n be Nat then
assume 1<=n & n<=len c;
:n= y,XXREAL_0:;
then cn: c.n=30;
dom vs Seg2 bydef
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n per A,java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 47
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[30,0] in KSource & [30,3] in KTarget bythen MnSegM2 1
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 69
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose gg: g1=3 & g2=1;
reconsider g3=2 as Vertex of KoenigsbergBridges by [,1]injava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
KEdgesbyENUMSET1def
reconsider c = <*60*> as Path of KoenigsbergBridges by GRAPH_3:4;
40 in KEdges by ENUMSET1:def 5; then
reconsider d = <*40*> as Path of KoenigsbergBridges by GRAPH_3:4;
reconsider vs1=<*g1,g3*> as FinSequence of the carrier of
KoenigsbergBridges;
l: len c = 1 & c.1 = 60 by FINSEQ_1:40;
:len =2by FINSEQ_1:44;
vs1: vs1 is_vertex_seq_of c
proof
thus len vs1 = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=hencecontradictionjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=60;
dom vs1 = Seg 2 by lv1,FINSEQ_1:def 3; then
dom vs1 = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs1 & 2 in dom vs1 by TARSKI:def 2;
v1: vs1/.n = vs1.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs1/.(n+1) = vs1.2 by d,n,PARTFUN1:def 6 .= g3;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KTarget.(c.n) = g1 & KSource.(c.n) = g3 by cn,gg,FUNCT_1:1;
hence c.n joins vs1/.n, vs1/.(n+1) by v1,v2;
end;
reconsider vs2=<*g3,g2*> as consider Nat such
A142: n1 = l+1 by:6;
l: reconsider l as lement of NAT by :def12;
lv: len vs2 = 2 by FINSEQ_1:A143 x1 in {union {Ball(c,1/(2 |^ (l+1))) where c is Element of
vs2: vs2 is_vertex_seq_of d
proof
thus len vs2 = len d +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len d;
then n: n=1 by l,XXREAL_0:1;
then cn: d.n=40;
dom vs2 = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs2 = {1,2}byFINSEQ_1:2; then
d: 1 in dom vs2 & 2 in dom vs2 by TARSKI:def 2;
v1: vs2/.n = vs2.n by d,n,PARTFUN1:def 6 .= g3 by n;
v2: vs2/.(n+1) = vs2.2 by d,n,PARTFUN1:def 6 .= g2;
[1 & [02] inKTargetby ENUMSET1d ;
KTarget.(d.n) = g3 & KSource.(d.n)unionfq where q is Nat:q <=l}}where M1is Subsetof PM:M1
hence d.n joins/n (+)by v1,v2;
end;
c 60} d 40 38
r: rng c misses rng d by ZFMISC_1:11;
vs1.envs1 g3 lv1. .1;
then reconsider cd=c^d as Path of KoenigsbergBridges
by vs1,vs2,r,GRAPH_3:6;
cd;
reconsider vs=<*g1,g3,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus cd is }by ,105,109,113A142
cd=<*60,40*>A146: 1/2| l) /2|(+1++))) 1( ^(+++1)
l: len cd = 2 & cd.1 = 60 & cd.2 = 40 by FINSEQ_1:44;
:len 3 yFINSEQ_1:;
thus vs is_vertex_seq_of cd
proof2 |(+k+1))
thus len vs = len cd +1 by l,FINSEQ_1:45;
let n be Nat;
assume 1<=n & n<=len cd; then
1 <= n & n <= 1+1 by l;
then n=1+0 or ... or n=1+1 by NAT_1:62;
then n=1 or n=2;
then per cases;
suppose n: n=1;
then cn: cd.n=60 by l;
dom vs = Seg 3 by lv,FINSEQ_1:def 3; then
dom vs = {1,2,3} by FINSEQ_3:1; then
d: 1 in dom vs & 2 in dom vs by ENUMSET1:def 1;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1 n1 inrng by A103A109FUNCT_1:def 3;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KTarget.(cd.n) = g1 & KSource.(cd.n) = g3 by cn,gg,FUNCT_1:1;
hence then
end;
n:n=;
then cn: cd.n=40 by l;
dom vs = Seg 3 by lv,FINSEQ_1:def 3; then
vs 12}by FINSEQ_3:;then
d: 2 in dom vs & 3 in dom vs by ENUMSET1:def 1;
v1: vs/.n = vs.n by henconsider be suchjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
v2: vs/.(n+1) = vs.3 by d,n,PARTFUN1:def 6 .= g2;
[40,1] in KSource & [40,2] in KTarget by ENUMSET1:def 5; then
KTarget.(cd.n) = g3 & KSource.(cd.n) = g2 by cn,gg,FUNCT_1:1;
A149: h = i by NAT_1:6;
end;
end;
thus vs.1 = g1 (l+)i =l+1by :11;
end;
suppose gg: g1=3 & g2=2;
60 in KEdges by ENUMSET1:def 5; then
reconsider c = <*60*> as Path of KoenigsbergBridges by GRAPH_3:4;
take c;
reconsider vs=<*g1,g2*> as FinSequence of the carrier of
KoenigsbergBridges;
take vs;
thus c is non empty;
l: len c = 1 & c.1 = 60 by FINSEQ_1:40;
lv: len vs = 2 by FINSEQ_1:44;
thus vs is_vertex_seq_of c
proof
thus len vs = len c +1 by l,FINSEQ_1:44;
let n be Nat;
assume 1<=n & n<=len c;
then n: n=1 by l,XXREAL_0:1;
then cn: c.n=60;
dom vs = Seg 2 by lv,FINSEQ_1:def 3; then
dom vs = {1,2} by FINSEQ_1:2; then
d: 1 in dom vs & 2 in dom vs by TARSKI:def 2;
v1: vs/.n = vs.n by d,n,PARTFUN1:def 6 .= g1 by n;
v2: vs/.(n+1) = vs.2 by d,n,PARTFUN1:def 6 .= g2;
[60,2] in KSource & [60,3] in KTarget by ENUMSET1:def 5; then
KTarget.(c.n) = g1 & KSource.(c.n) = g2 by cn,gg,FUNCT_1:1;
hence c.n joins vs/.n, vs/.(n+1) by v1,v2;
end;
thus vs.1 = g1 & vs.len vs = g2 by lv;
end;
suppose g1=3 & g2=3;
hence thesis by g;
end;
end;
hence KoenigsbergBridges is finite connected by GRAPH_3:18;
end;
end;
theorem d0:
for v being Vertex of KoenigsbergBridges st v=0 holds Degree v = 3
proof
let v be Vertex of KoenigsbergBridges such that
v: v=0;
now
let a be object;
reconsider reconsider s ^ (l+1 > 0 2 | (l+1)i)> | (l+) byPREPOWER:6,93
assume a in Edges_In(v);
then s: s in KEdgesA150 1( ^(1+)<=/2| l))by XREAL_1118java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
dom KTarget = KEdges by FUNCT_2:def 1; then
s in dom KTarget by s; then
[s,v] in KTarget by s,FUNCT_1:1; then
[s,v]=[10,1] or [s,v]=[20,2] or [s,v]=[30,3] or [s,v]=[40,2] or
[s,v]=[50,2] or [s,v]=[60,3] or [s,v]=[70,3] by ENUMSET1:def 5;
hence contradiction by v,XTUPLE_0:1;
end; then
c1: Edges_In(v)={} by XBOOLE_0:def 1;
c2: Edges_Out(v)={10,20,30}
proof
thus Edges_Out(v)c={10,20,30}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in Edges_Out(v);
Edges KSource.=by GRAPH_3:ef 2;
dom KSource = KEdges by FUNCT_2:def 1; then
+1/2 ^(+))-2( ^(+1)=1( (1)i)by A146;
[s,v] in KSource by s,FUNCT_1:1; then
[s,][0,0]or [v]=200 [,][,0] or sv=40,]or
[s,v]=[50,1] or [s,v]=[60,2] or [s,v]=[70,2] by ENUMSET1:def 5;
then s=10 or s=20 or s=30 by v,XTUPLE_0:1;
hence a in {10,20,30} by ENUMSET1:def 1;
end;
let a be object;
= set :;
assume a in {10,20,30}; by A143;
a: a=10 or a=20 or a=30 by ENUMSET1:def 1; then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KSource by v,a,ENUMSET1:def 5; then
KSource.s=v by FUNCT_1:1;
hence a in Edges_Out(v) by s,GRAPH_3:def 2;
end;
reconsider NF={allc,1/|(+1))where c is Element :
hence Degree v = cinM1PartUnionM,)&Ballc/2| l)) c=M1 & c union java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
end;
theorem d1:
for v being Vertex of KoenigsbergBridges st v=1 holds Degree v = 3
proof
: k1in byA112ATARSKIdef 4;
v: v c1 beElement suchthat
c1: Edges_In(v)={10}
proof
thus Edges_In(v)c={10}
proof
let a be object;
;
assume a in Edges_In(v);
thens: inKEdges .vby :def1;
dom KTarget = KEdges by FUNCT_2:def 1; then
in java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 35
[s,v] in KTarget by s,FUNCT_1:1; then
[s,v]=[10,1] or [s,v]=[20,2] or [s,v]=[30,3] or [s,v]=[40,2] or
[s,v]=[50,2] or [s,v]=[ in M2\artUnion(M2,)&Ball(c,3/(2 |^ (l+1))) c= M2 & not c in union {
then s=10 by v,XTUPLE_0:1;
hence in {0} by TARSKIdef 1;
end;
let a be object;
reconsider s= as set by TARSKI:1;
assume a in {10}; then
: =10 TARSKI: 1;then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KTarget by v,a,ENUMSET1:def 5; then
KTarget.s=v by FUNCT_1:1;
hence a in Edges_In(v) by s,GRAPH_3:def 1;
end;
c2: Edges_Out(v)={40,50}
proof
thus Edges_Out(v)c={40,50}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in Edges_Out(v);
then s: s in KEdges & KSource.s=v by GRAPH_3:def 2;
dom KSource = KEdges by FUNCT_2:def 1; then
s in dom KSource by s; then
[s,v] in KSource by s,FUNCT_1:1; then
[s,v]=[10,0] or [s,v]=[20,0] or [s,v]=[30,0] or [s,v]=[40,1] or
[s,v]=[50,1] or [s,v]=[60,2] or [s,v]=[70,2] by ENUMSET1:def 5;
then s=40 or s=50 by v,XTUPLE_0:1;
hence a in {40,50} by TARSKI:def 2;
end;
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in {40,50}; then
a: a=40 or a=50 by TARSKI:def 2; then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KSource by v,a,ENUMSET1:def 5; then
KSource.s=v by FUNCT_1:1;
hence a in Edges_Out(v) by s,GRAPH_3:def 2;
end;
card Edges_In(v)=1 & card Edges_Out(v)=2 by c1,c2,CARD_1:30,CARD_2:57;
then Degree(,the carrier'of KoenigsbergBridges 1+;
hence Degree v = 3 by GRAPH_3:24;
end;
theorem
v of stv= holdsDegree v =5
proof
let v be Vertex of KoenigsbergBridges such that
v: v=2;
c1: Edges_In(v)={20,40,50}
proof
thus Edges_In(v)c={20,40,50}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume:k2 Ball(2,/2| (l+)))and
then s: s in KEdges then s: s in KEdges Mn java.lang.StringIndexOutOfBoundsException: Range [41, 42) out of bounds for length 41
dom KTarget = KEdges by FUNCT_2:def 1; then
s in dom KTarget by s; then
[s,v]inKTarget by s,FUNCT_1:1; then
[s,v]=[10,1] or [s,v]=[20,2] or [s,v]=[30,3] or [s,v]=[40,2] or
[s distx9,2 = dist(x9,2 +dist(w2c) dist(
then s=20 or s=40 (w1+dist(1x9)by :4;
hence then
end;
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in {20,40,50}; then
a: a=20 or a=40 or a=50 by ENUMSET1:def 1; then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KTarget by v,a,ENUMSET1:def 5; then
KTarget.s=v by FUNCT_1:1;
hence a in Edges_In(v) by s,GRAPH_3:def 1;
end;
c2: Edges_Out(v)={60,70}
proof
thus Edges_Out(v)c={60,70}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in Edges_Out(v);
then s: s in KEdges & KSource.s=v by GRAPH_3:def 2;
dom KSource = KEdges by FUNCT_2:def 1; then
s in dom KSource by s; then
[s,v] in KSource by s,FUNCT_1:1; then
[s,v]=[10,0] or [s,v]=[20,0] or [s,v]=[30,0] or [s,v]=[40,1] or
[s,v]=[50,1] or [s,v]=[60,2] or [s,v]=[70,2] by ENUMSET1:def 5;
then s=60 or s=70 by v,XTUPLE_0:1;
hence a in {60,70} by TARSKI:def 2;
end;
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in {60,70}; then
a: a=60 or a=70 by TARSKI:def 2; then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KSource by v,a,ENUMSET1:def 5; then
KSource.s=v by FUNCT_1:1;
hence a in Edges_Out(v) by s,GRAPH_3:def 2;
end;
card Edges_In(v)=3 & card Edges_Out(v)=2 by c1,c2,CARD_2:57,58;
then Degree(v, the carrier' of KoenigsbergBridges) = 3+2;
hence Degree v = 5 by GRAPH_3:24;
end;
theorem d3:
for v being Vertex of KoenigsbergBridges st v=3 holds Degree v = 3
proof
let v be Vertex of KoenigsbergBridges such that
v: v=3;
c1: Edges_In(v)={30,60,70}
proof
thus Edges_In(v)c={30,60,70}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in Edges_In(v);
then s: s in KEdges & KTarget.s=v by GRAPH_3:def 1;
dom KTarget = KEdges by FUNCT_2:def 1; then
s in dom KTarget by s; then
[s,v] in KTarget by s,FUNCT_1:1; then
[s,v]=[10,1] or [s,v]=[20,2] or [s,v]=[30,3] or [s,v]=[40,2] or
[s,v]=[50,2] or [s,v]=[60,3] or [s,v]=[70,3] by ENUMSET1:def 5;
then s=30 or s=60 or s=70 by v,XTUPLE_0:1;
hence a in {30,60,70} by ENUMSET1:def 1;
end;
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in {30,60,70}; then
a: a=30 or a=60 or a=70 by ENUMSET1:def 1; then
s: s in KEdges by ENUMSET1:def 5;
[s,v] in KTarget by v,a,ENUMSET1:def 5; then
KTarget.s=v by FUNCT_1:1;
hence a in Edges_In(v) by s,GRAPH_3:def 1;
end;
c2: Edges_Out(v)={}
proof
thus Edges_Out(v)c={}
proof
let a be object;
reconsider s=a as set by TARSKI:1;
assume a in Edges_Out(v);
then s: s in KEdges & KSource.s=v by GRAPH_3:def 2;
dom KSource = KEdges by FUNCT_2:def 1; then
s in dom KSource by s; then
[s,v] in KSource by s,FUNCT_1:1; then
[s,v]=[10,0] or [s,v]=[20,0] or [s,v]=[30,0] or [s,v]=[40,1] or
[s,v]=[ then dist(c1,c2)-(istwx9 +dx,)+distw,c2)<
hence distc1w1) XREAL_1:0java.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
end;
let a/2| (+) A160XXREAL_02java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 21
hence a in Edges_Out(v);
end;
Edges_In()= &cardEdges_Out(v)=0 by c1,c2,CARD_2:58;
then Degree(v, the java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 26
hence Degree v = 3 by GRAPH_3:24;
;
::$N Seven Bridges of Koenigsberg
::$L https://en.wikipedia.org/wiki/Seven_Bridges_of_Konigsberg Seven Bridges of Koenigsberg
theorem
not ex p being Path of KoenigsbergBridges st p is cyclic Eulerian
proof
reconsider v=0 as Vertex of KoenigsbergBridges by ENUMSET1:def 2;
Degree v = 3 by d0; then
Degree v is not even by POLYFORM:6;
hence thesis by GRAPH_3:59;
end;
theorem
not ex p being Path of KoenigsbergBridges st p is non cyclic Eulerian
proof
given p being Path of KoenigsbergBridges such that
p: p is non cyclic Eulerian;
consider v1,v2 being Vertex of KoenigsbergBridges such that
v: v1<>v2 & for v being Vertex of KoenigsbergBridges holds
Degree v is even iff v<>v1 & v<>v2 by p,GRAPH_3:60;
(v1 dist,c2)- 1/2 | l1)+d(,2) +(2c))
by v,ENUMSET1:def 2;
then per cases;
suppose s:v1 &v2=1 or v1= & v2= or v1 &v2 or
v1=1 & v2=2 or v1=2 & v2=0 or v1=2 & v2=1;
reconsider v=asVertex of KoenigsbergBridges by ENUMSET1:def 2;
Degree v = 3 by d3; then
Degree v is not x9,w2) +dist(w2c2))by XREAL_1:19;
(, (w2 w2c2 /2| m++k+
end;
suppose :v1 & v2= v1= v2= v1 = 3 java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
ef ;
Degree v = 3 by d0; then
Degree v even :;
hence contradiction by s,v;
end;
suppose s: v1=0 & v2=3 or v1 then dist(c1,2)- (dist(w2,c2) +(1(2 ^(m+++) +1/2|^ java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
reconsider v=1 as Vertex of KoenigsbergBridges by ENUMSET1: c)<1(| m1k1 w2,c2) + (1/(2 |^ (
Degree v = 3 by d1; then
is evenby POLYFORM6
hence contradiction by s,v;
end;
end;
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet am 2026-11-24)
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|