Well if there are chidren involved and they have a good relationship then the ex should be there for his or her children,If there are no children the ex can discreetly show up and pay his or her respect.If the two exes are cordial then there should not be a problem.Out of respect for the deceased every one should be cordial anyway. If the deceased has made a request for the ex not to be present then the ex should be notified and the request should be honored