With difficulty. You need to go see a solicitor - especially if you are in the south - because the law is distinctly different there.(posted 8313 days ago)You need to take along details of any arrangements you entered into, plus proof of your and his contributions.
If he won't sell, would he consider buying you out? You could threaten to stop paying the mortgage - but I wouldn't recommend carrying out this threat - everybody loses out this way.