@@ -338,7 +338,10 @@ Reserved Notation "[ 'f' 'setval' x : A | P ]"
338338Reserved Notation "[ 'f' 'setval' x : A | P & Q ]"
339339 (at level 0, x at level 99, format "[ 'f' 'setval' x : A | P & Q ]").
340340
341- Reserved Notation "{fmap T }" (at level 0, format "{fmap T }").
341+ Reserved Notation "{ 'fmap' K -> T }"
342+ (at level 0, K at level 98, T at level 99, format "{ 'fmap' K -> T }").
343+ Reserved Notation "[ 'fmap' 'of' K -> T ]"
344+ (at level 0, K at level 98, T at level 99, format "[ 'fmap' 'of' K -> T ]").
342345Reserved Notation "x .[ k <- v ]"
343346 (left associativity, format "x .[ k <- v ]").
344347Reserved Notation "x .[~ k ]" (format "x .[~ k ]").
@@ -476,12 +479,16 @@ Structure finSet : Type := mkFinSet {
476479 _ : canonical_keys enum_fset
477480}.
478481
482+ #[deprecated(since="finmap 2.3.0", note="Use finSet instead")]
479483Definition finset_of (_ : phant K) := finSet.
480484
481485End Def.
482486
487+ Arguments finSet K%type_scope.
488+
489+ #[warning="-deprecated-reference"]
483490Identity Coercion type_of_finset : finset_of >-> finSet.
484- Notation "{fset T }" := (@finset_of _ (Phant T) ) : type_scope.
491+ Notation "{fset T }" := (finSet T ) : type_scope.
485492
486493Definition pred_of_finset (K : choiceType)
487494 (f : finSet K) : pred K := fun k => k \in (enum_fset f).
@@ -547,6 +554,7 @@ Proof. by rewrite cardE enum_fsetE size_map. Qed.
547554
548555End FinTypeSet.
549556
557+ #[warning="-deprecated-reference"]
550558Identity Coercion finSet_sub_type : finset_of >-> finSet.
551559Coercion fset_sub_type : finSet >-> predArgType.
552560#[global] Hint Resolve fsvalP fset_uniq mem_fset_sub_enum : core.
@@ -635,6 +643,7 @@ Definition mkFinPredType_of (T : eqType) (U : Type) :=
635643 @FinPredType T U a (exist _ fpred_seq
636644 (fpred_seq_uniq, (mkFinPredType_of_subproof fpred_seqE))).
637645
646+ #[deprecated(since="finmap 2.3.0", note="Use the reverse coercion instead.")]
638647Definition clone_finpredType (T : eqType) (U : Type ) :=
639648 fun (pT : finpredType T) & finpred_sort pT -> U =>
640649 fun a pP (pT' := @FinPredType T U a pP) & phant_id pT' pT => pT'.
@@ -672,6 +681,7 @@ Canonical fin_finpred (T : eqType) (pT : finpredType T) (p : pT) :=
672681 @FinPred _ _ p (@IsFinite _ _ (enum_finpred p)
673682 (enum_finpred_uniq p) (enum_finpredE p)).
674683
684+ #[deprecated(since="finmap 2.3.0", note="Use the reverse coercion instead.")]
675685Definition finpred_of (T : eqType) (pT : predType T) (p : pT)
676686 (fp : finpred pT) & phantom pT fp : finpred pT := fp.
677687
@@ -691,6 +701,7 @@ Lemma enum_finmemE (T : eqType) (p : finmempred T) :
691701 enum_finmem p =i p.
692702Proof . by case: p => ?[]. Qed .
693703
704+ #[deprecated(since="finmap 2.3.0", note="Use the reverse coercion instead.")]
694705Definition finmempred_of (T : eqType) (P : pred T)
695706 (mP : finmempred T) & phantom (mem_pred T) mP : finmempred T := mP.
696707
@@ -700,6 +711,8 @@ Canonical mem_fin (T : eqType) (pT : predType T) (p : finpred pT) :=
700711
701712End FinPredStruct.
702713
714+ #[deprecated(since="finmap 2.3.0", note="Use the reverse coercion instead."),
715+ warning="-deprecated"]
703716Notation "[ 'finpredType' 'of' T ]" := (@clone_finpredType _ T _ id _ _ id)
704717 (at level 0, format "[ 'finpredType' 'of' T ]") : form_scope.
705718
@@ -735,22 +748,19 @@ End CanonicalFinPred.
735748
736749Local Notation imfset_def key :=
737750 (fun (T K : choiceType) (f : T -> K) (p : finmempred T)
738- of phantom (mem_pred T) p => seq_fset key [seq f x | x <- enum_finmem p]).
751+ => seq_fset key [seq f x | x <- enum_finmem p]).
739752Local Notation imfset2_def key :=
740753 (fun (K T1 : choiceType) (T2 : T1 -> choiceType)
741754 (f : forall x : T1, T2 x -> K)
742- (p1 : finmempred T1) (p2 : forall x : T1, finmempred (T2 x))
743- of phantom (mem_pred T1) p1 & phantom (forall x, mem_pred (T2 x)) p2 =>
755+ (p1 : finmempred T1) (p2 : forall x : T1, finmempred (T2 x)) =>
744756 seq_fset key [seq f x y | x <- enum_finmem p1, y <- enum_finmem (p2 x)]).
745757
746758Module Type ImfsetSig.
747759Parameter imfset : forall (key : unit) (T K : choiceType)
748- (f : T -> K) (p : finmempred T),
749- phantom (mem_pred T) p -> {fset K}.
760+ (f : T -> K) (p : finmempred T), {fset K}.
750761Parameter imfset2 : forall (key : unit) (K T1 : choiceType)
751762 (T2 : T1 -> choiceType)(f : forall x : T1, T2 x -> K)
752- (p1 : finmempred T1) (p2 : forall x : T1, finmempred (T2 x)),
753- phantom (mem_pred T1) p1 -> phantom (forall x, mem_pred (T2 x)) p2 -> {fset K}.
763+ (p1 : finmempred T1) (p2 : forall x : T1, finmempred (T2 x)), {fset K}.
754764Axiom imfsetE : forall key, imfset key = imfset_def key.
755765Axiom imfset2E : forall key, imfset2 key = imfset2_def key.
756766End ImfsetSig.
@@ -762,11 +772,8 @@ Lemma imfsetE key : imfset key = imfset_def key. Proof. by []. Qed.
762772Lemma imfset2E key : imfset2 key = imfset2_def key. Proof . by []. Qed .
763773End Imfset.
764774
765- Notation imfset key f p :=
766- (Imfset.imfset key f (Phantom _ (pred_of_finmempred p))).
767- Notation imfset2 key f p q :=
768- (Imfset.imfset2 key f (Phantom _ (pred_of_finmempred p))
769- (Phantom _ (fun x => (pred_of_finmempred (q x))))).
775+ Notation imfset := Imfset.imfset.
776+ Notation imfset2 := Imfset.imfset2.
770777Canonical imfset_unlock k := Unlockable (Imfset.imfsetE k).
771778Canonical imfset2_unlock k := Unlockable (Imfset.imfset2E k).
772779
@@ -776,11 +783,9 @@ Notation "A `==` B" := (A == B :> {fset _}) (only parsing) : fset_scope.
776783Notation "A `!=` B" := (A != B :> {fset _}) (only parsing) : fset_scope.
777784Notation "A `=P` B" := (A =P B :> {fset _}) (only parsing) : fset_scope.
778785
779- Notation "f @`[ key ] A" :=
780- (Imfset.imfset key f (Phantom _ (mem A))) : fset_scope.
786+ Notation "f @`[ key ] A" := (Imfset.imfset key f (mem A)) : fset_scope.
781787Notation "f @2`[ key ] ( A , B )" :=
782- (Imfset.imfset2 key f (Phantom _ (mem A)) (Phantom _ (fun x => (mem (B x)))))
783- : fset_scope.
788+ (Imfset.imfset2 key f (mem A) (fun x => (mem (B x)))) : fset_scope.
784789
785790Fact imfset_key : unit. Proof . exact: tt. Qed .
786791
@@ -2984,14 +2989,17 @@ Record finMap : Type := FinMap {
29842989 ffun_of_fmap :> {ffun domf -> V}
29852990}.
29862991
2992+ #[deprecated(since="finmap 2.3.0", note="Use finMap instead.")]
29872993Definition finmap_of (_ : phant (K -> V)) := finMap.
29882994
29892995Let T_ (domf : {fset K}) := {ffun domf -> V}.
29902996Local Notation finMap' := {domf : _ & T_ domf}.
29912997
29922998End DefMap.
29932999
2994- Notation "{fmap T }" := (@finmap_of _ _ (Phant T)) : type_scope.
3000+ Arguments finMap K%type_scope V%type_scope.
3001+
3002+ Notation "{ 'fmap' K -> T }" := (finMap K T) : type_scope.
29953003
29963004Definition pred_of_finmap (K : choiceType) (V : Type )
29973005 (f : {fmap K -> V}) : pred K := mem (domf f).
@@ -3045,7 +3053,8 @@ Arguments fmap0 {K V}.
30453053Arguments setf : simpl never.
30463054Arguments fnd : simpl never.
30473055
3048- Notation "[ 'fmap' 'of' T ]" := (fmap0 : {fmap T}) (only parsing) : fmap_scope.
3056+ Notation "[ 'fmap' 'of' K -> T ]" :=
3057+ (fmap0 : {fmap K -> T}) (only parsing) : fmap_scope.
30493058Notation "[fmap]" := fmap0 : fmap_scope.
30503059Notation "x .[ k <- v ]" := (setf x k v) : fmap_scope.
30513060Notation "f .[? k ]" := (fnd f k) : fmap_scope.
0 commit comments