fact stringlengths 9 8.91k | type stringclasses 20
values | library stringclasses 7
values | imports listlengths 1 12 | filename stringclasses 87
values | symbolic_name stringlengths 1 38 | docstring stringclasses 1
value |
|---|---|---|---|---|---|---|
m := m'.+2. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | m | |
n := Hamming.len m'. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | n | |
cols_PCM : [set c | (wH c^T >= 1)%N] = [set col i (Hamming.PCM m) | i : 'I_n]. Proof. apply/setP => i. rewrite in_set. case Hi : (0 < wH i^T)%N. apply/esym/imsetP. have H0 : (nat_of_rV i^T - 1 < n)%N. have iup := nat_of_rV_up i^T. rewrite /n Hamming.len_dim -subn1 ltn_sub2r //. by rewrite -{1}(expn0 2) ltn_exp2l // ltn... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | cols_PCM | |
col_PCM_inj : injective (fun i => col i (Hamming.PCM m)). Proof. move=> i j Hij. rewrite 2!col_matrix in Hij. have Hi := Hamming.len_two_m i. have Hj := Hamming.len_two_m j. rewrite -(Pnat.Nat2Pos.id i.+1) // in Hij Hi. rewrite -(Pnat.Nat2Pos.id j.+1) // in Hij Hj. rewrite !BinPos_nat_of_P_nat_of_pos in Hij Hi Hj. move... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | col_PCM_inj | |
cols_1 : [set c : 'cV['F_2]_m | wH c^T == 1%nat] = [set col i 1 | i : 'I_m]. Proof. apply/setP => /= i. rewrite in_set; apply/esym. case HwH : (wH i^T == _). apply/imsetP. move: HwH. rewrite wH_num_occ num_occ.num_occ_alt => /cards1P[x Hx]. exists x => //. apply/colP => j. rewrite !mxE /=. move/setP/(_ j): Hx. rewrite ... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | cols_1 | |
cols_1_inj : injective (fun i => col i 1 : 'cV['F_2]_m). Proof. move=> i j /= /matrixP/(_ j 0). rewrite !mxE eqxx /=. by case Hji : (j == i) => // _; apply/esym/eqP. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | cols_1_inj | |
non_unit_cols := [set c : 'cV['F_2]_m | wH c^T > 1]%N. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | non_unit_cols | |
unit_cols := [set c : 'cV['F_2]_m | wH c^T == 1%nat]. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | unit_cols | |
card_all_cols : #|non_unit_cols :|: unit_cols| = n. Proof. rewrite /non_unit_cols /unit_cols. transitivity #|[set c : 'cV['F_2]_m | wH c^T >= 1]%N|. apply: eq_card=> c; by rewrite !in_set orbC eq_sym -leq_eqVlt. by rewrite cols_PCM card_imset ?card_ord //; exact: col_PCM_inj. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | card_all_cols | |
card_unit_cols : #|unit_cols| = m. Proof. by rewrite /unit_cols cols_1 card_imset; [apply: card_ord | apply: cols_1_inj]. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | card_unit_cols | |
card_non_unit : #|non_unit_cols| = (n - m)%nat. Proof. apply/eqP. rewrite -(eqn_add2r #|unit_cols|). apply/eqP. have: #|non_unit_cols :&: unit_cols| = #|(set0 : {set 'cV['F_2]_m})|. apply: eq_card=> c. rewrite !in_set andbC. apply/negP. by case/andP => /eqP ->. rewrite cards0 => Hint. rewrite -(subn0 (_ + _)%nat) -[X i... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | card_non_unit | |
idsA := [seq i <- enum 'I_n | col i (Hamming.PCM m) \in non_unit_cols]. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | idsA | |
ids1 (i : 'I_m) : {j : 'I_n | col j (Hamming.PCM m) = col i 1}. have Hin : col i 1 \in image (fun j => col j (Hamming.PCM m)) 'I_n. apply/mapP. have Hi : col i 1 \in [set col i (Hamming.PCM m) | i : 'I_n]. rewrite -cols_PCM inE. have : col i 1 \in [set c : 'cV['F_2]_m | wH c^T == 1%nat]. rewrite cols_1. by apply/imsetP... | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | ids1 | |
ord_split (i : 'I_n) : 'I_(n - m + m) := cast_ord (esym (subnK (Hamming.dim_len m'))) i. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | ord_split | |
perm_ids (i : 'I_n) := match fintype.split (ord_split i) with | inl j => nth 0 idsA j | inr j => proj1_sig (ids1 j) end. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | perm_ids | |
uniq_idsA : uniq idsA. Proof. exact/filter_uniq/enum_uniq. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | uniq_idsA | |
size_idsA : size idsA = (n - m)%nat. Proof. move/card_uniqP: uniq_idsA <-. rewrite /idsA. suff: #|[set i : 'I_n | col i (Hamming.PCM m) \in non_unit_cols]| = (n - m)%nat. move <-. apply: eq_card => i. by rewrite inE mem_filter mem_enum inE andbT. rewrite -card_non_unit -(card_imset _ col_PCM_inj). apply: eq_card => c. ... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | size_idsA | |
idsA_ids1 (i : 'I_(n - m)) (j : 'I_m) : idsA `_ i <> sval (ids1 j). Proof. destruct (ids1 j) => /= Hij. have Hlti : (i < size idsA)%N by rewrite size_idsA. move: (mem_nth 0 Hlti). rewrite Hij => Hi. move: (imset_f (fun i => col i (Hamming.PCM m)) Hi). rewrite /idsA e. case/imsetP => y Hy Hy'. rewrite mem_filter -Hy' in... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | idsA_ids1 | |
perm_ids_inj : injective perm_ids. Proof. rewrite /perm_ids => i j. move: (splitP (ord_split i)) => [i' Hi'|i' Hi']. move: (splitP (ord_split j)) => [j' Hj'|j' Hj']. move/eqP. rewrite nth_uniq. - rewrite -Hi' -Hj' => /eqP ij. by apply: val_inj. - by rewrite size_idsA. - by rewrite size_idsA. - by apply: uniq_idsA. move... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | perm_ids_inj | |
systematic : 'S_n := perm perm_ids_inj. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | systematic | |
PCM := col_perm systematic (Hamming.PCM m). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | PCM | |
CSM : 'M_(m, n - m):= lsubmx (castmx (erefl m, esym (subnK (Hamming.dim_len m'))) PCM). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | CSM | |
PCM_A_1 : PCM = castmx (erefl, subnK (Hamming.dim_len m')) (row_mx CSM 1). Proof. apply/matrixP => i j. rewrite mxE castmxE /=. have [Hcond|Hcond] := ltnP j (n - m)%N. have -> : cast_ord (esym (subnK (Hamming.dim_len m'))) j = lshift m (Ordinal Hcond) by apply: val_inj. rewrite row_mxEl [in X in _ = X]mxE. rewrite cast... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | PCM_A_1 | |
GEN' : 'M_(n - m, n) := castmx (erefl, subnK (Hamming.dim_len m')) (row_mx 1%:M (- CSM)^T). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | GEN' | |
Definition GEN'' : 'M_(n - m, n) := @Syslcode.GEN 'F_2 _ _ _ (castmx (_, erefl (n - m)%nat) CSM). | Program | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | Definition | |
Obligation . exact: leq_subr. Qed. | Next | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | Obligation | |
Obligation . by rewrite (subnBA _ (Hamming.dim_len m')) addnC addnK. Qed. | Next | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | Obligation | |
GEN'E : GEN' = GEN''. Proof. rewrite /GEN' /GEN'' /Syslcode.GEN !F2_mx_opp. Abort. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | GEN'E | |
PCM_GEN' : PCM *m GEN'^T = 0. Proof. rewrite PCM_A_1 /GEN' /= trmx_cast (castmx_cols_mulmx subnK). by rewrite tr_row_mx trmxK mul_row_col tr_scalar_mx mulmx1 mulmxN mul1mx addrN. Qed. (* NB: proof derived from the module SysLCode_m but longish because of casts *) | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | PCM_GEN' | |
PCM_GEN'_alt : PCM *m GEN'^T = 0. Proof. have H1 : (n - m <= n)%nat by apply: leq_subr. have H2 : (m = n - (n - m))%nat by rewrite (subnBA _ (Hamming.dim_len m')) addnC addnK. move: (Syslcode.H_G_T H1 (castmx (H2, erefl (n - m)%nat) CSM)) => /=. rewrite /Syslcode.PCM /= /Syslcode.GEN /= => H0. rewrite PCM_A_1 /GEN' !F2... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | PCM_GEN'_alt | |
mx_discard : 'M['F_2]_(n - m, n) := castmx (erefl, subnK (Hamming.dim_len m')) (row_mx 1%:M 0). (* castmx _ (@Syslcode.DIS _ _ _ _).*) | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discard | |
mx_discard' : 'M_(n - m, n) := @Syslcode.DIS 'F_2 _ _ (leq_subr _ _). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discard' | |
mx_discardE : mx_discard = mx_discard'. Proof. apply/matrixP => a b. rewrite /mx_discard /mx_discard' /Syslcode.DIS !castmxE /= cast_ord_id. Abort. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discardE | |
mx_discard_GEN' : mx_discard *m GEN'^T = 1%:M. Proof. rewrite /GEN' /mx_discard /= trmx_cast (castmx_cols_mulmx subnK). rewrite tr_row_mx trmxK mul_row_col. by rewrite tr_scalar_mx mulmx1 mul0mx addr0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discard_GEN' | |
m := m'.+2. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | m | |
n := Hamming.len m'. Local Notation systematic := (SysHamming.systematic m'). | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | n | |
mx_discard := col_perm systematic^-1 (SysHamming.mx_discard m'). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discard | |
GEN := col_perm systematic^-1 (SysHamming.GEN' m'). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | GEN | |
PCM_GEN : Hamming.PCM m *m GEN ^T = 0. Proof. by rewrite /GEN tr_col_perm -mul_col_perm SysHamming.PCM_GEN'. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | PCM_GEN | |
mx_discard_GEN : mx_discard *m GEN ^T = 1%:M. Proof. rewrite /GEN /mx_discard tr_col_perm -mul_col_perm. rewrite -col_permM. have -> : (systematic * systematic^-1 = 1)%g. apply/permP=> i. by rewrite permM permK perm1. by rewrite col_perm1 SysHamming.mx_discard_GEN'. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | mx_discard_GEN | |
discard : discardT _ n _ := fun y => y *m mx_discard^T. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | discard | |
channel_code := mkCode [ffun t => t *m GEN] [ffun x => omap discard (@hamming_repair _ x)]. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | channel_code | |
encode_inj : injective (enc channel_code). Proof. move=> /= i j; rewrite !ffunE => /(congr1 (fun t => mx_discard *m t^T)). by rewrite !trmx_mul !mulmxA mx_discard_GEN !mul1mx => /trmx_inj. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | encode_inj | |
enc_discard_is_id : cancel_on (Hamming.code m) (enc channel_code) discard. Proof. move=> y Hy. rewrite /discard /= ffunE. rewrite /syndrome in Hy. have {}Hy : SysHamming.PCM m' *m row_perm systematic y^T = 0. rewrite /SysHamming.PCM. rewrite mul_col_perm. rewrite 2!row_permE. rewrite !(mulmxA (perm_mx systematic^-1)). ... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | enc_discard_is_id | |
syndrome_enc msg : syndrome (Hamming.PCM m) ((enc channel_code) msg) = 0. Proof. apply/eqP => /=; rewrite ffunE /syndrome. by rewrite trmx_mul trmxK -mulmxA -(trmxK GEN) -trmx_mul PCM_GEN trmx0 mulmx0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | syndrome_enc | |
enc_img_is_code : (enc channel_code) @: 'rV_(n - m) \subset Hamming.code m. Proof. apply/subsetP => /= t /imsetP[/= x _] ->. by rewrite mem_kernel_syndrome0 (syndrome_enc x). Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | enc_img_is_code | |
hamming_repair_img : (oimg (@hamming_repair m')) \subset Hamming.code m. Proof. apply/subsetP => y /=. rewrite inE => /existsP[/= x]. rewrite /hamming_repair ffunE => /eqP [<-]. by rewrite mem_kernel_syndrome0 syndromeD syndrome_hamming_err F2_addmx. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | hamming_repair_img | |
r := r'.+2. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | r | |
n := Hamming.len r'. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | n | |
lcode : Lcode.t 'F_2 'F_2 n _ := @Lcode.mk _ _ _ _ _ (Encoder.mk (@Hamming'.encode_inj r') (@Hamming'.enc_img_is_code r')) (Decoder.mk (@hamming_repair_img r') (@Hamming'.discard r')) (@Hamming'.enc_discard_is_id r'). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | lcode | |
f := Encoder.enc (Lcode.enc lcode). | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | f | |
phi := Decoder.dec (Lcode.dec lcode). | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | phi | |
repair := Decoder.repair (Lcode.dec lcode). | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | repair | |
hamming_err_enc m : hamming_err (f m) = 0. Proof. by rewrite /hamming_err Hamming'.syndrome_enc nat_of_rV_0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | hamming_err_enc | |
dec_enc m : phi (f m) = Some m. Proof. rewrite /= !ffunE /= /hamming_repair. move: (hamming_err_enc m); rewrite !ffunE /= => ->. rewrite addr0 /Hamming'.discard -mulmxA. suff -> : Hamming'.GEN r' *m (Hamming'.mx_discard r')^T = 1%:M by rewrite mulmx1. apply: trmx_inj; by rewrite trmx1 trmx_mul trmxK Hamming'.mx_discard... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | dec_enc | |
err_codeword c : c \in lcode -> hamming_err c = 0. Proof. rewrite /hamming_err mem_kernel_syndrome0 => /eqP ->; by rewrite nat_of_rV_0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | err_codeword | |
repair_codeword c : c \in lcode -> repair c = Some c. Proof. rewrite /= /repair /= /hamming_repair ffunE => Hc; congr Some. apply/eqP; by rewrite eq_sym addrC -subr_eq subrr eq_sym err_codeword. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | repair_codeword | |
decoder : MD_decoding [set cw in lcode] (Decoder.repair (Lcode.dec lcode)). move=> /= y c Hy c'. rewrite !(dH_sym _ y). move: (@hamming_MD_alt r' y c). move=> ->. - case: arg_minnP. by destruct C_not_empty. by move => /= i Hi; apply. - by rewrite -Hy /Decoder.repair /= /hamming_repair ffunE. Defined. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | decoder | |
encode_decode c y : c \in lcode -> repair y != None -> (dH c y <= 1)%N -> repair y = Some c. Proof. move=> Hc Hy cy. apply: (@mddP _ _ lcode _ decoder (hamming_not_trivial r')) => //. by apply: hamming_repair_img. by rewrite /mdd_err_cor hamming_min_dist. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | encode_decode | |
repair_failure2 e c : c \in lcode -> ~~ (if repair e is Some y0 then y0 != c else true) -> (wH (c + e) <= 1)%N. Proof. move=> Hc H. suff : dH e c = O \/ dH e c = 1%N by rewrite dHE F2_mx_opp addrC; case=> ->. move: H. move x : (repair e) => [|] // ex. rewrite negbK => /eqP xc. move: ex; rewrite {}xc {x}. rewrite /repai... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | repair_failure2 | |
repair_failure1 e c : c \in lcode -> (if repair e is Some x then x != c else true) -> (1 < wH (c + e))%N. Proof. move=> Hc. move xc : (repair e) => [x ex |]; last first. by move=> _; move: xc; rewrite /repair /= /hamming_repair ffunE. rewrite ltnNge; apply: contra xc. rewrite leq_eqVlt ltnS leqn0 orbC => /orP[|/eqP cy1... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | repair_failure1 | |
repair_failure e c : c \in lcode -> (if repair e is Some x then x != c else true) = (1 < wH (c + e))%N. Proof. move=> Hc. apply/idP/idP; first by move/repair_failure1; apply. apply: contraTT; move/repair_failure2; rewrite -leqNgt; by apply. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | repair_failure | |
R := Rdefinitions.R. Variable M : finType. Hypothesis M_not_0 : (0 < #|M|)%nat. Variable p : {prob R}. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | R | |
card_F2 : #| 'F_2 | = 2%N. by rewrite card_Fp. Qed. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | card_F2 | |
W := BSC.c card_F2 p. Variable m' : nat. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | W | |
m := m'.+2. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | m | |
n := Hamming.len m'. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | n | |
hamming_channel_code : code _ _ _ n := Hamming'.channel_code m'. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | hamming_channel_code | |
e_hamming m0 : e(W, hamming_channel_code) m0 = \sum_(e0 in [set e0 : 'rV['F_2]_n | (2 <= wH e0)%nat]) (1 - Prob.p p) ^+ (n - wH e0) * (Prob.p p) ^+ wH e0 :> R. Proof. rewrite /ErrRateCond /Pr /=. transitivity ( \sum_(a | a \in preimC (dec hamming_channel_code) m0) let d := dH ((enc hamming_channel_code) m0) a in (1 - P... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | e_hamming | |
hamming_error_rate : Prob.p p < 1/2 -> echa(W, hamming_channel_code) = 1 - ((1 - Prob.p p) ^+ n) - n%:R * (Prob.p p) * ((1 - Prob.p p) ^+ (n - 1)). Proof. move=> p05. rewrite /CodeErrRate. apply: eq_trans. apply: f_equal. apply: eq_bigr => i _; exact: e_hamming. apply: eq_trans. apply: f_equal. by rewrite big_const /= ... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg ssrnum fingroup finalg perm.",
"From mathcomp Require Import zmodp matrix mxalgebra vector ring.",
"From mathcomp Require Import Rstruct reals.",
"Require Import ssr_ext ssralg_ext bigop_ext realType_ext f2 linearcode natbin.",
"Require Import hamming fdist... | ecc_classic/hamming_code.v | hamming_error_rate | |
t (F : finFieldType) n := {vspace 'rV[F]_n}. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | t | |
aclosed : addr_closed C. Proof. split => [|? ? ? ?]; by [rewrite mem0v | rewrite rpredD]. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | aclosed | |
sclosed : GRing.scaler_closed C. Proof. move=> ? ? ?; by rewrite rpredZ. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | sclosed | |
oclosed : oppr_closed C. Proof. move=> ? ?; by rewrite -scaleN1r rpredZ. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | oclosed | |
not_empty : 0 < #| [set cw in C] | := vspace_not_empty C. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | not_empty | |
mem_poly_rV k (f : 'I_k -> {poly F}) : (forall i, poly_rV (f i) \in C) -> poly_rV (\big[+%R/0]_(i < k) (f i)) \in C. Proof. elim: k f => [f ? /= | ? IH f ?]. - by rewrite big_ord0 linear0 mem0v. - by rewrite big_ord_recl linearD /= (proj2 aclosed) // IH. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | mem_poly_rV | |
syndrome (y : 'rV_n) : 'rV_m := (H *m y^T)^T. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | syndrome | |
syndromeD y y' : syndrome (y + y') = syndrome y + syndrome y'. Proof. by rewrite /syndrome linearD /= mulmxDr linearD /=. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | syndromeD | |
syndromeZ k y : syndrome (k *: y) = k *: syndrome y. Proof. by rewrite /syndrome 3!linearZ /=. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | syndromeZ | |
syndromeN y : syndrome (- y) = - syndrome y. Proof. by rewrite /syndrome 3!linearN. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | syndromeN | |
syndrome0 : syndrome 0 = 0. Proof. by rewrite /syndrome trmx0 mulmx0 trmx0. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | syndrome0 | |
additive_syndrome : additive syndrome. Proof. move=> x y; by rewrite syndromeD syndromeN. Qed. HB.instance Definition _ := GRing.isAdditive.Build _ _ _ additive_syndrome. HB.instance Definition _ := GRing.isScalable.Build _ _ _ _ _ syndromeZ. (*Definition lin_syndrome : {linear 'rV[F]_n -> 'rV[F]_m} := GRing.Linear.Pac... | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | additive_syndrome | |
hom_syndrome : 'Hom('rV[F]_n, 'rV[F]_m) := linfun syndrome. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | hom_syndrome | |
kernel : Lcode0.t F n := lker hom_syndrome. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | kernel | |
dim_hom_syndrome_ub : \dim (limg hom_syndrome) <= m. Proof. rewrite [in X in _ <= X](_ : m = \dim (fullv : {vspace 'rV[F]_m})); last first. by rewrite dimvf/= /dim/= mul1n. by rewrite dimvS // subvf. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dim_hom_syndrome_ub | |
mem_kernel_syndrome0 y : (y \in kernel) = (syndrome y == 0). Proof. by rewrite memv_ker lfunE. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | mem_kernel_syndrome0 | |
dim_kernel (Hm : \rank H = m) (mn : m <= n) : \dim kernel = (n - m)%N. Proof. move: (limg_ker_dim hom_syndrome fullv). rewrite (_ : (fullv :&: _)%VS = kernel); last exact/capv_idPr/subvf. rewrite (_ : \dim fullv = n); last by rewrite dimvf /dim /= mul1n. move=> kerimg; rewrite -{}[in RHS]kerimg. suff -> : \dim (limg ho... | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dim_kernel | |
dual_code : {vspace 'rV[F]_n} := (linfun (mulmxr H) @: fullv)%VS. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dual_code | |
dim_dual_code : (\dim (kernel H) + \dim dual_code = n)%N. Proof. move: (limg_ker_dim (linfun (syndrome H)) fullv). rewrite -/(kernel H). rewrite (_ : (fullv :&: _)%VS = kernel H); last by apply/capv_idPr/subvf. rewrite (_ : \dim fullv = n); last by rewrite dimvf /dim /= mul1n. rewrite (_ : \dim (limg _) = \dim dual_cod... | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dim_dual_code | |
dual_codeP1 y : y \in dual_code -> (forall x, x \in kernel H -> y *m x^T = 0). Proof. case/memv_imgP => y' _. rewrite !lfunE => ->{y} x. rewrite memv_ker => /eqP. rewrite lfunE /= /syndrome => /(congr1 trmx). rewrite trmx0 trmxK -mulmxA => ->; by rewrite mulmx0. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dual_codeP1 | |
dual_codeP2 y : (forall x, x \in kernel H -> y *m x^T = 0) -> y \in dual_code. Proof. move=> /= H0. suff [l Hl] : exists l : 'rV_m, y = \sum_(j < m) (l ord0 j) *: (row j H). apply/memv_imgP; exists l. by rewrite memvf. by rewrite lfunE /= Hl mulmx_sum_row. Abort. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | dual_codeP2 | |
not_trivial_dim : 0 < \dim C. Proof. rewrite lt0n dimv_eq0; by apply/not_trivialP. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | not_trivial_dim | |
codeword_lowest_deg c := [forall y, [&& y \in C, y != c & y != 0] ==> (size (rVpoly c) <= size (rVpoly y))]. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | codeword_lowest_deg | |
non0_codeword_lowest_deg c := [&& c \in C, c != 0 & codeword_lowest_deg c]. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | non0_codeword_lowest_deg | |
exists_non0_codeword_lowest_deg : { c : 'rV_n | non0_codeword_lowest_deg c }. Proof. apply: sigW. case: C_not_trivial => g /andP[gC g0]. have := erefl [arg min_(g' < g | (g' \in C) && (g' != 0)) (size (rVpoly g'))]. case: arg_minnP => /=; [by apply/andP | move=> g']. case/andP=> g'C g'0 g_min _. exists g'. rewrite /non... | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | exists_non0_codeword_lowest_deg | |
lowest_size := size (rVpoly (val exists_non0_codeword_lowest_deg)). | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | lowest_size | |
size_lowestP x : x \in C -> x != 0 -> lowest_size <= size (rVpoly x). Proof. move=> xC x0. rewrite /lowest_size. case: exists_non0_codeword_lowest_deg => g /= /and3P[H1 H2 /forallP]. move/(_ x); rewrite xC x0 /= andbT. have [->//|xg] := eqVneq x g. by rewrite implyTb. Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | size_lowestP | |
size_lowest g : non0_codeword_lowest_deg g -> size (rVpoly g) = lowest_size. Proof. case/and3P => gC g0 Hg. rewrite /lowest_size. case: exists_non0_codeword_lowest_deg => g' /= /and3P[g'C g'0 Hg']. have [->//|gg'] := eqVneq g g'. apply/eqP; rewrite eqn_leq. move: Hg => /forallP/(_ g'). rewrite g'C /= g'0 andbT eq_sym g... | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | size_lowest | |
non_0_cw := xchoose C_not_trivial. | Definition | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | non_0_cw | |
non_0_cw_mem : non_0_cw \in C. Proof. by rewrite /non_0_cw; case/andP: (xchooseP C_not_trivial). Qed. | Lemma | ecc_classic | [
"From HB Require Import structures.",
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssr_ext ssralg_ext poly_ext f2 hamming decoding channel_code.",
"From mathcomp Require Import fi... | ecc_classic/linearcode.v | non_0_cw_mem |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.