:: FINSEQ_2 semantic presentation

theorem Th1: :: FINSEQ_2:1
for b1, b2 being Nat holds
( min b1,b2 is Nat & max b1,b2 is Nat ) by SQUARE_1:38, SQUARE_1:49;

theorem Th2: :: FINSEQ_2:2
for b1, b2, b3 being Nat st b1 = min b2,b3 holds
(Seg b2) /\ (Seg b3) = Seg b1
proof end;

theorem Th3: :: FINSEQ_2:3
for b1, b2 being Nat st b1 <= b2 holds
max 0,(b1 - b2) = 0
proof end;

theorem Th4: :: FINSEQ_2:4
for b1, b2 being Nat st b1 <= b2 holds
max 0,(b2 - b1) = b2 - b1
proof end;

theorem Th5: :: FINSEQ_2:5
for b1, b2 being Nat holds max 0,(b1 - b2) is Nat
proof end;

theorem Th6: :: FINSEQ_2:6
for b1 being Nat holds
( min 0,b1 = 0 & min b1,0 = 0 & max 0,b1 = b1 & max b1,0 = b1 ) by SQUARE_1:def 1, SQUARE_1:def 2;

theorem Th7: :: FINSEQ_2:7
canceled;

theorem Th8: :: FINSEQ_2:8
for b1, b2 being Nat holds
( not b1 in Seg (b2 + 1) or b1 in Seg b2 or b1 = b2 + 1 )
proof end;

theorem Th9: :: FINSEQ_2:9
for b1, b2, b3 being Nat st b1 in Seg b2 holds
b1 in Seg (b2 + b3)
proof end;

theorem Th10: :: FINSEQ_2:10
for b1 being Nat
for b2, b3 being FinSequence st len b2 = b1 & len b3 = b1 & ( for b4 being Nat st b4 in Seg b1 holds
b2 . b4 = b3 . b4 ) holds
b2 = b3
proof end;

theorem Th11: :: FINSEQ_2:11
for b1 being set
for b2 being FinSequence st b1 in rng b2 holds
ex b3 being Nat st
( b3 in dom b2 & b2 . b3 = b1 )
proof end;

theorem Th12: :: FINSEQ_2:12
canceled;

theorem Th13: :: FINSEQ_2:13
for b1 being Nat
for b2 being set
for b3 being FinSequence of b2 st b1 in dom b3 holds
b3 . b1 in b2
proof end;

E8: now
let c1 be natural number ;
assume E9: c1 <> 0 ;
let c2 be Element of Seg c1;
reconsider c3 = c1 as Nat by ORDINAL2:def 21;
Seg c3 is non empty Subset of NAT by E9, FINSEQ_1:5;
hence c2 in Seg c1 ;
end;

theorem Th14: :: FINSEQ_2:14
for b1 being FinSequence
for b2 being set st ( for b3 being Nat st b3 in dom b1 holds
b1 . b3 in b2 ) holds
b1 is FinSequence of b2
proof end;

Lemma10: for b1, b2 being set holds rng <*b1,b2*> = {b1,b2}
proof end;

theorem Th15: :: FINSEQ_2:15
for b1 being non empty set
for b2, b3 being Element of b1 holds <*b2,b3*> is FinSequence of b1
proof end;

Lemma12: for b1, b2, b3 being set holds rng <*b1,b2,b3*> = {b1,b2,b3}
proof end;

theorem Th16: :: FINSEQ_2:16
for b1 being non empty set
for b2, b3, b4 being Element of b1 holds <*b2,b3,b4*> is FinSequence of b1
proof end;

theorem Th17: :: FINSEQ_2:17
canceled;

theorem Th18: :: FINSEQ_2:18
for b1 being Nat
for b2, b3 being FinSequence st b1 in dom b2 holds
b1 in dom (b2 ^ b3)
proof end;

theorem Th19: :: FINSEQ_2:19
for b1 being set
for b2 being FinSequence holds len (b2 ^ <*b1*>) = (len b2) + 1
proof end;

theorem Th20: :: FINSEQ_2:20
for b1, b2 being set
for b3, b4 being FinSequence st b3 ^ <*b1*> = b4 ^ <*b2*> holds
( b3 = b4 & b1 = b2 )
proof end;

theorem Th21: :: FINSEQ_2:21
for b1 being Nat
for b2 being FinSequence st len b2 = b1 + 1 holds
ex b3 being FinSequenceex b4 being set st b2 = b3 ^ <*b4*>
proof end;

theorem Th22: :: FINSEQ_2:22
for b1 being non empty set
for b2 being FinSequence of b1 st len b2 <> 0 holds
ex b3 being FinSequence of b1ex b4 being Element of b1 st b2 = b3 ^ <*b4*>
proof end;

