reserve X,x,y,z for set;
reserve n,m,k,k9,d9 for Nat;
reserve d for non zero Nat;
reserve i,i0,i1 for Element of Seg d;
reserve l,r,l9,r9,l99,r99,x,x9,l1,r1,l2,r2 for Element of REAL d;
reserve Gi for non trivial finite Subset of REAL;
reserve li,ri,li9,ri9,xi,xi9 for Real;
reserve G for Grating of d;

theorem
  d = d9 + 1 implies (cell(l,r) in cells(d9,G) iff
  ex i0 st l.i0 = r.i0 & l.i0 in G.i0 &
  for i st i <> i0 holds l.i < r.i & [l.i,r.i] is Gap of G.i)
proof
  assume
A1: d = d9 + 1;
  hereby
    assume cell(l,r) in cells(d9,G);
    then consider l9,r9,i0 such that
A2: cell(l,r) = cell(l9,r9) and
A3: l9.i0 = r9.i0 and
A4: l9.i0 in G.i0 and
A5: for i st i <> i0 holds l9.i < r9.i & [l9.i,r9.i] is Gap of G.i by A1,Th38;
    take i0;
A6: now
      let i;
      i = i0 or i <> i0;
      hence l9.i <= r9.i by A3,A5;
    end;
    then
A7: l = l9 by A2,Th28;
    r = r9 by A2,A6,Th28;
    hence l.i0 = r.i0 & l.i0 in G.i0 &
    for i st i <> i0 holds l.i < r.i & [l.i,r.i] is Gap of G.i by A3,A4,A5,A7;
  end;
  thus thesis by A1,Th38;
end;
