
theorem Th37:
  for G being _Graph, W being Walk of G holds
  (for P being Path of G st P is_Walk_from W.first(),W.last() holds
    len P >= len W) implies W is minlength
proof
  let G be _Graph, W be Walk of G;
  assume
A1: for P2 being Path of G st P2 is_Walk_from W.first(),W.last() holds
  len P2 >= len W;
  now
    let V be Walk of G such that
A2: V is_Walk_from W.first(),W.last();
    set P3 = the Path-like Subwalk of V;
    V.last() = W.last() by A2;
    then
A3: P3.last()=W.last() by GLIB_001:161;
    V.first() = W.first() by A2;
    then P3.first()=W.first() by GLIB_001:161;
    then P3 is_Walk_from W.first(),W.last() by A3;
    then
A4: len W <= len P3 by A1;
    len P3 <= len V by GLIB_001:162;
    hence len V >= len W by A4,XXREAL_0:2;
  end;
  hence thesis;
end;
