generalise infer_pe_complete somewhat

allow the tvs to be non-zero (although it must still equal num_tvs tenv)