(************************************************************************) (* v * The Coq Proof Assistant / The Coq Development Team *) (* t | _ => NotConstant end. Ltac isZpow_coef t := match t with | Zpos ?p => isPcst p | Z0 => true | _ => false end. Definition N_of_Z x := match x with | Zpos p => Npos p | _ => N0 end. Ltac Zpow_tac t := match isZpow_coef t with | true => constr:(N_of_Z t) | _ => constr:(NotConstant) end. Ltac Zpower_neg := repeat match goal with | [|- ?G] => match G with | context c [Zpower _ (Zneg _)] => let t := context c [Z0] in change t end end. Add Ring Zr : Zth (decidable Zeqb_ok, constants [Zcst], preprocess [Zpower_neg;unfold Zsucc], power_tac Zpower_theory [Zpow_tac]).