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

theorem Th51:
  alternating-f-vector(p) = <*-1*> ^ alternating-semi-proper-f-vector(p)
proof
  set acs = alternating-f-vector(p);
  set aspcs = alternating-semi-proper-f-vector(p);
  set d = dim(p);
  set r = <*-1*> ^ aspcs;
A1: len r = (len <*-1*>) + (len aspcs) by FINSEQ_1:22
    .= (len <*-1*>) + (d + 1) by Def28
    .= 1 + (d + 1) by FINSEQ_1:40
    .= d + 2;
A2: for n being Nat st 1 <= n & n <= len acs holds acs.n = r.n
  proof
    let n be Nat such that
A3: 1 <= n and
A4: n <= len acs;
A5: n <= d + 2 by A4,Def26;
    per cases by A3,XXREAL_0:1;
    suppose
A6:   n = 1;
      then acs.n = ((-1)|^1)*num-polytopes(p,1-2) by A5,Def26
        .= (-1)*num-polytopes(p,-1)
        .= (-1)*1 by Th28
        .= -1;
      hence thesis by A6,FINSEQ_1:41;
    end;
    suppose
A7:   n > 1;
      then
A8:   1 - 1 < n - 1 by XREAL_1:9;
      then reconsider m = n - 1 as Element of NAT by INT_1:3;
      n - 1 <= (d + 2) - 1 by A5,XREAL_1:9;
      then
A9:   m <= d + 1;
      len <*-1*> = 1 by FINSEQ_1:39;
      then
A10:  r.n = aspcs.(n-1) by A1,A5,A7,FINSEQ_1:24;
      0 < 0 + m by A8;
      then 1 <= m by NAT_1:19;
      then aspcs.m = ((-1)|^(m+1))*num-polytopes(p,m-1) by A9,Def28
        .= ((-1)|^n)*(num-polytopes(p,n-2));
      hence thesis by A3,A5,A10,Def26;
    end;
  end;
  len acs = len r by A1,Def26;
  hence thesis by A2;
end;
