Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start porting proba.v #127

Merged
merged 100 commits into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
08f27bc
start porting proba.v
affeldt-aist Jul 17, 2024
2059a06
progress until log_RV
affeldt-aist Jul 17, 2024
6402aa1
progress
affeldt-aist Jul 17, 2024
a984f54
prob.v done
affeldt-aist Jul 17, 2024
12c5533
jfdist_cond done
affeldt-aist Jul 17, 2024
c26f808
fsdist.v
t6s Jul 17, 2024
e8eda67
convex_equiv
t6s Jul 17, 2024
49a3aec
graphoid
t6s Jul 17, 2024
0c8e7f3
jensen
t6s Jul 17, 2024
5480731
variation_dist
t6s Jul 17, 2024
907ed9b
wip robustmean.v
t6s Jul 18, 2024
747f4eb
robustmean.v
t6s Jul 24, 2024
e48d79d
kill warnings in robustmean
t6s Jul 24, 2024
d585f06
divergence
affeldt-aist Jul 25, 2024
067727d
pinsker
affeldt-aist Jul 25, 2024
6afcfdc
necset.v
affeldt-aist Jul 25, 2024
5d58b19
bayes.v
affeldt-aist Jul 29, 2024
03ef580
convex_equiv.v
affeldt-aist Jul 29, 2024
f1f55da
expected_value_variance.v
affeldt-aist Jul 29, 2024
69414db
expected_value_variance_ordn.v
affeldt-aist Jul 29, 2024
b003cdc
divergence.v done
affeldt-aist Sep 26, 2024
c1b6781
port log_sum.v
affeldt-aist Oct 3, 2024
ae5de01
port partition_inequality.v
affeldt-aist Oct 3, 2024
af0fa68
prove pending admits
affeldt-aist Oct 3, 2024
ee111ff
entropy.v
affeldt-aist Oct 4, 2024
1154724
channel.v
affeldt-aist Oct 4, 2024
1f0e817
pproba.v
affeldt-aist Oct 4, 2024
d91b2af
channel_code.v
affeldt-aist Oct 4, 2024
556c49b
shannon-fano
affeldt-aist Oct 4, 2024
4d55901
wip
affeldt-aist Oct 4, 2024
4db59ee
wip
affeldt-aist Oct 10, 2024
a5ae9df
x_x2_max
t6s Oct 11, 2024
641c416
mulr_reg{l,r}
t6s Oct 14, 2024
262fc6e
port pinsker; add derive_ext
t6s Oct 14, 2024
cfc14fb
wip on bsc
t6s Oct 14, 2024
e984463
fix an occurrence {fdist _} overlooked in divergence.v
t6s Oct 14, 2024
1fe52e2
remove Rstruct from entropy
t6s Oct 14, 2024
801dbc8
typ_seq.v
affeldt-aist Nov 15, 2024
c244df7
upd wrt 230 (wip)
affeldt-aist Jan 20, 2025
e0eea26
convex.v almost done
affeldt-aist Jan 20, 2025
d8add88
recover deriv/convex proof
affeldt-aist Jan 20, 2025
acb7f2a
convex_stone.v ported
affeldt-aist Jan 21, 2025
9d1f6c3
port fsdist.v
affeldt-aist Jan 21, 2025
9fe81a9
convex_equiv.v ported
affeldt-aist Jan 21, 2025
31a009f
jensen
garrigue Jan 21, 2025
7ddcbea
necset.v ported
affeldt-aist Jan 21, 2025
a6474d8
wip on bsc
t6s Jan 20, 2025
f08202a
add eqWle : x = y -> x <= y
t6s Jan 21, 2025
cd96aaf
wip
affeldt-aist Jan 21, 2025
b6ed062
types.v done
affeldt-aist Jan 21, 2025
01a0169
string_entropy
garrigue Jan 21, 2025
35efba7
add Lemmas near_eq_*
t6s Jan 21, 2025
9763faf
eqWle -> eqW
t6s Jan 21, 2025
8efbca3
changelog
t6s Jan 21, 2025
250c12b
return type R^o for entropy and div
t6s Jan 21, 2025
e95e0ee
bayes
garrigue Jan 21, 2025
81bc705
fix derive_ext
garrigue Jan 21, 2025
3d1c52a
jtypes.v ported
affeldt-aist Jan 21, 2025
6063cbd
source coding fl converse porter
affeldt-aist Jan 21, 2025
c8d0780
source coding fl direct.v ported
affeldt-aist Jan 21, 2025
cc20b21
source coding direct vl ported
affeldt-aist Jan 22, 2025
2b690e3
entropy_convex
t6s Jan 22, 2025
8cdb07d
clean
t6s Jan 22, 2025
61e6f1e
bsc
t6s Jan 22, 2025
edc8864
source coding vl converse
affeldt-aist Jan 22, 2025
91919f7
decoding ported
affeldt-aist Jan 22, 2025
fc5fd10
conditional_entropu.v ported
affeldt-aist Jan 22, 2025
311a217
toy_examples ported
affeldt-aist Jan 22, 2025
1d5ded8
hamming_code ported
affeldt-aist Jan 23, 2025
820b45f
checksum ported
affeldt-aist Jan 23, 2025
b000eb7
ldpc ported
affeldt-aist Jan 23, 2025
07adbbb
move generic lemmas out of weightedmean.v
t6s Jan 23, 2025
9b9bdcf
ldpc_algo_proof
affeldt-aist Jan 23, 2025
1d3dc1d
move generic lemmas out of robustmean
t6s Jan 23, 2025
7c8631e
joint_typ_seq
garrigue Jan 23, 2025
06d9bc9
error_exponent wip
affeldt-aist Jan 23, 2025
16a0f5a
error_exponent (wip)
affeldt-aist Jan 23, 2025
6f92572
channel coding direct
garrigue Jan 23, 2025
50b5729
channel coding converse (wip)
affeldt-aist Jan 30, 2025
44a5db4
wip on weightedmean
t6s Jan 30, 2025
059d969
weightemean.v
affeldt-aist Jan 31, 2025
3be29bc
memo
affeldt-aist Jan 31, 2025
9cb7edd
clean weightedmean
t6s Jan 31, 2025
8c08343
move memo
t6s Jan 31, 2025
6a5c38b
clean
t6s Jan 31, 2025
ff89725
use powR instead of Exp (wip)
affeldt-aist Jan 31, 2025
c543060
Exp cleaning (wip)
affeldt-aist Jan 31, 2025
5fab5db
update changelog a bit
t6s Jan 31, 2025
59b2626
Exp cleaning (wip)
affeldt-aist Jan 31, 2025
db5d1e5
Exp cleaning (wip)
affeldt-aist Jan 31, 2025
b13294d
Exp cleaning (wip)
affeldt-aist Jan 31, 2025
5c219db
cleaning
affeldt-aist Jan 31, 2025
2cf189a
cleaning
affeldt-aist Feb 1, 2025
a280bcd
Qed conv_ereal_convA
t6s Feb 2, 2025
9fdb978
clean comments
t6s Feb 2, 2025
bd50a16
do not use Coq's MVT
affeldt-aist Feb 4, 2025
53c600e
realType_ln.v
affeldt-aist Feb 4, 2025
f324a88
rm ssrR and friends
affeldt-aist Feb 4, 2025
989e3be
add coqRE.v
t6s Feb 4, 2025
b657aaf
fix weightedmean
t6s Feb 4, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,10 @@
-arg -w -arg -ambiguous-paths
-arg -w -arg -notation-incompatible-format

