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 |
|---|---|---|---|---|---|---|---|---|---|---|
forallP P : reflect (forall x, P x) [forall x, P x]. | Proof. exact: 'forall_idP. Qed. | Lemma | forallP | 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 | |
eqfunP f1 f2 : reflect (forall x, f1 x = f2 x) [forall x, f1 x == f2 x]. | Proof. exact: 'forall_eqP. Qed. | Lemma | eqfunP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"f1",
"f2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
forall_inP D P : reflect (forall x, D x -> P x) [forall (x | D x), P x]. | Proof. exact: 'forall_implyP. Qed. | Lemma | forall_inP | 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 | |
forall_inPP D P PP : (forall x, reflect (PP x) (P x)) ->
reflect (forall x, D x -> PP x) [forall (x | D x), P x]. | Proof. by move=> vP; apply: (iffP (forall_inP _ _)) => /(_ _ _) /vP. Qed. | Lemma | forall_inPP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"forall_inP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eqfun_inP D f1 f2 :
reflect {in D, forall x, f1 x = f2 x} [forall (x | x \in D), f1 x == f2 x]. | Proof. exact: (forall_inPP _ (fun=> eqP)). Qed. | Lemma | eqfun_inP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"f1",
"f2",
"forall_inPP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
existsP P : reflect (exists x, P x) [exists x, P x]. | Proof. exact: 'exists_idP. Qed. | Lemma | existsP | 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 | |
existsb P (x : T) : P x -> [exists x, P x]. | Proof. by move=> Px; apply/existsP; exists x. Qed. | Lemma | existsb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Px",
"apply",
"existsP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_eqP f1 f2 :
reflect (exists x, f1 x = f2 x) [exists x, f1 x == f2 x]. | Proof. exact: 'exists_eqP. Qed. | Lemma | exists_eqP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"f1",
"f2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_inP D P : reflect (exists2 x, D x & P x) [exists (x | D x), P x]. | Proof. by apply: (iffP 'exists_andP) => [[x []] | [x]]; exists x. Qed. | Lemma | exists_inP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_inb D P (x : T) : D x -> P x -> [exists (x | D x), P x]. | Proof. by move=> Dx Px; apply/exists_inP; exists x. Qed. | Lemma | exists_inb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Dx",
"Px",
"apply",
"exists_inP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_inPP D P PP : (forall x, reflect (PP x) (P x)) ->
reflect (exists2 x, D x & PP x) [exists (x | D x), P x]. | Proof. by move=> vP; apply: (iffP (exists_inP _ _)) => -[x?/vP]; exists x. Qed. | Lemma | exists_inPP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"exists_inP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_eq_inP D f1 f2 :
reflect (exists2 x, D x & f1 x = f2 x) [exists (x | D x), f1 x == f2 x]. | Proof. exact: (exists_inPP _ (fun=> eqP)). Qed. | Lemma | exists_eq_inP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"exists_inPP",
"f1",
"f2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_existsb P1 P2 : P1 =1 P2 -> [exists x, P1 x] = [exists x, P2 x]. | Proof. by move=> eqP12; congr (_ != 0); apply: eq_card. Qed. | Lemma | eq_existsb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"P1",
"apply",
"eq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_existsb_in D P1 P2 :
(forall x, D x -> P1 x = P2 x) ->
[exists (x | D x), P1 x] = [exists (x | D x), P2 x]. | Proof. by move=> eqP12; apply: eq_existsb => x; apply: andb_id2l => /eqP12. Qed. | Lemma | eq_existsb_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"P1",
"apply",
"eq_existsb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_forallb P1 P2 : P1 =1 P2 -> [forall x, P1 x] = [forall x, P2 x]. | Proof. by move=> eqP12; apply/negb_inj/eq_existsb=> /= x; rewrite eqP12. Qed. | Lemma | eq_forallb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"P1",
"apply",
"eq_existsb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_forallb_in D P1 P2 :
(forall x, D x -> P1 x = P2 x) ->
[forall (x | D x), P1 x] = [forall (x | D x), P2 x]. | Proof.
by move=> eqP12; apply: eq_forallb => i; case Di: (D i); rewrite // eqP12.
Qed. | Lemma | eq_forallb_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"P1",
"apply",
"eq_forallb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
existsbWl P Q : [exists x, P x && Q x] -> [exists x, P x]. | Proof. move => /existsP ; case => x /andP [H _] ; apply/existsP ; by exists x. Qed. | Lemma | existsbWl | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"existsP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
existsbWr P Q : [exists x, P x && Q x] -> [exists x, Q x]. | Proof. move => /existsP ; case => x /andP [_ H] ; apply/existsP ; by exists x. Qed. | Lemma | existsbWr | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"existsP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
negb_forall P : ~~ [forall x, P x] = [exists x, ~~ P x]. | Proof. by []. Qed. | Lemma | negb_forall | 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 | |
negb_forall_in D P :
~~ [forall (x | D x), P x] = [exists (x | D x), ~~ P x]. | Proof. by apply: eq_existsb => x; rewrite negb_imply. Qed. | Lemma | negb_forall_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_existsb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
negb_exists P : ~~ [exists x, P x] = [forall x, ~~ P x]. | Proof. by apply/negbLR/esym/eq_existsb=> x; apply: negbK. Qed. | Lemma | negb_exists | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_existsb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
negb_exists_in D P :
~~ [exists (x | D x), P x] = [forall (x | D x), ~~ P x]. | Proof. by rewrite negb_exists; apply/eq_forallb => x; rewrite [~~ _]fun_if. Qed. | Lemma | negb_exists_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"eq_forallb",
"negb_exists"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
existsPn P :
reflect (forall x, ~~ P x) (~~ [exists x, P x]). | Proof. rewrite negb_exists. exact: forallP. Qed. | Lemma | existsPn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"forallP",
"negb_exists"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
forallPn P :
reflect (exists x, ~~ P x) (~~ [forall x, P x]). | Proof. rewrite negb_forall. exact: existsP. Qed. | Lemma | forallPn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"existsP",
"negb_forall"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
exists_inPn D P :
reflect (forall x, x \in D -> ~~ P x) (~~ [exists x in D, P x]). | Proof. rewrite negb_exists_in. exact: forall_inP. Qed. | Lemma | exists_inPn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"forall_inP",
"negb_exists_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
forall_inPn D P :
reflect (exists2 x, x \in D & ~~ P x) (~~ [forall x in D, P x]). | Proof. rewrite negb_forall_in. exact: exists_inP. Qed. | Lemma | forall_inPn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"exists_inP",
"negb_forall_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"'exists_in_ view" | := (exists_inPP _ (fun _ => view))
(at level 4, right associativity, format "''exists_in_' view"). | Notation | 'exists_in_ view | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"exists_inPP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"'forall_in_ view" | := (forall_inPP _ (fun _ => view))
(at level 4, right associativity, format "''forall_in_' view"). | Notation | 'forall_in_ view | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"forall_inPP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dinjectiveb f D | := uniq (map f (enum D)). | Definition | dinjectiveb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum",
"map",
"uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
injectiveb f | := dinjectiveb f aT. | Definition | injectiveb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"aT",
"dinjectiveb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dinjectivePn f D :
reflect (exists2 x, x \in D & exists2 y, y \in [predD1 D & x] & f x = f y)
(~~ dinjectiveb f D). | Proof.
apply: (iffP idP) => [injf | [x Dx [y Dxy eqfxy]]]; last first.
move: Dx; rewrite -(mem_enum D) => /rot_to[i E defE].
rewrite /dinjectiveb -(rot_uniq i) -map_rot defE /=; apply/nandP; left.
rewrite inE /= -(mem_enum D) -(mem_rot i) defE inE in Dxy.
rewrite andb_orr andbC andbN in Dxy.
by rewrite eqfxy ... | Lemma | dinjectivePn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Dx",
"apply",
"contraNeq",
"dinjectiveb",
"enum_uniq",
"eq_sym",
"existsP",
"exists_inP",
"inE",
"injf",
"last",
"map_f",
"map_inj_in_uniq",
"map_rot",
"mem_enum",
"mem_rot",
"pickP",
"predD1",
"rot_to",
"rot_uniq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
dinjectiveP f D : reflect {in D &, injective f} (dinjectiveb f D). | Proof.
rewrite -[dinjectiveb f D]negbK.
case: dinjectivePn=> [noinjf | injf]; constructor.
case: noinjf => x Dx [y /andP[neqxy /= Dy] eqfxy] injf.
by case/eqP: neqxy; apply: injf.
move=> x y Dx Dy /= eqfxy; apply/eqP; apply/idPn=> nxy; case: injf.
by exists x => //; exists y => //=; rewrite inE /= eq_sym nxy.
Qed. | Lemma | dinjectiveP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Dx",
"apply",
"dinjectivePn",
"dinjectiveb",
"eq_sym",
"inE",
"injf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_dinjectiveb f1 f2 D1 D2 :
f1 =1 f2 -> D1 =i D2 -> dinjectiveb f1 D1 = dinjectiveb f2 D2. | Proof.
move=> ef eD; rewrite /dinjectiveb (eq_enum eD).
by under eq_map => x do rewrite ef.
Qed. | Lemma | eq_dinjectiveb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"dinjectiveb",
"eq_enum",
"eq_map",
"f1",
"f2"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
injectivePn f :
reflect (exists x, exists2 y, x != y & f x = f y) (~~ injectiveb f). | Proof.
apply: (iffP (dinjectivePn _ _)) => [[x _ [y nxy eqfxy]] | [x [y nxy eqfxy]]];
by exists x => //; exists y => //; rewrite inE /= andbT eq_sym in nxy *.
Qed. | Lemma | injectivePn | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"dinjectivePn",
"eq_sym",
"inE",
"injectiveb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
injectiveP f : reflect (injective f) (injectiveb f). | Proof.
by apply: (iffP (dinjectiveP _ _)) => injf x y => [|_ _]; apply: injf.
Qed. | Lemma | injectiveP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"dinjectiveP",
"injectiveb",
"injf"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_injectiveb f1 f2 : f1 =1 f2 -> injectiveb f1 = injectiveb f2. | Proof. move=> ?; exact: eq_dinjectiveb. Qed. | Lemma | eq_injectiveb | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"eq_dinjectiveb",
"f1",
"f2",
"injectiveb"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_mem T T' f mA : seq T' | := map f (@enum_mem T mA). | Definition | image_mem | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"enum_mem",
"map",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image f A | := (image_mem f (mem A)). | Notation | image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"image_mem"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"[ 'seq' F | x 'in' A ]" | := (image (fun x => F) A)
(x binder, format "'[hv' [ 'seq' F '/ ' | x 'in' A ] ']'") : seq_scope. | Notation | [ 'seq' F | x 'in' A ] | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"[ 'seq' F | x ]" | :=
[seq F | x in pred_of_simpl (@pred_of_argType
(* kludge for getting the type of x *)
match _, (fun x => I) with
| T, f
=> match match f return T -> True with f' => f' end with
| _ => T
end
end)]
(x binder, only parsing) : seq_scope. | Notation | [ 'seq' F | x ] | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"True",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"[ 'seq' F | x : T ]" | :=
[seq F | x in pred_of_simpl (@pred_of_argType T)]
(x binder, only printing,
format "'[hv' [ 'seq' F '/ ' | x : T ] ']'") : seq_scope. | Notation | [ 'seq' F | x : T ] | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
"[ 'seq' F , x ]" | := [seq F | x ]
(x binder, only parsing) : seq_scope. | Notation | [ 'seq' F , x ] | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
codom T T' f | := @image_mem T T' f (mem T). | Definition | codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"image_mem"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_image A : size (image f A) = #|A|. | Proof. by rewrite size_map -cardE. Qed. | Lemma | size_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"image",
"size",
"size_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
size_codom : size (codom f) = #|T|. | Proof. exact: size_image. Qed. | Lemma | size_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"codom",
"size",
"size_image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
codomE : codom f = map f (enum T). | Proof. by []. Qed. | Lemma | codomE | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"codom",
"enum",
"map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
imageP A y : reflect (exists2 x, x \in A & y = f x) (y \in image f A). | Proof.
by apply: (iffP mapP) => [] [x Ax y_fx]; exists x; rewrite // mem_enum in Ax *.
Qed. | Lemma | imageP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"image",
"mapP",
"mem_enum"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
codomP y : reflect (exists x, y = f x) (y \in codom f). | Proof. by apply: (iffP (imageP _ y)) => [][x]; exists x. Qed. | Lemma | codomP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"codom",
"imageP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iinv_proof A y : y \in image f A -> {x | x \in A & f x = y}. | Proof.
move=> fy; pose b x := A x && (f x == y).
case: (pickP b) => [x /andP[Ax /eqP] | nfy]; first by exists x.
by case/negP: fy => /imageP[x Ax fx_y]; case/andP: (nfy x); rewrite fx_y.
Qed. | Remark | iinv_proof | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"image",
"imageP",
"pickP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iinv A y fAy | := s2val (@iinv_proof A y fAy). | Definition | iinv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"iinv_proof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
f_iinv A y fAy : f (@iinv A y fAy) = y. | Proof. exact: s2valP' (iinv_proof fAy). Qed. | Lemma | f_iinv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"iinv",
"iinv_proof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_iinv A y fAy : @iinv A y fAy \in A. | Proof. exact: s2valP (iinv_proof fAy). Qed. | Lemma | mem_iinv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"iinv",
"iinv_proof"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
in_iinv_f A : {in A &, injective f} ->
forall x fAfx, x \in A -> @iinv A (f x) fAfx = x. | Proof.
by move=> injf x fAfx Ax; apply: injf => //; [apply: mem_iinv | apply: f_iinv].
Qed. | Lemma | in_iinv_f | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"f_iinv",
"iinv",
"injf",
"mem_iinv"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
preim_iinv A B y fAy : preim f B (@iinv A y fAy) = B y. | Proof. by rewrite /= f_iinv. Qed. | Lemma | preim_iinv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"f_iinv",
"iinv"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_f A x : x \in A -> f x \in image f A. | Proof. by move=> Ax; apply/imageP; exists x. Qed. | Lemma | image_f | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"image",
"imageP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
codom_f x : f x \in codom f. | Proof. exact: image_f. Qed. | Lemma | codom_f | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"codom",
"image_f"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_codom A : {subset image f A <= codom f}. | Proof. by move=> _ /imageP[x _ ->]; apply: codom_f. Qed. | Lemma | image_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"codom",
"codom_f",
"image",
"imageP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_pred0 : image f pred0 =i pred0. | Proof. by move=> x; rewrite /image_mem /= enum0. Qed. | Lemma | image_pred0 | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"enum0",
"image",
"image_mem"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
mem_image A x : (f x \in image f A) = (x \in A). | Proof. by rewrite mem_map ?mem_enum. Qed. | Lemma | mem_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"image",
"mem_enum",
"mem_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
pre_image A : [preim f of image f A] =i A. | Proof. by move=> x; rewrite inE /= mem_image. Qed. | Lemma | pre_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"image",
"inE",
"mem_image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_iinv A y (fTy : y \in codom f) :
(y \in image f A) = (iinv fTy \in A). | Proof. by rewrite -mem_image ?f_iinv. Qed. | Lemma | image_iinv | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"codom",
"f_iinv",
"iinv",
"image",
"mem_image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
iinv_f x fTfx : @iinv T (f x) fTfx = x. | Proof. by apply: in_iinv_f; first apply: in2W. Qed. | Lemma | iinv_f | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"iinv",
"in_iinv_f"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_pre (B : pred T') : image f [preim f of B] =i [predI B & codom f]. | Proof. by move=> y; rewrite /image_mem -filter_map /= mem_filter -enumT. Qed. | Lemma | image_pre | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"codom",
"enumT",
"filter_map",
"image",
"image_mem",
"mem_filter"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bij_on_codom (x0 : T) : {on [pred y in codom f], bijective f}. | Proof.
pose g y := iinv (valP (insigd (codom_f x0) y)).
by exists g => [x fAfx | y fAy]; first apply: injf; rewrite f_iinv insubdK.
Qed. | Lemma | bij_on_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"codom",
"codom_f",
"f_iinv",
"iinv",
"injf",
"insigd",
"insubdK",
"on",
"valP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bij_on_image A (x0 : T) : {on [pred y in image f A], bijective f}. | Proof. exact: subon_bij (@image_codom A) (bij_on_codom x0). Qed. | Lemma | bij_on_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"bij_on_codom",
"image",
"image_codom",
"on"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
preim_seq s | :=
if s is y :: s' then
(if pick (preim f (pred1 y)) is Some x then cons x else id) (preim_seq s')
else [::]. | Fixpoint | preim_seq | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"id",
"pick",
"pred1"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
map_preim (s : seq T') : {subset s <= codom f} -> map f (preim_seq s) = s. | Proof.
elim: s => //= y s IHs; case: pickP => [x /eqP fx_y | nfTy] fTs.
by rewrite /= fx_y IHs // => z s_z; apply: fTs; apply: predU1r.
by case/imageP: (fTs y (mem_head y s)) => x _ fx_y; case/eqP: (nfTy x).
Qed. | Lemma | map_preim | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"apply",
"codom",
"imageP",
"map",
"mem_head",
"pickP",
"predU1r",
"preim_seq",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
flatten_imageP (aT : finType) (rT : eqType)
(A : aT -> seq rT) (P : {pred aT}) (y : rT) :
reflect (exists2 x, x \in P & y \in A x) (y \in flatten [seq A x | x in P]). | Proof.
by apply: (iffP flatten_mapP) => [][x Px]; exists x; rewrite ?mem_enum in Px *.
Qed. | Lemma | flatten_imageP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Px",
"aT",
"apply",
"flatten",
"flatten_mapP",
"mem_enum",
"seq"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_image_card A : #|image f A| <= #|A|. | Proof. by rewrite (cardE A) -(size_map f) card_size. Qed. | Lemma | leq_image_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardE",
"card_size",
"image",
"size_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_in_image A : {in A &, injective f} -> #|image f A| = #|A|. | Proof.
move=> injf; rewrite (cardE A) -(size_map f); apply/card_uniqP.
by rewrite map_inj_in_uniq ?enum_uniq // => x y; rewrite !mem_enum; apply: injf.
Qed. | Lemma | card_in_image | 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_uniq",
"image",
"injf",
"map_inj_in_uniq",
"mem_enum",
"size_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
image_injP A : reflect {in A &, injective f} (#|image f A| == #|A|). | Proof.
apply: (iffP eqP) => [eqfA |]; last exact: card_in_image.
by apply/dinjectiveP; apply/card_uniqP; rewrite size_map -cardE.
Qed. | Lemma | image_injP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"cardE",
"card_in_image",
"card_uniqP",
"dinjectiveP",
"image",
"last",
"size_map"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_card_in A : {in A &, injective f} -> #|A| <= #|T'|. | Proof. by move=> /card_in_image <-; rewrite max_card. Qed. | Lemma | leq_card_in | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"card_in_image",
"max_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_image A : #|image f A| = #|A|. | Proof. by apply: card_in_image; apply: in2W. Qed. | Lemma | card_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_in_image",
"image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_codom : #|codom f| = #|T|. | Proof. exact: card_image. Qed. | Lemma | card_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"card_image",
"codom"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_preim (B : {pred T'}) : #|[preim f of B]| = #|[predI codom f & B]|. | Proof.
rewrite -card_image /=; apply: eq_card => y.
by rewrite [y \in _]image_pre !inE andbC.
Qed. | Lemma | card_preim | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"apply",
"card_image",
"codom",
"eq_card",
"image_pre",
"inE"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
leq_card : #|T| <= #|T'|. | Proof. exact: (leq_card_in (in2W _)). Qed. | Lemma | leq_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"leq_card_in"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_range : #|T| >= #|T'|. | Hypothesis | card_range | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | ||
eq_card : #|T| = #|T'|. | Proof. by apply/eqP; rewrite eqn_leq leq_card. Qed. | Let | eq_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"apply",
"eqn_leq",
"leq_card"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
inj_card_onto y : y \in codom f. | Proof. by move: y; apply/subset_cardP; rewrite ?card_codom ?subset_predT. Qed. | Lemma | inj_card_onto | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"card_codom",
"codom",
"subset_cardP",
"subset_predT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
inj_card_bij : bijective f. | Proof.
by exists (fun y => iinv (inj_card_onto y)) => y; rewrite ?iinv_f ?f_iinv.
Qed. | Lemma | inj_card_bij | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"f_iinv",
"iinv",
"iinv_f",
"inj_card_onto"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bij_eq_card (T T' : finType) (f : T -> T') : bijective f -> #|T| = #|T'|. | Proof. by move=> [g /can_inj/leq_card + /can_inj/leq_card]; case: ltngtP. Qed. | Lemma | bij_eq_card | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"leq_card",
"ltngtP"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
injF_onto y : y \in codom f. | Proof. exact: inj_card_onto. Qed. | Lemma | injF_onto | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"codom",
"inj_card_onto"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
invF y | := iinv (injF_onto y). | Definition | invF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"iinv",
"injF_onto"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
invF_f : cancel f invF. | Proof. by move=> x; apply: iinv_f. Qed. | Lemma | invF_f | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"iinv_f",
"invF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
f_invF : cancel invF f. | Proof. by move=> y; apply: f_iinv. Qed. | Lemma | f_invF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"f_iinv",
"invF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
injF_bij : bijective f. | Proof. exact: inj_card_bij. Qed. | Lemma | injF_bij | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"inj_card_bij"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
fK : cancel f g. | Hypothesis | fK | 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 | ||
canF_sym : cancel g f. | Proof. exact/(bij_can_sym (injF_bij (can_inj fK))). Qed. | Lemma | canF_sym | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"fK",
"injF_bij"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
canF_LR x y : x = g y -> f x = y. | Proof. exact: canLR canF_sym. Qed. | Lemma | canF_LR | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"canF_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
canF_RL x y : g x = y -> x = f y. | Proof. exact: canRL canF_sym. Qed. | Lemma | canF_RL | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"canF_sym"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
canF_eq x y : (f x == y) = (x == g y). | Proof. exact: (can2_eq fK canF_sym). Qed. | Lemma | canF_eq | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"can2_eq",
"canF_sym",
"fK"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
canF_invF : g =1 invF (can_inj fK). | Proof. by move=> y; apply: (canLR fK); rewrite f_invF. Qed. | Lemma | canF_invF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"fK",
"f_invF",
"invF"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_image (A B : {pred T}) (f g : T -> T') :
A =i B -> f =1 g -> image f A = image g B. | Proof.
by move=> eqAB eqfg; rewrite /image_mem (eq_enum eqAB) (eq_map eqfg).
Qed. | Lemma | eq_image | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"eq_enum",
"eq_map",
"image",
"image_mem"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_codom (f g : T -> T') : f =1 g -> codom f = codom g. | Proof. exact: eq_image. Qed. | Lemma | eq_codom | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"T'",
"codom",
"eq_image"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
eq_invF f g injf injg : f =1 g -> @invF T f injf =1 @invF T g injg. | Proof.
by move=> eq_fg x; apply: (canLR (invF_f injf)); rewrite eq_fg f_invF.
Qed. | Lemma | eq_invF | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"apply",
"f_invF",
"injf",
"invF",
"invF_f"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
unit_enumP : Finite.axiom [::tt]. | Proof. by case. Qed. | Lemma | unit_enumP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"axiom"
] | Standard finTypes | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d |
card_unit : #|{: unit}| = 1. | Proof. by rewrite cardT enumT unlock. Qed. | Lemma | card_unit | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardT",
"enumT",
"unit"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
bool_enumP : Finite.axiom [:: true; false]. | Proof. by case. Qed. | Lemma | bool_enumP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"axiom"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
card_bool : #|{: bool}| = 2. | Proof. by rewrite cardT enumT unlock. Qed. | Lemma | card_bool | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"cardT",
"enumT"
] | https://github.com/math-comp/math-comp | 91d97df9cf3204b4dab84f4e24bc633e84b6473d | |
void_enumP : Finite.axiom (Nil void). | Proof. by case. Qed. | Lemma | void_enumP | boot | boot/fintype.v | [
"HB",
"structures",
"mathcomp",
"ssreflect",
"ssrfun",
"ssrbool",
"ssrnotations",
"eqtype",
"ssrnat",
"seq",
"choice",
"path",
"div",
"FiniteQuant.Exports",
"Finite"
] | [
"Nil",
"axiom"
] | 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.