:: FILEREC1 semantic presentation

theorem Th1: :: FILEREC1:1
for b1 being non empty set
for b2, b3, b4, b5 being FinSequence of b1 holds
( ((b2 ^ b3) ^ b4) ^ b5 = (b2 ^ (b3 ^ b4)) ^ b5 & ((b2 ^ b3) ^ b4) ^ b5 = (b2 ^ b3) ^ (b4 ^ b5) & (b2 ^ (b3 ^ b4)) ^ b5 = (b2 ^ b3) ^ (b4 ^ b5) )
proof end;

theorem Th2: :: FILEREC1:2
for b1 being set
for b2 being FinSequence of b1 holds b2 | (len b2) = b2
proof end;

theorem Th3: :: FILEREC1:3
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
( len b2 = 0 implies b3 = b2 ^ b3 )
proof end;

theorem Th4: :: FILEREC1:4
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4 being Nat holds
( b3 <= b4 implies len (b2 /^ b4) <= len (b2 /^ b3) )
proof end;

theorem Th5: :: FILEREC1:5
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
( len b3 >= 1 implies mid (b2 ^ b3),((len b2) + 1),((len b2) + (len b3)) = b3 )
proof end;

theorem Th6: :: FILEREC1:6
for b1 being non empty set
for b2, b3 being FinSequence of b1
for b4, b5 being Nat holds
( 1 <= b4 & b4 <= b5 & b5 <= len b2 implies mid (b2 ^ b3),b4,b5 = mid b2,b4,b5 )
proof end;

theorem Th7: :: FILEREC1:7
for b1 being non empty set
for b2 being FinSequence of b1
for b3, b4, b5 being Nat holds
( 1 <= b3 & b3 <= b4 & b3 <= len (b2 | b5) & b4 <= len (b2 | b5) implies mid b2,b3,b4 = mid (b2 | b5),b3,b4 )
proof end;

theorem Th8: :: FILEREC1:8
for b1 being set
for b2 being non empty set
for b3 being FinSequence of b2 holds
( b3 = <*b1*> implies b1 in b2 )
proof end;

theorem Th9: :: FILEREC1:9
for b1, b2 being set
for b3 being non empty set
for b4 being FinSequence of b3 holds
( b4 = <*b1,b2*> implies ( b1 in b3 & b2 in b3 ) )
proof end;

theorem Th10: :: FILEREC1:10
for b1, b2, b3 being set
for b4 being non empty set
for b5 being FinSequence of b4 holds
( b5 = <*b1,b2,b3*> implies ( b1 in b4 & b2 in b4 & b3 in b4 ) )
proof end;

theorem Th11: :: FILEREC1:11
for b1 being set
for b2 being non empty set
for b3 being FinSequence of b2 holds
( b3 = <*b1*> implies b3 | 1 = <*b1*> )
proof end;

theorem Th12: :: FILEREC1:12
for b1, b2 being set
for b3 being non empty set
for b4 being FinSequence of b3 holds
( b4 = <*b1,b2*> implies b4 /^ 1 = <*b2*> )
proof end;

theorem Th13: :: FILEREC1:13
for b1, b2, b3 being set
for b4 being non empty set
for b5 being FinSequence of b4 holds
( b5 = <*b1,b2,b3*> implies b5 | 1 = <*b1*> )
proof end;

theorem Th14: :: FILEREC1:14
for b1, b2, b3 being set
for b4 being non empty set
for b5 being FinSequence of b4 holds
( b5 = <*b1,b2,b3*> implies b5 | 2 = <*b1,b2*> )
proof end;

theorem Th15: :: FILEREC1:15
for b1, b2, b3 being set
for b4 being non empty set
for b5 being FinSequence of b4 holds
( b5 = <*b1,b2,b3*> implies b5 /^ 1 = <*b2,b3*> )
proof end;

theorem Th16: :: FILEREC1:16
for b1, b2, b3 being set
for b4 being non empty set
for b5 being FinSequence of b4 holds
( b5 = <*b1,b2,b3*> implies b5 /^ 2 = <*b3*> )
proof end;

theorem Th17: :: FILEREC1:17
for b1 being non empty set
for b2 being FinSequence of b1 holds
( len b2 = 0 implies Rev b2 = b2 )
proof end;

