@@ -168,9 +168,9 @@ theorem MeasurableSet.exists_measurable_proj {_ : MeasurableSpace α}
168168statements along measurable equivalences. -/
169169structure MeasurableEquiv (α β : Type *) [MeasurableSpace α] [MeasurableSpace β] extends α ≃ β where
170170 /-- The forward function of a measurable equivalence is measurable. -/
171- measurable_toFun : Measurable toEquiv
171+ measurable_toFun : Measurable toEquiv := by measurability
172172 /-- The inverse function of a measurable equivalence is measurable. -/
173- measurable_invFun : Measurable toEquiv.symm
173+ measurable_invFun : Measurable toEquiv.symm := by measurability
174174
175175@[inherit_doc]
176176infixl :25 " ≃ᵐ " => MeasurableEquiv
@@ -206,8 +206,6 @@ theorem coe_mk (e : α ≃ β) (h1 : Measurable e) (h2 : Measurable e.symm) :
206206/-- Any measurable space is equivalent to itself. -/
207207def refl (α : Type *) [MeasurableSpace α] : α ≃ᵐ α where
208208 toEquiv := Equiv.refl α
209- measurable_toFun := measurable_id
210- measurable_invFun := measurable_id
211209
212210instance instInhabited : Inhabited (α ≃ᵐ α) := ⟨refl α⟩
213211
@@ -223,7 +221,6 @@ theorem coe_trans (ab : α ≃ᵐ β) (bc : β ≃ᵐ γ) : ⇑(ab.trans bc) = b
223221def symm (ab : α ≃ᵐ β) : β ≃ᵐ α where
224222 toEquiv := ab.toEquiv.symm
225223 measurable_toFun := ab.measurable_invFun
226- measurable_invFun := ab.measurable_toFun
227224
228225@[simp]
229226theorem coe_toEquiv_symm (e : α ≃ᵐ β) : (e.toEquiv.symm : β → α) = e.symm :=
@@ -338,14 +335,6 @@ protected theorem measurableEmbedding (e : α ≃ᵐ β) : MeasurableEmbedding e
338335protected def cast {α β} [i₁ : MeasurableSpace α] [i₂ : MeasurableSpace β] (h : α = β)
339336 (hi : i₁ ≍ i₂) : α ≃ᵐ β where
340337 toEquiv := Equiv.cast h
341- measurable_toFun := by
342- subst h
343- subst hi
344- exact measurable_id
345- measurable_invFun := by
346- subst h
347- subst hi
348- exact measurable_id
349338
350339/-- Measurable equivalence between `ULift α` and `α`. -/
351340def ulift. {u, v} {α : Type u} [MeasurableSpace α] : ULift.{v, u} α ≃ᵐ α :=
@@ -363,43 +352,29 @@ protected theorem measurable_comp_iff {f : β → γ} (e : α ≃ᵐ β) :
363352def ofUniqueOfUnique (α β : Type *) [MeasurableSpace α] [MeasurableSpace β] [Unique α] [Unique β] :
364353 α ≃ᵐ β where
365354 toEquiv := ofUnique α β
366- measurable_toFun := Subsingleton.measurable
367- measurable_invFun := Subsingleton.measurable
368355
369356variable [MeasurableSpace δ] in
370357/-- Products of equivalent measurable spaces are equivalent. -/
371358def prodCongr (ab : α ≃ᵐ β) (cd : γ ≃ᵐ δ) : α × γ ≃ᵐ β × δ where
372359 toEquiv := .prodCongr ab.toEquiv cd.toEquiv
373- measurable_toFun :=
374- (ab.measurable_toFun.comp measurable_id.fst).prodMk
375- (cd.measurable_toFun.comp measurable_id.snd)
376- measurable_invFun :=
377- (ab.measurable_invFun.comp measurable_id.fst).prodMk
378- (cd.measurable_invFun.comp measurable_id.snd)
379360
380361/-- Products of measurable spaces are symmetric. -/
381362def prodComm : α × β ≃ᵐ β × α where
382363 toEquiv := .prodComm α β
383- measurable_toFun := measurable_id.snd.prodMk measurable_id.fst
384- measurable_invFun := measurable_id.snd.prodMk measurable_id.fst
385364
386365/-- Products of measurable spaces are associative. -/
387366def prodAssoc : (α × β) × γ ≃ᵐ α × β × γ where
388367 toEquiv := .prodAssoc α β γ
389- measurable_toFun := measurable_fst.fst.prodMk <| measurable_fst.snd.prodMk measurable_snd
390- measurable_invFun := (measurable_fst.prodMk measurable_snd.fst).prodMk measurable_snd.snd
391368
392369/-- `PUnit` is a left identity for product of measurable spaces up to a measurable equivalence. -/
393370def punitProd : PUnit × α ≃ᵐ α where
394371 toEquiv := Equiv.punitProd α
395372 measurable_toFun := measurable_snd
396- measurable_invFun := measurable_prodMk_left
397373
398374/-- `PUnit` is a right identity for product of measurable spaces up to a measurable equivalence. -/
399375def prodPUnit : α × PUnit ≃ᵐ α where
400376 toEquiv := Equiv.prodPUnit α
401377 measurable_toFun := measurable_fst
402- measurable_invFun := measurable_prodMk_right
403378
404379variable [MeasurableSpace δ] in
405380/-- Sums of measurable spaces are symmetric. -/
@@ -411,8 +386,6 @@ def sumCongr (ab : α ≃ᵐ β) (cd : γ ≃ᵐ δ) : α ⊕ γ ≃ᵐ β ⊕
411386/-- `s ×ˢ t ≃ (s × t)` as measurable spaces. -/
412387def Set.prod (s : Set α) (t : Set β) : ↥(s ×ˢ t) ≃ᵐ s × t where
413388 toEquiv := Equiv.Set.prod s t
414- measurable_toFun :=
415- measurable_id.subtype_val.fst.subtype_mk.prodMk measurable_id.subtype_val.snd.subtype_mk
416389 measurable_invFun :=
417390 Measurable.subtype_mk <| measurable_id.fst.subtype_val.prodMk measurable_id.snd.subtype_val
418391
@@ -425,8 +398,6 @@ def Set.univ (α : Type*) [MeasurableSpace α] : (univ : Set α) ≃ᵐ α where
425398/-- `{a} ≃ Unit` as measurable spaces. -/
426399def Set.singleton (a : α) : ({a} : Set α) ≃ᵐ Unit where
427400 toEquiv := Equiv.Set.singleton a
428- measurable_toFun := measurable_const
429- measurable_invFun := measurable_const
430401
431402/-- `α` is equivalent to its image in `α ⊕ β` as measurable spaces. -/
432403def Set.rangeInl : (range Sum.inl : Set (α ⊕ β)) ≃ᵐ α where
@@ -489,7 +460,6 @@ variable (π) in
489460/-- Moving a dependent type along an equivalence of coordinates, as a measurable equivalence. -/
490461def piCongrLeft (f : δ ≃ δ') : (∀ b, π (f b)) ≃ᵐ ∀ a, π a where
491462 __ := Equiv.piCongrLeft π f
492- measurable_toFun := measurable_piCongrLeft f
493463 measurable_invFun := by
494464 rw [measurable_pi_iff]
495465 exact fun i => measurable_pi_apply (f i)
@@ -538,8 +508,6 @@ variable (π) in
538508@ [simps! -fullyApplied]
539509def piUnique [Unique δ'] : (∀ i, π i) ≃ᵐ π default where
540510 toEquiv := Equiv.piUnique π
541- measurable_toFun := measurable_pi_apply _
542- measurable_invFun := measurable_uniqueElim
543511
544512/-- If `α` has a unique term, then the type of function `α → β` is measurably equivalent to `β`. -/
545513@ [simps! -fullyApplied]
@@ -550,7 +518,6 @@ def funUnique (α β : Type*) [Unique α] [MeasurableSpace β] : (α → β) ≃
550518@ [simps! -fullyApplied]
551519def piFinTwo (α : Fin 2 → Type *) [∀ i, MeasurableSpace (α i)] : (∀ i, α i) ≃ᵐ α 0 × α 1 where
552520 toEquiv := piFinTwoEquiv α
553- measurable_toFun := Measurable.prod (measurable_pi_apply _) (measurable_pi_apply _)
554521 measurable_invFun := measurable_pi_iff.2 <| Fin.forall_fin_two.2 ⟨measurable_fst, measurable_snd⟩
555522
556523/-- The space `Fin 2 → α` is measurably equivalent to `α × α`. -/
@@ -579,16 +546,12 @@ variable (π)
579546def piEquivPiSubtypeProd (p : δ' → Prop ) [DecidablePred p] :
580547 (∀ i, π i) ≃ᵐ (∀ i : Subtype p, π i) × ∀ i : { i // ¬p i }, π i where
581548 toEquiv := .piEquivPiSubtypeProd p π
582- measurable_toFun := measurable_piEquivPiSubtypeProd π p
583- measurable_invFun := measurable_piEquivPiSubtypeProd_symm π p
584549
585550/-- The measurable equivalence between the pi type over a sum type and a product of pi-types.
586551This is similar to `MeasurableEquiv.piEquivPiSubtypeProd`. -/
587552def sumPiEquivProdPi (α : δ ⊕ δ' → Type *) [∀ i, MeasurableSpace (α i)] :
588553 (∀ i, α i) ≃ᵐ (∀ i, α (.inl i)) × ∀ i', α (.inr i') where
589554 __ := Equiv.sumPiEquivProdPi α
590- measurable_toFun := by
591- apply Measurable.prod <;> rw [measurable_pi_iff] <;> rintro i <;> apply measurable_pi_apply
592555 measurable_invFun := by
593556 rw [measurable_pi_iff]; rintro (i | i)
594557 · exact measurable_pi_iff.1 measurable_fst _
@@ -637,8 +600,6 @@ def sumCompl {s : Set α} [DecidablePred (· ∈ s)] (hs : MeasurableSet s) :
637600@ [simps toEquiv]
638601def ofInvolutive (f : α → α) (hf : Involutive f) (hf' : Measurable f) : α ≃ᵐ α where
639602 toEquiv := hf.toPerm
640- measurable_toFun := hf'
641- measurable_invFun := hf'
642603
643604@[simp] theorem ofInvolutive_apply (f : α → α) (hf : Involutive f) (hf' : Measurable f) (a : α) :
644605 ofInvolutive f hf hf' a = f a := rfl
@@ -651,8 +612,6 @@ def ofInvolutive (f : α → α) (hf : Involutive f) (hf' : Measurable f) : α
651612protected def setOf {α : Type *} : (α → Prop ) ≃ᵐ Set α where
652613 toFun p := {a | p a}
653614 invFun s a := a ∈ s
654- measurable_toFun := measurable_id
655- measurable_invFun := measurable_id
656615
657616@ [simp, norm_cast] lemma coe_setOf {α : Type *} : ⇑MeasurableEquiv.setOf = setOf (α := α) := rfl
658617
@@ -812,8 +771,6 @@ def piCurry {ι : Type*} {κ : ι → Type*} (X : (i : ι) → κ i → Type*)
812771 [∀ i j, MeasurableSpace (X i j)] :
813772 ((p : (i : ι) × κ i) → X p.1 p.2 ) ≃ᵐ ((i : ι) → (j : κ i) → X i j) where
814773 toEquiv := Equiv.piCurry X
815- measurable_toFun := by fun_prop
816- measurable_invFun := by fun_prop
817774
818775lemma coe_piCurry {ι : Type *} {κ : ι → Type *} (X : (i : ι) → κ i → Type *)
819776 [∀ i j, MeasurableSpace (X i j)] : ⇑(piCurry X) = Sigma.curry := rfl
@@ -826,8 +783,6 @@ See `MeasurableEquiv.piCurry` for the dependent version. -/
826783@[simps!]
827784def curry (ι κ X : Type *) [MeasurableSpace X] : (ι × κ → X) ≃ᵐ (ι → κ → X) where
828785 toEquiv := Equiv.curry ι κ X
829- measurable_toFun := by fun_prop
830- measurable_invFun := by fun_prop
831786
832787lemma coe_curry (ι κ X : Type *) [MeasurableSpace X] : ⇑(curry ι κ X) = Function.curry := rfl
833788
0 commit comments