measure_theory.measure.haar.of_basis
⟷
Mathlib.MeasureTheory.Measure.Haar.OfBasis
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -126,24 +126,13 @@ end
lemma convex_parallelepiped (v : ι → E) : convex ℝ (parallelepiped v) :=
begin
rw parallelepiped_eq_sum_segment,
- -- TODO: add `convex.sum` to match `convex.add`
- let : add_submonoid (set E) :=
- { carrier := { s | convex ℝ s}, zero_mem' := convex_singleton _, add_mem' := λ x y, convex.add },
- exact this.sum_mem (λ i hi, convex_segment _ _),
+ exact convex_sum _ (λ i hi, convex_segment _ _),
end
/-- A `parallelepiped` is the convex hull of its vertices -/
lemma parallelepiped_eq_convex_hull (v : ι → E) :
parallelepiped v = convex_hull ℝ (∑ i, {(0 : E), v i}) :=
-begin
- -- TODO: add `convex_hull_sum` to match `convex_hull_add`
- let : set E →+ set E :=
- { to_fun := convex_hull ℝ,
- map_zero' := convex_hull_singleton _,
- map_add' := convex_hull_add },
- simp_rw [parallelepiped_eq_sum_segment, ←convex_hull_pair],
- exact (this.map_sum _ _).symm,
-end
+by simp_rw [convex_hull_sum, convex_hull_pair, parallelepiped_eq_sum_segment]
/-- The axis aligned parallelepiped over `ι → ℝ` is a cuboid. -/
lemma parallelepiped_single [decidable_eq ι] (a : ι → ℝ) :
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -194,7 +194,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
cases' eq_or_ne (a i) 0 with hai hai
· rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
rw [hai, ← h, zero_div, MulZeroClass.zero_mul]
- · rw [div_mul_cancel _ hai]
+ · rw [div_mul_cancel₀ _ hai]
#align parallelepiped_single parallelepiped_single
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -140,7 +140,7 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
· rintro ⟨t, ht, rfl⟩
exact ⟨t • v, fun i => ⟨t i, ht _, by simp⟩, rfl⟩
rintro ⟨g, hg, rfl⟩
- change ∀ i, _ at hg
+ change ∀ i, _ at hg
choose t ht hg using hg
refine' ⟨t, ht, _⟩
simp_rw [hg]
@@ -185,14 +185,14 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
refine' ⟨fun i => x i / a i, fun i => _, funext fun i => _⟩
· specialize h i
cases' le_total (a i) 0 with hai hai
- · rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai] at h
+ · rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai] at h
exact ⟨div_nonneg_of_nonpos h.2 hai, div_le_one_of_ge h.1 hai⟩
- · rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai] at h
+ · rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai] at h
exact ⟨div_nonneg h.1 hai, div_le_one_of_le h.2 hai⟩
· specialize h i
simp only [smul_eq_mul, Pi.mul_apply]
cases' eq_or_ne (a i) 0 with hai hai
- · rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
+ · rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
rw [hai, ← h, zero_div, MulZeroClass.zero_mul]
· rw [div_mul_cancel _ hai]
#align parallelepiped_single parallelepiped_single
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -63,7 +63,7 @@ theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
by
simp only [parallelepiped, ← image_comp]
congr 1 with t
- simp only [Function.comp_apply, LinearMap.map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
+ simp only [Function.comp_apply, map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
#align image_parallelepiped image_parallelepiped
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,8 +3,8 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-/
-import Mathbin.MeasureTheory.Measure.Haar.Basic
-import Mathbin.Analysis.InnerProductSpace.PiL2
+import MeasureTheory.Measure.Haar.Basic
+import Analysis.InnerProductSpace.PiL2
#align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,15 +2,12 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
-! leanprover-community/mathlib commit 92bd7b1ffeb306a89f450bee126ddd8a284c259d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.MeasureTheory.Measure.Haar.Basic
import Mathbin.Analysis.InnerProductSpace.PiL2
+#align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
+
/-!
# Additive Haar measure constructed from a basis
mathlib commit https://github.com/leanprover-community/mathlib/commit/2fe465deb81bcd7ccafa065bb686888a82f15372
@@ -232,11 +232,13 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E
#align basis.parallelepiped Basis.parallelepiped
-/
+#print Basis.coe_parallelepiped /-
@[simp]
theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
(b.parallelepiped : Set E) = parallelepiped b :=
rfl
#align basis.coe_parallelepiped Basis.coe_parallelepiped
+-/
#print Basis.parallelepiped_reindex /-
@[simp]
mathlib commit https://github.com/leanprover-community/mathlib/commit/b01d6eb9d0a308807af54319b264d0994b91774b
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
-! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
+! leanprover-community/mathlib commit 92bd7b1ffeb306a89f450bee126ddd8a284c259d
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -154,27 +154,15 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
by
rw [parallelepiped_eq_sum_segment]
- -- TODO: add `convex.sum` to match `convex.add`
- let this.1 : AddSubmonoid (Set E) :=
- { carrier := {s | Convex ℝ s}
- zero_mem' := convex_singleton _
- add_mem' := fun x y => Convex.add }
- exact this.sum_mem fun i hi => convex_segment _ _
+ exact convex_sum _ fun i hi => convex_segment _ _
#align convex_parallelepiped convex_parallelepiped
-/
#print parallelepiped_eq_convexHull /-
/-- A `parallelepiped` is the convex hull of its vertices -/
theorem parallelepiped_eq_convexHull (v : ι → E) :
- parallelepiped v = convexHull ℝ (∑ i, {(0 : E), v i}) :=
- by
- -- TODO: add `convex_hull_sum` to match `convex_hull_add`
- let this.1 : Set E →+ Set E :=
- { toFun := convexHull ℝ
- map_zero' := convexHull_singleton _
- map_add' := convexHull_add }
- simp_rw [parallelepiped_eq_sum_segment, ← convexHull_pair]
- exact (this.map_sum _ _).symm
+ parallelepiped v = convexHull ℝ (∑ i, {(0 : E), v i}) := by
+ simp_rw [convexHull_sum, convexHull_pair, parallelepiped_eq_sum_segment]
#align parallelepiped_eq_convex_hull parallelepiped_eq_convexHull
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -53,11 +53,14 @@ def parallelepiped (v : ι → E) : Set E :=
#align parallelepiped parallelepiped
-/
+#print mem_parallelepiped_iff /-
theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ) (ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
simp [parallelepiped, eq_comm]
#align mem_parallelepiped_iff mem_parallelepiped_iff
+-/
+#print image_parallelepiped /-
theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
f '' parallelepiped v = parallelepiped (f ∘ v) :=
by
@@ -65,7 +68,9 @@ theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
congr 1 with t
simp only [Function.comp_apply, LinearMap.map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
#align image_parallelepiped image_parallelepiped
+-/
+#print parallelepiped_comp_equiv /-
/-- Reindexing a family of vectors does not change their parallelepiped. -/
@[simp]
theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
@@ -90,7 +95,9 @@ theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
Equiv.piCongrLeft'_apply, Equiv.apply_symm_apply] using
(e.symm.sum_comp fun i : ι' => x i • v (e i)).symm
#align parallelepiped_comp_equiv parallelepiped_comp_equiv
+-/
+#print parallelepiped_orthonormalBasis_one_dim /-
-- The parallelepiped associated to an orthonormal basis of `ℝ` is either `[0, 1]` or `[-1, 0]`.
theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ι ℝ ℝ) :
parallelepiped b = Icc 0 1 ∨ parallelepiped b = Icc (-1) 0 :=
@@ -124,7 +131,9 @@ theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ι ℝ ℝ
simp only [← image_comp, mul_neg, mul_one, Finset.sum_singleton, image_neg, preimage_neg_Icc,
neg_zero, Finset.univ_unique]
#align parallelepiped_orthonormal_basis_one_dim parallelepiped_orthonormalBasis_one_dim
+-/
+#print parallelepiped_eq_sum_segment /-
theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i, segment ℝ 0 (v i) :=
by
ext
@@ -139,6 +148,7 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
refine' ⟨t, ht, _⟩
simp_rw [hg]
#align parallelepiped_eq_sum_segment parallelepiped_eq_sum_segment
+-/
#print convex_parallelepiped /-
theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
@@ -153,6 +163,7 @@ theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
#align convex_parallelepiped convex_parallelepiped
-/
+#print parallelepiped_eq_convexHull /-
/-- A `parallelepiped` is the convex hull of its vertices -/
theorem parallelepiped_eq_convexHull (v : ι → E) :
parallelepiped v = convexHull ℝ (∑ i, {(0 : E), v i}) :=
@@ -165,7 +176,9 @@ theorem parallelepiped_eq_convexHull (v : ι → E) :
simp_rw [parallelepiped_eq_sum_segment, ← convexHull_pair]
exact (this.map_sum _ _).symm
#align parallelepiped_eq_convex_hull parallelepiped_eq_convexHull
+-/
+#print parallelepiped_single /-
/-- The axis aligned parallelepiped over `ι → ℝ` is a cuboid. -/
theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
(parallelepiped fun i => Pi.single i (a i)) = Set.uIcc 0 a :=
@@ -198,6 +211,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
rw [hai, ← h, zero_div, MulZeroClass.zero_mul]
· rw [div_mul_cancel _ hai]
#align parallelepiped_single parallelepiped_single
+-/
end AddCommGroup
@@ -236,13 +250,16 @@ theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
rfl
#align basis.coe_parallelepiped Basis.coe_parallelepiped
+#print Basis.parallelepiped_reindex /-
@[simp]
theorem Basis.parallelepiped_reindex (b : Basis ι ℝ E) (e : ι ≃ ι') :
(b.reindex e).parallelepiped = b.parallelepiped :=
PositiveCompacts.ext <|
(congr_arg parallelepiped (b.coe_reindex _)).trans (parallelepiped_comp_equiv b e.symm)
#align basis.parallelepiped_reindex Basis.parallelepiped_reindex
+-/
+#print Basis.parallelepiped_map /-
theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
(b.map e).parallelepiped =
b.parallelepiped.map e
@@ -252,6 +269,7 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
e.to_linear_map.is_open_map_of_finite_dimensional e.surjective :=
PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
#align basis.parallelepiped_map Basis.parallelepiped_map
+-/
variable [MeasurableSpace E] [BorelSpace E]
@@ -269,9 +287,11 @@ instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure
#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
-/
+#print Basis.addHaar_self /-
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact add_haar_measure_self
#align basis.add_haar_self Basis.addHaar_self
+-/
end NormedSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -145,7 +145,7 @@ theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
by
rw [parallelepiped_eq_sum_segment]
-- TODO: add `convex.sum` to match `convex.add`
- let this : AddSubmonoid (Set E) :=
+ let this.1 : AddSubmonoid (Set E) :=
{ carrier := {s | Convex ℝ s}
zero_mem' := convex_singleton _
add_mem' := fun x y => Convex.add }
@@ -158,7 +158,7 @@ theorem parallelepiped_eq_convexHull (v : ι → E) :
parallelepiped v = convexHull ℝ (∑ i, {(0 : E), v i}) :=
by
-- TODO: add `convex_hull_sum` to match `convex_hull_add`
- let this : Set E →+ Set E :=
+ let this.1 : Set E →+ Set E :=
{ toFun := convexHull ℝ
map_zero' := convexHull_singleton _
map_add' := convexHull_add }
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 2ebc1d6c2fed9f54c95bbc3998eaa5570527129a
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -14,6 +14,9 @@ import Mathbin.Analysis.InnerProductSpace.PiL2
/-!
# Additive Haar measure constructed from a basis
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
Given a basis of a finite-dimensional real vector space, we define the corresponding Lebesgue
measure, which gives measure `1` to the parallelepiped spanned by the basis.
@@ -143,7 +146,7 @@ theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
rw [parallelepiped_eq_sum_segment]
-- TODO: add `convex.sum` to match `convex.add`
let this : AddSubmonoid (Set E) :=
- { carrier := { s | Convex ℝ s }
+ { carrier := {s | Convex ℝ s}
zero_mem' := convex_singleton _
add_mem' := fun x y => Convex.add }
exact this.sum_mem fun i hi => convex_segment _ _
@@ -260,10 +263,10 @@ irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E :=
#align basis.add_haar Basis.addHaar
-/
-#print AddHaarMeasure_basis_addHaar /-
-instance AddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : AddHaarMeasure b.addHaar := by
+#print IsAddHaarMeasure_basis_addHaar /-
+instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure b.addHaar := by
rw [Basis.addHaar]; exact measure.is_add_haar_measure_add_haar_measure _
-#align is_add_haar_measure_basis_add_haar AddHaarMeasure_basis_addHaar
+#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
-/
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -51,7 +51,7 @@ def parallelepiped (v : ι → E) : Set E :=
-/
theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
- x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ)(ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
+ x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ) (ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
simp [parallelepiped, eq_comm]
#align mem_parallelepiped_iff mem_parallelepiped_iff
@@ -131,7 +131,7 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
· rintro ⟨t, ht, rfl⟩
exact ⟨t • v, fun i => ⟨t i, ht _, by simp⟩, rfl⟩
rintro ⟨g, hg, rfl⟩
- change ∀ i, _ at hg
+ change ∀ i, _ at hg
choose t ht hg using hg
refine' ⟨t, ht, _⟩
simp_rw [hg]
@@ -184,14 +184,14 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
refine' ⟨fun i => x i / a i, fun i => _, funext fun i => _⟩
· specialize h i
cases' le_total (a i) 0 with hai hai
- · rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai] at h
+ · rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai] at h
exact ⟨div_nonneg_of_nonpos h.2 hai, div_le_one_of_ge h.1 hai⟩
- · rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai] at h
+ · rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai] at h
exact ⟨div_nonneg h.1 hai, div_le_one_of_le h.2 hai⟩
· specialize h i
simp only [smul_eq_mul, Pi.mul_apply]
cases' eq_or_ne (a i) 0 with hai hai
- · rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
+ · rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
rw [hai, ← h, zero_div, MulZeroClass.zero_mul]
· rw [div_mul_cancel _ hai]
#align parallelepiped_single parallelepiped_single
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -43,10 +43,12 @@ section AddCommGroup
variable [AddCommGroup E] [Module ℝ E] [AddCommGroup F] [Module ℝ F]
+#print parallelepiped /-
/-- The closed parallelepiped spanned by a finite family of vectors. -/
def parallelepiped (v : ι → E) : Set E :=
(fun t : ι → ℝ => ∑ i, t i • v i) '' Icc 0 1
#align parallelepiped parallelepiped
+-/
theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ)(ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
@@ -135,6 +137,7 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
simp_rw [hg]
#align parallelepiped_eq_sum_segment parallelepiped_eq_sum_segment
+#print convex_parallelepiped /-
theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
by
rw [parallelepiped_eq_sum_segment]
@@ -145,6 +148,7 @@ theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) :=
add_mem' := fun x y => Convex.add }
exact this.sum_mem fun i hi => convex_segment _ _
#align convex_parallelepiped convex_parallelepiped
+-/
/-- A `parallelepiped` is the convex hull of its vertices -/
theorem parallelepiped_eq_convexHull (v : ι → E) :
@@ -198,6 +202,7 @@ section NormedSpace
variable [NormedAddCommGroup E] [NormedAddCommGroup F] [NormedSpace ℝ E] [NormedSpace ℝ F]
+#print Basis.parallelepiped /-
/-- The parallelepiped spanned by a basis, as a compact set with nonempty interior. -/
def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E
where
@@ -220,6 +225,7 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E
zero_lt_one, imp_true_iff]
rwa [← Homeomorph.image_interior, nonempty_image_iff]
#align basis.parallelepiped Basis.parallelepiped
+-/
@[simp]
theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
@@ -246,15 +252,19 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
variable [MeasurableSpace E] [BorelSpace E]
+#print Basis.addHaar /-
/-- The Lebesgue measure associated to a basis, giving measure `1` to the parallelepiped spanned
by the basis. -/
irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E :=
Measure.addHaarMeasure b.parallelepiped
#align basis.add_haar Basis.addHaar
+-/
-instance addHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : AddHaarMeasure b.addHaar := by
+#print AddHaarMeasure_basis_addHaar /-
+instance AddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : AddHaarMeasure b.addHaar := by
rw [Basis.addHaar]; exact measure.is_add_haar_measure_add_haar_measure _
-#align is_add_haar_measure_basis_add_haar addHaarMeasure_basis_addHaar
+#align is_add_haar_measure_basis_add_haar AddHaarMeasure_basis_addHaar
+-/
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact add_haar_measure_self
@@ -262,6 +272,7 @@ theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) =
end NormedSpace
+#print measureSpaceOfInnerProductSpace /-
/-- A finite dimensional inner product space has a canonical measure, the Lebesgue measure giving
volume `1` to the parallelepiped spanned by any orthonormal basis. We define the measure using
some arbitrary choice of orthonormal basis. The fact that it works with any orthonormal basis
@@ -270,11 +281,14 @@ instance (priority := 100) measureSpaceOfInnerProductSpace [NormedAddCommGroup E
[InnerProductSpace ℝ E] [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] :
MeasureSpace E where volume := (stdOrthonormalBasis ℝ E).toBasis.addHaar
#align measure_space_of_inner_product_space measureSpaceOfInnerProductSpace
+-/
+#print Real.measureSpace /-
/- This instance should not be necessary, but Lean has difficulties to find it in product
situations if we do not declare it explicitly. -/
instance Real.measureSpace : MeasureSpace ℝ := by infer_instance
#align real.measure_space Real.measureSpace
+-/
/-! # Miscellaneous instances for `euclidean_space`
@@ -293,6 +307,7 @@ instance : MeasurableSpace (EuclideanSpace ℝ ι) :=
instance : BorelSpace (EuclideanSpace ℝ ι) :=
Pi.borelSpace
+#print EuclideanSpace.measurableEquiv /-
/-- `pi_Lp.equiv` as a `measurable_equiv`. -/
@[simps toEquiv]
protected def measurableEquiv : EuclideanSpace ℝ ι ≃ᵐ (ι → ℝ)
@@ -301,10 +316,13 @@ protected def measurableEquiv : EuclideanSpace ℝ ι ≃ᵐ (ι → ℝ)
measurable_to_fun := measurable_id
measurable_inv_fun := measurable_id
#align euclidean_space.measurable_equiv EuclideanSpace.measurableEquiv
+-/
+#print EuclideanSpace.coe_measurableEquiv /-
theorem coe_measurableEquiv : ⇑(EuclideanSpace.measurableEquiv ι) = PiLp.equiv 2 _ :=
rfl
#align euclidean_space.coe_measurable_equiv EuclideanSpace.coe_measurableEquiv
+-/
end EuclideanSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -252,9 +252,9 @@ irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E :=
Measure.addHaarMeasure b.parallelepiped
#align basis.add_haar Basis.addHaar
-instance isAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure b.addHaar := by
+instance addHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : AddHaarMeasure b.addHaar := by
rw [Basis.addHaar]; exact measure.is_add_haar_measure_add_haar_measure _
-#align is_add_haar_measure_basis_add_haar isAddHaarMeasure_basis_addHaar
+#align is_add_haar_measure_basis_add_haar addHaarMeasure_basis_addHaar
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact add_haar_measure_self
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -33,7 +33,7 @@ of the basis).
open Set TopologicalSpace MeasureTheory MeasureTheory.Measure FiniteDimensional
-open BigOperators Pointwise
+open scoped BigOperators Pointwise
noncomputable section
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -252,16 +252,12 @@ irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E :=
Measure.addHaarMeasure b.parallelepiped
#align basis.add_haar Basis.addHaar
-instance isAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure b.addHaar :=
- by
- rw [Basis.addHaar]
- exact measure.is_add_haar_measure_add_haar_measure _
+instance isAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure b.addHaar := by
+ rw [Basis.addHaar]; exact measure.is_add_haar_measure_add_haar_measure _
#align is_add_haar_measure_basis_add_haar isAddHaarMeasure_basis_addHaar
-theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 :=
- by
- rw [Basis.addHaar]
- exact add_haar_measure_self
+theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
+ rw [Basis.addHaar]; exact add_haar_measure_self
#align basis.add_haar_self Basis.addHaar_self
end NormedSpace
mathlib commit https://github.com/leanprover-community/mathlib/commit/f51de8769c34652d82d1c8e5f8f18f8374782bed
@@ -3,12 +3,12 @@ Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-! This file was ported from Lean 3 source module measure_theory.measure.haar_of_basis
-! leanprover-community/mathlib commit 4b884eff88bf72d32496b0bc7cc0bfccce77f2fa
+! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
+! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
-import Mathbin.MeasureTheory.Measure.Haar
+import Mathbin.MeasureTheory.Measure.Haar.Basic
import Mathbin.Analysis.InnerProductSpace.PiL2
/-!
@@ -22,7 +22,7 @@ nonempty interior.
* `Basis.addHaar` is the Lebesgue measure associated to a basis, giving measure `1` to the
corresponding parallelepiped.
-In particular, we declare a `measure_space` instance on any finite-dimensional inner product space,
+In particular, we declare a `MeasureSpace` instance on any finite-dimensional inner product space,
by using the Lebesgue measure associated to some orthonormal basis (which is in fact independent
of the basis).
-/
@@ -324,7 +324,7 @@ instance Real.measureSpace : MeasureSpace ℝ := by infer_instance
/-! # Miscellaneous instances for `EuclideanSpace`
-In combination with `measureSpaceOfInnerProductSpace`, these put a `measure_space` structure
+In combination with `measureSpaceOfInnerProductSpace`, these put a `MeasureSpace` structure
on `EuclideanSpace`. -/
Zspan.fundamentalDomain_ae_parallelepiped
(#11321)
Prove that the fundamental domain of a ℤ
-lattice is almost equal to the corresponding parallelepiped. This is useful because many results in measure theory use the parallelepiped associated to a basis.
Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>
@@ -54,6 +54,16 @@ theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
simp [parallelepiped, eq_comm]
#align mem_parallelepiped_iff mem_parallelepiped_iff
+theorem parallelepiped_basis_eq (b : Basis ι ℝ E) :
+ parallelepiped b = {x | ∀ i, b.repr x i ∈ Set.Icc 0 1} := by
+ classical
+ ext x
+ simp_rw [mem_parallelepiped_iff, mem_setOf_eq, b.ext_elem_iff, _root_.map_sum,
+ _root_.map_smul, Finset.sum_apply', Basis.repr_self, Finsupp.smul_single, smul_eq_mul,
+ mul_one, Finsupp.single_apply, Finset.sum_ite_eq', Finset.mem_univ, ite_true, mem_Icc,
+ Pi.le_def, Pi.zero_apply, Pi.one_apply, ← forall_and]
+ aesop
+
theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
f '' parallelepiped v = parallelepiped (f ∘ v) := by
simp only [parallelepiped, ← image_comp]
mul
-div
cancellation lemmas (#11530)
Lemma names around cancellation of multiplication and division are a mess.
This PR renames a handful of them according to the following table (each big row contains the multiplicative statement, then the three rows contain the GroupWithZero
lemma name, the Group
lemma, the AddGroup
lemma name).
| Statement | New name | Old name | |
@@ -168,7 +168,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
rcases eq_or_ne (a i) 0 with hai | hai
· rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
rw [hai, ← h, zero_div, zero_mul]
- · rw [div_mul_cancel _ hai]
+ · rw [div_mul_cancel₀ _ hai]
#align parallelepiped_single parallelepiped_single
end AddCommGroup
Fintype
/Finite
(#11428)
Also rename *lpBcf
to *lpBCF
and drop 2 duplicate instances.
@@ -34,7 +34,11 @@ open scoped BigOperators Pointwise
noncomputable section
-variable {ι ι' E F : Type*} [Fintype ι] [Fintype ι']
+variable {ι ι' E F : Type*}
+
+section Fintype
+
+variable [Fintype ι] [Fintype ι']
section AddCommGroup
@@ -288,6 +292,8 @@ theorem Basis.prod_addHaar (v : Basis ι ℝ E) (w : Basis ι' ℝ F) :
end NormedSpace
+end Fintype
+
/-- A finite dimensional inner product space has a canonical measure, the Lebesgue measure giving
volume `1` to the parallelepiped spanned by any orthonormal basis. We define the measure using
some arbitrary choice of orthonormal basis. The fact that it works with any orthonormal basis
@@ -319,7 +325,7 @@ variable (ι)
-- TODO: do we want these instances for `PiLp` too?
instance : MeasurableSpace (EuclideanSpace ℝ ι) := MeasurableSpace.pi
-instance : BorelSpace (EuclideanSpace ℝ ι) := Pi.borelSpace
+instance [Finite ι] : BorelSpace (EuclideanSpace ℝ ι) := Pi.borelSpace
/-- `WithLp.equiv` as a `MeasurableEquiv`. -/
@[simps toEquiv]
This is a very large PR, but it has been reviewed piecemeal already in PRs to the bump/v4.7.0
branch as we update to intermediate nightlies.
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Kyle Miller <kmill31415@gmail.com> Co-authored-by: damiano <adomani@gmail.com>
@@ -66,7 +66,7 @@ theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
have : Icc (0 : ι → ℝ) 1 = K '' Icc (0 : ι' → ℝ) 1 := by
rw [← Equiv.preimage_eq_iff_eq_image]
ext x
- simp only [mem_preimage, mem_Icc, Pi.le_def, Pi.zero_apply, Equiv.piCongrLeft'_apply,
+ simp only [K, mem_preimage, mem_Icc, Pi.le_def, Pi.zero_apply, Equiv.piCongrLeft'_apply,
Pi.one_apply]
refine'
⟨fun h => ⟨fun i => _, fun i => _⟩, fun h =>
@@ -77,7 +77,7 @@ theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
congr 1 with x
have := fun z : ι' → ℝ => e.symm.sum_comp fun i => z i • v (e i)
simp_rw [Equiv.apply_symm_apply] at this
- simp_rw [Function.comp_apply, mem_image, mem_Icc, Equiv.piCongrLeft'_apply, this]
+ simp_rw [Function.comp_apply, mem_image, mem_Icc, K, Equiv.piCongrLeft'_apply, this]
#align parallelepiped_comp_equiv parallelepiped_comp_equiv
-- The parallelepiped associated to an orthonormal basis of `ℝ` is either `[0, 1]` or `[-1, 0]`.
@@ -107,7 +107,7 @@ theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ι ℝ ℝ
← image_comp, Function.comp_apply, image_id', ge_iff_le, zero_le_one, not_true, gt_iff_lt]
· right
simp_rw [H, parallelepiped, Algebra.id.smul_eq_mul, A]
- simp only [Finset.univ_unique, Fin.default_eq_zero, mul_neg, mul_one, Finset.sum_neg_distrib,
+ simp only [F, Finset.univ_unique, Fin.default_eq_zero, mul_neg, mul_one, Finset.sum_neg_distrib,
Finset.sum_singleton, ← image_comp, Function.comp, image_neg, preimage_neg_Icc, neg_zero]
#align parallelepiped_orthonormal_basis_one_dim parallelepiped_orthonormalBasis_one_dim
@@ -214,6 +214,7 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
#align basis.parallelepiped_map Basis.parallelepiped_map
+set_option tactic.skipAssignedInstances false in
theorem Basis.prod_parallelepiped (v : Basis ι ℝ E) (w : Basis ι' ℝ F) :
(v.prod w).parallelepiped = v.parallelepiped.prod w.parallelepiped := by
ext x
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -180,8 +180,8 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E where
(continuous_finset_sum Finset.univ fun (i : ι) (_H : i ∈ Finset.univ) =>
(continuous_apply i).smul continuous_const)
interior_nonempty' := by
- suffices H : Set.Nonempty (interior (b.equivFunL.symm.toHomeomorph '' Icc 0 1))
- · dsimp only [_root_.parallelepiped]
+ suffices H : Set.Nonempty (interior (b.equivFunL.symm.toHomeomorph '' Icc 0 1)) by
+ dsimp only [_root_.parallelepiped]
convert H
exact (b.equivFun_symm_apply _).symm
have A : Set.Nonempty (interior (Icc (0 : ι → ℝ) 1)) := by
@@ -214,6 +214,36 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
#align basis.parallelepiped_map Basis.parallelepiped_map
+theorem Basis.prod_parallelepiped (v : Basis ι ℝ E) (w : Basis ι' ℝ F) :
+ (v.prod w).parallelepiped = v.parallelepiped.prod w.parallelepiped := by
+ ext x
+ simp only [Basis.coe_parallelepiped, TopologicalSpace.PositiveCompacts.coe_prod, Set.mem_prod,
+ mem_parallelepiped_iff]
+ constructor
+ · intro h
+ rcases h with ⟨t, ht1, ht2⟩
+ constructor
+ · use t ∘ Sum.inl
+ constructor
+ · exact ⟨(ht1.1 <| Sum.inl ·), (ht1.2 <| Sum.inl ·)⟩
+ simp [ht2, Prod.fst_sum, Prod.snd_sum]
+ · use t ∘ Sum.inr
+ constructor
+ · exact ⟨(ht1.1 <| Sum.inr ·), (ht1.2 <| Sum.inr ·)⟩
+ simp [ht2, Prod.fst_sum, Prod.snd_sum]
+ intro h
+ rcases h with ⟨⟨t, ht1, ht2⟩, ⟨s, hs1, hs2⟩⟩
+ use Sum.elim t s
+ constructor
+ · constructor
+ · change ∀ x : ι ⊕ ι', 0 ≤ Sum.elim t s x
+ aesop
+ · change ∀ x : ι ⊕ ι', Sum.elim t s x ≤ 1
+ aesop
+ ext
+ · simp [ht2, Prod.fst_sum]
+ · simp [hs2, Prod.snd_sum]
+
variable [MeasurableSpace E] [BorelSpace E]
/-- The Lebesgue measure associated to a basis, giving measure `1` to the parallelepiped spanned
@@ -226,8 +256,8 @@ instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure
rw [Basis.addHaar]; exact Measure.isAddHaarMeasure_addHaarMeasure _
#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
-instance [SecondCountableTopology E] (b : Basis ι ℝ E) :
- SigmaFinite b.addHaar := by
+instance (b : Basis ι ℝ E) : SigmaFinite b.addHaar := by
+ have : FiniteDimensional ℝ E := FiniteDimensional.of_fintype_basis b
rw [Basis.addHaar_def]; exact sigmaFinite_addHaarMeasure
/-- Let `μ` be a σ-finite left invariant measure on `E`. Then `μ` is equal to the Haar measure
@@ -247,6 +277,14 @@ theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (_root_.parallelepip
rw [Basis.addHaar]; exact addHaarMeasure_self
#align basis.add_haar_self Basis.addHaar_self
+variable [MeasurableSpace F] [BorelSpace F] [SecondCountableTopologyEither E F]
+
+theorem Basis.prod_addHaar (v : Basis ι ℝ E) (w : Basis ι' ℝ F) :
+ (v.prod w).addHaar = v.addHaar.prod w.addHaar := by
+ have : FiniteDimensional ℝ E := FiniteDimensional.of_fintype_basis v
+ have : FiniteDimensional ℝ F := FiniteDimensional.of_fintype_basis w
+ simp [(v.prod w).addHaar_eq_iff, Basis.prod_parallelepiped, Basis.addHaar_self]
+
end NormedSpace
/-- A finite dimensional inner product space has a canonical measure, the Lebesgue measure giving
Nonempty
arguments (#9377)
Finset.Nonempty.image_iff
to Finset.image_nonempty
, deprecate the old version;Set.nonempty_image_iff
to Set.image_nonempty
, deprecate the old version;Finset.Nonempty
arguments here and there;Nonempty s
instead of Nonempty (s.image f)
or Nonempty (s.map f)
.@@ -188,7 +188,7 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E where
rw [← pi_univ_Icc, interior_pi_set (@finite_univ ι _)]
simp only [univ_pi_nonempty_iff, Pi.zero_apply, Pi.one_apply, interior_Icc, nonempty_Ioo,
zero_lt_one, imp_true_iff]
- rwa [← Homeomorph.image_interior, nonempty_image_iff]
+ rwa [← Homeomorph.image_interior, image_nonempty]
#align basis.parallelepiped Basis.parallelepiped
@[simp]
∃ x ∈ s, _
instead of ∃ (x) (_ : x ∈ s), _
(#9184)
Search for [∀∃].*(_
and manually replace some occurrences with more readable versions.
In case of ∀
, the new expressions are defeq to the old ones.
In case of ∃
, they differ by exists_prop
.
In some rare cases, golf proofs that needed fixing.
@@ -46,7 +46,7 @@ def parallelepiped (v : ι → E) : Set E :=
#align parallelepiped parallelepiped
theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
- x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ) (_ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
+ x ∈ parallelepiped v ↔ ∃ t ∈ Icc (0 : ι → ℝ) 1, x = ∑ i, t i • v i := by
simp [parallelepiped, eq_comm]
#align mem_parallelepiped_iff mem_parallelepiped_iff
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
.
@@ -146,7 +146,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
· rintro ⟨t, ht, rfl⟩ i
specialize ht i
simp_rw [smul_eq_mul, Pi.mul_apply]
- cases' le_total (a i) 0 with hai hai
+ rcases le_total (a i) 0 with hai | hai
· rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai]
exact ⟨le_mul_of_le_one_left hai ht.2, mul_nonpos_of_nonneg_of_nonpos ht.1 hai⟩
· rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai]
@@ -154,14 +154,14 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
· intro h
refine' ⟨fun i => x i / a i, fun i => _, funext fun i => _⟩
· specialize h i
- cases' le_total (a i) 0 with hai hai
+ rcases le_total (a i) 0 with hai | hai
· rw [sup_eq_left.mpr hai, inf_eq_right.mpr hai] at h
exact ⟨div_nonneg_of_nonpos h.2 hai, div_le_one_of_ge h.1 hai⟩
· rw [sup_eq_right.mpr hai, inf_eq_left.mpr hai] at h
exact ⟨div_nonneg h.1 hai, div_le_one_of_le h.2 hai⟩
· specialize h i
simp only [smul_eq_mul, Pi.mul_apply]
- cases' eq_or_ne (a i) 0 with hai hai
+ rcases eq_or_ne (a i) 0 with hai | hai
· rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
rw [hai, ← h, zero_div, zero_mul]
· rw [div_mul_cancel _ hai]
[@foo](https://github.com/foo) _ _ _ _ _ ...
by named arguments (#8702)
Using Lean4's named arguments, we manage to remove a few hard-to-read explicit function calls [@foo](https://github.com/foo) _ _ _ _ _ ...
which used to be necessary in Lean3.
Occasionally, this results in slightly longer code. The benefit of named arguments is readability, as well as to reduce the brittleness of the code when the argument order is changed.
Co-authored-by: Michael Rothgang <rothgami@math.hu-berlin.de>
@@ -207,11 +207,10 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
(b.map e).parallelepiped = b.parallelepiped.map e
(have := FiniteDimensional.of_fintype_basis b
-- Porting note: Lean cannot infer the instance above
- @LinearMap.continuous_of_finiteDimensional _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ this (e.toLinearMap))
+ LinearMap.continuous_of_finiteDimensional e.toLinearMap)
(have := FiniteDimensional.of_fintype_basis (b.map e)
-- Porting note: Lean cannot infer the instance above
- @LinearMap.isOpenMap_of_finiteDimensional _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ this _
- e.surjective) :=
+ LinearMap.isOpenMap_of_finiteDimensional _ e.surjective) :=
PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
#align basis.parallelepiped_map Basis.parallelepiped_map
@@ -54,7 +54,7 @@ theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
f '' parallelepiped v = parallelepiped (f ∘ v) := by
simp only [parallelepiped, ← image_comp]
congr 1 with t
- simp only [Function.comp_apply, map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
+ simp only [Function.comp_apply, _root_.map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
#align image_parallelepiped image_parallelepiped
/-- Reindexing a family of vectors does not change their parallelepiped. -/
@@ -193,7 +193,7 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E where
@[simp]
theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
- (b.parallelepiped : Set E) = _root_.parallelepiped b := rfl
+ (b.parallelepiped : Set E) = _root_.parallelepiped b := rfl
#align basis.coe_parallelepiped Basis.coe_parallelepiped
@[simp]
_root_.map_sum
more consistently (#7189)
Also _root_.map_smul
when in the neighbourhood.
@@ -54,7 +54,7 @@ theorem image_parallelepiped (f : E →ₗ[ℝ] F) (v : ι → E) :
f '' parallelepiped v = parallelepiped (f ∘ v) := by
simp only [parallelepiped, ← image_comp]
congr 1 with t
- simp only [Function.comp_apply, LinearMap.map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
+ simp only [Function.comp_apply, map_sum, LinearMap.map_smulₛₗ, RingHom.id_apply]
#align image_parallelepiped image_parallelepiped
/-- Reindexing a family of vectors does not change their parallelepiped. -/
We prove that the two MeasureSpace
structures on $\mathbb{R}^\iota$, the one coming from its identification with ι→ ℝ
and the one coming from EuclideanSpace ℝ ι
, agree in the sense that the measure equivalence between the two corresponding volumes is measure preserving.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -294,4 +294,7 @@ protected def measurableEquiv : EuclideanSpace ℝ ι ≃ᵐ (ι → ℝ) where
theorem coe_measurableEquiv : ⇑(EuclideanSpace.measurableEquiv ι) = WithLp.equiv 2 _ := rfl
#align euclidean_space.coe_measurable_equiv EuclideanSpace.coe_measurableEquiv
+theorem coe_measurableEquiv_symm :
+ ⇑(EuclideanSpace.measurableEquiv ι).symm = (WithLp.equiv 2 _).symm := rfl
+
end EuclideanSpace
A linter that throws on seeing a colon at the start of a line, according to the style guideline that says these operators should go before linebreaks.
@@ -210,8 +210,9 @@ theorem Basis.parallelepiped_map (b : Basis ι ℝ E) (e : E ≃ₗ[ℝ] F) :
@LinearMap.continuous_of_finiteDimensional _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ this (e.toLinearMap))
(have := FiniteDimensional.of_fintype_basis (b.map e)
-- Porting note: Lean cannot infer the instance above
- @LinearMap.isOpenMap_of_finiteDimensional _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ this _ e.surjective)
- := PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
+ @LinearMap.isOpenMap_of_finiteDimensional _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ this _
+ e.surjective) :=
+ PositiveCompacts.ext (image_parallelepiped e.toLinearMap _).symm
#align basis.parallelepiped_map Basis.parallelepiped_map
variable [MeasurableSpace E] [BorelSpace E]
We prove some lemmas that will be useful in following PRs #6832 and #7037, mainly:
theorem Basis.addHaar_eq {b : Basis ι ℝ E} {b' : Basis ι' ℝ E} :
b.addHaar = b'.addHaar ↔ b.addHaar b'.parallelepiped = 1
theorem Basis.parallelepiped_eq_map (b : Basis ι ℝ E) :
b.parallelepiped = (TopologicalSpace.PositiveCompacts.piIcc01 ι).map b.equivFun.symm
b.equivFunL.symm.continuous
theorem Basis.addHaar_map (b : Basis ι ℝ E) (f : E ≃L[ℝ] F) :
map f b.addHaar = (b.map f.toLinearEquiv).addHaar
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -226,6 +226,23 @@ instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure
rw [Basis.addHaar]; exact Measure.isAddHaarMeasure_addHaarMeasure _
#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
+instance [SecondCountableTopology E] (b : Basis ι ℝ E) :
+ SigmaFinite b.addHaar := by
+ rw [Basis.addHaar_def]; exact sigmaFinite_addHaarMeasure
+
+/-- Let `μ` be a σ-finite left invariant measure on `E`. Then `μ` is equal to the Haar measure
+defined by `b` iff the parallelepiped defined by `b` has measure `1` for `μ`. -/
+theorem Basis.addHaar_eq_iff [SecondCountableTopology E] (b : Basis ι ℝ E) (μ : Measure E)
+ [SigmaFinite μ] [IsAddLeftInvariant μ] :
+ b.addHaar = μ ↔ μ b.parallelepiped = 1 := by
+ rw [Basis.addHaar_def]
+ exact addHaarMeasure_eq_iff b.parallelepiped μ
+
+@[simp]
+theorem Basis.addHaar_reindex (b : Basis ι ℝ E) (e : ι ≃ ι') :
+ (b.reindex e).addHaar = b.addHaar := by
+ rw [Basis.addHaar, b.parallelepiped_reindex e, ← Basis.addHaar]
+
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (_root_.parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact addHaarMeasure_self
#align basis.add_haar_self Basis.addHaar_self
This removes the (PiLp.equiv 2 fun i => α i)
abbreviation, replacing it with its implementation (WithLp.equiv 2 (∀ i, α i))
. The same thing is done for PiLp.linearEquiv
.
@@ -265,15 +265,15 @@ instance : MeasurableSpace (EuclideanSpace ℝ ι) := MeasurableSpace.pi
instance : BorelSpace (EuclideanSpace ℝ ι) := Pi.borelSpace
-/-- `PiLp.equiv` as a `MeasurableEquiv`. -/
+/-- `WithLp.equiv` as a `MeasurableEquiv`. -/
@[simps toEquiv]
protected def measurableEquiv : EuclideanSpace ℝ ι ≃ᵐ (ι → ℝ) where
- toEquiv := PiLp.equiv _ _
+ toEquiv := WithLp.equiv _ _
measurable_toFun := measurable_id
measurable_invFun := measurable_id
#align euclidean_space.measurable_equiv EuclideanSpace.measurableEquiv
-theorem coe_measurableEquiv : ⇑(EuclideanSpace.measurableEquiv ι) = PiLp.equiv 2 _ := rfl
+theorem coe_measurableEquiv : ⇑(EuclideanSpace.measurableEquiv ι) = WithLp.equiv 2 _ := rfl
#align euclidean_space.coe_measurable_equiv EuclideanSpace.coe_measurableEquiv
end EuclideanSpace
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -163,7 +163,7 @@ theorem parallelepiped_single [DecidableEq ι] (a : ι → ℝ) :
simp only [smul_eq_mul, Pi.mul_apply]
cases' eq_or_ne (a i) 0 with hai hai
· rw [hai, inf_idem, sup_idem, ← le_antisymm_iff] at h
- rw [hai, ← h, zero_div, MulZeroClass.zero_mul]
+ rw [hai, ← h, zero_div, zero_mul]
· rw [div_mul_cancel _ hai]
#align parallelepiped_single parallelepiped_single
@@ -77,8 +77,7 @@ theorem parallelepiped_comp_equiv (v : ι → E) (e : ι' ≃ ι) :
congr 1 with x
have := fun z : ι' → ℝ => e.symm.sum_comp fun i => z i • v (e i)
simp_rw [Equiv.apply_symm_apply] at this
- simp_rw [Function.comp_apply, ge_iff_le, zero_le_one, not_true, gt_iff_lt, mem_image, mem_Icc,
- Equiv.piCongrLeft'_apply, this]
+ simp_rw [Function.comp_apply, mem_image, mem_Icc, Equiv.piCongrLeft'_apply, this]
#align parallelepiped_comp_equiv parallelepiped_comp_equiv
-- The parallelepiped associated to an orthonormal basis of `ℝ` is either `[0, 1]` or `[-1, 0]`.
@@ -107,7 +106,7 @@ theorem parallelepiped_orthonormalBasis_one_dim (b : OrthonormalBasis ι ℝ ℝ
simp only [Finset.univ_unique, Fin.default_eq_zero, smul_eq_mul, mul_one, Finset.sum_singleton,
← image_comp, Function.comp_apply, image_id', ge_iff_le, zero_le_one, not_true, gt_iff_lt]
· right
- simp_rw [H, parallelepiped, Algebra.id.smul_eq_mul, mul_one, A]
+ simp_rw [H, parallelepiped, Algebra.id.smul_eq_mul, A]
simp only [Finset.univ_unique, Fin.default_eq_zero, mul_neg, mul_one, Finset.sum_neg_distrib,
Finset.sum_singleton, ← image_comp, Function.comp, image_neg, preimage_neg_Icc, neg_zero]
#align parallelepiped_orthonormal_basis_one_dim parallelepiped_orthonormalBasis_one_dim
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -34,7 +34,7 @@ open scoped BigOperators Pointwise
noncomputable section
-variable {ι ι' E F : Type _} [Fintype ι] [Fintype ι']
+variable {ι ι' E F : Type*} [Fintype ι] [Fintype ι']
section AddCommGroup
@@ -2,15 +2,12 @@
Copyright (c) 2022 Sébastien Gouëzel. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
-
-! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
-! leanprover-community/mathlib commit 92bd7b1ffeb306a89f450bee126ddd8a284c259d
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.InnerProductSpace.PiL2
+#align_import measure_theory.measure.haar.of_basis from "leanprover-community/mathlib"@"92bd7b1ffeb306a89f450bee126ddd8a284c259d"
+
/-!
# Additive Haar measure constructed from a basis
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Sébastien Gouëzel
! This file was ported from Lean 3 source module measure_theory.measure.haar.of_basis
-! leanprover-community/mathlib commit fd5edc43dc4f10b85abfe544b88f82cf13c5f844
+! leanprover-community/mathlib commit 92bd7b1ffeb306a89f450bee126ddd8a284c259d
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -130,24 +130,13 @@ theorem parallelepiped_eq_sum_segment (v : ι → E) : parallelepiped v = ∑ i,
theorem convex_parallelepiped (v : ι → E) : Convex ℝ (parallelepiped v) := by
rw [parallelepiped_eq_sum_segment]
- -- TODO: add `convex.sum` to match `Convex.add`
- let A : AddSubmonoid (Set E) :=
- { carrier := { s | Convex ℝ s }
- zero_mem' := convex_singleton _
- add_mem' := Convex.add }
- refine A.sum_mem (fun i _hi => convex_segment _ _)
+ exact convex_sum _ fun _i _hi => convex_segment _ _
#align convex_parallelepiped convex_parallelepiped
/-- A `parallelepiped` is the convex hull of its vertices -/
theorem parallelepiped_eq_convexHull (v : ι → E) :
parallelepiped v = convexHull ℝ (∑ i, {(0 : E), v i}) := by
- -- TODO: add `convex_hull_sum` to match `convexHull_add`
- let A : Set E →+ Set E :=
- { toFun := convexHull ℝ
- map_zero' := convexHull_singleton _
- map_add' := convexHull_add }
- simp_rw [parallelepiped_eq_sum_segment, ← convexHull_pair]
- exact (A.map_sum _ _).symm
+ simp_rw [convexHull_sum, convexHull_pair, parallelepiped_eq_sum_segment]
#align parallelepiped_eq_convex_hull parallelepiped_eq_convexHull
/-- The axis aligned parallelepiped over `ι → ℝ` is a cuboid. -/
@@ -206,11 +206,10 @@ def Basis.parallelepiped (b : Basis ι ℝ E) : PositiveCompacts E where
rwa [← Homeomorph.image_interior, nonempty_image_iff]
#align basis.parallelepiped Basis.parallelepiped
--- Porting note: lint complains that this result is a tautology and thus unnecessary
--- @[simp]
--- theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
--- (b.parallelepiped : Set E) = parallelepiped b := rfl
--- #align basis.coe_parallelepiped Basis.coe_parallelepiped
+@[simp]
+theorem Basis.coe_parallelepiped (b : Basis ι ℝ E) :
+ (b.parallelepiped : Set E) = _root_.parallelepiped b := rfl
+#align basis.coe_parallelepiped Basis.coe_parallelepiped
@[simp]
theorem Basis.parallelepiped_reindex (b : Basis ι ℝ E) (e : ι ≃ ι') :
@@ -242,7 +241,7 @@ instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure
rw [Basis.addHaar]; exact Measure.isAddHaarMeasure_addHaarMeasure _
#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
-theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
+theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (_root_.parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact addHaarMeasure_self
#align basis.add_haar_self Basis.addHaar_self
@@ -49,7 +49,7 @@ def parallelepiped (v : ι → E) : Set E :=
#align parallelepiped parallelepiped
theorem mem_parallelepiped_iff (v : ι → E) (x : E) :
- x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ)(_ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
+ x ∈ parallelepiped v ↔ ∃ (t : ι → ℝ) (_ht : t ∈ Icc (0 : ι → ℝ) 1), x = ∑ i, t i • v i := by
simp [parallelepiped, eq_comm]
#align mem_parallelepiped_iff mem_parallelepiped_iff
@@ -257,7 +257,7 @@ instance (priority := 100) measureSpaceOfInnerProductSpace [NormedAddCommGroup E
MeasureSpace E where volume := (stdOrthonormalBasis ℝ E).toBasis.addHaar
#align measure_space_of_inner_product_space measureSpaceOfInnerProductSpace
-instance IsAddHaarMeasure [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
+instance [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
[MeasurableSpace E] [BorelSpace E] : IsAddHaarMeasure (volume : Measure E) :=
IsAddHaarMeasure_basis_addHaar _
volume
(#4628)
Lean 3 was able to apply, e.g., instances about measure_theory.measure.prod
to the volume on the Cartesian product. Lean 4 can't do this, so we need to duplicate many instances.
Co-authored-by: Jeremy Tan Jie Rui <reddeloostw@gmail.com> Co-authored-by: Komyyy <pol_tta@outlook.jp>
@@ -257,6 +257,10 @@ instance (priority := 100) measureSpaceOfInnerProductSpace [NormedAddCommGroup E
MeasureSpace E where volume := (stdOrthonormalBasis ℝ E).toBasis.addHaar
#align measure_space_of_inner_product_space measureSpaceOfInnerProductSpace
+instance IsAddHaarMeasure [NormedAddCommGroup E] [InnerProductSpace ℝ E] [FiniteDimensional ℝ E]
+ [MeasurableSpace E] [BorelSpace E] : IsAddHaarMeasure (volume : Measure E) :=
+ IsAddHaarMeasure_basis_addHaar _
+
/- This instance should not be necessary, but Lean has difficulties to find it in product
situations if we do not declare it explicitly. -/
instance Real.measureSpace : MeasureSpace ℝ := by infer_instance
Is
of Foo
which is ported from is_foo
(#4639)
I have misported is_foo
to Foo
because I misunderstood the rule for IsLawfulFoo
.
This PR recover Is
of Foo
which is ported from is_foo
.
This PR also renames some misported theorems.
@@ -238,10 +238,9 @@ irreducible_def Basis.addHaar (b : Basis ι ℝ E) : Measure E :=
Measure.addHaarMeasure b.parallelepiped
#align basis.add_haar Basis.addHaar
--- Porting note: `is_add_haar_measure` is now called `AddHaarMeasure` in Mathlib4
-instance AddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : AddHaarMeasure b.addHaar := by
- rw [Basis.addHaar]; exact Measure.addHaarMeasure_addHaarMeasure _
-#align is_add_haar_measure_basis_add_haar AddHaarMeasure_basis_addHaar
+instance IsAddHaarMeasure_basis_addHaar (b : Basis ι ℝ E) : IsAddHaarMeasure b.addHaar := by
+ rw [Basis.addHaar]; exact Measure.isAddHaarMeasure_addHaarMeasure _
+#align is_add_haar_measure_basis_add_haar IsAddHaarMeasure_basis_addHaar
theorem Basis.addHaar_self (b : Basis ι ℝ E) : b.addHaar (parallelepiped b) = 1 := by
rw [Basis.addHaar]; exact addHaarMeasure_self
The unported dependencies are
algebra.order.module
init.core
linear_algebra.free_module.finite.rank
algebra.order.monoid.cancel.defs
algebra.abs
algebra.group_power.lemmas
init.data.list.basic
linear_algebra.free_module.rank
algebra.order.monoid.cancel.basic
init.data.list.default
topology.subset_properties
init.logic
The following 1 dependencies have changed in mathlib3 since they were ported, which may complicate porting this file