addX' c v Q := match Q with | Pconst d => PX (Pconst c) v Q | PX Q1 w Q2 => match v ?= w with | LT => PX Q1 w (addX' c v Q2) | EQ => PX (addC c Q1) v Q2 | GT => PX (Pconst c) v Q end end.
Require Import Import Quoting.