The federal government is going to court to force a Toronto company to sell a $34-million stake in a Calgary-based lithium firm that it bought off a Chinese company.