reserve n for Nat,
  k for Integer;
reserve p for polyhedron,
  k for Integer,
  n for Nat;

theorem Th30:
  -1 <= k & k <= dim(p) implies for x being Element of k-polytopes(p)
  ex n being Nat st x = n-th-polytope(p,k) & 1 <= n & n <= num-polytopes(p,k)
proof
  assume
A1: -1 <= k & k <= dim(p);
  let x be Element of k-polytopes(p);
  per cases by A1,XXREAL_0:1;
  suppose
A2: k = -1;
    reconsider n = 1 as Nat;
    k-polytope-seq(p) = <*{}*> by A2,Def7;
    then
A3: (k-polytope-seq(p)).n = {};
    take n;
    k-polytopes(p) = {{}} by A2,Def5;
    then x = {} & n <= num-polytopes(p,k) by CARD_1:30,TARSKI:def 1;
    hence thesis by A3,Def12;
  end;
  suppose
A4: k = dim(p);
    reconsider n = 1 as Nat;
    k-polytope-seq(p) = <*p*> by A4,Def7;
    then
A5: (k-polytope-seq(p)).n = p;
    take n;
    k-polytopes(p) = {p} by A4,Def5;
    then x = p & num-polytopes(p,k) = 1 by CARD_1:30,TARSKI:def 1;
    hence thesis by A5,Def12;
  end;
  suppose
A6: -1 < k & k < dim(p);
    set F = the PolytopsF of p;
A7: k-polytopes(p) = rng (F.(k+1)) by A6,Def5;
A8: -1 + 1 < k + 1 by A6,XREAL_1:6;
    then
A9: 0 + 1 <= k + 1 by INT_1:7;
    reconsider k9 = k + 1 as Element of NAT by A8,INT_1:3;
    k + 1 <= dim(p) by A6,INT_1:7;
    then F.k9 is non empty by A9,Def3;
    then consider m being object such that
A10: m in dom (F.k9) and
A11: (F.k9).m = x by A7,FUNCT_1:def 3;
    reconsider Fk9 = F.k9 as FinSequence;
    reconsider m as Element of NAT by A10;
    dom Fk9 = Seg (len Fk9) by FINSEQ_1:def 3;
    then
A12: 1 <= m & m <= len Fk9 by A10,FINSEQ_1:1;
    take m;
A13: k-polytope-seq(p) = F.(k+1) by A6,Def7;
    then num-polytopes(p,k) = len (F.(k+1)) by Th26;
    hence thesis by A13,A11,A12,Def12;
  end;
end;
