Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions reals/reals.v
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ Proof. exact: sup_adherent_subdef. Qed.
Section IsInt.
Context {R : realFieldType}.

Definition Rint_pred := fun x : R => `[< exists z, x == z%:~R >].
(*Definition Rint_pred := fun x : R => `[< exists z, x == z%:~R >].
Arguments Rint_pred _ /.
Definition Rint := [qualify a x | Rint_pred x].

Expand Down Expand Up @@ -193,18 +193,18 @@ Lemma Rint_ltr_addr1 (x y : R) : x \is a Rint -> y \is a Rint ->
Proof.
move=> /RintP[xi ->] /RintP[yi ->]; rewrite -{3}[1]mulr1z.
by rewrite -intrD !(ltr_int, ler_int) ltzD1.
Qed.
Qed.*)

End IsInt.
Arguments Rint_pred _ _ /.
(*Arguments Rint_pred _ _ /.*)

(* -------------------------------------------------------------------- *)
Section ToInt.
Context {R : realType}.

Implicit Types x y : R.

Definition Rtoint (x : R) : int :=
(*Definition Rtoint (x : R) : int :=
if insub x : {? x | x \is a Rint} is Some Px then
xchoose (asboolP _ (tagged Px))
else 0.
Expand All @@ -228,7 +228,7 @@ Lemma RtointN x : x \is a Rint -> Rtoint (- x) = - Rtoint x.
Proof.
move=> Ir; apply/eqP.
by rewrite -(@eqr_int R) RtointK // ?rpredN // mulrNz RtointK.
Qed.
Qed.*)

End ToInt.

Expand All @@ -238,7 +238,7 @@ Section RealDerivedOps.
Variable R : realType.

Implicit Types x y : R.
Definition floor_set x := [set y : R | (y \is a Rint) && (y <= x)].
Definition floor_set x := [set y : R | (y \is a Num.int) && (y <= x)].

Definition Rfloor x : R := (Num.floor x)%:~R.

Expand Down Expand Up @@ -456,15 +456,15 @@ move/sup_adherent=> -/(_ e) []; first by rewrite subr_gt0.
move=> z Fz; rewrite /= subKr => lt_yz.
have /sup_upper_bound /ubP /(_ _ Fz) := has_sup_floor_set x.
rewrite -(lerD2r (-y)) => /le_lt_trans /(_ lt1_FxBy).
case/andP: Fy Fz lt_yz=> /RintP[yi -> _].
case/andP=> /RintP[zi -> _]; rewrite -rmorphB /= ltrz1 ltr_int.
case/andP: Fy Fz lt_yz => /intrP[yi -> _].
case/andP => /intrP[zi -> _]; rewrite -rmorphB /= ltrz1 ltr_int.
rewrite lt_neqAle => /andP[ne_yz le_yz].
rewrite -[_-_]gez0_abs ?subr_ge0 // ltz_nat ltnS leqn0.
by rewrite absz_eq0 subr_eq0 eq_sym (negbTE ne_yz).
Qed.

Lemma isint_Rfloor x : Rfloor x \is a Rint.
Proof. by rewrite inE; exists (Num.floor x). Qed.
Lemma isint_Rfloor x : Rfloor x \is a Num.int.
Proof. by apply/intrP; exists (Num.floor x). Qed.

Lemma RfloorE x : Rfloor x = (Num.floor x)%:~R.
Proof. by []. Qed.
Expand Down Expand Up @@ -534,8 +534,8 @@ Variable R : realType.

Implicit Types x y : R.

Lemma isint_Rceil x : Rceil x \is a Rint.
Proof. by rewrite /Rceil RintC. Qed.
Lemma isint_Rceil x : Rceil x \is a Num.int.
Proof. by rewrite /Rceil intr_int. Qed.

Lemma Rceil0 : Rceil 0 = 0 :> R.
Proof. by rewrite /Rceil ceil0. Qed.
Expand Down
2 changes: 1 addition & 1 deletion theories/measurable_realfun.v
Original file line number Diff line number Diff line change
Expand Up @@ -1720,7 +1720,7 @@ have badn' k : exists n, mu (E k n) < ((eps / 2) / (2 ^ k.+1)%:R)%:E.
pose badn k := projT1 (cid (badn' k)); exists (\bigcup_k E k (badn k)); split.
- exact: bigcup_measurable.
- apply: (@le_lt_trans _ _ (eps / 2)%:E); first last.
by rewrite lte_fin ltr_pdivrMr // ltr_pMr // Rint_ltr_addr1 // Rint1.
by rewrite lte_fin ltr_pdivrMr // ltr_pMr // ltr1n.
apply: le_trans.
apply: (measure_sigma_subadditive _ (fun k => mE k (badn k)) _ _) => //.
exact: bigcup_measurable.
Expand Down
Loading