:: JGRAPH_1 semantic presentation

theorem Th1: :: JGRAPH_1:1
canceled;

theorem Th2: :: JGRAPH_1:2
for b1, b2 being Real holds sqrt ((b1 ^2 ) + (b2 ^2 )) <= (abs b1) + (abs b2)
proof end;

theorem Th3: :: JGRAPH_1:3
for b1, b2 being Real holds
( abs b1 <= sqrt ((b1 ^2 ) + (b2 ^2 )) & abs b2 <= sqrt ((b1 ^2 ) + (b2 ^2 )) )
proof end;

theorem Th4: :: JGRAPH_1:4
for b1 being Graph
for b2 being oriented Chain of b1
for b3 being FinSequence of the Vertices of b1 st b2 is Simple & b3 is_oriented_vertex_seq_of b2 holds
for b4, b5 being Nat st 1 <= b4 & b4 < b5 & b5 <= len b3 & b3 . b4 = b3 . b5 holds
( b4 = 1 & b5 = len b3 )
proof end;

definition
let c1 be set ;
func PGraph c1 -> MultiGraphStruct equals :: JGRAPH_1:def 1
MultiGraphStruct(# a1,[:a1,a1:],(pr1 a1,a1),(pr2 a1,a1) #);
coherence
MultiGraphStruct(# c1,[:c1,c1:],(pr1 c1,c1),(pr2 c1,c1) #) is MultiGraphStruct
;
end;

:: deftheorem Def1 defines PGraph JGRAPH_1:def 1 :
for b1 being set holds PGraph b1 = MultiGraphStruct(# b1,[:b1,b1:],(pr1 b1,b1),(pr2 b1,b1) #);

theorem Th5: :: JGRAPH_1:5
for b1 being non empty set holds PGraph b1 is Graph by GRAPH_1:def 1;

theorem Th6: :: JGRAPH_1:6
for b1 being set holds the Vertices of (PGraph b1) = b1 ;

definition
let c1 be FinSequence;
func PairF c1 -> FinSequence means :Def2: :: JGRAPH_1:def 2
( len a2 = (len a1) -' 1 & ( for b1 being Nat st 1 <= b1 & b1 < len a1 holds
a2 . b1 = [(a1 . b1),(a1 . (b1 + 1))] ) );
existence
ex b1 being FinSequence st
( len b1 = (len c1) -' 1 & ( for b2 being Nat st 1 <= b2 & b2 < len c1 holds
b1 . b2 = [(c1 . b2),(c1 . (b2 + 1))] ) )
proof end;
uniqueness
for b1, b2 being FinSequence st len b1 = (len c1) -' 1 & ( for b3 being Nat st 1 <= b3 & b3 < len c1 holds
b1 . b3 = [(c1 . b3),(c1 . (b3 + 1))] ) & len b2 = (len c1) -' 1 & ( for b3 being Nat st 1 <= b3 & b3 < len c1 holds
b2 . b3 = [(c1 . b3),(c1 . (b3 + 1))] ) holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines PairF JGRAPH_1:def 2 :
for b1, b2 being FinSequence holds
( b2 = PairF b1 iff ( len b2 = (len b1) -' 1 & ( for b3 being Nat st 1 <= b3 & b3 < len b1 holds
b2 . b3 = [(b1 . b3),(b1 . (b3 + 1))] ) ) );

registration
let c1 be non empty set ;
cluster PGraph a1 -> Graph-like ;
coherence
PGraph c1 is Graph-like
by Th5;
end;

theorem Th7: :: JGRAPH_1:7
for b1 being non empty set
for b2 being FinSequence of b1 holds b2 is FinSequence of the Vertices of (PGraph b1) ;

theorem Th8: :: JGRAPH_1:8
for b1 being non empty set
for b2 being FinSequence of b1 holds PairF b2 is FinSequence of the Edges of (PGraph b1)
proof end;

definition
let c1 be non empty set ;
let c2 be FinSequence of c1;
redefine func PairF as PairF c2 -> FinSequence of the Edges of (PGraph a1);
coherence
PairF c2 is FinSequence of the Edges of (PGraph c1)
by Th8;
end;

