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

theorem Th25:
  dom (k-polytope-seq(p)) = Seg (num-polytopes(p,k))
proof
  set F = the PolytopsF of p;
  per cases;
  suppose
    k < -1;
    then k-polytope-seq(p) = <*>{} & k-polytopes(p) = {} by Def5,Def7;
    hence thesis by FINSEQ_1:def 3;
  end;
  suppose
A1: -1 <= k & k <= dim(p);
    per cases by A1,XXREAL_0:1;
    suppose
A2:   k = -1;
      then k-polytope-seq(p) = <*{}*> by Def7;
      then
A3:   len (k-polytope-seq(p)) = 1 by FINSEQ_1:39;
      k-polytopes(p) = {{}} by A2,Def5;
      then num-polytopes(p,k) = 1 by CARD_2:42;
      hence thesis by A3,FINSEQ_1:def 3;
    end;
    suppose
A4:   -1 < k & k < dim(p);
      set n = k + 1;
      reconsider n as Nat by A4,Th22;
      reconsider Fn = F.n as FinSequence;
      1 <= n & n <= dim(p) by A4,Th22;
      then
A5:   Fn is one-to-one by Def3;
      k-polytopes(p) = rng (F.(k+1)) by A4,Def5;
      then num-polytopes(p,k) = card (dom Fn) by A5,CARD_1:70;
      then
A6:   len Fn = num-polytopes(p,k) by CARD_1:62;
      k-polytope-seq(p) = F.(k+1) by A4,Def7;
      hence thesis by A6,FINSEQ_1:def 3;
    end;
    suppose
A7:   k = dim(p);
      then k-polytope-seq(p) = <*p*> by Def7;
      then
A8:   len (k-polytope-seq(p)) = 1 by FINSEQ_1:39;
      k-polytopes(p) = {p} by A7,Def5;
      then num-polytopes(p,k) = 1 by CARD_2:42;
      hence thesis by A8,FINSEQ_1:def 3;
    end;
  end;
  suppose
    k > dim(p);
    then k-polytope-seq(p) = <*>{} & k-polytopes(p) = {} by Def5,Def7;
    hence thesis by FINSEQ_1:def 3;
  end;
end;
