reserve G for non empty DTConstrStr,
  s for Symbol of G,
  n,m for String of G;
reserve n1,n2,n3 for String of G;

theorem Th8:
  n1 is_derivable_from n2 & n2 is_derivable_from n3 implies n1
  is_derivable_from n3
proof
  given p1 being FinSequence such that
A1: len p1 >= 1 and
A2: p1.1 = n2 and
A3: p1.(len p1) = n1 and
A4: for i being Element of NAT st i >= 1 & i < len p1 ex a,b being
  String of G st p1.i = a & p1.(i+1) = b & a ==> b;
  given p2 being FinSequence such that
A5: len p2 >= 1 and
A6: p2.1 = n3 and
A7: p2.(len p2) = n2 and
A8: for i being Element of NAT st i >= 1 & i < len p2 ex a,b being
  String of G st p2.i = a & p2.(i+1) = b & a ==> b;
  p2 <> {} by A5;
  then consider q being FinSequence, x being object such that
A9: p2 = q^<*x*> by FINSEQ_1:46;
  take p = q^p1;
A10: 1+len q >= 1 by NAT_1:11;
A11: len p = len q+len p1 by FINSEQ_1:22;
  then len p >= 1+len q by A1,XREAL_1:7;
  hence len p >= 1 by A10,XXREAL_0:2;
  now
    per cases;
    suppose
A12:  q = {};
      then
A13:  p = p1 by FINSEQ_1:34;
      p2 = <*x*> by A9,A12,FINSEQ_1:34;
      hence p.1 = n3 by A2,A6,A7,A13,FINSEQ_1:40;
    end;
    suppose
A14:  q <> {};
A15:  0+1 = 1;
      len q > 0 by A14,NAT_1:2;
      then len q >= 1 by A15,NAT_1:13;
      then
A16:  1 in dom q by FINSEQ_3:25;
      then p.1 = q.1 by FINSEQ_1:def 7;
      hence p.1 = n3 by A6,A9,A16,FINSEQ_1:def 7;
    end;
  end;
  hence p.1 = n3;
  len p1 in dom p1 by A1,FINSEQ_3:25;
  hence p.(len p) = n1 by A3,A11,FINSEQ_1:def 7;
  let i be Element of NAT such that
A17: i >= 1 and
A18: i < len p;
  len <*x*> = 1 by FINSEQ_1:40;
  then
A19: len p2 = len q + 1 by A9,FINSEQ_1:22;
  now
    per cases by XXREAL_0:1;
    suppose
A20:  i+1 = len p2;
A21:  1 in dom p1 by A1,FINSEQ_3:25;
      i < len p2 by A20,NAT_1:13;
      then consider a,b being String of G such that
A22:  p2.i = a and
A23:  p2.(i+1) = b and
A24:  a ==> b by A8,A17;
      take a, b;
A25:  i in dom q by A19,A17,A20,FINSEQ_3:25;
      then p2.i = q.i by A9,FINSEQ_1:def 7;
      hence p.i = a & p.(i+1) = b & a ==> b by A2,A7,A19,A20,A22,A23,A24,A21
,A25,FINSEQ_1:def 7;
    end;
    suppose
      i+1 > len p2;
      then i >= len p2 by NAT_1:13;
      then consider j being Nat such that
A26:  i = len p2 + j by NAT_1:10;
      reconsider j as Element of NAT by ORDINAL1:def 12;
A27:  i = len q +(1+j) by A19,A26;
      then
A28:  1+j < len p1 by A11,A18,XREAL_1:6;
      then consider a,b being String of G such that
A29:  p1.(1+j) = a and
A30:  p1.(1+j+1) = b and
A31:  a ==> b by A4,NAT_1:11;
      take a, b;
A32:  1+j+1 >= 1 by NAT_1:11;
      1+j >= 1 by NAT_1:11;
      then
A33:  1+j in dom p1 by A28,FINSEQ_3:25;
      1+j+1 <= len p1 by A28,NAT_1:13;
      then
A34:  1+j+1 in dom p1 by A32,FINSEQ_3:25;
      i+1 = len q +(1+j+1) by A19,A26;
      hence p.i = a & p.(i+1) = b & a ==> b by A27,A29,A30,A31,A33,A34,
FINSEQ_1:def 7;
    end;
    suppose
A35:  i+1 < len p2;
A36:  1 <= 1+i by NAT_1:11;
      i+1 <= len q by A19,A35,NAT_1:13;
      then
A37:  i+1 in dom q by A36,FINSEQ_3:25;
      then
A38:  p.(i+1) = q.(i+1) by FINSEQ_1:def 7;
      i < len p2 by A35,NAT_1:13;
      then consider a,b being String of G such that
A39:  p2.i = a and
A40:  p2.(i+1) = b and
A41:  a ==> b by A8,A17;
      take a, b;
      i <= len q by A19,A35,XREAL_1:6;
      then
A42:  i in dom q by A17,FINSEQ_3:25;
      then p.i = q.i by FINSEQ_1:def 7;
      hence p.i = a & p.(i+1) = b & a ==> b by A9,A39,A40,A41,A42,A37,A38,
FINSEQ_1:def 7;
    end;
  end;
  hence thesis;
end;
