
theorem Th42:
  for G being _finite _Graph, n being Nat st n < G.order() ex w
  being Vertex of G st w = LexBFS:PickUnnumbered((LexBFS:CSeq(G)).n) & for v
being set holds (v in G.AdjacentSet({w}) & not v in dom ((LexBFS:CSeq(G)).n)`1
  implies ((LexBFS:CSeq(G)).(n+1)) `2.v = (((LexBFS:CSeq(G)).n))`2.v \/ {G
.order() -' n}) & ((not v in G.AdjacentSet({w}) or v in dom (((LexBFS:CSeq(G)).
  n))`1) implies ((LexBFS:CSeq(G)).(n+1)) `2.v = (((LexBFS:CSeq(G)).n))`2.v)
proof
  let G be _finite _Graph, n be Nat such that
A1: n < G.order();
  set CS = (LexBFS:CSeq(G));
  set CSN = CS.n;
  set VLN = CSN`1;
  set V2N = CSN`2;
  set CN1 = CS.(n+1);
  set V21 = CN1`2;
  set w = LexBFS:PickUnnumbered(CSN);
  take w;
A2: CN1 = LexBFS:Step(CSN) by Def16;
  card dom VLN = n by A1,Th32;
  then
A3: CN1 = LexBFS:Update(CSN, w, n) by A1,A2,Def13;
  now
    let v be set;
    assume
A4: not v in G.AdjacentSet({w}) or v in dom VLN;
    per cases by A4;
    suppose
      not v in G.AdjacentSet({w});
      hence V21.v = V2N.v by A3,Th25;
    end;
    suppose
      v in dom VLN;
      hence V21.v = V2N.v by A3,Th26;
    end;
  end;
  hence thesis by A3,Th27;
end;