theorem Th23: :: FINSEQ_2:23
for b1 being Nat
for b2, b3 being FinSequence st b2 = b3 | (Seg b1) & len b3 <= b1 holds
b3 = b2
proof end;

theorem Th24: :: FINSEQ_2:24
for b1 being Nat
for b2, b3 being FinSequence st b2 = b3 | (Seg b1) holds
len b2 = min b1,(len b3)
proof end;

theorem Th25: :: FINSEQ_2:25
for b1, b2 being Nat
for b3 being FinSequence st len b3 = b1 + b2 holds
ex b4, b5 being FinSequence st
( len b4 = b1 & len b5 = b2 & b3 = b4 ^ b5 )
proof end;

theorem Th26: :: FINSEQ_2:26
for b1, b2 being Nat
for b3 being non empty set
for b4 being FinSequence of b3 st len b4 = b1 + b2 holds
ex b5, b6 being FinSequence of b3 st
( len b5 = b1 & len b6 = b2 & b4 = b5 ^ b6 )
proof end;

scheme :: FINSEQ_2:sch 1
s1{ F1() -> Nat, F2() -> non empty set , F3( set ) -> Element of F2() } :
ex b1 being FinSequence of F2() st
( len b1 = F1() & ( for b2 being Nat st b2 in Seg F1() holds
b1 . b2 = F3(b2) ) )
proof end;

scheme :: FINSEQ_2:sch 2
s2{ F1() -> non empty set , P1[ set ] } :
for b1 being FinSequence of F1() holds P1[b1]
provided
E21: P1[ <*> F1()] and
E22: for b1 being FinSequence of F1()
for b2 being Element of F1() st P1[b1] holds
P1[b1 ^ <*b2*>]
proof end;

theorem Th27: :: FINSEQ_2:27
for b1 being non empty set
for b2 being non empty Subset of b1
for b3 being FinSequence of b2 holds b3 is FinSequence of b1
proof end;

theorem Th28: :: FINSEQ_2:28
for b1 being Nat
for b2 being non empty set
for b3 being Function of Seg b1,b2 holds b3 is FinSequence of b2
proof end;

theorem Th29: :: FINSEQ_2:29
canceled;

theorem Th30: :: FINSEQ_2:30
for b1 being non empty set
for b2 being FinSequence of b1 holds b2 is Function of dom b2,b1
proof end;

theorem Th31: :: FINSEQ_2:31
for b1 being Nat
for b2 being non empty set
for b3 being Function of NAT ,b2 holds b3 | (Seg b1) is FinSequence of b2
proof end;

theorem Th32: :: FINSEQ_2:32
for b1 being Nat
for b2 being non empty set
for b3 being FinSequence
for b4 being Function of NAT ,b2 st b3 = b4 | (Seg b1) holds
len b3 = b1
proof end;

theorem Th33: :: FINSEQ_2:33
for b1, b2 being FinSequence
for b3 being Function st rng b1 c= dom b3 & b2 = b3 * b1 holds
len b2 = len b1
proof end;

theorem Th34: :: FINSEQ_2:34
for b1 being Nat
for b2 being non empty set st b2 = Seg b1 holds
for b3 being FinSequence
for b4 being FinSequence of b2 st b1 <= len b3 holds
b3 * b4 is FinSequence
proof end;

theorem Th35: :: FINSEQ_2:35
for b1 being Nat
for b2, b3 being non empty set st b2 = Seg b1 holds
for b4 being FinSequence of b3
for b5 being FinSequence of b2 st b1 <= len b4 holds
b4 * b5 is FinSequence of b3
proof end;

theorem Th36: :: FINSEQ_2:36
for b1, b2 being set
for b3 being FinSequence of b1
for b4 being Function of b1,b2 holds b4 * b3 is FinSequence of b2
proof end;

theorem Th37: :: FINSEQ_2:37
for b1 being set
for b2 being non empty set
for b3 being FinSequence
for b4 being FinSequence of b1
for b5 being Function of b1,b2 st b3 = b5 * b4 holds
len b3 = len b4
proof end;

theorem Th38: :: FINSEQ_2:38
for b1 being set
for b2 being non empty set
for b3 being Function of b1,b2 holds b3 * (<*> b1) = <*> b2
proof end;

theorem Th39: :: FINSEQ_2:39
for b1 being set
for b2, b3 being non empty set
for b4 being FinSequence of b2
for b5 being Function of b2,b3 st b4 = <*b1*> holds
b5 * b4 = <*(b5 . b1)*>
proof end;

