code: private Stream<ImmutableExpression> extractEqualities(ImmutableSubstitution<ImmutableTerm> substitution,
                                                            ImmutableSet<Variable> leftVariables) {
          return substitution.getImmutableMap().entrySet().stream()
                  .filter(e -> leftVariables.contains(e.getKey()) || leftVariables.contains(e.getValue()))
                  .map(e -> termFactory.getImmutableExpression(EQ, e.getKey(), e.getValue()));
      }
docs: Extracts equalities involving a left variable from the substitution