theorem Th9: :: JGRAPH_1:9
for b1 being non empty set
for b2 being Nat
for b3 being FinSequence of b1 st 1 <= b2 & b2 <= len (PairF b3) holds
(PairF b3) . b2 in the Edges of (PGraph b1)
proof end;

theorem Th10: :: JGRAPH_1:10
for b1 being non empty set
for b2 being FinSequence of b1 holds PairF b2 is oriented Chain of PGraph b1
proof end;

definition
let c1 be non empty set ;
let c2 be FinSequence of c1;
redefine func PairF as PairF c2 -> oriented Chain of PGraph a1;
coherence
PairF c2 is oriented Chain of PGraph c1
by Th10;
end;

theorem Th11: :: JGRAPH_1:11
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being FinSequence of the Vertices of (PGraph b1) st len b2 >= 1 & b2 = b3 holds
b3 is_oriented_vertex_seq_of PairF b2
proof end;

definition
let c1 be non empty set ;
let c2, c3 be FinSequence of c1;
pred c3 is_Shortcut_of c2 means :Def3: :: JGRAPH_1:def 3
( a2 . 1 = a3 . 1 & a2 . (len a2) = a3 . (len a3) & ex b1 being FinSubsequence of PairF a2ex b2 being FinSubsequence of a2ex b3 being oriented simple Chain of PGraph a1ex b4 being FinSequence of the Vertices of (PGraph a1) st
( Seq b1 = b3 & Seq b2 = a3 & b4 = a3 & b4 is_oriented_vertex_seq_of b3 ) );
end;

:: deftheorem Def3 defines is_Shortcut_of JGRAPH_1:def 3 :
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
( b3 is_Shortcut_of b2 iff ( b2 . 1 = b3 . 1 & b2 . (len b2) = b3 . (len b3) & ex b4 being FinSubsequence of PairF b2ex b5 being FinSubsequence of b2ex b6 being oriented simple Chain of PGraph b1ex b7 being FinSequence of the Vertices of (PGraph b1) st
( Seq b4 = b6 & Seq b5 = b3 & b7 = b3 & b7 is_oriented_vertex_seq_of b6 ) ) );

theorem Th12: :: JGRAPH_1:12
for b1 being non empty set
for b2, b3 being FinSequence of b1 st b3 is_Shortcut_of b2 holds
( 1 <= len b3 & len b3 <= len b2 )
proof end;

theorem Th13: :: JGRAPH_1:13
for b1 being non empty set
for b2 being FinSequence of b1 st len b2 >= 1 holds
ex b3 being FinSequence of b1 st b3 is_Shortcut_of b2
proof end;

theorem Th14: :: JGRAPH_1:14
for b1 being non empty set
for b2, b3 being FinSequence of b1 st b3 is_Shortcut_of b2 holds
rng (PairF b3) c= rng (PairF b2)
proof end;

theorem Th15: :: JGRAPH_1:15
for b1 being non empty set
for b2, b3 being FinSequence of b1 st b2 . 1 <> b2 . (len b2) & b3 is_Shortcut_of b2 holds
( b3 is one-to-one & rng (PairF b3) c= rng (PairF b2) & b3 . 1 = b2 . 1 & b3 . (len b3) = b2 . (len b2) )
proof end;

definition
let c1 be Nat;
let c2 be FinSequence of (TOP-REAL c1);
attr a2 is nodic means :Def4: :: JGRAPH_1:def 4
for b1, b2 being Nat holds
( not LSeg a2,b1 meets LSeg a2,b2 or ( (LSeg a2,b1) /\ (LSeg a2,b2) = {(a2 . b1)} & ( a2 . b1 = a2 . b2 or a2 . b1 = a2 . (b2 + 1) ) ) or ( (LSeg a2,b1) /\ (LSeg a2,b2) = {(a2 . (b1 + 1))} & ( a2 . (b1 + 1) = a2 . b2 or a2 . (b1 + 1) = a2 . (b2 + 1) ) ) or LSeg a2,b1 = LSeg a2,b2 );
end;

