The Promise of P-Graphs

In Herbie we use e-graphs to do algebraic rewriting of mathematical expressions. For example, in the Rust standard library's acosh function , e-graphs rewrite log(sqrt(x^2 + 1)) &#x2026; into log(1 + sqrt(x^2 + 1) - 1) into log1p(sqrt(x^2 + 1) - 1) into log1p(x^2 / (sqrt(x^2 + 1) + 1)) into log1p(x / (sqrt(1 + (1/x)^2) + (1/x))) , Still, they're bad at some things, and one that really stands out…