measure_theory.function.floorMathlib.MeasureTheory.Function.Floor

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
 -/
-import Mathbin.MeasureTheory.Constructions.BorelSpace.Basic
+import MeasureTheory.Constructions.BorelSpace.Basic
 
 #align_import measure_theory.function.floor from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
 
Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module measure_theory.function.floor
-! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.MeasureTheory.Constructions.BorelSpace.Basic
 
+#align_import measure_theory.function.floor from "leanprover-community/mathlib"@"4280f5f32e16755ec7985ce11e189b6cd6ff6735"
+
 /-!
 # Measurability of `⌊x⌋` etc
 
Diff
@@ -98,10 +98,12 @@ theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
 #align nat.measurable_floor Nat.measurable_floor
 -/
 
+#print Measurable.nat_floor /-
 @[measurability]
 theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋₊ :=
   Nat.measurable_floor.comp hf
 #align measurable.nat_floor Measurable.nat_floor
+-/
 
 #print Nat.measurable_ceil /-
 theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
@@ -110,10 +112,12 @@ theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
 #align nat.measurable_ceil Nat.measurable_ceil
 -/
 
+#print Measurable.nat_ceil /-
 @[measurability]
 theorem Measurable.nat_ceil (hf : Measurable f) : Measurable fun x => ⌈f x⌉₊ :=
   Nat.measurable_ceil.comp hf
 #align measurable.nat_ceil Measurable.nat_ceil
+-/
 
 end FloorSemiring
 
Diff
@@ -98,12 +98,6 @@ theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
 #align nat.measurable_floor Nat.measurable_floor
 -/
 
-/- warning: measurable.nat_floor -> Measurable.nat_floor is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : LinearOrderedSemiring.{u2} R] [_inst_3 : FloorSemiring.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))] [_inst_4 : TopologicalSpace.{u2} R] [_inst_5 : OrderTopology.{u2} R _inst_4 (PartialOrder.toPreorder.{u2} R (OrderedCancelAddCommMonoid.toPartialOrder.{u2} R (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))))] [_inst_6 : MeasurableSpace.{u2} R] [_inst_7 : OpensMeasurableSpace.{u2} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u1, u2} α R _inst_1 _inst_6 f) -> (Measurable.{u1, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.floor.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2)) _inst_3 (f x)))
-but is expected to have type
-  forall {α : Type.{u2}} {R : Type.{u1}} [_inst_1 : MeasurableSpace.{u2} α] [_inst_2 : LinearOrderedSemiring.{u1} R] [_inst_3 : FloorSemiring.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2))] [_inst_4 : TopologicalSpace.{u1} R] [_inst_5 : OrderTopology.{u1} R _inst_4 (PartialOrder.toPreorder.{u1} R (StrictOrderedSemiring.toPartialOrder.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)))] [_inst_6 : MeasurableSpace.{u1} R] [_inst_7 : OpensMeasurableSpace.{u1} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u2, u1} α R _inst_1 _inst_6 f) -> (Measurable.{u2, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.floor.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)) _inst_3 (f x)))
-Case conversion may be inaccurate. Consider using '#align measurable.nat_floor Measurable.nat_floorₓ'. -/
 @[measurability]
 theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋₊ :=
   Nat.measurable_floor.comp hf
@@ -116,12 +110,6 @@ theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
 #align nat.measurable_ceil Nat.measurable_ceil
 -/
 