theorem Th40: :: FINSEQ_2:40
for b1, b2 being set
for b3, b4 being non empty set
for b5 being FinSequence of b3
for b6 being Function of b3,b4 st b5 = <*b1,b2*> holds
b6 * b5 = <*(b6 . b1),(b6 . b2)*>
proof end;

theorem Th41: :: FINSEQ_2:41
for b1, b2, b3 being set
for b4, b5 being non empty set
for b6 being FinSequence of b4
for b7 being Function of b4,b5 st b6 = <*b1,b2,b3*> holds
b7 * b6 = <*(b7 . b1),(b7 . b2),(b7 . b3)*>
proof end;

theorem Th42: :: FINSEQ_2:42
for b1, b2 being Nat
for b3 being FinSequence
for b4 being Function of Seg b1, Seg b2 st ( b2 = 0 implies b1 = 0 ) & b2 <= len b3 holds
b3 * b4 is FinSequence
proof end;

theorem Th43: :: FINSEQ_2:43
for b1 being Nat
for b2 being FinSequence
for b3 being Function of Seg b1, Seg b1 st b1 <= len b2 holds
b2 * b3 is FinSequence
proof end;

theorem Th44: :: FINSEQ_2:44
for b1 being FinSequence
for b2 being Function of dom b1, dom b1 holds b1 * b2 is FinSequence
proof end;

theorem Th45: :: FINSEQ_2:45
for b1 being Nat
for b2, b3 being FinSequence
for b4 being Function of Seg b1, Seg b1 st rng b4 = Seg b1 & b1 <= len b2 & b3 = b2 * b4 holds
len b3 = b1
proof end;

theorem Th46: :: FINSEQ_2:46
for b1, b2 being FinSequence
for b3 being Function of dom b1, dom b1 st rng b3 = dom b1 & b2 = b1 * b3 holds
len b2 = len b1
proof end;

theorem Th47: :: FINSEQ_2:47
for b1 being Nat
for b2, b3 being FinSequence
for b4 being Permutation of Seg b1 st b1 <= len b2 & b3 = b2 * b4 holds
len b3 = b1
proof end;

theorem Th48: :: FINSEQ_2:48
for b1, b2 being FinSequence
for b3 being Permutation of dom b1 st b2 = b1 * b3 holds
len b2 = len b1
proof end;

theorem Th49: :: FINSEQ_2:49
for b1, b2 being Nat
for b3 being non empty set
for b4 being FinSequence of b3
for b5 being Function of Seg b1, Seg b2 st ( b2 = 0 implies b1 = 0 ) & b2 <= len b4 holds
b4 * b5 is FinSequence of b3
proof end;

theorem Th50: :: FINSEQ_2:50
for b1 being Nat
for b2 being non empty set
for b3 being FinSequence of b2
for b4 being Function of Seg b1, Seg b1 st b1 <= len b3 holds
b3 * b4 is FinSequence of b2
proof end;

theorem Th51: :: FINSEQ_2:51
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being Function of dom b2, dom b2 holds b2 * b3 is FinSequence of b1
proof end;

theorem Th52: :: FINSEQ_2:52
for b1 being natural number holds id (Seg b1) is FinSequence of NAT
proof end;

definition
let c1 be natural number ;
func idseq c1 -> FinSequence equals :: FINSEQ_2:def 1
id (Seg a1);
coherence
id (Seg c1) is FinSequence
by Th52;
end;

:: deftheorem Def1 defines idseq FINSEQ_2:def 1 :
for b1 being natural number holds idseq b1 = id (Seg b1);

theorem Th53: :: FINSEQ_2:53
canceled;

theorem Th54: :: FINSEQ_2:54
for b1 being natural number holds dom (idseq b1) = Seg b1 by RELAT_1:71;

theorem Th55: :: FINSEQ_2:55
for b1 being natural number holds len (idseq b1) = b1
proof end;

theorem Th56: :: FINSEQ_2:56
for b1, b2 being Nat st b1 in Seg b2 holds
(idseq b2) . b1 = b1 by FUNCT_1:35;

theorem Th57: :: FINSEQ_2:57
for b1 being Nat st b1 <> 0 holds
for b2 being Element of Seg b1 holds (idseq b1) . b2 = b2
proof end;

theorem Th58: :: FINSEQ_2:58
idseq 0 = {}
proof end;

theorem Th59: :: FINSEQ_2:59
idseq 1 = <*1*>
proof end;

theorem Th60: :: FINSEQ_2:60
for b1 being Nat holds idseq (b1 + 1) = (idseq b1) ^ <*(b1 + 1)*>
proof end;

