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

sketch probDr model #38

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
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
30 changes: 30 additions & 0 deletions proba_monad_model.v
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,33 @@ Definition prob_class : MonadProb.class_of (fun A : Type => {dist (choice_of_Typ
Definition prob : probMonad := MonadProb.Pack prob_class.

End MonadProbModel.

Module MonadProbDrModel.

Local Obligation Tactic := idtac.

Require Import Reals.
From mathcomp Require Import finmap.
From infotheo Require Import Rbigop.
Local Open Scope R_scope.

Local Open Scope proba_scope.

Definition probDr_mixin : MonadProbDr.mixin_of MonadProbModel.prob.
refine (MonadProbDr.Mixin _) => p A B m k1 k2.
rewrite 3!(@MonadProbModel.BindE (choice_of_Type A) (choice_of_Type B)).
apply/FSDist_ext => b /=.
rewrite FSDistBind.dE /=.
case: ifPn.
move=> /bigfcupP[/= dB].
rewrite andbT => /imfsetP[a /= /imfsetP[/= a' a'm aa']]; move: a'm; rewrite -{}aa' {a'} => ma ->{dB} bk1k2.
rewrite /Choice /= ConvFSDist.dE /= !FSDistBind.dE /=.
case: ifPn => bk1.
case: ifPn => bk2.
admit.
admit.
admit.
move=> bk1k2.
Abort.

End MonadProbDrModel.