
theorem
  for G being _Graph, W1, W2 being Walk of G, e being object holds
    W1.first() = W1.replaceWithEdge(W2, e).first() &
    W1.last() = W1.replaceWithEdge(W2, e).last()
proof
  let G be _Graph;
  let W1, W2 be Walk of G;
  let e be object;
  per cases;
  suppose W2 is_odd_substring_of W1, 0 & e Joins W2.first(),W2.last(),G;
    then consider W3 being Walk of G such that
      A1: W1.replaceWithEdge(W2, e) = W1.replaceWith(W2,W3) by Th47;
    thus thesis by A1, Th39;
  end;
  suppose not (W2 is_odd_substring_of W1, 0 & e Joins W2.first(),W2.last(),G);
    hence thesis by Def7;
  end;
end;
