let subst sigma v = try Hstring.list_assoc v sigma with Not_found -> v