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 |
|---|---|---|---|---|---|---|
wH_non_0_cw : wH non_0_cw != O. Proof. by rewrite /non_0_cw; case/andP: (xchooseP C_not_trivial); rewrite wH_eq0. 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 | wH_non_0_cw | |
min_wH_cw := arg_min non_0_cw [pred cw | (cw \in C) && (wH cw != O)] (@wH 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 | min_wH_cw | |
min_dist := wH min_wH_cw. | 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 | min_dist | |
min_dist_is_min c : c \in C -> c != 0 -> min_dist <= wH c. Proof. move=> cC c0; rewrite /min_dist /min_wH_cw. case: arg_minnP => /= [|c1 /andP [] Hc1 wHc1]. by rewrite non_0_cw_mem wH_non_0_cw. by apply; rewrite cC /= wH_eq0. 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 | min_dist_is_min | |
min_dist_achieved : exists c, c \in C /\ c <> 0 /\ wH c = min_dist. Proof. exists min_wH_cw; split. rewrite /min_wH_cw /=. case: arg_minnP => /=. by rewrite non_0_cw_mem wH_non_0_cw. by move=> /= c /andP[]. split; last reflexivity. rewrite /min_wH_cw /=. case: arg_minnP => /=. by rewrite non_0_cw_mem wH_non_0_cw. by mo... | 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 | min_dist_achieved | |
min_dist_neq0 : min_dist <> O. Proof. move=> abs. case: min_dist_achieved => /= v [vC [/eqP/eqP v0]]. by rewrite abs; move/eqP; rewrite wH_eq0 => /eqP. 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 | min_dist_neq0 | |
min_distP d : (forall x : 'rV[F]_n, x \in C -> x != 0 -> d <= wH x) /\ (exists x : 'rV[F]_n, x \in C /\ x != 0 /\ wH x <= d) -> min_dist = d. Proof. case=> H1 [y [yC [y0 yd]]]. rewrite /min_dist /min_wH_cw. case: arg_minnP => /=. by rewrite non_0_cw_mem wH_non_0_cw. move=> x /andP[xC x0] H. apply/eqP. rewrite eqn_leq; ... | 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 | min_distP | |
min_dist_prop m m' : m \in C -> m' \in C -> m != m' -> min_dist <= dH m m'. Proof. move=> /= mm' mC m'C; apply: min_dist_is_min. by apply: ((@Lcode0.aclosed n F C).2) => //; rewrite Lcode0.oclosed. by rewrite subr_eq0. 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 | min_dist_prop | |
mdd_err_cor := min_dist.-1./2. | 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 | mdd_err_cor | |
mdd_oddE : odd min_dist -> mdd_err_cor = min_dist./2. Proof. move=> odd_d. rewrite /mdd_err_cor (_ : _.-1./2 = min_dist./2) //. by rewrite -{1}(odd_double_half min_dist) odd_d /= (half_bit_double _ false). 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 | mdd_oddE | |
mdd_evenE : ~~ odd min_dist -> mdd_err_cor = (min_dist./2 - 1)%N. Proof. move=> even_d. rewrite /mdd_err_cor (_ : min_dist.-1./2 = min_dist./2 - 1)%N //. move Hd : min_dist => d. case: d Hd even_d => //= d -> /=. by rewrite negbK uphalf_half => ->; rewrite add1n subn1. 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 | mdd_evenE | |
sbound_f' k (H : k.-1 <= n) := fun c : 'rV[F]_n => \row_(i < k.-1) c ord0 (widen_ord H i). | 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 | sbound_f' | |
sbound_f'Z k (H : k.-1 <= n) a y : sbound_f' H (a *: y) = a *: sbound_f' H y. Proof. by apply/rowP => i; rewrite !mxE. 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 | sbound_f'Z | |
sbound_f'D k (H : k.-1 <= n) y y' : sbound_f' H (y + y') = sbound_f' H y + sbound_f' H y'. Proof. by apply/rowP => i; rewrite !mxE. 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 | sbound_f'D | |
sbound_f'N k (H : k.-1 <= n) y : sbound_f' H (- y) = - sbound_f' H y. Proof. by apply/rowP => i; rewrite !mxE. 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 | sbound_f'N | |
additive_sbound_f' k (H : k.-1 <= n) : additive (sbound_f' H). Proof. by move=> x y; rewrite sbound_f'D sbound_f'N. Qed. HB.instance Definition _ k (H : k.-1 <= n) := GRing.isAdditive.Build _ _ _ (additive_sbound_f' H). HB.instance Definition _ k (H : k.-1 <= n) := GRing.isScalable.Build _ _ _ _ _ (sbound_f'Z H). (*Def... | 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_sbound_f' | |
singleton_bound : min_dist <= n - \dim C + 1. Proof. set k := \dim C. have dimCn : k.-1 < n. have /dimvS := subvf C. rewrite dimvf /dim /= mul1n. by apply: leq_trans; rewrite prednK // not_trivial_dim. set f := linfun (sbound_f' (ltnW dimCn)). have H1 : \dim (f @: C) <= k.-1. suff : \dim (f @: C) <= \dim (fullv : {vspa... | 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 | singleton_bound | |
maximum_distance_separable := (min_dist == n - \dim C + 1)%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 | maximum_distance_separable | |
non0_codeword_lowest_deg_uniq (g : 'rV['F_2]_n) : g \in C -> g != 0 -> codeword_lowest_deg C g -> forall j, j \in C -> j != 0 -> size (rVpoly g) = size (rVpoly j) -> g = j. Proof. move=> gC g0 Cg /= j jC j0 gj. (* i show that if j is another polynomial with minimal degree but different from g then g - j can only be 0, ... | 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 | non0_codeword_lowest_deg_uniq | |
min_dist_double v w d m : f v = Some m -> w \in C -> dH w v <= d -> dH w m <= d.*2. Proof. move=> vm wC H. rewrite (leq_trans (dH_tri_ine v _ _)) // -addnn leq_add //. have {}wC : w \in [set cw in C] by rewrite inE. by rewrite dH_sym (leq_trans (MD_dec_f vm wC)). Qed. Hypothesis C_not_trivial : not_trivial C. Hypothesi... | 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 | min_dist_double | |
mddP x y : f y != None -> x \in C -> dH x y <= mdd_err_cor C_not_trivial -> f y = Some x. Proof. move=> dec_not_None mC enc_m_v. have [m0 Hm0] : exists m0, f y = Some m0. case: (f y) dec_not_None => [m0|] // _; by exists m0. case/boolP : (odd (min_dist C_not_trivial)) => [odd_d | even_d]. - rewrite (mdd_oddE odd_d) in ... | 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 | mddP | |
mddP' w v : f (w + v) != None -> w \in C -> wH v <= mdd_err_cor C_not_trivial -> f (w + v) = Some w. Proof. move=> wv wC Hv. suff ? : dH w (w + v) <= mdd_err_cor C_not_trivial by rewrite (@mddP w _). by rewrite /dH opprD addrA subrr sub0r wH_opp. 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 | mddP' | |
vproj n (F : pzRingType) (x : 'rV[F]_n) (s : {set 'I_n}) := \row_(i < n) if i \in s then x ord0 i else 0. | 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 | vproj | |
wH_vproj n (F : nzRingType) (x : 'rV[F]_n) (s : {set 'I_n}) : wH (vproj x s) <= #| s |. Proof. rewrite /wH count_map (_ : #| s | = count (mem s) (enum 'I_n)); last first. rewrite cardE -count_predT !count_filter; apply: eq_in_count => /= i _. by rewrite !inE andbT. apply: sub_count => /= i /=. rewrite mxE; case: ifPn =... | 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 | wH_vproj | |
dH_vproj n (F : nzRingType) (x : 'rV[F]_n) (s : {set 'I_n}) : s \subset wH_supp x -> dH x (vproj x s) = #| (~: s) :&: (wH_supp x) |. Proof. move=> H; rewrite dHE. have -> : x - vproj x s = vproj x (~: s). apply/rowP => i; rewrite !mxE !inE; case: ifPn => /=; [by rewrite subrr | by rewrite subr0]. rewrite /vproj /wH cou... | 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 | dH_vproj | |
wH_vproj_take n (F : nzRingType) (x : 'rV[F]_n) t : wH (vproj x [set i in take t (enum (wH_supp x))]) <= t. Proof. set s := take t (enum (wH_supp x)). rewrite (leq_trans (wH_vproj x [set i in s])) //. apply: (@leq_trans (size s)); last first. rewrite size_take -cardE card_wH_supp; case: ifPn => //; by rewrite -leqNgt. ... | 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 | wH_vproj_take | |
wH_vproj_take2 n (F : nzRingType) (x : 'rV[F]_n) t : t < wH x <= t.*2 -> dH x (vproj x [set i in take t (enum (wH_supp x))]) <= t. Proof. move=> xt. rewrite dH_vproj; last first. apply/subsetP => i /=; rewrite !inE. by move/mem_take; rewrite mem_enum inE. rewrite (@leq_trans #| drop t (enum (wH_supp x)) |) //. apply/su... | 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 | wH_vproj_take2 | |
ball q n x r := [set y : 'rV['F_q]_n | dH x y <= r]. | 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 | ball | |
min_dist_ball_disjoint n q (C : Lcode0.t 'F_q n) (C_not_trivial : not_trivial C) t : min_dist C_not_trivial = t.*2.+1 -> forall x y, x \in C -> y \in C -> x != y -> ball x t :&: ball y t = set0. Proof. move=> Hmin /= x y xC yC xy. apply/eqP/negPn/negP; case/set0Pn => /= z; rewrite !inE => /andP[xzt yzt]. have xyt : dH ... | 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 | min_dist_ball_disjoint | |
ball_disjoint_min_dist_lb n q (C : Lcode0.t 'F_q n) (C_not_trivial : not_trivial C) t : (forall x y, x \in C -> y \in C -> x != y -> ball x t :&: ball y t = set0) -> forall x : 'rV_n, x \in C -> x != 0 -> t.*2 < wH x (* NB: not as strong as min_dist C_not_trivial = t.*2.+1 *). Proof. move=> H x xC x0. rewrite ltnNge; a... | 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 | ball_disjoint_min_dist_lb | |
card_ball q n r := (\sum_(i < r.+1) 'C(n, i) * (q.-1)^i)%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 | card_ball | |
card_ballE q n (r : nat) : r <= n -> prime q -> forall x : 'rV['F_q]_n, #| ball x r | = card_ball q n r. Proof. destruct q as [|q'] => //. destruct q' as [|q'] => //. set q := q'.+2. destruct n as [|n']. rewrite leqn0 => /eqP -> => primep x. rewrite (empty_rV x) /card_ball big_ord_recl bin0 mul1n big_ord0 addn0 expn0. ... | 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 | card_ballE | |
hamming_bound q n (C : Lcode0.t 'F_q n) (C_not_trivial : not_trivial C) t (tn : t <= n) : prime q -> min_dist C_not_trivial = t.*2.+1 -> #| C | * card_ball q n t <= q^n. Proof. move=> primeq. destruct q as [|q'] => //. destruct q' as [|q'] => //. set q := q'.+2. move/min_dist_ball_disjoint => H. suff : \sum_(c in C) #|... | 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 | hamming_bound | |
perfect n q (C : Lcode0.t 'F_q n) (C_not_trivial : not_trivial C) := exists r, min_dist C_not_trivial = r.*2.+1 /\ (#| C | * card_ball q n r = q^n)%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 | perfect | |
MD_BDD (Himg : oimg f \subset C) : (forall x, f x != None) (* f does not fail *) -> MD_decoding [set cw in C] f -> (mdd_err_cor C_not_trivial).-BDD (C, f). Proof. move=> no_fail Hmin. rewrite /BD_decoding => /= c e cC wHe. move: (@mddP _ _ _ _ Hmin C_not_trivial Himg c (c + e) (no_fail _) cC) => //. by rewrite dH_wH =>... | 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 | MD_BDD | |
t (C : Lcode0.t A n) (M : finType) : Type := mk { enc :> encT A M n ; enc_inj : injective enc ; enc_img : enc @: M \subset C }. | Record | 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 | |
encoder_coercion A n (C : Lcode0.t A n) M (c : Encoder.t C M) : encT A M n := let: Encoder.mk v _ _ := c in v. | Coercion | 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 | encoder_coercion | |
t (C : Lcode0.t A n) (M : finType) : Type := mk { repair :> repairT B A n ; repair_img : oimg repair \subset C ; discard : discardT A n M ; dec : decT B M n := [ffun x => omap discard (repair x)] }. | Record | 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 | |
decoder_coercion B A n (C : Lcode0.t A n) k (c : Decoder.t B C k) : repairT B A n := let: Decoder.mk v _ _ _ := c in v. | Coercion | 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 | decoder_coercion | |
t : Type := mk { lcode0_of :> Lcode0.t A n ; enc : Encoder.t lcode0_of M ; dec : Decoder.t B lcode0_of M ; compatible : cancel_on lcode0_of (Encoder.enc enc) (Decoder.discard dec) }. | Record | 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 | |
dimlen (k : nat) (C : t A B n 'rV[A]_k) : 1 < #|A| -> k <= n. Proof. move=> F1. case : C => cws [] /= f. move/inj_card => /=. by rewrite !card_mx !mul1n leq_exp2l. 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 | dimlen | |
min_dist_prop_old (M : finType) (C : t A B n M) (C_not_trivial : not_trivial C) m m' : m != m' -> min_dist C_not_trivial <= dH (Encoder.enc (enc C) m) (Encoder.enc (enc C) m'). Proof. move=> /= mm'. have H : Encoder.enc (enc C) m - Encoder.enc (enc C) m' \in C. apply: (@Lcode0.aclosed n _ C).2. - move/subsetP: (Encoder... | 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 | min_dist_prop_old | |
lcode_coercion (A B : finFieldType) (n : nat) (M : finType) (c : Lcode.t A B n M) : {vspace 'rV[A]_n} := let: Lcode.mk v _ _ _ := c in v. | Coercion | 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 | lcode_coercion | |
cast_cols {rows} {f : nat -> nat -> nat} {P : nat -> nat -> Type} (HPf : forall k n, P k n -> f k n = n) {k n} (HP : P k n) : 'M[R]_(rows, f k n) -> 'M_(rows, n) := castmx (erefl rows, HPf _ _ HP). | 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 | cast_cols | |
mulmx_castmx_cols_comm : forall (f : nat -> nat -> nat) (P : nat -> nat -> Type) (HPf: forall k n, P k n -> f k n = n) k n (HP : P k n) rows (x : 'M[R]_(rows, k)) (B : 'M_(k, f k n)), x *m castmx (erefl k, HPf _ _ HP) B = castmx (erefl rows, HPf _ _ HP) (x *m B). Proof. move=> f P HPf k n HP. move: (HPf k n HP); rewrit... | 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 | mulmx_castmx_cols_comm | |
castmx_mulmx_cols_comm : forall (f : nat -> nat -> nat) (P : nat -> nat -> Type) (HPf: forall k n, P k n -> f k n = n) k n (HP : P k n) (x : 'M[R]_(n, k)) (B : 'M_(k, f k n)), (castmx (erefl k, HPf _ _ HP) B) *m x = (B *m castmx (esym (HPf _ _ HP), erefl _) x). Proof. move=> f P HPf k n_ HP. move: (HPf k n_ HP); rewrit... | 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 | castmx_mulmx_cols_comm | |
mulmx_castmx_cols_comm2 : forall (f : nat -> nat -> nat) (P : nat -> nat -> Type) (HPf: forall k n, P k n -> f k n = n) k n (HP : P k n) rows (x : 'M[R]_(f k n, rows)) cols (B : 'M_(rows, cols)), castmx (HPf _ _ HP, erefl rows) x *m B = castmx (HPf _ _ HP, erefl cols) (x *m B). Proof. move=> f P HPf k n_ HP. move: (HPf... | 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 | mulmx_castmx_cols_comm2 | |
castmx_cols_mulmx : forall (f : nat -> nat -> nat) P (HPf : forall k n, P k n -> f k n = n) k n (HP : P k n) rows (X : 'M[R]_(rows, f k n)) cols (Y : 'M_(f k n, cols)), castmx (erefl rows, HPf _ _ HP) X *m castmx (HPf _ _ HP, erefl cols) Y = X *m Y. Proof. move=> f P HPf k n HP rows X cols Y; apply/matrixP => i j. rewr... | 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 | castmx_cols_mulmx | |
castmx_cols_mulmx2 : forall (f : nat -> nat -> nat) P (HPf : forall k n, P k n -> f k n = n) k n (HP : P k n) (X : 'M[R]_(f k n, f k n)) cols (Y : 'M_(f k n, cols)), castmx (HPf _ _ HP, HPf _ _ HP) X *m castmx (HPf _ _ HP, erefl cols) Y = castmx (HPf _ _ HP, erefl cols) (X *m Y). Proof. move=> f P HPf k n_ HP X cols Y;... | 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 | castmx_cols_mulmx2 | |
rank_cast_cols_comm : forall (f : nat -> nat -> nat) (P : nat -> nat -> Type) (HPf: forall k n, P k n -> f k n = n) k n (HP : P k n) (B : 'M[F]_(k, f k n)), \rank (cast_cols HPf HP B) = \rank B. Proof. move=> f P HPf k n HP. rewrite /cast_cols /eq_rect. move: (HPf k n HP); rewrite (HPf k n HP) => e. by rewrite (eq_irre... | 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 | rank_cast_cols_comm | |
PCM : 'M_(n - k, n) := castmx (erefl, subnKC dimlen) (row_mx CSM 1%:M). | 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 | PCM | |
GEN : 'M_(k, n) := castmx (erefl, subnKC dimlen) (row_mx 1%:M (- CSM)^T). Local Notation "'A" := CSM. Local Notation "'G" := GEN. Local Notation "'H" := PCM. | 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 | GEN | |
rank_GEN : \rank 'G = k. Proof. by rewrite /GEN mxrank_castmx; exact/rank_row_mx/rank_I. Qed. (* H^T is the right kernel of 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 | rank_GEN | |
G_H_T : 'G *m 'H ^T = 0. Proof. rewrite /GEN /PCM trmx_cast /= (castmx_cols_mulmx subnKC) tr_row_mx. by rewrite mul_row_col mul1mx trmx1 mulmx1 -linearD addrN linear0. 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 | G_H_T | |
H_G_T : 'H *m 'G ^T = 0. Proof. by rewrite -trmx0 -G_H_T trmx_mul trmxK. 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 | H_G_T | |
encode : encT F 'rV[F]_k n := [ffun x => x *m 'G]. | 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 | encode | |
encode_inj : injective encode. Proof. rewrite /injective => a b; rewrite /encode 2!ffunE. exact: (@full_rank_inj _ _ _ 'G dimlen rank_GEN). 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 | encode_inj | |
encode_code pt : encode pt \in kernel 'H. Proof. rewrite memv_ker lfunE /= /encode ffunE /syndrome. by rewrite trmx_mul trmxK -mulmxA G_H_T 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 | encode_code | |
DIS : 'M[F]_(k, n) := castmx (erefl, subnKC dimlen) (row_mx 1%:M 0). Local Notation "'D" := DIS. | 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 | DIS | |
discard : discardT F n 'rV_k := [ffun x => x *m 'D^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 | discard | |
t (repair : repairT F F n) (repair_img : oimg repair \subset kernel 'H) (H : cancel_on (kernel 'H) encode discard) : Lcode.t F F n 'rV[F]_k. apply: (@Lcode.mk _ _ _ _ (kernel 'H) (Encoder.mk encode_inj _) (Decoder.mk repair_img discard) H) => /=. apply/subsetP => m. case/imsetP => /= m' _ ->. exact: encode_code. Define... | 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 | |
C : Lcode.t _ _ _ _ := Syslcode.t repair_img cancel_discard. | Let | 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 | C | |
encode_image_code (x : 'rV_n) : {y : 'rV_k | Encoder.enc (Lcode.enc C) y = x} -> x \in C. Proof. case=> y <-. by rewrite /= memv_ker lfunE /= /syndrome ffunE trmx_mul trmxK -mulmxA Syslcode.G_H_T 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 | encode_image_code | |
t (C : Lcode0.t F1 n) := mk { c : Lcode0.t F0 n ; P : forall x, x \in c <-> map_mx f x \in C }. | Inductive | 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 | |
rcode_coercion (F0 F1 : finFieldType) (f : {rmorphism F0 -> F1}) (n : nat) (C : Lcode0.t F1 n) (c : Rcode.t f C) : {vspace 'rV[F0]_n} := let: Rcode.mk x _ := c in x. | Coercion | 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 | rcode_coercion | |
n := n'.+1. Variable Hdimlen : k <= n. Variable CSM : 'M['F_2]_(n - k, k). Local Notation "'H" := (Syslcode.PCM Hdimlen CSM). Local Notation "'G" := (Syslcode.GEN Hdimlen CSM). | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | n | |
encode := Syslcode.encode Hdimlen CSM. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | encode | |
discard := @Syslcode.discard 'F_2 _ _ Hdimlen. Variable repair : repairT 'F_2 'F_2 n. Variable repair_img : oimg repair \subset kernel 'H. Variable encode_discard : cancel_on (kernel 'H) encode discard. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | discard | |
C := Syslcode.t repair_img encode_discard. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | C | |
decode := Decoder.dec (Lcode.dec C). Variable t : nat. Local Open Scope ecc_scope. Variable bdd : t.-BDD (C, repair). (* Alice chooses (1) a random non-singular matrix S (the ``row scrambler'' matrix) and (2) a random permutation matrix P: *) Variable S : 'M['F_2]_k. Variable S_inv : S \in unitmx. Variables p : 'S_n. | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | decode | |
P : 'M['F_2]_n := perm_mx p. (* S, G (the generator matrix of the code), and P form the private key. \hat{G} and t form the public key. *) | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | P | |
pubkey : 'M_(k, n) := S *m 'G *m P. (* Encryption Bob's message is a vector of k bits. Bob chooses a random error vector of n bits with t 1's *) Variable msg : 'rV['F_2]_k. Variable z : 'rV['F_2]_n. Variable Hz : wH z = t. (* The corresponding ciphertext is: *) | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | pubkey | |
cyp : 'rV_n := msg *m pubkey + z. (* Decryption: Decryption consists of decoding and matrix multiplications as follows: *) | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | cyp | |
cyp_hat : 'rV_n := cyp *m P^-1. Variable msg_hat : {m | decode cyp_hat = Some m}. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | cyp_hat | |
msg' : 'rV_k := proj1_sig msg_hat *m invmx S. | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | msg' | |
decryption_undoes_encryption : msg = msg'. Proof. rewrite /msg'. destruct msg_hat as [msg_hat' Hmsg_hat] => /=. have : decode cyp_hat = Some (msg *m S). have -> : cyp_hat = (msg *m S) *m 'G + (z *m P^-1). rewrite /cyp_hat /cyp /pubkey mulmxDl -!mulmxA mulmxV ?mulmx1 //. by apply: unitmx_perm. rewrite ffunE /=. have H :... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg poly polydiv fingroup perm.",
"From mathcomp Require Import finalg zmodp matrix mxalgebra mxpoly vector.",
"Require Import ssralg_ext hamming linearcode decoding channel_code."
] | ecc_classic/mceliece.v | decryption_undoes_encryption | |
modp_Xn (R : idomainType) j (p : {poly R}) i : i <= j -> size (p %% 'X^j) <= i -> p %% 'X^i = p %% 'X^j. Proof. move=> ij H0. have H : forall n, lead_coef 'X^n \is a GRing.unit by move=> ??; rewrite lead_coefXn GRing.unitr1. rewrite (Pdiv.IdomainUnit.divp_eq (H R j) p). rewrite (Pdiv.IdomainUnit.modpD (H R i)). rewrite... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | modp_Xn | |
size_one_minus_X (R : idomainType) (a : R) (a0 : a != 0) : size (1 - a *: 'X) = 2%N. Proof. rewrite addrC size_polyDl. by rewrite size_polyN size_scale ?size_polyX // expf_neq0. by rewrite size_polyN size_scale ?expf_neq0 // size_polyX size_polyC oner_eq0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | size_one_minus_X | |
one_minus_X_neq0 (R : idomainType) (a : R) : 1 - a *: 'X != 0. Proof. rewrite subr_eq0; apply/eqP => /(congr1 (fun x => x.[0])). rewrite !hornerE; apply/eqP; by rewrite oner_eq0. Qed. (* NB: not used *) | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | one_minus_X_neq0 | |
errloc_alt (E : {set 'I_n}) : {poly F} := \prod_(i in E) ('X - (a i)%:P). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc_alt | |
distinct_non_zero (a : 'rV[F]_n) := injective [ffun i => a ``_i] /\ (forall i, a ``_ i != 0). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | distinct_non_zero | |
distinct_non_zero_rVexp (a : F) (a0 : a != 0) (H : not_uroot_on a n) : distinct_non_zero (rVexp a n). Proof. rewrite /distinct_non_zero; split; first by apply: rVexp_inj. move=> ?; by rewrite mxE expf_neq0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | distinct_non_zero_rVexp | |
errloc (a : 'rV[F]_n) (E : {set 'I_n}) : {poly F} := \prod_(i in E) (1 - a ``_ i *: 'X). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc | |
errloc0 (a : 'rV[F]_n) : errloc a set0 = 1. Proof. by rewrite /errloc big_set0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc0 | |
horner_errloc_0 (a : 'rV[F]_n) E : (errloc a E).[0] = 1. Proof. rewrite /errloc horner_prod (eq_bigr (fun=> 1)) ?big1_eq //. by move=> /= j _; rewrite !hornerE subr0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | horner_errloc_0 | |
derive_errloc (a : 'rV[F]_n) E : (errloc a E)^`() = \sum_(j in E) - a ``_ j *: \prod_(k in E :\ j) (1 - a ``_ k *: 'X). Proof. move Hm : (#| E |) => m. elim: m E Hm => [E /eqP| m IH E Em]. rewrite cards_eq0 => /eqP ->; by rewrite /errloc 2!big_set0 derivC. have [/= f Hf] : exists f, f \in E by apply/set0Pn; rewrite -ca... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | derive_errloc | |
decomp_errloc (a :'rV[F]_n) E : (forall i, a ``_ i != 0) -> errloc a E = (\prod_(i in E) (- a ``_ i)%:P) * \prod_(i in E) ('X - (a ``_ i)^-1%:P). Proof. move=> a0. rewrite /errloc (eq_bigr (fun i : 'I_n => (- a ``_ i)%:P * ('X - (a ``_ i)^-1%:P))). by rewrite big_split. move=> i iE. rewrite -polyCN mulrDr -polyCM mulrN... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | decomp_errloc | |
errloc_neq0 a E : errloc a E != 0. Proof. apply/prodf_neq0 => /= i _; by rewrite one_minus_X_neq0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc_neq0 | |
size_errloc a E : size (errloc a E) <= #| E |.+1. Proof. apply: (leq_trans (size_poly_prod_leq (fun x => x \in E) (fun i => 1 - a ``_ i *: 'X))). apply: (@leq_trans (#|E|.*2.+1 - #|E|)); last first. by rewrite subSn -addnn ?leq_addr // addnK. rewrite leq_sub // ltnS. apply: (@leq_trans (\sum_(i in E) 2)); last by rewri... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | size_errloc | |
errloc_zero (a : 'rV[F]_n) E (i : 'I_n) : distinct_non_zero a -> ((errloc a E).[(a ``_ i)^-1] == 0) = (i \in E). Proof. move=> Ha; apply/idP/idP => H. - apply/negPn/negP => abs; move/eqP: H. apply/rootP. rewrite (decomp_errloc _ (proj2 Ha)) ?unitfE //= rootM negb_or. apply/andP; split. rewrite -(@big_morph _ _ _ _ _ 1 ... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc_zero | |
size_errloc_eq a E : distinct_non_zero a -> size (errloc a E) = #| E |.+1. Proof. move=> Ha. rewrite /errloc. rewrite (eq_bigr (fun i : 'I_n => (- a ``_ i *: ('X - (a ``_ i)^-1%:P)))); last first. move=> i iE. rewrite scalerDr addrC !scaleNr scalerN opprK; congr (_ + _). rewrite -mul_polyC -!alg_polyC mulr_algl scalerA... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | size_errloc_eq | |
errloc_puncture (F : fieldType) n (f : 'rV[F]_n) (y : 'rV[F]_n) i : i \in supp y -> \sigma_(f, y) = (1 - f ``_ i *: 'X ) * \sigma_(f, y, i). Proof. move=> ?; rewrite {1}/errloc (bigD1 i) //=; congr (_ * _). by apply: eq_bigl => j; rewrite in_setD1 andbC. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errloc_puncture | |
errvec n (F : fieldType) t := Errvec { errvect :> 'rV[F]_n ; errsupp : #| supp errvect | <= t }. | Record | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | errvec | |
supp_neq0 n (F : fieldType) t (e : t.-'rV[F]_n) : supp e != set0 -> t != O. Proof. apply: contra => /eqP t0; case: e => /= e; by rewrite t0 leqn0 -cards_eq0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | supp_neq0 | |
erreval (b a : 'rV[F]_n) e := \sum_(i in supp e) e ``_ i * b ``_ i *: \sigma_(a, e, i). | Definition | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | erreval | |
size_erreval : size \omega_(f, a, e) <= t. Proof. apply: leq_trans; first by apply: size_sum. apply/bigmax_leqP => i; rewrite inE => /= iE. apply: leq_trans; first by rewrite -mul_polyC; apply: size_polyMleq. rewrite size_polyC. apply: (@leq_trans (1 + size \sigma_( a, e, i)).-1). rewrite add1n /= addnC; case: (_ != _)... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | size_erreval | |
coprime_errloc_erreval E : coprimep \sigma_(a, E) \omega_(f, a, E). Proof. apply/coprimepP => p p_sigma p_eta. suff no_root_p : forall x, root p x -> False. move : p_sigma; rewrite (decomp_errloc _ (proj2 Ha)) //. move/(dvdp_mull (\prod_(i in supp E) (- a ``_ i)^-1%:P)). rewrite mulrA -big_split /= (eq_bigr (fun=> 1%:P... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | coprime_errloc_erreval | |
erreval0 : \omega_(f, a, (0 : 'rV_n)) = 0. Proof. by rewrite /erreval supp0 big_set0. Qed. | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | erreval0 | |
erreval_vecE i : i \in supp e -> e ``_ i * f ``_ i = - a ``_ i * \omega_(f, a, e).[(a ``_ i)^-1] / \sigma_(a, e)^`().[(a ``_ i)^-1]. Proof. move=> iE. have morph_horner_add : {morph (fun x => x.[(a ``_ i)^-1]) : x y / x + y >-> x + y}. move=> x y; exact: hornerD. have morph_horner_mul : {morph (fun x => x.[(a ``_ i)^-1... | Lemma | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | erreval_vecE | |
n := n'.+1. Implicit Types u : 'rV[F]_n. (* polynomial of degree <= t.-1 *) | Let | ecc_classic | [
"From mathcomp Require Import all_ssreflect ssralg finalg poly polydiv cyclic.",
"From mathcomp Require Import perm matrix mxpoly.",
"Require Import ssr_ext ssralg_ext cyclic_code dft."
] | ecc_classic/poly_decoding.v | n |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.