
theorem Th37:
  for G being _finite _Graph holds (LexBFS:CSeq(G)).Lifespan() = G .order()
proof
  let G be _finite _Graph;
  set CS = LexBFS:CSeq(G);
A1: for n being Nat st CS.n = CS.(n+1) holds G.order() <= n
  proof
    let n be Nat such that
A2: CS.n = CS.(n+1);
    set w = LexBFS:PickUnnumbered(CS.n);
    set VN1 = (CS.(n+1))`1;
    set VLN = (CS.n)`1;
    set j = card (dom VLN);
    set wf = w .--> (G.order() -' j);
    assume
A3: n < G.order();
    then dom VLN <> the_Vertices_of G by Th36;
    then
A4: not w in dom VLN by Th30;
    j < G.order() by A3,Th32;
    then
A5: VN1 = VLN +* (w .--> (G.order() -' j)) by Th31;
    dom wf = {w};
    then
A6: dom VN1 = dom VLN \/ {w} by A5,FUNCT_4:def 1;
    w in {w} by TARSKI:def 1;
    hence contradiction by A2,A4,A6,XBOOLE_0:def 3;
  end;
  G.order() <= G.order()+1 by NAT_1:13;
  then CS.(G.order()) = CS.(G.order()+1) by Th33;
  hence thesis by A1,GLIB_000:def 56;
end;
