# Symbolics avoid simplifications with rules

**URL:** <https://discourse.julialang.org/t/symbolics-avoid-simplifications-with-rules/86421>\
**Category:** Modelling & Simulations\
**Tags:** symbolics\
**Created:** [August 27, 2022, 8:14am UTC](https://discourse.julialang.org/t/symbolics-avoid-simplifications-with-rules/86421 "2022-08-27T08:14:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![qwerty](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Post date:** [August 27, 2022, 8:14am UTC](https://discourse.julialang.org/t/symbolics-avoid-simplifications-with-rules/86421/1 "2022-08-27T08:14:52Z")

</div>

How can I avoid simplification before applying a rule in Symbolics?  
I have (x_y-y_x) and I want to replace it with commutator(x, y), but before the rule can be applied x_y-y_x is simplified to 0.

---

<div class="post-metadata">

**Author:** ![ChrisRackauckas](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/chrisrackauckas/32/77_2.png) [@ChrisRackauckas](https://discourse.julialang.org/u/ChrisRackauckas)\
**Post date:** [August 27, 2022, 1:00pm UTC](https://discourse.julialang.org/t/symbolics-avoid-simplifications-with-rules/86421/2 "2022-08-27T13:00:05Z")

</div>

You’d want to apply a special type and then your own rule set.

---

<div class="post-metadata">

**Author:** ![qwerty](https://avatars.discourse-cdn.com/v4/letter/q/4491bb/32.png) [@qwerty](https://discourse.julialang.org/u/qwerty)\
**Post date:** [August 27, 2022, 2:39pm UTC](https://discourse.julialang.org/t/symbolics-avoid-simplifications-with-rules/86421/3 "2022-08-27T14:39:04Z")

</div>

Thanks for the answers and also for your videos on YB, I am learning a lot from them.  
Is there a particular reason why a non-commutative operator or a non-commutative type is not implemented directly in Symbolics? Their absence can be an obstacle for anyone who is not a programmer but wants to use Symbolics.
