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

theorem Th79:
  alternating-f-vector(p) = <*-1*> ^ alternating-proper-f-vector(p) ^
    <*(-1)|^(dim(p))*>
proof
  set acs = alternating-f-vector(p);
  set apcs = alternating-proper-f-vector(p);
  set r = <*-1*> ^ apcs ^ <*(-1)|^(dim(p))*>;
  set n = dim(p);
A1: len <*(-1)|^(dim(p))*> = 1 by FINSEQ_1:39;
A2: len apcs = n by Def27;
A3: len acs = n + 2 by Def26;
A4: for k being Nat st 1 <= k & k <= len acs holds acs.k = r.k
  proof
    let k be Nat such that
A5: 1 <= k & k <= len acs;
    per cases by A3,A5,XXREAL_0:1;
    suppose
A6:   k = 1;
      reconsider o = 1 as Nat;
      1 <= n + 2 & o - 2 = -1 by Th10;
      then
A7:   acs.o = ((-1)|^o)*num-polytopes(p,-1) by Def26;
      (-1)|^1 = -1 & num-polytopes(p,-1) = 1 by Th28;
      hence thesis by A6,A7,Th15;
    end;
    suppose
A8:   k = n + 2;
      len <*-1*> = 1 by FINSEQ_1:39;
      then k = (len <*-1*> + len (apcs) + 1) by A2,A8;
      then
A9:   r.k = (-1)|^(dim(p)) by Th16
        .= (-1)|^k by A8,Th12;
      1 <= k by A8,Th10;
      then
A10:  acs.k = ((-1)|^k)*num-polytopes(p,k-2) by A8,Def26;
      num-polytopes(p,k-2) = 1 by A8,Th29;
      hence thesis by A10,A9;
    end;
    suppose
A11:  1 < k & k < n + 2;
      set m = k - 1;
A12:  (k + 1) - 1 = k & (n + 2) - 1 = n + 1;
A13:  k + 1 <= n + 2 by A11,INT_1:7;
      len (<*-1*> ^ apcs) = (len <*-1*> + len apcs) by FINSEQ_1:22
        .= n + 1 by A2,FINSEQ_1:39;
      then len <*-1*> = 1 & k <= len (<*-1*> ^ apcs) by A13,A12,FINSEQ_1:39
,XREAL_1:9;
      then r.k = apcs.m by A11,Th17;
      hence thesis by A11,Th78;
    end;
  end;
  len r = (len <*-1*>) + (len apcs) + (len <*(-1)|^(dim(p))*>) & len <*-1
  *> = 1 by Th14,FINSEQ_1:39;
  hence thesis by A3,A2,A1,A4;
end;
