A Mathematical Framework for the Problem of Combination of Prolog Programs