fact
string | type
string | library
string | imports
list | filename
string | symbolic_name
string | docstring
string |
|---|---|---|---|---|---|---|
PredType : forall T pT, (pT -> pred T) -> predType T. exact PredType || exact mkPredType. Defined. Arguments PredType [T pT] toP. Local Notation predOfType T := (pred_of_simpl (@pred_of_argType T)).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
PredType
| |
oextract (T : Type) (o : option T) : o -> T := if o is Some t return o -> T then fun=> t else False_rect T \o notF.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
oextract
| |
oextractE (T : Type) (x : T) (xP : Some x) : oextract xP = x. Proof. by []. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
oextractE
| |
Some_oextract T (x : option T) (x_ex : x) : Some (oextract x_ex) = x. Proof. by case: x x_ex. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
Some_oextract
| |
ojoin T (x : option (option T)) := if x is Some y then y else None.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
ojoin
| |
Some_ojoin T (x : option (option T)) : x -> Some (ojoin x) = x. Proof. by case : x. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
Some_ojoin
| |
ojoinT T (x : option (option T)) : ojoin x -> x. Proof. by case: x. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
ojoinT
| |
TaggedP (T1 : Type) (T2 : T1 -> Type) (P : forall x, T2 x -> Type) : (forall t : {x : T1 & T2 x}, P _ (tagged t)) -> forall (x : T1) (y : T2 x), P x y. Proof. by move=> /(_ (Tagged _ _)). Qed. Arguments TaggedP {T1} T2.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
TaggedP
| |
f : seq K -> seq K.
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
f
| |
perm : forall s, perm_eq (f s) (undup s).
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
perm
| |
uniq : forall s, uniq (f s).
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
uniq
| |
E : forall (s : seq K), f s =i s.
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
E
| |
eq : forall (s s' : seq K), s =i s' <-> f s = f s'.
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
eq
| |
f (s : seq K) := choose (perm_eq (undup s)) (undup s).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
f
| |
perm s : perm_eq (f s) (undup s). Proof. by rewrite perm_sym chooseP. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
perm
| |
uniq s : uniq (f s). Proof. by rewrite (perm_uniq (perm _)) undup_uniq. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
uniq
| |
E (s : seq K) : f s =i s. Proof. by move=> x; rewrite (perm_mem (perm _)) mem_undup. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
E
| |
eq (s s' : seq K) : s =i s' <-> f s = f s'. Proof. split=> [eq_ss'|eq_ss' k]; last by rewrite -E eq_ss' E. rewrite /f; have peq_ss' : perm_eq (undup s) (undup s'). by apply: uniq_perm; rewrite ?undup_uniq // => x; rewrite !mem_undup. rewrite (@choose_id _ _ _ (undup s')) //=; apply: eq_choose => x /=. by apply: sym_left_transitive; [exact: perm_sym | exact: (@perm_trans)|]. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
eq
| |
sort_keys := SortKeys.f.
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keys
| |
sort_keys_perm := SortKeys.perm.
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keys_perm
| |
sort_keys_uniq := SortKeys.uniq.
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keys_uniq
| |
sort_keysE := SortKeys.E.
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keysE
| |
eq_sort_keys := SortKeys.eq.
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
eq_sort_keys
| |
mem_sort_keys ks k : k \in ks -> k \in sort_keys ks. Proof. by rewrite sort_keysE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mem_sort_keys
| |
mem_sort_keys_intro ks k : k \in sort_keys ks -> k \in ks. Proof. by rewrite sort_keysE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mem_sort_keys_intro
| |
sort_keys_nil : sort_keys [::] = [::] :> seq K. Proof. have := sort_keysE ([::] : seq K). by case: sort_keys => //= a l /(_ a); rewrite mem_head. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keys_nil
| |
sort_keys_id ks : sort_keys (sort_keys ks) = sort_keys ks. Proof. by have /eq_sort_keys := sort_keysE ks. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
sort_keys_id
| |
canonical_keys ks := sort_keys ks == ks.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
canonical_keys
| |
canonical_uniq ks : canonical_keys ks -> uniq ks. Proof. by move=> /eqP <-; exact: sort_keys_uniq. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
canonical_uniq
| |
canonical_sort_keys ks : canonical_keys (sort_keys ks). Proof. by rewrite /canonical_keys sort_keys_id. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
canonical_sort_keys
| |
canonical_eq_keys ks ks' : canonical_keys ks -> canonical_keys ks' -> ks =i ks' -> ks = ks'. Proof. move=> /eqP; case: _ /; move=> /eqP; case: _ / => eq_ks_ks'. by apply/eq_sort_keys => x; rewrite -sort_keysE eq_ks_ks' sort_keysE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
canonical_eq_keys
| |
size_sort_keys ks : size (sort_keys ks) = size (undup ks). Proof. exact: perm_size. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
size_sort_keys
| |
finset_of (_ : phant K) := finSet.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
finset_of
| |
pred_of_finset (K : choiceType) (f : finSet K) : pred K := fun k => k \in (enum_fset f).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
pred_of_finset
| |
finSetPredType (K : choiceType) := PredType (@pred_of_finset K).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
finSetPredType
| |
keys_canonical : canonical_keys (enum_fset A). Proof. by case: A. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
keys_canonical
| |
fset_uniq : uniq (enum_fset A). Proof. by rewrite canonical_uniq // keys_canonical. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_uniq
| |
fset_sub_type : predArgType := FSetSub {fsval : K; fsvalP : in_mem fsval (@mem K _ A)}. HB.instance Definition _ := [isSub for fsval]. HB.instance Definition _ := [Choice of fset_sub_type by <:]. HB.instance Definition _ (T : countType) := [Countable of {fset T} by <:].
|
Record
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_type
| |
fset_sub_enum : seq fset_sub_type := undup (pmap insub (enum_fset A)).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_enum
| |
mem_fset_sub_enum x : x \in fset_sub_enum. Proof. by rewrite mem_undup mem_pmap -valK map_f // fsvalP. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mem_fset_sub_enum
| |
val_fset_sub_enum : map val fset_sub_enum = enum_fset A. Proof. rewrite /fset_sub_enum undup_id ?pmap_sub_uniq ?fset_uniq//. rewrite (pmap_filter (@insubK _ _ _)); apply/all_filterP. by apply/allP => x; rewrite isSome_insub. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
val_fset_sub_enum
| |
fset_sub_pickle x := index x fset_sub_enum.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_pickle
| |
fset_sub_unpickle n := nth None (map some fset_sub_enum) n.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_unpickle
| |
fset_sub_pickleK : pcancel fset_sub_pickle fset_sub_unpickle. Proof. rewrite /fset_sub_unpickle => x. by rewrite (nth_map x) ?nth_index ?index_mem ?mem_fset_sub_enum. Qed. HB.instance Definition _ := Countable.copy fset_sub_type (pcan_type fset_sub_pickleK). HB.instance Definition _ := isFinite.Build fset_sub_type (Finite.uniq_enumP (undup_uniq _) mem_fset_sub_enum).
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_pickleK
| |
enum_fsetE : enum_fset A = [seq val i | i <- enum fset_sub_type]. Proof. by rewrite enumT unlock val_fset_sub_enum. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_fsetE
| |
cardfE : size (enum_fset A) = #|fset_sub_type|. Proof. by rewrite cardE enum_fsetE size_map. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
cardfE
| |
fset_sub_type : finSet >-> predArgType. #[global] Hint Resolve fsvalP fset_uniq mem_fset_sub_enum : core. Declare Scope fset_scope. Delimit Scope fset_scope with fset. Local Open Scope fset_scope.
|
Coercion
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_sub_type
| |
fsetsubE (T : choiceType) (A : {fset T}) (x : A) (xA : val x \in A) : [` xA] = x. Proof. by apply/val_inj => /=. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fsetsubE
| |
fset_predT {T : choiceType} {A : {fset T}} : simpl_pred A := @predT A.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_predT
| |
set_of_fset (K : choiceType) (A : {fset K}) : {set A} := [set x in {: A}]. Arguments pred_of_finset : simpl never.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
set_of_fset
| |
seq_fset : forall K : choiceType, seq K -> {fset K} := locked_with finset_key (fun K s => mkFinSet (@canonical_sort_keys K s)). Variable (K : choiceType) (s : seq K).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
seq_fset
| |
seq_fsetE : seq_fset s =i s. Proof. by move=> a; rewrite [seq_fset]unlock sort_keysE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
seq_fsetE
| |
size_seq_fset : size (seq_fset s) = size (undup s). Proof. by rewrite [seq_fset]unlock /= size_sort_keys. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
size_seq_fset
| |
seq_fset_uniq : uniq (seq_fset s). Proof. by rewrite [seq_fset]unlock /= sort_keys_uniq. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
seq_fset_uniq
| |
seq_fset_perm : perm_eq (seq_fset s) (undup s). Proof. by rewrite [seq_fset]unlock //= sort_keys_perm. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
seq_fset_perm
| |
finpredType_predType (T : eqType) (fpT : finpredType T) := @PredType T (finpred_sort fpT) (@tofinpred T fpT).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
finpredType_predType
| |
enum_finpred (T : eqType) (fpT : finpredType T) : fpT -> seq T := let: FinPredType _ _ (exist s _) := fpT in s.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finpred
| |
enum_finpred_uniq (T : eqType) (fpT : finpredType T) (p : fpT) : uniq (enum_finpred p). Proof. by case: fpT p => ?? [s sE] p; rewrite sE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finpred_uniq
| |
enum_finpredE (T : eqType) (fpT : finpredType T) (p : fpT) : enum_finpred p =i p. Proof. by case: fpT p => ?? [s sE] p x; rewrite sE -topredE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finpredE
| |
mkFinPredType_of_subproof (T : eqType) (pT : predType T) (fpred_seq : pT -> seq T) (pred_fsetE : forall p, fpred_seq p =i p) : forall p x, x \in fpred_seq p = topred p x. Proof. by move=> p x; rewrite topredE pred_fsetE. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mkFinPredType_of_subproof
| |
mkFinPredType_of (T : eqType) (U : Type) := fun (pT : predType T) & pred_sort pT -> U => fun a (pT' := @PredType T U a) & phant_id pT' pT => fun (fpred_seq : pT' -> seq T) (fpred_seq_uniq : forall p, uniq (fpred_seq p)) (fpred_seqE : forall p, fpred_seq p =i p) => @FinPredType T U a (exist _ fpred_seq (fpred_seq_uniq, (mkFinPredType_of_subproof fpred_seqE))).
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mkFinPredType_of
| |
clone_finpredType (T : eqType) (U : Type) := fun (pT : finpredType T) & finpred_sort pT -> U => fun a pP (pT' := @FinPredType T U a pP) & phant_id pT' pT => pT'. Structure is_finite (T : eqType) (P : pred T) := IsFinite { seq_of_is_finite :> seq T; _ : uniq seq_of_is_finite; _ : forall x, x \in seq_of_is_finite = P x; }.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
clone_finpredType
| |
is_finite_uniq (T : eqType) (P : pred T) (p : is_finite P) : uniq p. Proof. by case: p. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
is_finite_uniq
| |
is_finiteE (T : eqType) (P : pred T) (p : is_finite P) x : x \in (seq_of_is_finite p) = P x. Proof. by case: p. Qed. Structure finpred (T : eqType) (pT : predType T) := FinPred { pred_of_finpred :> pT; _ : is_finite [pred x in pred_of_finpred] }.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
is_finiteE
| |
enum_fin (T : eqType) (pT : predType T) (p : finpred pT) : seq T := let: FinPred _ fp := p in fp.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_fin
| |
enum_fin_uniq (T : eqType) (pT : predType T) (p : finpred pT) : uniq (enum_fin p). Proof. by case: p => ?[]. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_fin_uniq
| |
enum_finE (T : eqType) (pT : predType T) (p : finpred pT) : enum_fin p =i (pred_of_finpred p). Proof. by case: p => ?[]. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finE
| |
fin_finpred (T : eqType) (pT : finpredType T) (p : pT) := @FinPred _ _ p (@IsFinite _ _ (enum_finpred p) (enum_finpred_uniq p) (enum_finpredE p)).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fin_finpred
| |
finpred_of (T : eqType) (pT : predType T) (p : pT) (fp : finpred pT) & phantom pT fp : finpred pT := fp. Structure finmempred (T : eqType) := FinMemPred { pred_of_finmempred :> mem_pred T; _ : is_finite (fun x => in_mem x pred_of_finmempred) }.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
finpred_of
| |
enum_finmem (T : eqType) (p : finmempred T) : seq T := let: FinMemPred _ fp := p in fp.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finmem
| |
enum_finmem_uniq (T : eqType) (p : finmempred T) : uniq (enum_finmem p). Proof. by case: p => ?[]. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finmem_uniq
| |
enum_finmemE (T : eqType) (p : finmempred T) : enum_finmem p =i p. Proof. by case: p => ?[]. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
enum_finmemE
| |
finmempred_of (T : eqType) (P : pred T) (mP : finmempred T) & phantom (mem_pred T) mP : finmempred T := mP.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
finmempred_of
| |
mem_fin (T : eqType) (pT : predType T) (p : finpred pT) := @FinMemPred _ (mem p) (@IsFinite _ _ (enum_fin p) (enum_fin_uniq p) (enum_finE p)).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mem_fin
| |
mkFinPredType T s s_uniq sE := (@mkFinPredType_of _ T _ id _ id s s_uniq sE).
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
mkFinPredType
| |
fset_finpredType (T: choiceType) := mkFinPredType (finSet T) (@enum_fset T) (@fset_uniq T) (fun _ _ => erefl).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_finpredType
| |
pred_finpredType (T : finType) := mkFinPredType (pred T) (fun P => enum_mem (mem P)) (@enum_uniq T) (@mem_enum T).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
pred_finpredType
| |
simpl_pred_finpredType (T : finType) := mkFinPredType (simpl_pred T) (fun P => enum_mem (mem P)) (@enum_uniq T) (@mem_enum T).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
simpl_pred_finpredType
| |
fset_finpred (T: choiceType) (A : finSet T) := @FinPred _ _ (enum_fset A) (@IsFinite _ _ (enum_fset A) (fset_uniq _) (fun=> erefl)).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset_finpred
| |
Canonical subfinset_finpred (T : choiceType) (A : finmempred T) (Q : pred T) := @FinPred _ _ [pred x in A | Q x] (@IsFinite _ _ [seq x <- enum_finmem A | Q x] _ _).
|
Program
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
Canonical
| |
Obligation . by rewrite filter_uniq// enum_finmem_uniq. Qed.
|
Next
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
Obligation
| |
Obligation . by rewrite !inE !mem_filter andbC enum_finmemE. Qed.
|
Next
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
Obligation
| |
seq_finpredType (T : eqType) := mkFinPredType (seq T) undup (@undup_uniq T) (@mem_undup T).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
seq_finpredType
| |
imfset : forall (key : unit) (T K : choiceType) (f : T -> K) (p : finmempred T), phantom (mem_pred T) p -> {fset K}.
|
Parameter
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset
| |
imfset2 : forall (key : unit) (K T1 : choiceType) (T2 : T1 -> choiceType)(f : forall x : T1, T2 x -> K) (p1 : finmempred T1) (p2 : forall x : T1, finmempred (T2 x)), phantom (mem_pred T1) p1 -> phantom (forall x, mem_pred (T2 x)) p2 -> {fset K}.
|
Parameter
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2
| |
imfsetE : forall key, imfset key = imfset_def key.
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfsetE
| |
imfset2E : forall key, imfset2 key = imfset2_def key.
|
Axiom
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2E
| |
imfset key := imfset_def key.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset
| |
imfset2 key := imfset2_def key.
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2
| |
imfsetE key : imfset key = imfset_def key. Proof. by []. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfsetE
| |
imfset2E key : imfset2 key = imfset2_def key. Proof. by []. Qed.
|
Lemma
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2E
| |
imfset key f p := (Imfset.imfset key f (Phantom _ (pred_of_finmempred p))).
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset
| |
imfset2 key f p q := (Imfset.imfset2 key f (Phantom _ (pred_of_finmempred p)) (Phantom _ (fun x => (pred_of_finmempred (q x))))).
|
Notation
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2
| |
imfset_unlock k := Unlockable (Imfset.imfsetE k).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset_unlock
| |
imfset2_unlock k := Unlockable (Imfset.imfset2E k).
|
Canonical
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset2_unlock
| |
imfset_key : unit. Proof. exact: tt. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
imfset_key
| |
fset0 : {fset K} := @mkFinSet K [::] (introT eqP (@sort_keys_nil K)). (* very transparent, to ensure x \in fset0 is convertible to false *)
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset0
| |
fset1_key : unit. Proof. exact: tt. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset1_key
| |
fset1 a : {fset K} := [fset[fset1_key] x in [:: a]].
|
Definition
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fset1
| |
fsetU_key : unit. Proof. exact: tt. Qed.
|
Fact
|
root
|
[
"From Corelib Require Import Setoid.",
"From HB Require Import structures.",
"From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.",
"From mathcomp Require Import choice finset finfun fintype bigop."
] |
finmap.v
|
fsetU_key
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.