:: ALGSEQ_1 semantic presentation

definition
let c1 be Nat;
func PSeg a1 -> set equals :: ALGSEQ_1:def 1
{ b1 where B is Nat : b1 < a1 } ;
coherence
{ b1 where B is Nat : b1 < c1 } is set
;
end;

:: deftheorem defines PSeg ALGSEQ_1:def 1 :
for b1 being Nat holds PSeg b1 = { b2 where B is Nat : b2 < b1 } ;

definition
let c1 be Nat;
redefine func PSeg as PSeg a1 -> Subset of NAT ;
coherence
PSeg c1 is Subset of NAT
proof
set c2 = PSeg c1;
PSeg c1 c= NAT
proof
let c3 be set ; :: uses TARSKI:def 3
assume c3 in PSeg c1 ;
then c3 in { b1 where B is Nat : b1 < c1 } ;
then ( ex b1 being Nat st
( c3 = b1 & b1 < c1 ) & ex b1 being set st b1 in NAT ) ;
hence c3 in NAT ;
end;
hence PSeg c1 is Subset of NAT ;
end;
end;

E1: for b1 being Nat
for b2 being set holds
( b2 in PSeg b1 implies b2 is Nat )
;

theorem :: ALGSEQ_1:1
canceled;

theorem :: ALGSEQ_1:2
canceled;

theorem :: ALGSEQ_1:3
canceled;

theorem :: ALGSEQ_1:4
canceled;

theorem :: ALGSEQ_1:5
canceled;

theorem :: ALGSEQ_1:6
canceled;

theorem :: ALGSEQ_1:7
canceled;

theorem :: ALGSEQ_1:8
canceled;

theorem :: ALGSEQ_1:9
canceled;

theorem E2: :: ALGSEQ_1:10
for b1, b2 being Nat holds
( b1 in PSeg b2 iff b1 < b2 )
proof
let c1, c2 be Nat;
( c1 in { b1 where B is Nat : b1 < c2 } iff ex b1 being Nat st
( c1 = b1 & b1 < c2 ) ) ;
hence ( c1 in PSeg c2 iff c1 < c2 ) ;
end;

theorem E3: :: ALGSEQ_1:11
( PSeg 0 = {} & PSeg 1 = {0} & PSeg 2 = {0,1} )
proof
hereby
assume E4: PSeg 0 <> {} ;
consider c1 being Element of PSeg 0;
reconsider c2 = c1 as Nat by E4, E1;
c2 < 0 by E4, E2;
hence not verum by NAT_1:18;
end;
now
let c1 be set ;
thus ( c1 in PSeg 1 implies c1 in {0} )
proof
assume E4: c1 in PSeg 1 ;
PSeg 1 = { b1 where B is Nat : b1 < 1 } ;
then consider c2 being Nat such that
E5: ( c1 = c2 & c2 < 1 ) by E4;
c2 < 0 + 1 by E5;
then c2 <= 0 by NAT_1:38;
then c2 = 0 by NAT_1:18;
hence c1 in {0} by E5, TARSKI:def 1;
end;
assume c1 in {0} ;
then E4: c1 = 0 by TARSKI:def 1;
0 in { b1 where B is Nat : b1 < 1 } ;
hence c1 in PSeg 1 by E4;
end;
hence PSeg 1 = {0} by TARSKI:2;
now
let c1 be set ;
thus ( c1 in PSeg 2 implies c1 in {0,1} )
proof
assume E4: c1 in PSeg 2 ;
PSeg 2 = { b1 where B is Nat : b1 < 2 } ;
then consider c2 being Nat such that
E5: ( c1 = c2 & c2 < 2 ) by E4;
( c2 = 0 or c2 = 1 ) by E5, NAT_1:71;
hence c1 in {0,1} by E5, TARSKI:def 2;
end;
assume c1 in {0,1} ;
then ( c1 = 0 or c1 = 1 ) by TARSKI:def 2;
then c1 in { b1 where B is Nat : b1 < 2 } ;
hence c1 in PSeg 2 ;
end;
hence PSeg 2 = {0,1} by TARSKI:2;
end;

