As a result of the change in its status and the arrival of the Portuguese royal family, Brazilian administrative, civic, economical, military, educational, and scientific apparatus were expanded and highly modernized. Portugese and British troops fought against the invasion of which country