-/- warning: measurable.nat_ceil -> Measurable.nat_ceil is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : LinearOrderedSemiring.{u2} R] [_inst_3 : FloorSemiring.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))] [_inst_4 : TopologicalSpace.{u2} R] [_inst_5 : OrderTopology.{u2} R _inst_4 (PartialOrder.toPreorder.{u2} R (OrderedCancelAddCommMonoid.toPartialOrder.{u2} R (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))))] [_inst_6 : MeasurableSpace.{u2} R] [_inst_7 : OpensMeasurableSpace.{u2} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u1, u2} α R _inst_1 _inst_6 f) -> (Measurable.{u1, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.ceil.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2)) _inst_3 (f x)))
-but is expected to have type
-  forall {α : Type.{u2}} {R : Type.{u1}} [_inst_1 : MeasurableSpace.{u2} α] [_inst_2 : LinearOrderedSemiring.{u1} R] [_inst_3 : FloorSemiring.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2))] [_inst_4 : TopologicalSpace.{u1} R] [_inst_5 : OrderTopology.{u1} R _inst_4 (PartialOrder.toPreorder.{u1} R (StrictOrderedSemiring.toPartialOrder.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)))] [_inst_6 : MeasurableSpace.{u1} R] [_inst_7 : OpensMeasurableSpace.{u1} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u2, u1} α R _inst_1 _inst_6 f) -> (Measurable.{u2, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.ceil.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)) _inst_3 (f x)))
-Case conversion may be inaccurate. Consider using '#align measurable.nat_ceil Measurable.nat_ceilₓ'. -/
 @[measurability]
 theorem Measurable.nat_ceil (hf : Measurable f) : Measurable fun x => ⌈f x⌉₊ :=
   Nat.measurable_ceil.comp hf
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
 
 ! This file was ported from Lean 3 source module measure_theory.function.floor
-! leanprover-community/mathlib commit bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf
+! leanprover-community/mathlib commit 4280f5f32e16755ec7985ce11e189b6cd6ff6735
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -13,6 +13,9 @@ import Mathbin.MeasureTheory.Constructions.BorelSpace.Basic
 /-!
 # Measurability of `⌊x⌋` etc
 
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
 In this file we prove that `int.floor`, `int.ceil`, `int.fract`, `nat.floor`, and `nat.ceil` are
 measurable under some assumptions on the (semi)ring.
 -/
Diff
@@ -25,47 +25,61 @@ section FloorRing
 variable {α R : Type _} [MeasurableSpace α] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R]
   [OrderTopology R] [MeasurableSpace R]
 
+#print Int.measurable_floor /-
 theorem Int.measurable_floor [OpensMeasurableSpace R] : Measurable (Int.floor : R → ℤ) :=
   measurable_to_countable fun x => by
     simpa only [Int.preimage_floor_singleton] using measurableSet_Ico
 #align int.measurable_floor Int.measurable_floor
+-/
 
+#print Measurable.floor /-
 @[measurability]
 theorem Measurable.floor [OpensMeasurableSpace R] {f : α → R} (hf : Measurable f) :
     Measurable fun x => ⌊f x⌋ :=
   Int.measurable_floor.comp hf
 #align measurable.floor Measurable.floor
+-/
 
+#print Int.measurable_ceil /-
 theorem Int.measurable_ceil [OpensMeasurableSpace R] : Measurable (Int.ceil : R → ℤ) :=
   measurable_to_countable fun x => by
     simpa only [Int.preimage_ceil_singleton] using measurableSet_Ioc
 #align int.measurable_ceil Int.measurable_ceil
+-/
 
+#print Measurable.ceil /-
 @[measurability]
 theorem Measurable.ceil [OpensMeasurableSpace R] {f : α → R} (hf : Measurable f) :
     Measurable fun x => ⌈f x⌉ :=
   Int.measurable_ceil.comp hf
 #align measurable.ceil Measurable.ceil
+-/
 
+#print measurable_fract /-
 theorem measurable_fract [BorelSpace R] : Measurable (Int.fract : R → R) :=
   by
   intro s hs
   rw [Int.preimage_fract]
   exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
 #align measurable_fract measurable_fract
+-/
 
+#print Measurable.fract /-
 @[measurability]
 theorem Measurable.fract [BorelSpace R] {f : α → R} (hf : Measurable f) :
     Measurable fun x => Int.fract (f x) :=
   measurable_fract.comp hf
 #align measurable.fract Measurable.fract
