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

Generalize operations of random variables and add bij_RV_unif, etc. #145

Open
wants to merge 11 commits into
base: master
Choose a base branch
from

Conversation

weng-chenghui
Copy link

@weng-chenghui weng-chenghui commented Mar 7, 2025

  1. Generalize operations of random variables and add trans_RV_unif and neg_RV_unif
  2. Add bij_RV_unif
  3. Fix errors: 1^-1 before this change becomes 1/n (need mul1r)

…d neg_RV_unif

2. Add bij_RV_unifs
3. Fix errors: 1^-1 before this change becomes 1/n (need mul1r)
@weng-chenghui weng-chenghui marked this pull request as ready for review March 7, 2025 07:17
@weng-chenghui weng-chenghui changed the title Generalize operations of random variables and add bij_RV_unifs, etc. Generalize operations of random variables and add bij_RV_unif, etc. Mar 7, 2025
Definition add_RV (X Y : {RV P -> V}) : {RV P -> V} := fun x => X x + Y x.
Definition sub_RV (X Y : {RV P -> V}) : {RV P -> V} := fun x => X x - Y x.

(* TODO: neg to opp *)
Copy link
Owner

Choose a reason for hiding this comment

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

I think that it is ok to do the renaming as part of this PR (but it's better be recorded in the changelog).

(* TODO: neg to opp *)
Definition neg_RV (X : {RV P -> V}) : {RV P -> V} := fun x => - X x.
Definition trans_add_RV (X : {RV P -> V}) m : {RV P -> V} := fun x => X x + m.
(* TODO: min to sub; no longer necessary *)
Copy link
Owner

Choose a reason for hiding this comment

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

I think that it is ok to remove it, just leave a note in the changelog in case we use it in monae.

Definition trans_add_RV (X : {RV P -> V}) m : {RV P -> V} := fun x => X x + m.
(* TODO: min to sub; no longer necessary *)
Definition trans_min_RV (X : {RV P -> V}) m : {RV P -> V} := fun x => X x - m.
Definition sumR_RV I (r : seq.seq I) (p : pred I) (X : I -> {RV P -> V}) : {RV P -> V} :=
Copy link
Owner

Choose a reason for hiding this comment

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

try remove the seq. prefix

Comment on lines +644 to +646
Section zmod_random_variables_lemmas.

End zmod_random_variables_lemmas.
Copy link
Owner

Choose a reason for hiding this comment

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

Remove the empty section?


Notation "k `cst* X" := (scalel_RV k X) : proba_scope.
Notation "X `*cst k" := (scaler_RV X k) : proba_scope.
Notation "X '`/' n" := (scalel_RV (1 / n%:R) X) : proba_scope.
Copy link
Owner

Choose a reason for hiding this comment

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

It might be better in practice to write n%:R^-1 instead of 1 / n%:R (maybe leave a note in the changlog).

Copy link
Owner

@affeldt-aist affeldt-aist left a comment

Choose a reason for hiding this comment

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

This generalization is an improvement. I commited a few, trivial cosmetics changes but I left a couple of easy comments that'd better be taken care of within this PR imo.

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.

3 participants