diff --git a/theories/base.v b/theories/base.v index b74ca0552e6049f8f185f98c5f60fcfd0ee6c9e4..1295da6af5f503a34b5ab16bbf06d882c48c1eb4 100644 --- a/theories/base.v +++ b/theories/base.v @@ -887,25 +887,14 @@ Notation "(≫= f )" := (mbind f) (only parsing) : stdpp_scope. Notation "(≫=)" := (λ m f, mbind f m) (only parsing) : stdpp_scope. Notation "x ↠y ; z" := (y ≫= (λ x : _, z)) - (at level 100, only parsing, right associativity) : stdpp_scope. + (at level 20, y at level 100, z at level 200, only parsing) : stdpp_scope. + +Notation "' x1 .. xn ↠y ; z" := (y ≫= (λ x1, .. (λ xn, z) .. )) + (at level 20, x1 binder, xn binder, y at level 100, z at level 200, + only parsing, right associativity) : stdpp_scope. Infix "<$>" := fmap (at level 61, left associativity) : stdpp_scope. -Notation "' ( x1 , x2 ) ↠y ; z" := - (y ≫= (λ x : _, let ' (x1, x2) := x in z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. -Notation "' ( x1 , x2 , x3 ) ↠y ; z" := - (y ≫= (λ x : _, let ' (x1,x2,x3) := x in z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. -Notation "' ( x1 , x2 , x3 , x4 ) ↠y ; z" := - (y ≫= (λ x : _, let ' (x1,x2,x3,x4) := x in z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. -Notation "' ( x1 , x2 , x3 , x4 , x5 ) ↠y ; z" := - (y ≫= (λ x : _, let ' (x1,x2,x3,x4,x5) := x in z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. -Notation "' ( x1 , x2 , x3 , x4 , x5 , x6 ) ↠y ; z" := - (y ≫= (λ x : _, let ' (x1,x2,x3,x4,x5,x6) := x in z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. Notation "x ;; z" := (x ≫= λ _, z) (at level 100, z at level 200, only parsing, right associativity): stdpp_scope. @@ -918,9 +907,9 @@ Class MGuard (M : Type → Type) := mguard: ∀ P {dec : Decision P} {A}, (P → M A) → M A. Arguments mguard _ _ _ !_ _ _ / : assert. Notation "'guard' P ; z" := (mguard P (λ _, z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. + (at level 20, z at level 200, only parsing, right associativity) : stdpp_scope. Notation "'guard' P 'as' H ; z" := (mguard P (λ H, z)) - (at level 100, z at level 200, only parsing, right associativity) : stdpp_scope. + (at level 20, z at level 200, only parsing, right associativity) : stdpp_scope. (** * Operations on maps *) (** In this section we define operational type classes for the operations diff --git a/theories/gmultiset.v b/theories/gmultiset.v index 8d84b49ef7a741ef98705482e66207d9819f7b98..a3ed60e826e0f1c6498993495c661c958bbdafcb 100644 --- a/theories/gmultiset.v +++ b/theories/gmultiset.v @@ -27,7 +27,7 @@ Section definitions. multiplicity x X ≤ multiplicity x Y. Global Instance gmultiset_elements : Elements A (gmultiset A) := λ X, - let (X) := X in '(x,n) ↠map_to_list X; replicate (S n) x. + let (X) := X in ''(x,n) ↠map_to_list X; replicate (S n) x. Global Instance gmultiset_size : Size (gmultiset A) := length ∘ elements. Global Instance gmultiset_empty : Empty (gmultiset A) := GMultiSet ∅. diff --git a/theories/numbers.v b/theories/numbers.v index 80975a32a23d419adb4864276f2cbd16dab7ec70..dff4886cbd9c942b96419e5382a6d061d6a2be4c 100644 --- a/theories/numbers.v +++ b/theories/numbers.v @@ -534,11 +534,12 @@ Definition Qp_minus (x y : Qp) : option Qp := match decide (0 < z)%Qc with left Hz => Some (mk_Qp z Hz) | _ => None end. Program Definition Qp_mult (x y : Qp) : Qp := mk_Qp (x * y) _. Next Obligation. intros x y. apply Qcmult_pos_pos; apply Qp_prf. Qed. -Program Definition Qp_div (x : Qp) (y : positive) : Qp := mk_Qp (x / ('y)%Z) _. + +Program Definition Qp_div (x : Qp) (y : positive) : Qp := mk_Qp (x / Zpos y) _. Next Obligation. - intros x y. assert (0 < ('y)%Z)%Qc. - { apply (Z2Qc_inj_lt 0%Z (' y)), Pos2Z.is_pos. } - by rewrite (Qcmult_lt_mono_pos_r _ _ ('y)%Z), Qcmult_0_l, + intros x y. assert (0 < Zpos y)%Qc. + { apply (Z2Qc_inj_lt 0%Z (Zpos y)), Pos2Z.is_pos. } + by rewrite (Qcmult_lt_mono_pos_r _ _ (Zpos y)%Z), Qcmult_0_l, <-Qcmult_assoc, Qcmult_inv_l, Qcmult_1_r. Qed.