lib/ssrZ.v
lib/ssrR.v
lib/coqRE.v
lib/realType_ext.v
lib/Reals_ext.v
lib/logb.v
lib/Ranalysis_ext.v
lib/realType_ln.v
lib/derive_ext.v
lib/ssr_ext.v
lib/f2.v
lib/ssralg_ext.v
Expand All @@ -31,7 +29,6 @@ probability/convex_stone.v
probability/jfdist_cond.v
probability/graphoid.v
probability/jensen.v
probability/ln_facts.v
probability/divergence.v
probability/variation_dist.v
probability/log_sum.v
Expand Down
31 changes: 31 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
--------------------
from 0.7.7 to master
--------------------

* changed:
almost no stdlib R anymore

* added:
- in bigop_ext.v
+ lemmas morphs_oppr, morph_mulRDr, bigmax_le_seq, bigmax_leP_seq,
bigmax_gt0P_seq, big_union_nondisj
- in derive_ext.v
+ lemmas open_norm_subball,
near_eq_derive, near_eq_derivable, near_eq_is_derive
- in realType_ext.v
+ lemmas wpmulr_lgt0, wpmulr_rgt0
- in ssr_ext.v
+ lemma eqW
+ setY* (symmetric difference for finite sets), notation: "A :*: B"


-------------------
from 0.7.6 to 0.7.7
-------------------
Expand Down Expand Up @@ -25,6 +46,16 @@ from 0.7.3 to 0.7.4
-------------------
from 0.7.2 to 0.7.3
-------------------
* added:
- in ssralg_ext.v
+ lemmas mulr_regl, mulr_regr
- in realType_ext.v
+ lemmas x_x2_eq, x_x2_max, x_x2_pos, x_x2_nneg, expR1_gt2
- new file derive_ext.v
+ lemmas differentiable_{ln, Log}
+ lemmas is_derive{D, B, N, M, V, Z, X, _sum}_eq
+ lemmas is_derive1_{lnf, lnf_eq, Logf, Logf_eq, LogfM, LogfM_eq, LogfV, LogfV_eq}
+ lemmas derivable1_mono, derivable1_homo