theorem Th61: :: FINSEQ_2:61
idseq 2 = <*1,2*>
proof end;

theorem Th62: :: FINSEQ_2:62
idseq 3 = <*1,2,3*>
proof end;

theorem Th63: :: FINSEQ_2:63
for b1 being natural number
for b2 being FinSequence holds b2 * (idseq b1) = b2 | (Seg b1) by RELAT_1:94;

theorem Th64: :: FINSEQ_2:64
for b1 being natural number
for b2 being FinSequence st len b2 <= b1 holds
b2 * (idseq b1) = b2
proof end;

theorem Th65: :: FINSEQ_2:65
for b1 being natural number holds idseq b1 is Permutation of Seg b1 ;

theorem Th66: :: FINSEQ_2:66
for b1 being natural number
for b2 being set holds (Seg b1) --> b2 is FinSequence
proof end;

definition
let c1 be natural number ;
let c2 be set ;
func c1 |-> c2 -> FinSequence equals :: FINSEQ_2:def 2
(Seg a1) --> a2;
coherence
(Seg c1) --> c2 is FinSequence
by Th66;
end;

:: deftheorem Def2 defines |-> FINSEQ_2:def 2 :
for b1 being natural number
for b2 being set holds b1 |-> b2 = (Seg b1) --> b2;

theorem Th67: :: FINSEQ_2:67
canceled;

theorem Th68: :: FINSEQ_2:68
for b1 being natural number
for b2 being set holds dom (b1 |-> b2) = Seg b1 by FUNCOP_1:19;

theorem Th69: :: FINSEQ_2:69
for b1 being natural number
for b2 being set holds len (b1 |-> b2) = b1
proof end;

theorem Th70: :: FINSEQ_2:70
for b1 being natural number
for b2, b3 being set st b2 in Seg b1 holds
(b1 |-> b3) . b2 = b3 by FUNCOP_1:13;

theorem Th71: :: FINSEQ_2:71
for b1 being natural number
for b2 being non empty set
for b3 being Element of b2 st b1 <> 0 holds
for b4 being Element of Seg b1 holds (b1 |-> b3) . b4 = b3
proof end;

theorem Th72: :: FINSEQ_2:72
for b1 being set holds 0 |-> b1 = {}
proof end;

theorem Th73: :: FINSEQ_2:73
for b1 being set holds 1 |-> b1 = <*b1*>
proof end;

theorem Th74: :: FINSEQ_2:74
for b1 being Nat
for b2 being set holds (b1 + 1) |-> b2 = (b1 |-> b2) ^ <*b2*>
proof end;

theorem Th75: :: FINSEQ_2:75
for b1 being set holds 2 |-> b1 = <*b1,b1*>
proof end;

theorem Th76: :: FINSEQ_2:76
for b1 being set holds 3 |-> b1 = <*b1,b1,b1*>
proof end;

theorem Th77: :: FINSEQ_2:77
for b1 being natural number
for b2 being non empty set
for b3 being Element of b2 holds b1 |-> b3 is FinSequence of b2
proof end;

Lemma54: for b1 being Nat
for b2, b3 being FinSequence
for b4 being Function st [:(rng b2),(rng b3):] c= dom b4 & b1 = min (len b2),(len b3) holds
dom (b4 .: b2,b3) = Seg b1
proof end;

theorem Th78: :: FINSEQ_2:78
for b1, b2 being FinSequence
for b3 being Function st [:(rng b1),(rng b2):] c= dom b3 holds
b3 .: b1,b2 is FinSequence
proof end;

theorem Th79: :: FINSEQ_2:79
for b1, b2, b3 being FinSequence
for b4 being Function st [:(rng b1),(rng b2):] c= dom b4 & b3 = b4 .: b1,b2 holds
len b3 = min (len b1),(len b2)
proof end;

Lemma57: for b1 being set
for b2 being FinSequence
for b3 being Function st [:{b1},(rng b2):] c= dom b3 holds
dom (b3 [;] b1,b2) = dom b2
proof end;

theorem Th80: :: FINSEQ_2:80
for b1 being set
for b2 being FinSequence
for b3 being Function st [:{b1},(rng b2):] c= dom b3 holds
b3 [;] b1,b2 is FinSequence
proof end;

theorem Th81: :: FINSEQ_2:81
for b1 being set
for b2, b3 being FinSequence
for b4 being Function st [:{b1},(rng b2):] c= dom b4 & b3 = b4 [;] b1,b2 holds
len b3 = len b2
proof end;

Lemma60: for b1 being set
for b2 being FinSequence
for b3 being Function st [:(rng b2),{b1}:] c= dom b3 holds
dom (b3 [:] b2,b1) = dom b2
proof end;

