:: JCT_MISC semantic presentation

scheme :: JCT_MISC:sch 1
s1{ F1() -> non empty set , F2( set ) -> set } :
not { F2(b1) where B is Element of F1() : verum } is empty
proof end;

theorem Th1: :: JCT_MISC:1
canceled;

theorem Th2: :: JCT_MISC:2
canceled;

theorem Th3: :: JCT_MISC:3
for b1, b2 being set
for b3 being Function st b1 c= dom b3 & b3 .: b1 c= b2 holds
b1 c= b3 " b2
proof end;

theorem Th4: :: JCT_MISC:4
for b1 being Function
for b2, b3 being set st b2 misses b3 holds
b1 " b2 misses b1 " b3
proof end;

theorem Th5: :: JCT_MISC:5
for b1, b2 being set
for b3 being Function of b1,b2
for b4 being Subset of b2 st ( b2 = {} implies b1 = {} ) holds
(b3 " b4) ` = b3 " (b4 ` )
proof end;

theorem Th6: :: JCT_MISC:6
for b1 being 1-sorted
for b2 being non empty set
for b3 being Function of the carrier of b1,b2
for b4 being Subset of b2 holds (b3 " b4) ` = b3 " (b4 ` ) by Th5;

theorem Th7: :: JCT_MISC:7
for b1, b2 being Nat st b1 <= b2 holds
b2 -' (b2 -' b1) = b1
proof end;

theorem Th8: :: JCT_MISC:8
canceled;

theorem Th9: :: JCT_MISC:9
for b1, b2, b3, b4 being real number st b1 in [.b3,b4.] & b2 in [.b3,b4.] holds
(b1 + b2) / 2 in [.b3,b4.]
proof end;

Lemma5: for b1 being increasing Seq_of_Nat
for b2, b3 being Nat st b2 <= b3 holds
b1 . b2 <= b1 . b3
by SEQM_3:12;

theorem Th10: :: JCT_MISC:10
canceled;

theorem Th11: :: JCT_MISC:11
for b1, b2, b3, b4 being real number holds abs ((abs (b1 - b2)) - (abs (b3 - b4))) <= (abs (b1 - b3)) + (abs (b2 - b4))
proof end;

theorem Th12: :: JCT_MISC:12
for b1, b2, b3 being real number st b1 in ].b2,b3.[ holds
abs b1 < max (abs b2),(abs b3)
proof end;

definition
let c1, c2, c3 be non empty set ;
let c4 be Function of c1,[:c2,c3:];
redefine func pr1 as pr1 c4 -> Function of a1,a2 means :Def1: :: JCT_MISC:def 1
for b1 being Element of a1 holds a5 . b1 = (a4 . b1) `1 ;
coherence
pr1 c4 is Function of c1,c2
proof end;
compatibility
for b1 being Function of c1,c2 holds
( b1 = pr1 c4 iff for b2 being Element of c1 holds b1 . b2 = (c4 . b2) `1 )
proof end;
redefine func pr2 as pr2 c4 -> Function of a1,a3 means :Def2: :: JCT_MISC:def 2
for b1 being Element of a1 holds a5 . b1 = (a4 . b1) `2 ;
coherence
pr2 c4 is Function of c1,c3
proof end;
compatibility
for b1 being Function of c1,c3 holds
( b1 = pr2 c4 iff for b2 being Element of c1 holds b1 . b2 = (c4 . b2) `2 )
proof end;
end;

:: deftheorem Def1 defines pr1 JCT_MISC:def 1 :
for b1, b2, b3 being non empty set
for b4 being Function of b1,[:b2,b3:]
for b5 being Function of b1,b2 holds
( b5 = pr1 b4 iff for b6 being Element of b1 holds b5 . b6 = (b4 . b6) `1 );

:: deftheorem Def2 defines pr2 JCT_MISC:def 2 :
for b1, b2, b3 being non empty set
for b4 being Function of b1,[:b2,b3:]
for b5 being Function of b1,b3 holds
( b5 = pr2 b4 iff for b6 being Element of b1 holds b5 . b6 = (b4 . b6) `2 );

scheme :: JCT_MISC:sch 2
s2{ F1() -> non empty set , F2() -> non empty set , F3() -> non empty set , P1[ set , set , set ] } :
ex b1 being Function of F1(),F2()ex b2 being Function of F1(),F3() st
for b3 being Element of F1() holds P1[b3,b1 . b3,b2 . b3]
provided
E9: for b1 being Element of F1() ex b2 being Element of F2()ex b3 being Element of F3() st P1[b1,b2,b3]
proof end;

