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

theorem Th41:
  1<=m & m<=n & n<=len c & q = (m,n)-cut c implies q is Chain of G
proof
  assume that
A1: 1<=m and
A2: m<=n and
A3: n<=len c;
A4: m<=n+1 by A2,NAT_1:12;
  consider vs such that
A5: vs is_vertex_seq_of c by Th33;
  set p9 = (m,n+1)-cut vs;
A6: now
    let k be Nat;
    assume that
A7: 1<=k and
A8: k<=len p9;
    k in dom p9 by A7,A8,FINSEQ_3:25;
    then
A9: p9.k in rng p9 by FUNCT_1:def 3;
A10: rng vs c= the carrier of G by FINSEQ_1:def 4;
    rng p9 c= rng vs by FINSEQ_6:137;
    hence p9.k in the carrier of G by A10,A9;
  end;
  assume
A11: q = (m,n)-cut c;
  then
A12: len q +m-m=n+1-m by A1,A3,A4,Lm2;
A13: len vs = len c + 1 by A5;
  then
A14: n+1<=len vs by A3,XREAL_1:6;
  then
A15: len p9+m-m=(n+1)+1-m by A1,A4,FINSEQ_6:def 4;
  then
A16: len p9 = n-m+1+1;
A17: now
    1-1<=m-1 by A1,XREAL_1:9;
    then m-1 = m-'1 by XREAL_0:def 2;
    then reconsider m1= m-1 as Element of NAT;
    let k be Nat;
    reconsider i = m1+k as Nat;
    assume that
A18: 1<=k and
A19: k<=len q;
    0+1<=k by A18;
    then consider j such that
    0<=j and
A20: j<len q and
A21: k=j+1 by A19,FINSEQ_6:127;
A22: j+1<len p9 by A12,A16,A20,XREAL_1:6;
    i+1 = m+(j+1) by A21;
    then
A23: p9.(k+1) = vs.(i+1) by A1,A4,A14,A22,FINSEQ_6:def 4;
    set v2 = vs/.(i+1);
    set v1 = vs/.i;
A24: 1<=i+1 by NAT_1:12;
A25: i= m+j by A21;
    j<len p9 by A12,A16,A20,NAT_1:13;
    then
A26: p9.k = vs.i by A1,A4,A14,A25,A22,FINSEQ_6:def 4;
    i<=(m-1)+(n-(m-1)) by A12,A19,XREAL_1:6;
    then
A27: i<=len c by A3,XXREAL_0:2;
    then
A28: i<=len vs by A13,NAT_1:12;
    take v1, v2;
A29: i+1<=len vs by A13,A27,XREAL_1:7;
    1-1<=m-1 by A1,XREAL_1:9;
    then
A30: 0+1<=m-1+k by A18,XREAL_1:7;
    then c.i joins v1, v2 by A5,A27;
    hence
    v1 = p9.k & v2 = p9.(k+1) & q.k joins v1, v2 by A1,A3,A11,A4,A20,A21,A25
,A30,A28,A24,A29,A26,A23,Lm2,FINSEQ_4:15;
  end;
  thus q is Chain of G
  proof
    hereby
      let k be Nat;
      assume that
A31:  1<=k and
A32:  k<=len q;
      k in dom q by A31,A32,FINSEQ_3:25;
      then
A33:  q.k in rng q by FUNCT_1:def 3;
      rng q c= rng c by A11,FINSEQ_6:137;
      then
A34:  q.k in rng c by A33;
      rng c c= the carrier' of G by FINSEQ_1:def 4;
      hence q.k in the carrier' of G by A34;
    end;
    take p9;
    thus len p9 = len q + 1 by A12,A15;
    thus for n st 1<=n & n<=len p9 holds p9.n in the carrier of G by A6;
    thus thesis by A17;
  end;
end;