+-/
 
+#print MeasurableSet.image_fract /-
 theorem MeasurableSet.image_fract [BorelSpace R] {s : Set R} (hs : MeasurableSet s) :
     MeasurableSet (Int.fract '' s) :=
   by
   simp only [Int.image_fract, sub_eq_add_neg, image_add_right']
   exact MeasurableSet.iUnion fun m => (measurable_add_const _ hs).inter measurableSet_Ico
 #align measurable_set.image_fract MeasurableSet.image_fract
+-/
 
 end FloorRing
 
@@ -74,21 +88,37 @@ section FloorSemiring
 variable {α R : Type _} [MeasurableSpace α] [LinearOrderedSemiring R] [FloorSemiring R]
   [TopologicalSpace R] [OrderTopology R] [MeasurableSpace R] [OpensMeasurableSpace R] {f : α → R}
 
+#print Nat.measurable_floor /-
 theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
   measurable_to_countable fun n => by
     cases eq_or_ne ⌊n⌋₊ 0 <;> simp [*, Nat.preimage_floor_of_ne_zero]
 #align nat.measurable_floor Nat.measurable_floor
+-/
 
+/- warning: measurable.nat_floor -> Measurable.nat_floor is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : LinearOrderedSemiring.{u2} R] [_inst_3 : FloorSemiring.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))] [_inst_4 : TopologicalSpace.{u2} R] [_inst_5 : OrderTopology.{u2} R _inst_4 (PartialOrder.toPreorder.{u2} R (OrderedCancelAddCommMonoid.toPartialOrder.{u2} R (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))))] [_inst_6 : MeasurableSpace.{u2} R] [_inst_7 : OpensMeasurableSpace.{u2} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u1, u2} α R _inst_1 _inst_6 f) -> (Measurable.{u1, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.floor.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2)) _inst_3 (f x)))
+but is expected to have type
+  forall {α : Type.{u2}} {R : Type.{u1}} [_inst_1 : MeasurableSpace.{u2} α] [_inst_2 : LinearOrderedSemiring.{u1} R] [_inst_3 : FloorSemiring.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2))] [_inst_4 : TopologicalSpace.{u1} R] [_inst_5 : OrderTopology.{u1} R _inst_4 (PartialOrder.toPreorder.{u1} R (StrictOrderedSemiring.toPartialOrder.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)))] [_inst_6 : MeasurableSpace.{u1} R] [_inst_7 : OpensMeasurableSpace.{u1} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u2, u1} α R _inst_1 _inst_6 f) -> (Measurable.{u2, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.floor.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)) _inst_3 (f x)))
+Case conversion may be inaccurate. Consider using '#align measurable.nat_floor Measurable.nat_floorₓ'. -/
 @[measurability]
 theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋₊ :=
   Nat.measurable_floor.comp hf
 #align measurable.nat_floor Measurable.nat_floor
 
+#print Nat.measurable_ceil /-
 theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
   measurable_to_countable fun n => by
     cases eq_or_ne ⌈n⌉₊ 0 <;> simp [*, Nat.preimage_ceil_of_ne_zero]
 #align nat.measurable_ceil Nat.measurable_ceil
+-/
 
