egglog 2.0.0

egglog is a language that combines the benefits of equality saturation and datalog. It can be used for analysis, optimization, and synthesis of programs. It is the successor to the popular rust library egg.
Documentation
(datatype Math
    (Add Math Math)
    (Sub Math Math)
    (Const i64)
    (Var String))

(rewrite (Add a b) (Add (Add a b) (Const 0)))

(rewrite (Add a b) (Add b a))


(rewrite (Add a (Add b c))
      (Add (Add a b) c))

(let $two 2)
(let $start1 (Add (Var "x") (Const $two)))
;; add original proofs

(run 3)


(check (!= (Var "x") (Const $two)))
(check (= (Add (Var "x") (Const $two))
          (Add (Const $two) (Var "x"))))

(let $zero (Const 0))
(let $addx2 (Add (Var "x") (Const $two)))
(let $addx20 (Add $addx2 $zero))
(let $addzerofront (Add (Add $zero (Var "x")) (Const $two)))

(check (= $addx2
          $addx20))