reserve x,y for set;
reserve G for Graph;
reserve vs,vs9 for FinSequence of the carrier of G;
reserve IT for oriented Chain of G;
reserve N for Nat;
reserve n,m,k,i,j for Nat;
reserve r,r1,r2 for Real;
reserve X for non empty set;

theorem Th11:
  for f,g being FinSequence of X st f.1<>f.len f & g
  is_Shortcut_of f holds g is one-to-one
proof
  let f,g be FinSequence of X;
  assume that
A1: f.1<>f.len f and
A2: g is_Shortcut_of f;
A3: f.1=g.1 & f.len f=g.len g by A2;
  consider fc being Subset of PairF(f), fvs being Subset of f, sc being
  oriented simple Chain of PGraph(X), g1 being FinSequence of the carrier of
  PGraph(X) such that
  Seq fc = sc and
  Seq fvs = g and
A4: g1=g and
A5: g1 is_oriented_vertex_seq_of sc by A2;
  sc is Simple by GRAPH_4:18;
  then consider vs being FinSequence of the carrier of PGraph(X) such that
A6: vs is_oriented_vertex_seq_of sc and
A7: for n,m being Nat st 1<=n & n<m & m<=len vs & vs.n=vs.m
  holds n=1 & m=len vs by GRAPH_4:def 7;
A8: len g1 = len sc + 1 by A5,GRAPH_4:def 5;
  then 1<=len g1 by NAT_1:11;
  then 1<len g1 by A1,A3,A4,XXREAL_0:1;
  then sc<> {} by A8;
  then
A9: g1=vs by A5,A6,GRAPH_4:10;
  let x,y be object;
  assume that
A10: x in dom g and
A11: y in dom g and
A12: g.x=g.y;
  assume
A13: x<>y;
  reconsider i1=x as Element of NAT by A10;
A14: x in Seg len g by A10,FINSEQ_1:def 3;
  then
A15: 1<=i1 by FINSEQ_1:1;
A16: i1<=len g by A14,FINSEQ_1:1;
  reconsider i2=y as Element of NAT by A11;
A17: y in Seg len g by A11,FINSEQ_1:def 3;
  then
A18: 1<=i2 by FINSEQ_1:1;
A19: i2<=len g by A17,FINSEQ_1:1;
  per cases;
  suppose
    i1<=i2;
    then
A20: i1<i2 by A13,XXREAL_0:1;
    then i1=1 by A4,A7,A9,A12,A15,A19;
    hence contradiction by A1,A3,A4,A7,A9,A12,A19,A20;
  end;
  suppose
A21: i1>i2;
    then i2=1 by A4,A7,A9,A12,A16,A18;
    hence contradiction by A1,A3,A4,A7,A9,A12,A16,A21;
  end;
end;
