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
trivIset1 A : trivIset [set A].
Proof. by rewrite /trivIset cover1 big_set1. Qed.
Lemma
trivIset1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "big_set1", "cover1", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetP P : reflect {in P &, forall A B, A != B -> [disjoint A & B]} (trivIset P).
Proof. rewrite -[P]set_enum; elim: {P}(enum _) (enum_uniq P) => [_ | A e IHe] /=. by rewrite /trivIset /cover !big_set0 cards0; left=> A; rewrite inE. case/andP; rewrite set_cons -(in_set (fun B => B \in e)) => PA {}/IHe. move: {e}[set x in e] PA => P PA IHP. rewrite /trivIset /cover !big_setU1 //= eq_sym. have:= leq...
Lemma
trivIsetP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_set0", "big_setU1", "bigcapsP", "cards0", "contraNneq", "cover", "disjoint", "disjoint_sym", "disjoints_subset", "enum", "enum_uniq", "eq_sym", "inE", "in_set", "last", "leq_add2l", "leq_card_cover", "leq_card_setU", "leqif_trans", "meetA", "mono_leqif", "se...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetS P Q : P \subset Q -> trivIset Q -> trivIset P.
Proof. by move/subsetP/sub_in2=> sPQ /trivIsetP/sPQ/trivIsetP. Qed.
Lemma
trivIsetS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "subsetP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetD P Q : trivIset P -> trivIset (P :\: Q).
Proof. move/trivIsetP => tP; apply/trivIsetP => A B /setDP[TA _] /setDP[TB _]; exact: tP. Qed.
Lemma
trivIsetD
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "setDP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetU P Q : trivIset Q -> trivIset P -> [disjoint cover Q & cover P] -> trivIset (Q :|: P).
Proof. move => /trivIsetP tQ /trivIsetP tP dQP; apply/trivIsetP => A B. move => /setUP[?|?] /setUP[?|?]; first [exact:tQ|exact:tP|move => _]. by apply: disjointW dQP; rewrite bigcup_sup. by rewrite disjoint_sym; apply: disjointW dQP; rewrite bigcup_sup. Qed.
Lemma
trivIsetU
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcup_sup", "cover", "disjoint", "disjointW", "disjoint_sym", "setUP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
coverD1 P B : trivIset P -> B \in P -> cover (P :\ B) = cover P :\: B.
Proof. move/trivIsetP => tP SP; apply/setP => x; rewrite inE. apply/bigcupP/idP => [[A /setD1P [ADS AP] xA]|/andP[xNS /bigcupP[A AP xA]]]. by rewrite (disjointFr (tP _ _ _ _ ADS)) //=; apply/bigcupP; exists A. by exists A; rewrite // !inE AP andbT; apply: contraNneq xNS => <-. Qed.
Lemma
coverD1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcupP", "contraNneq", "cover", "disjointFr", "inE", "setD1P", "setP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetI P D : trivIset P -> trivIset (P ::&: D).
Proof. by apply: trivIsetS; rewrite -setI_powerset subsetIl. Qed.
Lemma
trivIsetI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "setI_powerset", "subsetIl", "trivIset", "trivIsetS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cover_setI P D : cover (P ::&: D) \subset cover P :&: D.
Proof. by apply/bigcupsP=> A /setIdP[PA sAD]; rewrite subsetI sAD andbT (bigcup_max A). Qed.
Lemma
cover_setI
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcup_max", "bigcupsP", "cover", "sAD", "setIdP", "subsetI" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
mem_pblock P x : (x \in pblock P x) = (x \in cover P).
Proof. rewrite /pblock; apply/esym/bigcupP. case: pickP => /= [A /andP[PA Ax]| noA]; first by rewrite Ax; exists A. by rewrite inE => [[A PA Ax]]; case/andP: (noA A). Qed.
Lemma
mem_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcupP", "cover", "inE", "pblock", "pickP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblock_mem P x : x \in cover P -> pblock P x \in P.
Proof. by rewrite -mem_pblock /pblock; case: pickP => [A /andP[]| _] //=; rewrite inE. Qed.
Lemma
pblock_mem
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cover", "inE", "mem_pblock", "pblock", "pickP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
def_pblock P B x : trivIset P -> B \in P -> x \in B -> pblock P x = B.
Proof. move/trivIsetP=> tiP PB Bx; have Px: x \in cover P by apply/bigcupP; exists B. apply: (contraNeq (tiP _ _ _ PB)); first by rewrite pblock_mem. by apply/pred0Pn; exists x; rewrite /= mem_pblock Px. Qed.
Lemma
def_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px", "apply", "bigcupP", "contraNeq", "cover", "mem_pblock", "pblock", "pblock_mem", "pred0Pn", "tiP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
same_pblock P x y : trivIset P -> x \in pblock P y -> pblock P x = pblock P y.
Proof. rewrite {1 3}/pblock => tI; case: pickP => [A|]; last by rewrite inE. by case/andP=> PA _{y} /= Ax; apply: def_pblock. Qed.
Lemma
same_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "def_pblock", "inE", "last", "pblock", "pickP", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eq_pblock P x y : trivIset P -> x \in cover P -> (pblock P x == pblock P y) = (y \in pblock P x).
Proof. move=> tiP Px; apply/eqP/idP=> [eq_xy | /same_pblock-> //]. move: Px; rewrite -mem_pblock eq_xy /pblock. by case: pickP => [B /andP[] // | _] /[1!inE]. Qed.
Lemma
eq_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px", "apply", "cover", "inE", "mem_pblock", "pblock", "pickP", "same_pblock", "tiP", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIsetU1 A P : {in P, forall B, [disjoint A & B]} -> trivIset P -> set0 \notin P -> trivIset (A |: P) /\ A \notin P.
Proof. move=> tiAP tiP notPset0; split; last first. apply: contra notPset0 => P_A. by have:= tiAP A P_A; rewrite -setI_eq0 setIid => /eqP <-. apply/trivIsetP=> B1 B2 /setU1P[->|PB1] /setU1P[->|PB2]; by [apply: (trivIsetP _ tiP) | rewrite ?eqxx // ?(tiAP, disjoint_sym)]. Qed.
Lemma
trivIsetU1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "disjoint", "disjoint_sym", "eqxx", "last", "set0", "setI_eq0", "setIid", "setU1P", "split", "tiP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cover_imset J F : cover (F @: J) = \bigcup_(i in J) F i.
Proof. apply/setP=> x. apply/bigcupP/bigcupP=> [[_ /imsetP[i Ji ->]] | [i]]; first by exists i. by exists (F i); first apply: imset_f. Qed.
Lemma
cover_imset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcupP", "cover", "imsetP", "imset_f", "setP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trivIimset J F (P := F @: J) : {in J &, forall i j, j != i -> [disjoint F i & F j]} -> set0 \notin P -> trivIset P /\ {in J &, injective F}.
Proof. move=> tiF notPset0; split=> [|i j Ji Jj /= eqFij]. apply/trivIsetP=> _ _ /imsetP[i Ji ->] /imsetP[j Jj ->] neqFij. by rewrite tiF // (contraNneq _ neqFij) // => ->. apply: contraNeq notPset0 => neq_ij; apply/imsetP; exists i => //; apply/eqP. by rewrite eq_sym -[F i]setIid setI_eq0 {1}eqFij tiF. Qed.
Lemma
trivIimset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "contraNeq", "contraNneq", "disjoint", "eq_sym", "imsetP", "set0", "setI_eq0", "setIid", "split", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
cover_partition P D : partition P D -> cover P = D.
Proof. by case/and3P=> /eqP. Qed.
Lemma
cover_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cover", "partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition0 P D : partition P D -> (set0 \in P) = false.
Proof. case/and3P => _ _. by apply: contraNF. Qed.
Lemma
partition0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "partition", "set0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_neq0 P D B : partition P D -> B \in P -> B != set0.
Proof. by move=> partP; apply: contraTneq => ->; rewrite (partition0 partP). Qed.
Lemma
partition_neq0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "contraTneq", "partition", "partition0", "set0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_trivIset P D : partition P D -> trivIset P.
Proof. by case/and3P. Qed.
Lemma
partition_trivIset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "partition", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partitionS P D B : partition P D -> B \in P -> B \subset D.
Proof. by move=> partP BP; rewrite -(cover_partition partP); apply: bigcup_max BP _. Qed.
Lemma
partitionS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcup_max", "cover_partition", "partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partitionD1 P D B : partition P D -> B \in P -> partition (P :\ B) (D :\: B).
Proof. case/and3P => /eqP covP trivP set0P SP. by rewrite /partition inE (negbTE set0P) trivIsetD ?coverD1 -?covP ?eqxx ?andbF. Qed.
Lemma
partitionD1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "coverD1", "eqxx", "inE", "partition", "trivIsetD" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partitionU1 P D B : partition P D -> B != set0 -> [disjoint B & D] -> partition (B |: P) (B :|: D).
Proof. case/and3P => /eqP covP trivP set0P BD0 disSD. rewrite /partition !inE (negbTE set0P) orbF [_ == B]eq_sym BD0 andbT. rewrite /cover bigcup_setU /= big_set1 -covP eqxx /=. by move: disSD; rewrite -covP => /bigcup_disjointP/trivIsetU1 => -[]. Qed.
Lemma
partitionU1
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "big_set1", "bigcup_disjointP", "bigcup_setU", "cover", "disjoint", "eq_sym", "eqxx", "inE", "partition", "set0", "trivIsetU1" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_set0 P : partition P set0 = (P == set0).
Proof. apply/and3P/eqP => [[/bigcup0P covP _ ]|->]; last first. by rewrite /partition inE /trivIset/cover !big_set0 cards0 !eqxx. by apply: contraNeq => /set0Pn[B BP]; rewrite -(covP B BP). Qed.
Lemma
partition_set0
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_set0", "bigcup0P", "cards0", "contraNeq", "cover", "eqxx", "inE", "last", "partition", "set0", "set0Pn", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_partition P D : partition P D -> #|D| = \sum_(A in P) #|A|.
Proof. by case/and3P=> /eqP <- /eqnP. Qed.
Lemma
card_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "eqnP", "partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_uniform_partition n P D : {in P, forall A, #|A| = n} -> partition P D -> #|D| = #|P| * n.
Proof. by move=> uniP /card_partition->; rewrite -sum_nat_const; apply: eq_bigr. Qed.
Lemma
card_uniform_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "card_partition", "eq_bigr", "partition", "sum_nat_const" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_pigeonhole P D A : partition P D -> #|P| <= #|A| -> A \subset D -> {in P, forall B, #|A :&: B| <= 1} -> {in P, forall B, A :&: B != set0}.
Proof. move=> partP card_A_P /subsetP subAD sub1; apply/forall_inP. apply: contraTT card_A_P => /forall_inPn [B BP]; rewrite negbK => AB0. rewrite -!ltnNge -(setD1K BP) cardsU1 !inE eqxx /= add1n ltnS. have [tP covP] := (partition_trivIset partP,cover_partition partP). have APx x : x \in A -> x \in pblock P x by rewrit...
Lemma
partition_pigeonhole
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "add1n", "apply", "card_in_imset", "card_le1_eqP", "cardsU1", "contraTneq", "cover_partition", "eq_pblock", "eqxx", "forall_inP", "forall_inPn", "imsetP", "inE", "inj_f", "ltnNge", "ltnS", "mem_pblock", "partition", "partition_trivIset", "pblock", "pblock_mem", "set0", "s...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
rhs_cond P K E
:= \big[op/idx]_(A in P) \big[op/idx]_(x in A | K x) E x.
Let
rhs_cond
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
rhs P E
:= \big[op/idx]_(A in P) \big[op/idx]_(x in A) E x.
Let
rhs
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
big_trivIset_cond P (K : pred T) (E : T -> R) : trivIset P -> \big[op/idx]_(x in cover P | K x) E x = rhs_cond P K E.
Proof. move=> tiP; rewrite (partition_big (pblock P) [in P]) -/op => /= [x|]. by case/andP=> Px _; apply: pblock_mem. apply: eq_bigr => A PA; apply: eq_bigl => x; rewrite andbAC; congr (_ && _). rewrite -mem_pblock; apply/andP/idP=> [[Px /eqP <- //] | Ax]. by rewrite (def_pblock tiP PA Ax). Qed.
Lemma
big_trivIset_cond
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px", "apply", "cover", "def_pblock", "eq_bigl", "eq_bigr", "mem_pblock", "partition_big", "pblock", "pblock_mem", "rhs_cond", "tiP", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
big_trivIset P (E : T -> R) : trivIset P -> \big[op/idx]_(x in cover P) E x = rhs P E.
Proof. have biginT := eq_bigl _ _ (fun _ => andbT _) => tiP. by rewrite -biginT big_trivIset_cond //; apply: eq_bigr => A _; apply: biginT. Qed.
Lemma
big_trivIset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_trivIset_cond", "cover", "eq_bigl", "eq_bigr", "rhs", "tiP", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
set_partition_big_cond P D (K : pred T) (E : T -> R) : partition P D -> \big[op/idx]_(x in D | K x) E x = rhs_cond P K E.
Proof. by case/and3P=> /eqP <- tI_P _; apply: big_trivIset_cond. Qed.
Lemma
set_partition_big_cond
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_trivIset_cond", "partition", "rhs_cond" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
set_partition_big P D (E : T -> R) : partition P D -> \big[op/idx]_(x in D) E x = rhs P E.
Proof. by case/and3P=> /eqP <- tI_P _; apply: big_trivIset. Qed.
Lemma
set_partition_big
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_trivIset", "partition", "rhs" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_disjoint_bigcup (F : I -> {set T}) E : (forall i j, i != j -> [disjoint F i & F j]) -> \big[op/idx]_(x in \bigcup_i F i) E x = \big[op/idx]_i \big[op/idx]_(x in F i) E x.
Proof. move=> disjF; pose P := [set F i | i in I & F i != set0]. have trivP: trivIset P. apply/trivIsetP=> _ _ /imsetP[i _ ->] /imsetP[j _ ->] neqFij. by apply: disjF; apply: contraNneq neqFij => ->. have ->: \bigcup_i F i = cover P. apply/esym; rewrite cover_imset big_mkcond; apply: eq_bigr => i _. by rewrite ...
Lemma
partition_disjoint_bigcup
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_imset", "big_mkcond", "big_set0", "big_trivIset", "contraNeq", "contraNneq", "cover", "cover_imset", "disjoint", "eq_bigr", "imsetP", "inE", "rhs", "set0", "setI_eq0", "setIdP", "setIid", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
Px x
:= [set y in D | R x y].
Let
Px
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
equivalence_partition
:= [set Px x | x in D].
Definition
equivalence_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
P
:= equivalence_partition.
Notation
P
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "equivalence_partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
eqiR : {in D & &, equivalence_rel R}.
Hypothesis
eqiR
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
Pxx x : x \in D -> x \in Px x.
Proof. by move=> Dx; rewrite !inE Dx (eqiR Dx Dx). Qed.
Let
Pxx
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "Px", "eqiR", "inE" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
PPx x : x \in D -> Px x \in P
:= fun Dx => imset_f _ Dx.
Let
PPx
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "Px", "imset_f" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
equivalence_partitionP : partition P D.
Proof. have defD: cover P == D. rewrite eqEsubset; apply/andP; split. by apply/bigcupsP=> _ /imsetP[x Dx ->]; rewrite /Px setIdE subsetIl. by apply/subsetP=> x Dx; apply/bigcupP; exists (Px x); rewrite (Pxx, PPx). have tiP: trivIset P. apply/trivIsetP=> _ _ /imsetP[x Dx ->] /imsetP[y Dy ->]; apply: contraR. ...
Lemma
equivalence_partitionP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "PPx", "Px", "Pxx", "apply", "bigcupP", "bigcupsP", "cover", "eqEsubset", "eqiR", "imsetP", "inE", "partition", "pred0Pn", "setIdE", "setP", "split", "subsetIl", "subsetP", "tiP", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblock_equivalence_partition : {in D &, forall x y, (y \in pblock P x) = R x y}.
Proof. have [_ tiP _] := and3P equivalence_partitionP. by move=> x y Dx Dy; rewrite /= (def_pblock tiP (PPx Dx) (Pxx Dx)) inE Dy. Qed.
Lemma
pblock_equivalence_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "PPx", "Pxx", "def_pblock", "equivalence_partitionP", "inE", "pblock", "tiP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblock_equivalence P D : partition P D -> {in D & &, equivalence_rel (fun x y => y \in pblock P x)}.
Proof. case/and3P=> /eqP <- tiP _ x y z Px Py Pz. by rewrite mem_pblock; split=> // /same_pblock->. Qed.
Lemma
pblock_equivalence
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px", "mem_pblock", "partition", "pblock", "same_pblock", "split", "tiP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
equivalence_partition_pblock P D : partition P D -> equivalence_partition (fun x y => y \in pblock P x) D = P.
Proof. case/and3P=> /eqP <-{D} tiP notP0; apply/setP=> B /=; set D := cover P. have defP x: x \in D -> [set y in D | y \in pblock P x] = pblock P x. by move=> Dx; apply/setIidPr; rewrite (bigcup_max (pblock P x)) ?pblock_mem. apply/imsetP/idP=> [[x Px ->{B}] | PB]; first by rewrite defP ?pblock_mem. have /set0Pn[x Bx...
Lemma
equivalence_partition_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "Px", "apply", "bigcupP", "bigcup_max", "cover", "def_pblock", "equivalence_partition", "imsetP", "memPn", "partition", "pblock", "pblock_mem", "set0", "set0Pn", "setIidPr", "setP", "tiP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preim_partition
:= equivalence_partition (fun x y => f x == f y).
Definition
preim_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "equivalence_partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preim_partitionP D : partition (preim_partition D) D.
Proof. by apply/equivalence_partitionP; split=> // /eqP->. Qed.
Lemma
preim_partitionP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "equivalence_partitionP", "partition", "preim_partition", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
preim_partition_pblock P D : partition P D -> preim_partition (pblock P) D = P.
Proof. move=> partP; have [/eqP defD tiP _] := and3P partP. rewrite -{2}(equivalence_partition_pblock partP); apply: eq_in_imset => x Dx. by apply/setP=> y; rewrite !inE eq_pblock ?defD. Qed.
Lemma
preim_partition_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Dx", "apply", "eq_in_imset", "eq_pblock", "equivalence_partition_pblock", "inE", "partition", "pblock", "preim_partition", "setP", "tiP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
transversalP P D : partition P D -> is_transversal (transversal P D) P D.
Proof. case/and3P=> /eqP <- tiP notP0; apply/and3P; split; first exact/and3P. apply/subsetP=> _ /imsetP[x Px ->]; case: pickP => //= y Pxy. by apply/bigcupP; exists (pblock P x); rewrite ?pblock_mem //. apply/forall_inP=> B PB; have /set0Pn[x Bx]: B != set0 := memPn notP0 B PB. apply/cards1P; exists (odflt x [pick ...
Lemma
transversalP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "Px", "apply", "bigcupP", "cards1P", "def_pblock", "eqEsubset", "forall_inP", "imsetP", "imset_f", "inE", "is_transversal", "last", "memPn", "mem_pblock", "partition", "pblock", "pblock_mem", "pick", "pickP", "same_pblock", "set0", "set0Pn", "setIP", "split", "sub1set...
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trPX : is_transversal X P D.
Hypothesis
trPX
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "is_transversal" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
transversal_sub : X \subset D.
Proof. by case/and3P: trPX. Qed.
Lemma
transversal_sub
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "trPX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
tiP : trivIset P.
Proof. by case/andP: trPX => /and3P[]. Qed.
Let
tiP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "trPX", "trivIset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sXP : {subset X <= cover P}.
Proof. by case/and3P: trPX => /andP[/eqP-> _] /subsetP. Qed.
Let
sXP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cover", "subsetP", "trPX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
trX : {in P, forall B, #|X :&: B| == 1}.
Proof. by case/and3P: trPX => _ _ /forall_inP. Qed.
Let
trX
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "forall_inP", "trPX" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
setI_transversal_pblock x0 B : B \in P -> X :&: B = [set transversal_repr x0 X B].
Proof. by case/trX/cards1P=> x defXB; rewrite /transversal_repr defXB /pick enum_set1. Qed.
Lemma
setI_transversal_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cards1P", "enum_set1", "pick", "trX", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
repr_mem_pblock x0 B : B \in P -> transversal_repr x0 X B \in B.
Proof. by move=> PB; rewrite -sub1set -setI_transversal_pblock ?subsetIr. Qed.
Lemma
repr_mem_pblock
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "setI_transversal_pblock", "sub1set", "subsetIr", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
repr_mem_transversal x0 B : B \in P -> transversal_repr x0 X B \in X.
Proof. by move=> PB; rewrite -sub1set -setI_transversal_pblock ?subsetIl. Qed.
Lemma
repr_mem_transversal
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "setI_transversal_pblock", "sub1set", "subsetIl", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
transversal_reprK x0 : {in P, cancel (transversal_repr x0 X) (pblock P)}.
Proof. by move=> B PB; rewrite /= (def_pblock tiP PB) ?repr_mem_pblock. Qed.
Lemma
transversal_reprK
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "def_pblock", "pblock", "repr_mem_pblock", "tiP", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblockK x0 : {in X, cancel (pblock P) (transversal_repr x0 X)}.
Proof. move=> x Xx; have /bigcupP[B PB Bx] := sXP Xx; rewrite (def_pblock tiP PB Bx). by apply/esym/set1P; rewrite -setI_transversal_pblock // inE Xx. Qed.
Lemma
pblockK
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "bigcupP", "def_pblock", "inE", "pblock", "sXP", "set1P", "setI_transversal_pblock", "tiP", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblock_inj : {in X &, injective (pblock P)}.
Proof. by move=> x0; apply: (can_in_inj (pblockK x0)). Qed.
Lemma
pblock_inj
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "pblock", "pblockK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
pblock_transversal : pblock P @: X = P.
Proof. apply/setP=> B; apply/imsetP/idP=> [[x Xx ->] | PB]. by rewrite pblock_mem ?sXP. have /cards1P[x0 _] := trX PB; set x := transversal_repr x0 X B. by exists x; rewrite ?transversal_reprK ?repr_mem_transversal. Qed.
Lemma
pblock_transversal
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "cards1P", "imsetP", "pblock", "pblock_mem", "repr_mem_transversal", "sXP", "setP", "trX", "transversal_repr", "transversal_reprK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
card_transversal : #|X| = #|P|.
Proof. by rewrite -pblock_transversal card_in_imset //; apply: pblock_inj. Qed.
Lemma
card_transversal
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "card_in_imset", "pblock_inj", "pblock_transversal" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
im_transversal_repr x0 : transversal_repr x0 X @: P = X.
Proof. rewrite -{2}[X]imset_id -pblock_transversal -imset_comp. by apply: eq_in_imset; apply: pblockK. Qed.
Lemma
im_transversal_repr
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "eq_in_imset", "imset_comp", "imset_id", "pblockK", "pblock_transversal", "transversal_repr" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
partition_partition (T : finType) (D : {set T}) P Q : partition P D -> partition Q P -> partition (cover @: Q) D /\ {in Q &, injective cover}.
Proof. move=> /and3P[/eqP defG tiP notP0] /and3P[/eqP defP tiQ notQ0]. have sQP E: E \in Q -> {subset E <= P}. by move=> Q_E; apply/subsetP; rewrite -defP (bigcup_max E). rewrite /partition cover_imset -(big_trivIset _ tiQ) defP -defG eqxx /= andbC. have{} notQ0: set0 \notin cover @: Q. apply: contra notP0 => /imse...
Lemma
partition_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "big_trivIset", "bigcupP", "bigcup_max", "cover", "cover_imset", "defG", "def_pblock", "eqxx", "imsetP", "memPn", "partition", "pred0Pn", "set0", "set0Pn", "subset0", "subsetP", "tiP", "trivIimset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
indexed_partition (I T : finType) (J : {pred I}) (B : I -> {set T}) : let P := [set B i | i in J] in {in J &, forall i j : I, j != i -> [disjoint B i & B j]} -> (forall i : I, J i -> B i != set0) -> partition P (cover P) /\ {in J &, injective B}.
Proof. move=> P disjB inhB; have s0NP : set0 \notin P. by apply/negP => /imsetP[x xI /eqP]; apply/negP; rewrite eq_sym inhB. by rewrite /partition eqxx s0NP andbT /=; apply: trivIimset. Qed.
Lemma
indexed_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "cover", "disjoint", "eq_sym", "eqxx", "imsetP", "partition", "set0", "trivIimset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fP
:= [set f @: (B : {set T}) | B in P].
Let
fP
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
imset_trivIset : trivIset fP = trivIset P.
Proof. apply/trivIsetP/trivIsetP => [trivP A B AP BP|]. - rewrite -(imset_disjoint inj_f) -(inj_eq (imset_inj inj_f)). by apply: trivP; rewrite imset_f. - move=> trivP ? ? /imsetP[A AP ->] /imsetP[B BP ->]. by rewrite (inj_eq (imset_inj inj_f)) imset_disjoint //; apply: trivP. Qed.
Lemma
imset_trivIset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "fP", "imsetP", "imset_disjoint", "imset_f", "imset_inj", "inj_eq", "inj_f", "trivIset", "trivIsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset0mem : (set0 \in fP) = (set0 \in P).
Proof. apply/imsetP/idP => [[A AP /esym/eqP]|P0]; last by exists set0; rewrite ?imset0. by rewrite imset_eq0 => /eqP<-. Qed.
Lemma
imset0mem
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "P0", "apply", "fP", "imset0", "imsetP", "imset_eq0", "last", "set0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
imset_partition : partition fP (f @: D) = partition P D.
Proof. suff cov: (cover fP == f @:D) = (cover P == D). by rewrite /partition -imset_trivIset imset0mem cov. by rewrite /fP cover_imset -imset_cover (inj_eq (imset_inj inj_f)). Qed.
Lemma
imset_partition
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "cover", "cover_imset", "fP", "imset0mem", "imset_cover", "imset_inj", "imset_trivIset", "inj_eq", "inj_f", "partition" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
sT
:= {set T}.
Notation
sT
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
minset P A
:= [forall (B : sT | B \subset A), (B == A) == P B].
Definition
minset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "sT" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minset_eq P1 P2 A : P1 =1 P2 -> minset P1 A = minset P2 A.
Proof. by move=> eP12; apply: eq_forallb => B; rewrite eP12. Qed.
Lemma
minset_eq
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "P1", "apply", "eq_forallb", "minset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minsetP P A : reflect ((P A) /\ (forall B, P B -> B \subset A -> B = A)) (minset P A).
Proof. apply: (iffP forallP) => [minA | [PA minA] B]. split; first by have:= minA A; rewrite subxx eqxx /= => /eqP. by move=> B PB sBA; have:= minA B; rewrite PB sBA /= eqb_id => /eqP. by apply/implyP=> sBA; apply/eqP; apply/eqP/idP=> [-> // | /minA]; apply. Qed.
Lemma
minsetP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "eqb_id", "eqxx", "forallP", "minA", "minset", "split", "subxx" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minsetp P A : minset P A -> P A.
Proof. by case/minsetP. Qed.
Lemma
minsetp
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "minset", "minsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minsetinf P A B : minset P A -> P B -> B \subset A -> B = A.
Proof. by case/minsetP=> _; apply. Qed.
Lemma
minsetinf
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "minset", "minsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ex_minset P : (exists A, P A) -> {A | minset P A}.
Proof. move=> exP; pose pS n := [pred B | P B & #|B| == n]. pose p n := ~~ pred0b (pS n); have{exP}: exists n, p n. by case: exP => A PA; exists #|A|; apply/existsP; exists A; rewrite /= PA /=. case/ex_minnP=> n /pred0P; case: (pickP (pS n)) => // A /andP[PA] /eqP <-{n} _. move=> minA; exists A => //; apply/minsetP; ...
Lemma
ex_minset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "eqEcard", "exP", "ex_minnP", "existsP", "minA", "minset", "minsetP", "pS", "pickP", "pred0P", "pred0Pn", "pred0b", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minset_exists P C : P C -> {A | minset P A & A \subset C}.
Proof. move=> PC; have{PC}: exists A, P A && (A \subset C) by exists C; rewrite PC /=. case/ex_minset=> A /minsetP[/andP[PA sAC] minA]; exists A => //; apply/minsetP. by split=> // B PB sBA; rewrite (minA B) // PB (subset_trans sBA). Qed.
Lemma
minset_exists
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "ex_minset", "minA", "minset", "minsetP", "split", "subset_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxset_key : unit.
Proof. by []. Qed.
Fact
maxset_key
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "unit" ]
The 'locked_with' allows Coq to find the value of P by unification.
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxset P A
:= minset (fun B => locked_with maxset_key P (~: B)) (~: A).
Definition
maxset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "maxset_key", "minset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxset_eq P1 P2 A : P1 =1 P2 -> maxset P1 A = maxset P2 A.
Proof. by move=> eP12; apply: minset_eq => x /=; rewrite !unlock_with eP12. Qed.
Lemma
maxset_eq
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "P1", "apply", "maxset", "minset_eq" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxminset P A : maxset P A = minset [pred B | P (~: B)] (~: A).
Proof. by rewrite /maxset unlock. Qed.
Lemma
maxminset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "maxset", "minset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minmaxset P A : minset P A = maxset [pred B | P (~: B)] (~: A).
Proof. by rewrite /maxset unlock setCK; apply: minset_eq => B /=; rewrite setCK. Qed.
Lemma
minmaxset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "maxset", "minset", "minset_eq", "setCK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxsetP P A : reflect ((P A) /\ (forall B, P B -> A \subset B -> B = A)) (maxset P A).
Proof. apply: (iffP minsetP); rewrite ?setCK unlock_with => [] [PA minA]. by split=> // B PB sAB; rewrite -[B]setCK [~: B]minA (setCK, setCS). by split=> // B PB' sBA'; rewrite -(minA _ PB') -1?setCS setCK. Qed.
Lemma
maxsetP
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "maxset", "minA", "minsetP", "setCK", "setCS", "split" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxsetp P A : maxset P A -> P A.
Proof. by case/maxsetP. Qed.
Lemma
maxsetp
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "maxset", "maxsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxsetsup P A B : maxset P A -> P B -> A \subset B -> B = A.
Proof. by case/maxsetP=> _; apply. Qed.
Lemma
maxsetsup
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "maxset", "maxsetP" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
ex_maxset P : (exists A, P A) -> {A | maxset P A}.
Proof. move=> exP; have{exP}: exists A, P (~: A). by case: exP => A PA; exists (~: A); rewrite setCK. by case/ex_minset=> A minA; exists (~: A); rewrite /maxset unlock setCK. Qed.
Lemma
ex_maxset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "exP", "ex_minset", "maxset", "minA", "setCK" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
maxset_exists P C : P C -> {A : sT | maxset P A & C \subset A}.
Proof. move=> PC; pose P' B := P (~: B); have: P' (~: C) by rewrite /P' setCK. case/minset_exists=> B; rewrite -[B]setCK setCS. by exists (~: B); rewrite // /maxset unlock. Qed.
Lemma
maxset_exists
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "maxset", "minset_exists", "sT", "setCK", "setCS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
(F_mono : {homo F : X Y / X \subset Y}).
Hypothesis
F_mono
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
n
:= #|T|.
Let
n
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
iterF i
:= iter i F set0.
Let
iterF
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "iter", "set0" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subset_iterS i : iterF i \subset iterF i.+1.
Proof. by elim: i => [| i IHi]; rewrite /= ?sub0set ?F_mono. Qed.
Lemma
subset_iterS
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "F_mono", "iterF", "sub0set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
subset_iter : {homo iterF : i j / i <= j >-> i \subset j}.
Proof. by apply: homo_leq => //[? ? ?|]; [apply: subset_trans|apply: subset_iterS]. Qed.
Lemma
subset_iter
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "homo_leq", "iterF", "subset_iterS", "subset_trans" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fixset
:= iterF n.
Definition
fixset
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "iterF" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fixsetK : F fixset = fixset.
Proof. suff /'exists_eqP[x /= e]: [exists k : 'I_n.+1, iterF k == iterF k.+1]. by rewrite /fixset -(subnK (leq_ord x)) /iterF iterD iter_fix. apply: contraT => /existsPn /(_ (Ordinal _)) /= neq_iter. suff iter_big k : k <= n.+1 -> k <= #|iter k F set0|. by have := iter_big _ (leqnn _); rewrite ltnNge max_card. elim...
Lemma
fixsetK
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "existsPn", "exists_eqP", "fixset", "iter", "iterD", "iterF", "iter_fix", "leq_ltn_trans", "leq_ord", "leqnn", "ltnNge", "ltnW", "max_card", "properEneq", "proper_card", "set0", "subnK", "subset_iterS" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
minset_fix : minset [pred X | F X == X] fixset.
Proof. apply/minsetP; rewrite inE fixsetK eqxx; split=> // X /eqP FXeqX Xsubfix. apply/eqP; rewrite eqEsubset Xsubfix/=. suff: fixset \subset iter n F X by rewrite iter_fix. by rewrite /fixset; elim: n => //= [|m IHm]; rewrite ?sub0set ?F_mono. Qed.
Lemma
minset_fix
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "F_mono", "apply", "eqEsubset", "eqxx", "fixset", "fixsetK", "inE", "iter", "iter_fix", "minset", "minsetP", "split", "sub0set" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fixsetKn k : iter k F fixset = fixset.
Proof. by rewrite iter_fix. Qed.
Lemma
fixsetKn
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "fixset", "iter", "iter_fix" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
iter_sub_fix k : iterF k \subset fixset.
Proof. have [/subset_iter //|/ltnW/subnK<-] := leqP k n; by rewrite /iterF iterD fixsetKn. Qed.
Lemma
iter_sub_fix
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "fixset", "fixsetKn", "iterD", "iterF", "leqP", "ltnW", "subnK", "subset_iter" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fix_order_proof x : x \in fixset -> exists n, x \in iterF n.
Proof. by move=> x_fix; exists n. Qed.
Lemma
fix_order_proof
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "fixset", "iterF" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fix_order (x : T)
:= if (x \in fixset) =P true isn't ReflectT x_fix then 0 else (ex_minn (fix_order_proof x_fix)).
Definition
fix_order
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "ex_minn", "fix_order_proof", "fixset" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
fix_order_le_max (x : T) : fix_order x <= n.
Proof. rewrite /fix_order; case: eqP => //= x_in. by case: ex_minnP => //= ? ?; apply. Qed.
Lemma
fix_order_le_max
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "apply", "ex_minnP", "fix_order" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d
in_iter_fix_orderE (x : T) : (x \in iterF (fix_order x)) = (x \in fixset).
Proof. rewrite /fix_order; case: eqP => [x_in | /negP/negPf-> /[1!inE]//]. by case: ex_minnP => m ->; rewrite x_in. Qed.
Lemma
in_iter_fix_orderE
boot
boot/finset.v
[ "HB", "structures", "mathcomp", "ssreflect", "ssrbool", "ssrfun", "eqtype", "ssrnat", "div", "seq", "choice", "fintype", "finfun", "bigop", "Monoid" ]
[ "ex_minnP", "fix_order", "fixset", "inE", "iterF" ]
https://github.com/math-comp/math-comp
91d97df9cf3204b4dab84f4e24bc633e84b6473d