proposition: Lemma PaddXPX: forall P i n Q, PaddX Padd P i n Q = match Q with | Pc c => mkPX P i n Q | PX P' i' n' Q' => match Pos.compare i i' with | Gt => mkPX P i n Q | Lt => mkPX P' i' n' (PaddX Padd P i n Q') | Eq => match Z.pos_sub n n' with | Zpos k => mkPX (PaddX Padd P i k P') i' n' Q' | Z0 => mkPX (Padd P P') i n Q' | Zneg k => mkPX (Padd P (mkPX P' i k P0)) i n Q' end end end.
proof: Proof. induction Q; reflexivity. Qed.
imports: Setoid BinList BinPos BinNat BinInt Ring_polynom Ncring