Skip to content

Conversation

@affeldt-aist
Copy link
Member

@affeldt-aist affeldt-aist commented Jun 5, 2025

Motivation for this change
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

@affeldt-aist
Copy link
Member Author

ping @hoheinzollern

@affeldt-aist
Copy link
Member Author

@hoheinzollern changelog and doc are complete (hopefully)

@affeldt-aist
Copy link
Member Author

ping @hoheinzollern

Copy link
Member

@hoheinzollern hoheinzollern left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've yet to check the changelog, but please consider the comments below,

Comment on lines +79 to +80
Lemma leq_prod2 (x y n m : nat) : (n <= x)%N -> (m <= y)%N ->
(\prod_(m <= i < y) i * \prod_(n <= i < x) i <= \prod_(n + m <= i < x + y) i)%N.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a weirdly specific lemma with a generic name, I would fix the naming first.
Also, you might not need the two hypotheses (n <= x)%N and (m <= y)%N.

Comment on lines +94 to +95
Lemma leq_fact2 (x y n m : nat) : (n <= x) %N -> (m <= y)%N ->
(x`! * y`! * ((n + m).+1)`! <= n`! * m`! * ((x + y).+1)`!)%N.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, you might be able to drop the two assumptions. This suggests that the previous lemma is a subproof of leq_fact2

Comment on lines +1270 to +1271
Lemma derive1_onem {R : numFieldType} :
(fun x => 1 - x : R^o)^`()%classic = cst (-1).
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

onem typically recalls the syntax ``1-`, why is it not being used here?

Comment on lines +1341 to +1349
(*Global Instance is_deriveX f n x v (df : R) :
is_derive x v f df -> is_derive x v (f ^+ n.+1) ((n.+1%:R * f x ^+n) *: df).
Proof.
move=> dfx; elim: n => [|n ihn]; first by rewrite expr1 expr0 mulr1 scale1r.
rewrite exprS; apply: is_derive_eq.
rewrite scalerA -scalerDl mulrCA -[f x * _]exprS.
by rewrite [in LHS]mulr_natl exprfctE -mulrSr mulr_natl.
Qed.*)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Commented code, either remove or add a human-readable comment for why this is here still.

Comment on lines +1357 to +1360
(*Lemma deriveX f n x v : derivable f x v ->
'D_v (f ^+ n.+1) x = (n.+1%:R * f x ^+ n) *: 'D_v f x.
Proof. by move=> /derivableP df; rewrite derive_val. Qed.*)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Likewise

by rewrite Rintegral_mkcond.
Qed.

Lemma beta_funSS a b : beta_fun a.+1 b.+1 =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, neither this nor the previous lemma name suggests what variable is being incremented. Proposal: SaSb? though I'm not fully satisfied either.

Comment on lines +2373 to +2374
Let int_beta_pdf01 : (\int[mu]_(x in `[0%R, 1%R]) (beta_pdf x)%:E =
\int[mu]_x (beta_pdf x)%:E :> \bar R)%E.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, there should be no need for %E

Comment on lines +2384 to +2387
under eq_integral.
move=> /= x _.
rewrite ger0_norm//; last by rewrite beta_pdf_ge0.
over.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
under eq_integral.
move=> /= x _.
rewrite ger0_norm//; last by rewrite beta_pdf_ge0.
over.
under eq_integral=> /= x _ do rewrite ger0_norm ?beta_pdf_ge0//.

should work?


End beta_pdf.

(* TODO: move? *)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

where?

Comment on lines +2665 to +2666
(\int[beta_prob a b]_(x in U) f x =
\int[mu]_(x in U) (f x * (beta_pdf a b x)%:E))%E.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
(\int[beta_prob a b]_(x in U) f x =
\int[mu]_(x in U) (f x * (beta_pdf a b x)%:E))%E.
\int[beta_prob a b]_(x in U) f x =
\int[mu]_(x in U) (f x * (beta_pdf a b x)%:E).

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