:: GRAPHSP semantic presentation
theorem Th1: :: GRAPHSP:1
theorem Th2: :: GRAPHSP:2
theorem Th3: :: GRAPHSP:3
theorem Th4: :: GRAPHSP:4
theorem Th5: :: GRAPHSP:5
Lemma6:
for b1 being Nat
for b2, b3 being FinSequence holds
( 1 <= b1 & b1 <= len b2 implies b2 . b1 = (b2 ^ b3) . b1 )
Lemma7:
for b1 being Nat
for b2, b3 being FinSequence holds
( 1 <= b1 & b1 <= len b3 implies b3 . b1 = (b2 ^ b3) . ((len b2) + b1) )
theorem Th6: :: GRAPHSP:6
theorem Th7: :: GRAPHSP:7
theorem Th8: :: GRAPHSP:8
theorem Th9: :: GRAPHSP:9
for b
1 being
Graphfor b
2, b
3 being
oriented Chain of b
1for b
4 being
Functionfor b
5 being
set for b
6, b
7 being
Vertex of b
1 holds
( b
2 is_shortestpath_of b
6,b
7,b
5,b
4 & b
3 is_shortestpath_of b
6,b
7,b
5,b
4 implies
cost b
2,b
4 = cost b
3,b
4 )
theorem Th10: :: GRAPHSP:10
Lemma13:
for b1 being Nat
for b2 being Graph
for b3 being FinSequence of the Edges of b2 holds
( 1 <= b1 & b1 <= len b3 implies ( the Source of b2 . (b3 . b1) in the Vertices of b2 & the Target of b2 . (b3 . b1) in the Vertices of b2 ) )
theorem Th11: :: GRAPHSP:11
Lemma15:
for b1 being Nat
for b2 being Graph
for b3 being FinSequence of the Edges of b2
for b4 being Vertex of b2 holds
( 1 <= b1 & b1 <= len b3 & ( b4 = the Source of b2 . (b3 . b1) or b4 = the Target of b2 . (b3 . b1) ) implies b4 in vertices b3 )
theorem Th12: :: GRAPHSP:12
theorem Th13: :: GRAPHSP:13
for b
1 being
Functionfor b
2 being
set for b
3 being
finite Graphfor b
4, b
5 being
oriented Chain of b
3for b
6, b
7, b
8 being
Vertex of b
3 holds
( b
1 is_weight>=0of b
3 & b
4 is_shortestpath_of b
6,b
7,b
2,b
1 & b
6 <> b
7 & b
6 <> b
8 & b
5 is_shortestpath_of b
6,b
8,b
2,b
1 & ( for b
9 being
set holds
not ( b
9 in the
Edges of b
3 & b
9 orientedly_joins b
7,b
8 ) ) & b
4 islongestInShortestpath b
2,b
6,b
1 implies b
5 is_shortestpath_of b
6,b
8,b
2 \/ {b7},b
1 )
theorem Th14: :: GRAPHSP:14
theorem Th15: :: GRAPHSP:15
for b
1, b
2 being
set for b
3 being
oriented finite Graphfor b
4, b
5 being
oriented Chain of b
3for b
6 being
Function of the
Edges of b
3,
Real>=0 for b
7, b
8, b
9 being
Vertex of b
3 holds
( b
1 in the
Edges of b
3 & b
4 is_shortestpath_of b
7,b
8,b
2,b
6 & b
7 <> b
9 & b
5 = b
4 ^ <*b1*> & b
1 orientedly_joins b
8,b
9 & b
7 in b
2 & ( for b
10 being
Vertex of b
3 holds
( b
10 in b
2 implies for b
11 being
set holds
not ( b
11 in the
Edges of b
3 & b
11 orientedly_joins b
10,b
9 ) ) ) implies b
5 is_shortestpath_of b
7,b
9,b
2 \/ {b8},b
6 )
theorem Th16: :: GRAPHSP:16
for b
1, b
2 being
set for b
3 being
oriented finite Graphfor b
4 being
oriented Chain of b
3for b
5 being
Function of the
Edges of b
3,
Real>=0 for b
6, b
7 being
Vertex of b
3 holds
( the
Vertices of b
3 = b
1 \/ b
2 & b
6 in b
1 & ( for b
8, b
9 being
Vertex of b
3 holds
( b
8 in b
1 & b
9 in b
2 implies for b
10 being
set holds
not ( b
10 in the
Edges of b
3 & b
10 orientedly_joins b
8,b
9 ) ) ) implies ( b
4 is_shortestpath_of b
6,b
7,b
1,b
5 iff b
4 is_shortestpath_of b
6,b
7,b
5 ) )
theorem Th17: :: GRAPHSP:17
:: deftheorem Def1 defines := GRAPHSP:def 1 :
theorem Th18: :: GRAPHSP:18
theorem Th19: :: GRAPHSP:19
theorem Th20: :: GRAPHSP:20
theorem Th21: :: GRAPHSP:21
:: deftheorem Def2 defines repeat GRAPHSP:def 2 :
theorem Th22: :: GRAPHSP:22
Lemma28:
for b1 being set
for b2 being Element of Funcs b1,b1 holds dom b2 = b1
theorem Th23: :: GRAPHSP:23
:: deftheorem Def3 defines OuterVx GRAPHSP:def 3 :
definition
let c
1 be
Element of
Funcs (REAL * ),
(REAL * );
let c
2 be
Element of
REAL * ;
let c
3 be
Nat;
assume E30:
ex b
1 being
Nat st
OuterVx (((repeat c1) . b1) . c2),c
3 = {}
;
func LifeSpan c
1,c
2,c
3 -> Nat means :
Def4:
:: GRAPHSP:def 4
(
OuterVx (((repeat a1) . a4) . a2),a
3 = {} & ( for b
1 being
Nat holds
(
OuterVx (((repeat a1) . b1) . a2),a
3 = {} implies a
4 <= b
1 ) ) );
existence
ex b1 being Nat st
( OuterVx (((repeat c1) . b1) . c2),c3 = {} & ( for b2 being Nat holds
( OuterVx (((repeat c1) . b2) . c2),c3 = {} implies b1 <= b2 ) ) )
uniqueness
for b1, b2 being Nat holds
( OuterVx (((repeat c1) . b1) . c2),c3 = {} & ( for b3 being Nat holds
( OuterVx (((repeat c1) . b3) . c2),c3 = {} implies b1 <= b3 ) ) & OuterVx (((repeat c1) . b2) . c2),c3 = {} & ( for b3 being Nat holds
( OuterVx (((repeat c1) . b3) . c2),c3 = {} implies b2 <= b3 ) ) implies b1 = b2 )
end;
:: deftheorem Def4 defines LifeSpan GRAPHSP:def 4 :
definition
let c
1 be
Element of
Funcs (REAL * ),
(REAL * );
let c
2 be
Nat;
func while_do c
1,c
2 -> Element of
Funcs (REAL * ),
(REAL * ) means :
Def5:
:: GRAPHSP:def 5
(
dom a
3 = REAL * & ( for b
1 being
Element of
REAL * holds a
3 . b
1 = ((repeat a1) . (LifeSpan a1,b1,a2)) . b
1 ) );
existence
ex b1 being Element of Funcs (REAL * ),(REAL * ) st
( dom b1 = REAL * & ( for b2 being Element of REAL * holds b1 . b2 = ((repeat c1) . (LifeSpan c1,b2,c2)) . b2 ) )
uniqueness
for b1, b2 being Element of Funcs (REAL * ),(REAL * ) holds
( dom b1 = REAL * & ( for b3 being Element of REAL * holds b1 . b3 = ((repeat c1) . (LifeSpan c1,b3,c2)) . b3 ) & dom b2 = REAL * & ( for b3 being Element of REAL * holds b2 . b3 = ((repeat c1) . (LifeSpan c1,b3,c2)) . b3 ) implies b1 = b2 )
end;
:: deftheorem Def5 defines while_do GRAPHSP:def 5 :
:: deftheorem Def6 defines Edge GRAPHSP:def 6 :
:: deftheorem Def7 defines Weight GRAPHSP:def 7 :
theorem Th24: :: GRAPHSP:24
theorem Th25: :: GRAPHSP:25
theorem Th26: :: GRAPHSP:26
:: deftheorem Def8 defines UnusedVx GRAPHSP:def 8 :
:: deftheorem Def9 defines UsedVx GRAPHSP:def 9 :
theorem Th27: :: GRAPHSP:27
theorem Th28: :: GRAPHSP:28
theorem Th29: :: GRAPHSP:29
definition
let c
1 be
finite Subset of
NAT ;
let c
2 be
Element of
REAL * ;
let c
3 be
Nat;
func Argmin c
1,c
2,c
3 -> Nat means :
Def10:
:: GRAPHSP:def 10
( not ( a
1 <> {} & ( for b
1 being
Nat holds
not ( b
1 = a
4 & b
1 in a
1 & ( for b
2 being
Nat holds
( b
2 in a
1 implies a
2 /. ((2 * a3) + b1) <= a
2 /. ((2 * a3) + b2) ) ) & ( for b
2 being
Nat holds
( b
2 in a
1 & a
2 /. ((2 * a3) + b1) = a
2 /. ((2 * a3) + b2) implies b
1 <= b
2 ) ) ) ) ) & ( a
1 = {} implies a
4 = 0 ) );
existence
ex b1 being Nat st
( not ( c1 <> {} & ( for b2 being Nat holds
not ( b2 = b1 & b2 in c1 & ( for b3 being Nat holds
( b3 in c1 implies c2 /. ((2 * c3) + b2) <= c2 /. ((2 * c3) + b3) ) ) & ( for b3 being Nat holds
( b3 in c1 & c2 /. ((2 * c3) + b2) = c2 /. ((2 * c3) + b3) implies b2 <= b3 ) ) ) ) ) & ( c1 = {} implies b1 = 0 ) )
uniqueness
for b1, b2 being Nat holds
( not ( c1 <> {} & ( for b3 being Nat holds
not ( b3 = b1 & b3 in c1 & ( for b4 being Nat holds
( b4 in c1 implies c2 /. ((2 * c3) + b3) <= c2 /. ((2 * c3) + b4) ) ) & ( for b4 being Nat holds
( b4 in c1 & c2 /. ((2 * c3) + b3) = c2 /. ((2 * c3) + b4) implies b3 <= b4 ) ) ) ) ) & ( c1 = {} implies b1 = 0 ) & not ( c1 <> {} & ( for b3 being Nat holds
not ( b3 = b2 & b3 in c1 & ( for b4 being Nat holds
( b4 in c1 implies c2 /. ((2 * c3) + b3) <= c2 /. ((2 * c3) + b4) ) ) & ( for b4 being Nat holds
( b4 in c1 & c2 /. ((2 * c3) + b3) = c2 /. ((2 * c3) + b4) implies b3 <= b4 ) ) ) ) ) & ( c1 = {} implies b2 = 0 ) implies b1 = b2 )
end;
:: deftheorem Def10 defines Argmin GRAPHSP:def 10 :
for b
1 being
finite Subset of
NAT for b
2 being
Element of
REAL * for b
3, b
4 being
Nat holds
( b
4 = Argmin b
1,b
2,b
3 iff ( not ( b
1 <> {} & ( for b
5 being
Nat holds
not ( b
5 = b
4 & b
5 in b
1 & ( for b
6 being
Nat holds
( b
6 in b
1 implies b
2 /. ((2 * b3) + b5) <= b
2 /. ((2 * b3) + b6) ) ) & ( for b
6 being
Nat holds
( b
6 in b
1 & b
2 /. ((2 * b3) + b5) = b
2 /. ((2 * b3) + b6) implies b
5 <= b
6 ) ) ) ) ) & ( b
1 = {} implies b
4 = 0 ) ) );
theorem Th30: :: GRAPHSP:30
theorem Th31: :: GRAPHSP:31
definition
let c
1 be
Nat;
func findmin c
1 -> Element of
Funcs (REAL * ),
(REAL * ) means :
Def11:
:: GRAPHSP:def 11
(
dom a
2 = REAL * & ( for b
1 being
Element of
REAL * holds a
2 . b
1 = b
1,
(((a1 * a1) + (3 * a1)) + 1) := (Argmin (OuterVx b1,a1),b1,a1),
(- 1) ) );
existence
ex b1 being Element of Funcs (REAL * ),(REAL * ) st
( dom b1 = REAL * & ( for b2 being Element of REAL * holds b1 . b2 = b2,(((c1 * c1) + (3 * c1)) + 1) := (Argmin (OuterVx b2,c1),b2,c1),(- 1) ) )
uniqueness
for b1, b2 being Element of Funcs (REAL * ),(REAL * ) holds
( dom b1 = REAL * & ( for b3 being Element of REAL * holds b1 . b3 = b3,(((c1 * c1) + (3 * c1)) + 1) := (Argmin (OuterVx b3,c1),b3,c1),(- 1) ) & dom b2 = REAL * & ( for b3 being Element of REAL * holds b2 . b3 = b3,(((c1 * c1) + (3 * c1)) + 1) := (Argmin (OuterVx b3,c1),b3,c1),(- 1) ) implies b1 = b2 )
end;
:: deftheorem Def11 defines findmin GRAPHSP:def 11 :
theorem Th32: :: GRAPHSP:32
theorem Th33: :: GRAPHSP:33
theorem Th34: :: GRAPHSP:34
Lemma46:
for b1, b2 being Nat holds
( b1 >= 1 implies b2 <= b1 * b2 )
Lemma47:
for b1 being Nat holds
( 3 * b1 < ((b1 * b1) + (3 * b1)) + 1 & b1 < ((b1 * b1) + (3 * b1)) + 1 & 2 * b1 < ((b1 * b1) + (3 * b1)) + 1 )
Lemma48:
for b1, b2 being Nat holds
( ( b1 < b2 & b2 <= 2 * b1 implies ( not ( 2 * b1 < b2 & b2 <= 3 * b1 ) & not b2 <= b1 & not b2 > 3 * b1 ) ) & ( not ( not b2 <= b1 & not b2 > 3 * b1 ) implies ( not ( 2 * b1 < b2 & b2 <= 3 * b1 ) & not ( b1 < b2 & b2 <= 2 * b1 ) ) ) & ( 2 * b1 < b2 & b2 <= 3 * b1 implies ( not ( b1 < b2 & b2 <= 2 * b1 ) & not b2 <= b1 & not b2 > 3 * b1 ) ) )
theorem Th35: :: GRAPHSP:35
:: deftheorem Def12 defines newpathcost GRAPHSP:def 12 :
:: deftheorem Def13 defines hasBetterPathAt GRAPHSP:def 13 :
definition
let c
1 be
Element of
REAL * ;
let c
2 be
Nat;
func Relax c
1,c
2 -> Element of
REAL * means :
Def14:
:: GRAPHSP:def 14
(
dom a
3 = dom a
1 & ( for b
1 being
Nat holds
( b
1 in dom a
1 implies ( ( a
2 < b
1 & b
1 <= 2
* a
2 implies ( ( a
1 hasBetterPathAt a
2,b
1 -' a
2 implies a
3 . b
1 = a
1 /. (((a2 * a2) + (3 * a2)) + 1) ) & ( not a
1 hasBetterPathAt a
2,b
1 -' a
2 implies a
3 . b
1 = a
1 . b
1 ) ) ) & ( 2
* a
2 < b
1 & b
1 <= 3
* a
2 implies ( ( a
1 hasBetterPathAt a
2,b
1 -' (2 * a2) implies a
3 . b
1 = newpathcost a
1,a
2,
(b1 -' (2 * a2)) ) & ( not a
1 hasBetterPathAt a
2,b
1 -' (2 * a2) implies a
3 . b
1 = a
1 . b
1 ) ) ) & ( not ( not b
1 <= a
2 & not b
1 > 3
* a
2 ) implies a
3 . b
1 = a
1 . b
1 ) ) ) ) );
existence
ex b1 being Element of REAL * st
( dom b1 = dom c1 & ( for b2 being Nat holds
( b2 in dom c1 implies ( ( c2 < b2 & b2 <= 2 * c2 implies ( ( c1 hasBetterPathAt c2,b2 -' c2 implies b1 . b2 = c1 /. (((c2 * c2) + (3 * c2)) + 1) ) & ( not c1 hasBetterPathAt c2,b2 -' c2 implies b1 . b2 = c1 . b2 ) ) ) & ( 2 * c2 < b2 & b2 <= 3 * c2 implies ( ( c1 hasBetterPathAt c2,b2 -' (2 * c2) implies b1 . b2 = newpathcost c1,c2,(b2 -' (2 * c2)) ) & ( not c1 hasBetterPathAt c2,b2 -' (2 * c2) implies b1 . b2 = c1 . b2 ) ) ) & ( not ( not b2 <= c2 & not b2 > 3 * c2 ) implies b1 . b2 = c1 . b2 ) ) ) ) )
uniqueness
for b1, b2 being Element of REAL * holds
( dom b1 = dom c1 & ( for b3 being Nat holds
( b3 in dom c1 implies ( ( c2 < b3 & b3 <= 2 * c2 implies ( ( c1 hasBetterPathAt c2,b3 -' c2 implies b1 . b3 = c1 /. (((c2 * c2) + (3 * c2)) + 1) ) & ( not c1 hasBetterPathAt c2,b3 -' c2 implies b1 . b3 = c1 . b3 ) ) ) & ( 2 * c2 < b3 & b3 <= 3 * c2 implies ( ( c1 hasBetterPathAt c2,b3 -' (2 * c2) implies b1 . b3 = newpathcost c1,c2,(b3 -' (2 * c2)) ) & ( not c1 hasBetterPathAt c2,b3 -' (2 * c2) implies b1 . b3 = c1 . b3 ) ) ) & ( not ( not b3 <= c2 & not b3 > 3 * c2 ) implies b1 . b3 = c1 . b3 ) ) ) ) & dom b2 = dom c1 & ( for b3 being Nat holds
( b3 in dom c1 implies ( ( c2 < b3 & b3 <= 2 * c2 implies ( ( c1 hasBetterPathAt c2,b3 -' c2 implies b2 . b3 = c1 /. (((c2 * c2) + (3 * c2)) + 1) ) & ( not c1 hasBetterPathAt c2,b3 -' c2 implies b2 . b3 = c1 . b3 ) ) ) & ( 2 * c2 < b3 & b3 <= 3 * c2 implies ( ( c1 hasBetterPathAt c2,b3 -' (2 * c2) implies b2 . b3 = newpathcost c1,c2,(b3 -' (2 * c2)) ) & ( not c1 hasBetterPathAt c2,b3 -' (2 * c2) implies b2 . b3 = c1 . b3 ) ) ) & ( not ( not b3 <= c2 & not b3 > 3 * c2 ) implies b2 . b3 = c1 . b3 ) ) ) ) implies b1 = b2 )
end;
:: deftheorem Def14 defines Relax GRAPHSP:def 14 :
:: deftheorem Def15 defines Relax GRAPHSP:def 15 :
theorem Th36: :: GRAPHSP:36
theorem Th37: :: GRAPHSP:37
theorem Th38: :: GRAPHSP:38
theorem Th39: :: GRAPHSP:39
theorem Th40: :: GRAPHSP:40
for b
1, b
2, b
3 being
Natfor b
4, b
5, b
6 being
Element of
REAL * holds
( b
4 = ((repeat ((Relax b1) * (findmin b1))) . b2) . b
5 & b
6 = ((repeat ((Relax b1) * (findmin b1))) . (b2 + 1)) . b
5 & b
3 = Argmin (OuterVx b4,b1),b
4,b
1 &
OuterVx b
4,b
1 <> {} implies (
UsedVx b
6,b
1 = (UsedVx b4,b1) \/ {b3} & not b
3 in UsedVx b
4,b
1 ) )
theorem Th41: :: GRAPHSP:41
Lemma59:
for b1, b2 being Nat holds b1 - b2 <= b1
Lemma60:
for b1, b2 being FinSequence of NAT
for b3 being Element of REAL *
for b4, b5 being Nat holds
( ( for b6 being Nat holds
( 1 <= b6 & b6 < len b1 implies b1 . ((len b1) - b6) = b3 . ((b1 /. (((len b1) - b6) + 1)) + b5) ) ) & ( for b6 being Nat holds
( 1 <= b6 & b6 < len b2 implies b2 . ((len b2) - b6) = b3 . ((b2 /. (((len b2) - b6) + 1)) + b5) ) ) & len b1 <= len b2 & b1 . (len b1) = b2 . (len b2) implies for b6 being Nat holds
( 1 <= b6 & b6 < len b1 implies b1 . ((len b1) - b6) = b2 . ((len b2) - b6) ) )
theorem Th42: :: GRAPHSP:42
:: deftheorem Def16 defines equal_at GRAPHSP:def 16 :
theorem Th43: :: GRAPHSP:43
theorem Th44: :: GRAPHSP:44
theorem Th45: :: GRAPHSP:45
theorem Th46: :: GRAPHSP:46
theorem Th47: :: GRAPHSP:47
theorem Th48: :: GRAPHSP:48
theorem Th49: :: GRAPHSP:49
:: deftheorem Def17 defines is_vertex_seq_at GRAPHSP:def 17 :
:: deftheorem Def18 defines is_simple_vertex_seq_at GRAPHSP:def 18 :
theorem Th50: :: GRAPHSP:50
:: deftheorem Def19 defines is_oriented_edge_seq_of GRAPHSP:def 19 :
theorem Th51: :: GRAPHSP:51
theorem Th52: :: GRAPHSP:52
Lemma72:
for b1, b2 being Nat holds
( 1 <= b1 & b1 <= b2 implies ( 1 < (2 * b2) + b1 & (2 * b2) + b1 < ((b2 * b2) + (3 * b2)) + 1 & b1 < (2 * b2) + b1 ) )
Lemma73:
for b1, b2 being Nat holds
( 1 <= b1 & b1 <= b2 implies ( 1 < b2 + b1 & b2 + b1 <= 2 * b2 & b2 + b1 < ((b2 * b2) + (3 * b2)) + 1 ) )
Lemma74:
for b1, b2, b3 being Nat holds
( 1 <= b1 & b1 <= b2 & b3 <= b2 implies ( 1 < ((2 * b2) + (b2 * b1)) + b3 & b1 < ((2 * b2) + (b2 * b1)) + b3 & ((2 * b2) + (b2 * b1)) + b3 < ((b2 * b2) + (3 * b2)) + 1 ) )
Lemma75:
for b1, b2, b3 being Nat holds
( 1 <= b1 & b1 <= b2 & 1 <= b3 & b3 <= b2 implies ( (3 * b2) + 1 <= ((2 * b2) + (b2 * b1)) + b3 & ((2 * b2) + (b2 * b1)) + b3 <= (b2 * b2) + (3 * b2) ) )
:: deftheorem Def20 defines is_Input_of_Dijkstra_Alg GRAPHSP:def 20 :
:: deftheorem Def21 defines DijkstraAlgorithm GRAPHSP:def 21 :
Lemma77:
for b1 being Nat
for b2, b3 being Element of REAL *
for b4 being oriented finite Graph
for b5 being Function of the Edges of b4, Real>=0
for b6 being Vertex of b4 holds
( b2 is_Input_of_Dijkstra_Alg b4,b1,b5 & b6 = 1 & b1 >= 1 & b3 = ((repeat ((Relax b1) * (findmin b1))) . 1) . b2 implies ( ( for b7 being Vertex of b4
for b8 being Nat holds
not ( b7 <> b6 & b7 = b8 & b3 . (b1 + b8) <> - 1 & ( for b9 being FinSequence of NAT
for b10 being oriented Chain of b4 holds
not ( b9 is_simple_vertex_seq_at b3,b8,b1 & ( for b11 being Nat holds
( 1 <= b11 & b11 < len b9 implies b9 . b11 in UsedVx b3,b1 ) ) & b10 is_oriented_edge_seq_of b9 & b10 is_shortestpath_of b6,b7, UsedVx b3,b1,b5 & cost b10,b5 = b3 . ((2 * b1) + b8) & ( not b7 in UsedVx b3,b1 implies b10 islongestInShortestpath UsedVx b3,b1,b6,b5 ) ) ) ) ) & ( for b7, b8 being Nat holds
( b3 . (b1 + b8) = - 1 & 1 <= b8 & b8 <= b1 & b7 in UsedVx b3,b1 implies b2 . (((2 * b1) + (b1 * b7)) + b8) = - 1 ) ) & ( for b7 being Nat holds
not ( b7 in UsedVx b3,b1 & not b3 . (b1 + b7) <> - 1 ) ) ) )
Lemma78:
for b1, b2, b3 being Nat
for b4, b5, b6 being Element of REAL * holds
( b4 = ((repeat ((Relax b1) * (findmin b1))) . b2) . b5 & b6 = ((repeat ((Relax b1) * (findmin b1))) . (b2 + 1)) . b5 & OuterVx b4,b1 <> {} & b3 in UsedVx b4,b1 & len b5 = ((b1 * b1) + (3 * b1)) + 1 implies b6 . (b1 + b3) = b4 . (b1 + b3) )
Lemma79:
for b1, b2, b3 being Nat
for b4, b5, b6 being Element of REAL *
for b7 being FinSequence of NAT holds
( b4 = ((repeat ((Relax b1) * (findmin b1))) . b2) . b5 & b6 = ((repeat ((Relax b1) * (findmin b1))) . (b2 + 1)) . b5 & OuterVx b4,b1 <> {} & len b5 = ((b1 * b1) + (3 * b1)) + 1 & b7 is_simple_vertex_seq_at b4,b3,b1 & b4 . (b1 + b3) = b6 . (b1 + b3) & ( for b8 being Nat holds
( 1 <= b8 & b8 < len b7 implies b7 . b8 in UsedVx b4,b1 ) ) implies b7 is_simple_vertex_seq_at b6,b3,b1 )
Lemma80:
for b1, b2, b3, b4 being Nat
for b5, b6, b7 being Element of REAL *
for b8 being FinSequence of NAT holds
( b5 = ((repeat ((Relax b1) * (findmin b1))) . b2) . b6 & b7 = ((repeat ((Relax b1) * (findmin b1))) . (b2 + 1)) . b6 & OuterVx b5,b1 <> {} & len b6 = ((b1 * b1) + (3 * b1)) + 1 & b8 is_simple_vertex_seq_at b5,b3,b1 & b3 = b7 . (b1 + b4) & b5 . (b1 + b3) = b7 . (b1 + b3) & b3 <> b4 & not b4 in UsedVx b5,b1 & ( for b9 being Nat holds
( 1 <= b9 & b9 < len b8 implies b8 . b9 in UsedVx b5,b1 ) ) implies b8 ^ <*b4*> is_simple_vertex_seq_at b7,b4,b1 )
Lemma81:
for b1, b2 being Nat
for b3 being set
for b4, b5 being Element of REAL *
for b6 being oriented finite Graph
for b7 being oriented Chain of b6
for b8 being Function of the Edges of b6, Real>=0
for b9, b10 being Vertex of b6 holds
not ( b4 is_Input_of_Dijkstra_Alg b6,b1,b8 & b8 is_weight>=0of b6 & b9 = b2 & b10 <> b9 & 1 <= b2 & b2 <= b1 & b7 is_shortestpath_of b10,b9,b3,b8 & ( for b11, b12 being Nat holds
( b5 . (b1 + b12) = - 1 & 1 <= b12 & b12 <= b1 & b11 in b3 implies b4 . (((2 * b1) + (b1 * b11)) + b12) = - 1 ) ) & not b5 . (b1 + b2) <> - 1 )
Lemma82:
for b1, b2 being Nat
for b3, b4, b5 being Element of REAL *
for b6 being oriented finite Graph
for b7 being Function of the Edges of b6, Real>=0
for b8 being Vertex of b6 holds
( b3 is_Input_of_Dijkstra_Alg b6,b1,b7 & b8 = 1 & b1 >= 1 & b4 = ((repeat ((Relax b1) * (findmin b1))) . b2) . b3 & b5 = ((repeat ((Relax b1) * (findmin b1))) . (b2 + 1)) . b3 & OuterVx b4,b1 <> {} & b2 >= 1 & 1 in UsedVx b4,b1 & ( for b9 being Vertex of b6
for b10 being Nat holds
not ( b9 <> b8 & b9 = b10 & b4 . (b1 + b10) <> - 1 & ( for b11 being FinSequence of NAT
for b12 being oriented Chain of b6 holds
not ( b11 is_simple_vertex_seq_at b4,b10,b1 & ( for b13 being Nat holds
( 1 <= b13 & b13 < len b11 implies b11 . b13 in UsedVx b4,b1 ) ) & b12 is_oriented_edge_seq_of b11 & b12 is_shortestpath_of b8,b9, UsedVx b4,b1,b7 & cost b12,b7 = b4 . ((2 * b1) + b10) & ( not b9 in UsedVx b4,b1 implies b12 islongestInShortestpath UsedVx b4,b1,b8,b7 ) ) ) ) ) & ( for b9, b10 being Nat holds
( b4 . (b1 + b10) = - 1 & 1 <= b10 & b10 <= b1 & b9 in UsedVx b4,b1 implies b3 . (((2 * b1) + (b1 * b9)) + b10) = - 1 ) ) & ( for b9 being Nat holds
not ( b9 in UsedVx b4,b1 & not b4 . (b1 + b9) <> - 1 ) ) implies ( ( for b9 being Vertex of b6
for b10 being Nat holds
not ( b9 <> b8 & b9 = b10 & b5 . (b1 + b10) <> - 1 & ( for b11 being FinSequence of NAT
for b12 being oriented Chain of b6 holds
not ( b11 is_simple_vertex_seq_at b5,b10,b1 & ( for b13 being Nat holds
( 1 <= b13 & b13 < len b11 implies b11 . b13 in UsedVx b5,b1 ) ) & b12 is_oriented_edge_seq_of b11 & b12 is_shortestpath_of b8,b9, UsedVx b5,b1,b7 & cost b12,b7 = b5 . ((2 * b1) + b10) & ( not b9 in UsedVx b5,b1 implies b12 islongestInShortestpath UsedVx b5,b1,b8,b7 ) ) ) ) ) & ( for b9, b10 being Nat holds
( b5 . (b1 + b10) = - 1 & 1 <= b10 & b10 <= b1 & b9 in UsedVx b5,b1 implies b3 . (((2 * b1) + (b1 * b9)) + b10) = - 1 ) ) & ( for b9 being Nat holds
not ( b9 in UsedVx b5,b1 & not b5 . (b1 + b9) <> - 1 ) ) ) )
theorem Th53: :: GRAPHSP:53
for b
1, b
2 being
Natfor b
3, b
4 being
Element of
REAL * for b
5 being
oriented finite Graphfor b
6 being
Function of the
Edges of b
5,
Real>=0 for b
7, b
8 being
Vertex of b
5 holds
( b
3 is_Input_of_Dijkstra_Alg b
5,b
1,b
6 & b
7 = 1 & 1
<> b
8 & b
8 = b
2 & b
1 >= 1 & b
4 = (DijkstraAlgorithm b1) . b
3 implies ( the
Vertices of b
5 = (UsedVx b4,b1) \/ (UnusedVx b4,b1) & not ( b
8 in UsedVx b
4,b
1 & ( for b
9 being
FinSequence of
NAT for b
10 being
oriented Chain of b
5 holds
not ( b
9 is_simple_vertex_seq_at b
4,b
2,b
1 & b
10 is_oriented_edge_seq_of b
9 & b
10 is_shortestpath_of b
7,b
8,b
6 &
cost b
10,b
6 = b
4 . ((2 * b1) + b2) ) ) ) & ( b
8 in UnusedVx b
4,b
1 implies for b
9 being
oriented Chain of b
5 holds
not b
9 is_orientedpath_of b
7,b
8 ) ) )