theorem Th13: :: JCT_MISC:13
for b1, b2 being non empty TopSpace
for b3 being Subset of [:b1,b2:] st ( for b4 being Point of [:b1,b2:] st b4 in b3 holds
ex b5 being Subset of b1ex b6 being Subset of b2 st
( b5 is open & b6 is open & b4 in [:b5,b6:] & [:b5,b6:] c= b3 ) ) holds
b3 is open
proof end;

theorem Th14: :: JCT_MISC:14
for b1, b2 being compact Subset of REAL holds b1 /\ b2 is compact
proof end;

definition
let c1 be Subset of REAL ;
attr a1 is connected means :Def3: :: JCT_MISC:def 3
for b1, b2 being real number st b1 in a1 & b2 in a1 holds
[.b1,b2.] c= a1;
end;

:: deftheorem Def3 defines connected JCT_MISC:def 3 :
for b1 being Subset of REAL holds
( b1 is connected iff for b2, b3 being real number st b2 in b1 & b3 in b1 holds
[.b2,b3.] c= b1 );

theorem Th15: :: JCT_MISC:15
for b1 being non empty TopSpace
for b2 being continuous RealMap of b1
for b3 being Subset of b1 st b3 is connected holds
b2 .: b3 is connected
proof end;

definition
let c1, c2 be Subset of REAL ;
func dist c1,c2 -> real number means :Def4: :: JCT_MISC:def 4
ex b1 being Subset of REAL st
( b1 = { (abs (b2 - b3)) where B is Element of REAL , B is Element of REAL : ( b2 in a1 & b3 in a2 ) } & a3 = lower_bound b1 );
existence
ex b1 being real number ex b2 being Subset of REAL st
( b2 = { (abs (b3 - b4)) where B is Element of REAL , B is Element of REAL : ( b3 in c1 & b4 in c2 ) } & b1 = lower_bound b2 )
proof end;
uniqueness
for b1, b2 being real number st ex b3 being Subset of REAL st
( b3 = { (abs (b4 - b5)) where B is Element of REAL , B is Element of REAL : ( b4 in c1 & b5 in c2 ) } & b1 = lower_bound b3 ) & ex b3 being Subset of REAL st
( b3 = { (abs (b4 - b5)) where B is Element of REAL , B is Element of REAL : ( b4 in c1 & b5 in c2 ) } & b2 = lower_bound b3 ) holds
b1 = b2
;
commutativity
for b1 being real number
for b2, b3 being Subset of REAL st ex b4 being Subset of REAL st
( b4 = { (abs (b5 - b6)) where B is Element of REAL , B is Element of REAL : ( b5 in b2 & b6 in b3 ) } & b1 = lower_bound b4 ) holds
ex b4 being Subset of REAL st
( b4 = { (abs (b5 - b6)) where B is Element of REAL , B is Element of REAL : ( b5 in b3 & b6 in b2 ) } & b1 = lower_bound b4 )
proof end;
end;

:: deftheorem Def4 defines dist JCT_MISC:def 4 :
for b1, b2 being Subset of REAL
for b3 being real number holds
( b3 = dist b1,b2 iff ex b4 being Subset of REAL st
( b4 = { (abs (b5 - b6)) where B is Element of REAL , B is Element of REAL : ( b5 in b1 & b6 in b2 ) } & b3 = lower_bound b4 ) );

theorem Th16: :: JCT_MISC:16
for b1, b2 being Subset of REAL
for b3, b4 being real number st b3 in b1 & b4 in b2 holds
abs (b3 - b4) >= dist b1,b2
proof end;

theorem Th17: :: JCT_MISC:17
for b1, b2 being Subset of REAL
for b3, b4 being non empty Subset of REAL st b3 c= b1 & b4 c= b2 holds
dist b1,b2 <= dist b3,b4
proof end;

theorem Th18: :: JCT_MISC:18
for b1, b2 being non empty compact Subset of REAL ex b3, b4 being real number st
( b3 in b1 & b4 in b2 & dist b1,b2 = abs (b3 - b4) )
proof end;

theorem Th19: :: JCT_MISC:19
for b1, b2 being non empty compact Subset of REAL holds dist b1,b2 >= 0
proof end;

theorem Th20: :: JCT_MISC:20
for b1, b2 being non empty compact Subset of REAL st b1 misses b2 holds
dist b1,b2 > 0
proof end;

theorem Th21: :: JCT_MISC:21
for b1, b2 being real number
for b3, b4 being compact Subset of REAL st b3 misses b4 & b3 c= [.b1,b2.] & b4 c= [.b1,b2.] holds
for b5 being Function of NAT , bool REAL st ( for b6 being Nat holds
( b5 . b6 is connected & b5 . b6 meets b3 & b5 . b6 meets b4 ) ) holds
ex b6 being real number st
( b6 in [.b1,b2.] & not b6 in b3 \/ b4 & ( for b7 being Nat ex b8 being Nat st
( b7 <= b8 & b6 in b5 . b8 ) ) )
proof end;