- lemma `conv_pt_cset_is_convex` changed into a `Let`

Expand Down
48 changes: 18 additions & 30 deletions ecc_classic/bch.v
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ Unset Printing Implicit Defensive.

Import GRing.Theory.
Local Open Scope ring_scope.

Local Open Scope vec_ext_scope.

Local Open Scope dft_scope.

Module BCH.
Expand Down Expand Up @@ -114,7 +112,7 @@ have j2t : (j.-1)./2 < t.*2.
destruct j => //.
by rewrite /= (ltn_trans i1) // ltnS muln2 -[in X in _ <= X]addnn leq_addl.
move/(_ j2t)/(congr1 (fun x => x ^+ 2)).
rewrite expr0n /= sum_char2 ?char_GFqm // => H'.
rewrite expr0n /= sum_sqr ?char_GFqm // => H'.
rewrite -[RHS]H'; apply eq_bigr => k _.
rewrite exprMn_comm; last by rewrite /GRing.comm mulrC.
congr (_ * _); last first.
Expand All @@ -140,31 +138,27 @@ apply/idP/idP.
apply BCH_PCM_altP1 => i.
move/eqP/rowP : H => /(_ i).
rewrite !mxE => H; rewrite -[RHS]H.
apply eq_bigr => /= k _; by rewrite !mxE /= mulrC.
by apply eq_bigr => /= k _; rewrite !mxE /= mulrC.
- rewrite /BCH.PCM_alt /BCH.PCM /syndrome => H.
apply/eqP/rowP => i.
have @j : 'I_t.*2.
refine (@Ordinal _ i.*2 _); by rewrite -!muln2 ltn_pmul2r.
by refine (@Ordinal _ i.*2 _); rewrite -!muln2 ltn_pmul2r.
move/eqP : H => /matrixP/(_ ord0 j).
rewrite !mxE => {2}<-.
apply eq_bigr => k _.
by rewrite !mxE.
by apply eq_bigr => k _; rewrite !mxE.
Qed.

End BCH_PCM_alt.

Section BCH_def.

Variables (n : nat) (m : nat).