:: deftheorem Def4 defines nodic JGRAPH_1:def 4 :
for b1 being Nat
for b2 being FinSequence of (TOP-REAL b1) holds
( b2 is nodic iff for b3, b4 being Nat holds
( not LSeg b2,b3 meets LSeg b2,b4 or ( (LSeg b2,b3) /\ (LSeg b2,b4) = {(b2 . b3)} & ( b2 . b3 = b2 . b4 or b2 . b3 = b2 . (b4 + 1) ) ) or ( (LSeg b2,b3) /\ (LSeg b2,b4) = {(b2 . (b3 + 1))} & ( b2 . (b3 + 1) = b2 . b4 or b2 . (b3 + 1) = b2 . (b4 + 1) ) ) or LSeg b2,b3 = LSeg b2,b4 ) );

theorem Th16: :: JGRAPH_1:16
for b1 being FinSequence of (TOP-REAL 2) st b1 is s.n.c. holds
b1 is s.c.c.
proof end;

theorem Th17: :: JGRAPH_1:17
for b1 being FinSequence of (TOP-REAL 2) st b1 is s.c.c. & LSeg b1,1 misses LSeg b1,((len b1) -' 1) holds
b1 is s.n.c.
proof end;

theorem Th18: :: JGRAPH_1:18
for b1 being FinSequence of (TOP-REAL 2) st b1 is nodic & PairF b1 is Simple holds
b1 is s.c.c.
proof end;

theorem Th19: :: JGRAPH_1:19
for b1 being FinSequence of (TOP-REAL 2) st b1 is nodic & PairF b1 is Simple & b1 . 1 <> b1 . (len b1) holds
b1 is s.n.c.
proof end;

theorem Th20: :: JGRAPH_1:20
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) holds
( for b5 being set holds
( not b5 <> b3 or not b5 in (LSeg b2,b3) /\ (LSeg b3,b4) ) or b2 in LSeg b3,b4 or b4 in LSeg b2,b3 )
proof end;

