code: private boolean containsEqualityRightSpecificVariable(
              ImmutableSubstitution<? extends VariableOrGroundTerm> descendingSubstitution,
              IQTree leftChild, IQTree rightChild) {
  
          ImmutableSet<Variable> leftVariables = leftChild.getVariables();
          ImmutableSet<Variable> rightVariables = rightChild.getVariables();
          ImmutableSet<Variable> domain = descendingSubstitution.getDomain();
          ImmutableCollection<? extends VariableOrGroundTerm> range = descendingSubstitution.getImmutableMap().values();
  
          return rightVariables.stream()
                  .filter(v -> !leftVariables.contains(v))
                  .anyMatch(v -> (domain.contains(v)
                              && (!isFreshVariable(descendingSubstitution.get(v), leftVariables, rightVariables)))
                          // The domain of the substitution is assumed not to contain fresh variables
                          // (normalized before)
                          || range.contains(v));
      }
docs: Returns true when an equality between a right-specific and a term that is not a fresh variable
  is propagated down through a substitution.