Harvard University has filed a lawsuit against former President Donald Trump in response to a federal funding freeze targeting the institution.