statement
stringlengths
1
4.33k
proof
stringlengths
0
37.9k
type
stringclasses
25 values
symbolic_name
stringlengths
1
67
library
stringclasses
10 values
filename
stringclasses
112 values
imports
listlengths
2
138
deps
listlengths
0
64
docstring
stringclasses
798 values
source_url
stringclasses
1 value
commit
stringclasses
1 value
setD_eq0 A B : (A :\: B == set0) = (A \subset B).
Proof. by rewrite -subset0 subDset setU0. Qed.
Lemma
setD_eq0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "set0", "setU0", "subDset", "subset0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setI_eq0 A B : (A :&: B == set0) = [disjoint A & B].
Proof. by rewrite disjoints_subset -setD_eq0 setDE setCK. Qed.
Lemma
setI_eq0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "disjoint", "disjoints_subset", "set0", "setCK", "setDE", "setD_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq0_subset B A : (A == set0) = (A \subset B) && (A \subset ~: B).
Proof. by rewrite -subsetI setICr subset0. Qed.
Lemma
eq0_subset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "set0", "setICr", "subset0", "subsetI" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
disjoint_setI0 A B : [disjoint A & B] -> A :&: B = set0.
Proof. by rewrite -setI_eq0; move/eqP. Qed.
Lemma
disjoint_setI0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "disjoint", "set0", "setI_eq0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subsetC_disjoint A B : [disjoint A & B] -> forall C, C != set0 -> C \subset A -> ~~ (C \subset B).
Proof. move=> dAB C + CA; apply: contra_neqN => CB. by apply/eqP; rewrite -subset0 -(disjoint_setI0 dAB) subsetI CA CB. Qed.
Lemma
subsetC_disjoint
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "contra_neqN", "disjoint", "disjoint_setI0", "set0", "subset0", "subsetI" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
disjoints1 A x : [disjoint [set x] & A] = (x \notin A).
Proof. by rewrite (@eq_disjoint1 _ x) // => y; rewrite !inE. Qed.
Lemma
disjoints1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "disjoint", "eq_disjoint1", "inE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subsetD1 A B x : (A \subset B :\ x) = (A \subset B) && (x \notin A).
Proof. by rewrite setDE subsetI subsetC sub1set inE. Qed.
Lemma
subsetD1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "inE", "setDE", "sub1set", "subsetC", "subsetI" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subsetD1P A B x : reflect (A \subset B /\ x \notin A) (A \subset B :\ x).
Proof. by rewrite subsetD1; apply: andP. Qed.
Lemma
subsetD1P
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "subsetD1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properD1 A x : x \in A -> A :\ x \proper A.
Proof. move=> Ax; rewrite properE subsetDl; apply/subsetPn; exists x=> //. by rewrite in_setD1 Ax eqxx. Qed.
Lemma
properD1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "eqxx", "in_setD1", "proper", "properE", "subsetDl", "subsetPn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properIr A B : ~~ (B \subset A) -> A :&: B \proper B.
Proof. by move=> nsAB; rewrite properE subsetIr subsetI negb_and nsAB. Qed.
Lemma
properIr
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properE", "subsetI", "subsetIr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properIl A B : ~~ (A \subset B) -> A :&: B \proper A.
Proof. by move=> nsBA; rewrite properE subsetIl subsetI negb_and nsBA orbT. Qed.
Lemma
properIl
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properE", "subsetI", "subsetIl" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properUr A B : ~~ (A \subset B) -> B \proper A :|: B.
Proof. by rewrite properE subsetUr subUset subxx /= andbT. Qed.
Lemma
properUr
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properE", "subUset", "subsetUr", "subxx" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properUl A B : ~~ (B \subset A) -> A \proper A :|: B.
Proof. by move=> not_sBA; rewrite setUC properUr. Qed.
Lemma
properUl
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properUr", "setUC" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
proper1set A x : ([set x] \proper A) -> (x \in A).
Proof. by move/proper_sub; rewrite sub1set. Qed.
Lemma
proper1set
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "proper_sub", "sub1set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properIset A B C : (B \proper A) || (C \proper A) -> (B :&: C \proper A).
Proof. by case/orP; apply: sub_proper_trans; rewrite (subsetIl, subsetIr). Qed.
Lemma
properIset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "proper", "sub_proper_trans", "subsetIl", "subsetIr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properI A B C : (A \proper B :&: C) -> (A \proper B) && (A \proper C).
Proof. move=> pAI; apply/andP. by split; apply: (proper_sub_trans pAI); rewrite (subsetIl, subsetIr). Qed.
Lemma
properI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "proper", "proper_sub_trans", "split", "subsetIl", "subsetIr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properU A B C : (B :|: C \proper A) -> (B \proper A) && (C \proper A).
Proof. move=> pUA; apply/andP. by split; apply: sub_proper_trans pUA; rewrite (subsetUr, subsetUl). Qed.
Lemma
properU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "proper", "split", "sub_proper_trans", "subsetUl", "subsetUr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properD A B C : (A \proper B :\: C) -> (A \proper B) && [disjoint A & C].
Proof. by rewrite setDE disjoints_subset => /properI/andP[-> /proper_sub]. Qed.
Lemma
properD
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "disjoint", "disjoints_subset", "proper", "properI", "proper_sub", "setDE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properCr A B : (A \proper ~: B) = (B \proper ~: A).
Proof. by rewrite -properC setCK. Qed.
Lemma
properCr
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properC", "setCK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
properCl A B : (~: A \proper B) = (~: B \proper A).
Proof. by rewrite -properC setCK. Qed.
Lemma
properCl
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "proper", "properC", "setCK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
enum_setU A B : perm_eq (enum (A :|: B)) (undup (enum A ++ enum B)).
Proof. apply: uniq_perm; rewrite ?enum_uniq ?undup_uniq//. by move=> i; rewrite mem_undup mem_enum inE mem_cat !mem_enum. Qed.
Lemma
enum_setU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "enum", "enum_uniq", "inE", "mem_cat", "mem_enum", "mem_undup", "perm_eq", "undup", "undup_uniq", "uniq_perm" ]
relationship with seq
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
enum_setI A B : perm_eq (enum (A :&: B)) (filter [in B] (enum A)).
Proof. apply: uniq_perm; rewrite ?enum_uniq// 1?filter_uniq// ?enum_uniq//. by move=> x; rewrite /= mem_enum mem_filter inE mem_enum andbC. Qed.
Lemma
enum_setI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "enum", "enum_uniq", "filter", "filter_uniq", "inE", "mem_enum", "mem_filter", "perm_eq", "uniq_perm" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
has_set1 pA A a : has pA (enum [set a]) = pA a.
Proof. by rewrite enum_set1 has_seq1. Qed.
Lemma
has_set1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "enum", "enum_set1", "has", "has_seq1", "pA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
has_setU pA A B : has pA (enum (A :|: B)) = (has pA (enum A)) || (has pA (enum B)).
Proof. by rewrite (perm_has _ (enum_setU _ _)) has_undup has_cat. Qed.
Lemma
has_setU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "enum", "enum_setU", "has", "has_cat", "has_undup", "pA", "perm_has" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
all_set1 pA A a : all pA (enum [set a]) = pA a.
Proof. by rewrite enum_set1 all_seq1. Qed.
Lemma
all_set1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "all", "all_seq1", "enum", "enum_set1", "pA" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
all_setU pA A B : all pA (enum (A :|: B)) = (all pA (enum A)) && (all pA (enum B)).
Proof. by rewrite (perm_all _ (enum_setU _ _)) all_undup all_cat. Qed.
Lemma
all_setU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "all", "all_cat", "all_undup", "enum", "enum_setU", "pA", "perm_all" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setX
:= [set u | u.1 \in A1 & u.2 \in A2].
Definition
setX
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_setX x1 x2 : ((x1, x2) \in setX) = (x1 \in A1) && (x2 \in A2).
Proof. by rewrite inE. Qed.
Lemma
in_setX
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "inE", "setX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setXP x1 x2 : reflect (x1 \in A1 /\ x2 \in A2) ((x1, x2) \in setX).
Proof. by rewrite inE; apply: andP. Qed.
Lemma
setXP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cardsX : #|setX| = #|A1| * #|A2|.
Proof. by rewrite cardsE cardX. Qed.
Lemma
cardsX
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cardX", "cardsE", "setX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setXn
:= [set x : {dffun _} in family A].
Definition
setXn
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "family" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_setXn x : (x \in setXn) = [forall i, x i \in A i].
Proof. by rewrite inE. Qed.
Lemma
in_setXn
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "inE", "setXn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setXnP x : reflect (forall i, x i \in A i) (x \in setXn).
Proof. by rewrite inE; apply: forallP. Qed.
Lemma
setXnP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "forallP", "inE", "setXn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cardsXn : #|setXn| = \prod_i #|A i|.
Proof. by rewrite cardsE card_family foldrE big_map big_enum. Qed.
Lemma
cardsXn
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "big_enum", "big_map", "card_family", "cardsE", "foldrE", "setXn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_unlock
:= Unlockable imset.unlock.
Canonical
imset_unlock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2_unlock
:= Unlockable imset2.unlock.
Canonical
imset2_unlock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimset (aT : finType) rT f (R : mem_pred rT)
:= [set x : aT | in_mem (f x) R].
Definition
preimset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"f @^-1: A"
:= (preimset f (mem A)) (at level 24) : set_scope.
Notation
f @^-1: A
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "preimset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"f @: A"
:= (imset f (mem A)) (at level 24) : set_scope.
Notation
f @: A
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"f @2: ( A , B )"
:= (imset2 f (mem A) (fun _ => mem B)) (at level 24, format "f @2: ( A , B )") : set_scope.
Notation
f @2: ( A , B )
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A ]"
:= ((fun x => E) @: A) (format "[ '[hv' 'set' E '/ ' | x 'in' A ] ']'") : set_scope.
Notation
[ 'set' E | x 'in' A ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
Comprehensions
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A & P ]"
:= [set E | x in pred_of_set [set x in A | P]] (format "[ '[hv' 'set' E '/ ' | x 'in' A '/ ' & P ] ']'") : set_scope.
Notation
[ 'set' E | x 'in' A & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A , y 'in' B ]"
:= (imset2 (fun x y => E) (mem A) (fun x => mem B)) (y at level 99, format "[ '[hv' 'set' E '/ ' | x 'in' A , '/ ' y 'in' B ] ']'" ) : set_scope.
Notation
[ 'set' E | x 'in' A , y 'in' B ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A , y 'in' B & P ]"
:= [set E | x in A, y in pred_of_set [set y in B | P]] (format "[ '[hv' 'set' E '/ ' | x 'in' A , '/ ' y 'in' B '/ ' & P ] ']'" ) : set_scope.
Notation
[ 'set' E | x 'in' A , y 'in' B & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A ]"
:= ((fun x : T => E) @: A) (only parsing) : set_scope.
Notation
[ 'set' E | x : T 'in' A ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
Typed variants
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A & P ]"
:= [set E | x : T in [set x : T in A | P]] (only parsing) : set_scope.
Notation
[ 'set' E | x : T 'in' A & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A , y : U 'in' B ]"
:= (imset2 (fun (x : T) (y : U) => E) (mem A) (fun (x : T) => mem B)) (y at level 99, only parsing) : set_scope.
Notation
[ 'set' E | x : T 'in' A , y : U 'in' B ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A , y : U 'in' B & P ]"
:= [set E | x : T in A, y : U in [set y : U in B | P]] (only parsing) : set_scope.
Notation
[ 'set' E | x : T 'in' A , y : U 'in' B & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
predOfType T
:= (pred_of_simpl (@pred_of_argType T)).
Notation
predOfType
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
Comprehensions over a type
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T ]"
:= [set E | x : T in predOfType T] (format "[ '[hv' 'set' E '/ ' | x : T ] ']'") : set_scope.
Notation
[ 'set' E | x : T ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "predOfType" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T & P ]"
:= [set E | x : T in pred_of_set [set x : T | P]] (format "[ '[hv' 'set' E '/ ' | x : T '/ ' & P ] ']'") : set_scope.
Notation
[ 'set' E | x : T & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T , y : U 'in' B ]"
:= [set E | x : T in predOfType T, y : U in B] (y at level 99, format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U 'in' B ] ']'") : set_scope.
Notation
[ 'set' E | x : T , y : U 'in' B ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "predOfType" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T , y : U 'in' B & P ]"
:= [set E | x : T, y : U in pred_of_set [set y in B | P]] (format "[ '[hv ' 'set' E '/' | x : T , '/ ' y : U 'in' B '/' & P ] ']'" ) : set_scope.
Notation
[ 'set' E | x : T , y : U 'in' B & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A , y : U ]"
:= [set E | x : T in A, y : U in predOfType U] (format "[ '[hv' 'set' E '/ ' | x : T 'in' A , '/ ' y : U ] ']'") : set_scope.
Notation
[ 'set' E | x : T 'in' A , y : U ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "predOfType" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T 'in' A , y : U & P ]"
:= [set E | x : T in A, y : U in pred_of_set [set y in P]] (format "[ '[hv' 'set' E '/ ' | x : T 'in' A , '/ ' y : U & P ] ']'") : set_scope.
Notation
[ 'set' E | x : T 'in' A , y : U & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T , y : U ]"
:= [set E | x : T, y : U in predOfType U] (format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U ] ']'") : set_scope.
Notation
[ 'set' E | x : T , y : U ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "predOfType" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x : T , y : U & P ]"
:= [set E | x : T, y : U in pred_of_set [set y in P]] (format "[ '[hv' 'set' E '/ ' | x : T , '/ ' y : U & P ] ']'") : set_scope.
Notation
[ 'set' E | x : T , y : U & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pred_of_set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x , y 'in' B ]"
:= [set E | x : _, y : _ in B] (y at level 99, only parsing) : set_scope.
Notation
[ 'set' E | x , y 'in' B ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
Untyped variants
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x , y 'in' B & P ]"
:= [set E | x : _, y : _ in B & P] (only parsing) : set_scope.
Notation
[ 'set' E | x , y 'in' B & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A , y ]"
:= [set E | x : _ in A, y : _] (only parsing) : set_scope.
Notation
[ 'set' E | x 'in' A , y ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x 'in' A , y & P ]"
:= [set E | x : _ in A, y : _ & P] (only parsing) : set_scope.
Notation
[ 'set' E | x 'in' A , y & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x , y ]"
:= [set E | x : _, y : _] (only parsing) : set_scope.
Notation
[ 'set' E | x , y ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
"[ 'set' E | x , y & P ]"
:= [set E | x : _, y : _ & P ] (only parsing) : set_scope.
Notation
[ 'set' E | x , y & P ]
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imsetP D y : reflect (exists2 x, in_mem x D & y = f x) (y \in imset f D).
Proof. by rewrite [@imset]unlock inE; apply: imageP. Qed.
Lemma
imsetP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "imageP", "inE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2_spec D1 D2 y : Prop
:= Imset2spec x1 x2 of in_mem x1 D1 & in_mem x2 (D2 x1) & y = f2 x1 x2.
Variant
imset2_spec
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "f2" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2P D1 D2 y : reflect (imset2_spec D1 D2 y) (y \in imset2 f2 D1 D2).
Proof. rewrite [@imset2]unlock inE. apply: (iffP imageP) => [[[x1 x2] Dx12] | [x1 x2 Dx1 Dx2]] -> {y}. by case/andP: Dx12; exists x1 x2. by exists (x1, x2); rewrite //= !inE Dx1. Qed.
Lemma
imset2P
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "f2", "imageP", "imset2_spec", "inE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_f (D : {pred aT}) x : x \in D -> f x \in f @: D.
Proof. by move=> Dx; apply/imsetP; exists x. Qed.
Lemma
imset_f
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "aT", "apply", "imsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_imset (D : {pred aT}) x : injective f -> (f x \in f @: D) = (x \in D).
Proof. by move=> f_inj; apply/imsetP/idP;[case=> [y] ? /f_inj -> | move=> ?; exists x]. Qed.
Lemma
mem_imset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "f_inj", "imsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset0 : f @: set0 = set0.
Proof. by apply/setP => y /[!inE]; apply/imsetP => -[x /[!inE]]. Qed.
Lemma
imset0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "imsetP", "inE", "set0", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_eq0 (A : {set aT}) : (f @: A == set0) = (A == set0).
Proof. have [-> | [x Ax]] := set_0Vmem A; first by rewrite imset0 !eqxx. by rewrite -!cards_eq0 (cardsD1 x) Ax (cardsD1 (f x)) imset_f. Qed.
Lemma
imset_eq0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "cardsD1", "cards_eq0", "eqxx", "imset0", "imset_f", "set0", "set_0Vmem" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_set1 x : f @: [set x] = [set f x].
Proof. apply/setP => y. by apply/imsetP/set1P=> [[x' /set1P-> //]| ->]; exists x; rewrite ?set11. Qed.
Lemma
imset_set1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "imsetP", "set11", "set1P", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_inj : injective f -> injective (fun A : {set aT} => f @: A).
Proof. move=> inj_f A B => /setP E; apply/setP => x. by rewrite -(mem_imset A x inj_f) E mem_imset. Qed.
Lemma
imset_inj
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "inj_f", "mem_imset", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_disjoint (A B : {pred aT}) : injective f -> [disjoint f @: A & f @: B] = [disjoint A & B].
Proof. move=> inj_f; apply/pred0Pn/pred0Pn => /= [[_ /andP[/imsetP[x xA ->]] xB]|]. by exists x; rewrite xA -(mem_imset B x inj_f). by move=> [x /andP[xA xB]]; exists (f x); rewrite !mem_imset ?xA. Qed.
Lemma
imset_disjoint
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "disjoint", "imsetP", "inj_f", "mem_imset", "pred0Pn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2_f (D : {pred aT}) (D2 : aT -> {pred aT2}) x x2 : x \in D -> x2 \in D2 x -> f2 x x2 \in [set f2 y y2 | y in D, y2 in D2 y].
Proof. by move=> Dx Dx2; apply/imset2P; exists x x2. Qed.
Lemma
imset2_f
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "aT", "apply", "f2", "imset2P" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_imset2 (D : {pred aT}) (D2 : aT -> {pred aT2}) x x2 : injective2 f2 -> (f2 x x2 \in [set f2 y y2 | y in D, y2 in D2 y]) = (x \in D) && (x2 \in D2 x).
Proof. move=> inj2_f; apply/imset2P/andP => [|[xD xD2]]; last by exists x x2. by move => [x' x2' xD xD2 eq_f2]; case: (inj2_f _ _ _ _ eq_f2) => -> ->. Qed.
Lemma
mem_imset2
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "f2", "imset2P", "injective2", "last" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sub_imset_pre (A : {pred aT}) (B : {pred rT}) : (f @: A \subset B) = (A \subset f @^-1: B).
Proof. apply/subsetP/subsetP=> [sfAB x Ax | sAf'B fx]. by rewrite inE sfAB ?imset_f. by move=> /imsetP[a + ->] => /sAf'B /[!inE]. Qed.
Lemma
sub_imset_pre
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "imsetP", "imset_f", "inE", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetS (A B : {pred rT}) : A \subset B -> (f @^-1: A) \subset (f @^-1: B).
Proof. by move=> sAB; apply/subsetP=> y /[!inE]; apply: subsetP. Qed.
Lemma
preimsetS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimset0 : f @^-1: set0 = set0.
Proof. by apply/setP=> x; rewrite !inE. Qed.
Lemma
preimset0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "set0", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetT : f @^-1: setT = setT.
Proof. by apply/setP=> x; rewrite !inE. Qed.
Lemma
preimsetT
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP", "setT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetI (A B : {set rT}) : f @^-1: (A :&: B) = (f @^-1: A) :&: (f @^-1: B).
Proof. by apply/setP=> y; rewrite !inE. Qed.
Lemma
preimsetI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetU (A B : {set rT}) : f @^-1: (A :|: B) = (f @^-1: A) :|: (f @^-1: B).
Proof. by apply/setP=> y; rewrite !inE. Qed.
Lemma
preimsetU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetD (A B : {set rT}) : f @^-1: (A :\: B) = (f @^-1: A) :\: (f @^-1: B).
Proof. by apply/setP=> y; rewrite !inE. Qed.
Lemma
preimsetD
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimsetC (A : {set rT}) : f @^-1: (~: A) = ~: f @^-1: A.
Proof. by apply/setP=> y; rewrite !inE. Qed.
Lemma
preimsetC
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imsetS (A B : {pred aT}) : A \subset B -> f @: A \subset f @: B.
Proof. move=> sAB; apply/subsetP => _ /imsetP[x Ax ->]. by apply/imsetP; exists x; rewrite ?(subsetP sAB). Qed.
Lemma
imsetS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "imsetP", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_proper (A B : {set aT}) : {in B &, injective f} -> A \proper B -> f @: A \proper f @: B.
Proof. move=> injf /properP[sAB [x Bx nAx]]; rewrite properE imsetS //=. apply: contra nAx => sfBA. have: f x \in f @: A by rewrite (subsetP sfBA) ?imset_f. by case/imsetP=> y Ay /injf-> //; apply: subsetP sAB y Ay. Qed.
Lemma
imset_proper
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "imsetP", "imsetS", "imset_f", "injf", "proper", "properE", "properP", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preimset_proper (A B : {set rT}) : B \subset codom f -> A \proper B -> (f @^-1: A) \proper (f @^-1: B).
Proof. move=> sBc /properP[sAB [u Bu nAu]]; rewrite properE preimsetS //=. by apply/subsetPn; exists (iinv (subsetP sBc _ Bu)); rewrite inE /= f_iinv. Qed.
Lemma
preimset_proper
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "codom", "f_iinv", "iinv", "inE", "preimsetS", "proper", "properE", "properP", "subsetP", "subsetPn" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imsetU (A B : {set aT}) : f @: (A :|: B) = (f @: A) :|: (f @: B).
Proof. apply/eqP; rewrite eqEsubset subUset. rewrite 2?imsetS (andbT, subsetUl, subsetUr) // andbT. apply/subsetP=> _ /imsetP[x ABx ->]; apply/setUP. by case/setUP: ABx => [Ax | Bx]; [left | right]; apply/imsetP; exists x. Qed.
Lemma
imsetU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "eqEsubset", "imsetP", "imsetS", "setUP", "subUset", "subsetP", "subsetUl", "subsetUr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imsetU1 a (A : {set aT}) : f @: (a |: A) = f a |: (f @: A).
Proof. by rewrite imsetU imset_set1. Qed.
Lemma
imsetU1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "imsetU", "imset_set1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imsetI (A B : {set aT}) : {in A & B, injective f} -> f @: (A :&: B) = f @: A :&: f @: B.
Proof. move=> injf; apply/eqP; rewrite eqEsubset subsetI. rewrite 2?imsetS (andTb, subsetIl, subsetIr) //=. apply/subsetP=> _ /setIP[/imsetP[x Ax ->] /imsetP[z Bz /injf eqxz]]. by rewrite imset_f // inE Ax eqxz. Qed.
Lemma
imsetI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "eqEsubset", "imsetP", "imsetS", "imset_f", "inE", "injf", "setIP", "subsetI", "subsetIl", "subsetIr", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2Sl (A B : {pred aT}) (C : {pred aT2}) : A \subset B -> f2 @2: (A, C) \subset f2 @2: (B, C).
Proof. move=> sAB; apply/subsetP=> _ /imset2P[x y Ax Cy ->]. by apply/imset2P; exists x y; rewrite ?(subsetP sAB). Qed.
Lemma
imset2Sl
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "f2", "imset2P", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2Sr (A B : {pred aT2}) (C : {pred aT}) : A \subset B -> f2 @2: (C, A) \subset f2 @2: (C, B).
Proof. move=> sAB; apply/subsetP=> _ /imset2P[x y Ax Cy ->]. by apply/imset2P; exists x y; rewrite ?(subsetP sAB). Qed.
Lemma
imset2Sr
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "f2", "imset2P", "subsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2S (A B : {pred aT}) (A2 B2 : {pred aT2}) : A \subset B -> A2 \subset B2 -> f2 @2: (A, A2) \subset f2 @2: (B, B2).
Proof. by move=> /(imset2Sl B2) sBA /(imset2Sr A)/subset_trans->. Qed.
Lemma
imset2S
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "f2", "imset2Sl", "imset2Sr", "subset_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_preimset f g R : f =1 g -> f @^-1: R = g @^-1: R.
Proof. by move=> eqfg; apply/setP => y; rewrite !inE eqfg. Qed.
Lemma
eq_preimset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "inE", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_imset f g D : f =1 g -> f @: D = g @: D.
Proof. move=> eqfg; apply/setP=> y. by apply/imsetP/imsetP=> [] [x Dx ->]; exists x; rewrite ?eqfg. Qed.
Lemma
eq_imset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "apply", "imsetP", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_in_imset f g D : {in D, f =1 g} -> f @: D = g @: D.
Proof. move=> eqfg; apply/setP => y. by apply/imsetP/imsetP=> [] [x Dx ->]; exists x; rewrite ?eqfg. Qed.
Lemma
eq_in_imset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "apply", "imsetP", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_in_imset2 (f g : aT -> aT2 -> rT) (D : {pred aT}) (D2 : {pred aT2}) : {in D & D2, f =2 g} -> f @2: (D, D2) = g @2: (D, D2).
Proof. move=> eqfg; apply/setP => y. by apply/imset2P/imset2P=> [] [x x2 Dx Dx2 ->]; exists x x2; rewrite ?eqfg. Qed.
Lemma
eq_in_imset2
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "aT", "apply", "imset2P", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset2_pair (A : {set aT}) (B : {set aT2}) : [set (x, y) | x in A, y in B] = setX A B.
Proof. apply/setP=> [[x y]]; rewrite !inE /=. by apply/imset2P/andP=> [[_ _ _ _ [-> ->]//]| []]; exists x y. Qed.
Lemma
imset2_pair
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "apply", "imset2P", "inE", "setP", "setX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setXS (A1 B1 : {set aT}) (A2 B2 : {set aT2}) : A1 \subset B1 -> A2 \subset B2 -> setX A1 A2 \subset setX B1 B2.
Proof. by move=> sAB1 sAB2; rewrite -!imset2_pair imset2S. Qed.
Lemma
setXS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "aT", "imset2S", "imset2_pair", "setX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pick_set1 i0 : [pick x in [set i0]] = Some i0.
Proof. by case: pickP => [i /[!inE]/eqP-> | /(_ i0)/[!(inE, eqxx)]]. Qed.
Lemma
pick_set1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "eqxx", "i0", "inE", "pick", "pickP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
unset1 A : option I
:= if #|A| == 1 then [pick x in A] else None.
Definition
unset1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "pick" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d