Skip to content

Commit e1f90b0

Browse files
committed
give a proof to witness_support
It is very unclear why it was an axiom.
1 parent 87c0a63 commit e1f90b0

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

theories/distributions/Distr.ec

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,17 @@ lemma mu_not (d : 'a distr) (p : 'a -> bool):
349349
mu d (predC p) = weight d - mu d p.
350350
proof. by rewrite -(@predCU p) mu_disjointL // #ring. qed.
351351
352-
axiom witness_support P (d : 'a distr) :
352+
lemma witness_support P (d : 'a distr) :
353353
0%r < mu d P <=> (exists x, P x /\ x \in d).
354+
proof.
355+
have ->: 0%r < mu d P <=> mu d P <> 0%r by smt(ge0_mu).
356+
split=> />.
357+
+ apply: contraLR=> /= /negb_exists /> empty.
358+
apply: mu0_false=> x x_in_D; move: (empty x).
359+
by case: (P x).
360+
move=> x Px x_in_D; rewrite -negP=> /eq0_mu /=.
361+
by rewrite negb_forall; exists x=> /=; rewrite x_in_D Px.
362+
qed.
354363

355364
lemma mu_and_weight ['a] P Q (d : 'a distr) : (* FIXME: name *)
356365
mu d P = weight d => mu d (predI P Q) = mu d Q.

0 commit comments

Comments
 (0)