fact
string
type
string
library
string
imports
list
filename
string
symbolic_name
string
docstring
string
fsubsetIidr A B : (B `<=` A `&` B) = (B `<=` A). Proof. by rewrite fsetIC fsubsetIidl. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetIidr
fsetUidPr A B : reflect (A `|` B = B) (A `<=` B). Proof. apply: (iffP fsubsetP) => sAB; last by move=> a aA; rewrite -sAB inE aA. by apply/fsetP => b; rewrite inE; have [/sAB|//] := boolP (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUidPr
fsetUidPl A B : reflect (A `|` B = A) (B `<=` A). Proof. by rewrite fsetUC; apply/fsetUidPr. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUidPl
fsubsetUl A B : A `<=` A `|` B. Proof. by apply/fsubsetP => a; rewrite inE => ->. Qed. Hint Resolve fsubsetUl : core.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetUl
fsubsetUr A B : B `<=` A `|` B. Proof. by rewrite fsetUC. Qed. Hint Resolve fsubsetUr : core.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetUr
fsubsetU1 x A : A `<=` x |` A. Proof. by rewrite fsubsetUr. Qed. Hint Resolve fsubsetU1 : core.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetU1
fsubsetU A B C : (A `<=` B) || (A `<=` C) -> A `<=` B `|` C. Proof. by move=> /orP [] /fsubset_trans ->. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetU
fincl_inj A B (AsubB : A `<=` B) : injective (fincl AsubB). Proof. by move=> a b [eq_ab]; apply: val_inj. Qed. Hint Resolve fincl_inj : core.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fincl_inj
fsub_inj B : {in [pred A | A `<=` B] &, injective (fsub B)}. Proof. move=> A A'; rewrite -!topredE /= => sAB sA'B /setP eqAA'; apply/fsetP => a. apply/idP/idP => mem_a. by have := eqAA' (fincl sAB [` mem_a]); rewrite !inE // => <-. by have := eqAA' (fincl sA'B [` mem_a]); rewrite !inE // => ->. Qed. Hint Resolve fsub_i...
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub_inj
eqEfsubset A B : (A == B) = (A `<=` B) && (B `<=` A). Proof. apply/eqP/andP => [-> //|[/fsubsetP AB /fsubsetP BA]]. by apply/fsetP=> x; apply/idP/idP=> [/AB|/BA]. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
eqEfsubset
subEfproper A B : A `<=` B = (A == B) || (A `<` B). Proof. by rewrite eqEfsubset -andb_orr orbN andbT. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
subEfproper
fproper_sub A B : A `<` B -> A `<=` B. Proof. by rewrite subEfproper orbC => ->. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper_sub
eqVfproper A B : A `<=` B -> A = B \/ A `<` B. Proof. by rewrite subEfproper => /predU1P. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
eqVfproper
fproperEneq A B : A `<` B = (A != B) && (A `<=` B). Proof. by rewrite andbC eqEfsubset negb_and andb_orr andbN. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproperEneq
fproper_neq A B : A `<` B -> A != B. Proof. by rewrite fproperEneq; case/andP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper_neq
fproper_irrefl A : ~~ (A `<` A). Proof. by rewrite fproperEneq eqxx. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper_irrefl
eqEfproper A B : (A == B) = (A `<=` B) && ~~ (A `<` B). Proof. by rewrite negb_and negbK andb_orr andbN eqEfsubset. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
eqEfproper
card_fsub B A : A `<=` B -> #|fsub B A| = #|` A|. Proof. by move=> sAB; rewrite cardfE fsubE card_imset //; apply: fincl_inj. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
card_fsub
eqEfcard A B : (A == B) = (A `<=` B) && (#|` B| <= #|` A|)%N. Proof. rewrite -(inj_in_eq (@fsub_inj (A `|` B))) -?topredE //=. by rewrite eqEcard !(@subset_fsubE (A `|` B)) ?(@card_fsub (A `|` B)). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
eqEfcard
fproperEcard A B : (A `<` B) = (A `<=` B) && (#|` A| < #|` B|)%N. Proof. by rewrite fproperEneq ltnNge andbC eqEfcard; case: (A `<=` B). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproperEcard
fsubset_leqif_cards A B : A `<=` B -> (#|` A| <= #|` B| ?= iff (A == B))%N. Proof. rewrite -!(@card_fsub (A `|` B)) // -(@subset_fsubE (A `|` B)) //. by move=> /subset_leqif_cards; rewrite (inj_in_eq (@fsub_inj _)) -?topredE /=. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubset_leqif_cards
fsub0set A : fset0 `<=` A. Proof. by apply/fsubsetP=> x; rewrite inE. Qed. Hint Resolve fsub0set : core.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub0set
fsubset0 A : (A `<=` fset0) = (A == fset0). Proof. by rewrite eqEfsubset fsub0set andbT. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubset0
fproper0 A : (fset0 `<` A) = (A != fset0). Proof. by rewrite /fproper fsub0set fsubset0. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper0
fproperE A B : (A `<` B) = (A `<=` B) && ~~ (B `<=` A). Proof. by []. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproperE
fsubEproper A B : (A `<=` B) = (A == B) || (A `<` B). Proof. by rewrite fproperEneq; case: eqP => //= ->; apply: fsubset_refl. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubEproper
fsubset_leq_card A B : A `<=` B -> (#|` A| <= #|` B|)%N. Proof. by move=> /fsubset_leqif_cards ->. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubset_leq_card
fproper_ltn_card A B : A `<` B -> (#|` A| < #|` B|)%N. Proof. by rewrite fproperEcard => /andP []. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper_ltn_card
fsubset_cardP A B : #|` A| = #|` B| -> reflect (A =i B) (A `<=` B). Proof. move=> eq_cardAB; apply: (iffP idP) => [/eqVfproper [->//|]|/fsetP -> //]. by rewrite fproperEcard eq_cardAB ltnn andbF. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubset_cardP
fproper_sub_trans B A C : A `<` B -> B `<=` C -> A `<` C. Proof. rewrite !fproperEcard => /andP [sAB lt_AB] sBC. by rewrite (fsubset_trans sAB) //= (leq_trans lt_AB) // fsubset_leq_card. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fproper_sub_trans
fsub_proper_trans B A C : A `<=` B -> B `<` C -> A `<` C. Proof. rewrite !fproperEcard => sAB /andP [sBC lt_BC]. by rewrite (fsubset_trans sAB) //= (leq_ltn_trans _ lt_BC) // fsubset_leq_card. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub_proper_trans
fsubset_neq0 A B : A `<=` B -> A != fset0 -> B != fset0. Proof. by rewrite -!fproper0 => sAB /fproper_sub_trans->. Qed. (* fsub is a morphism *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubset_neq0
fsub0 A : fsub A fset0 = set0 :> {set A}. Proof. by apply/setP => x; rewrite !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub0
fsubT A : fsub A A = [set : A]. Proof. by apply/setP => x; rewrite !inE (valP x). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubT
fsub1 A a (aA : a \in A) : fsub A [fset a] = [set [` aA]] :> {set A}. Proof. by apply/setP=> x; rewrite !inE; congr eq_op. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub1
fsubU C A B : fsub C (A `|` B) = fsub C A :|: fsub C B. Proof. by apply/setP => x; rewrite !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubU
fsubI C A B : fsub C (A `&` B) = fsub C A :&: fsub C B. Proof. by apply/setP => x; rewrite !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubI
fsubD C A B : fsub C (A `\` B) = fsub C A :\: fsub C B. Proof. by apply/setP => x; rewrite !inE andbC. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubD
fsubD1 C A b (bC : b \in C) : fsub C (A `\ b) = fsub C A :\ [` bC]. Proof. by rewrite fsubD fsub1. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubD1
fsub_eq0 A B : A `<=` B -> (fsub B A == set0) = (A == fset0). Proof. by move=> sAB; rewrite -fsub0 (inj_in_eq (@fsub_inj _)) -?topredE /=. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsub_eq0
fset_0Vmem A : (A = fset0) + {x : K | x \in A}. Proof. have [|[x mem_x]] := set_0Vmem (fsub A A); last first. by right; exists (val x); rewrite inE // in mem_x. by move=> /eqP; rewrite fsub_eq0 // => /eqP; left. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset_0Vmem
fset1P x a : reflect (x = a) (x \in [fset a]). Proof. by rewrite inE; exact: eqP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset1P
fset11 x : x \in [fset x]. Proof. by rewrite inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset11
fset1_inj : injective (@fset1 K). Proof. by move=> a b eqsab; apply/fset1P; rewrite -eqsab fset11. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset1_inj
fset1UP x a B : reflect (x = a \/ x \in B) (x \in a |` B). Proof. by rewrite !inE; exact: predU1P. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset1UP
fset_cons a s : [fset[key] x in a :: s] = a |` [fset[key] x in s]. Proof. by apply/fsetP=> x; rewrite in_fset_cons !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset_cons
fset_nil : [fset[key] x in [::] : seq K] = fset0. Proof. by apply/fsetP=> x; rewrite in_fset_nil. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset_nil
fset_seq1 a : [:: a] = [fset a]. Proof. by rewrite (@perm_small_eq _ [fset a] [:: a])//; apply: uniq_perm=>// ? /[!inE]. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset_seq1
fset_cat s s' : [fset[key] x in s ++ s'] = [fset[key] x in s] `|` [fset[key] x in s']. Proof. by apply/fsetP=> x; rewrite !inE !in_fset_cat. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset_cat
fset1U1 x B : x \in x |` B. Proof. by rewrite !inE eqxx. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset1U1
fset1Ur x a B : x \in B -> x \in a |` B. Proof. by move=> Bx; rewrite !inE predU1r. Qed. (* We need separate lemmas for the explicit enumerations since they *) (* associate on the left. *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset1Ur
fsetU1l x A b : x \in A -> x \in A `|` [fset b]. Proof. by move=> Ax; rewrite !inE Ax. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetU1l
fsetU11 x B : x \in x |` B. Proof. by rewrite !inE eqxx. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetU11
fsetU1r A b : b \in A `|` [fset b]. Proof. by rewrite !inE eqxx orbT. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetU1r
fsetD1P x A b : reflect (x != b /\ x \in A) (x \in A `\ b). Proof. by rewrite !inE; exact: andP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetD1P
fsetD11 b A : (b \in A `\ b) = false. Proof. by rewrite !inE eqxx. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetD11
fsetD1K a A : a \in A -> a |` (A `\ a) = A. Proof. by move=> Aa; apply/fsetP=> x; rewrite !inE; case: eqP => // ->. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetD1K
fsetU1K a B : a \notin B -> (a |` B) `\ a = B. Proof. by move/negPf=> nBa; apply/fsetP=> x; rewrite !inE; case: eqP => // ->. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetU1K
fset2P x a b : reflect (x = a \/ x = b) (x \in [fset a; b]). Proof. by rewrite !inE; apply: (iffP orP) => [] [] /eqP ->; [left|right|left|right]. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset2P
in_fset2 x a b : (x \in [fset a; b]) = (x == a) || (x == b). Proof. by rewrite !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
in_fset2
fset21 a b : a \in [fset a; b]. Proof. by rewrite fset1U1. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset21
fset22 a b : b \in [fset a; b]. Proof. by rewrite in_fset2 eqxx orbT. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset22
fsetUP x A B : reflect (x \in A \/ x \in B) (x \in A `|` B). Proof. by rewrite !inE; exact: orP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUP
fsetULVR x A B : x \in A `|` B -> (x \in A) + (x \in B). Proof. by rewrite inE; case: (x \in A); [left|right]. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetULVR
fsetUS A B C : A `<=` B -> C `|` A `<=` C `|` B. Proof. move=> sAB; apply/fsubsetP=> x; rewrite !inE. by case: (x \in C) => //; exact: (fsubsetP sAB). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUS
fsetSU A B C : A `<=` B -> A `|` C `<=` B `|` C. Proof. by move=> sAB; rewrite -!(fsetUC C) fsetUS. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetSU
fsetUSS A B C D : A `<=` C -> B `<=` D -> A `|` B `<=` C `|` D. Proof. by move=> /(fsetSU B) /fsubset_trans sAC /(fsetUS C)/sAC. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUSS
fset0U A : fset0 `|` A = A. Proof. by apply/fsetP => x; rewrite !inE orFb. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset0U
fsetU0 A : A `|` fset0 = A. Proof. by rewrite fsetUC fset0U. Qed. (* intersection *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetU0
fsetIP x A B : reflect (x \in A /\ x \in B) (x \in A `&` B). Proof. by rewrite inE; apply: andP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetIP
fsetIS A B C : A `<=` B -> C `&` A `<=` C `&` B. Proof. move=> sAB; apply/fsubsetP=> x; rewrite !inE. by case: (x \in C) => //; exact: (fsubsetP sAB). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetIS
fsetSI A B C : A `<=` B -> A `&` C `<=` B `&` C. Proof. by move=> sAB; rewrite -!(fsetIC C) fsetIS. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetSI
fsetISS A B C D : A `<=` C -> B `<=` D -> A `&` B `<=` C `&` D. Proof. by move=> /(fsetSI B) /fsubset_trans sAC /(fsetIS C) /sAC. Qed. (* difference *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetISS
fsetDP A B x : reflect (x \in A /\ x \notin B) (x \in A `\` B). Proof. by rewrite inE andbC; apply: andP. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDP
fsetSD C A B : A `<=` B -> A `\` C `<=` B `\` C. Proof. move=> sAB; apply/fsubsetP=> x; rewrite !inE. by case: (x \in C) => //; exact: (fsubsetP sAB). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetSD
fsetDS C A B : A `<=` B -> C `\` B `<=` C `\` A. Proof. move=> sAB; apply/fsubsetP=> x; rewrite !inE ![_ && (_ \in _)]andbC. by case: (x \in C) => //; apply: contra; exact: (fsubsetP sAB). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDS
fsetDSS A B C D : A `<=` C -> D `<=` B -> A `\` B `<=` C `\` D. Proof. by move=> /(fsetSD B) /fsubset_trans sAC /(fsetDS C) /sAC. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDSS
fsetD0 A : A `\` fset0 = A. Proof. by apply/fsetP=> x; rewrite !inE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetD0
fset0D A : fset0 `\` A = fset0. Proof. by apply/fsetP=> x; rewrite !inE andbF. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fset0D
fsetDv A : A `\` A = fset0. Proof. by apply/fsetP=> x; rewrite !inE andNb. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDv
fsetID B A : A `&` B `|` A `\` B = A. Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetID
fsetDUl A B C : (A `|` B) `\` C = (A `\` C) `|` (B `\` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDUl
fsetDUr A B C : A `\` (B `|` C) = (A `\` B) `&` (A `\` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDUr
fsetDIl A B C : (A `&` B) `\` C = (A `\` C) `&` (B `\` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDIl
fsetIDA A B C : A `&` (B `\` C) = (A `&` B) `\` C. Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetIDA
fsetIDAC A B C : (A `\` B) `&` C = (A `&` C) `\` B. Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetIDAC
fsetDIr A B C : A `\` (B `&` C) = (A `\` B) `|` (A `\` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDIr
fsetDDl A B C : (A `\` B) `\` C = A `\` (B `|` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDDl
fsetDDr A B C : A `\` (B `\` C) = (A `\` B) `|` (A `&` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDDr
fsetDK A B : B `<=` A -> A `\` (A `\` B) = B. Proof. by rewrite fsetDDr => /fsetIidPr->; rewrite fsetDv fset0U. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetDK
fsetUDl (A B C : {fset K}) : A `|` (B `\` C) = (A `|` B) `\` (C `\` A). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUDl
fsetUDr (A B C : {fset K}) : (A `\` B) `|` C = (A `|` C) `\` (B `\` C). Proof. by apply/fsetP=> x; rewrite !inE; do ?case: (_ \in _). Qed. (* other inclusions *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsetUDr
fsubsetIl A B : A `&` B `<=` A. Proof. by apply/fsubsetP=> x; rewrite inE => /andP []. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetIl
fsubsetIr A B : A `&` B `<=` B. Proof. by apply/fsubsetP=> x; rewrite inE => /andP []. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetIr
fsubsetDl A B : A `\` B `<=` A. Proof. by apply/fsubsetP=> x; rewrite inE => /andP []. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetDl
fsubD1set A x : A `\ x `<=` A. Proof. by rewrite fsubsetDl. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubD1set
fsubsetD2l C A B : A `<=` C -> B `<=` C -> (C `\` B `<=` C `\` A) = (A `<=` B). Proof. move=> sAC sBC; apply/idP/idP; last exact: fsetDS. by move=> /(@fsetDS C); rewrite !fsetDK //; apply; apply: fsubsetDl. Qed. Hint Resolve fsubsetIl fsubsetIr fsubsetDl fsubD1set : core. (* cardinal lemmas for fsets *)
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
fsubsetD2l
card_finset (T : finType) (P : pred T) : #|` [fset x in P] | = #|P|. Proof. by rewrite card_imfset //= -cardE. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
card_finset
card_fset (T : choiceType) (A : {fset T}) : #|` [fset x in A] | = #|` A|. Proof. by rewrite card_imfset. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
card_fset
card_fseq (T : choiceType) (s : seq T) : #|` [fset x in s] | = size (undup s). Proof. by rewrite card_imfset. Qed.
Lemma
root
[ "From Corelib Require Import Setoid.", "From HB Require Import structures.", "From mathcomp Require Import ssreflect ssrbool ssrnat eqtype ssrfun seq.", "From mathcomp Require Import choice finset finfun fintype bigop." ]
finmap.v
card_fseq