theorem Th18: :: FILEREC1:18
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Nat holds
( b3 <= len b2 implies Rev (b2 /^ b3) = (Rev b2) | ((len b2) -' b3) )
proof end;

theorem Th19: :: FILEREC1:19
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
( not b3 is_substring_of b2,1 & b3 separates_uniquely implies instr 1,(b2 ^ b3),b3 = (len b2) + 1 )
proof end;

theorem Th20: :: FILEREC1:20
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds (b2 ^ b3) /^ (len b2) is_preposition_of by FINSEQ_5:40;

theorem Th21: :: FILEREC1:21
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds
( not b3 is_substring_of b2,1 & b3 separates_uniquely implies b2 ^ b3 is_terminated_by b3 )
proof end;

notation
let c1 be set ;
synonym File of c1 for FinSequence of c1;
end;

definition
let c1 be non empty set ;
let c2, c3, c4 be File of c1;
pred c2 is_a_record_of c3,c4 means :Def1: :: FILEREC1:def 1
( ( a4 ^ a2 is_substring_of addcr a3,a4,1 or addcr a3,a4 is_preposition_of ) & a2 is_terminated_by a4 );
end;

:: deftheorem Def1 defines is_a_record_of FILEREC1:def 1 :
for b1 being non empty set
for b2, b3, b4 being File of b1 holds
( b2 is_a_record_of b3,b4 iff ( ( b4 ^ b2 is_substring_of addcr b3,b4,1 or addcr b3,b4 is_preposition_of ) & b2 is_terminated_by b4 ) );

theorem Th22: :: FILEREC1:22
for b1 being non empty set
for b2 being FinSequence of b1 holds
( ovlpart (<*> b1),b2 = <*> b1 & ovlpart b2,(<*> b1) = <*> b1 )
proof end;

theorem Th23: :: FILEREC1:23
for b1 being non empty set
for b2 being FinSequence of b1 holds b2 is_a_record_of <*> b1,b2
proof end;

theorem Th24: :: FILEREC1:24
for b1 being non empty set
for b2, b3 being set
for b4, b5, b6 being File of b1 holds
( b2 <> b3 & b1 = {b2,b3} & b6 = <*b3*> & b4 = <*b3,b2,b3*> & b5 = <*b2,b3*> implies ( b6 is_a_record_of b4,b6 & b5 is_a_record_of b4,b6 ) )
proof end;

theorem Th25: :: FILEREC1:25
for b1 being non empty set
for b2, b3 being File of b1 holds b2 ^ b3 is_preposition_of
proof end;

theorem Th26: :: FILEREC1:26
for b1 being non empty set
for b2, b3 being File of b1 holds addcr b2,b3 is_preposition_of
proof end;

theorem Th27: :: FILEREC1:27
for b1 being non empty set
for b2, b3 being File of b1 holds
( b3 is_postposition_of b2 implies 0 <= (len b2) - (len b3) )
proof end;

theorem Th28: :: FILEREC1:28
for b1 being non empty set
for b2, b3 being File of b1 holds
( b2 is_postposition_of b3 implies b3 = addcr b3,b2 )
proof end;

theorem Th29: :: FILEREC1:29
for b1 being non empty set
for b2, b3 being File of b1 holds
( b3 is_terminated_by b2 implies b3 = addcr b3,b2 )
proof end;

theorem Th30: :: FILEREC1:30
for b1 being non empty set
for b2, b3 being File of b1 holds
( b2 is_terminated_by b3 implies len b3 <= len b2 )
proof end;

theorem Th31: :: FILEREC1:31
for b1 being non empty set
for b2, b3 being File of b1 holds
( len (addcr b2,b3) >= len b2 & len (addcr b2,b3) >= len b3 )
proof end;

theorem Th32: :: FILEREC1:32
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds b3 = (ovlpart b2,b3) ^ (ovlrdiff b2,b3)
proof end;

theorem Th33: :: FILEREC1:33
for b1 being non empty set
for b2, b3 being FinSequence of b1 holds ovlcon b2,b3 = (ovlldiff b2,b3) ^ b3
proof end;

theorem Th34: :: FILEREC1:34
for b1 being non empty set
for b2, b3 being File of b1 holds addcr b3,b2 = (ovlldiff b3,b2) ^ b2
proof end;

theorem Th35: :: FILEREC1:35
for b1 being non empty set
for b2, b3, b4 being File of b1 holds
( b4 = b2 ^ b3 implies ( b2 is_substring_of b4,1 & b3 is_substring_of b4,1 ) )
proof end;

theorem Th36: :: FILEREC1:36
for b1 being non empty set
for b2, b3, b4, b5 being File of b1 holds
( b5 = (b2 ^ b3) ^ b4 implies ( b2 is_substring_of b5,1 & b3 is_substring_of b5,1 & b4 is_substring_of b5,1 ) )
proof end;

theorem Th37: :: FILEREC1:37
for b1 being non empty set
for b2, b3, b4 being File of b1 holds
( b3 is_terminated_by b2 & b4 is_terminated_by b2 implies b2 ^ b4 is_substring_of addcr (b3 ^ b4),b2,1 )
proof end;

theorem Th38: :: FILEREC1:38
for b1 being non empty set
for b2, b3 being File of b1
for b4 being Nat holds
( 0 < b4 & b3 = {} implies instr b4,b2,b3 = b4 )
proof end;

theorem Th39: :: FILEREC1:39
for b1 being non empty set
for b2, b3 being File of b1
for b4 being Nat holds
( 0 < b4 & b4 <= len b2 implies instr b4,b2,b3 <= len b2 )
proof end;

theorem Th40: :: FILEREC1:40
for b1 being non empty set
for b2, b3 being File of b1 holds b3 is_substring_of ovlcon b2,b3,1
proof end;

theorem Th41: :: FILEREC1:41
for b1 being non empty set
for b2, b3 being File of b1 holds b3 is_substring_of addcr b2,b3,1
proof end;

theorem Th42: :: FILEREC1:42
for b1 being non empty set
for b2, b3 being FinSequence of b1
for b4 being Nat holds
( b3 is_substring_of b2 | b4,1 & len b3 > 0 & len b3 <= b4 implies b3 is_substring_of b2,1 )
proof end;

theorem Th43: :: FILEREC1:43
for b1 being non empty set
for b2, b3 being File of b1 holds
ex b4 being File of b1 st b4 is_a_record_of b2,b3
proof end;

theorem Th44: :: FILEREC1:44
for b1 being non empty set
for b2, b3, b4 being File of b1 holds
( b4 is_a_record_of b2,b3 implies b4 is_a_record_of b4,b3 )
proof end;

theorem Th45: :: FILEREC1:45
for b1 being non empty set
for b2, b3, b4, b5 being File of b1 holds
( b3 is_terminated_by b2 & b4 is_terminated_by b2 & b5 = b3 ^ b4 implies ( b3 is_a_record_of b5,b2 & b4 is_a_record_of b5,b2 ) )
proof end;