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

theorem Th84:
  dim(p) = 3 implies Sum alternating-proper-f-vector(p) =
  num-polytopes(p,0) - num-polytopes(p,1) + num-polytopes(p,2)
proof
  reconsider mo = -1 as Integer;
  reconsider th = 3 as Nat;
  reconsider tw = 2 as Nat;
  reconsider o = 1 as Nat;
  assume
A1: dim(p) = 3;
  set apcs = alternating-proper-f-vector(p);
  (-1)|^(tw+1) = -1 by Th5,Th8;
  then
A2: apcs.tw = mo*num-polytopes(p,tw-1) by A1,Def27;
  (-1)|^(th+1) = 1 by Th6,Th7;
  then
A3: apcs.th = o*num-polytopes(p,th-1) by A1,Def27;
  reconsider apcsth = apcs.th as Integer;
  reconsider apcstw = apcs.tw as Integer;
  reconsider apcson = apcs.o as Integer;
  (-1)|^(o+1) = 1 by Th4,Th7;
  then
A4: apcs.o = o*num-polytopes(p,o-1) by A1,Def27;
  len apcs = 3 by A1,Def27;
  then apcs = <*apcson,apcstw,apcsth*> by FINSEQ_1:45;
  then Sum apcs = apcson + apcstw + apcsth by RVSUM_1:78
    .= num-polytopes(p,0) - num-polytopes(p,1) + num-polytopes(p,2) by A4,A2,A3
;
  hence thesis;
end;
