reserve n,m,i,j,k for Nat,
  x,y,e,X,V,U for set,
  W,f,g for Function;
reserve p,q for FinSequence;
reserve G for Graph,
  pe,qe for FinSequence of the carrier' of G;

theorem Th8:
  p^q is Chain of G implies p is Chain of G & q is Chain of G
proof
  set r=p^q, D=the carrier' of G, V=the carrier of G;
  assume
A1: p^q is Chain of G;
  then consider f being FinSequence such that
A2: len f = len r + 1 and
A3: for n st 1 <= n & n <= len f holds f.n in V and
A4: for n st 1 <= n & n <= len r ex x, y being Element of V st x = f.n &
  y = f.(n+1) & r.n joins x, y by GRAPH_1:def 14;
A5: len r = len p + len q by FINSEQ_1:22;
  then len f = len p + (len q + 1) by A2;
  then consider h1,h2 being FinSequence such that
A6: len h1 = len p and
A7: len h2 = len q +1 and
A8: f = h1^h2 by FINSEQ_2:22;
A9: now
    take h2;
    thus len h2 = len q + 1 by A7;
    hereby
      let n;
      assume that
A10:  1 <= n and
A11:  n <= len h2;
      n <= len h1+n by NAT_1:11;
      then
A12:  1 <= len h1 +n by A10,XXREAL_0:2;
      len h1+n <= len h1 + len h2 by A11,XREAL_1:7;
      then
A13:  len h1+n <= len f by A8,FINSEQ_1:22;
      n in dom h2 by A10,A11,FINSEQ_3:25;
      then h2.n=f.(len h1+n) by A8,FINSEQ_1:def 7;
      hence h2.n in V by A3,A13,A12;
    end;
    hereby
      let n;
      assume that
A14:  1 <= n and
A15:  n <= len q;
      set m=len p+n;
      n <= m by NAT_1:11;
      then 1 <= m by A14,XXREAL_0:2;
      then consider x, y being Element of V such that
A16:  x = f.m and
A17:  y = f.(m+1) and
A18:  r.m joins x, y by A4,A5,A15,XREAL_1:7;
      take x,y;
      len q <= len h2 by A7,NAT_1:11;
      then n <= len h2 by A15,XXREAL_0:2;
      hence x = h2.n by A6,A8,A14,A16,Lm2;
      1 <= n+1 by NAT_1:11;
      hence h2.(n+1)=f.(len h1+(n+1)) by A7,A8,A15,Lm2,XREAL_1:7
        .=y by A6,A17;
      thus q.n joins x, y by A14,A15,A18,Lm2;
    end;
  end;
A19: len f = len p + 1 +len q by A2,A5;
  then consider f1,f2 being FinSequence such that
A20: len f1 = len p+1 and
  len f2 = len q and
A21: f = f1^f2 by FINSEQ_2:22;
A22: now
    take f1;
    thus len f1 = len p + 1 by A20;
    hereby
      let n;
      assume that
A23:  1 <= n and
A24:  n <= len f1;
      len f1 <= len f by A19,A20,NAT_1:11;
      then n <= len f by A24,XXREAL_0:2;
      then
A25:  f.n in V by A3,A23;
      n in dom f1 by A23,A24,FINSEQ_3:25;
      hence f1.n in V by A21,A25,FINSEQ_1:def 7;
    end;
    hereby
      let n;
      assume that
A26:  1 <= n and
A27:  n <= len p;
      len p <= len r by A5,NAT_1:11;
      then n <= len r by A27,XXREAL_0:2;
      then consider x, y being Element of V such that
A28:  x = f.n and
A29:  y = f.(n+1) and
A30:  r.n joins x, y by A4,A26;
      take x,y;
      len p <= len f1 by A20,NAT_1:11;
      then n <= len f1 by A27,XXREAL_0:2;
      hence x = f1.n by A21,A26,A28,Lm1;
      1 <= n+1 & n+1 <= len f1 by A20,A27,NAT_1:11,XREAL_1:7;
      then n+1 in dom f1 by FINSEQ_3:25;
      hence y = f1.(n+1) by A21,A29,FINSEQ_1:def 7;
      thus p.n joins x, y by A26,A27,A30,Lm1;
    end;
  end;
A31: p is FinSequence of D by A1,FINSEQ_1:36;
  now
    let n;
    assume 1 <= n & n <= len p;
    then n in dom p by FINSEQ_3:25;
    hence p.n in D by A31,FINSEQ_2:11;
  end;
  hence p is Chain of G by A22,GRAPH_1:def 14;
A32: q is FinSequence of D by A1,FINSEQ_1:36;
  now
    let n;
    assume 1 <= n & n <= len q;
    then n in dom q by FINSEQ_3:25;
    hence q.n in D by A32,FINSEQ_2:11;
  end;
  hence thesis by A9,GRAPH_1:def 14;
end;
