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