theorem Th82: :: FINSEQ_2:82
for b1 being set
for b2 being FinSequence
for b3 being Function st [:(rng b2),{b1}:] c= dom b3 holds
b3 [:] b2,b1 is FinSequence
proof end;

theorem Th83: :: FINSEQ_2:83
for b1 being set
for b2, b3 being FinSequence
for b4 being Function st [:(rng b2),{b1}:] c= dom b4 & b3 = b4 [:] b2,b1 holds
len b3 = len b2
proof end;

theorem Th84: :: FINSEQ_2:84
for b1, b2, b3 being non empty set
for b4 being Function of [:b1,b2:],b3
for b5 being FinSequence of b1
for b6 being FinSequence of b2 holds b4 .: b5,b6 is FinSequence of b3
proof end;

theorem Th85: :: FINSEQ_2:85
for b1, b2, b3 being non empty set
for b4 being FinSequence
for b5 being Function of [:b1,b2:],b3
for b6 being FinSequence of b1
for b7 being FinSequence of b2 st b4 = b5 .: b6,b7 holds
len b4 = min (len b6),(len b7)
proof end;

theorem Th86: :: FINSEQ_2:86
for b1, b2, b3 being non empty set
for b4 being FinSequence
for b5 being Function of [:b1,b2:],b3
for b6 being FinSequence of b1
for b7 being FinSequence of b2 st len b6 = len b7 & b4 = b5 .: b6,b7 holds
( len b4 = len b6 & len b4 = len b7 )
proof end;

theorem Th87: :: FINSEQ_2:87
for b1, b2, b3 being non empty set
for b4 being Function of [:b1,b2:],b3
for b5 being FinSequence of b1
for b6 being FinSequence of b2 holds
( b4 .: (<*> b1),b6 = <*> b3 & b4 .: b5,(<*> b2) = <*> b3 )
proof end;

theorem Th88: :: FINSEQ_2:88
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being Element of b2
for b6 being Function of [:b1,b2:],b3
for b7 being FinSequence of b1
for b8 being FinSequence of b2 st b7 = <*b4*> & b8 = <*b5*> holds
b6 .: b7,b8 = <*(b6 . b4,b5)*>
proof end;

theorem Th89: :: FINSEQ_2:89
for b1, b2, b3 being non empty set
for b4, b5 being Element of b1
for b6, b7 being Element of b2
for b8 being Function of [:b1,b2:],b3
for b9 being FinSequence of b1
for b10 being FinSequence of b2 st b9 = <*b4,b5*> & b10 = <*b6,b7*> holds
b8 .: b9,b10 = <*(b8 . b4,b6),(b8 . b5,b7)*>
proof end;

theorem Th90: :: FINSEQ_2:90
for b1, b2, b3 being non empty set
for b4, b5, b6 being Element of b1
for b7, b8, b9 being Element of b2
for b10 being Function of [:b1,b2:],b3
for b11 being FinSequence of b1
for b12 being FinSequence of b2 st b11 = <*b4,b5,b6*> & b12 = <*b7,b8,b9*> holds
b10 .: b11,b12 = <*(b10 . b4,b7),(b10 . b5,b8),(b10 . b6,b9)*>
proof end;

theorem Th91: :: FINSEQ_2:91
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being Function of [:b1,b2:],b3
for b6 being FinSequence of b2 holds b5 [;] b4,b6 is FinSequence of b3
proof end;

theorem Th92: :: FINSEQ_2:92
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being FinSequence
for b6 being Function of [:b1,b2:],b3
for b7 being FinSequence of b2 st b5 = b6 [;] b4,b7 holds
len b5 = len b7
proof end;

theorem Th93: :: FINSEQ_2:93
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being Function of [:b1,b2:],b3 holds b5 [;] b4,(<*> b2) = <*> b3
proof end;

theorem Th94: :: FINSEQ_2:94
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being Element of b2
for b6 being Function of [:b1,b2:],b3
for b7 being FinSequence of b2 st b7 = <*b5*> holds
b6 [;] b4,b7 = <*(b6 . b4,b5)*>
proof end;

theorem Th95: :: FINSEQ_2:95
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5, b6 being Element of b2
for b7 being Function of [:b1,b2:],b3
for b8 being FinSequence of b2 st b8 = <*b5,b6*> holds
b7 [;] b4,b8 = <*(b7 . b4,b5),(b7 . b4,b6)*>
proof end;

theorem Th96: :: FINSEQ_2:96
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5, b6, b7 being Element of b2
for b8 being Function of [:b1,b2:],b3
for b9 being FinSequence of b2 st b9 = <*b5,b6,b7*> holds
b8 [;] b4,b9 = <*(b8 . b4,b5),(b8 . b4,b6),(b8 . b4,b7)*>
proof end;

