Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a06fd52
tentative definition of kernel
affeldt-aist Jun 8, 2022
3e333c7
tentative statement of lemma 3
affeldt-aist Jun 15, 2022
6f73958
complete infinite sum of kernels is a kernel
affeldt-aist Jun 22, 2022
c9664d7
prove that star_kernel is a measure
affeldt-aist Jun 22, 2022
a420cc0
proposition 1
affeldt-aist Jun 22, 2022
cdc056b
tentative first part of lemma 3 (admit pending)
affeldt-aist Jul 11, 2022
2f3d34c
complete lemma 3 and s-finite proofs
affeldt-aist Jul 22, 2022
c93592c
nonneg 2/7
AyumuSaito Aug 8, 2022
a001c2c
s-finite kernels for ite and examples
affeldt-aist Aug 8, 2022
709da80
factorization of code, normalize, cleaning
affeldt-aist Aug 18, 2022
b305e8c
complete normalize, finite fubini, improve hier with pker
affeldt-aist Aug 19, 2022
271d025
more uniform naming, kdirac is pker, etc.
affeldt-aist Aug 24, 2022
dbdd7c8
mscore using mscale and dirac
affeldt-aist Sep 1, 2022
15d569e
generalize mscoreE
affeldt-aist Sep 2, 2022
cf854c1
various minor simplifications and generalizations
affeldt-aist Sep 8, 2022
f6db52c
staton bus with exp
affeldt-aist Sep 13, 2022
ddcaa20
wip (gauss)
affeldt-aist Sep 14, 2022
f15d404
linearize hierarchy
affeldt-aist Sep 16, 2022
51900a1
subprob kernel
affeldt-aist Sep 17, 2022
613ccd7
cleaning
affeldt-aist Sep 21, 2022
527660b
hard constraint example
affeldt-aist Sep 21, 2022
0eff8f1
minor cleaning
affeldt-aist Sep 22, 2022
64040c8
gen sample
affeldt-aist Oct 7, 2022
6dd1dc2
upd wrt master
affeldt-aist Oct 26, 2022
e60793c
shorten measurable_fun_kprobability
affeldt-aist Oct 26, 2022
a2adf96
upd with recent PRs
affeldt-aist Nov 15, 2022
1410fce
use reversible coercions
affeldt-aist Dec 12, 2022
2cdb09d
upd wrt recent PRs, compat with Coq 8.15
affeldt-aist Jan 9, 2023
30af345
simple example
affeldt-aist Jan 10, 2023
da98948
letinA
affeldt-aist Jan 16, 2023
4d7145e
minor cleaning
affeldt-aist Jan 17, 2023
9b21152
rebase wrt branch on finite measures
affeldt-aist Feb 6, 2023
75af27d
adapt to hierarchy with subprob
affeldt-aist Feb 12, 2023
042dbb3
rebase
affeldt-aist Feb 22, 2023
d24568d
rebase
affeldt-aist Feb 23, 2023
544e270
upd
affeldt-aist Feb 25, 2023
f4005e7
generalize the interface of finite measures
AyumuSaito Feb 14, 2023
9f3692c
prove measurable_fun_normalize
affeldt-aist Mar 20, 2023
68122ad
mkswap (wip)
AyumuSaito Mar 27, 2023
b75c396
fix
affeldt-aist Mar 27, 2023
15d4f97
fix
AyumuSaito Apr 3, 2023
85ac261
test binomial
AyumuSaito Apr 7, 2023
7111ba8
custom entry (test)
affeldt-aist Apr 7, 2023
f1bacdf
before introduce finmap
AyumuSaito Apr 7, 2023
2aad95d
intro. weaken
AyumuSaito Apr 10, 2023
f1ea2f2
eta1 kernel
affeldt-aist Apr 13, 2023
6a0ec16
evalP_uniq_sub sketch
AyumuSaito Apr 13, 2023
1b34cbe
fix
AyumuSaito Apr 17, 2023
7bea44d
using canonical structures and typeclasses to type check pgm1
affeldt-aist Apr 18, 2023
8f8f33c
letinC
AyumuSaito Apr 24, 2023
cd1d8bd
letinC (cont'd)
affeldt-aist Apr 25, 2023
dd00a41
exec_var
AyumuSaito Apr 26, 2023
d2c5139
wip
affeldt-aist Apr 26, 2023
63d3c73
complete letinC_new
affeldt-aist Apr 26, 2023
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
2 changes: 1 addition & 1 deletion CHANGELOG_UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@

### Infrastructure

### Misc
### Misc
6 changes: 6 additions & 0 deletions _CoqProject
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,16 @@ theories/lebesgue_measure.v
theories/forms.v
theories/derive.v
theories/measure.v
theories/kernel.v
theories/prob_lang.v
theories/numfun.v
theories/lebesgue_integral.v
theories/kernel.v
theories/summability.v
theories/signed.v
theories/prob_lang.v
theories/wip.v
theories/lang_syntax.v
theories/altreals/xfinmap.v
theories/altreals/discrete.v
theories/altreals/realseq.v
Expand Down
71 changes: 71 additions & 0 deletions theories/binomial.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
From HB Require Import structures.
From mathcomp Require Import all_ssreflect ssralg ssrnum ssrint interval finmap.
Require Import mathcomp_extra boolp classical_sets signed functions cardinality.
Require Import reals ereal topology normedtype sequences esum measure.
Require Import lebesgue_measure fsbigop numfun lebesgue_integral kernel.
Require Import prob_lang.

Local Open Scope ring_scope.
Import Order.TTheory GRing.Theory Num.Def Num.ExtraDef Num.Theory.

Section bernoulli.
Variable (R : realType) (p : {nonneg R}%R) (p1 : (p%:num <= 1)%R).

Lemma b10 : bernoulli p1 [set 0%N] = (`1-(p%:num))%:E.
Proof.
rewrite /bernoulli/= /measure_add/= /msum.
rewrite 2!big_ord_recr/= big_ord0 add0e.
rewrite /mscale/= !diracE memNset// mem_set//= mule1 mule0 add0e //.
Qed.

Lemma b11 : bernoulli p1 [set 1%N] = p%:num%:E.
Proof.
rewrite /bernoulli/= /measure_add/= /msum.
rewrite 2!big_ord_recr/= big_ord0 add0e.
rewrite /mscale/= !diracE mem_set// memNset//= mule1 mule0 adde0 //.
Qed.

End bernoulli.
Section binomial.
Variables (R : realType).

Definition binomial2 (p : {nonneg R}) (p1 : p%:num <= 1) :=
measure_add
(mscale (p%:num ^+ 2)%:nng (dirac 2%N))
(measure_add
(mscale (2 * p%:num * (onem_nonneg p1)%:num)%:nng (dirac 1%N))
(mscale ((onem_nonneg p1)%:num ^+ 2)%:nng (dirac 0%N))).

Lemma b20 p p1 : binomial2 p p1 [set 2%N] = (p%:num ^+ 2)%:E.
Proof.
rewrite /binomial2/= /measure_add/= /msum !big_ord_recr/= big_ord0 add0e.
rewrite /msum !big_ord_recr/= big_ord0 add0e.
rewrite /mscale/= !diracE mem_set//= memNset// memNset// mule1 mule0 mule0 add0e adde0//.
Qed.

End binomial.

Section example.
Variables (R : realType).

Goal binomial2 R (1 / 2)%:nng p12 [set 2%N] = (1 / 4)%:E.
Proof.
rewrite b20 /= expr2.
by rewrite mulf_div -natrM [in LHS]mul1r.
Qed.

(* Lemma measurable_fun_bernoulli (U : set _) :
measurable U ->
measurable_fun setT (@bernoulli R p).
Proof.
move=> mU.
by apply: ge0_emeasurable_fun_sum => // n; exact/measurable_kernel.
Qed. *)

HB.instance Definition _ :=
isKernel.Build _ _ _ _ _ (bernoulli p1) measurable_fun_kseries.

Check letin bernoulli.

Check p27.

Loading