Definition code (a : 'rV_n) t :=
Rcode.t (@GF2_of_F2 m) (kernel (PCM a t)).
Definition code (a : 'rV_n) t := Rcode.t (@GF2_of_F2 m) (kernel (PCM a t)).

End BCH_def.

Section BCH_syndromep.

Variables (n' : nat).
Variable n' : nat.
Let n := n'.+1.
Variable (m : nat).
Let F : fieldType := GF2 m.
Expand All @@ -181,8 +175,7 @@ Notation "'\BCHsynp_(' a , e , t )" := (BCH.syndromep a e t) : bch_scope.
Local Open Scope bch_scope.

Section BCH_is_GRS.

Variable (m : nat).
Variable m : nat.
Let F := GF2 m.
Variable (n' : nat).
Let n := n'.+1.
Expand All @@ -206,7 +199,7 @@ Lemma BCH_syndromep_is_GRS_syndromep y :
GRS.syndromep (rVexp a n) (rVexp a n) t.*2 (F2_to_GF2 m y).
Proof.
apply/polyP => i.
rewrite !coef_poly; case: ifPn => // it; by rewrite fdcoor_syndrome_coord.
by rewrite !coef_poly; case: ifPn => // it; rewrite fdcoor_syndrome_coord.
Qed.

End BCH_is_GRS.
Expand Down Expand Up @@ -252,7 +245,7 @@ apply/idP/idP.
rewrite -(@ltn_pmul2r 2) // !muln2 -(ltn_add2r 1) !addn1.
move/leq_trans; apply.
move: tn.
rewrite -divn2 leq_divRL // muln2 => /leq_ltn_trans; exact.
by rewrite -divn2 leq_divRL // muln2 => /leq_ltn_trans; exact.
Qed.

End BCH_PCM_checksum.
Expand Down Expand Up @@ -328,7 +321,7 @@ transitivity (\det (\matrix_(i, j) (h i j * g j))).
apply/matrixP => i j.
by rewrite !mxE /h /g /BCH.PCM_alt !mxE -!exprD /= -exprM mul1n addn1.
rewrite det_mlinear; congr (_ * _).
congr (\det _); apply/matrixP => i j; by rewrite !mxE /h -exprM.
by congr (\det _); apply/matrixP => i j; rewrite !mxE /h -exprM.
Qed.

Hypothesis a_neq0 : distinct_non_zero a.
Expand Down Expand Up @@ -401,7 +394,7 @@ have Hf : \sum_(i < (wH x).-1.+1)
case: ifPn => [_|]; first by rewrite!mxE mulrC.
rewrite negb_and negbK.
case/orP => [/eqP ->|abs']; first by rewrite rmorph0 scale0r mxE.
case/boolP : (x ``_ (f j) == 0) => [/eqP ->|abs''].
have [->|abs''] := eqVneq (x ``_ (f j)) 0.
by rewrite rmorph0 scale0r mxE.
exfalso.
move/eqP: abs'; apply.
Expand All @@ -419,7 +412,7 @@ have {}Hf : \sum_(i < r'.+1) GF2_of_F2 x ``_ (f i) *:
move/colP : Hf => /(_ (widen_ord (ltnW Hr') j)).
rewrite !mxE summxE => Hf.
rewrite -[RHS]Hf.
apply eq_bigr => /= i _; by rewrite !mxE.
by apply eq_bigr => /= i _; rewrite !mxE.
have /negP := det_B_neq0 Hr' Hinj.
rewrite -det_tr; apply.
apply/det0P; exists (\row_i GF2_of_F2 x ``_ (f i)).
Expand All @@ -437,13 +430,12 @@ apply/det0P; exists (\row_i GF2_of_F2 x ``_ (f i)).
apply/rowP => i; rewrite !mxE.
move/colP : Hf => /(_ i).
rewrite !mxE => Hf; rewrite -[RHS]Hf.
rewrite summxE; apply eq_bigr=> k _; by rewrite !mxE.
by rewrite summxE; apply eq_bigr=> k _; rewrite !mxE.
Qed.

End BCH_minimum_distance_lb.

Section BCH_erreval.

Variables (F : fieldType) (n : nat) (a : 'rV[F]_n).

Definition BCH_erreval := erreval (const_mx 1) a.
Expand All @@ -453,7 +445,6 @@ End BCH_erreval.
Notation "'\BCHomega_(' a , e )" := (BCH_erreval a e) : bch_scope.

Section BCH_key_equation_old.

Variables (F : fieldType) (n' : nat).
Let n := n'.+1.
Variable a : F.
Expand All @@ -471,7 +462,7 @@ under eq_bigr.
rewrite (_ : \sigma_(rVexp a n, y) =
\sigma_(rVexp a n, y, i) * (1 - ((rVexp a n) ``_ i) *: 'X)); last first.
rewrite /errloc (bigD1 i) //= mulrC; congr (_ * _).
apply eq_bigl => ij; by rewrite in_setD1 andbC.
by apply eq_bigl => ij; rewrite in_setD1 andbC.
over.
transitivity (\sum_(i in supp y) y ``_ i *:
(\sigma_(rVexp a n, y, i) * (1 - a ^+ (i * n) *: 'X^n))).
Expand All @@ -496,7 +487,6 @@ Qed.
End BCH_key_equation_old.

Section decoding_using_euclid.

Variables (n' : nat) (m : nat).
Let n := n'.+1.
Let F := GF2 m.
Expand Down Expand Up @@ -650,10 +640,8 @@ Qed.
End decoding_using_euclid.

Section BCH_cyclic.

Variables (n' : nat) (m : nat).
Variables (n' m : nat).
Let n := n'.+1.
(*Hypothesis nm : (n %| (2 ^ m.-1))%N.*)
Let F := GF2 m.
Variable a : F.
Variable t : nat.
Expand All @@ -676,9 +664,9 @@ have [M HM] : exists M, `[ 'X * rVpoly x' ]_ n = 'X * rVpoly x' + M * ('X^n - 1)
rewrite HM /fdcoor poly_rV_K //; last first.
rewrite -HM.
move: (ltn_modp ('X * rVpoly x') ('X^n - 1)).
rewrite size_Xn_sub_1 // ltnS => ->.
by rewrite monic_neq0 // monic_Xn_sub_1.
rewrite !(hornerE,hornerXn(*TODO(rei): not necessary since mc1.16.0*)).
rewrite size_XnsubC // ltnS => ->.
by rewrite monic_neq0 // monicXnsubC.
rewrite !(hornerE,hornerXn).
move: (Hx i); rewrite /fdcoor => /eqP ->; rewrite mulr0 add0r.
by rewrite mxE exprAC a1 expr1n subrr mulr0.
Qed.
Expand Down
Loading