residualize (tree, goal, names) =
  -- let restricted = restrictSubsts tree in
  let restricted = tree in
  let (defs, newGoal) = generateDefs restricted in
  Program defs newGoal
residualize (tree, goal, names) =
  -- let restricted = restrictSubsts tree in
  let restricted = tree in
  let (defs, newGoal) = generateDefs restricted in
  Program defs newGoal
residualize (tree, goal, names) =
  -- let restricted = restrictSubsts tree in
  let restricted = tree in
  let (defs, newGoal) = generateDefs restricted in
  Program defs newGoal