theorem E4: :: ALGSEQ_1:12
for b1 being Nat holds b1 in PSeg (b1 + 1)
proof
let c1 be Nat;
c1 < c1 + 1 by XREAL_1:31;
then c1 in { b1 where B is Nat : b1 < c1 + 1 } ;
hence c1 in PSeg (c1 + 1) ;
end;

theorem E5: :: ALGSEQ_1:13
for b1, b2 being Nat holds
( b1 <= b2 iff PSeg b1 c= PSeg b2 )
proof
let c1, c2 be Nat;
thus ( c1 <= c2 implies PSeg c1 c= PSeg c2 )
proof
assume E6: c1 <= c2 ;
let c3 be set ; :: uses TARSKI:def 3
assume E7: c3 in PSeg c1 ;
then reconsider c4 = c3 as Nat ;
c4 < c1 by E7, E2;
then c4 < c2 by E6, XREAL_1:2;
then c3 in { b1 where B is Nat : b1 < c2 } ;
hence c3 in PSeg c2 ;
end;
now
assume not c1 <= c2 ;
then c2 in PSeg c1 ;
hence ( PSeg c1 c= PSeg c2 implies c1 <= c2 ) by E2;
end;
hence ( PSeg c1 c= PSeg c2 implies c1 <= c2 ) ;
end;

theorem E6: :: ALGSEQ_1:14
for b1, b2 being Nat holds
( PSeg b1 = PSeg b2 implies b1 = b2 )
proof
let c1, c2 be Nat;
assume PSeg c1 = PSeg c2 ;
then ( c1 <= c2 & c2 <= c1 ) by E5;
hence c1 = c2 by XREAL_1:1;
end;

theorem E7: :: ALGSEQ_1:15
for b1, b2 being Nat holds
( b1 <= b2 implies ( PSeg b1 = (PSeg b1) /\ (PSeg b2) & PSeg b1 = (PSeg b2) /\ (PSeg b1) ) )
proof
let c1, c2 be Nat;
assume c1 <= c2 ;
then PSeg c1 c= PSeg c2 by E5;
hence ( PSeg c1 = (PSeg c1) /\ (PSeg c2) & PSeg c1 = (PSeg c2) /\ (PSeg c1) ) by XBOOLE_1:28;
end;

theorem :: ALGSEQ_1:16
for b1, b2 being Nat holds
( ( PSeg b1 = (PSeg b1) /\ (PSeg b2) or PSeg b1 = (PSeg b2) /\ (PSeg b1) ) implies b1 <= b2 )
proof
let c1, c2 be Nat;
now
assume E8: PSeg c1 = (PSeg c1) /\ (PSeg c2) ;
assume not c1 <= c2 ;
then PSeg c2 = PSeg c1 by E8, E7;
hence c1 <= c2 by E6;
end;
hence ( ( PSeg c1 = (PSeg c1) /\ (PSeg c2) or PSeg c1 = (PSeg c2) /\ (PSeg c1) ) implies c1 <= c2 ) ;
end;

theorem :: ALGSEQ_1:17
for b1 being Nat holds (PSeg b1) \/ {b1} = PSeg (b1 + 1)
proof
let c1 be Nat;
thus (PSeg c1) \/ {c1} c= PSeg (c1 + 1) :: uses XBOOLE_0:def 10
proof
c1 + 0 <= c1 + 1 by XREAL_1:9;
then E8: PSeg c1 c= PSeg (c1 + 1) by E5;
let c2 be set ; :: uses TARSKI:def 3
assume c2 in (PSeg c1) \/ {c1} ;
then ( c2 in PSeg c1 or c2 in {c1} ) by XBOOLE_0:def 2;
then ( c2 in PSeg (c1 + 1) or c2 = c1 ) by E8, TARSKI:def 1;
hence c2 in PSeg (c1 + 1) by E4;
end;
let c2 be set ; :: uses TARSKI:def 3
assume E8: c2 in PSeg (c1 + 1) ;
then reconsider c3 = c2 as Nat ;
c3 < c1 + 1 by E8, E2;
then not ( not c3 < c1 & not c3 = c1 ) by NAT_1:70;
then ( c3 in PSeg c1 or c3 in {c1} ) by TARSKI:def 1;
hence c2 in (PSeg c1) \/ {c1} by XBOOLE_0:def 2;
end;

