Fixing type variables in locale extensions
问题 Given this code locale A = fixes foo :: "'a" locale B = A + fixes bar :: "'a × 'a" locale C' = A + fixes baz :: "'a" begin sublocale B foo "(foo, baz)". end I get Type unification failed Failed to meet type constraint: Term: (foo, baz) :: 'b × 'a Type: 'b × 'b so it seems that Isabelle does not understand that baz and foo should be of the same type. Is there a way to fix this? 回答1: The problem is with your declaration of locales B and C . The declaration for B is equivalent to the following