HOL icon indicating copy to clipboard operation
HOL copied to clipboard

Make simp right-normalises list append

Open ordinarymath opened this issue 5 months ago • 2 comments

Currently list append is by default normalized left i.e. xs ++ (ys ++ zs) = (xs ++ ys) ++ zs This issue is about making it the opposite i.e. (xs ++ ys) ++ zs = xs ++ (ys ++ zs) Currently there is work in progress is in branch cons_append_norm

ordinarymath avatar Aug 07 '25 16:08 ordinarymath

Actually, the branch is cons-append-norm (hyphens, not underscores).

mn200 avatar Aug 08 '25 00:08 mn200

As per work done in ad11e1b42fe716e, it's not so clear to me that we need to right-associate. Instead, we can just add one extra rewrite

(xs ++ (h::t)) ++ ys = xs ++ h::(t ++ ys)

and get a normalising, left-associated, confluent system.

mn200 avatar Sep 04 '25 07:09 mn200