let rec p_goal hs p = match hs with
  | [] -> p
  | h::hs -> PRED.p_implies h (p_goal hs p)