 reserve x for set,
         n,m,k for Nat,
         r for Real,
         V for RealLinearSpace,
         v,u,w,t for VECTOR of V,
         Av for finite Subset of V,
         Affv for finite affinely-independent Subset of V;

theorem Th2:
  for f1,f2 be FinSequence holds
    x in product(f1^f2)
  iff
    ex p1,p2 be FinSequence st x = p1^p2 & p1 in product f1 & p2 in product f2
proof
  let f1,f2 be FinSequence;
  set f12=f1^f2;
  A1: len f12=len f1+len f2 by FINSEQ_1:22;
  dom f1=Seg(len f1) by FINSEQ_1:def 3;
  then A2: f12|Seg(len f1)=f1 by FINSEQ_1:21;
  hereby assume A3: x in product f12;
   then consider g be Function such that
    A4: x=g and
    A5: dom g=dom f12 and
    A6: for y be object st y in dom f12 holds g.y in f12.y by CARD_3:def 5;
   dom f12=Seg len f12 by FINSEQ_1:def 3;
   then reconsider g as FinSequence by A5,FINSEQ_1:def 2;
   set p1=g|(len f1);
   consider p2 be FinSequence such that
    A7: g=p1^p2 by FINSEQ_1:80;
   take p1,p2;
   thus x=p1^p2 & p1 in product f1 by A2,A3,A4,A7,PRALG_3:1;
   A8: len f12=len g by A5,FINSEQ_3:29;
   then A9: len f1=len p1 by A1,FINSEQ_1:59,NAT_1:11;
   len g=len p1+len p2 by A7,FINSEQ_1:22;
   then A10: dom f2=dom p2 by A1,A8,A9,FINSEQ_3:29;
   now let y be object;
    assume A11: y in dom f2;
    then reconsider i=y as Nat;
    i+len f1 in dom f12 by A11,FINSEQ_1:28;
    then
    g.(i+len f1) in f12.(i+len f1) & f12.(i+len f1)=f2.i
      by A6,A11,FINSEQ_1:def 7;
    hence p2.y in f2.y by A7,A9,A10,A11,FINSEQ_1:def 7;
   end;
   hence p2 in product f2 by A10,CARD_3:def 5;
  end;
  given p1,p2 be FinSequence such that
   A12: x=p1^p2 and
   A13: p1 in product f1 and
   A14: p2 in product f2;
  A15: ex g be Function st p2=g & dom g=dom f2 &
for y be object st y in dom f2
         holds g.y in f2.y by A14,CARD_3:def 5;
  A16: ex g be Function st p1=g & dom g=dom f1 &
for y be object st y in dom f1
         holds g.y in f1.y by A13,CARD_3:def 5;
  then A17: len p1=len f1 by FINSEQ_3:29;
  A18: now let y be object;
   assume A19: y in dom f12;
   then reconsider i=y as Nat;
   per cases by A19,FINSEQ_1:25;
   suppose A20: i in dom f1;
    then f12.y=f1.i & (p1^p2).y=p1.i by A16,FINSEQ_1:def 7;
    hence (p1^p2).y in f12.y by A16,A20;
   end;
   suppose ex j be Nat st j in dom f2 & i=len f1+j;
    then consider j be Nat such that
     A21: j in dom f2 and
     A22: i=len f1+j;
    f12.y=f2.j & (p1^p2).y=p2.j by A15,A17,A21,A22,FINSEQ_1:def 7;
    hence (p1^p2).y in f12.y by A15,A21;
   end;
  end;
  len(p1^p2)=len p1+len p2 & len p2=len f2 by A15,FINSEQ_1:22,FINSEQ_3:29;
  then dom(p1^p2)=dom f12 by A1,A17,FINSEQ_3:29;
  hence thesis by A12,A18,CARD_3:def 5;
 end;
