# Rewrite rule to transform (a\*b\*c\*d\*...)^(-1) to (a^(-1)\*b^(-1)\*c^(-1)\*d^(-1)\*...)

**URL:** <https://discourse.julialang.org/t/rewrite-rule-to-transform-a-b-c-d-1-to-a-1-b-1-c-1-d-1/114569>\
**Category:** General Usage\
**Tags:** symbolic-utils\
**Created:** [May 22, 2024, 1:46pm UTC](https://discourse.julialang.org/t/rewrite-rule-to-transform-a-b-c-d-1-to-a-1-b-1-c-1-d-1/114569 "2024-05-22T13:46:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![VPBML](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/vpbml/32/212617_2.png) [@VPBML](https://discourse.julialang.org/u/VPBML)\
**Post date:** [May 22, 2024, 1:46pm UTC](https://discourse.julialang.org/t/rewrite-rule-to-transform-a-b-c-d-1-to-a-1-b-1-c-1-d-1/114569/1 "2024-05-22T13:46:09Z")

</div>

Hi,  
I wonder if we can define a rule with SymbolicUtils to rewrite (a_b_c_d_…)^(-1) to (a^(-1)\*b^(-1)\*c^(-1)_d^(-1)_…) which would work with an arbitrary number of arguments. I would really appreciate it if you could give me some hints.

---

<div class="post-metadata">

**Author:** ![Domenico\_Lahaye](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/domenico_lahaye/32/203728_2.png) [@Domenico\_Lahaye](https://discourse.julialang.org/u/Domenico_Lahaye)\
**Post date:** [December 12, 2024, 9:36pm UTC](https://discourse.julialang.org/t/rewrite-rule-to-transform-a-b-c-d-1-to-a-1-b-1-c-1-d-1/114569/2 "2024-12-12T21:36:43Z")

</div>

Has this ever got answered? Thx.

---

<div class="post-metadata">

**Author:** ![j\_verzani](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/j_verzani/32/8551_2.png) [@j\_verzani](https://discourse.julialang.org/u/j_verzani)\
**Post date:** [December 13, 2024, 4:41pm UTC](https://discourse.julialang.org/t/rewrite-rule-to-transform-a-b-c-d-1-to-a-1-b-1-c-1-d-1/114569/3 "2024-12-13T16:41:54Z")

</div>

Is this what is being asked, if not it can be modified: [SymbolicUtils.jl/src/simplify\_rules.jl at 59e3aa6ae3a7d97672e10089e502e8c03979e8fb · JuliaSymbolics/SymbolicUtils.jl · GitHub](https://github.com/JuliaSymbolics/SymbolicUtils.jl/blob/59e3aa6ae3a7d97672e10089e502e8c03979e8fb/src/simplify_rules.jl#L47)
