function [U,d]=Uconj_restr_jac(dig,n)
%function [U,d]=Uconj_restr_jac(dig,n)
%UCONJ_RESTR_JAC The restricted Stenger conjecture.  
%   Evaluates the matrix U_n for a Jacobi weight function
%   in double-precision arithmetic and its eigenvalues in
%   dig-digit arithmetic

global a b ab ableg 
m=ceil(n/2);
U=zeros(n);
abn=ab(1:n,:); ablegm=ableg(1:m,:); 
xwn=gauss(n,abn); xn=xwn(:,1);
xwlegm=gauss(m,ablegm); xlegm=xwlegm(:,1); wlegm=xwlegm(:,2);
for j=1:n
  cn=xn(j);
  const=(1+cn)/2;
  for k=1:n
    s=0;
    for i=1:m
      u=((1+cn)/2)*xlegm(i)-((1-cn)/2);
      lag=lagrange(n,xn,u);
      s=s+wlegm(i)*lag(k);
    end
    U(j,k)=const*s;
  end
end
digits(dig);
U=vpa(U);
d=eig(U);
d=double(d);
