pub fn substitute_operations(
    operations: Vec<Term>,
    normal_form: &mut NormalForm,
    defs: &mut Defs<Term>
) -> Result<Vec<Term>, Error>