Fix circularity in typing and translation
wip adding inversion of LF terms.