use crate::opt::lang::MathLang;
use egg::{Rewrite, rewrite as rw};

pub fn rules() -> Vec<Rewrite<MathLang, ()>> {
    vec![
        rw!("fuse-exp-sigmoid"; "(sigmoid (exp ?x))" => "(exp_sigmoid ?x)"),
        rw!("unfuse-exp-sigmoid"; "(exp_sigmoid ?x)" => "(sigmoid (exp ?x))"),
        rw!("fuse-sigmoid-log"; "(log (sigmoid ?x))" => "(sigmoid_log ?x)"),
        rw!("unfuse-sigmoid-log"; "(sigmoid_log ?x)" => "(log (sigmoid ?x))"),
    ]
}
