Define a rule for FGL to use in merging IF branches
Usage:
(fgl::def-fgl-branch-merge my-branch-merge-rule (implies (and (syntaxp (integerp m)) (integerp m)) (equal (if cond (logcons b n) m) (logcons (if cond b (logcar m)) (if cond n (logcdr m))))) :hints ...)
This form creates an ACL2 theorem with :rule-classes nil and installs it in a table that FGL references when attempting to merge branches of an IF term.
Branch merge rules work similarly to normal rewrite rules, except that:
Function:
(defun def-fgl-branch-merge-fn (name body hints otf-flg) (cons 'progn (cons (cons 'defthmd (cons name (cons body (cons ':hints (cons hints (cons ':otf-flg (cons otf-flg 'nil))))))) (cons (cons 'add-fgl-branch-merge (cons name 'nil)) 'nil))))