Skip to content
This repository was archived by the owner on Jul 24, 2024. It is now read-only.

Commit a15ae9c

Browse files
committed
chore(measure_theory/measurable_space): add simps config for measurable_equiv (#9315)
Also add `@[ext]` lemma and some standard `equiv` lemmas.
1 parent b563e5a commit a15ae9c

File tree

4 files changed

+47
-12
lines changed

4 files changed

+47
-12
lines changed

src/measure_theory/constructions/pi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ begin
263263
have hl := λ i : ι, mem_sorted_univ i,
264264
have hnd := @sorted_univ_nodup ι _ _,
265265
apply ((pi_measurable_equiv_tprod hnd hl).symm.map_apply (pi univ s)).trans_le,
266-
dsimp only [pi_measurable_equiv_tprod, tprod.pi_equiv_tprod, coe_symm_mk, equiv.coe_fn_symm_mk],
266+
dsimp only [pi_measurable_equiv_tprod_symm_apply],
267267
rw [elim_preimage_pi hnd],
268268
refine (tprod_tprod_le _ _ _).trans_eq _,
269269
rw [← list.prod_to_finset _ hnd],

src/measure_theory/constructions/prod.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ begin
484484
(ν.to_finite_spanning_sets_in.prod τ.to_finite_spanning_sets_in (λ _, id) (λ _, id)) _).symm,
485485
rintro s hs _ ⟨t, u, ht, hu, rfl⟩, rw [mem_set_of_eq] at hs ht hu,
486486
simp_rw [map_apply (measurable_equiv.measurable _) (hs.prod (ht.prod hu)), prod_prod ht hu,
487-
measurable_equiv.prod_assoc, measurable_equiv.coe_eq, equiv.prod_assoc_preimage,
487+
measurable_equiv.prod_assoc, measurable_equiv.coe_mk, equiv.prod_assoc_preimage,
488488
prod_prod (hs.prod ht) hu, prod_prod hs ht, mul_assoc]
489489
end
490490

src/measure_theory/measurable_space.lean

Lines changed: 44 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -684,8 +684,8 @@ end constructions
684684
/-- Equivalences between measurable spaces. Main application is the simplification of measurability
685685
statements along measurable equivalences. -/
686686
structure measurable_equiv (α β : Type*) [measurable_space α] [measurable_space β] extends α ≃ β :=
687-
(measurable_to_fun : measurable to_fun)
688-
(measurable_inv_fun : measurable inv_fun)
687+
(measurable_to_fun : measurable to_equiv)
688+
(measurable_inv_fun : measurable to_equiv.symm)
689689

690690
infix ` ≃ᵐ `:25 := measurable_equiv
691691

@@ -698,7 +698,7 @@ instance : has_coe_to_fun (α ≃ᵐ β) :=
698698

699699
variables {α β}
700700

701-
lemma coe_eq (e : α ≃ᵐ β) : (e : α → β) = e.to_equiv := rfl
701+
@[simp] lemma coe_to_equiv (e : α ≃ᵐ β) : (e.to_equiv : α → β) = e := rfl
702702

703703
@[measurability]
704704
protected lemma measurable (e : α ≃ᵐ β) : measurable (e : α → β) :=
@@ -715,25 +715,60 @@ def refl (α : Type*) [measurable_space α] : α ≃ᵐ α :=
715715
instance : inhabited (α ≃ᵐ α) := ⟨refl α⟩
716716

717717
/-- The composition of equivalences between measurable spaces. -/
718-
@[simps] def trans (ab : α ≃ᵐ β) (bc : β ≃ᵐ γ) :
718+
def trans (ab : α ≃ᵐ β) (bc : β ≃ᵐ γ) :
719719
α ≃ᵐ γ :=
720720
{ to_equiv := ab.to_equiv.trans bc.to_equiv,
721721
measurable_to_fun := bc.measurable_to_fun.comp ab.measurable_to_fun,
722722
measurable_inv_fun := ab.measurable_inv_fun.comp bc.measurable_inv_fun }
723723

724724
/-- The inverse of an equivalence between measurable spaces. -/
725-
@[simps] def symm (ab : α ≃ᵐ β) : β ≃ᵐ α :=
725+
def symm (ab : α ≃ᵐ β) : β ≃ᵐ α :=
726726
{ to_equiv := ab.to_equiv.symm,
727727
measurable_to_fun := ab.measurable_inv_fun,
728728
measurable_inv_fun := ab.measurable_to_fun }
729729

