IgnoringInactive[patt]
is a pattern object that, for purposes of pattern matching, ignores occurrences of Inactive in both patt and the expression being matched.
IgnoringInactive
IgnoringInactive[patt]
is a pattern object that, for purposes of pattern matching, ignores occurrences of Inactive in both patt and the expression being matched.
Examples
open all close allBasic Examples (1)
Replace all elements in a list that match a certain pattern:
expr = {Sin[m], Inactive[Sin][p]}expr /. Sin[a_] -> tUse IgnoringInactive to include a particular Inactive pattern:
expr /. IgnoringInactive[Sin[a_]] -> tScope (3)
By default, inactive symbols are excluded during pattern matching:
expr = {Sin[m], Inactive[Sin][p]}Cases[expr, Sin[a_]]Use IgnoringInactive to include a particular Inactive pattern:
Cases[expr, IgnoringInactive[Sin[a_]]]Find whether an expression matches a certain pattern:
expr = Inactive[Sin][m]MatchQ[expr, Sin[a_]]Include a particular Inactive pattern:
MatchQ[expr, IgnoringInactive[Sin[a_]]]Find whether an expression is free of a certain pattern:
expr = Inactive[Sin][m]FreeQ[expr, Sin[a_]]Include a particular Inactive pattern:
FreeQ[expr, IgnoringInactive[Sin[a_]]]Applications (2)
Define a rule that applies to both active and Inactive objects:
diff[IgnoringInactive[int[f_, x_]], x_] := fdiff[int[Sin[x], x], x]The rule also works for an inactive int:
diff[Inactive[int][Sin[x], x], x]Define a multiplication rule for the logarithm:
IgnoringInactive[log[a_ b_]] := log[x] + log[y]The rule works for both active and inactive versions:
log[x y]Inactive[log][x y]See Also
Related Guides
History
Text
Wolfram Research (2014), IgnoringInactive, Wolfram Language function, https://reference.wolfram.com/language/ref/IgnoringInactive.html.
CMS
Wolfram Language. 2014. "IgnoringInactive." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/IgnoringInactive.html.
APA
Wolfram Language. (2014). IgnoringInactive. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/IgnoringInactive.html
BibTeX
@misc{reference.wolfram_2026_ignoringinactive, author="Wolfram Research", title="{IgnoringInactive}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/IgnoringInactive.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_ignoringinactive, organization={Wolfram Research}, title={IgnoringInactive}, year={2014}, url={https://reference.wolfram.com/language/ref/IgnoringInactive.html}, note=[Accessed: 12-June-2026]}