definition
let c1 be non empty ZeroStr ;
let c2 be sequence of c1;
attr a2 is finite-Support means :E8: :: ALGSEQ_1:def 2
ex b1 being Nat st
for b2 being Nat holds
( b2 >= b1 implies a2 . b2 = 0. a1 );
end;

:: deftheorem E8 defines finite-Support ALGSEQ_1:def 2 :
for b1 being non empty ZeroStr
for b2 being sequence of b1 holds
( b2 is finite-Support iff ex b3 being Nat st
for b4 being Nat holds
( b4 >= b3 implies b2 . b4 = 0. b1 ) );

registration
let c1 be non empty ZeroStr ;
cluster finite-Support M5( NAT ,the carrier of a1);
existence
ex b1 being sequence of c1 st b1 is finite-Support
proof
set c2 = NAT --> (0. c1);
E9: for b1 being set holds
( b1 in NAT implies (NAT --> (0. c1)) . b1 = 0. c1 ) by FUNCOP_1:13;
reconsider c3 = NAT --> (0. c1) as Function of NAT ,the carrier of c1 by FUNCOP_1:57;
take c3 ;
take 0 ; :: uses ALGSEQ_1:def 2
thus for b1 being Nat holds
( b1 >= 0 implies c3 . b1 = 0. c1 ) by E9;
end;
end;

definition
let c1 be non empty ZeroStr ;
mode AlgSequence is finite-Support sequence of a1;
end;

definition
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
let c3 be Nat;
pred a3 is_at_least_length_of a2 means :E9: :: ALGSEQ_1:def 3
for b1 being Nat holds
( b1 >= a3 implies a2 . b1 = 0. a1 );
end;

:: deftheorem E9 defines is_at_least_length_of ALGSEQ_1:def 3 :
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1
for b3 being Nat holds
( b3 is_at_least_length_of b2 iff for b4 being Nat holds
( b4 >= b3 implies b2 . b4 = 0. b1 ) );

E10: for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
ex b3 being Nat st b3 is_at_least_length_of b2
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
consider c3 being Nat such that
E11: for b1 being Nat holds
( b1 >= c3 implies c2 . b1 = 0. c1 ) by E8;
take c3 ;
thus c3 is_at_least_length_of c2 by E11, E9;
end;

E11: for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
ex b3 being Nat st
( b3 is_at_least_length_of b2 & for b4 being Nat holds
( b4 is_at_least_length_of b2 implies b3 <= b4 ) )
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
defpred S1[ Nat] means a1 is_at_least_length_of c2;
E12: ex b1 being Nat st
S1[b1] by E10;
ex b1 being Nat st
( S1[b1] & for b2 being Nat holds
( S1[b2] implies b1 <= b2 ) ) from NAT_1:sch 5(E12);
then consider c3 being Nat such that
E13: ( c3 is_at_least_length_of c2 & for b1 being Nat holds
( b1 is_at_least_length_of c2 implies c3 <= b1 ) ) ;
take c3 ;
thus ( c3 is_at_least_length_of c2 & for b1 being Nat holds
( b1 is_at_least_length_of c2 implies c3 <= b1 ) ) by E13;
end;

E12: for b1, b2 being Nat
for b3 being non empty ZeroStr
for b4 being AlgSequence of b3 holds
( ( b1 is_at_least_length_of b4 & for b5 being Nat holds
( b5 is_at_least_length_of b4 implies b1 <= b5 ) & b2 is_at_least_length_of b4 & for b5 being Nat holds
( b5 is_at_least_length_of b4 implies b2 <= b5 ) ) implies ( b1 = b2 ) )
proof
let c1, c2 be Nat;
let c3 be non empty ZeroStr ;
let c4 be AlgSequence of c3;
assume ( c1 is_at_least_length_of c4 & for b1 being Nat holds
( b1 is_at_least_length_of c4 implies c1 <= b1 ) & c2 is_at_least_length_of c4 & for b1 being Nat holds
( b1 is_at_least_length_of c4 implies c2 <= b1 ) ) ;
then ( c1 <= c2 & c2 <= c1 ) ;
hence c1 = c2 by XREAL_1:1;
end;

