reserve p, q for FinSequence,
  e,X for set,
  i, j, k, m, n for Nat,
  G for Graph;
reserve x,y,v,v1,v2,v3,v4 for Element of G;
reserve vs, vs1, vs2 for FinSequence of the carrier of G,
  c, c1, c2 for oriented Chain of G;

theorem Th16:
  for q being oriented Chain of G holds q|(Seg n) is oriented Chain of G
proof
  let q be oriented Chain of G;
  reconsider q9= q|(Seg n) as FinSequence;
  for i st 1 <= i & i < len q9 holds (the Source of G).((q|(Seg n)).(i+1))
  = (the Target of G).((q|(Seg n)).i)
  proof
    let i;
    assume that
A1: 1 <= i and
A2: i < len q9;
    per cases;
    suppose n>=len q;
      then q|(Seg n)=q by FINSEQ_3:49;
      hence thesis by A1,A2,GRAPH_1:def 15;
    end;
    suppose
A3:   n<len q;
      then
A4:   len q9=n by FINSEQ_1:17;
      then
A5:   i<len q by A2,A3,XXREAL_0:2;
      i in Seg n by A1,A2,A4,FINSEQ_1:1;
      then
A6:   (q|(Seg n)).i=q.i by FUNCT_1:49;
A7:   i+1<=n by A2,A4,NAT_1:13;
      1<i+1 by A1,NAT_1:13;
      then i+1 in Seg n by A7,FINSEQ_1:1;
      then (q|(Seg n)).(i+1)=q.(i+1) by FUNCT_1:49;
      hence thesis by A1,A5,A6,GRAPH_1:def 15;
    end;
  end;
  hence thesis by GRAPH_1:4,def 15;
end;
