-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: master
Are you sure you want to change the base?
Generalize operations of random variables and add bij_RV_unif, etc. #145
Conversation
weng-chenghui
commented
Mar 7, 2025
•
edited
Loading
edited
- Generalize operations of random variables and add trans_RV_unif and neg_RV_unif
- Add bij_RV_unif
- 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)
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 *) |
There was a problem hiding this comment.
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 *) |
There was a problem hiding this comment.
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} := |
There was a problem hiding this comment.
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
Section zmod_random_variables_lemmas. | ||
|
||
End zmod_random_variables_lemmas. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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).
There was a problem hiding this 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.