Skip to content

Commit

Permalink
refactor(measure_theory): enable dot notation for measure.map (#12350)
Browse files Browse the repository at this point in the history
Refactor to allow for using dot notation with `measure.map` (was previously not possible because it was bundled as a linear map). Mirrors `measure.restrict` wrapper implementation for `measure.restrictₗ`.
  • Loading branch information
rish987 committed Mar 3, 2022
1 parent c504585 commit 59bf454
Show file tree
Hide file tree
Showing 6 changed files with 79 additions and 58 deletions.
4 changes: 2 additions & 2 deletions src/measure_theory/constructions/prod.lean
Expand Up @@ -568,8 +568,8 @@ begin
/- if `μa = 0`, then the lemma is trivial, otherwise we can use `hg`
to deduce `sigma_finite μc`. -/
rcases eq_or_ne μa 0 with (rfl|ha),
{ rw [← hf.map_eq, zero_prod, (map f).map_zero, zero_prod],
exact ⟨this, (map _).map_zero⟩ },
{ rw [← hf.map_eq, zero_prod, measure.map_zero, zero_prod],
exact ⟨this, (mapₗ _).map_zero⟩ },
haveI : sigma_finite μc,
{ rcases (ae_ne_bot.2 ha).nonempty_of_mem hg with ⟨x, hx : map (g x) μc = μd⟩,
exact sigma_finite.of_map _ hgm.of_uncurry_left (by rwa hx) },
Expand Down
4 changes: 2 additions & 2 deletions src/measure_theory/group/measure.lean
Expand Up @@ -94,11 +94,11 @@ end

@[to_additive]
instance [is_mul_left_invariant μ] (c : ℝ≥0∞) : is_mul_left_invariant (c • μ) :=
⟨λ g, by rw [(map ((*) g)).map_smul, map_mul_left_eq_self]⟩
⟨λ g, by rw [map_smul, map_mul_left_eq_self]⟩

@[to_additive]
instance [is_mul_right_invariant μ] (c : ℝ≥0∞) : is_mul_right_invariant (c • μ) :=
⟨λ g, by rw [(map (* g)).map_smul, map_mul_right_eq_self]⟩
⟨λ g, by rw [map_smul, map_mul_right_eq_self]⟩

end mul

Expand Down
2 changes: 1 addition & 1 deletion src/measure_theory/measure/haar.lean
Expand Up @@ -658,7 +658,7 @@ begin
obtain ⟨c, cpos, clt, hc⟩ : ∃ (c : ℝ≥0∞), (c ≠ 0) ∧ (c ≠ ∞) ∧ (measure.map has_inv.inv μ = c • μ)
:= is_haar_measure_eq_smul_is_haar_measure _ _,
have : map has_inv.inv (map has_inv.inv μ) = c^2 • μ,
by simp only [hc, smul_smul, pow_two, linear_map.map_smul],
by simp only [hc, smul_smul, pow_two, map_smul],
have μeq : μ = c^2 • μ,
{ rw [map_map continuous_inv.measurable continuous_inv.measurable] at this,
{ simpa only [inv_involutive, involutive.comp_self, map_id] },
Expand Down
2 changes: 1 addition & 1 deletion src/measure_theory/measure/haar_lebesgue.lean
Expand Up @@ -214,7 +214,7 @@ begin
haveI : is_add_haar_measure (map e μ) := is_add_haar_measure_map μ e.to_add_equiv Ce Cesymm,
have ecomp : (e.symm) ∘ e = id,
by { ext x, simp only [id.def, function.comp_app, linear_equiv.symm_apply_apply] },
rw [map_linear_map_add_haar_pi_eq_smul_add_haar hf (map e μ), linear_map.map_smul,
rw [map_linear_map_add_haar_pi_eq_smul_add_haar hf (map e μ), map_smul,
map_map Cesymm.measurable Ce.measurable, ecomp, measure.map_id]
end

Expand Down
2 changes: 1 addition & 1 deletion src/measure_theory/measure/lebesgue.lean
Expand Up @@ -356,7 +356,7 @@ begin
ennreal.of_real_one, one_smul] },
{ simp only [matrix.transvection_struct.det, ennreal.of_real_one, map_transvection_volume_pi,
one_smul, _root_.inv_one, abs_one] },
{ rw [to_lin'_mul, det_mul, linear_map.coe_comp, ← measure.map_map, IHB, linear_map.map_smul,
{ rw [to_lin'_mul, det_mul, linear_map.coe_comp, ← measure.map_map, IHB, measure.map_smul,
IHA, smul_smul, ← ennreal.of_real_mul (abs_nonneg _), ← abs_mul, mul_comm, mul_inv₀],
{ apply continuous.measurable,
apply linear_map.continuous_on_pi },
Expand Down

0 comments on commit 59bf454

Please sign in to comment.