definition
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
func len a2 -> Nat means :E13: :: ALGSEQ_1:def 4
( a3 is_at_least_length_of a2 & for b1 being Nat holds
( b1 is_at_least_length_of a2 implies a3 <= b1 ) );
existence
ex b1 being Nat st
( b1 is_at_least_length_of c2 & for b2 being Nat holds
( b2 is_at_least_length_of c2 implies b1 <= b2 ) )
by E11;
uniqueness
for b1, b2 being Nat holds
( ( b1 is_at_least_length_of c2 & for b3 being Nat holds
( b3 is_at_least_length_of c2 implies b1 <= b3 ) & b2 is_at_least_length_of c2 & for b3 being Nat holds
( b3 is_at_least_length_of c2 implies b2 <= b3 ) ) implies ( b1 = b2 ) )
by E12;
end;

:: deftheorem E13 defines len ALGSEQ_1:def 4 :
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1
for b3 being Nat holds
( b3 = len b2 iff ( b3 is_at_least_length_of b2 & for b4 being Nat holds
( b4 is_at_least_length_of b2 implies b3 <= b4 ) ) );

theorem :: ALGSEQ_1:18
canceled;

theorem :: ALGSEQ_1:19
canceled;

theorem :: ALGSEQ_1:20
canceled;

theorem :: ALGSEQ_1:21
canceled;

theorem E14: :: ALGSEQ_1:22
for b1 being Nat
for b2 being non empty ZeroStr
for b3 being AlgSequence of b2 holds
( b1 >= len b3 implies b3 . b1 = 0. b2 )
proof
let c1 be Nat;
let c2 be non empty ZeroStr ;
let c3 be AlgSequence of c2;
assume E15: c1 >= len c3 ;
len c3 is_at_least_length_of c3 by E13;
hence c3 . c1 = 0. c2 by E15, E9;
end;

theorem :: ALGSEQ_1:23
canceled;

theorem E15: :: ALGSEQ_1:24
for b1 being Nat
for b2 being non empty ZeroStr
for b3 being AlgSequence of b2 holds
( for b4 being Nat holds
not ( b4 < b1 & not b3 . b4 <> 0. b2 ) implies len b3 >= b1 )
proof
let c1 be Nat;
let c2 be non empty ZeroStr ;
let c3 be AlgSequence of c2;
assume E16: for b1 being Nat holds
not ( b1 < c1 & not c3 . b1 <> 0. c2 ) ;
for b1 being Nat holds
not ( b1 < c1 & not len c3 > b1 )
proof
let c4 be Nat;
assume c4 < c1 ;
then c3 . c4 <> 0. c2 by E16;
hence len c3 > c4 by E14;
end;
hence len c3 >= c1 ;
end;

theorem E16: :: ALGSEQ_1:25
for b1 being Nat
for b2 being non empty ZeroStr
for b3 being AlgSequence of b2 holds
not ( len b3 = b1 + 1 & not b3 . b1 <> 0. b2 )
proof
let c1 be Nat;
let c2 be non empty ZeroStr ;
let c3 be AlgSequence of c2;
assume E17: len c3 = c1 + 1 ;
then c1 < len c3 by XREAL_1:31;
then not c1 is_at_least_length_of c3 by E13;
then consider c4 being Nat such that
E18: ( c4 >= c1 & c3 . c4 <> 0. c2 ) by E9;
c4 < c1 + 1 by E17, E18, E14;
then c4 <= c1 by NAT_1:38;
hence c3 . c1 <> 0. c2 by E18, XREAL_1:1;
end;

definition
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
func support a2 -> Subset of NAT equals :: ALGSEQ_1:def 5
PSeg (len a2);
coherence
PSeg (len c2) is Subset of NAT
;
end;

:: deftheorem defines support ALGSEQ_1:def 5 :
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds support b2 = PSeg (len b2);

theorem :: ALGSEQ_1:26
canceled;

