reserve k,n for Nat,
  x,y,z,y1,y2 for object,X,Y for set,
  f,g for Function;
reserve p,q,r,s,t for XFinSequence;
reserve D for set;

theorem :: FLANG_1:10
 len p = n + k implies ex q1, q2 being
   XFinSequence st len q1 = n & len q2 = k & p = q1 ^ q2
proof
  defpred P[Nat] means for p being XFinSequence, i, j be Nat
st len p = $1 & len p =
  i + j ex q1, q2 being XFinSequence st len q1 = i & len q2 = j & p = q1 ^ q2;
A1: now
    let n;
    assume
A2: P[n];
    thus P[n + 1]
    proof
      let p be XFinSequence;
      let i, j be Nat;
      assume that
A3:   len p = n + 1 and
A4:   len p = i + j;
      per cases;
      suppose
A5:     j = 0;
        take q1 = p;
        take q2 = {};
        thus thesis by A4,A5;
      end;
      suppose
        j > 0;
        then consider k such that
A6:     j = k + 1 by NAT_1:6;
        p <> {} by A3;
        then consider q being XFinSequence, x such that
A7:     p = q ^ <%x%> by Th37;
A8:     n + 1 = len q + len <%x%> by A3,A7,Def3
          .= len q + 1 by Th30;
        n = i + k by A3,A4,A6;
        then consider q1, q2 being XFinSequence such that
A9:     len q1 = i and
A10:    len q2 = k and
A11:    q = q1 ^ q2 by A2,A8;
A12:    len (q2 ^ <%x%>) = len q2 + len <%x%> by Def3
          .= j by A6,A10,Th30;
        p = q1 ^ (q2 ^ <%x%>) by A7,A11,Th25;
        hence thesis by A9,A12;
      end;
    end;
  end;
A13: P[0]
  proof
    let p be XFinSequence;
    let i, j be Nat;
    assume that
A14: len p = 0 and
A15: len p = i + j;
A16: p = {} ^ {} by A14;
    len {} = i by A14,A15;
    hence thesis by A15,A16;
  end;
  for n holds P[n] from NAT_1:sch 2(A13, A1);
  hence thesis;
end;