theorem Th97: :: FINSEQ_2:97
for b1, b2, b3 being non empty set
for b4 being Element of b2
for b5 being Function of [:b1,b2:],b3
for b6 being FinSequence of b1 holds b5 [:] b6,b4 is FinSequence of b3
proof end;

theorem Th98: :: FINSEQ_2:98
for b1, b2, b3 being non empty set
for b4 being Element of b2
for b5 being FinSequence
for b6 being Function of [:b1,b2:],b3
for b7 being FinSequence of b1 st b5 = b6 [:] b7,b4 holds
len b5 = len b7
proof end;

theorem Th99: :: FINSEQ_2:99
for b1, b2, b3 being non empty set
for b4 being Element of b2
for b5 being Function of [:b1,b2:],b3 holds b5 [:] (<*> b1),b4 = <*> b3
proof end;

theorem Th100: :: FINSEQ_2:100
for b1, b2, b3 being non empty set
for b4 being Element of b1
for b5 being Element of b2
for b6 being Function of [:b1,b2:],b3
for b7 being FinSequence of b1 st b7 = <*b4*> holds
b6 [:] b7,b5 = <*(b6 . b4,b5)*>
proof end;

theorem Th101: :: FINSEQ_2:101
for b1, b2, b3 being non empty set
for b4, b5 being Element of b1
for b6 being Element of b2
for b7 being Function of [:b1,b2:],b3
for b8 being FinSequence of b1 st b8 = <*b4,b5*> holds
b7 [:] b8,b6 = <*(b7 . b4,b6),(b7 . b5,b6)*>
proof end;

theorem Th102: :: FINSEQ_2:102
for b1, b2, b3 being non empty set
for b4, b5, b6 being Element of b1
for b7 being Element of b2
for b8 being Function of [:b1,b2:],b3
for b9 being FinSequence of b1 st b9 = <*b4,b5,b6*> holds
b8 [:] b9,b7 = <*(b8 . b4,b7),(b8 . b5,b7),(b8 . b6,b7)*>
proof end;

definition
let c1 be set ;
mode FinSequenceSet of c1 -> set means :Def3: :: FINSEQ_2:def 3
for b1 being set st b1 in a2 holds
b1 is FinSequence of a1;
existence
ex b1 being set st
for b2 being set st b2 in b1 holds
b2 is FinSequence of c1
proof end;
end;

:: deftheorem Def3 defines FinSequenceSet FINSEQ_2:def 3 :
for b1, b2 being set holds
( b2 is FinSequenceSet of b1 iff for b3 being set st b3 in b2 holds
b3 is FinSequence of b1 );

registration
let c1 be set ;
cluster non empty FinSequenceSet of a1;
existence
not for b1 being FinSequenceSet of c1 holds b1 is empty
proof end;
end;

definition
let c1 be set ;
mode FinSequence-DOMAIN of a1 is non empty FinSequenceSet of a1;
end;

theorem Th103: :: FINSEQ_2:103
canceled;

theorem Th104: :: FINSEQ_2:104
for b1 being set holds b1 * is FinSequence-DOMAIN of b1
proof end;

definition
let c1 be set ;
redefine func * as c1 * -> FinSequence-DOMAIN of a1;
coherence
c1 * is FinSequence-DOMAIN of c1
by Th104;
end;

theorem Th105: :: FINSEQ_2:105
for b1 being set
for b2 being FinSequence-DOMAIN of b1 holds b2 c= b1 *
proof end;

definition
let c1 be set ;
let c2 be FinSequence-DOMAIN of c1;
redefine mode Element as Element of c2 -> FinSequence of a1;
coherence
for b1 being Element of c2 holds b1 is FinSequence of c1
by Def3;
end;

theorem Th106: :: FINSEQ_2:106
canceled;

theorem Th107: :: FINSEQ_2:107
for b1 being non empty set
for b2 being non empty Subset of b1
for b3 being FinSequence-DOMAIN of b2 holds b3 is FinSequence-DOMAIN of b1
proof end;

definition
let c1 be natural number ;
let c2 be set ;
func c1 -tuples_on c2 -> FinSequenceSet of a2 equals :: FINSEQ_2:def 4
{ b1 where B is Element of a2 * : len b1 = a1 } ;
coherence
{ b1 where B is Element of c2 * : len b1 = c1 } is FinSequenceSet of c2
proof end;
end;

