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 Th31:
  c <>{} & vs is_vertex_seq_of c implies G-VSet rng c = rng vs
proof
  assume that
A1: c <>{} and
A2: vs is_vertex_seq_of c;
A3: len vs = len c + 1 by A2;
  now
    let y be object;
    hereby
      assume y in G-VSet rng c;
      then consider v being Element of G such that
A4:   v=y and
A5:   ex e being Element of the carrier' of G st e in rng c & (v = (
      the Source of G).e or v = (the Target of G).e);
      consider e being Element of the carrier' of G such that
A6:   e in rng c and
A7:   v = (the Source of G).e or v = (the Target of G).e by A5;
      consider x being object such that
A8:   x in dom c and
A9:   e = c.x by A6,FUNCT_1:def 3;
      reconsider x as Element of NAT by A8;
A10:  1<=x+1 by NAT_1:12;
      set v2 = vs/.(x+1);
      set v1 = vs/.x;
A11:  x<=len c by A8,FINSEQ_3:25;
      then
A12:  x+1 in dom vs by A10,FINSEQ_3:25,A3,XREAL_1:7;
A13:  1<=x by A8,FINSEQ_3:25;
      then c.x joins v1, v2 by A2,A11;
      then
A14:  v = v1 or v = v2 by A7,A9;
A15:  x<=len vs by A3,A11,NAT_1:12;
      then
A16:  v1 = vs.x by A13,FINSEQ_4:15;
A17:  x in dom vs by A13,A15,FINSEQ_3:25;
      v2 = vs.(x+1) by A3,A11,A10,FINSEQ_4:15,XREAL_1:7;
      hence y in rng vs by A4,A16,A14,A17,A12,FUNCT_1:def 3;
    end;
    assume y in rng vs;
    then consider x being object such that
A18: x in dom vs and
A19: y = vs.x by FUNCT_1:def 3;
    reconsider x as Element of NAT by A18;
A20: 1<=x by A18,FINSEQ_3:25;
A21: x<=len vs by A18,FINSEQ_3:25;
    per cases by A3,A21,NAT_1:8;
    suppose
A22:  x<=len c;
      then x in dom c by A20,FINSEQ_3:25;
      then
A23:  c.x in rng c by FUNCT_1:def 3;
      rng c c= the carrier' of G by FINSEQ_1:def 4;
      then reconsider e = c.x as Element of the carrier' of G by A23;
      x in dom c by A20,A22,FINSEQ_3:25;
      then
A24:  e in rng c by FUNCT_1:def 3;
      set v2 = vs/.(x+1);
      set v1 = vs/.x;
      c.x joins v1, v2 by A2,A20,A22;
      then
A25:  v1 = (the Source of G).e & v2 = (the Target of G).e or v2 = (the
      Source of G).e & v1 = (the Target of G).e;
      v1 = vs.x by A20,A21,FINSEQ_4:15;
      hence y in G-VSet rng c by A19,A25,A24;
    end;
    suppose
A26:  x=len c+1;
      set l = len c;
A27:  rng c c= the carrier' of G by FINSEQ_1:def 4;
      0+1=1;
      then
A28:  1<=l by A1,NAT_1:13;
      then l in dom c by FINSEQ_3:25;
      then c.l in rng c by FUNCT_1:def 3;
      then reconsider e = c.l as Element of the carrier' of G by A27;
      set v2 = vs/.(l+1);
      set v1 = vs/.l;
      l in dom c by A28,FINSEQ_3:25;
      then
A29:  e in rng c by FUNCT_1:def 3;
      c.l joins v1, v2 by A2,A28;
      then
A30:  v1 = (the Source of G).e & v2 = (the Target of G).e or v2 = (the
      Source of G).e & v1 = (the Target of G).e;
      v2 = vs.(l+1) by A3,A20,A26,FINSEQ_4:15;
      hence y in G-VSet rng c by A19,A26,A30,A29;
    end;
  end;
  hence thesis by TARSKI:2;
end;
