Type Theory And Functional Groups