5
$\begingroup$

After spending hours of debugging my program, I found that Collect threads over Rule. While the documentation (under Details and Options) says that it threads over "lists ... equations, inequalities and logic functions", Rule does not count (in my mind) as one of those.

In order to avoid any further unexpected behavior, I need to know exactly which heads Collect threads over. Does anyone know?

$\endgroup$
2
  • 2
    $\begingroup$ Does SystemOptions["AlgebraicThreadThroughHeads"] give what you need? $\endgroup$
    – kglr
    Jul 26 '17 at 17:19
  • $\begingroup$ @kglr Yes! It does. Please add that as an answer, and also include how you knew where to find that information? $\endgroup$
    – QuantumDot
    Jul 26 '17 at 20:47
4
$\begingroup$
SystemOptions["AlgebraicThreadThroughHeads"]

{"AlgebraicThreadThroughHeads" ->
{And, Equal, Greater, GreaterEqual, Implies, Inequality, Less, LessEqual, List, Nand, Nor, Not, Or, Rule, Unequal, Xor}}

$\endgroup$
1
  • $\begingroup$ It was pure lock that I bumped into the option "AlgebraicThreadThroughHeads" while checking "SimplificationOptions" for this answer:) $\endgroup$
    – kglr
    Jul 26 '17 at 21:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.