730-
@[simp] lemma coe_symm_mk (e : α ≃ β) (h1 : measurable e) (h2 : measurable e.symm) :
731-
((⟨e, h1, h2⟩ : α ≃ᵐ β).symm : β → α) = e.symm := rfl
730+
@[simp] lemma coe_to_equiv_symm (e : α ≃ᵐ β) : (e.to_equiv.symm : β → α) = e.symm := rfl
731+
732+
/-- See Note [custom simps projection]. We need to specify this projection explicitly in this case,
733+
because it is a composition of multiple projections. -/
734+
def simps.apply (h : α ≃ᵐ β) : α → β := h
735+
/-- See Note [custom simps projection] -/
736+
def simps.symm_apply (h : α ≃ᵐ β) : β → α := h.symm
737+
738+
initialize_simps_projections measurable_equiv
739+
(to_equiv_to_fun → apply, to_equiv_inv_fun → symm_apply)
740+
741+
lemma to_equiv_injective : injective (to_equiv : (α ≃ᵐ β) → (α ≃ β)) :=
742+
by { rintro ⟨e₁, _, _⟩ ⟨e₂, _, _⟩ (rfl : e₁ = e₂), refl }
743+
744+
@[ext] lemma ext {e₁ e₂ : α ≃ᵐ β} (h : (e₁ : α → β) = e₂) : e₁ = e₂ :=
745+
to_equiv_injective $ equiv.coe_fn_injective h
746+
747+
@[simp] lemma symm_mk (e : α ≃ β) (h1 : measurable e) (h2 : measurable e.symm) :
748+
(⟨e, h1, h2⟩ : α ≃ᵐ β).symm = ⟨e.symm, h2, h1⟩ := rfl
749+
750+
attribute [simps apply to_equiv] trans refl
751+
752+
@[simp] lemma symm_refl (α : Type*) [measurable_space α] : (refl α).symm = refl α := rfl
732753

733754
@[simp] theorem symm_comp_self (e : α ≃ᵐ β) : e.symm ∘ e = id := funext e.left_inv
734755

735756
@[simp] theorem self_comp_symm (e : α ≃ᵐ β) : e ∘ e.symm = id := funext e.right_inv
736757

758+
@[simp] theorem apply_symm_apply (e : α ≃ᵐ β) (y : β) : e (e.symm y) = y := e.right_inv y
759+
760+
@[simp] theorem symm_apply_apply (e : α ≃ᵐ β) (x : α) : e.symm (e x) = x := e.left_inv x
761+
762+
@[simp] theorem symm_trans_self (e : α ≃ᵐ β) : e.symm.trans e = refl β :=
763+
ext e.self_comp_symm
764+
765+
@[simp] theorem self_trans_symm (e : α ≃ᵐ β) : e.trans e.symm = refl α :=
766+
ext e.symm_comp_self
767+
768+
protected theorem surjective (e : α ≃ᵐ β) : surjective e := e.to_equiv.surjective
769+
protected theorem bijective (e : α ≃ᵐ β) : bijective e := e.to_equiv.bijective
770+
protected theorem injective (e : α ≃ᵐ β) : injective e := e.to_equiv.injective
771+
737772
/-- Equal measurable spaces are equivalent. -/
738773
protected def cast {α β} [i₁ : measurable_space α] [i₂ : measurable_space β]
739774
(h : α = β) (hi : i₁ == i₂) : α ≃ᵐ β :=
@@ -746,7 +781,7 @@ protected lemma measurable_coe_iff {f : β → γ} (e : α ≃ᵐ β) :
746781
iff.intro
747782
(assume hfe,
748783
have measurable (f ∘ (e.symm.trans e).to_equiv) := hfe.comp e.symm.measurable,
749-
by rwa [trans_to_equiv, symm_to_equiv, equiv.symm_trans] at this)
784+
by rwa [coe_to_equiv, symm_trans_self] at this)
750785
(λ h, h.comp e.measurable)
751786

752787
/-- Products of equivalent measurable spaces are equivalent. -/
@@ -911,6 +946,7 @@ def Pi_congr_right (e : Π a, π a ≃ᵐ π' a) : (Π a, π a) ≃ᵐ (Π a, π
911946
measurable_pi_lambda _ (λ i, (e i).measurable_inv_fun.comp (measurable_pi_apply i)) }
912947

913948
/-- Pi-types are measurably equivalent to iterated products. -/
949+
@[simps {fully_applied := ff}]
914950
noncomputable def pi_measurable_equiv_tprod {l : list δ'} (hnd : l.nodup) (h : ∀ i, i ∈ l) :
915951
(Π i, π i) ≃ᵐ list.tprod π l :=
916952
{ to_equiv := list.tprod.pi_equiv_tprod hnd h,

src/measure_theory/measure/measure_space.lean

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2288,8 +2288,7 @@ begin
22882288
rw [measure_eq_infi' μ],
22892289
refine le_infi _, rintro ⟨t, hst, ht⟩,
22902290
rw [subtype.coe_mk],
2291-
have := f.symm.to_equiv.image_eq_preimage,
2292-
simp only [←coe_eq, symm_symm, symm_to_equiv] at this,
2291+
have : f.symm '' s = f ⁻¹' s := f.symm.to_equiv.image_eq_preimage s,
22932292
rw [← this, image_subset_iff] at hst,
22942293
convert measure_mono hst,
22952294
rw [map_apply, preimage_preimage],

0 commit comments

Comments
 (0)