with(coxeter): # To calculate f-vector correction factors for the exceptional # types, do: # read(f_maple): #for R in [E6,E7,E8,F4,H3,H4] do # printf("\n"); # print(R,cox_number(R)); # for i from 0 to rank(R) do # print(i,correction_f(R,i)); # od; #od; # For the h-vector correction factors, replace correction_f # by correction_h # takes a root system data structure (of finite type) and returns # a polynomial such that the coeff of x^(n-k) is f_k. f_poly:=proc(R) option remember; return(x^rank(R)*subs(x=1/x,f_poly_rev(R))); end; # takes a root system data structure (of finite type) and returns # reversed from what is defined above. # that is, the coeff of x^k is f_k. f_poly_rev:=proc(R) local name,first; option remember; if rank(R)=0 then return 1; end if; if irreduc(name_of(R)) then return f_poly_irr_rev(R); else name:=name_of(R); first:=op(1,op(2,factors(name))); return (f_poly_rev(op(1,first))^op(2,first))*f_poly_rev(name/op(1,first)^op(2,first)); end if; end; # works on a finite irreducible Coxeter group. f_poly_irr_rev:=proc(R) local partial_f_poly,f; option remember; partial_f_poly:=0; f:=proc(x) ; partial_f_poly:=partial_f_poly+f_poly_rev(x); end proc; f_on_k_sublists(base(R),rank(R)-1,f); return((cox_number(R)*m+2)*subs(xprime=x,int(partial_f_poly,x=0..xprime,'continuous'))/2+1); end; # the reciprocal f_polynomial recip_f_poly:=proc(R) return(subs(x=-x,m=-m-1,f_poly(R))); end; # an entry in the h-vector h:=proc(R,k) return(factor(coeff(factor(h_poly(R)),x,rank(R)-k))); end; # an entry in the f-vector # recall that f_k is the number of k-element #simplices, not k-dimensional simplices! f:=proc(R,k) return(factor(coeff(factor(f_poly(R)),x,rank(R)-k))); end; # takes a root system data structure (of finite type) and returns # what we hope will be the associated Narayana polynomial. h_poly:=proc(R) option remember; return subs(x=x-1,f_poly(R)); end; # takes a root system data structure (of finite type) and returns # what we hope will be the associated Narayana polynomial. recip_h_poly:=proc(R) option remember; return subs(x=x-1,recip_f_poly(R)); end; # an entry in the reciprocal h-vector recip_h:=proc(R,k) return(factor(coeff(factor(recip_h_poly(R)),x,rank(R)-k))); end; # lists the exponents of level =< k. level_le_k:=proc(R,k) local letter,n; if k=0 then return([]); end if; letter:=substring(R,1..1); n:=convert(substring(R,2..length(R)),decimal,10); if letter=D then if k=1 or k=2 then return([1]); elif k