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 |
|---|---|---|---|---|---|---|---|---|---|---|
enum1 x : enum (pred1 x) = [:: x]. | Proof.
rewrite [enum _](all_pred1P x _ _); last by rewrite size_filter enumP.
by apply/allP=> y; rewrite mem_enum.
Qed. | Lemma | enum1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"allP",
"all_pred1P",
"apply",
"enum",
"enumP",
"last",
"mem_enum",
"pred1",
"size_filter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pick_spec : option T -> Type | :=
| Pick x of P x : pick_spec (Some x)
| Nopick of P =1 xpred0 : pick_spec None. | Variant | pick_spec | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Pick"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pickP : pick_spec (pick P). | Proof.
rewrite /pick; case: (enum _) (mem_enum P) => [|x s] Pxs /=.
by right; apply: fsym.
by left; rewrite -[P _]Pxs mem_head.
Qed. | Lemma | pickP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum",
"mem_enum",
"mem_head",
"pick",
"pick_spec"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_enum A B : A =i B -> enum A = enum B. | Proof. by move=> eqAB; apply: eq_filter. Qed. | Lemma | eq_enum | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"enum",
"eq_filter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_pick P Q : P =1 Q -> pick P = pick Q. | Proof. by move=> eqPQ; rewrite /pick (eq_enum eqPQ). Qed. | Lemma | eq_pick | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_enum",
"pick"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardE A : #|A| = size (enum A). | Proof. by rewrite unlock. Qed. | Lemma | cardE | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_card A B : A =i B -> #|A| = #|B|. | Proof. by move=> eqAB; rewrite !cardE (eq_enum eqAB). Qed. | Lemma | eq_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"eq_enum"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_card_trans A B n : #|A| = n -> B =i A -> #|B| = n. | Proof. by move <-; apply: eq_card. Qed. | Lemma | eq_card_trans | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card0 : #|@pred0 T| = 0. | Proof. by rewrite cardE enum0. Qed. | Lemma | card0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum0"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardT : #|T| = size (enum T). | Proof. by rewrite cardE. Qed. | Lemma | cardT | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card1 x : #|pred1 x| = 1. | Proof. by rewrite cardE enum1. Qed. | Lemma | card1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"enum1",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_card0 A : A =i pred0 -> #|A| = 0. | Proof. exact: eq_card_trans card0. Qed. | Lemma | eq_card0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card0",
"eq_card_trans"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_cardT A : A =i predT -> #|A| = size (enum T). | Proof. exact: eq_card_trans cardT. Qed. | Lemma | eq_cardT | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardT",
"enum",
"eq_card_trans",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_card1 x A : A =i pred1 x -> #|A| = 1. | Proof. exact: eq_card_trans (card1 x). Qed. | Lemma | eq_card1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card1",
"eq_card_trans",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardUI A B : #|[predU A & B]| + #|[predI A & B]| = #|A| + #|B|. | Proof. by rewrite !cardE !size_filter count_predUI. Qed. | Lemma | cardUI | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"count_predUI",
"size_filter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardID B A : #|[predI A & B]| + #|[predD A & B]| = #|A|. | Proof.
rewrite -cardUI addnC [#|predI _ _|]eq_card0 => [x|] /=.
by rewrite !inE -!andbA andbC andbA andbN.
by apply: eq_card => x; rewrite !inE andbC -andb_orl orbN.
Qed. | Lemma | cardID | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnC",
"apply",
"cardUI",
"eq_card",
"eq_card0",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardC A : #|A| + #|[predC A]| = #|T|. | Proof. by rewrite !cardE !size_filter count_predC. Qed. | Lemma | cardC | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"count_predC",
"size_filter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardU1 x A : #|[predU1 x & A]| = (x \notin A) + #|A|. | Proof.
case Ax: (x \in A).
by apply: eq_card => y /[1!inE]/=; case: eqP => // ->.
rewrite /= -(card1 x) -cardUI addnC.
rewrite [#|predI _ _|]eq_card0 => [y /=|]; last exact: eq_card.
by rewrite !inE; case: eqP => // ->.
Qed. | Lemma | cardU1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnC",
"apply",
"card1",
"cardUI",
"eq_card",
"eq_card0",
"inE",
"last",
"predU1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card2 x y : #|pred2 x y| = (x != y).+1. | Proof. by rewrite cardU1 card1 addn1. Qed. | Lemma | card2 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addn1",
"card1",
"cardU1",
"pred2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardC1 x : #|predC1 x| = #|T|.-1. | Proof. by rewrite -(cardC (pred1 x)) card1. Qed. | Lemma | cardC1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card1",
"cardC",
"pred1",
"predC1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
cardD1 x A : #|A| = (x \in A) + #|[predD1 A & x]|. | Proof.
case Ax: (x \in A); last first.
by apply: eq_card => y /[!inE]/=; case: eqP => // ->.
rewrite /= -(card1 x) -cardUI addnC /=.
rewrite [#|predI _ _|]eq_card0 => [y|]; first by rewrite !inE; case: eqP.
by apply: eq_card => y /[!inE]; case: eqP => // ->.
Qed. | Lemma | cardD1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addnC",
"apply",
"card1",
"cardUI",
"eq_card",
"eq_card0",
"inE",
"last",
"predD1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
max_card A : #|A| <= #|T|. | Proof. by rewrite -(cardC A) leq_addr. Qed. | Lemma | max_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardC",
"leq_addr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_size s : #|s| <= size s. | Proof.
elim: s => [|x s IHs] /=; first by rewrite card0.
by rewrite cardU1 /=; case: (~~ _) => //; apply: leqW.
Qed. | Lemma | card_size | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card0",
"cardU1",
"leqW",
"size"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_uniqP s : reflect (#|s| = size s) (uniq s). | Proof.
elim: s => [|x s IHs]; first by left; apply: card0.
rewrite cardU1 /= /addn; case: {+}(x \in s) => /=.
by right=> card_Ssz; have:= card_size s; rewrite card_Ssz ltnn.
by apply: (iffP IHs) => [<-| [<-]].
Qed. | Lemma | card_uniqP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"addn",
"apply",
"card0",
"cardU1",
"card_size",
"ltnn",
"size",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card0_eq A : #|A| = 0 -> A =i pred0. | Proof. by move=> A0 x; apply/idP => Ax; rewrite (cardD1 x) Ax in A0. Qed. | Lemma | card0_eq | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardD1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fintype0 : T -> #|T| <> 0. | Proof. by move=> x /card0_eq/(_ x). Qed. | Lemma | fintype0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card0_eq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pred0P P : reflect (P =1 pred0) (pred0b P). | Proof. by apply: (iffP eqP); [apply: card0_eq | apply: eq_card0]. Qed. | Lemma | pred0P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card0_eq",
"eq_card0",
"pred0b"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pred0Pn P : reflect (exists x, P x) (~~ pred0b P). | Proof.
case: (pickP P) => [x Px | P0].
by rewrite (introN (pred0P P)) => [P0|]; [rewrite P0 in Px | left; exists x].
by rewrite -lt0n eq_card0 //; right=> [[x]]; rewrite P0.
Qed. | Lemma | pred0Pn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"P0",
"Px",
"eq_card0",
"lt0n",
"pickP",
"pred0P",
"pred0b"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_gt0P A : reflect (exists i, i \in A) (#|A| > 0). | Proof. by rewrite lt0n; apply: pred0Pn. Qed. | Lemma | card_gt0P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"lt0n",
"pred0Pn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_le1P {A} : reflect {in A, forall x, A =i pred1 x} (#|A| <= 1). | Proof.
apply: (iffP idP) => [A1 x xA y|]; last first.
by have [/= x xA /(_ _ xA)/eq_card1->|/eq_card0->//] := pickP [in A].
move: A1; rewrite (cardD1 x) xA ltnS leqn0 => /eqP/card0_eq/(_ y).
by rewrite !inE; have [->|]:= eqP.
Qed. | Lemma | card_le1P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card0_eq",
"cardD1",
"eq_card0",
"eq_card1",
"inE",
"last",
"leqn0",
"ltnS",
"pickP",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_card1 A : #|A| = 1 -> {x | A =i pred1 x}. | Proof.
move=> A1; have /card_gt0P/sigW[x xA]: #|A| > 0 by rewrite A1.
by exists x; apply/card_le1P; rewrite ?A1.
Qed. | Lemma | mem_card1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_gt0P",
"card_le1P",
"pred1",
"sigW"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card1P A : reflect (exists x, A =i pred1 x) (#|A| == 1). | Proof.
by apply: (iffP idP) => [/eqP/mem_card1[x inA]|[x /eq_card1/eqP//]]; exists x.
Qed. | Lemma | card1P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_card1",
"inA",
"mem_card1",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_le1_eqP A :
reflect {in A &, forall x, all_equal_to x} (#|A| <= 1). | Proof.
apply: (iffP card_le1P) => [Ale1 x y xA yA /=|all_eq x xA y].
by apply/eqP; rewrite -[_ == _]/(y \in pred1 x) -Ale1.
by rewrite inE; case: (altP (y =P x)) => [->//|]; exact/contra_neqF/all_eq.
Qed. | Lemma | card_le1_eqP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_le1P",
"contra_neqF",
"inE",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fintype_le1P : reflect (forall x : T, all_equal_to x) (#|T| <= 1). | Proof. apply: (iffP (card_le1_eqP {:T})); [exact: in2T | exact: in2W]. Qed. | Lemma | fintype_le1P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_le1_eqP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fintype1 : #|T| = 1 -> {x : T | all_equal_to x}. | Proof.
by move=> /mem_card1[x ex]; exists x => y; suff: y \in T by rewrite ex => /eqP.
Qed. | Lemma | fintype1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ex",
"mem_card1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fintype1P : reflect (exists x, all_equal_to x) (#|T| == 1). | Proof.
apply: (iffP idP) => [/eqP/fintype1|] [x eqx]; first by exists x.
by apply/card1P; exists x => y; rewrite eqx !inE eqxx.
Qed. | Lemma | fintype1P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card1P",
"eqxx",
"fintype1",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subsetE A B : (A \subset B) = pred0b [predD A & B]. | Proof. by rewrite unlock. Qed. | Lemma | subsetE | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"pred0b"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subsetP A B : reflect {subset A <= B} (A \subset B). | Proof.
rewrite unlock; apply: (iffP (pred0P _)) => [AB0 x | sAB x /=].
by apply/implyP; apply/idPn; rewrite negb_imply andbC [_ && _]AB0.
by rewrite andbC -negb_imply; apply/negbF/implyP; apply: sAB.
Qed. | Lemma | subsetP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"pred0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subsetPn A B :
reflect (exists2 x, x \in A & x \notin B) (~~ (A \subset B)). | Proof.
rewrite unlock; apply: (iffP (pred0Pn _)) => [[x] | [x Ax nBx]].
by case/andP; exists x.
by exists x; rewrite /= nBx.
Qed. | Lemma | subsetPn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"pred0Pn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_leq_card A B : A \subset B -> #|A| <= #|B|. | Proof.
move=> sAB.
rewrite -(cardID A B) [#|predI _ _|](@eq_card _ A) ?leq_addr //= => x.
by rewrite !inE andbC; case Ax: (x \in A) => //; apply: subsetP Ax.
Qed. | Lemma | subset_leq_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardID",
"eq_card",
"inE",
"leq_addr",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subxx_hint (mA : mem_pred T) : subset mA mA. | Proof.
by case: mA => A; have:= introT (subsetP A A); rewrite !unlock => ->.
Qed. | Lemma | subxx_hint | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subxx (pT : predType T) (pA : pT) : pA \subset pA. | Proof. by []. Qed. | Lemma | subxx | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"pA"
] | The parametrization by predType makes it easier to apply subxx. | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
eq_subset A B : A =i B -> subset (mem A) =1 subset (mem B). | Proof.
move=> eqAB [C]; rewrite !unlock; congr (_ == 0).
by apply: eq_card => x; rewrite inE /= eqAB.
Qed. | Lemma | eq_subset | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_card",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_subset_r A B :
A =i B -> (@subset T)^~ (mem A) =1 (@subset T)^~ (mem B). | Proof.
move=> eqAB [C]; rewrite !unlock; congr (_ == 0).
by apply: eq_card => x; rewrite !inE /= eqAB.
Qed. | Lemma | eq_subset_r | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_card",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_subxx A B : A =i B -> A \subset B. | Proof. by move/eq_subset->. Qed. | Lemma | eq_subxx | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_subset"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_predT A : A \subset T. | Proof. exact/subsetP. Qed. | Lemma | subset_predT | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
predT_subset A : T \subset A -> forall x, x \in A. | Proof. by move/subsetP=> allA x; apply: allA. Qed. | Lemma | predT_subset | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_pred1 A x : (pred1 x \subset A) = (x \in A). | Proof. by apply/subsetP/idP=> [-> // | Ax y /eqP-> //]; apply: eqxx. Qed. | Lemma | subset_pred1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eqxx",
"pred1",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_eqP A B : reflect (A =i B) ((A \subset B) && (B \subset A)). | Proof.
apply: (iffP andP) => [[sAB sBA] x| eqAB]; last by rewrite !eq_subxx.
by apply/idP/idP; apply: subsetP.
Qed. | Lemma | subset_eqP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_subxx",
"last",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_cardP A B : #|A| = #|B| -> reflect (A =i B) (A \subset B). | Proof.
move=> eqcAB; case: (subsetP A B) (subset_eqP A B) => //= sAB.
case: (subsetP B A) => [//|[]] x Bx; apply/idPn => Ax.
case/idP: (ltnn #|A|); rewrite {2}eqcAB (cardD1 x B) Bx /=.
apply: subset_leq_card; apply/subsetP=> y Ay; rewrite inE /= andbC.
by rewrite sAB //; apply/eqP => eqyx; rewrite -eqyx Ay in Ax.
Qed. | Lemma | subset_cardP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardD1",
"inE",
"ltnn",
"subsetP",
"subset_eqP",
"subset_leq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_leqif_card A B : A \subset B -> #|A| <= #|B| ?= iff (B \subset A). | Proof.
move=> sAB; split; [exact: subset_leq_card | apply/eqP/idP].
by move/subset_cardP=> sABP; rewrite (eq_subset_r (sABP sAB)).
by move=> sBA; apply: eq_card; apply/subset_eqP; rewrite sAB.
Qed. | Lemma | subset_leqif_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_card",
"eq_subset_r",
"split",
"subset_cardP",
"subset_eqP",
"subset_leq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_trans A B C : A \subset B -> B \subset C -> A \subset C. | Proof.
by move/subsetP=> sAB /subsetP=> sBC; apply/subsetP=> x /sAB; apply: sBC.
Qed. | Lemma | subset_trans | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_all s A : (s \subset A) = all [in A] s. | Proof. exact: (sameP (subsetP _ _) allP). Qed. | Lemma | subset_all | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"all",
"allP",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_cons s x : s \subset x :: s. | Proof. by apply/subsetP => y /[!inE] ->; rewrite orbT. Qed. | Lemma | subset_cons | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"inE",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_cons2 s1 s2 x : s1 \subset s2 -> x :: s1 \subset x :: s2. | Proof.
by move=> ?; apply/subsetP => y /[!inE]; case: eqP => // _; apply: subsetP.
Qed. | Lemma | subset_cons2 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"inE",
"s1",
"s2",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_catl s s' : s \subset s ++ s'. | Proof. by apply/subsetP=> x xins; rewrite mem_cat xins. Qed. | Lemma | subset_catl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"mem_cat",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_catr s s' : s \subset s' ++ s. | Proof. by apply/subsetP => x xins; rewrite mem_cat xins orbT. Qed. | Lemma | subset_catr | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"mem_cat",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_cat2 s1 s2 s3 : s1 \subset s2 -> s3 ++ s1 \subset s3 ++ s2. | Proof.
move=> /subsetP s12; apply/subsetP => x.
by rewrite !mem_cat => /orP[->|/s12->]; rewrite ?orbT.
Qed. | Lemma | subset_cat2 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"mem_cat",
"s1",
"s12",
"s2",
"s3",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
filter_subset p s : [seq a <- s | p a] \subset s. | Proof. by apply/subsetP=> x; rewrite mem_filter => /andP[]. Qed. | Lemma | filter_subset | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"mem_filter",
"seq",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_filter p s1 s2 :
s1 \subset s2 -> [seq a <- s1 | p a] \subset [seq a <- s2 | p a]. | Proof.
by move/subsetP=> s12; apply/subsetP=> x; rewrite !mem_filter=> /andP[-> /s12].
Qed. | Lemma | subset_filter | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"mem_filter",
"s1",
"s12",
"s2",
"seq",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
properE A B : (A \proper B) = (A \subset B) && ~~ (B \subset A). | Proof. by []. Qed. | Lemma | properE | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"proper"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
properP A B :
reflect (A \subset B /\ (exists2 x, x \in B & x \notin A)) (A \proper B). | Proof. by rewrite properE; apply: (iffP andP) => [] [-> /subsetPn]. Qed. | Lemma | properP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"proper",
"properE",
"subsetPn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_sub A B : A \proper B -> A \subset B. | Proof. by case/andP. Qed. | Lemma | proper_sub | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"proper"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_subn A B : A \proper B -> ~~ (B \subset A). | Proof. by case/andP. Qed. | Lemma | proper_subn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"proper"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_trans A B C : A \proper B -> B \proper C -> A \proper C. | Proof.
case/properP=> sAB [x Bx nAx] /properP[sBC [y Cy nBy]].
rewrite properE (subset_trans sAB) //=; apply/subsetPn; exists y => //.
by apply: contra nBy; apply: subsetP.
Qed. | Lemma | proper_trans | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"proper",
"properE",
"properP",
"subsetP",
"subsetPn",
"subset_trans"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_sub_trans A B C : A \proper B -> B \subset C -> A \proper C. | Proof.
case/properP=> sAB [x Bx nAx] sBC; rewrite properE (subset_trans sAB) //.
by apply/subsetPn; exists x; rewrite ?(subsetP _ _ sBC).
Qed. | Lemma | proper_sub_trans | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"proper",
"properE",
"properP",
"subsetP",
"subsetPn",
"subset_trans"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
sub_proper_trans A B C : A \subset B -> B \proper C -> A \proper C. | Proof.
move=> sAB /properP[sBC [x Cx nBx]]; rewrite properE (subset_trans sAB) //.
by apply/subsetPn; exists x => //; apply: contra nBx; apply: subsetP.
Qed. | Lemma | sub_proper_trans | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"proper",
"properE",
"properP",
"subsetP",
"subsetPn",
"subset_trans"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_card A B : A \proper B -> #|A| < #|B|. | Proof.
by case/andP=> sAB nsBA; rewrite ltn_neqAle !(subset_leqif_card sAB) andbT.
Qed. | Lemma | proper_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"ltn_neqAle",
"proper",
"subset_leqif_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
proper_irrefl A : ~~ (A \proper A). | Proof. by rewrite properE subxx. Qed. | Lemma | proper_irrefl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"proper",
"properE",
"subxx"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
properxx A : (A \proper A) = false. | Proof. by rewrite properE subxx. Qed. | Lemma | properxx | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"proper",
"properE",
"subxx"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_proper A B : A =i B -> proper (mem A) =1 proper (mem B). | Proof.
move=> eAB [C]; congr (_ && _); first exact: (eq_subset eAB).
by rewrite (eq_subset_r eAB).
Qed. | Lemma | eq_proper | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_subset",
"eq_subset_r",
"proper"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_proper_r A B :
A =i B -> (@proper T)^~ (mem A) =1 (@proper T)^~ (mem B). | Proof.
move=> eAB [C]; congr (_ && _); first exact: (eq_subset_r eAB).
by rewrite (eq_subset eAB).
Qed. | Lemma | eq_proper_r | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_subset",
"eq_subset_r",
"proper"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_geqP {A n} :
reflect (exists s, [/\ uniq s, size s = n & {subset s <= A}]) (n <= #|A|). | Proof.
apply: (iffP idP) => [n_le_A|[s] [uniq_s size_s /subsetP subA]]; last first.
by rewrite -size_s -(card_uniqP _ uniq_s); exact: subset_leq_card.
exists (take n (enum A)); rewrite take_uniq ?enum_uniq // size_take.
split => //; last by move => x /mem_take; rewrite mem_enum.
case: (ltnP n (size (enum A))) => // s... | Lemma | card_geqP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardE",
"card_uniqP",
"enum",
"enum_uniq",
"eqn_leq",
"last",
"ltnP",
"mem_enum",
"mem_take",
"size",
"size_take",
"split",
"subsetP",
"subset_leq_card",
"take",
"take_uniq",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_gt1P A :
reflect (exists x y, [/\ x \in A, y \in A & x != y]) (1 < #|A|). | Proof.
apply: (iffP card_geqP) => [[s] []|[x] [y] [xA yA xDy]].
case: s => [|a [|b []]]//= /[!(inE, andbT)] aDb _ subD.
by exists a, b; rewrite aDb !subD ?inE ?eqxx ?orbT.
by exists [:: x; y]; rewrite /= !inE xDy; split=> // z /[!inE] /pred2P[]->.
Qed. | Lemma | card_gt1P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_geqP",
"eqxx",
"inE",
"pred2P",
"split"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_gt2P A :
reflect (exists x y z,
[/\ x \in A, y \in A & z \in A] /\ [/\ x != y, y != z & z != x])
(2 < #|A|). | Proof.
apply: (iffP card_geqP) => [[s] []|[x] [y] [z] [[xD yD zD] [xDy xDz yDz]]].
case: s => [|x [|y [|z []]]]//=; rewrite !inE !andbT negb_or -andbA.
case/and3P => xDy xDz yDz _ subA.
by exists x, y, z; rewrite xDy yDz eq_sym xDz !subA ?inE ?eqxx ?orbT.
exists [:: x; y; z]; rewrite /= !inE negb_or xDy xDz eq_sy... | Lemma | card_gt2P | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_geqP",
"eq_sym",
"eqxx",
"inE",
"split"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint_sym A B : [disjoint A & B] = [disjoint B & A]. | Proof. by congr (_ == 0); apply: eq_card => x; apply: andbC. Qed. | Lemma | disjoint_sym | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_disjoint A B : A =i B -> disjoint (mem A) =1 disjoint (mem B). | Proof.
by move=> eqAB [C]; congr (_ == 0); apply: eq_card => x; rewrite !inE eqAB.
Qed. | Lemma | eq_disjoint | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eq_card",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_disjoint_r A B : A =i B ->
(@disjoint T)^~ (mem A) =1 (@disjoint T)^~ (mem B). | Proof.
by move=> eqAB [C]; congr (_ == 0); apply: eq_card => x; rewrite !inE eqAB.
Qed. | Lemma | eq_disjoint_r | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eq_card",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
subset_disjoint A B : (A \subset B) = [disjoint A & [predC B]]. | Proof. by rewrite disjoint_sym unlock. Qed. | Lemma | subset_disjoint | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjoint_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint_subset A B : [disjoint A & B] = (A \subset [predC B]). | Proof.
by rewrite subset_disjoint; apply: eq_disjoint_r => x; rewrite !inE /= negbK.
Qed. | Lemma | disjoint_subset | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eq_disjoint_r",
"inE",
"subset_disjoint"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointFr A B x : [disjoint A & B] -> x \in A -> (x \in B) = false. | Proof. by move/pred0P/(_ x) => /=; case: (x \in A). Qed. | Lemma | disjointFr | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"pred0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointFl A B x : [disjoint A & B] -> x \in B -> (x \in A) = false. | Proof. rewrite disjoint_sym; exact: disjointFr. Qed. | Lemma | disjointFl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjointFr",
"disjoint_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointWl A B C :
A \subset B -> [disjoint B & C] -> [disjoint A & C]. | Proof. by rewrite 2!disjoint_subset; apply: subset_trans. Qed. | Lemma | disjointWl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"disjoint_subset",
"subset_trans"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointWr A B C : A \subset B -> [disjoint C & B] -> [disjoint C & A]. | Proof. rewrite ![[disjoint C & _]]disjoint_sym. exact:disjointWl. Qed. | Lemma | disjointWr | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjointWl",
"disjoint_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointW A B C D :
A \subset B -> C \subset D -> [disjoint B & D] -> [disjoint A & C]. | Proof.
by move=> subAB subCD BD; apply/(disjointWl subAB)/(disjointWr subCD).
Qed. | Lemma | disjointW | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"disjointWl",
"disjointWr"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint0 A : [disjoint pred0 & A]. | Proof. exact/pred0P. Qed. | Lemma | disjoint0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"pred0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_disjoint0 A B : A =i pred0 -> [disjoint A & B]. | Proof. by move/eq_disjoint->; apply: disjoint0. Qed. | Lemma | eq_disjoint0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"disjoint0",
"eq_disjoint"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint1 x A : [disjoint pred1 x & A] = (x \notin A). | Proof.
apply/negbRL/(sameP (pred0Pn _))=> /=.
apply: introP => [Ax | notAx [_ /andP[/eqP->]]]; last exact: negP.
by exists x; rewrite inE eqxx.
Qed. | Lemma | disjoint1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eqxx",
"inE",
"last",
"pred0Pn",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_disjoint1 x A B :
A =i pred1 x -> [disjoint A & B] = (x \notin B). | Proof. by move/eq_disjoint->; apply: disjoint1. Qed. | Lemma | eq_disjoint1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"disjoint1",
"eq_disjoint",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointU A B C :
[disjoint predU A B & C] = [disjoint A & C] && [disjoint B & C]. | Proof.
case: [disjoint A & C] / (pred0P (xpredI A C)) => [A0 | nA0] /=.
by congr (_ == 0); apply: eq_card => x; rewrite [x \in _]andb_orl A0.
apply/pred0P=> nABC; case: nA0 => x; apply/idPn=> /=; move/(_ x): nABC.
by rewrite [_ x]andb_orl; case/norP.
Qed. | Lemma | disjointU | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"eq_card",
"pred0P"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjointU1 x A B :
[disjoint predU1 x A & B] = (x \notin B) && [disjoint A & B]. | Proof. by rewrite disjointU disjoint1. Qed. | Lemma | disjointU1 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjoint1",
"disjointU",
"predU1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint_cons x s B :
[disjoint x :: s & B] = (x \notin B) && [disjoint s & B]. | Proof. exact: disjointU1. Qed. | Lemma | disjoint_cons | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjointU1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint_has s A : [disjoint s & A] = ~~ has [in A] s. | Proof.
apply/negbRL; apply/pred0Pn/hasP => [[x /andP[]]|[x]]; exists x => //.
exact/andP.
Qed. | Lemma | disjoint_has | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"disjoint",
"has",
"hasP",
"pred0Pn"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
disjoint_cat s1 s2 A :
[disjoint s1 ++ s2 & A] = [disjoint s1 & A] && [disjoint s2 & A]. | Proof. by rewrite !disjoint_has has_cat negb_or. Qed. | Lemma | disjoint_cat | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"disjoint",
"disjoint_has",
"has_cat",
"s1",
"s2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
map_subset {T T' : finType} (s1 s2 : seq T) (f : T -> T') :
s1 \subset s2 -> [seq f x | x <- s1 ] \subset [seq f x | x <- s2]. | Proof.
move=> s1s2; apply/subsetP => _ /mapP[y] /[swap] -> ys1.
by apply/mapP; exists y => //; move/subsetP : s1s2; exact.
Qed. | Lemma | map_subset | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"apply",
"mapP",
"s1",
"s2",
"seq",
"subsetP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
viewP : forall x, reflect (PP x) (P x). | Hypothesis | viewP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
existsPP : reflect (exists x, PP x) [exists x, P x]. | Proof. by apply: (iffP pred0Pn) => -[x /viewP]; exists x. Qed. | Lemma | existsPP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"pred0Pn",
"viewP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
forallPP : reflect (forall x, PP x) [forall x, P x]. | Proof. by apply: (iffP pred0P) => /= allP x; have /viewP//=-> := allP x. Qed. | Lemma | forallPP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"allP",
"apply",
"pred0P",
"viewP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"'exists_ view" | := (existsPP (fun _ => view))
(at level 4, right associativity, format "''exists_' view"). | Notation | 'exists_ view | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"existsPP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"'forall_ view" | := (forallPP (fun _ => view))
(at level 4, right associativity, format "''forall_' view"). | Notation | 'forall_ view | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"forallPP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.