Skip to content

measurable types are not pointed by default any more#1949

Open
affeldt-aist wants to merge 2 commits intomath-comp:masterfrom
affeldt-aist:fixes_796
Open

measurable types are not pointed by default any more#1949
affeldt-aist wants to merge 2 commits intomath-comp:masterfrom
affeldt-aist:fixes_796

Conversation

@affeldt-aist
Copy link
Copy Markdown
Member

@affeldt-aist affeldt-aist commented Apr 24, 2026

Motivation for this change

fixes #796

fyi: @shinya-katsumata @CohenCyril

We would like this change to be reflected in master as soon as possible so as to be able to work
with the following definition:

Structure distr := Distr {
  mu :> T -> R ;
  _  :  forall x, 0 <= mu x ;
  _  :  summable [set: T] (EFin \o mu) ;
  _  :  \int[@counting (discrete_measurable_space T) R]_x (mu x) <= 1
}.

without requiring T to be a pointedType, only a choiceType,
to preserve the generality of distr from the experimental_reals package
@strub @lyonel2017 (just substituting summable and psum from their
MathComp-Analysis equivalent to use the library more easily).

Checklist
  • added corresponding entries in CHANGELOG_UNRELEASED.md
  • added corresponding documentation in the headers

Reference: How to document

Merge policy

As a rule of thumb:

  • PRs with several commits that make sense individually and that
    all compile are preferentially merged into master.
  • PRs with disorganized commits are very likely to be squash-rebased.
Reminder to reviewers

Co-authored-by: Takafumi Saikawa <tscompor@gmail.com>
@affeldt-aist affeldt-aist added the enhancement ✨ This issue/PR is about adding new features enhancing the library label Apr 24, 2026
@affeldt-aist affeldt-aist added this to the 1.17.0 milestone Apr 24, 2026
Comment thread theories/numfun.v
@affeldt-aist
Copy link
Copy Markdown
Member Author

The patch we merged to MathComp, i.e., the addition of the following
between Module Import Ring. and End Ring. in ssralg.v:

HB.factory Record SubPzRing_isSubComPzRing (R : comPzRingType) S U
    & SubPzRing R S U := {}.

HB.builders Context R S U & SubPzRing_isSubComPzRing R S U.
HB.instance Definition _ := SubSemiRing_isSubComSemiRing.Build R S U.
HB.end.

does not seem to be complete. The error is now:

Error:
HB: GRing.SubPzRing_isSubComPzRing.axioms_ is not a factory or its library (mathcomp.algebra.algebraic_hierarchy.ssralg.GRing) was not correctly imported

I tested locally and this is indeed the error one gets
when the addition is inside Module Ring./End Ring.
(without the Import).

Note that another way to make it work is to add
the factory between Module GRing. and End GRing. HB.export GRing.
or Module GRing. and End GRing. Export GRing.

I'll do more local checks unless somebody can spot the right fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement ✨ This issue/PR is about adding new features enhancing the library

Projects

None yet

Development

Successfully merging this pull request may close these issues.

isMeasurable requires pointed type

3 participants