Derive rels from types