code: public Formula substitute(final Variable variable, final Formula formula) {
          final Substitution subst = new Substitution();
          subst.addMapping(variable, formula);
          return this.substitute(subst);
      }
docs: Performs a simultaneous substitution on this formula given a single mapping from variable to formula.
  @param variable the variable
  @param formula  the formula
  @return a new substituted formula