
theorem
  for G1 being _Graph, G2 being removeLoops of G1
  for W1 being Walk of G1, W2 being Walk of G2
  st W1 = W2 holds W1 is minlength iff W2 is minlength
proof
  let G1 be _Graph, G2 be removeLoops of G1;
  let W1 be Walk of G1, W2 be Walk of G2;
  assume A1: W1 = W2;
  hence W1 is minlength implies W2 is minlength by Th47;
  assume A2: W2 is minlength;
  now
    let W be Walk of G1;
    set P = the Path of W;
    assume W is_Walk_from W1.first(),W1.last();
    then A3: P is_Walk_from W1.first(),W1.last() by GLIB_001:160;
    per cases by GLIB_009:57;
    suppose P.edges() misses G1.loops();
      then reconsider W9 = P as Walk of G2 by Th38;
      W9 is_Walk_from W1.first(),W1.last() by A3, GLIB_001:19;
      then W9 is_Walk_from W2.first(),W1.last() by A1;
      then W9 is_Walk_from W2.first(),W2.last() by A1;
      then A4: len P >= len W1 by A1, A2, CHORD:def 2;
      len W >= len P by GLIB_001:162;
      hence len W >= len W1 by A4, XXREAL_0:2;
    end;
    suppose ex v,e being object st e Joins v,v,G1 & P = G1.walkOf(v,e,v);
      then consider v,e being object such that
        A5: e Joins v,v,G1 & P = G1.walkOf(v,e,v);
      P.first() = v & P.last() = v by A5, GLIB_001:15;
      then W1.first() = v & W1.last() = v by A3, GLIB_001:def 23;
      then A6: W2.first() = v & W2.last() = v by A1;
      then reconsider v as Vertex of G2;
      W2 is_Walk_from v,v by A6, GLIB_001:def 23;
      then W2 = G2.walkOf(v) by A2, Th48;
      then A7: len P = 3 & len W2 = 1 by A5, GLIB_001:13, GLIB_001:14;
      len W >= len P by GLIB_001:162;
      hence len W >= len W1 by A1, A7, XXREAL_0:2;
    end;
  end;
  hence thesis by CHORD:def 2;
end;
