let variables sa = fold (fun a -> Variable.Set.union (Atom.variables a)) sa Variable.Set.empty