Reasoning backwards with type families