egglog 3.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
; Test that primitives can have other primitives as arguments,
; but constructor/function calls get extracted

(datatype Math
  (Const i64)
  (Add Math Math)
  (Mul Math Math))

(relation MathU (Math))

(rule ((MathU (Const a))
       (> (+ a 1) 5))
      ((MathU (Add (Const a) (Const 1)))))

(MathU (Const 5))
(run 3)

; Check that the rules fired
(prove (MathU (Add (Const 5) (Const 1))))