%RUN_UCONJ_RESTR_JAC

tic
global a b ab ableg
N=45;
M=ceil(N/2);
%for a=-.9:.1:1
%  for b=-.9:.1:1
for a=1.02
  for b=a
    ab=r_jacobi(N,a,b); ableg=r_jacobi(M);
    [a b]
%    for n=[5 15 30]
    for n=30
      dig=16; [U,d]=Uconj_restr_jac(dig,n); err=1;
      while err > .5e-4
        dig=dig+4;
        da=d;
        [U,d]=Uconj_restr_jac(dig,n);
        err=errd(n,d,da);
      end
      [dig err]
      d=double(d);
      for k=1:n
        if imag(d(k))==0
          d(k)=d(k)+(1e-20)*i; break
        end
      end
      d
%      plot(d,'k*','MarkerSize',16);set(gca,'FontSize',24) 
      semilogx(d,'k*','MarkerSize',16);set(gca,'FontSize',24)
%      axis([-.02 .09 -.06 .06])
      for i=1:n
        if real(d(i))<=0 
          disp('conjecture is false')
          [a b n], d
          error('quit')
        end  
      end
      disp('conjecture is true')
    end
  end
end
toc
