reserve a,a1,a2,b,c,d for Ordinal,
  n,m,k for Nat,
  x,y,z,t,X,Y,Z for set;
reserve f,g for Function;
reserve A,B,C for array;
reserve O for connected non empty Poset;
reserve R,Q for array of O;
reserve T for non empty array of O;
reserve p,q,r,s for Element of dom T;

theorem
  for C being 0-based arr_computation of R st R is finite array of O &
  for a st inversions (C.a) <> {} holds succ a in dom C
  holds C is complete
  proof
    let C be 0-based arr_computation of R;
    assume R is finite array of O; then
    C is finite by Th76; then
    reconsider d = dom C as non empty finite Ordinal;
    assume
A1: for a st inversions (C.a) <> {} holds succ a in dom C;
    set u = union d;
    consider n being Nat such that
A2: d = n+1 by NAT_1:6;
    d = Segm(n+1) by A2;
    then
A3: d = succ Segm n by NAT_1:38; then
A4: u = n by ORDINAL2:2;
    inversions (C.u) <> 0 implies d in d by A1,A3,A4;
    hence last C is ascending by Th48;
  end;
