<div dir="ltr"><div style="font-family:arial,sans-serif;font-size:10px">Hi,</div><div style="font-family:arial,sans-serif;font-size:10px"><br>I am implementing an arithmetic system for only Boolean variables based on GiNaC. May I know how I can<br>
</div><div style="font-family:arial,sans-serif;font-size:10px">modify the behaviour of symbolic multiplication such that: x*x == x (instead of x*x==x^2), and the multiplication of numeric remains unchanged (eg 3*4 == 12) ?</div>
<div style="font-family:arial,sans-serif;font-size:10px"><br></div><div style="font-family:arial,sans-serif;font-size:10px">Using subs(x^2 == x) works but I found it is slow if my expressions are huge and there are many symbols.</div>
<div style="font-family:arial,sans-serif;font-size:10px"><br></div><div style="font-family:arial,sans-serif;font-size:10px">Thank you very much.</div><div style="font-family:arial,sans-serif;font-size:10px"><br></div><div style="font-family:arial,sans-serif;font-size:10px">
Best regards,</div><div style="font-family:arial,sans-serif;font-size:10px">argama</div></div>