derive(+Goal, +Head, +HeadVars, +Seen) is det[private]
Mark the variables that are derived from Head by Goal.