+/- warning: measurable.nat_ceil -> Measurable.nat_ceil is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : MeasurableSpace.{u1} α] [_inst_2 : LinearOrderedSemiring.{u2} R] [_inst_3 : FloorSemiring.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))] [_inst_4 : TopologicalSpace.{u2} R] [_inst_5 : OrderTopology.{u2} R _inst_4 (PartialOrder.toPreorder.{u2} R (OrderedCancelAddCommMonoid.toPartialOrder.{u2} R (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2))))] [_inst_6 : MeasurableSpace.{u2} R] [_inst_7 : OpensMeasurableSpace.{u2} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u1, u2} α R _inst_1 _inst_6 f) -> (Measurable.{u1, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.ceil.{u2} R (StrictOrderedSemiring.toOrderedSemiring.{u2} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u2} R _inst_2)) _inst_3 (f x)))
+but is expected to have type
+  forall {α : Type.{u2}} {R : Type.{u1}} [_inst_1 : MeasurableSpace.{u2} α] [_inst_2 : LinearOrderedSemiring.{u1} R] [_inst_3 : FloorSemiring.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2))] [_inst_4 : TopologicalSpace.{u1} R] [_inst_5 : OrderTopology.{u1} R _inst_4 (PartialOrder.toPreorder.{u1} R (StrictOrderedSemiring.toPartialOrder.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)))] [_inst_6 : MeasurableSpace.{u1} R] [_inst_7 : OpensMeasurableSpace.{u1} R _inst_4 _inst_6] {f : α -> R}, (Measurable.{u2, u1} α R _inst_1 _inst_6 f) -> (Measurable.{u2, 0} α Nat _inst_1 Nat.instMeasurableSpace (fun (x : α) => Nat.ceil.{u1} R (StrictOrderedSemiring.toOrderedSemiring.{u1} R (LinearOrderedSemiring.toStrictOrderedSemiring.{u1} R _inst_2)) _inst_3 (f x)))
+Case conversion may be inaccurate. Consider using '#align measurable.nat_ceil Measurable.nat_ceilₓ'. -/
 @[measurability]
 theorem Measurable.nat_ceil (hf : Measurable f) : Measurable fun x => ⌈f x⌉₊ :=
   Nat.measurable_ceil.comp hf
Diff
@@ -4,11 +4,11 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
 
 ! This file was ported from Lean 3 source module measure_theory.function.floor
-! leanprover-community/mathlib commit d003c55042c3cd08aefd1ae9a42ef89441cdaaf3
+! leanprover-community/mathlib commit bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
-import Mathbin.MeasureTheory.Constructions.BorelSpace
+import Mathbin.MeasureTheory.Constructions.BorelSpace.Basic
 
 /-!
 # Measurability of `⌊x⌋` etc
Diff
@@ -51,7 +51,7 @@ theorem measurable_fract [BorelSpace R] : Measurable (Int.fract : R → R) :=
   by
   intro s hs
   rw [Int.preimage_fract]
-  exact MeasurableSet.unionᵢ fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
+  exact MeasurableSet.iUnion fun z => measurable_id.sub_const _ (hs.inter measurableSet_Ico)
 #align measurable_fract measurable_fract
 
 @[measurability]
