infrastructure up to type-related lemmas