use flatten instead of concat

flatten is bound in Lib to List.concat, but the name is less likely to get shadowed by something else
add to_inner_prop to base_type_assums

this had been done in type_assums, but I think it should be done generally
fix to instance_cert, using the new to_inner_prop assumption

and some minor tweaks