fact
stringlengths
8
1.54k
type
stringclasses
19 values
library
stringclasses
8 values
imports
listlengths
1
10
filename
stringclasses
98 values
symbolic_name
stringlengths
1
42
docstring
stringclasses
1 value
perm_ontos : codom s =i predT. Proof. by apply/subset_cardP; rewrite ?card_codom ?subset_predT. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_onto
perm_one:= perm (@inj_id T).
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_one
perm_invKs : cancel (fun x => iinv (perm_onto s x)) s. Proof. by move=> x /=; rewrite f_iinv. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_invK
perm_invs := perm (can_inj (perm_invK s)).
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_inv
perm_muls t := perm (inj_comp (@perm_inj t) (@perm_inj s)).
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_mul
perm_oneP: left_id perm_one perm_mul. Proof. by move=> s; apply/permP => x; rewrite permE /= permE. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_oneP
perm_invP: left_inverse perm_one perm_inv perm_mul. Proof. by move=> s; apply/permP=> x; rewrite !permE /= permE f_iinv. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_invP
perm_mulP: associative perm_mul. Proof. by move=> s t u; apply/permP=> x; do !rewrite permE /=. Qed. HB.instance Definition _ := Finite_isGroup.Build (perm_type T) perm_mulP perm_oneP perm_invP.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_mulP
perm1x : (1 : {perm T}) x = x. Proof. by rewrite permE. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm1
permMs t x : (s * t) x = t (s x). Proof. by rewrite permE. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permM
permKs : cancel s s^-1. Proof. by move=> x; rewrite -permM mulgV perm1. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permK
permKVs : cancel s^-1 s. Proof. by have:= permK s^-1; rewrite invgK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permKV
permJs t x : (s ^ t) (t x) = t (s x). Proof. by rewrite !permM permK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permJ
permXs x n : (s ^+ n) x = iter n s x. Proof. by elim: n => [|n /= <-]; rewrite ?perm1 // -permM expgSr. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permX
permX_fixs x n : s x = x -> (s ^+ n) x = x. Proof. move=> Hs; elim: n => [|n IHn]; first by rewrite expg0 perm1. by rewrite expgS permM Hs. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permX_fix
im_permVs S : s^-1 @: S = s @^-1: S. Proof. exact: can2_imset_pre (permKV s) (permK s). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
im_permV
preim_permVs S : s^-1 @^-1: S = s @: S. Proof. by rewrite -im_permV invgK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
preim_permV
perm_onS : pred {perm T} := fun s => [pred x | s x != x] \subset S.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_on
perm_closedS s x : perm_on S s -> (s x \in S) = (x \in S). Proof. move/subsetP=> s_on_S; have [-> // | nfix_s_x] := eqVneq (s x) x. by rewrite !s_on_S // inE /= ?(inj_eq perm_inj). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_closed
perm_on1H : perm_on H 1. Proof. by apply/subsetP=> x; rewrite inE /= perm1 eqxx. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_on1
perm_onMH s t : perm_on H s -> perm_on H t -> perm_on H (s * t). Proof. move/subsetP=> sH /subsetP tH; apply/subsetP => x; rewrite inE /= permM. by have [-> /tH | /sH] := eqVneq (s x) x. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_onM
perm_onVH s : perm_on H s -> perm_on H s^-1. Proof. move=> /subsetP sH; apply/subsetP => i /[!inE] sVi; apply: sH; rewrite inE. by apply: contra_neq sVi => si_id; rewrite -[in LHS]si_id permK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_onV
out_permS u x : perm_on S u -> x \notin S -> u x = x. Proof. by move=> uS; apply: contraNeq (subsetP uS x). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
out_perm
im_perm_onu S : perm_on S u -> u @: S = S. Proof. move=> Su; rewrite -preim_permV; apply/setP=> x. by rewrite !inE -(perm_closed _ Su) permKV. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
im_perm_on
perm_on_idu S : perm_on S u -> #|S| <= 1 -> u = 1%g. Proof. rewrite leq_eqVlt ltnS leqn0 => pSu S10; apply/permP => t; rewrite perm1. case/orP : S10; last first. by move/eqP/cards0_eq => S0; apply: (out_perm pSu); rewrite S0 inE. move=> /cards1P[x Sx]. have [-> | ntx] := eqVneq t x; last by apply: (out_perm pSu); rewrite Sx inE. by apply/eqP; have := perm_closed x pSu; rewrite Sx !inE => ->. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_on_id
perm_onC(S1 S2 : {set T}) (u1 u2 : {perm T}) : perm_on S1 u1 -> perm_on S2 u2 -> [disjoint S1 & S2] -> commute u1 u2. Proof. move=> pS1 pS2 S12; apply/permP => t; rewrite !permM. case/boolP : (t \in S1) => tS1. have /[!disjoint_subset] /subsetP {}S12 := S12. by rewrite !(out_perm pS2) //; apply: S12; rewrite // perm_closed. case/boolP : (t \in S2) => tS2. have /[1!disjoint_sym] /[!disjoint_subset] /subsetP {}S12 := S12. by rewrite !(out_perm pS1) //; apply: S12; rewrite // perm_closed. by rewrite (out_perm pS1) // (out_perm pS2) // (out_perm pS1). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
perm_onC
imset_perm1(S : {set T}) : [set (1 : {perm T}) x | x in S] = S. Proof. apply: im_perm_on; exact: perm_on1. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
imset_perm1
tperm_proofx y : involutive [fun z => z with x |-> y, y |-> x]. Proof. move=> z /=; case: (z =P x) => [-> | ne_zx]; first by rewrite eqxx; case: eqP. by case: (z =P y) => [->| ne_zy]; [rewrite eqxx | do 2?case: eqP]. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm_proof
tpermx y := perm (can_inj (tperm_proof x y)).
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm
tperm_specx y z : T -> Type := | TpermFirst of z = x : tperm_spec x y z y | TpermSecond of z = y : tperm_spec x y z x | TpermNone of z <> x & z <> y : tperm_spec x y z z.
Variant
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm_spec
tpermPx y z : tperm_spec x y z (tperm x y z). Proof. by rewrite permE /=; do 2?[case: eqP => /=]; constructor; auto. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermP
tpermLx y : tperm x y x = y. Proof. by case: tpermP. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermL
tpermRx y : tperm x y y = x. Proof. by case: tpermP. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermR
tpermDx y z : x != z -> y != z -> tperm x y z = z. Proof. by case: tpermP => // ->; rewrite eqxx. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermD
tpermCx y : tperm x y = tperm y x. Proof. by apply/permP => z; do 2![case: tpermP => //] => ->. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermC
tperm1x : tperm x x = 1. Proof. by apply/permP => z; rewrite perm1; case: tpermP. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm1
tpermKx y : involutive (tperm x y). Proof. by move=> z; rewrite !permE tperm_proof. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermK
tpermKgx y : involutive (mul (tperm x y)). Proof. by move=> s; apply/permP=> z; rewrite !permM tpermK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermKg
tpermVx y : (tperm x y)^-1 = tperm x y. Proof. by set t := tperm x y; rewrite -{2}(mulgK t t) -mulgA tpermKg. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermV
tperm2x y : tperm x y * tperm x y = 1. Proof. by rewrite -{1}tpermV mulVg. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm2
tperm_onx y : perm_on [set x; y] (tperm x y). Proof. by apply/subsetP => z /[!inE]; case: tpermP => [->|->|]; rewrite eqxx // orbT. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tperm_on
card_permA : #|perm_on A| = (#|A|)`!. Proof. pose ffA := {ffun {x | x \in A} -> T}. rewrite -ffactnn -{2}(card_sig [in A]) /= -card_inj_ffuns_on. pose fT (f : ffA) := [ffun x => oapp f x (insub x)]. pose pfT f := insubd (1 : {perm T}) (fT f). pose fA s : ffA := [ffun u => s (val u)]. rewrite -!sum1dep_card -sum1_card (reindex_onto fA pfT) => [|f]. apply: eq_bigl => p; rewrite andbC; apply/idP/and3P=> [onA | []]; first split. - apply/eqP; suffices fTAp: fT (fA p) = pval p. by apply/permP=> x; rewrite -!pvalE insubdK fTAp //; apply: (valP p). apply/ffunP=> x; rewrite ffunE pvalE. by case: insubP => [u _ <- | /out_perm->] //=; rewrite ffunE. - by apply/forallP=> [[x Ax]]; rewrite ffunE /= perm_closed. - by apply/injectiveP=> u v; rewrite !ffunE => /perm_inj; apply: val_inj. move/eqP=> <- _ _; apply/subsetP=> x; rewrite !inE -pvalE val_insubd fun_if. by rewrite if_arg ffunE; case: insubP; rewrite // pvalE perm1 if_same eqxx. case/andP=> /forallP-onA /injectiveP-f_inj. apply/ffunP=> u; rewrite ffunE -pvalE insubdK; first by rewrite ffunE valK. apply/injectiveP=> {u} x y; rewrite !ffunE. case: insubP => [u _ <-|]; case: insubP => [v _ <-|] //=; first by move/f_inj->. by move=> Ay' def_y; rewrite -def_y [_ \in A]onA in Ay'. by move=> Ax' def_x; rewrite def_x [_ \in A]onA in Ax'. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
card_perm
reindex_perms := (reindex_inj (@perm_inj _ s)).
Notation
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
reindex_perm
inj_tperm(T T' : finType) (f : T -> T') x y z : injective f -> f (tperm x y z) = tperm (f x) (f y) (f z). Proof. by move=> injf; rewrite !permE /= !(inj_eq injf) !(fun_if f). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
inj_tperm
tpermJx y s : (tperm x y) ^ s = tperm (s x) (s y). Proof. by apply/permP => z; rewrite -(permKV s z) permJ; apply/inj_tperm/perm_inj. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermJ
tpermJ_tpermx y z : x != z -> y != z -> tperm x z ^ tperm x y = tperm y z. Proof. by move=> nxz nyz; rewrite tpermJ tpermL [tperm _ _ z]tpermD. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tpermJ_tperm
tuple_permP{T : eqType} {n} {s : seq T} {t : n.-tuple T} : reflect (exists p : 'S_n, s = [tuple tnth t (p i) | i < n]) (perm_eq s t). Proof. apply: (iffP idP) => [|[p ->]]; last first. rewrite /= (map_comp (tnth t)) -{1}(map_tnth_enum t) perm_map //. apply: uniq_perm => [||i]; rewrite ?enum_uniq //. by apply/injectiveP; apply: perm_inj. by rewrite mem_enum -[i](permKV p) image_f. case: n => [|n] in t *; last have x0 := tnth t ord0. rewrite tuple0 => /perm_small_eq-> //. by exists 1; rewrite [mktuple _]tuple0. case/(perm_iotaP x0); rewrite size_tuple => Is eqIst ->{s}. have uniqIs: uniq Is by rewrite (perm_uniq eqIst) iota_uniq. have szIs: size Is == n.+1 by rewrite (perm_size eqIst) !size_tuple. have pP i : tnth (Tuple szIs) i < n.+1. by rewrite -[_ < _](mem_iota 0) -(perm_mem eqIst) mem_tnth. have inj_p: injective (fun i => Ordinal (pP i)). by apply/injectiveP/(@map_uniq _ _ val); rewrite -map_comp map_tnth_enum. exists (perm inj_p); rewrite -[Is]/(tval (Tuple szIs)); congr (tval _). by apply: eq_from_tnth => i; rewrite tnth_map tnth_mktuple permE (tnth_nth x0). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
tuple_permP
aperm(T : finType) x (s : {perm T}) := s x. HB.lock
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
aperm
porbit(T : finType) (s : {perm T}) x := aperm x @: <[s]>.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit
porbit_unlockable:= Unlockable porbit.unlock.
Canonical
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_unlockable
porbits(T : finType) (s : {perm T}) := porbit s @: T.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbits
odd_perm(s : perm_type T) := odd #|T| (+) odd #|porbits s|.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_perm
apermEx s : aperm x s = s x. Proof. by []. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
apermE
mem_porbits i x : (s ^+ i) x \in porbit s x. Proof. by rewrite [@porbit]unlock (imset_f (aperm x)) ?mem_cycle. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
mem_porbit
porbit_ids x : x \in porbit s x. Proof. by rewrite -{1}[x]perm1 (mem_porbit s 0). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_id
card_porbit_neq0s x : #|porbit s x| != 0. Proof. by rewrite -lt0n card_gt0; apply/set0Pn; exists x; exact: porbit_id. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
card_porbit_neq0
uniq_traject_porbits x : uniq (traject s x #|porbit s x|). Proof. case def_n: #|_| => // [n]; rewrite looping_uniq. apply: contraL (card_size (traject s x n)) => /loopingP t_sx. rewrite -ltnNge size_traject -def_n ?subset_leq_card // porbit.unlock. by apply/subsetP=> _ /imsetP[_ /cycleP[i ->] ->]; rewrite /aperm permX t_sx. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
uniq_traject_porbit
porbit_trajects x : porbit s x =i traject s x #|porbit s x|. Proof. apply: fsym; apply/subset_cardP. by rewrite (card_uniqP _) ?size_traject ?uniq_traject_porbit. by apply/subsetP=> _ /trajectP[i _ ->]; rewrite -permX mem_porbit. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_traject
iter_porbits x : iter #|porbit s x| s x = x. Proof. case def_n: #|_| (uniq_traject_porbit s x) => [//|n] Ut. have: looping s x n.+1. by rewrite -def_n -[looping _ _ _]porbit_traject -permX mem_porbit. rewrite /looping => /trajectP[[|i] //= lt_i_n /perm_inj eq_i_n_sx]. move: lt_i_n; rewrite ltnS ltn_neqAle andbC => /andP[le_i_n /negP[]]. by rewrite -(nth_uniq x _ _ Ut) ?size_traject ?nth_traject // eq_i_n_sx. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
iter_porbit
eq_porbit_mems x y : (porbit s x == porbit s y) = (x \in porbit s y). Proof. apply/eqP/idP; first by move<-; exact: porbit_id. rewrite porbit.unlock => /imsetP[si s_si ->]. apply/setP => z; apply/imsetP/imsetP=> [] [sj s_sj ->]. by exists (si * sj); rewrite ?groupM /aperm ?permM. exists (si^-1 * sj); first by rewrite groupM ?groupV. by rewrite /aperm permM permK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
eq_porbit_mem
porbit_syms x y : (x \in porbit s y) = (y \in porbit s x). Proof. by rewrite -!eq_porbit_mem eq_sym. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_sym
porbit_perms i x : porbit s ((s ^+ i) x) = porbit s x. Proof. by apply/eqP; rewrite eq_porbit_mem mem_porbit. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_perm
porbitPmins x y : y \in porbit s x -> exists2 i, i < #[s] & y = (s ^+ i) x. Proof. by rewrite porbit.unlock=> /imsetP [z /cyclePmin[ i Hi ->{z}] ->{y}]; exists i. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbitPmin
porbitPs x y : reflect (exists i, y = (s ^+ i) x) (y \in porbit s x). Proof. apply (iffP idP) => [/porbitPmin [i _ ->]| [i ->]]; last exact: mem_porbit. by exists i. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbitP
porbitVs : porbit s^-1 =1 porbit s. Proof. move=> x; apply/setP => y; rewrite porbit_sym. by apply/porbitP/porbitP => -[i ->]; exists i; rewrite expgVn ?permK ?permKV. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbitV
porbitsVs : porbits s^-1 = porbits s. Proof. rewrite /porbits; apply/setP => y. by apply/imsetP/imsetP => -[x _ ->{y}]; exists x; rewrite // porbitV. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbitsV
porbit_setPs t x : porbit s x =i porbit t x <-> porbit s x = porbit t x. Proof. by rewrite porbit.unlock; exact: setP. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbit_setP
porbits_mul_tperms x y : let t := tperm x y in #|porbits (t * s)| + (x \notin porbit s y).*2 = #|porbits s| + (x != y). Proof. pose xf a b u := seq.find (pred2 a b) (traject u (u a) #|porbit u a|). have xf_size a b u: xf a b u <= #|porbit u a|. by rewrite (leq_trans (find_size _ _)) ?size_traject. have lt_xf a b u n : n < xf a b u -> ~~ pred2 a b ((u ^+ n.+1) a). move=> lt_n; apply: contraFN (before_find (u a) lt_n). by rewrite permX iterSr nth_traject // (leq_trans lt_n). pose t a b u := tperm a b * u. have tC a b u : t a b u = t b a u by rewrite /t tpermC. have tK a b: involutive (t a b) by move=> u; apply: tpermKg. have tXC a b u n: n <= xf a b u -> (t a b u ^+ n.+1) b = (u ^+ n.+1) a. elim: n => [|n IHn] lt_n_f; first by rewrite permM tpermR. rewrite !(expgSr _ n.+1) !permM {}IHn 1?ltnW //; congr (u _). by case/lt_xf/norP: lt_n_f => ne_a ne_b; rewrite tpermD // eq_sym. have eq_xf a b u: pred2 a b ((u ^+ (xf a b u).+1) a). have ua_a: a \in porbit u (u a) by rewrite porbit_sym (mem_porbit _ 1). have has_f: has (pred2 a b) (traject u (u a) #|porbit u (u a)|). by apply/hasP; exists a; rewrite /= ?eqxx -?porbit_traject. have:= nth_find (u a) has_f; rewrite has_find size_traject in has_f. rewrite -eq_porbit_mem in ua_a. by rewrite nth_traject // -iterSr -permX -(eqP ua_a). have xfC a b u: xf b a (t a b u) = xf a b u. without loss lt_a: a b u / xf b a (t a b u) < xf a b u. move=> IHab; set m := xf b a _; set n := xf a b u. by case: (ltngtP m n) => // ltx; [a ...
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
porbits_mul_tperm
odd_perm1: odd_perm 1 = false. Proof. rewrite /odd_perm card_imset ?addbb // => x y; move/eqP; rewrite eq_porbit_mem. by rewrite porbit.unlock cycle1 imset_set1 /aperm perm1 inE=> /eqP. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_perm1
odd_mul_tpermx y s : odd_perm (tperm x y * s) = (x != y) (+) odd_perm s. Proof. rewrite addbC -addbA -[~~ _]oddb -oddD -porbits_mul_tperm. by rewrite oddD odd_double addbF. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_mul_tperm
odd_tpermx y : odd_perm (tperm x y) = (x != y). Proof. by rewrite -[_ y]mulg1 odd_mul_tperm odd_perm1 addbF. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_tperm
dpair(eT : eqType) := [pred t | t.1 != t.2 :> eT]. Arguments dpair {eT}.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
dpair
prod_tpermPs : {ts : seq (T * T) | s = \prod_(t <- ts) tperm t.1 t.2 & all dpair ts}. Proof. have [n] := ubnP #|[pred x | s x != x]|; elim: n s => // n IHn s /ltnSE-le_s_n. case: (pickP (fun x => s x != x)) => [x s_x | s_id]; last first. exists nil; rewrite // big_nil; apply/permP=> x. by apply/eqP/idPn; rewrite perm1 s_id. have [|ts def_s ne_ts] := IHn (tperm x (s^-1 x) * s); last first. exists ((x, s^-1 x) :: ts); last by rewrite /= -(canF_eq (permK _)) s_x. by rewrite big_cons -def_s mulgA tperm2 mul1g. rewrite (cardD1 x) !inE s_x in le_s_n; apply: leq_ltn_trans le_s_n. apply: subset_leq_card; apply/subsetP=> y. rewrite !inE permM permE /= -(canF_eq (permK _)). have [-> | ne_yx] := eqVneq y x; first by rewrite permKV eqxx. by case: (s y =P x) => // -> _; rewrite eq_sym. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
prod_tpermP
odd_perm_prodts : all dpair ts -> odd_perm (\prod_(t <- ts) tperm t.1 t.2) = odd (size ts). Proof. elim: ts => [_|t ts IHts] /=; first by rewrite big_nil odd_perm1. by case/andP=> dt12 dts; rewrite big_cons odd_mul_tperm dt12 IHts. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_perm_prod
odd_permM: {morph odd_perm : s1 s2 / s1 * s2 >-> s1 (+) s2}. Proof. move=> s1 s2; case: (prod_tpermP s1) => ts1 ->{s1} dts1. case: (prod_tpermP s2) => ts2 ->{s2} dts2. by rewrite -big_cat !odd_perm_prod ?all_cat ?dts1 // size_cat oddD. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_permM
odd_permVs : odd_perm s^-1 = odd_perm s. Proof. by rewrite -{2}(mulgK s s) !odd_permM -addbA addKb. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_permV
odd_permJs1 s2 : odd_perm (s1 ^ s2) = odd_perm s1. Proof. by rewrite !odd_permM odd_permV addbC addbK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_permJ
gen_tpermx : <<[set tperm x y | y in T]>>%g = [set: {perm T}]. Proof. apply/eqP; rewrite eqEsubset subsetT/=; apply/subsetP => s _. have [ts -> _] := prod_tpermP s; rewrite group_prod// => -[/= y z] _. have [<-|Nyz] := eqVneq y z; first by rewrite tperm1 group1. have [<-|Nxz] := eqVneq x z; first by rewrite tpermC mem_gen ?imset_f. by rewrite -(tpermJ_tperm Nxz Nyz) groupJ ?mem_gen ?imset_f. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
gen_tperm
odd_perm: perm_type >-> bool. Arguments dpair {eT}. Prenex Implicits porbit dpair porbits aperm.
Coercion
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_perm
Sym: {set {perm T}} := [set s | perm_on S s].
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
Sym
Sym_group_set: group_set Sym. Proof. apply/group_setP; split => [|s t] /[!inE]; [exact: perm_on1 | exact: perm_onM]. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
Sym_group_set
Sym_group: {group {perm T}} := Group Sym_group_set.
Canonical
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
Sym_group
card_Sym: #|Sym| = #|S|`!. Proof. by rewrite cardsE /= card_perm. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
card_Sym
card_Sn: #|'S_(n)| = n`!. Proof. rewrite (eq_card (B := perm_on [set : 'I_n])). by rewrite card_perm /= cardsE /= card_ord. move=> p; rewrite inE unfold_in /perm_on /=. by apply/esym/subsetP => i _; rewrite in_set. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
card_Sn
lift_perm_funi j s k := if unlift i k is Some k' then lift j (s k') else j.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_perm_fun
lift_permKi j s : cancel (lift_perm_fun i j s) (lift_perm_fun j i s^-1). Proof. rewrite /lift_perm_fun => k. by case: (unliftP i k) => [j'|] ->; rewrite (liftK, unlift_none) ?permK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_permK
lift_permi j s := perm (can_inj (lift_permK i j s)).
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_perm
lift_perm_idi j s : lift_perm i j s i = j. Proof. by rewrite permE /lift_perm_fun unlift_none. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_perm_id
lift_perm_lifti j s k' : lift_perm i j s (lift i k') = lift j (s k') :> 'I_n.+1. Proof. by rewrite permE /lift_perm_fun liftK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_perm_lift
lift_permMi j k s t : lift_perm i j s * lift_perm j k t = lift_perm i k (s * t). Proof. apply/permP=> i1; case: (unliftP i i1) => [i2|] ->{i1}. by rewrite !(permM, lift_perm_lift). by rewrite permM !lift_perm_id. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_permM
lift_perm1i : lift_perm i i 1 = 1. Proof. by apply: (mulgI (lift_perm i i 1)); rewrite lift_permM !mulg1. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_perm1
lift_permVi j s : (lift_perm i j s)^-1 = lift_perm j i s^-1. Proof. by apply/eqP; rewrite eq_invg_mul lift_permM mulgV lift_perm1. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
lift_permV
odd_lift_permi j s : lift_perm i j s = odd i (+) odd j (+) s :> bool. Proof. rewrite -{1}(mul1g s) -(lift_permM _ j) odd_permM. congr (_ (+) _); last first. case: (prod_tpermP s) => ts ->{s} _. elim: ts => [|t ts IHts] /=; first by rewrite big_nil lift_perm1 !odd_perm1. rewrite big_cons odd_mul_tperm -(lift_permM _ j) odd_permM {}IHts //. congr (_ (+) _); transitivity (tperm (lift j t.1) (lift j t.2)); last first. by rewrite odd_tperm (inj_eq (pcan_inj (liftK j))). congr odd_perm; apply/permP=> k; case: (unliftP j k) => [k'|] ->. by rewrite lift_perm_lift inj_tperm //; apply: lift_inj. by rewrite lift_perm_id tpermD // eq_sym neq_lift. suff{i j s} odd_lift0 (k : 'I_n.+1): lift_perm ord0 k 1 = odd k :> bool. rewrite -!odd_lift0 -{2}invg1 -lift_permV odd_permV -odd_permM. by rewrite lift_permM mulg1. elim: {k}(k : nat) {1 3}k (erefl (k : nat)) => [|m IHm] k def_k. by rewrite (_ : k = ord0) ?lift_perm1 ?odd_perm1 //; apply: val_inj. have le_mn: m < n.+1 by [rewrite -def_k ltnW]; pose j := Ordinal le_mn. rewrite -(mulg1 1)%g -(lift_permM _ j) odd_permM {}IHm // addbC. rewrite (_ : _ 1 = tperm j k); first by rewrite odd_tperm neq_ltn/= def_k leqnn. apply/permP=> i; case: (unliftP j i) => [i'|] ->; last first. by rewrite lift_perm_id tpermL. apply: ord_inj; rewrite lift_perm_lift !permE /= eq_sym -if_neg neq_lift. rewrite fun_if -val_eqE /= def_k /bump ltn_neqAle andbC. case: leqP => [_ | lt_i'm] /=; last by rewrite -if_neg neq_ltn leqW. by rewrite add1n eqSS; case: ...
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
odd_lift_perm
permS0: all_equal_to (1 : 'S_0). Proof. by move=> g; apply/permP; case. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permS0
permS1: all_equal_to (1 : 'S_1). Proof. by move=> g; apply/permP => i; rewrite !ord1. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permS1
permS01n : n <= 1 -> all_equal_to (1 : 'S_n). Proof. by case: n => [|[|]//=] _ g; rewrite (permS0, permS1). Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
permS01
cast_permm n (eq_mn : m = n) (s : 'S_m) := let: erefl in _ = n := eq_mn return 'S_n in s.
Definition
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
cast_perm
cast_perm_idn eq_n s : cast_perm eq_n s = s :> 'S_n. Proof. by apply/permP => i; rewrite /cast_perm /= eq_axiomK. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
cast_perm_id
cast_ord_permEm n eq_m_n (s : 'S_m) i : @cast_ord m n eq_m_n (s i) = (cast_perm eq_m_n s) (cast_ord eq_m_n i). Proof. by subst m; rewrite cast_perm_id !cast_ord_id. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
cast_ord_permE
cast_permEm n (eq_m_n : m = n) (s : 'S_m) (i : 'I_n) : cast_perm eq_m_n s i = cast_ord eq_m_n (s (cast_ord (esym eq_m_n) i)). Proof. by rewrite cast_ord_permE cast_ordKV. Qed.
Lemma
fingroup
[ "From HB Require Import structures", "From mathcomp Require Import ssreflect ssrfun ssrbool eqtype ssrnat seq path", "From mathcomp Require Import choice fintype tuple finfun bigop finset binomial", "From mathcomp Require Import fingroup morphism" ]
fingroup/perm.v
cast_permE