theorem Th21: :: JGRAPH_1:21
for b1 being FinSequence of (TOP-REAL 2) st b1 is s.n.c. & (LSeg b1,1) /\ (LSeg b1,(1 + 1)) c= {(b1 /. (1 + 1))} & (LSeg b1,((len b1) -' 2)) /\ (LSeg b1,((len b1) -' 1)) c= {(b1 /. ((len b1) -' 1))} holds
b1 is unfolded
proof end;

theorem Th22: :: JGRAPH_1:22
for b1 being non empty set
for b2 being FinSequence of b1 st PairF b2 is Simple & b2 . 1 <> b2 . (len b2) holds
( b2 is one-to-one & len b2 <> 1 )
proof end;

theorem Th23: :: JGRAPH_1:23
for b1 being non empty set
for b2 being FinSequence of b1 st b2 is one-to-one & len b2 > 1 holds
( PairF b2 is Simple & b2 . 1 <> b2 . (len b2) )
proof end;

theorem Th24: :: JGRAPH_1:24
for b1 being FinSequence of (TOP-REAL 2) st b1 is nodic & PairF b1 is Simple & b1 . 1 <> b1 . (len b1) holds
b1 is unfolded
proof end;

theorem Th25: :: JGRAPH_1:25
for b1, b2 being FinSequence of (TOP-REAL 2)
for b3 being Nat st b2 is_Shortcut_of b1 & 1 <= b3 & b3 + 1 <= len b2 holds
ex b4 being Nat st
( 1 <= b4 & b4 + 1 <= len b1 & b1 /. b4 = b2 /. b3 & b1 /. (b4 + 1) = b2 /. (b3 + 1) & b1 . b4 = b2 . b3 & b1 . (b4 + 1) = b2 . (b3 + 1) )
proof end;

theorem Th26: :: JGRAPH_1:26
for b1, b2 being FinSequence of (TOP-REAL 2) st b2 is_Shortcut_of b1 holds
rng b2 c= rng b1
proof end;

theorem Th27: :: JGRAPH_1:27
for b1, b2 being FinSequence of (TOP-REAL 2) st b2 is_Shortcut_of b1 holds
L~ b2 c= L~ b1
proof end;

theorem Th28: :: JGRAPH_1:28
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 is special & b2 is_Shortcut_of b1 holds
b2 is special
proof end;

theorem Th29: :: JGRAPH_1:29
for b1 being FinSequence of (TOP-REAL 2) st b1 is special & 2 <= len b1 & b1 . 1 <> b1 . (len b1) holds
ex b2 being FinSequence of (TOP-REAL 2) st
( 2 <= len b2 & b2 is special & b2 is one-to-one & L~ b2 c= L~ b1 & b1 . 1 = b2 . 1 & b1 . (len b1) = b2 . (len b2) & rng b2 c= rng b1 )
proof end;

theorem Th30: :: JGRAPH_1:30
for b1, b2 being FinSequence of (TOP-REAL 2) st b1 is special & b2 is special & 2 <= len b1 & 2 <= len b2 & b1 . 1 <> b1 . (len b1) & b2 . 1 <> b2 . (len b2) & X_axis b1 lies_between (X_axis b1) . 1,(X_axis b1) . (len b1) & X_axis b2 lies_between (X_axis b1) . 1,(X_axis b1) . (len b1) & Y_axis b1 lies_between (Y_axis b2) . 1,(Y_axis b2) . (len b2) & Y_axis b2 lies_between (Y_axis b2) . 1,(Y_axis b2) . (len b2) holds
L~ b1 meets L~ b2
proof end;

theorem Th31: :: JGRAPH_1:31
for b1, b2, b3, b4 being Real st b1 <= b3 & b3 <= b2 & b1 <= b4 & b4 <= b2 holds
abs (b3 - b4) <= b2 - b1
proof end;

definition
let c1 be Nat;
let c2 be Point of (TOP-REAL c1);
redefine func |.c2.| -> Element of REAL means :Def5: :: JGRAPH_1:def 5
for b1 being Element of REAL a1 st a2 = b1 holds
a3 = |.b1.|;
compatibility
for b1 being Element of REAL holds
( b1 = |.c2.| iff for b2 being Element of REAL c1 st c2 = b2 holds
b1 = |.b2.| )
proof end;
end;

:: deftheorem Def5 defines |. JGRAPH_1:def 5 :
for b1 being Nat
for b2 being Point of (TOP-REAL b1)
for b3 being Element of REAL holds
( b3 = |.b2.| iff for b4 being Element of REAL b1 st b2 = b4 holds
b3 = |.b4.| );

theorem Th32: :: JGRAPH_1:32
canceled;

theorem Th33: :: JGRAPH_1:33
canceled;

theorem Th34: :: JGRAPH_1:34
canceled;

theorem Th35: :: JGRAPH_1:35
canceled;

theorem Th36: :: JGRAPH_1:36
canceled;

theorem Th37: :: JGRAPH_1:37
canceled;

theorem Th38: :: JGRAPH_1:38
canceled;

theorem Th39: :: JGRAPH_1:39
canceled;

theorem Th40: :: JGRAPH_1:40
canceled;

theorem Th41: :: JGRAPH_1:41
canceled;

theorem Th42: :: JGRAPH_1:42
canceled;

theorem Th43: :: JGRAPH_1:43
canceled;

theorem Th44: :: JGRAPH_1:44
canceled;

theorem Th45: :: JGRAPH_1:45
for b1 being Nat
for b2, b3 being Point of (TOP-REAL b1)
for b4, b5 being Point of (Euclid b1) st b4 = b2 & b5 = b3 holds
|.(b2 - b3).| = dist b4,b5
proof end;

theorem Th46: :: JGRAPH_1:46
for b1 being Point of (TOP-REAL 2) holds |.b1.| ^2 = ((b1 `1 ) ^2 ) + ((b1 `2 ) ^2 )
proof end;

theorem Th47: :: JGRAPH_1:47
for b1 being Point of (TOP-REAL 2) holds |.b1.| = sqrt (((b1 `1 ) ^2 ) + ((b1 `2 ) ^2 ))
proof end;

theorem Th48: :: JGRAPH_1:48
for b1 being Point of (TOP-REAL 2) holds |.b1.| <= (abs (b1 `1 )) + (abs (b1 `2 ))
proof end;

theorem Th49: :: JGRAPH_1:49
for b1, b2 being Point of (TOP-REAL 2) holds |.(b1 - b2).| <= (abs ((b1 `1 ) - (b2 `1 ))) + (abs ((b1 `2 ) - (b2 `2 )))
proof end;

theorem Th50: :: JGRAPH_1:50
for b1 being Point of (TOP-REAL 2) holds
( abs (b1 `1 ) <= |.b1.| & abs (b1 `2 ) <= |.b1.| )
proof end;

theorem Th51: :: JGRAPH_1:51
for b1, b2 being Point of (TOP-REAL 2) holds
( abs ((b1 `1 ) - (b2 `1 )) <= |.(b1 - b2).| & abs ((b1 `2 ) - (b2 `2 )) <= |.(b1 - b2).| )
proof end;

theorem Th52: :: JGRAPH_1:52
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st b2 in LSeg b3,b4 holds
ex b5 being Real st
( 0 <= b5 & b5 <= 1 & b2 = ((1 - b5) * b3) + (b5 * b4) )
proof end;

theorem Th53: :: JGRAPH_1:53
for b1 being Nat
for b2, b3, b4 being Point of (TOP-REAL b1) st b2 in LSeg b3,b4 holds
( |.(b2 - b3).| <= |.(b3 - b4).| & |.(b2 - b4).| <= |.(b3 - b4).| )
proof end;

theorem Th54: :: JGRAPH_1:54
for b1 being non empty MetrSpace
for b2, b3 being Subset of (TopSpaceMetr b1) st b2 <> {} & b2 is compact & b3 <> {} & b3 is compact holds
min_dist_min b2,b3 >= 0
proof end;

theorem Th55: :: JGRAPH_1:55
for b1 being non empty MetrSpace
for b2, b3 being Subset of (TopSpaceMetr b1) st b2 <> {} & b2 is compact & b3 <> {} & b3 is compact holds
( b2 misses b3 iff min_dist_min b2,b3 > 0 )
proof end;

theorem Th56: :: JGRAPH_1:56
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3, b4 being Real st 1 <= len b1 & X_axis b1 lies_between (X_axis b1) . 1,(X_axis b1) . (len b1) & Y_axis b1 lies_between b3,b4 & b2 > 0 & ( for b5 being Nat st 1 <= b5 & b5 + 1 <= len b1 holds
|.((b1 /. b5) - (b1 /. (b5 + 1))).| < b2 ) holds
ex b5 being FinSequence of (TOP-REAL 2) st
( b5 is special & b5 . 1 = b1 . 1 & b5 . (len b5) = b1 . (len b1) & len b5 >= len b1 & X_axis b5 lies_between (X_axis b1) . 1,(X_axis b1) . (len b1) & Y_axis b5 lies_between b3,b4 & ( for b6 being Nat st b6 in dom b5 holds
ex b7 being Nat st
( b7 in dom b1 & |.((b5 /. b6) - (b1 /. b7)).| < b2 ) ) & ( for b6 being Nat st 1 <= b6 & b6 + 1 <= len b5 holds
|.((b5 /. b6) - (b5 /. (b6 + 1))).| < b2 ) )
proof end;

theorem Th57: :: JGRAPH_1:57
for b1 being FinSequence of (TOP-REAL 2)
for b2, b3, b4 being Real st 1 <= len b1 & Y_axis b1 lies_between (Y_axis b1) . 1,(Y_axis b1) . (len b1) & X_axis b1 lies_between b3,b4 & b2 > 0 & ( for b5 being Nat st 1 <= b5 & b5 + 1 <= len b1 holds
|.((b1 /. b5) - (b1 /. (b5 + 1))).| < b2 ) holds
ex b5 being FinSequence of (TOP-REAL 2) st
( b5 is special & b5 . 1 = b1 . 1 & b5 . (len b5) = b1 . (len b1) & len b5 >= len b1 & Y_axis b5 lies_between (Y_axis b1) . 1,(Y_axis b1) . (len b1) & X_axis b5 lies_between b3,b4 & ( for b6 being Nat st b6 in dom b5 holds
ex b7 being Nat st
( b7 in dom b1 & |.((b5 /. b6) - (b1 /. b7)).| < b2 ) ) & ( for b6 being Nat st 1 <= b6 & b6 + 1 <= len b5 holds
|.((b5 /. b6) - (b5 /. (b6 + 1))).| < b2 ) )
proof end;

theorem Th58: :: JGRAPH_1:58
canceled;

theorem Th59: :: JGRAPH_1:59
for b1 being FinSequence of (TOP-REAL 2) st 1 <= len b1 holds
( len (X_axis b1) = len b1 & (X_axis b1) . 1 = (b1 /. 1) `1 & (X_axis b1) . (len b1) = (b1 /. (len b1)) `1 )
proof end;

theorem Th60: :: JGRAPH_1:60
for b1 being FinSequence of (TOP-REAL 2) st 1 <= len b1 holds
( len (Y_axis b1) = len b1 & (Y_axis b1) . 1 = (b1 /. 1) `2 & (Y_axis b1) . (len b1) = (b1 /. (len b1)) `2 )
proof end;

theorem Th61: :: JGRAPH_1:61
for b1 being Nat
for b2 being FinSequence of (TOP-REAL 2) st b1 in dom b2 holds
( (X_axis b2) . b1 = (b2 /. b1) `1 & (Y_axis b2) . b1 = (b2 /. b1) `2 )
proof end;

theorem Th62: :: JGRAPH_1:62
for b1, b2 being non empty Subset of (TOP-REAL 2)
for b3, b4, b5, b6 being Point of (TOP-REAL 2) st b1 is_an_arc_of b3,b4 & b2 is_an_arc_of b5,b6 & ( for b7 being Point of (TOP-REAL 2) st b7 in b1 holds
( b3 `1 <= b7 `1 & b7 `1 <= b4 `1 ) ) & ( for b7 being Point of (TOP-REAL 2) st b7 in b2 holds
( b3 `1 <= b7 `1 & b7 `1 <= b4 `1 ) ) & ( for b7 being Point of (TOP-REAL 2) st b7 in b1 holds
( b5 `2 <= b7 `2 & b7 `2 <= b6 `2 ) ) & ( for b7 being Point of (TOP-REAL 2) st b7 in b2 holds
( b5 `2 <= b7 `2 & b7 `2 <= b6 `2 ) ) holds
b1 meets b2
proof end;

theorem Th63: :: JGRAPH_1:63
for b1, b2 being non empty TopSpace
for b3 being Function of b1,b2
for b4 being non empty Subset of b2
for b5 being Function of b1,(b2 | b4) st b3 = b5 & b3 is continuous holds
b5 is continuous
proof end;

theorem Th64: :: JGRAPH_1:64
for b1, b2 being non empty TopSpace
for b3 being Function of b1,b2
for b4 being non empty Subset of b2 st b1 is compact & b2 is_T2 & b3 is continuous & b3 is one-to-one & b4 = rng b3 holds
ex b5 being Function of b1,(b2 | b4) st
( b3 = b5 & b5 is_homeomorphism )
proof end;

theorem Th65: :: JGRAPH_1:65
for b1, b2 being Function of I[01] ,(TOP-REAL 2)
for b3, b4, b5, b6 being real number
for b7, b8 being Point of I[01] st b7 = 0 & b8 = 1 & b1 is continuous & b1 is one-to-one & b2 is continuous & b2 is one-to-one & (b1 . b7) `1 = b3 & (b1 . b8) `1 = b4 & (b2 . b7) `2 = b5 & (b2 . b8) `2 = b6 & ( for b9 being Point of I[01] holds
( b3 <= (b1 . b9) `1 & (b1 . b9) `1 <= b4 & b3 <= (b2 . b9) `1 & (b2 . b9) `1 <= b4 & b5 <= (b1 . b9) `2 & (b1 . b9) `2 <= b6 & b5 <= (b2 . b9) `2 & (b2 . b9) `2 <= b6 ) ) holds
rng b1 meets rng b2
proof end;