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
  for G being _Graph, W being vertex-distinct Walk of G, e,v being object
  st e Joins W.last(),v,G & not v in W.vertices() holds W.addEdge(e) is
  vertex-distinct
proof
  let G be _Graph, W be vertex-distinct Walk of G, e,v be object;
  assume that
A1: e Joins W.last(),v,G and
A2: not v in W.vertices();
  set W2 = W.addEdge(e);
A3: len W2 = len W + 2 by A1,Lm37;
A4: now
    let n be odd Element of NAT;
    assume that
A5: n <= len W2 and
A6: n > len W;
    len W + 1 <= n by A6,NAT_1:13;
    then len W + 1 < n by XXREAL_0:1;
    then len W + 1 + 1 <= n by NAT_1:13;
    hence n = len W2 by A3,A5,XXREAL_0:1;
    hence W2.n = v by A1,A3,Lm38;
  end;
  now
    let m,n be odd Element of NAT;
    assume that
A7: m <= len W2 and
A8: n <= len W2 and
A9: W2.m = W2.n;
A10: 1 <= n by ABIAN:12;
A11: 1 <= m by ABIAN:12;
    now
      per cases;
      suppose
A12:    m <= len W;
        then m in dom W by A11,FINSEQ_3:25;
        then
A13:    W2.m = W.m by A1,Lm38;
        now
          per cases;
          suppose
A14:        n <= len W;
            then n in dom W by A10,FINSEQ_3:25;
            then W2.n = W.n by A1,Lm38;
            hence m = n by A9,A12,A13,A14,Def29;
          end;
          suppose
            n > len W;
            then W.m = v by A4,A8,A9,A13;
            hence m = n by A2,A12,Lm45;
          end;
        end;
        hence m = n;
      end;
      suppose
A15:    m > len W;
        then
A16:    W2.m = v by A4,A7;
A17:    m = len W2 by A4,A7,A15;
        now
          per cases;
          suppose
A18:        n <= len W;
            then n in dom W by A10,FINSEQ_3:25;
            then v = W.n by A1,A9,A16,Lm38;
            hence m = n by A2,A18,Lm45;
          end;
          suppose
            n > len W;
            hence m = n by A4,A8,A17;
          end;
        end;
        hence m =n;
      end;
    end;
    hence m = n;
  end;
  hence thesis;
end;