theorem :: ALGSEQ_1:27
for b1 being Nat
for b2 being non empty ZeroStr
for b3 being AlgSequence of b2 holds
( b1 = len b3 iff PSeg b1 = support b3 )
proof
let c1 be Nat;
let c2 be non empty ZeroStr ;
let c3 be AlgSequence of c2;
now
assume PSeg c1 = support c3 ;
then PSeg c1 = PSeg (len c3) ;
hence c1 = len c3 by E6;
end;
hence ( c1 = len c3 iff PSeg c1 = support c3 ) ;
end;

scheme :: ALGSEQ_1:sch 1
s1{ F1() -> non empty ZeroStr , F2() -> Nat, F3( Nat) -> Element of F1() } :
ex b1 being AlgSequence of F1() st
( len b1 <= F2() & for b2 being Nat holds
( b2 < F2() implies b1 . b2 = F3(b2) ) )
provided
proof
defpred S1[ Element of NAT , Element of F1()] means ( ( a1 < F2() & a2 = F3(a1) ) or ( a1 >= F2() & a2 = 0. F1() ) );
E17: for b1 being Element of NAT holds
ex b2 being Element of F1() st
S1[b1,b2]
proof
let c1 be Element of NAT ;
( c1 < F2() implies ( c1 < F2() & F3(c1) = F3(c1) ) ) ;
hence ex b1 being Element of F1() st
S1[c1,b1] ;
end;
ex b1 being Function of NAT ,the carrier of F1() st
for b2 being Element of NAT holds
S1[b2,b1 . b2] from FUNCT_2:sch 3(E17);
then consider c1 being Function of NAT ,the carrier of F1() such that
E18: for b1 being Element of NAT holds
( ( b1 < F2() & c1 . b1 = F3(b1) ) or ( b1 >= F2() & c1 . b1 = 0. F1() ) ) ;
ex b1 being Nat st
for b2 being Nat holds
( b2 >= b1 implies c1 . b2 = 0. F1() )
proof
take F2() ;
thus for b1 being Nat holds
( b1 >= F2() implies c1 . b1 = 0. F1() ) by E18;
end;
then reconsider c2 = c1 as AlgSequence of F1() by E8;
E19: len c2 <= F2()
proof
for b1 being Nat holds
( b1 >= F2() implies c2 . b1 = 0. F1() ) by E18;
then F2() is_at_least_length_of c2 by E9;
hence len c2 <= F2() by E13;
end;
take c2 ;
thus ( len c2 <= F2() & for b1 being Nat holds
( b1 < F2() implies c2 . b1 = F3(b1) ) ) by E18, E19;
end;

theorem E17: :: ALGSEQ_1:28
for b1 being non empty ZeroStr
for b2, b3 being AlgSequence of b1 holds
( ( len b2 = len b3 & for b4 being Nat holds
( b4 < len b2 implies b2 . b4 = b3 . b4 ) ) implies ( b2 = b3 ) )
proof
let c1 be non empty ZeroStr ;
let c2, c3 be AlgSequence of c1;
assume E18: ( len c2 = len c3 & for b1 being Nat holds
( b1 < len c2 implies c2 . b1 = c3 . b1 ) ) ;
E19: ( dom c2 = NAT & dom c3 = NAT ) by FUNCT_2:def 1;
for b1 being set holds
( b1 in NAT implies c2 . b1 = c3 . b1 )
proof
let c4 be set ;
assume c4 in NAT ;
then reconsider c5 = c4 as Nat ;
c2 . c5 = c3 . c5
proof
( c5 >= len c2 implies c2 . c5 = c3 . c5 )
proof
assume c5 >= len c2 ;
then ( c2 . c5 = 0. c1 & c3 . c5 = 0. c1 ) by E18, E14;
hence c2 . c5 = c3 . c5 ;
end;
hence c2 . c5 = c3 . c5 by E18;
end;
hence c2 . c4 = c3 . c4 ;
end;
hence c2 = c3 by E19, FUNCT_1:9;
end;