:: deftheorem Def4 defines -tuples_on FINSEQ_2:def 4 :
for b1 being natural number
for b2 being set holds b1 -tuples_on b2 = { b3 where B is Element of b2 * : len b3 = b1 } ;

registration
let c1 be natural number ;
let c2 be non empty set ;
cluster a1 -tuples_on a2 -> non empty ;
coherence
not c1 -tuples_on c2 is empty
proof end;
end;

theorem Th108: :: FINSEQ_2:108
canceled;

theorem Th109: :: FINSEQ_2:109
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2 holds len b3 = b1
proof end;

theorem Th110: :: FINSEQ_2:110
for b1 being set
for b2 being FinSequence of b1 holds b2 is Element of (len b2) -tuples_on b1
proof end;

theorem Th111: :: FINSEQ_2:111
for b1 being Nat
for b2 being non empty set holds b1 -tuples_on b2 = Funcs (Seg b1),b2
proof end;

theorem Th112: :: FINSEQ_2:112
for b1 being set holds 0 -tuples_on b1 = {(<*> b1)}
proof end;

theorem Th113: :: FINSEQ_2:113
for b1 being set
for b2 being Element of 0 -tuples_on b1 holds b2 = <*> b1
proof end;

theorem Th114: :: FINSEQ_2:114
for b1 being set holds <*> b1 is Element of 0 -tuples_on b1
proof end;

theorem Th115: :: FINSEQ_2:115
for b1 being Nat
for b2 being non empty set
for b3 being Element of 0 -tuples_on b2
for b4 being Element of b1 -tuples_on b2 holds
( b3 ^ b4 = b4 & b4 ^ b3 = b4 )
proof end;

theorem Th116: :: FINSEQ_2:116
for b1 being non empty set holds 1 -tuples_on b1 = { <*b2*> where B is Element of b1 : verum }
proof end;

theorem Th117: :: FINSEQ_2:117
for b1 being non empty set
for b2 being Element of 1 -tuples_on b1 ex b3 being Element of b1 st b2 = <*b3*>
proof end;

theorem Th118: :: FINSEQ_2:118
for b1 being non empty set
for b2 being Element of b1 holds <*b2*> is Element of 1 -tuples_on b1
proof end;

theorem Th119: :: FINSEQ_2:119
for b1 being non empty set holds 2 -tuples_on b1 = { <*b2,b3*> where B is Element of b1, B is Element of b1 : verum }
proof end;

theorem Th120: :: FINSEQ_2:120
for b1 being non empty set
for b2 being Element of 2 -tuples_on b1 ex b3, b4 being Element of b1 st b2 = <*b3,b4*>
proof end;

theorem Th121: :: FINSEQ_2:121
for b1 being non empty set
for b2, b3 being Element of b1 holds <*b2,b3*> is Element of 2 -tuples_on b1
proof end;

theorem Th122: :: FINSEQ_2:122
for b1 being non empty set holds 3 -tuples_on b1 = { <*b2,b3,b4*> where B is Element of b1, B is Element of b1, B is Element of b1 : verum }
proof end;

theorem Th123: :: FINSEQ_2:123
for b1 being non empty set
for b2 being Element of 3 -tuples_on b1 ex b3, b4, b5 being Element of b1 st b2 = <*b3,b4,b5*>
proof end;

theorem Th124: :: FINSEQ_2:124
for b1 being non empty set
for b2, b3, b4 being Element of b1 holds <*b2,b3,b4*> is Element of 3 -tuples_on b1
proof end;

theorem Th125: :: FINSEQ_2:125
for b1, b2 being Nat
for b3 being non empty set holds (b1 + b2) -tuples_on b3 = { (b4 ^ b5) where B is Element of b1 -tuples_on b3, B is Element of b2 -tuples_on b3 : verum }
proof end;

theorem Th126: :: FINSEQ_2:126
for b1, b2 being Nat
for b3 being non empty set
for b4 being Element of (b1 + b2) -tuples_on b3 ex b5 being Element of b1 -tuples_on b3ex b6 being Element of b2 -tuples_on b3 st b4 = b5 ^ b6
proof end;

theorem Th127: :: FINSEQ_2:127
for b1, b2 being Nat
for b3 being non empty set
for b4 being Element of b1 -tuples_on b3
for b5 being Element of b2 -tuples_on b3 holds b4 ^ b5 is Element of (b1 + b2) -tuples_on b3
proof end;

theorem Th128: :: FINSEQ_2:128
for b1 being non empty set holds b1 * = union { (b2 -tuples_on b1) where B is Nat : verum }
proof end;

theorem Th129: :: FINSEQ_2:129
for b1 being Nat
for b2 being non empty set
for b3 being non empty Subset of b2
for b4 being Element of b1 -tuples_on b3 holds b4 is Element of b1 -tuples_on b2
proof end;

