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 to MathComp 2 #131

Merged
merged 13 commits into from
May 24, 2024
Merged

start porting to MathComp 2 #131

merged 13 commits into from
May 24, 2024

Conversation

affeldt-aist
Copy link
Owner

@t6s
Copy link
Collaborator

t6s commented Apr 26, 2024

CI needs to be fixed

@affeldt-aist
Copy link
Owner Author

The currenty error is:

COQC proba_lib.v
File "./proba_lib.v", line 252, characters 0-188:
Error: convex_isConvexSpace__to__convex_isConvexSpace0 already exists.

It looks like a confusion due to the fact that we define isConvexSpace both in analysis and in infotheo
Maybe we should rename the one of infotheo into say isConvexSpaceProb to avoid that.
Or is there another trick?

@t6s
Copy link
Collaborator

t6s commented Apr 28, 2024

Commenting out the Import ... line makes this section go through. Is this not enough?

Section altprob_semilattconvtype.
Variable M : altProbMonad R.
Variable T : Type.
(*Import convex necset SemiLattice.*)

Definition altProb_semiLattConvType := M T.

Let axiom (p : {prob R}) (x y z : altProb_semiLattConvType) :
  x <| p |> (y [~] z) = (x <| p |> y) [~] (x <| p |> z).
Proof. by rewrite choiceDr. Qed.

HB.instance Definition _ := boolp.gen_eqMixin altProb_semiLattConvType.
HB.instance Definition _ := boolp.gen_choiceMixin altProb_semiLattConvType.

HB.instance Definition _ := @isSemiLattice.Build altProb_semiLattConvType
  (fun x y => x [~] y)
  (@altC M T) (@altA M T) (@altmm M T).

HB.instance Definition _ := @probability.convex.isConvexSpace.Build altProb_semiLattConvType
  (fun p : {prob R} => choice p T)
  (choice1 _) choicemm choiceC (@choiceA_real_realType M T).

HB.instance Definition _ := @isSemiLattConv.Build altProb_semiLattConvType axiom.

End altprob_semilattconvtype.

@affeldt-aist
Copy link
Owner Author

affeldt-aist commented Apr 28, 2024

I didn't try this one yet. Thanks. This is worrisome though.

I think that we still want to rename isConvexSpace in infotheo because it is very likely that both definitions of convex space will need to coexist for a while (and/or one will become a factory for the other). Don't you think?

@t6s
Copy link
Collaborator

t6s commented Apr 28, 2024

I am reluctant to rename either of them since they are exactly the same notion and the definitions will eventually converge; the renaming will induce many changes in dependent code, and later renaming back all of them.

@affeldt-aist
Copy link
Owner Author

In any case, we'll have to do something about the coexistence of these two definitions.
Should we try to accommodate both conventions (I mean (1-t)x + ty vs. tx + (1-t)y definitions),
or should we port monae to the MathComp-Analysis convention?

@affeldt-aist
Copy link
Owner Author

3 versions of Coq in the CI, I guess we can merge it in master now @t6s @garrigue

@affeldt-aist affeldt-aist merged commit 49c4406 into master May 24, 2024
3 checks passed
@t6s t6s deleted the mc2 branch July 10, 2024 07:15
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.

2 participants