theorem :: ALGSEQ_1:29
for b1 being non empty ZeroStr holds
( the carrier of b1 <> {(0. b1)} implies for b2 being Nat holds
ex b3 being AlgSequence of b1 st len b3 = b2 )
proof
let c1 be non empty ZeroStr ;
set c2 = the carrier of c1;
assume E18: the carrier of c1 <> {(0. c1)} ;
let c3 be Nat;
consider c4 being set such that
E19: ( c4 in the carrier of c1 & c4 <> 0. c1 ) by E18, ZFMISC_1:41;
reconsider c5 = c4 as Element of c1 by E19;
deffunc H1( Element of NAT ) -> Element of c1 = c5;
consider c6 being AlgSequence of c1 such that
E20: ( len c6 <= c3 & for b1 being Nat holds
( b1 < c3 implies c6 . b1 = H1(b1) ) ) from ALGSEQ_1:sch 1();
for b1 being Nat holds
not ( b1 < c3 & not c6 . b1 <> 0. c1 ) by E19, E20;
then len c6 >= c3 by E15;
then len c6 = c3 by E20, XREAL_1:1;
hence ex b1 being AlgSequence of c1 st len b1 = c3 ;
end;

definition
let c1 be non empty ZeroStr ;
let c2 be Element of c1;
func <%a2%> -> AlgSequence of a1 means :E18: :: ALGSEQ_1:def 6
( len a3 <= 1 & a3 . 0 = a2 );
existence
ex b1 being AlgSequence of c1 st
( len b1 <= 1 & b1 . 0 = c2 )
proof
deffunc H1( Element of NAT ) -> Element of c1 = c2;
consider c3 being AlgSequence of c1 such that
E18: ( len c3 <= 1 & for b1 being Nat holds
( b1 < 1 implies c3 . b1 = H1(b1) ) ) from ALGSEQ_1:sch 1();
take c3 ;
thus ( len c3 <= 1 & c3 . 0 = c2 ) by E18;
end;
uniqueness
for b1, b2 being AlgSequence of c1 holds
( ( len b1 <= 1 & b1 . 0 = c2 & len b2 <= 1 & b2 . 0 = c2 ) implies ( b1 = b2 ) )
proof
let c3, c4 be AlgSequence of c1;
assume that E18: ( len c3 <= 1 & c3 . 0 = c2 )
and E19: ( len c4 <= 1 & c4 . 0 = c2 ) ;
E20: 1 = 0 + 1 ;
E21: now
assume c2 = 0. c1 ;
then ( len c3 <> 1 & len c4 <> 1 ) by E18, E19, E20, E16;
then ( len c3 < 1 & len c4 < 1 ) by E18, E19, REAL_1:def 5;
then ( len c3 = 0 & len c4 = 0 ) by NAT_1:39;
hence len c3 = len c4 ;
end;
E22: now
assume c2 <> 0. c1 ;
then ( len c3 > 0 & len c4 > 0 ) by E18, E19, E14;
then ( len c3 = 1 & len c4 = 1 ) by E18, E19, E20, NAT_1:26;
hence len c3 = len c4 ;
end;
for b1 being Nat holds
( b1 < len c3 implies c3 . b1 = c4 . b1 )
proof
let c5 be Nat;
assume c5 < len c3 ;
then c5 < 1 by E18, XREAL_1:2;
then c5 = 0 by NAT_1:39;
hence c3 . c5 = c4 . c5 by E18, E19;
end;
hence c3 = c4 by E21, E22, E17;
end;
end;

:: deftheorem E18 defines <% ALGSEQ_1:def 6 :
for b1 being non empty ZeroStr
for b2 being Element of b1
for b3 being AlgSequence of b1 holds
( b3 = <%b2%> iff ( len b3 <= 1 & b3 . 0 = b2 ) );

E19: for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
( b2 = <%(0. b1)%> implies len b2 = 0 )
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
E20: 0 + 1 = 1 ;
assume c2 = <%(0. c1)%> ;
then ( len c2 <= 1 & c2 . 0 = 0. c1 ) by E18;
then ( len c2 <= 1 & len c2 <> 1 ) by E20, E16;
then len c2 < 1 by REAL_1:def 5;
hence len c2 = 0 by NAT_1:39;
end;

theorem :: ALGSEQ_1:30
canceled;

theorem E20: :: ALGSEQ_1:31
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
( b2 = <%(0. b1)%> iff len b2 = 0 )
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
thus ( c2 = <%(0. c1)%> implies len c2 = 0 ) by E19;
thus ( len c2 = 0 implies c2 = <%(0. c1)%> )
proof
assume E21: len c2 = 0 ;
then E22: len c2 = len <%(0. c1)%> by E19;
for b1 being Nat holds
( b1 < len c2 implies c2 . b1 = <%(0. c1)%> . b1 ) by E21, NAT_1:18;
hence c2 = <%(0. c1)%> by E22, E17;
end;
end;

theorem :: ALGSEQ_1:32
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
( b2 = <%(0. b1)%> iff support b2 = {} )
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
thus ( c2 = <%(0. c1)%> implies support c2 = {} )
proof
assume c2 = <%(0. c1)%> ;
then len c2 = 0 by E19;
hence support c2 = {} by E3;
end;
assume E21: support c2 = {} ;
support c2 = PSeg (len c2) ;
then len c2 = 0 by E21, E3, E6;
hence c2 = <%(0. c1)%> by E20;
end;

theorem E21: :: ALGSEQ_1:33
for b1 being Nat
for b2 being non empty ZeroStr holds <%(0. b2)%> . b1 = 0. b2
proof
let c1 be Nat;
let c2 be non empty ZeroStr ;
set c3 = <%(0. c2)%>;
now
assume c1 <> 0 ;
then c1 > 0 by NAT_1:19;
then c1 >= len <%(0. c2)%> by E20;
hence <%(0. c2)%> . c1 = 0. c2 by E14;
end;
hence <%(0. c2)%> . c1 = 0. c2 by E18;
end;

theorem :: ALGSEQ_1:34
for b1 being non empty ZeroStr
for b2 being AlgSequence of b1 holds
( b2 = <%(0. b1)%> iff rng b2 = {(0. b1)} )
proof
let c1 be non empty ZeroStr ;
let c2 be AlgSequence of c1;
thus ( c2 = <%(0. c1)%> implies rng c2 = {(0. c1)} )
proof
assume E22: c2 = <%(0. c1)%> ;
thus rng c2 c= {(0. c1)} :: uses XBOOLE_0:def 10
proof
let c3 be set ; :: uses TARSKI:def 3
assume c3 in rng c2 ;
then consider c4 being set such that
E23: ( c4 in dom c2 & c3 = c2 . c4 ) by FUNCT_1:def 5;
reconsider c5 = c4 as Nat by E23, FUNCT_2:def 1;
c2 . c5 = 0. c1 by E22, E21;
hence c3 in {(0. c1)} by E23, TARSKI:def 1;
end;
thus {(0. c1)} c= rng c2
proof
let c3 be set ; :: uses TARSKI:def 3
assume c3 in {(0. c1)} ;
then c3 = 0. c1 by TARSKI:def 1;
then E23: c2 . 0 = c3 by E22, E18;
dom c2 = NAT by FUNCT_2:def 1;
hence c3 in rng c2 by E23, FUNCT_1:def 5;
end;
end;
thus ( rng c2 = {(0. c1)} implies c2 = <%(0. c1)%> )
proof
assume E22: rng c2 = {(0. c1)} ;
len c2 = 0
proof
for b1 being Nat holds
( b1 >= 0 implies c2 . b1 = 0. c1 )
proof
let c3 be Nat;
c3 in NAT ;
then c3 in dom c2 by FUNCT_2:def 1;
then c2 . c3 in rng c2 by FUNCT_1:def 5;
hence ( c3 >= 0 implies c2 . c3 = 0. c1 ) by E22, TARSKI:def 1;
end;
then E23: 0 is_at_least_length_of c2 by E9;
for b1 being Nat holds
( b1 is_at_least_length_of c2 implies 0 <= b1 ) by NAT_1:18;
hence len c2 = 0 by E23, E13;
end;
hence c2 = <%(0. c1)%> by E20;
end;
end;