theorem Th130: :: FINSEQ_2:130
for b1, b2 being Nat
for b3 being non empty set st b1 -tuples_on b3 = b2 -tuples_on b3 holds
b1 = b2
proof end;

theorem Th131: :: FINSEQ_2:131
for b1 being Nat holds idseq b1 is Element of b1 -tuples_on NAT
proof end;

theorem Th132: :: FINSEQ_2:132
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2 holds b1 |-> b3 is Element of b1 -tuples_on b2
proof end;

theorem Th133: :: FINSEQ_2:133
for b1 being Nat
for b2, b3 being non empty set
for b4 being Element of b1 -tuples_on b2
for b5 being Function of b2,b3 holds b5 * b4 is Element of b1 -tuples_on b3
proof end;

theorem Th134: :: FINSEQ_2:134
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2
for b4 being Function of Seg b1, Seg b1 st rng b4 = Seg b1 holds
b3 * b4 is Element of b1 -tuples_on b2
proof end;

theorem Th135: :: FINSEQ_2:135
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2
for b4 being Permutation of Seg b1 holds b3 * b4 is Element of b1 -tuples_on b2
proof end;

theorem Th136: :: FINSEQ_2:136
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2
for b4 being Element of b2 holds (b3 ^ <*b4*>) . (b1 + 1) = b4
proof end;

theorem Th137: :: FINSEQ_2:137
for b1 being Nat
for b2 being non empty set
for b3 being Element of (b1 + 1) -tuples_on b2 ex b4 being Element of b1 -tuples_on b2ex b5 being Element of b2 st b3 = b4 ^ <*b5*>
proof end;

theorem Th138: :: FINSEQ_2:138
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2 holds b3 * (idseq b1) = b3
proof end;

theorem Th139: :: FINSEQ_2:139
for b1 being Nat
for b2 being non empty set
for b3, b4 being Element of b1 -tuples_on b2 st ( for b5 being Nat st b5 in Seg b1 holds
b3 . b5 = b4 . b5 ) holds
b3 = b4
proof end;

theorem Th140: :: FINSEQ_2:140
for b1 being Nat
for b2, b3, b4 being non empty set
for b5 being Function of [:b2,b3:],b4
for b6 being Element of b1 -tuples_on b2
for b7 being Element of b1 -tuples_on b3 holds b5 .: b6,b7 is Element of b1 -tuples_on b4
proof end;

theorem Th141: :: FINSEQ_2:141
for b1 being Nat
for b2, b3, b4 being non empty set
for b5 being Element of b2
for b6 being Function of [:b2,b3:],b4
for b7 being Element of b1 -tuples_on b3 holds b6 [;] b5,b7 is Element of b1 -tuples_on b4
proof end;

theorem Th142: :: FINSEQ_2:142
for b1 being Nat
for b2, b3, b4 being non empty set
for b5 being Element of b3
for b6 being Function of [:b2,b3:],b4
for b7 being Element of b1 -tuples_on b2 holds b6 [:] b7,b5 is Element of b1 -tuples_on b4
proof end;

theorem Th143: :: FINSEQ_2:143
for b1, b2 being Nat
for b3 being set holds (b1 + b2) |-> b3 = (b1 |-> b3) ^ (b2 |-> b3)
proof end;

theorem Th144: :: FINSEQ_2:144
for b1 being Nat
for b2 being non empty set
for b3 being Element of b1 -tuples_on b2 holds dom b3 = Seg b1
proof end;

theorem Th145: :: FINSEQ_2:145
for b1 being Function
for b2, b3 being set st b2 in dom b1 & b3 in dom b1 holds
b1 * <*b2,b3*> = <*(b1 . b2),(b1 . b3)*>
proof end;

theorem Th146: :: FINSEQ_2:146
for b1 being Function
for b2, b3, b4 being set st b2 in dom b1 & b3 in dom b1 & b4 in dom b1 holds
b1 * <*b2,b3,b4*> = <*(b1 . b2),(b1 . b3),(b1 . b4)*>
proof end;

theorem Th147: :: FINSEQ_2:147
for b1, b2 being set holds rng <*b1,b2*> = {b1,b2} by Lemma10;

theorem Th148: :: FINSEQ_2:148
for b1, b2, b3 being set holds rng <*b1,b2,b3*> = {b1,b2,b3} by Lemma12;

theorem Th149: :: FINSEQ_2:149
for b1, b2, b3 being FinSequence st b1 c= b3 & b2 c= b3 & len b1 = len b2 holds
b1 = b2
proof end;