Lemma isdeceqhzmodp ( p : hz ) ( x : hzneq 0 p ) : isdeceq ( hzmodp p x ). Proof. intros. apply ( isdeceqsetquot ( hzmodisringeqrel p x ) ). intros a b. unfold isdecprop. - destruct ( isdeceqhz ( hzremaindermod p x a ) ( hzremaindermod p x b ) ) as [ l | r ]. + unfold hzmodisringeqrel. simpl. split. * apply ii1. assumption. * apply isasethz. + unfold hzmodisringeqrel. simpl. split. * apply ii2. assumption. * apply isasethz. Defined.
Require Import UniMath.PAdics.lemmas. Require Import UniMath.NumberSystems.Integers. Require Import UniMath.Foundations.Preamble.