reserve G,G1,G2 for _Graph;
reserve W,W1,W2 for Walk of G;
reserve e,x,y,z for set;
reserve v for Vertex of G;
reserve n,m for Element of NAT;

theorem Th38:
  for n being odd Element of NAT st n < len W holds G.walkOf(W.n,
  W.(n+1), W.(n+2)) = W.cut(n,n+2)
proof
  let n be odd Element of NAT;
  set v1 = W.n, e = W.(n+1), v2 = W.(n+2);
  set W1 = G.walkOf(v1,e,v2), W2 = W.cut(n,n+2);
  assume
A1: n < len W;
  then
A2: n+2 <= len W by Th1;
A3: n <= n+2 by Th1;
  then
A4: len W.cut(n,n+2) + n = 1 + (2+n) by A2,Lm15;
A5: e Joins v1,v2,G by A1,Def3;
  then
A6: G.walkOf(v1,e,v2) = <*v1,e,v2*> by Def5;
A7: len W1 = 3 by A5,Th13;
  then
A8: dom W1 = Seg 3 by FINSEQ_1:def 3;
  now
    let x be Nat;
    assume
A9: x in dom W1;
    then 1 <= x by FINSEQ_3:25;
    then reconsider xaa1 = x-1 as Element of NAT by INT_1:5;
    x <= 3 by A7,A9,FINSEQ_3:25;
    then
A10: xaa1 < 3-0 by XREAL_1:15;
    xaa1+1 = x;
    then
A11: W2.x = W.(n+xaa1) by A3,A2,A4,A10,Lm15;
    now
      per cases by A8,A9,ENUMSET1:def 1,FINSEQ_3:1;
      suppose
        x = 1;
        hence W1.x = W2.x by A6,A11;
      end;
      suppose
        x = 2;
        hence W1.x = W2.x by A6,A11;
      end;
      suppose
        x = 3;
        hence W1.x = W2.x by A6,A11;
      end;
    end;
    hence W1.x = W2.x;
  end;
  hence thesis by A4,A7,FINSEQ_2:9;
end;
