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

define fsdist_conv using the convType of R #105

Merged
merged 4 commits into from
Nov 20, 2023
Merged

Conversation

t6s
Copy link
Collaborator

@t6s t6s commented Sep 27, 2023

The convex space structure on fsdist has been provided first by defining fsdist_convn and then
fsdist_conv using it, introducing many complications in the proofs of basic lemmas.

This PR corrects it, defining the binary fsdist_conv using the convex structure on R, and using
the generic Convn instead of defining fsdist_convn.

NB:

  • fsdist_convA is removed; this is used in proba_monad_model.v in monae
  • fsdist_convE is changed; this probably affects its use in altprob_model.v in monae

@affeldt-aist
Copy link
Owner

We maybe need to make sure that monae is not broken before merging.

@t6s
Copy link
Collaborator Author

t6s commented Sep 27, 2023

The removal of fsdist_convA surely breaks the current monae (but avoidable by
affeldt-aist/monae#122 ).

fsdist_convE also breaks a proof in altprob_model:

Example gcmAP_choice_nontrivial (p q : prob) :
  p <> q ->
  (* Ret = hierarchy.ret *)
  Ret true <|p|> Ret false <>
  Ret true <|q|> Ret false :> (Monad_of_category_monad.acto Mgcm) bool.
Proof.
apply contra_not.
rewrite !gcm_retE /Choice /= => /(congr1 (@NECSet.car _)).
rewrite !necset_convType.convE !conv_cset1 /=.
move/(@set1_inj _ (conv _ _ _))/(congr1 (@FSDist.f _))/fsfunP/(_ true).
by rewrite !fsdist_convE !fsdist1xx !mulR1 fsdist10 ?mulR0 ?addR0//;
  [exact: val_inj|exact/eqP].
Qed.

Inserting avgRE in the last rewrite solves the issue:

by rewrite !fsdist_convE ?avgRE !fsdist1xx !mulR1 fsdist10 ?mulR0 ?addR0//;

I am also okay to revert the change in (the type of) fsdist_convE to keep the compatibility.

@affeldt-aist affeldt-aist merged commit 3b642d8 into master Nov 20, 2023
4 checks passed
@t6s t6s deleted the conv_based_fsdist branch November 21, 2023 09:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants