Skip to content

Commit

Permalink
fsdist.v
Browse files Browse the repository at this point in the history
  • Loading branch information
t6s committed Jul 17, 2024
1 parent 57db054 commit 3c040ca
Show file tree
Hide file tree
Showing 4 changed files with 206 additions and 181 deletions.
15 changes: 15 additions & 0 deletions lib/realType_ext.v
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ Import Prenex Implicits.

Import Order.POrderTheory Order.TotalTheory GRing.Theory Num.Theory.

(* TODO: move to "mathcomp_extra.v" *)
Section num_ext.
Local Open Scope ring_scope.
(* analogs of ssrR.(pmulR_lgt0', pmulR_rgt0') *)
Lemma wpmulr_lgt0 (R : numDomainType) (x y : R) : 0 <= x -> 0 < y * x -> 0 < y.
Proof.
rewrite le_eqVlt=> /orP [/eqP <- |].
by rewrite mulr0 ltxx.
by move/pmulr_lgt0->.
Qed.

Lemma wpmulr_rgt0 (R : numDomainType) (x y : R) : 0 <= x -> 0 < x * y -> 0 < y.
Proof. by rewrite mulrC; exact: wpmulr_lgt0. Qed.
End num_ext.

(* TODO: gen, call is divr_eq? *)
Lemma eqr_divr_mulr {R : realType} (z x y : R) : z != 0%mcR -> (y / z = x)%mcR <-> (y = x * z)%mcR.
Proof.
Expand Down
2 changes: 1 addition & 1 deletion probability/fdist.v
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Require Import ssrR logb realType_ext ssr_ext ssralg_ext bigop_ext.
(* *)
(* f @^-1 y == preimage of the point y via the function f where the *)
(* type of x is an eqType *)
(* R.-fdist A} == the type of distributions over a finType A *)
(* R.-fdist A == the type of distributions over a finType A *)
(* fdist_supp d := [set a | d a != 0] *)
(* fdist1 == point-supported distribution *)
(* fdistbind == of type fdist A -> (A -> fdist B) -> fdist B *)
Expand Down
Loading

0 comments on commit 3c040ca

Please sign in to comment.