:: GRAPHSP semantic presentation :: Showing IDV graph ... (Click the Palm Trees again to close it)
theorem Th1: :: GRAPHSP:1 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th2: :: GRAPHSP:2 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th3: :: GRAPHSP:3 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th4: :: GRAPHSP:4 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th5: :: GRAPHSP:5 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm1:
for n being Nat
for p, q being FinSequence st 1 <= n & n <= len p holds
p . n = (p ^ q) . n
Lm2:
for n being Nat
for p, q being FinSequence st 1 <= n & n <= len q holds
q . n = (p ^ q) . ((len p) + n)
theorem Th6: :: GRAPHSP:6 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th7: :: GRAPHSP:7 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th8: :: GRAPHSP:8 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th9: :: GRAPHSP:9 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
G being
Graph for
p,
q being
oriented Chain of
G for
W being
Function for
V being
set for
v1,
v2 being
Vertex of
G st
p is_shortestpath_of v1,
v2,
V,
W &
q is_shortestpath_of v1,
v2,
V,
W holds
cost p,
W = cost q,
W
theorem Th10: :: GRAPHSP:10 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm3:
for i being Nat
for G being Graph
for pe being FinSequence of the Edges of G st 1 <= i & i <= len pe holds
( the Source of G . (pe . i) in the Vertices of G & the Target of G . (pe . i) in the Vertices of G )
theorem Th11: :: GRAPHSP:11 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm4:
for i being Nat
for G being Graph
for pe being FinSequence of the Edges of G
for v1 being Vertex of G st 1 <= i & i <= len pe & ( v1 = the Source of G . (pe . i) or v1 = the Target of G . (pe . i) ) holds
v1 in vertices pe
theorem Th12: :: GRAPHSP:12 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th13: :: GRAPHSP:13 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
W being
Function for
V being
set for
G being
finite Graph for
P,
Q being
oriented Chain of
G for
v1,
v2,
v3 being
Vertex of
G st
W is_weight>=0of G &
P is_shortestpath_of v1,
v2,
V,
W &
v1 <> v2 &
v1 <> v3 &
Q is_shortestpath_of v1,
v3,
V,
W & ( for
e being
set holds
( not
e in the
Edges of
G or not
e orientedly_joins v2,
v3 ) ) &
P islongestInShortestpath V,
v1,
W holds
Q is_shortestpath_of v1,
v3,
V \/ {v2},
W
theorem Th14: :: GRAPHSP:14 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th15: :: GRAPHSP:15 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
e,
V being
set for
G being
oriented finite Graph for
P,
Q being
oriented Chain of
G for
W being
Function of the
Edges of
G,
Real>=0 for
v1,
v2,
v3 being
Vertex of
G st
e in the
Edges of
G &
P is_shortestpath_of v1,
v2,
V,
W &
v1 <> v3 &
Q = P ^ <*e*> &
e orientedly_joins v2,
v3 &
v1 in V & ( for
v4 being
Vertex of
G st
v4 in V holds
for
ee being
set holds
( not
ee in the
Edges of
G or not
ee orientedly_joins v4,
v3 ) ) holds
Q is_shortestpath_of v1,
v3,
V \/ {v2},
W
theorem Th16: :: GRAPHSP:16 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
U,
V being
set for
G being
oriented finite Graph for
P being
oriented Chain of
G for
W being
Function of the
Edges of
G,
Real>=0 for
v1,
v2 being
Vertex of
G st the
Vertices of
G = U \/ V &
v1 in U & ( for
v3,
v4 being
Vertex of
G st
v3 in U &
v4 in V holds
for
e being
set holds
( not
e in the
Edges of
G or not
e orientedly_joins v3,
v4 ) ) holds
(
P is_shortestpath_of v1,
v2,
U,
W iff
P is_shortestpath_of v1,
v2,
W )
theorem Th17: :: GRAPHSP:17 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem defines := GRAPHSP:def 1 :
theorem Th18: :: GRAPHSP:18 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th19: :: GRAPHSP:19 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th20: :: GRAPHSP:20 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th21: :: GRAPHSP:21 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem Def2 defines repeat GRAPHSP:def 2 :
theorem Th22: :: GRAPHSP:22 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm5:
for X being set
for f being Element of Funcs X,X holds dom f = X
theorem Th23: :: GRAPHSP:23 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem defines OuterVx GRAPHSP:def 3 :
definition
let f be
Element of
Funcs (REAL * ),
(REAL * );
let g be
Element of
REAL * ;
let n be
Nat;
assume A1:
ex
i being
Nat st
OuterVx (((repeat f) . i) . g),
n = {}
;
func LifeSpan f,
g,
n -> Nat means :
Def4:
:: GRAPHSP:def 4
(
OuterVx (((repeat f) . it) . g),
n = {} & ( for
k being
Nat st
OuterVx (((repeat f) . k) . g),
n = {} holds
it <= k ) );
existence
ex b1 being Nat st
( OuterVx (((repeat f) . b1) . g),n = {} & ( for k being Nat st OuterVx (((repeat f) . k) . g),n = {} holds
b1 <= k ) )
uniqueness
for b1, b2 being Nat st OuterVx (((repeat f) . b1) . g),n = {} & ( for k being Nat st OuterVx (((repeat f) . k) . g),n = {} holds
b1 <= k ) & OuterVx (((repeat f) . b2) . g),n = {} & ( for k being Nat st OuterVx (((repeat f) . k) . g),n = {} holds
b2 <= k ) holds
b1 = b2
end;
:: deftheorem Def4 defines LifeSpan GRAPHSP:def 4 :
definition
let f be
Element of
Funcs (REAL * ),
(REAL * );
let n be
Nat;
func while_do f,
n -> Element of
Funcs (REAL * ),
(REAL * ) means :
Def5:
:: GRAPHSP:def 5
(
dom it = REAL * & ( for
h being
Element of
REAL * holds
it . h = ((repeat f) . (LifeSpan f,h,n)) . h ) );
existence
ex b1 being Element of Funcs (REAL * ),(REAL * ) st
( dom b1 = REAL * & ( for h being Element of REAL * holds b1 . h = ((repeat f) . (LifeSpan f,h,n)) . h ) )
uniqueness
for b1, b2 being Element of Funcs (REAL * ),(REAL * ) st dom b1 = REAL * & ( for h being Element of REAL * holds b1 . h = ((repeat f) . (LifeSpan f,h,n)) . h ) & dom b2 = REAL * & ( for h being Element of REAL * holds b2 . h = ((repeat f) . (LifeSpan f,h,n)) . h ) holds
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 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: GRAPHSP:25 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th26: :: GRAPHSP:26 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem defines UnusedVx GRAPHSP:def 8 :
:: deftheorem defines UsedVx GRAPHSP:def 9 :
theorem Th27: :: GRAPHSP:27 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th28: :: GRAPHSP:28 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th29: :: GRAPHSP:29 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem Def10 defines Argmin GRAPHSP:def 10 :
theorem Th30: :: GRAPHSP:30 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th31: :: GRAPHSP:31 :: Showing IDV graph ... (Click the Palm Tree again to close it)
definition
let n be
Nat;
func findmin n -> Element of
Funcs (REAL * ),
(REAL * ) means :
Def11:
:: GRAPHSP:def 11
(
dom it = REAL * & ( for
f being
Element of
REAL * holds
it . f = f,
(((n * n) + (3 * n)) + 1) := (Argmin (OuterVx f,n),f,n),
(- 1) ) );
existence
ex b1 being Element of Funcs (REAL * ),(REAL * ) st
( dom b1 = REAL * & ( for f being Element of REAL * holds b1 . f = f,(((n * n) + (3 * n)) + 1) := (Argmin (OuterVx f,n),f,n),(- 1) ) )
uniqueness
for b1, b2 being Element of Funcs (REAL * ),(REAL * ) st dom b1 = REAL * & ( for f being Element of REAL * holds b1 . f = f,(((n * n) + (3 * n)) + 1) := (Argmin (OuterVx f,n),f,n),(- 1) ) & dom b2 = REAL * & ( for f being Element of REAL * holds b2 . f = f,(((n * n) + (3 * n)) + 1) := (Argmin (OuterVx f,n),f,n),(- 1) ) holds
b1 = b2
end;
:: deftheorem Def11 defines findmin GRAPHSP:def 11 :
theorem Th32: :: GRAPHSP:32 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th33: :: GRAPHSP:33 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th34: :: GRAPHSP:34 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm6:
for k, n being Nat st k >= 1 holds
n <= k * n
Lm7:
for n being Nat holds
( 3 * n < ((n * n) + (3 * n)) + 1 & n < ((n * n) + (3 * n)) + 1 & 2 * n < ((n * n) + (3 * n)) + 1 )
Lm8:
for n, k being Nat holds
( ( n < k & k <= 2 * n implies ( ( not 2 * n < k or not k <= 3 * n ) & not k <= n & not k > 3 * n ) ) & ( ( k <= n or k > 3 * n ) implies ( ( not 2 * n < k or not k <= 3 * n ) & ( not n < k or not k <= 2 * n ) ) ) & ( 2 * n < k & k <= 3 * n implies ( ( not n < k or not k <= 2 * n ) & not k <= n & not k > 3 * n ) ) )
theorem Th35: :: GRAPHSP:35 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem defines newpathcost GRAPHSP:def 12 :
:: deftheorem Def13 defines hasBetterPathAt GRAPHSP:def 13 :
definition
let f be
Element of
REAL * ;
let n be
Nat;
func Relax f,
n -> Element of
REAL * means :
Def14:
:: GRAPHSP:def 14
(
dom it = dom f & ( for
k being
Nat st
k in dom f holds
( (
n < k &
k <= 2
* n implies ( (
f hasBetterPathAt n,
k -' n implies
it . k = f /. (((n * n) + (3 * n)) + 1) ) & ( not
f hasBetterPathAt n,
k -' n implies
it . k = f . k ) ) ) & ( 2
* n < k &
k <= 3
* n implies ( (
f hasBetterPathAt n,
k -' (2 * n) implies
it . k = newpathcost f,
n,
(k -' (2 * n)) ) & ( not
f hasBetterPathAt n,
k -' (2 * n) implies
it . k = f . k ) ) ) & ( (
k <= n or
k > 3
* n ) implies
it . k = f . k ) ) ) );
existence
ex b1 being Element of REAL * st
( dom b1 = dom f & ( for k being Nat st k in dom f holds
( ( n < k & k <= 2 * n implies ( ( f hasBetterPathAt n,k -' n implies b1 . k = f /. (((n * n) + (3 * n)) + 1) ) & ( not f hasBetterPathAt n,k -' n implies b1 . k = f . k ) ) ) & ( 2 * n < k & k <= 3 * n implies ( ( f hasBetterPathAt n,k -' (2 * n) implies b1 . k = newpathcost f,n,(k -' (2 * n)) ) & ( not f hasBetterPathAt n,k -' (2 * n) implies b1 . k = f . k ) ) ) & ( ( k <= n or k > 3 * n ) implies b1 . k = f . k ) ) ) )
uniqueness
for b1, b2 being Element of REAL * st dom b1 = dom f & ( for k being Nat st k in dom f holds
( ( n < k & k <= 2 * n implies ( ( f hasBetterPathAt n,k -' n implies b1 . k = f /. (((n * n) + (3 * n)) + 1) ) & ( not f hasBetterPathAt n,k -' n implies b1 . k = f . k ) ) ) & ( 2 * n < k & k <= 3 * n implies ( ( f hasBetterPathAt n,k -' (2 * n) implies b1 . k = newpathcost f,n,(k -' (2 * n)) ) & ( not f hasBetterPathAt n,k -' (2 * n) implies b1 . k = f . k ) ) ) & ( ( k <= n or k > 3 * n ) implies b1 . k = f . k ) ) ) & dom b2 = dom f & ( for k being Nat st k in dom f holds
( ( n < k & k <= 2 * n implies ( ( f hasBetterPathAt n,k -' n implies b2 . k = f /. (((n * n) + (3 * n)) + 1) ) & ( not f hasBetterPathAt n,k -' n implies b2 . k = f . k ) ) ) & ( 2 * n < k & k <= 3 * n implies ( ( f hasBetterPathAt n,k -' (2 * n) implies b2 . k = newpathcost f,n,(k -' (2 * n)) ) & ( not f hasBetterPathAt n,k -' (2 * n) implies b2 . k = f . k ) ) ) & ( ( k <= n or k > 3 * n ) implies b2 . k = f . k ) ) ) holds
b1 = b2
end;
:: deftheorem Def14 defines Relax GRAPHSP:def 14 :
:: deftheorem Def15 defines Relax GRAPHSP:def 15 :
theorem Th36: :: GRAPHSP:36 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th37: :: GRAPHSP:37 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th38: :: GRAPHSP:38 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th39: :: GRAPHSP:39 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th40: :: GRAPHSP:40 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
n,
i,
k being
Nat for
g,
f,
h being
Element of
REAL * st
g = ((repeat ((Relax n) * (findmin n))) . i) . f &
h = ((repeat ((Relax n) * (findmin n))) . (i + 1)) . f &
k = Argmin (OuterVx g,n),
g,
n &
OuterVx g,
n <> {} holds
(
UsedVx h,
n = (UsedVx g,n) \/ {k} & not
k in UsedVx g,
n )
theorem Th41: :: GRAPHSP:41 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm9:
for n, k being Nat holds n - k <= n
Lm10:
for p, q being FinSequence of NAT
for f being Element of REAL *
for i, n being Nat st ( for k being Nat st 1 <= k & k < len p holds
p . ((len p) - k) = f . ((p /. (((len p) - k) + 1)) + n) ) & ( for k being Nat st 1 <= k & k < len q holds
q . ((len q) - k) = f . ((q /. (((len q) - k) + 1)) + n) ) & len p <= len q & p . (len p) = q . (len q) holds
for k being Nat st 1 <= k & k < len p holds
p . ((len p) - k) = q . ((len q) - k)
theorem Th42: :: GRAPHSP:42 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem Def16 defines equal_at GRAPHSP:def 16 :
theorem Th43: :: GRAPHSP:43 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th44: :: GRAPHSP:44 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th45: :: GRAPHSP:45 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: GRAPHSP:46 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th47: :: GRAPHSP:47 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th48: :: GRAPHSP:48 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem Th49: :: GRAPHSP:49 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem Def17 defines is_vertex_seq_at GRAPHSP:def 17 :
:: deftheorem Def18 defines is_simple_vertex_seq_at GRAPHSP:def 18 :
theorem :: GRAPHSP:50 :: Showing IDV graph ... (Click the Palm Tree again to close it)
:: deftheorem Def19 defines is_oriented_edge_seq_of GRAPHSP:def 19 :
theorem :: GRAPHSP:51 :: Showing IDV graph ... (Click the Palm Tree again to close it)
theorem :: GRAPHSP:52 :: Showing IDV graph ... (Click the Palm Tree again to close it)
Lm11:
for i, n being Nat st 1 <= i & i <= n holds
( 1 < (2 * n) + i & (2 * n) + i < ((n * n) + (3 * n)) + 1 & i < (2 * n) + i )
Lm12:
for i, n being Nat st 1 <= i & i <= n holds
( 1 < n + i & n + i <= 2 * n & n + i < ((n * n) + (3 * n)) + 1 )
Lm13:
for i, n, j being Nat st 1 <= i & i <= n & j <= n holds
( 1 < ((2 * n) + (n * i)) + j & i < ((2 * n) + (n * i)) + j & ((2 * n) + (n * i)) + j < ((n * n) + (3 * n)) + 1 )
Lm14:
for i, n, j being Nat st 1 <= i & i <= n & 1 <= j & j <= n holds
( (3 * n) + 1 <= ((2 * n) + (n * i)) + j & ((2 * n) + (n * i)) + j <= (n * n) + (3 * n) )
:: deftheorem Def20 defines is_Input_of_Dijkstra_Alg GRAPHSP:def 20 :
:: deftheorem defines DijkstraAlgorithm GRAPHSP:def 21 :
Lm15:
for n being Nat
for f, h being Element of REAL *
for G being oriented finite Graph
for W being Function of the Edges of G, Real>=0
for v1 being Vertex of G st f is_Input_of_Dijkstra_Alg G,n,W & v1 = 1 & n >= 1 & h = ((repeat ((Relax n) * (findmin n))) . 1) . f holds
( ( for v3 being Vertex of G
for j being Nat st v3 <> v1 & v3 = j & h . (n + j) <> - 1 holds
ex p being FinSequence of NAT ex P being oriented Chain of G st
( p is_simple_vertex_seq_at h,j,n & ( for i being Nat st 1 <= i & i < len p holds
p . i in UsedVx h,n ) & P is_oriented_edge_seq_of p & P is_shortestpath_of v1,v3, UsedVx h,n,W & cost P,W = h . ((2 * n) + j) & ( not v3 in UsedVx h,n implies P islongestInShortestpath UsedVx h,n,v1,W ) ) ) & ( for m, j being Nat st h . (n + j) = - 1 & 1 <= j & j <= n & m in UsedVx h,n holds
f . (((2 * n) + (n * m)) + j) = - 1 ) & ( for m being Nat st m in UsedVx h,n holds
h . (n + m) <> - 1 ) )
Lm16:
for n, k, i being Nat
for g, f, h being Element of REAL * st g = ((repeat ((Relax n) * (findmin n))) . k) . f & h = ((repeat ((Relax n) * (findmin n))) . (k + 1)) . f & OuterVx g,n <> {} & i in UsedVx g,n & len f = ((n * n) + (3 * n)) + 1 holds
h . (n + i) = g . (n + i)
Lm17:
for n, k, j being Nat
for g, f, h being Element of REAL *
for p being FinSequence of NAT st g = ((repeat ((Relax n) * (findmin n))) . k) . f & h = ((repeat ((Relax n) * (findmin n))) . (k + 1)) . f & OuterVx g,n <> {} & len f = ((n * n) + (3 * n)) + 1 & p is_simple_vertex_seq_at g,j,n & g . (n + j) = h . (n + j) & ( for i being Nat st 1 <= i & i < len p holds
p . i in UsedVx g,n ) holds
p is_simple_vertex_seq_at h,j,n
Lm18:
for n, k, m, j being Nat
for g, f, h being Element of REAL *
for p being FinSequence of NAT st g = ((repeat ((Relax n) * (findmin n))) . k) . f & h = ((repeat ((Relax n) * (findmin n))) . (k + 1)) . f & OuterVx g,n <> {} & len f = ((n * n) + (3 * n)) + 1 & p is_simple_vertex_seq_at g,m,n & m = h . (n + j) & g . (n + m) = h . (n + m) & m <> j & not j in UsedVx g,n & ( for i being Nat st 1 <= i & i < len p holds
p . i in UsedVx g,n ) holds
p ^ <*j*> is_simple_vertex_seq_at h,j,n
Lm19:
for n, i being Nat
for V being set
for f, g being Element of REAL *
for G being oriented finite Graph
for P being oriented Chain of G
for W being Function of the Edges of G, Real>=0
for v2, v1 being Vertex of G st f is_Input_of_Dijkstra_Alg G,n,W & W is_weight>=0of G & v2 = i & v1 <> v2 & 1 <= i & i <= n & P is_shortestpath_of v1,v2,V,W & ( for m, j being Nat st g . (n + j) = - 1 & 1 <= j & j <= n & m in V holds
f . (((2 * n) + (n * m)) + j) = - 1 ) holds
g . (n + i) <> - 1
Lm20:
for n, k being Nat
for f, g, h being Element of REAL *
for G being oriented finite Graph
for W being Function of the Edges of G, Real>=0
for v1 being Vertex of G st f is_Input_of_Dijkstra_Alg G,n,W & v1 = 1 & n >= 1 & g = ((repeat ((Relax n) * (findmin n))) . k) . f & h = ((repeat ((Relax n) * (findmin n))) . (k + 1)) . f & OuterVx g,n <> {} & k >= 1 & 1 in UsedVx g,n & ( for v3 being Vertex of G
for j being Nat st v3 <> v1 & v3 = j & g . (n + j) <> - 1 holds
ex p being FinSequence of NAT ex P being oriented Chain of G st
( p is_simple_vertex_seq_at g,j,n & ( for i being Nat st 1 <= i & i < len p holds
p . i in UsedVx g,n ) & P is_oriented_edge_seq_of p & P is_shortestpath_of v1,v3, UsedVx g,n,W & cost P,W = g . ((2 * n) + j) & ( not v3 in UsedVx g,n implies P islongestInShortestpath UsedVx g,n,v1,W ) ) ) & ( for m, j being Nat st g . (n + j) = - 1 & 1 <= j & j <= n & m in UsedVx g,n holds
f . (((2 * n) + (n * m)) + j) = - 1 ) & ( for m being Nat st m in UsedVx g,n holds
g . (n + m) <> - 1 ) holds
( ( for v3 being Vertex of G
for j being Nat st v3 <> v1 & v3 = j & h . (n + j) <> - 1 holds
ex p being FinSequence of NAT ex P being oriented Chain of G st
( p is_simple_vertex_seq_at h,j,n & ( for i being Nat st 1 <= i & i < len p holds
p . i in UsedVx h,n ) & P is_oriented_edge_seq_of p & P is_shortestpath_of v1,v3, UsedVx h,n,W & cost P,W = h . ((2 * n) + j) & ( not v3 in UsedVx h,n implies P islongestInShortestpath UsedVx h,n,v1,W ) ) ) & ( for m, j being Nat st h . (n + j) = - 1 & 1 <= j & j <= n & m in UsedVx h,n holds
f . (((2 * n) + (n * m)) + j) = - 1 ) & ( for m being Nat st m in UsedVx h,n holds
h . (n + m) <> - 1 ) )
theorem :: GRAPHSP:53 :: Showing IDV graph ... (Click the Palm Tree again to close it)
for
n,
i being
Nat for
f,
g being
Element of
REAL * for
G being
oriented finite Graph for
W being
Function of the
Edges of
G,
Real>=0 for
v1,
v2 being
Vertex of
G st
f is_Input_of_Dijkstra_Alg G,
n,
W &
v1 = 1 & 1
<> v2 &
v2 = i &
n >= 1 &
g = (DijkstraAlgorithm n) . f holds
( the
Vertices of
G = (UsedVx g,n) \/ (UnusedVx g,n) & (
v2 in UsedVx g,
n implies ex
p being
FinSequence of
NAT ex
P being
oriented Chain of
G st
(
p is_simple_vertex_seq_at g,
i,
n &
P is_oriented_edge_seq_of p &
P is_shortestpath_of v1,
v2,
W &
cost P,
W = g . ((2 * n) + i) ) ) & (
v2 in UnusedVx g,
n implies for
Q being
oriented Chain of
G holds not
Q is_orientedpath_of v1,
v2 ) )