Infix "+" := Pos.add : positive_scope.Infix "-" := Pos.sub : positive_scope.Infix "*" := Pos.mul : positive_scope.Infix "^" := Pos.pow : positive_scope.Infix "?=" := Pos.compare (at level 70, no associativity) : positive_scope.Infix "=?" := Pos.eqb (at level 70, no associativity) : positive_scope.Infix "<=?" := Pos.leb (at level 70, no associativity) : positive_scope.Infix "<?" := Pos.ltb (at level 70, no associativity) : positive_scope.Notation "( p | q )" := (Pos.divide p q) (at level 0) : positive_scope.(** Compatibility notations *)

Notation positive := positive (only parsing).Notation positive_rect := positive_rect (only parsing).Notation positive_rec := positive_rec (only parsing).Notation positive_ind := positive_ind (only parsing).Notation xI := xI (only parsing).Notation xO := xO (only parsing).Notation xH := xH (only parsing).Notation IsNul := Pos.IsNul (only parsing).Notation IsPos := Pos.IsPos (only parsing).Notation IsNeg := Pos.IsNeg (only parsing).Notation Pplus := Pos.add (only parsing).Notation Pplus_carry := Pos.add_carry (only parsing).Notation Pmult_nat := (Pos.iter_op plus) (only parsing).Notation nat_of_P := Pos.to_nat (only parsing).Notation P_of_succ_nat := Pos.of_succ_nat (only parsing).Notation Pdouble_minus_one := Pos.pred_double (only parsing).Notation positive_mask := Pos.mask (only parsing).Notation positive_mask_rect := Pos.mask_rect (only parsing).Notation positive_mask_ind := Pos.mask_ind (only parsing).Notation positive_mask_rec := Pos.mask_rec (only parsing).Notation Pdouble_plus_one_mask := Pos.succ_double_mask (only parsing).Notation Pdouble_minus_two := Pos.double_pred_mask (only parsing).Notation Pminus_mask := Pos.sub_mask (only parsing).Notation Pminus_mask_carry := Pos.sub_mask_carry (only parsing).Notation Pminus := Pos.sub (only parsing).Notation Pmult := Pos.mul (only parsing).Notation iter_pos := @Pos.iter (only parsing).Notation Psize := Pos.size_nat (only parsing).Notation Psize_pos := Pos.size (only parsing).Notation Pcompare x y m := (Pos.compare_cont m x y) (only parsing).Notation positive_eq_dec := Pos.eq_dec (only parsing).Notation xI_succ_xO := Pos.xI_succ_xO (only parsing).Notation Psucc_o_double_minus_one_eq_xO :=
 Pos.succ_pred_double (only parsing).Notation Pdouble_minus_one_o_succ_eq_xI :=
 Pos.pred_double_succ (only parsing).Notation xO_succ_permute := Pos.double_succ (only parsing).Notation double_moins_un_xO_discr :=
 Pos.pred_double_xO_discr (only parsing).Notation Psucc_not_one := Pos.succ_not_1 (only parsing).Notation Psucc_pred := Pos.succ_pred_or (only parsing).Notation Pplus_carry_spec := Pos.add_carry_spec (only parsing).Notation Pplus_comm := Pos.add_comm (only parsing).Notation Pplus_succ_permute_r := Pos.add_succ_r (only parsing).Notation Pplus_succ_permute_l := Pos.add_succ_l (only parsing).Notation Pplus_no_neutral := Pos.add_no_neutral (only parsing).Notation Pplus_carry_plus := Pos.add_carry_add (only parsing).Notation Pplus_reg_r := Pos.add_reg_r (only parsing).Notation Pplus_reg_l := Pos.add_reg_l (only parsing).Notation Pplus_carry_reg_r := Pos.add_carry_reg_r (only parsing).Notation Pplus_carry_reg_l := Pos.add_carry_reg_l (only parsing).Notation Pplus_assoc := Pos.add_assoc (only parsing).Notation Pplus_xO := Pos.add_xO (only parsing).Notation Pplus_xI_double_minus_one := Pos.add_xI_pred_double (only parsing).Notation Pplus_xO_double_minus_one := Pos.add_xO_pred_double (only parsing).Notation Pplus_diag := Pos.add_diag (only parsing).Notation PeanoView := Pos.PeanoView (only parsing).Notation PeanoOne := Pos.PeanoOne (only parsing).Notation PeanoSucc := Pos.PeanoSucc (only parsing).Notation PeanoView_rect := Pos.PeanoView_rect (only parsing).Notation PeanoView_ind := Pos.PeanoView_ind (only parsing).Notation PeanoView_rec := Pos.PeanoView_rec (only parsing).Notation peanoView_xO := Pos.peanoView_xO (only parsing).Notation peanoView_xI := Pos.peanoView_xI (only parsing).Notation peanoView := Pos.peanoView (only parsing).Notation PeanoView_iter := Pos.PeanoView_iter (only parsing).Notation eq_dep_eq_positive := Pos.eq_dep_eq_positive (only parsing).Notation PeanoViewUnique := Pos.PeanoViewUnique (only parsing).Notation Prect := Pos.peano_rect (only parsing).Notation Prect_succ := Pos.peano_rect_succ (only parsing).Notation Prect_base := Pos.peano_rect_base (only parsing).Notation Prec := Pos.peano_rec (only parsing).Notation Pind := Pos.peano_ind (only parsing).Notation Pcase := Pos.peano_case (only parsing).Notation Pmult_1_r := Pos.mul_1_r (only parsing).Notation Pmult_Sn_m := Pos.mul_succ_l (only parsing).Notation Pmult_xO_permute_r := Pos.mul_xO_r (only parsing).Notation Pmult_xI_permute_r := Pos.mul_xI_r (only parsing).Notation Pmult_comm := Pos.mul_comm (only parsing).Notation Pmult_plus_distr_l := Pos.mul_add_distr_l (only parsing).Notation Pmult_plus_distr_r := Pos.mul_add_distr_r (only parsing).Notation Pmult_assoc := Pos.mul_assoc (only parsing).Notation Pmult_xI_mult_xO_discr := Pos.mul_xI_mul_xO_discr (only parsing).Notation Pmult_xO_discr := Pos.mul_xO_discr (only parsing).Notation Pmult_reg_r := Pos.mul_reg_r (only parsing).Notation Pmult_reg_l := Pos.mul_reg_l (only parsing).Notation Pmult_1_inversion_l := Pos.mul_eq_1_l (only parsing).Notation iter_pos_swap_gen := Pos.iter_swap_gen (only parsing).Notation iter_pos_swap := Pos.iter_swap (only parsing).Notation iter_pos_succ := Pos.iter_succ (only parsing).Notation iter_pos_plus := Pos.iter_add (only parsing).Notation iter_pos_invariant := Pos.iter_invariant (only parsing).Notation Pcompare_refl_id := Pos.compare_cont_refl (only parsing).Notation Pcompare_eq_iff := Pos.compare_eq_iff (only parsing).Notation Pcompare_Gt_Lt := Pos.compare_cont_Gt_Lt (only parsing).Notation Pcompare_eq_Lt := Pos.compare_lt_iff (only parsing).Notation Pcompare_Lt_Gt := Pos.compare_cont_Lt_Gt (only parsing).Notation Pcompare_antisym := Pos.compare_cont_antisym (only parsing).Notation ZC1 := Pos.gt_lt (only parsing).Notation ZC2 := Pos.lt_gt (only parsing).Notation Pcompare_p_Sp := Pos.lt_succ_diag_r (only parsing).Notation Pcompare_1 := Pos.nlt_1_r (only parsing).Notation Plt_1 := Pos.nlt_1_r (only parsing).Notation Pplus_compare_mono_l := Pos.add_compare_mono_l (only parsing).Notation Pplus_compare_mono_r := Pos.add_compare_mono_r (only parsing).Notation Pplus_lt_mono_l := Pos.add_lt_mono_l (only parsing).Notation Pplus_lt_mono_r := Pos.add_lt_mono_r (only parsing).Notation Pplus_lt_mono := Pos.add_lt_mono (only parsing).Notation Pplus_le_mono_l := Pos.add_le_mono_l (only parsing).Notation Pplus_le_mono_r := Pos.add_le_mono_r (only parsing).Notation Pplus_le_mono := Pos.add_le_mono (only parsing).Notation Pmult_compare_mono_l := Pos.mul_compare_mono_l (only parsing).Notation Pmult_compare_mono_r := Pos.mul_compare_mono_r (only parsing).Notation Pmult_lt_mono_l := Pos.mul_lt_mono_l (only parsing).Notation Pmult_lt_mono_r := Pos.mul_lt_mono_r (only parsing).Notation Pmult_lt_mono := Pos.mul_lt_mono (only parsing).Notation Pmult_le_mono_l := Pos.mul_le_mono_l (only parsing).Notation Pmult_le_mono_r := Pos.mul_le_mono_r (only parsing).Notation Pmult_le_mono := Pos.mul_le_mono (only parsing).Notation Plt_plus_r := Pos.lt_add_r (only parsing).Notation Plt_not_plus_l := Pos.lt_not_add_l (only parsing).Notation Pminus_mask_succ_r := Pos.sub_mask_succ_r (only parsing).Notation Pminus_mask_carry_spec := Pos.sub_mask_carry_spec (only parsing).Notation Pminus_succ_r := Pos.sub_succ_r (only parsing).Notation Pminus_mask_diag := Pos.sub_mask_diag (only parsing).Notation Pplus_minus_eq := Pos.add_sub (only parsing).Notation Pmult_minus_distr_l := Pos.mul_sub_distr_l (only parsing).Notation Pminus_lt_mono_l := Pos.sub_lt_mono_l (only parsing).Notation Pminus_compare_mono_l := Pos.sub_compare_mono_l (only parsing).Notation Pminus_compare_mono_r := Pos.sub_compare_mono_r (only parsing).Notation Pminus_lt_mono_r := Pos.sub_lt_mono_r (only parsing).Notation Pminus_decr := Pos.sub_decr (only parsing).Notation Pminus_xI_xI := Pos.sub_xI_xI (only parsing).Notation Pplus_minus_assoc := Pos.add_sub_assoc (only parsing).Notation Pminus_plus_distr := Pos.sub_add_distr (only parsing).Notation Pminus_minus_distr := Pos.sub_sub_distr (only parsing).Notation Pminus_mask_Lt := Pos.sub_mask_neg (only parsing).Notation Pminus_Lt := Pos.sub_lt (only parsing).Notation Pminus_Eq := Pos.sub_diag (only parsing).Notation Psize_monotone := Pos.size_nat_monotone (only parsing).Notation Psize_pos_gt := Pos.size_gt (only parsing).Notation Psize_pos_le := Pos.size_le (only parsing).

Lemma Pplus_minus : forall p q, p > q -> q+(p-q) = p.