@@ -64,7 +64,7 @@ theorem MeasurableSet.image_fract [BorelSpace R] {s : Set R} (hs : MeasurableSet
     MeasurableSet (Int.fract '' s) :=
   by
   simp only [Int.image_fract, sub_eq_add_neg, image_add_right']
-  exact MeasurableSet.unionᵢ fun m => (measurable_add_const _ hs).inter measurableSet_Ico
+  exact MeasurableSet.iUnion fun m => (measurable_add_const _ hs).inter measurableSet_Ico
 #align measurable_set.image_fract MeasurableSet.image_fract
 
 end FloorRing

Changes in mathlib4

mathlib3
mathlib4
chore: remove uses of cases' (#9171)

I literally went through and regex'd some uses of cases', replacing them with rcases; this is meant to be a low effort PR as I hope that tools can do this in the future.

rcases is an easier replacement than cases, though with better tools we could in future do a second pass converting simple rcases added here (and existing ones) to cases.

Diff
@@ -71,7 +71,7 @@ variable {α R : Type*} [MeasurableSpace α] [LinearOrderedSemiring R] [FloorSem
 
 theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
   measurable_to_countable fun n => by
-    cases' eq_or_ne ⌊n⌋₊ 0 with h h <;> simp_all [h, Nat.preimage_floor_of_ne_zero, -floor_eq_zero]
+    rcases eq_or_ne ⌊n⌋₊ 0 with h | h <;> simp [h, Nat.preimage_floor_of_ne_zero, -floor_eq_zero]
 #align nat.measurable_floor Nat.measurable_floor
 
 @[measurability]
@@ -81,7 +81,7 @@ theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋
 
 theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
   measurable_to_countable fun n => by
-    cases' eq_or_ne ⌈n⌉₊ 0 with h h <;> simp_all [h, Nat.preimage_ceil_of_ne_zero, -ceil_eq_zero]
+    rcases eq_or_ne ⌈n⌉₊ 0 with h | h <;> simp_all [h, Nat.preimage_ceil_of_ne_zero, -ceil_eq_zero]
 #align nat.measurable_ceil Nat.measurable_ceil
 
 @[measurability]
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -19,7 +19,7 @@ open Set
 
 section FloorRing
 
-variable {α R : Type _} [MeasurableSpace α] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R]
+variable {α R : Type*} [MeasurableSpace α] [LinearOrderedRing R] [FloorRing R] [TopologicalSpace R]
   [OrderTopology R] [MeasurableSpace R]
 
 theorem Int.measurable_floor [OpensMeasurableSpace R] : Measurable (Int.floor : R → ℤ) :=
@@ -66,7 +66,7 @@ end FloorRing
 
 section FloorSemiring
 
-variable {α R : Type _} [MeasurableSpace α] [LinearOrderedSemiring R] [FloorSemiring R]
+variable {α R : Type*} [MeasurableSpace α] [LinearOrderedSemiring R] [FloorSemiring R]
   [TopologicalSpace R] [OrderTopology R] [MeasurableSpace R] [OpensMeasurableSpace R] {f : α → R}
 
 theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,14 +2,11 @@
 Copyright (c) 2021 Yury G. Kudryashov. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Yury G. Kudryashov
-
-! This file was ported from Lean 3 source module measure_theory.function.floor
-! leanprover-community/mathlib commit bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.MeasureTheory.Constructions.BorelSpace.Basic
 
+#align_import measure_theory.function.floor from "leanprover-community/mathlib"@"bf6a01357ff5684b1ebcd0f1a13be314fc82c0bf"
+
 /-!
 # Measurability of `⌊x⌋` etc
 
chore: bump to nightly-2023-07-01 (#5409)

Open in Gitpod

Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>

Diff
@@ -74,7 +74,7 @@ variable {α R : Type _} [MeasurableSpace α] [LinearOrderedSemiring R] [FloorSe
 
 theorem Nat.measurable_floor : Measurable (Nat.floor : R → ℕ) :=
   measurable_to_countable fun n => by
-    cases' eq_or_ne ⌊n⌋₊ 0 with h h <;> simp_all [h, Nat.preimage_floor_of_ne_zero]
+    cases' eq_or_ne ⌊n⌋₊ 0 with h h <;> simp_all [h, Nat.preimage_floor_of_ne_zero, -floor_eq_zero]
 #align nat.measurable_floor Nat.measurable_floor
 
 @[measurability]
@@ -84,7 +84,7 @@ theorem Measurable.nat_floor (hf : Measurable f) : Measurable fun x => ⌊f x⌋
 
 theorem Nat.measurable_ceil : Measurable (Nat.ceil : R → ℕ) :=
   measurable_to_countable fun n => by
-    cases' eq_or_ne ⌈n⌉₊ 0 with h h <;> simp_all [h, Nat.preimage_ceil_of_ne_zero]
+    cases' eq_or_ne ⌈n⌉₊ 0 with h h <;> simp_all [h, Nat.preimage_ceil_of_ne_zero, -ceil_eq_zero]
 #align nat.measurable_ceil Nat.measurable_ceil
 
 @[measurability]
feat: port MeasureTheory.Function.Floor (#4166)

Co-authored-by: Chris Hughes <chrishughes24@gmail.com>

Dependencies 10 + 633

634 files ported (98.4%)
284477 lines ported (98.2%)
Show graph

The unported dependencies are

The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file