Context stringlengths 57 6.04k | file_name stringlengths 21 79 | start int64 14 1.49k | end int64 18 1.5k | theorem stringlengths 25 1.55k | proof stringlengths 5 7.36k | rank int64 0 2.4k |
|---|---|---|---|---|---|---|
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section Conformality
open Complex ContinuousLinearMap
open scoped ComplexConjugate
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] {z : ℂ} {f : ℂ → E}
| Mathlib/Analysis/Complex/RealDeriv.lean | 162 | 166 | theorem DifferentiableAt.conformalAt (h : DifferentiableAt ℂ f z) (hf' : deriv f z ≠ 0) :
ConformalAt f z := by |
rw [conformalAt_iff_isConformalMap_fderiv, (h.hasFDerivAt.restrictScalars ℝ).fderiv]
apply isConformalMap_complex_linear
simpa only [Ne, ext_ring_iff]
| 1,872 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.Calculus.Deriv.Linear
import Mathlib.Analysis.Complex.Conformal
import Mathlib.Analysis.Calculus.Conformal.NormedSpace
#align_import analysis.complex.real_deriv from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
section Conformality
open Complex ContinuousLinearMap
open scoped ComplexConjugate
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace ℂ E] {z : ℂ} {f : ℂ → E}
theorem DifferentiableAt.conformalAt (h : DifferentiableAt ℂ f z) (hf' : deriv f z ≠ 0) :
ConformalAt f z := by
rw [conformalAt_iff_isConformalMap_fderiv, (h.hasFDerivAt.restrictScalars ℝ).fderiv]
apply isConformalMap_complex_linear
simpa only [Ne, ext_ring_iff]
#align differentiable_at.conformal_at DifferentiableAt.conformalAt
| Mathlib/Analysis/Complex/RealDeriv.lean | 171 | 185 | theorem conformalAt_iff_differentiableAt_or_differentiableAt_comp_conj {f : ℂ → ℂ} {z : ℂ} :
ConformalAt f z ↔
(DifferentiableAt ℂ f z ∨ DifferentiableAt ℂ (f ∘ conj) (conj z)) ∧ fderiv ℝ f z ≠ 0 := by |
rw [conformalAt_iff_isConformalMap_fderiv]
rw [isConformalMap_iff_is_complex_or_conj_linear]
apply and_congr_left
intro h
have h_diff := h.imp_symm fderiv_zero_of_not_differentiableAt
apply or_congr
· rw [differentiableAt_iff_restrictScalars ℝ h_diff]
rw [← conj_conj z] at h_diff
rw [differentiableAt_iff_restrictScalars ℝ (h_diff.comp _ conjCLE.differentiableAt)]
refine exists_congr fun g => rfl.congr ?_
have : fderiv ℝ conj (conj z) = _ := conjCLE.fderiv
simp [fderiv.comp _ h_diff conjCLE.differentiableAt, this, conj_conj]
| 1,872 |
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Measure.Haar.Unique
open MeasureTheory Measure Set
open scoped ENNReal
variable {𝕜 E F : Type*}
[NontriviallyNormedField 𝕜] [CompleteSpace 𝕜]
[NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] [NormedSpace 𝕜 E]
[NormedAddCommGroup F] [MeasurableSpace F] [BorelSpace F] [NormedSpace 𝕜 F] {L : E →ₗ[𝕜] F}
{μ : Measure E} {ν : Measure F}
[IsAddHaarMeasure μ] [IsAddHaarMeasure ν]
variable [LocallyCompactSpace E]
variable (L μ ν)
| Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean | 42 | 102 | theorem LinearMap.exists_map_addHaar_eq_smul_addHaar' (h : Function.Surjective L) :
∃ (c : ℝ≥0∞), 0 < c ∧ c < ∞ ∧ μ.map L = (c * addHaar (univ : Set (LinearMap.ker L))) • ν := by |
/- This is true for the second projection in product spaces, as the projection of the Haar
measure `μS.prod μT` is equal to the Haar measure `μT` multiplied by the total mass of `μS`. This
is also true for linear equivalences, as they map Haar measure to Haar measure. The general case
follows from these two and linear algebra, as `L` can be interpreted as the composition of the
projection `P` on a complement `T` to its kernel `S`, together with a linear equivalence. -/
have : ProperSpace E := .of_locallyCompactSpace 𝕜
have : FiniteDimensional 𝕜 E := .of_locallyCompactSpace 𝕜
have : ProperSpace F := by
rcases subsingleton_or_nontrivial E with hE|hE
· have : Subsingleton F := Function.Surjective.subsingleton h
infer_instance
· have : ProperSpace 𝕜 := .of_locallyCompact_module 𝕜 E
have : FiniteDimensional 𝕜 F := Module.Finite.of_surjective L h
exact FiniteDimensional.proper 𝕜 F
let S : Submodule 𝕜 E := LinearMap.ker L
obtain ⟨T, hT⟩ : ∃ T : Submodule 𝕜 E, IsCompl S T := Submodule.exists_isCompl S
let M : (S × T) ≃ₗ[𝕜] E := Submodule.prodEquivOfIsCompl S T hT
have M_cont : Continuous M.symm := LinearMap.continuous_of_finiteDimensional _
let P : S × T →ₗ[𝕜] T := LinearMap.snd 𝕜 S T
have P_cont : Continuous P := LinearMap.continuous_of_finiteDimensional _
have I : Function.Bijective (LinearMap.domRestrict L T) :=
⟨LinearMap.injective_domRestrict_iff.2 (IsCompl.inf_eq_bot hT.symm),
(LinearMap.surjective_domRestrict_iff h).2 hT.symm.sup_eq_top⟩
let L' : T ≃ₗ[𝕜] F := LinearEquiv.ofBijective (LinearMap.domRestrict L T) I
have L'_cont : Continuous L' := LinearMap.continuous_of_finiteDimensional _
have A : L = (L' : T →ₗ[𝕜] F).comp (P.comp (M.symm : E →ₗ[𝕜] (S × T))) := by
ext x
obtain ⟨y, z, hyz⟩ : ∃ (y : S) (z : T), M.symm x = (y, z) := ⟨_, _, rfl⟩
have : x = M (y, z) := by
rw [← hyz]; simp only [LinearEquiv.apply_symm_apply]
simp [L', P, M, this]
have I : μ.map L = ((μ.map M.symm).map P).map L' := by
rw [Measure.map_map, Measure.map_map, A]
· rfl
· exact L'_cont.measurable.comp P_cont.measurable
· exact M_cont.measurable
· exact L'_cont.measurable
· exact P_cont.measurable
let μS : Measure S := addHaar
let μT : Measure T := addHaar
obtain ⟨c₀, c₀_pos, c₀_fin, h₀⟩ :
∃ c₀ : ℝ≥0∞, c₀ ≠ 0 ∧ c₀ ≠ ∞ ∧ μ.map M.symm = c₀ • μS.prod μT := by
have : IsAddHaarMeasure (μ.map M.symm) :=
M.toContinuousLinearEquiv.symm.isAddHaarMeasure_map μ
refine ⟨addHaarScalarFactor (μ.map M.symm) (μS.prod μT), ?_, ENNReal.coe_ne_top,
isAddLeftInvariant_eq_smul _ _⟩
simpa only [ne_eq, ENNReal.coe_eq_zero] using
(addHaarScalarFactor_pos_of_isAddHaarMeasure (μ.map M.symm) (μS.prod μT)).ne'
have J : (μS.prod μT).map P = (μS univ) • μT := map_snd_prod
obtain ⟨c₁, c₁_pos, c₁_fin, h₁⟩ : ∃ c₁ : ℝ≥0∞, c₁ ≠ 0 ∧ c₁ ≠ ∞ ∧ μT.map L' = c₁ • ν := by
have : IsAddHaarMeasure (μT.map L') :=
L'.toContinuousLinearEquiv.isAddHaarMeasure_map μT
refine ⟨addHaarScalarFactor (μT.map L') ν, ?_, ENNReal.coe_ne_top,
isAddLeftInvariant_eq_smul _ _⟩
simpa only [ne_eq, ENNReal.coe_eq_zero] using
(addHaarScalarFactor_pos_of_isAddHaarMeasure (μT.map L') ν).ne'
refine ⟨c₀ * c₁, by simp [pos_iff_ne_zero, c₀_pos, c₁_pos], ENNReal.mul_lt_top c₀_fin c₁_fin, ?_⟩
simp only [I, h₀, Measure.map_smul, J, smul_smul, h₁]
rw [mul_assoc, mul_comm _ c₁, ← mul_assoc]
| 1,873 |
import Mathlib.MeasureTheory.Measure.Haar.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Measure.Haar.Unique
open MeasureTheory Measure Set
open scoped ENNReal
variable {𝕜 E F : Type*}
[NontriviallyNormedField 𝕜] [CompleteSpace 𝕜]
[NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] [NormedSpace 𝕜 E]
[NormedAddCommGroup F] [MeasurableSpace F] [BorelSpace F] [NormedSpace 𝕜 F] {L : E →ₗ[𝕜] F}
{μ : Measure E} {ν : Measure F}
[IsAddHaarMeasure μ] [IsAddHaarMeasure ν]
variable [LocallyCompactSpace E]
variable (L μ ν)
theorem LinearMap.exists_map_addHaar_eq_smul_addHaar' (h : Function.Surjective L) :
∃ (c : ℝ≥0∞), 0 < c ∧ c < ∞ ∧ μ.map L = (c * addHaar (univ : Set (LinearMap.ker L))) • ν := by
have : ProperSpace E := .of_locallyCompactSpace 𝕜
have : FiniteDimensional 𝕜 E := .of_locallyCompactSpace 𝕜
have : ProperSpace F := by
rcases subsingleton_or_nontrivial E with hE|hE
· have : Subsingleton F := Function.Surjective.subsingleton h
infer_instance
· have : ProperSpace 𝕜 := .of_locallyCompact_module 𝕜 E
have : FiniteDimensional 𝕜 F := Module.Finite.of_surjective L h
exact FiniteDimensional.proper 𝕜 F
let S : Submodule 𝕜 E := LinearMap.ker L
obtain ⟨T, hT⟩ : ∃ T : Submodule 𝕜 E, IsCompl S T := Submodule.exists_isCompl S
let M : (S × T) ≃ₗ[𝕜] E := Submodule.prodEquivOfIsCompl S T hT
have M_cont : Continuous M.symm := LinearMap.continuous_of_finiteDimensional _
let P : S × T →ₗ[𝕜] T := LinearMap.snd 𝕜 S T
have P_cont : Continuous P := LinearMap.continuous_of_finiteDimensional _
have I : Function.Bijective (LinearMap.domRestrict L T) :=
⟨LinearMap.injective_domRestrict_iff.2 (IsCompl.inf_eq_bot hT.symm),
(LinearMap.surjective_domRestrict_iff h).2 hT.symm.sup_eq_top⟩
let L' : T ≃ₗ[𝕜] F := LinearEquiv.ofBijective (LinearMap.domRestrict L T) I
have L'_cont : Continuous L' := LinearMap.continuous_of_finiteDimensional _
have A : L = (L' : T →ₗ[𝕜] F).comp (P.comp (M.symm : E →ₗ[𝕜] (S × T))) := by
ext x
obtain ⟨y, z, hyz⟩ : ∃ (y : S) (z : T), M.symm x = (y, z) := ⟨_, _, rfl⟩
have : x = M (y, z) := by
rw [← hyz]; simp only [LinearEquiv.apply_symm_apply]
simp [L', P, M, this]
have I : μ.map L = ((μ.map M.symm).map P).map L' := by
rw [Measure.map_map, Measure.map_map, A]
· rfl
· exact L'_cont.measurable.comp P_cont.measurable
· exact M_cont.measurable
· exact L'_cont.measurable
· exact P_cont.measurable
let μS : Measure S := addHaar
let μT : Measure T := addHaar
obtain ⟨c₀, c₀_pos, c₀_fin, h₀⟩ :
∃ c₀ : ℝ≥0∞, c₀ ≠ 0 ∧ c₀ ≠ ∞ ∧ μ.map M.symm = c₀ • μS.prod μT := by
have : IsAddHaarMeasure (μ.map M.symm) :=
M.toContinuousLinearEquiv.symm.isAddHaarMeasure_map μ
refine ⟨addHaarScalarFactor (μ.map M.symm) (μS.prod μT), ?_, ENNReal.coe_ne_top,
isAddLeftInvariant_eq_smul _ _⟩
simpa only [ne_eq, ENNReal.coe_eq_zero] using
(addHaarScalarFactor_pos_of_isAddHaarMeasure (μ.map M.symm) (μS.prod μT)).ne'
have J : (μS.prod μT).map P = (μS univ) • μT := map_snd_prod
obtain ⟨c₁, c₁_pos, c₁_fin, h₁⟩ : ∃ c₁ : ℝ≥0∞, c₁ ≠ 0 ∧ c₁ ≠ ∞ ∧ μT.map L' = c₁ • ν := by
have : IsAddHaarMeasure (μT.map L') :=
L'.toContinuousLinearEquiv.isAddHaarMeasure_map μT
refine ⟨addHaarScalarFactor (μT.map L') ν, ?_, ENNReal.coe_ne_top,
isAddLeftInvariant_eq_smul _ _⟩
simpa only [ne_eq, ENNReal.coe_eq_zero] using
(addHaarScalarFactor_pos_of_isAddHaarMeasure (μT.map L') ν).ne'
refine ⟨c₀ * c₁, by simp [pos_iff_ne_zero, c₀_pos, c₁_pos], ENNReal.mul_lt_top c₀_fin c₁_fin, ?_⟩
simp only [I, h₀, Measure.map_smul, J, smul_smul, h₁]
rw [mul_assoc, mul_comm _ c₁, ← mul_assoc]
| Mathlib/MeasureTheory/Measure/Haar/Disintegration.lean | 106 | 109 | theorem LinearMap.exists_map_addHaar_eq_smul_addHaar (h : Function.Surjective L) :
∃ (c : ℝ≥0∞), 0 < c ∧ μ.map L = c • ν := by |
rcases L.exists_map_addHaar_eq_smul_addHaar' μ ν h with ⟨c, c_pos, -, hc⟩
exact ⟨_, by simp [c_pos, NeZero.ne addHaar], hc⟩
| 1,873 |
import Mathlib.Analysis.Analytic.Basic
import Mathlib.Analysis.Analytic.Composition
import Mathlib.Analysis.Analytic.Linear
import Mathlib.Analysis.Calculus.FDeriv.Analytic
import Mathlib.Geometry.Manifold.ChartedSpace
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.Analysis.Calculus.ContDiff.Basic
#align_import geometry.manifold.smooth_manifold_with_corners from "leanprover-community/mathlib"@"ddec54a71a0dd025c05445d467f1a2b7d586a3ba"
noncomputable section
universe u v w u' v' w'
open Set Filter Function
open scoped Manifold Filter Topology
scoped[Manifold] notation "∞" => (⊤ : ℕ∞)
@[ext] -- Porting note(#5171): was nolint has_nonempty_instance
structure ModelWithCorners (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)
[NormedAddCommGroup E] [NormedSpace 𝕜 E] (H : Type*) [TopologicalSpace H] extends
PartialEquiv H E where
source_eq : source = univ
unique_diff' : UniqueDiffOn 𝕜 toPartialEquiv.target
continuous_toFun : Continuous toFun := by continuity
continuous_invFun : Continuous invFun := by continuity
#align model_with_corners ModelWithCorners
attribute [simp, mfld_simps] ModelWithCorners.source_eq
def modelWithCornersSelf (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*)
[NormedAddCommGroup E] [NormedSpace 𝕜 E] : ModelWithCorners 𝕜 E E where
toPartialEquiv := PartialEquiv.refl E
source_eq := rfl
unique_diff' := uniqueDiffOn_univ
continuous_toFun := continuous_id
continuous_invFun := continuous_id
#align model_with_corners_self modelWithCornersSelf
@[inherit_doc] scoped[Manifold] notation "𝓘(" 𝕜 ", " E ")" => modelWithCornersSelf 𝕜 E
scoped[Manifold] notation "𝓘(" 𝕜 ")" => modelWithCornersSelf 𝕜 𝕜
section
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] {E : Type*} [NormedAddCommGroup E]
[NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H)
namespace ModelWithCorners
@[coe] def toFun' (e : ModelWithCorners 𝕜 E H) : H → E := e.toFun
instance : CoeFun (ModelWithCorners 𝕜 E H) fun _ => H → E := ⟨toFun'⟩
protected def symm : PartialEquiv E H :=
I.toPartialEquiv.symm
#align model_with_corners.symm ModelWithCorners.symm
def Simps.apply (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*) [NormedAddCommGroup E]
[NormedSpace 𝕜 E] (H : Type*) [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) : H → E :=
I
#align model_with_corners.simps.apply ModelWithCorners.Simps.apply
def Simps.symm_apply (𝕜 : Type*) [NontriviallyNormedField 𝕜] (E : Type*) [NormedAddCommGroup E]
[NormedSpace 𝕜 E] (H : Type*) [TopologicalSpace H] (I : ModelWithCorners 𝕜 E H) : E → H :=
I.symm
#align model_with_corners.simps.symm_apply ModelWithCorners.Simps.symm_apply
initialize_simps_projections ModelWithCorners (toFun → apply, invFun → symm_apply)
-- Register a few lemmas to make sure that `simp` puts expressions in normal form
@[simp, mfld_simps]
theorem toPartialEquiv_coe : (I.toPartialEquiv : H → E) = I :=
rfl
#align model_with_corners.to_local_equiv_coe ModelWithCorners.toPartialEquiv_coe
@[simp, mfld_simps]
theorem mk_coe (e : PartialEquiv H E) (a b c d) :
((ModelWithCorners.mk e a b c d : ModelWithCorners 𝕜 E H) : H → E) = (e : H → E) :=
rfl
#align model_with_corners.mk_coe ModelWithCorners.mk_coe
@[simp, mfld_simps]
theorem toPartialEquiv_coe_symm : (I.toPartialEquiv.symm : E → H) = I.symm :=
rfl
#align model_with_corners.to_local_equiv_coe_symm ModelWithCorners.toPartialEquiv_coe_symm
@[simp, mfld_simps]
theorem mk_symm (e : PartialEquiv H E) (a b c d) :
(ModelWithCorners.mk e a b c d : ModelWithCorners 𝕜 E H).symm = e.symm :=
rfl
#align model_with_corners.mk_symm ModelWithCorners.mk_symm
@[continuity]
protected theorem continuous : Continuous I :=
I.continuous_toFun
#align model_with_corners.continuous ModelWithCorners.continuous
protected theorem continuousAt {x} : ContinuousAt I x :=
I.continuous.continuousAt
#align model_with_corners.continuous_at ModelWithCorners.continuousAt
protected theorem continuousWithinAt {s x} : ContinuousWithinAt I s x :=
I.continuousAt.continuousWithinAt
#align model_with_corners.continuous_within_at ModelWithCorners.continuousWithinAt
@[continuity]
theorem continuous_symm : Continuous I.symm :=
I.continuous_invFun
#align model_with_corners.continuous_symm ModelWithCorners.continuous_symm
theorem continuousAt_symm {x} : ContinuousAt I.symm x :=
I.continuous_symm.continuousAt
#align model_with_corners.continuous_at_symm ModelWithCorners.continuousAt_symm
theorem continuousWithinAt_symm {s x} : ContinuousWithinAt I.symm s x :=
I.continuous_symm.continuousWithinAt
#align model_with_corners.continuous_within_at_symm ModelWithCorners.continuousWithinAt_symm
theorem continuousOn_symm {s} : ContinuousOn I.symm s :=
I.continuous_symm.continuousOn
#align model_with_corners.continuous_on_symm ModelWithCorners.continuousOn_symm
@[simp, mfld_simps]
| Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean | 256 | 258 | theorem target_eq : I.target = range (I : H → E) := by |
rw [← image_univ, ← I.source_eq]
exact I.image_source_eq_target.symm
| 1,874 |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Geometry.Manifold.LocalInvariantProperties
#align_import geometry.manifold.cont_mdiff from "leanprover-community/mathlib"@"e5ab837fc252451f3eb9124ae6e7b6f57455e7b9"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
def ContDiffWithinAtProp (n : ℕ∞) (f : H → H') (s : Set H) (x : H) : Prop :=
ContDiffWithinAt 𝕜 n (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I x)
#align cont_diff_within_at_prop ContDiffWithinAtProp
| Mathlib/Geometry/Manifold/ContMDiff/Defs.lean | 97 | 100 | theorem contDiffWithinAtProp_self_source {f : E → H'} {s : Set E} {x : E} :
ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (I' ∘ f) s x := by |
simp_rw [ContDiffWithinAtProp, modelWithCornersSelf_coe, range_id, inter_univ,
modelWithCornersSelf_coe_symm, CompTriple.comp_eq, preimage_id_eq, id_eq]
| 1,875 |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Geometry.Manifold.LocalInvariantProperties
#align_import geometry.manifold.cont_mdiff from "leanprover-community/mathlib"@"e5ab837fc252451f3eb9124ae6e7b6f57455e7b9"
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
def ContDiffWithinAtProp (n : ℕ∞) (f : H → H') (s : Set H) (x : H) : Prop :=
ContDiffWithinAt 𝕜 n (I' ∘ f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I x)
#align cont_diff_within_at_prop ContDiffWithinAtProp
theorem contDiffWithinAtProp_self_source {f : E → H'} {s : Set E} {x : E} :
ContDiffWithinAtProp 𝓘(𝕜, E) I' n f s x ↔ ContDiffWithinAt 𝕜 n (I' ∘ f) s x := by
simp_rw [ContDiffWithinAtProp, modelWithCornersSelf_coe, range_id, inter_univ,
modelWithCornersSelf_coe_symm, CompTriple.comp_eq, preimage_id_eq, id_eq]
#align cont_diff_within_at_prop_self_source contDiffWithinAtProp_self_source
theorem contDiffWithinAtProp_self {f : E → E'} {s : Set E} {x : E} :
ContDiffWithinAtProp 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x :=
contDiffWithinAtProp_self_source 𝓘(𝕜, E')
#align cont_diff_within_at_prop_self contDiffWithinAtProp_self
theorem contDiffWithinAtProp_self_target {f : H → E'} {s : Set H} {x : H} :
ContDiffWithinAtProp I 𝓘(𝕜, E') n f s x ↔
ContDiffWithinAt 𝕜 n (f ∘ I.symm) (I.symm ⁻¹' s ∩ range I) (I x) :=
Iff.rfl
#align cont_diff_within_at_prop_self_target contDiffWithinAtProp_self_target
| Mathlib/Geometry/Manifold/ContMDiff/Defs.lean | 116 | 154 | theorem contDiffWithinAt_localInvariantProp (n : ℕ∞) :
(contDiffGroupoid ∞ I).LocalInvariantProp (contDiffGroupoid ∞ I')
(ContDiffWithinAtProp I I' n) where
is_local {s x u f} u_open xu := by |
have : I.symm ⁻¹' (s ∩ u) ∩ range I = I.symm ⁻¹' s ∩ range I ∩ I.symm ⁻¹' u := by
simp only [inter_right_comm, preimage_inter]
rw [ContDiffWithinAtProp, ContDiffWithinAtProp, this]
symm
apply contDiffWithinAt_inter
have : u ∈ 𝓝 (I.symm (I x)) := by
rw [ModelWithCorners.left_inv]
exact u_open.mem_nhds xu
apply ContinuousAt.preimage_mem_nhds I.continuous_symm.continuousAt this
right_invariance' {s x f e} he hx h := by
rw [ContDiffWithinAtProp] at h ⊢
have : I x = (I ∘ e.symm ∘ I.symm) (I (e x)) := by simp only [hx, mfld_simps]
rw [this] at h
have : I (e x) ∈ I.symm ⁻¹' e.target ∩ range I := by simp only [hx, mfld_simps]
have := (mem_groupoid_of_pregroupoid.2 he).2.contDiffWithinAt this
convert (h.comp' _ (this.of_le le_top)).mono_of_mem _ using 1
· ext y; simp only [mfld_simps]
refine mem_nhdsWithin.mpr
⟨I.symm ⁻¹' e.target, e.open_target.preimage I.continuous_symm, by
simp_rw [mem_preimage, I.left_inv, e.mapsTo hx], ?_⟩
mfld_set_tac
congr_of_forall {s x f g} h hx hf := by
apply hf.congr
· intro y hy
simp only [mfld_simps] at hy
simp only [h, hy, mfld_simps]
· simp only [hx, mfld_simps]
left_invariance' {s x f e'} he' hs hx h := by
rw [ContDiffWithinAtProp] at h ⊢
have A : (I' ∘ f ∘ I.symm) (I x) ∈ I'.symm ⁻¹' e'.source ∩ range I' := by
simp only [hx, mfld_simps]
have := (mem_groupoid_of_pregroupoid.2 he').1.contDiffWithinAt A
convert (this.of_le le_top).comp _ h _
· ext y; simp only [mfld_simps]
· intro y hy; simp only [mfld_simps] at hy; simpa only [hy, mfld_simps] using hs hy.1
| 1,875 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section Composition
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 52 | 77 | theorem ContMDiffWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
(hg : ContMDiffWithinAt I' I'' n g t (f x)) (hf : ContMDiffWithinAt I I' n f s x)
(st : MapsTo f s t) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by |
rw [contMDiffWithinAt_iff] at hg hf ⊢
refine ⟨hg.1.comp hf.1 st, ?_⟩
set e := extChartAt I x
set e' := extChartAt I' (f x)
have : e' (f x) = (writtenInExtChartAt I I' x f) (e x) := by simp only [e, e', mfld_simps]
rw [this] at hg
have A : ∀ᶠ y in 𝓝[e.symm ⁻¹' s ∩ range I] e x, f (e.symm y) ∈ t ∧ f (e.symm y) ∈ e'.source := by
simp only [e, ← map_extChartAt_nhdsWithin, eventually_map]
filter_upwards [hf.1.tendsto (extChartAt_source_mem_nhds I' (f x)),
inter_mem_nhdsWithin s (extChartAt_source_mem_nhds I x)]
rintro x' (hfx' : f x' ∈ e'.source) ⟨hx's, hx'⟩
simp only [e.map_source hx', true_and_iff, e.left_inv hx', st hx's, *]
refine ((hg.2.comp _ (hf.2.mono inter_subset_right) inter_subset_left).mono_of_mem
(inter_mem ?_ self_mem_nhdsWithin)).congr_of_eventuallyEq ?_ ?_
· filter_upwards [A]
rintro x' ⟨ht, hfx'⟩
simp only [*, mem_preimage, writtenInExtChartAt, (· ∘ ·), mem_inter_iff, e'.left_inv,
true_and_iff]
exact mem_range_self _
· filter_upwards [A]
rintro x' ⟨-, hfx'⟩
simp only [*, (· ∘ ·), writtenInExtChartAt, e'.left_inv]
· simp only [e, e', writtenInExtChartAt, (· ∘ ·), mem_extChartAt_source, e.left_inv, e'.left_inv]
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section Composition
theorem ContMDiffWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
(hg : ContMDiffWithinAt I' I'' n g t (f x)) (hf : ContMDiffWithinAt I I' n f s x)
(st : MapsTo f s t) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by
rw [contMDiffWithinAt_iff] at hg hf ⊢
refine ⟨hg.1.comp hf.1 st, ?_⟩
set e := extChartAt I x
set e' := extChartAt I' (f x)
have : e' (f x) = (writtenInExtChartAt I I' x f) (e x) := by simp only [e, e', mfld_simps]
rw [this] at hg
have A : ∀ᶠ y in 𝓝[e.symm ⁻¹' s ∩ range I] e x, f (e.symm y) ∈ t ∧ f (e.symm y) ∈ e'.source := by
simp only [e, ← map_extChartAt_nhdsWithin, eventually_map]
filter_upwards [hf.1.tendsto (extChartAt_source_mem_nhds I' (f x)),
inter_mem_nhdsWithin s (extChartAt_source_mem_nhds I x)]
rintro x' (hfx' : f x' ∈ e'.source) ⟨hx's, hx'⟩
simp only [e.map_source hx', true_and_iff, e.left_inv hx', st hx's, *]
refine ((hg.2.comp _ (hf.2.mono inter_subset_right) inter_subset_left).mono_of_mem
(inter_mem ?_ self_mem_nhdsWithin)).congr_of_eventuallyEq ?_ ?_
· filter_upwards [A]
rintro x' ⟨ht, hfx'⟩
simp only [*, mem_preimage, writtenInExtChartAt, (· ∘ ·), mem_inter_iff, e'.left_inv,
true_and_iff]
exact mem_range_self _
· filter_upwards [A]
rintro x' ⟨-, hfx'⟩
simp only [*, (· ∘ ·), writtenInExtChartAt, e'.left_inv]
· simp only [e, e', writtenInExtChartAt, (· ∘ ·), mem_extChartAt_source, e.left_inv, e'.left_inv]
#align cont_mdiff_within_at.comp ContMDiffWithinAt.comp
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 81 | 84 | theorem ContMDiffWithinAt.comp_of_eq {t : Set M'} {g : M' → M''} {x : M} {y : M'}
(hg : ContMDiffWithinAt I' I'' n g t y) (hf : ContMDiffWithinAt I I' n f s x)
(st : MapsTo f s t) (hx : f x = y) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by |
subst hx; exact hg.comp x hf st
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section Composition
theorem ContMDiffWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
(hg : ContMDiffWithinAt I' I'' n g t (f x)) (hf : ContMDiffWithinAt I I' n f s x)
(st : MapsTo f s t) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by
rw [contMDiffWithinAt_iff] at hg hf ⊢
refine ⟨hg.1.comp hf.1 st, ?_⟩
set e := extChartAt I x
set e' := extChartAt I' (f x)
have : e' (f x) = (writtenInExtChartAt I I' x f) (e x) := by simp only [e, e', mfld_simps]
rw [this] at hg
have A : ∀ᶠ y in 𝓝[e.symm ⁻¹' s ∩ range I] e x, f (e.symm y) ∈ t ∧ f (e.symm y) ∈ e'.source := by
simp only [e, ← map_extChartAt_nhdsWithin, eventually_map]
filter_upwards [hf.1.tendsto (extChartAt_source_mem_nhds I' (f x)),
inter_mem_nhdsWithin s (extChartAt_source_mem_nhds I x)]
rintro x' (hfx' : f x' ∈ e'.source) ⟨hx's, hx'⟩
simp only [e.map_source hx', true_and_iff, e.left_inv hx', st hx's, *]
refine ((hg.2.comp _ (hf.2.mono inter_subset_right) inter_subset_left).mono_of_mem
(inter_mem ?_ self_mem_nhdsWithin)).congr_of_eventuallyEq ?_ ?_
· filter_upwards [A]
rintro x' ⟨ht, hfx'⟩
simp only [*, mem_preimage, writtenInExtChartAt, (· ∘ ·), mem_inter_iff, e'.left_inv,
true_and_iff]
exact mem_range_self _
· filter_upwards [A]
rintro x' ⟨-, hfx'⟩
simp only [*, (· ∘ ·), writtenInExtChartAt, e'.left_inv]
· simp only [e, e', writtenInExtChartAt, (· ∘ ·), mem_extChartAt_source, e.left_inv, e'.left_inv]
#align cont_mdiff_within_at.comp ContMDiffWithinAt.comp
theorem ContMDiffWithinAt.comp_of_eq {t : Set M'} {g : M' → M''} {x : M} {y : M'}
(hg : ContMDiffWithinAt I' I'' n g t y) (hf : ContMDiffWithinAt I I' n f s x)
(st : MapsTo f s t) (hx : f x = y) : ContMDiffWithinAt I I'' n (g ∘ f) s x := by
subst hx; exact hg.comp x hf st
#align cont_mdiff_within_at.comp_of_eq ContMDiffWithinAt.comp_of_eq
nonrec theorem SmoothWithinAt.comp {t : Set M'} {g : M' → M''} (x : M)
(hg : SmoothWithinAt I' I'' g t (f x)) (hf : SmoothWithinAt I I' f s x) (st : MapsTo f s t) :
SmoothWithinAt I I'' (g ∘ f) s x :=
hg.comp x hf st
#align smooth_within_at.comp SmoothWithinAt.comp
theorem ContMDiffOn.comp {t : Set M'} {g : M' → M''} (hg : ContMDiffOn I' I'' n g t)
(hf : ContMDiffOn I I' n f s) (st : s ⊆ f ⁻¹' t) : ContMDiffOn I I'' n (g ∘ f) s := fun x hx =>
(hg _ (st hx)).comp x (hf x hx) st
#align cont_mdiff_on.comp ContMDiffOn.comp
nonrec theorem SmoothOn.comp {t : Set M'} {g : M' → M''} (hg : SmoothOn I' I'' g t)
(hf : SmoothOn I I' f s) (st : s ⊆ f ⁻¹' t) : SmoothOn I I'' (g ∘ f) s :=
hg.comp hf st
#align smooth_on.comp SmoothOn.comp
theorem ContMDiffOn.comp' {t : Set M'} {g : M' → M''} (hg : ContMDiffOn I' I'' n g t)
(hf : ContMDiffOn I I' n f s) : ContMDiffOn I I'' n (g ∘ f) (s ∩ f ⁻¹' t) :=
hg.comp (hf.mono inter_subset_left) inter_subset_right
#align cont_mdiff_on.comp' ContMDiffOn.comp'
nonrec theorem SmoothOn.comp' {t : Set M'} {g : M' → M''} (hg : SmoothOn I' I'' g t)
(hf : SmoothOn I I' f s) : SmoothOn I I'' (g ∘ f) (s ∩ f ⁻¹' t) :=
hg.comp' hf
#align smooth_on.comp' SmoothOn.comp'
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 119 | 122 | theorem ContMDiff.comp {g : M' → M''} (hg : ContMDiff I' I'' n g) (hf : ContMDiff I I' n f) :
ContMDiff I I'' n (g ∘ f) := by |
rw [← contMDiffOn_univ] at hf hg ⊢
exact hg.comp hf subset_preimage_univ
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section id
variable {c : M'}
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 244 | 248 | theorem contMDiff_const : ContMDiff I I' n fun _ : M => c := by |
intro x
refine ⟨continuousWithinAt_const, ?_⟩
simp only [ContDiffWithinAtProp, (· ∘ ·)]
exact contDiffWithinAt_const
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section id
variable {c : M'}
theorem contMDiff_const : ContMDiff I I' n fun _ : M => c := by
intro x
refine ⟨continuousWithinAt_const, ?_⟩
simp only [ContDiffWithinAtProp, (· ∘ ·)]
exact contDiffWithinAt_const
#align cont_mdiff_const contMDiff_const
@[to_additive]
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 252 | 253 | theorem contMDiff_one [One M'] : ContMDiff I I' n (1 : M → M') := by |
simp only [Pi.one_def, contMDiff_const]
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Defs
open Set Filter Function
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section id
variable {c : M'}
theorem contMDiff_const : ContMDiff I I' n fun _ : M => c := by
intro x
refine ⟨continuousWithinAt_const, ?_⟩
simp only [ContDiffWithinAtProp, (· ∘ ·)]
exact contDiffWithinAt_const
#align cont_mdiff_const contMDiff_const
@[to_additive]
theorem contMDiff_one [One M'] : ContMDiff I I' n (1 : M → M') := by
simp only [Pi.one_def, contMDiff_const]
#align cont_mdiff_one contMDiff_one
#align cont_mdiff_zero contMDiff_zero
theorem smooth_const : Smooth I I' fun _ : M => c :=
contMDiff_const
#align smooth_const smooth_const
@[to_additive]
| Mathlib/Geometry/Manifold/ContMDiff/Basic.lean | 262 | 262 | theorem smooth_one [One M'] : Smooth I I' (1 : M → M') := by | simp only [Pi.one_def, smooth_const]
| 1,876 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section ProdMk
| Mathlib/Geometry/Manifold/ContMDiff/Product.lean | 59 | 63 | theorem ContMDiffWithinAt.prod_mk {f : M → M'} {g : M → N'} (hf : ContMDiffWithinAt I I' n f s x)
(hg : ContMDiffWithinAt I J' n g s x) :
ContMDiffWithinAt I (I'.prod J') n (fun x => (f x, g x)) s x := by |
rw [contMDiffWithinAt_iff] at *
exact ⟨hf.1.prod hg.1, hf.2.prod hg.2⟩
| 1,877 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section ProdMk
theorem ContMDiffWithinAt.prod_mk {f : M → M'} {g : M → N'} (hf : ContMDiffWithinAt I I' n f s x)
(hg : ContMDiffWithinAt I J' n g s x) :
ContMDiffWithinAt I (I'.prod J') n (fun x => (f x, g x)) s x := by
rw [contMDiffWithinAt_iff] at *
exact ⟨hf.1.prod hg.1, hf.2.prod hg.2⟩
#align cont_mdiff_within_at.prod_mk ContMDiffWithinAt.prod_mk
| Mathlib/Geometry/Manifold/ContMDiff/Product.lean | 66 | 70 | theorem ContMDiffWithinAt.prod_mk_space {f : M → E'} {g : M → F'}
(hf : ContMDiffWithinAt I 𝓘(𝕜, E') n f s x) (hg : ContMDiffWithinAt I 𝓘(𝕜, F') n g s x) :
ContMDiffWithinAt I 𝓘(𝕜, E' × F') n (fun x => (f x, g x)) s x := by |
rw [contMDiffWithinAt_iff] at *
exact ⟨hf.1.prod hg.1, hf.2.prod hg.2⟩
| 1,877 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section Projections
| Mathlib/Geometry/Manifold/ContMDiff/Product.lean | 149 | 162 | theorem contMDiffWithinAt_fst {s : Set (M × N)} {p : M × N} :
ContMDiffWithinAt (I.prod J) I n Prod.fst s p := by |
/- porting note: `simp` fails to apply lemmas to `ModelProd`. Was
rw [contMDiffWithinAt_iff']
refine' ⟨continuousWithinAt_fst, _⟩
refine' contDiffWithinAt_fst.congr (fun y hy => _) _
· simp only [mfld_simps] at hy
simp only [hy, mfld_simps]
· simp only [mfld_simps]
-/
rw [contMDiffWithinAt_iff']
refine ⟨continuousWithinAt_fst, contDiffWithinAt_fst.congr (fun y hy => ?_) ?_⟩
· exact (extChartAt I p.1).right_inv ⟨hy.1.1.1, hy.1.2.1⟩
· exact (extChartAt I p.1).right_inv <| (extChartAt I p.1).map_source (mem_extChartAt_source _ _)
| 1,877 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set Function Filter ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
(I : ModelWithCorners 𝕜 E H) {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
(I' : ModelWithCorners 𝕜 E' H') {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a manifold `M''` over the pair `(E'', H'')`.
{E'' : Type*}
[NormedAddCommGroup E''] [NormedSpace 𝕜 E''] {H'' : Type*} [TopologicalSpace H'']
{I'' : ModelWithCorners 𝕜 E'' H''} {M'' : Type*} [TopologicalSpace M''] [ChartedSpace H'' M'']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*}
[NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H}
{e' : PartialHomeomorph M' H'} {f f₁ : M → M'} {s s₁ t : Set M} {x : M} {m n : ℕ∞}
variable {I I'}
section Projections
theorem contMDiffWithinAt_fst {s : Set (M × N)} {p : M × N} :
ContMDiffWithinAt (I.prod J) I n Prod.fst s p := by
rw [contMDiffWithinAt_iff']
refine ⟨continuousWithinAt_fst, contDiffWithinAt_fst.congr (fun y hy => ?_) ?_⟩
· exact (extChartAt I p.1).right_inv ⟨hy.1.1.1, hy.1.2.1⟩
· exact (extChartAt I p.1).right_inv <| (extChartAt I p.1).map_source (mem_extChartAt_source _ _)
#align cont_mdiff_within_at_fst contMDiffWithinAt_fst
theorem ContMDiffWithinAt.fst {f : N → M × M'} {s : Set N} {x : N}
(hf : ContMDiffWithinAt J (I.prod I') n f s x) :
ContMDiffWithinAt J I n (fun x => (f x).1) s x :=
contMDiffWithinAt_fst.comp x hf (mapsTo_image f s)
#align cont_mdiff_within_at.fst ContMDiffWithinAt.fst
theorem contMDiffAt_fst {p : M × N} : ContMDiffAt (I.prod J) I n Prod.fst p :=
contMDiffWithinAt_fst
#align cont_mdiff_at_fst contMDiffAt_fst
theorem contMDiffOn_fst {s : Set (M × N)} : ContMDiffOn (I.prod J) I n Prod.fst s := fun _ _ =>
contMDiffWithinAt_fst
#align cont_mdiff_on_fst contMDiffOn_fst
theorem contMDiff_fst : ContMDiff (I.prod J) I n (@Prod.fst M N) := fun _ => contMDiffAt_fst
#align cont_mdiff_fst contMDiff_fst
theorem smoothWithinAt_fst {s : Set (M × N)} {p : M × N} :
SmoothWithinAt (I.prod J) I Prod.fst s p :=
contMDiffWithinAt_fst
#align smooth_within_at_fst smoothWithinAt_fst
theorem smoothAt_fst {p : M × N} : SmoothAt (I.prod J) I Prod.fst p :=
contMDiffAt_fst
#align smooth_at_fst smoothAt_fst
theorem smoothOn_fst {s : Set (M × N)} : SmoothOn (I.prod J) I Prod.fst s :=
contMDiffOn_fst
#align smooth_on_fst smoothOn_fst
theorem smooth_fst : Smooth (I.prod J) I (@Prod.fst M N) :=
contMDiff_fst
#align smooth_fst smooth_fst
theorem ContMDiffAt.fst {f : N → M × M'} {x : N} (hf : ContMDiffAt J (I.prod I') n f x) :
ContMDiffAt J I n (fun x => (f x).1) x :=
contMDiffAt_fst.comp x hf
#align cont_mdiff_at.fst ContMDiffAt.fst
theorem ContMDiff.fst {f : N → M × M'} (hf : ContMDiff J (I.prod I') n f) :
ContMDiff J I n fun x => (f x).1 :=
contMDiff_fst.comp hf
#align cont_mdiff.fst ContMDiff.fst
theorem SmoothAt.fst {f : N → M × M'} {x : N} (hf : SmoothAt J (I.prod I') f x) :
SmoothAt J I (fun x => (f x).1) x :=
smoothAt_fst.comp x hf
#align smooth_at.fst SmoothAt.fst
theorem Smooth.fst {f : N → M × M'} (hf : Smooth J (I.prod I') f) : Smooth J I fun x => (f x).1 :=
smooth_fst.comp hf
#align smooth.fst Smooth.fst
| Mathlib/Geometry/Manifold/ContMDiff/Product.lean | 218 | 231 | theorem contMDiffWithinAt_snd {s : Set (M × N)} {p : M × N} :
ContMDiffWithinAt (I.prod J) J n Prod.snd s p := by |
/- porting note: `simp` fails to apply lemmas to `ModelProd`. Was
rw [contMDiffWithinAt_iff']
refine' ⟨continuousWithinAt_snd, _⟩
refine' contDiffWithinAt_snd.congr (fun y hy => _) _
· simp only [mfld_simps] at hy
simp only [hy, mfld_simps]
· simp only [mfld_simps]
-/
rw [contMDiffWithinAt_iff']
refine ⟨continuousWithinAt_snd, contDiffWithinAt_snd.congr (fun y hy => ?_) ?_⟩
· exact (extChartAt J p.2).right_inv ⟨hy.1.1.2, hy.1.2.2⟩
· exact (extChartAt J p.2).right_inv <| (extChartAt J p.2).map_source (mem_extChartAt_source _ _)
| 1,877 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 51 | 55 | theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by |
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
| 1,878 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
#align cont_mdiff_within_at_iff_cont_diff_within_at contMDiffWithinAt_iff_contDiffWithinAt
alias ⟨ContMDiffWithinAt.contDiffWithinAt, ContDiffWithinAt.contMDiffWithinAt⟩ :=
contMDiffWithinAt_iff_contDiffWithinAt
#align cont_mdiff_within_at.cont_diff_within_at ContMDiffWithinAt.contDiffWithinAt
#align cont_diff_within_at.cont_mdiff_within_at ContDiffWithinAt.contMDiffWithinAt
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 63 | 65 | theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x := by |
rw [← contMDiffWithinAt_univ, contMDiffWithinAt_iff_contDiffWithinAt, contDiffWithinAt_univ]
| 1,878 |
import Mathlib.Geometry.Manifold.ContMDiff.Product
import Mathlib.Analysis.NormedSpace.OperatorNorm.Prod
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Topology Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare a smooth manifold `N` over the pair `(F, G)`.
{F : Type*}
[NormedAddCommGroup F] [NormedSpace 𝕜 F] {G : Type*} [TopologicalSpace G]
{J : ModelWithCorners 𝕜 F G} {N : Type*} [TopologicalSpace N] [ChartedSpace G N]
[SmoothManifoldWithCorners J N]
-- declare a smooth manifold `N'` over the pair `(F', G')`.
{F' : Type*}
[NormedAddCommGroup F'] [NormedSpace 𝕜 F'] {G' : Type*} [TopologicalSpace G']
{J' : ModelWithCorners 𝕜 F' G'} {N' : Type*} [TopologicalSpace N'] [ChartedSpace G' N']
[SmoothManifoldWithCorners J' N']
-- F₁, F₂, F₃, F₄ are normed spaces
{F₁ : Type*} [NormedAddCommGroup F₁] [NormedSpace 𝕜 F₁] {F₂ : Type*} [NormedAddCommGroup F₂]
[NormedSpace 𝕜 F₂] {F₃ : Type*} [NormedAddCommGroup F₃] [NormedSpace 𝕜 F₃] {F₄ : Type*}
[NormedAddCommGroup F₄] [NormedSpace 𝕜 F₄]
-- declare functions, sets, points and smoothness indices
{f f₁ : M → M'} {s t : Set M} {x : M} {m n : ℕ∞}
section Module
theorem contMDiffWithinAt_iff_contDiffWithinAt {f : E → E'} {s : Set E} {x : E} :
ContMDiffWithinAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f s x ↔ ContDiffWithinAt 𝕜 n f s x := by
simp (config := { contextual := true }) only [ContMDiffWithinAt, liftPropWithinAt_iff',
ContDiffWithinAtProp, iff_def, mfld_simps]
exact ContDiffWithinAt.continuousWithinAt
#align cont_mdiff_within_at_iff_cont_diff_within_at contMDiffWithinAt_iff_contDiffWithinAt
alias ⟨ContMDiffWithinAt.contDiffWithinAt, ContDiffWithinAt.contMDiffWithinAt⟩ :=
contMDiffWithinAt_iff_contDiffWithinAt
#align cont_mdiff_within_at.cont_diff_within_at ContMDiffWithinAt.contDiffWithinAt
#align cont_diff_within_at.cont_mdiff_within_at ContDiffWithinAt.contMDiffWithinAt
theorem contMDiffAt_iff_contDiffAt {f : E → E'} {x : E} :
ContMDiffAt 𝓘(𝕜, E) 𝓘(𝕜, E') n f x ↔ ContDiffAt 𝕜 n f x := by
rw [← contMDiffWithinAt_univ, contMDiffWithinAt_iff_contDiffWithinAt, contDiffWithinAt_univ]
#align cont_mdiff_at_iff_cont_diff_at contMDiffAt_iff_contDiffAt
alias ⟨ContMDiffAt.contDiffAt, ContDiffAt.contMDiffAt⟩ := contMDiffAt_iff_contDiffAt
#align cont_mdiff_at.cont_diff_at ContMDiffAt.contDiffAt
#align cont_diff_at.cont_mdiff_at ContDiffAt.contMDiffAt
theorem contMDiffOn_iff_contDiffOn {f : E → E'} {s : Set E} :
ContMDiffOn 𝓘(𝕜, E) 𝓘(𝕜, E') n f s ↔ ContDiffOn 𝕜 n f s :=
forall_congr' <| by simp [contMDiffWithinAt_iff_contDiffWithinAt]
#align cont_mdiff_on_iff_cont_diff_on contMDiffOn_iff_contDiffOn
alias ⟨ContMDiffOn.contDiffOn, ContDiffOn.contMDiffOn⟩ := contMDiffOn_iff_contDiffOn
#align cont_mdiff_on.cont_diff_on ContMDiffOn.contDiffOn
#align cont_diff_on.cont_mdiff_on ContDiffOn.contMDiffOn
| Mathlib/Geometry/Manifold/ContMDiff/NormedSpace.lean | 81 | 82 | theorem contMDiff_iff_contDiff {f : E → E'} : ContMDiff 𝓘(𝕜, E) 𝓘(𝕜, E') n f ↔ ContDiff 𝕜 n f := by |
rw [← contDiffOn_univ, ← contMDiffOn_univ, contMDiffOn_iff_contDiffOn]
| 1,878 |
import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace
#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
noncomputable section
open Set TopologicalSpace
open scoped Manifold Topology
variable {𝕜 B F : Type*} [TopologicalSpace B]
variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F]
namespace FiberwiseLinear
variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
def partialHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) :
PartialHomeomorph (B × F) (B × F) where
toFun x := (x.1, φ x.1 x.2)
invFun x := (x.1, (φ x.1).symm x.2)
source := U ×ˢ univ
target := U ×ˢ univ
map_source' _x hx := mk_mem_prod hx.1 (mem_univ _)
map_target' _x hx := mk_mem_prod hx.1 (mem_univ _)
left_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.symm_apply_apply _ _)
right_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.apply_symm_apply _ _)
open_source := hU.prod isOpen_univ
open_target := hU.prod isOpen_univ
continuousOn_toFun :=
have : ContinuousOn (fun p : B × F => ((φ p.1 : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
hφ.prod_map continuousOn_id
continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
continuousOn_invFun :=
haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
h2φ.prod_map continuousOn_id
continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
#align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph
theorem trans_partialHomeomorph_apply (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') (b : B) (v : F) :
(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ')
⟨b, v⟩ =
⟨b, φ' b (φ b v)⟩ :=
rfl
#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply
| Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean | 74 | 82 | theorem source_trans_partialHomeomorph (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').source =
(U ∩ U') ×ˢ univ := by |
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
| 1,879 |
import Mathlib.Geometry.Manifold.ContMDiff.NormedSpace
#align_import geometry.manifold.vector_bundle.fiberwise_linear from "leanprover-community/mathlib"@"be2c24f56783935652cefffb4bfca7e4b25d167e"
noncomputable section
open Set TopologicalSpace
open scoped Manifold Topology
variable {𝕜 B F : Type*} [TopologicalSpace B]
variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F]
namespace FiberwiseLinear
variable {φ φ' : B → F ≃L[𝕜] F} {U U' : Set B}
def partialHomeomorph (φ : B → F ≃L[𝕜] F) (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) :
PartialHomeomorph (B × F) (B × F) where
toFun x := (x.1, φ x.1 x.2)
invFun x := (x.1, (φ x.1).symm x.2)
source := U ×ˢ univ
target := U ×ˢ univ
map_source' _x hx := mk_mem_prod hx.1 (mem_univ _)
map_target' _x hx := mk_mem_prod hx.1 (mem_univ _)
left_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.symm_apply_apply _ _)
right_inv' _ _ := Prod.ext rfl (ContinuousLinearEquiv.apply_symm_apply _ _)
open_source := hU.prod isOpen_univ
open_target := hU.prod isOpen_univ
continuousOn_toFun :=
have : ContinuousOn (fun p : B × F => ((φ p.1 : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
hφ.prod_map continuousOn_id
continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
continuousOn_invFun :=
haveI : ContinuousOn (fun p : B × F => (((φ p.1).symm : F →L[𝕜] F), p.2)) (U ×ˢ univ) :=
h2φ.prod_map continuousOn_id
continuousOn_fst.prod (isBoundedBilinearMap_apply.continuous.comp_continuousOn this)
#align fiberwise_linear.local_homeomorph FiberwiseLinear.partialHomeomorph
theorem trans_partialHomeomorph_apply (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') (b : B) (v : F) :
(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ')
⟨b, v⟩ =
⟨b, φ' b (φ b v)⟩ :=
rfl
#align fiberwise_linear.trans_local_homeomorph_apply FiberwiseLinear.trans_partialHomeomorph_apply
theorem source_trans_partialHomeomorph (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').source =
(U ∩ U') ×ˢ univ := by
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
#align fiberwise_linear.source_trans_local_homeomorph FiberwiseLinear.source_trans_partialHomeomorph
| Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean | 87 | 95 | theorem target_trans_partialHomeomorph (hU : IsOpen U)
(hφ : ContinuousOn (fun x => φ x : B → F →L[𝕜] F) U)
(h2φ : ContinuousOn (fun x => (φ x).symm : B → F →L[𝕜] F) U) (hU' : IsOpen U')
(hφ' : ContinuousOn (fun x => φ' x : B → F →L[𝕜] F) U')
(h2φ' : ContinuousOn (fun x => (φ' x).symm : B → F →L[𝕜] F) U') :
(FiberwiseLinear.partialHomeomorph φ hU hφ h2φ ≫ₕ
FiberwiseLinear.partialHomeomorph φ' hU' hφ' h2φ').target =
(U ∩ U') ×ˢ univ := by |
dsimp only [FiberwiseLinear.partialHomeomorph]; mfld_set_tac
| 1,879 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H} {x : M} {m n : ℕ∞}
section Atlas
| Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean | 36 | 42 | theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I := by |
intro x
refine (contMDiffAt_iff _ _).mpr ⟨I.continuousAt, ?_⟩
simp only [mfld_simps]
refine contDiffWithinAt_id.congr_of_eventuallyEq ?_ ?_
· exact Filter.eventuallyEq_of_mem self_mem_nhdsWithin fun x₂ => I.right_inv
simp_rw [Function.comp_apply, I.left_inv, Function.id_def]
| 1,880 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H} {x : M} {m n : ℕ∞}
section Atlas
theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I := by
intro x
refine (contMDiffAt_iff _ _).mpr ⟨I.continuousAt, ?_⟩
simp only [mfld_simps]
refine contDiffWithinAt_id.congr_of_eventuallyEq ?_ ?_
· exact Filter.eventuallyEq_of_mem self_mem_nhdsWithin fun x₂ => I.right_inv
simp_rw [Function.comp_apply, I.left_inv, Function.id_def]
#align cont_mdiff_model contMDiff_model
| Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean | 45 | 49 | theorem contMDiffOn_model_symm : ContMDiffOn 𝓘(𝕜, E) I n I.symm (range I) := by |
rw [contMDiffOn_iff]
refine ⟨I.continuousOn_symm, fun x y => ?_⟩
simp only [mfld_simps]
exact contDiffOn_id.congr fun x' => I.right_inv
| 1,880 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H} {x : M} {m n : ℕ∞}
section Atlas
theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I := by
intro x
refine (contMDiffAt_iff _ _).mpr ⟨I.continuousAt, ?_⟩
simp only [mfld_simps]
refine contDiffWithinAt_id.congr_of_eventuallyEq ?_ ?_
· exact Filter.eventuallyEq_of_mem self_mem_nhdsWithin fun x₂ => I.right_inv
simp_rw [Function.comp_apply, I.left_inv, Function.id_def]
#align cont_mdiff_model contMDiff_model
theorem contMDiffOn_model_symm : ContMDiffOn 𝓘(𝕜, E) I n I.symm (range I) := by
rw [contMDiffOn_iff]
refine ⟨I.continuousOn_symm, fun x y => ?_⟩
simp only [mfld_simps]
exact contDiffOn_id.congr fun x' => I.right_inv
#align cont_mdiff_on_model_symm contMDiffOn_model_symm
theorem contMDiffOn_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) : ContMDiffOn I I n e e.source :=
ContMDiffOn.of_le
((contDiffWithinAt_localInvariantProp I I ∞).liftPropOn_of_mem_maximalAtlas
(contDiffWithinAtProp_id I) h)
le_top
#align cont_mdiff_on_of_mem_maximal_atlas contMDiffOn_of_mem_maximalAtlas
theorem contMDiffOn_symm_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) :
ContMDiffOn I I n e.symm e.target :=
ContMDiffOn.of_le
((contDiffWithinAt_localInvariantProp I I ∞).liftPropOn_symm_of_mem_maximalAtlas
(contDiffWithinAtProp_id I) h)
le_top
#align cont_mdiff_on_symm_of_mem_maximal_atlas contMDiffOn_symm_of_mem_maximalAtlas
theorem contMDiffAt_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) (hx : x ∈ e.source) :
ContMDiffAt I I n e x :=
(contMDiffOn_of_mem_maximalAtlas h).contMDiffAt <| e.open_source.mem_nhds hx
#align cont_mdiff_at_of_mem_maximal_atlas contMDiffAt_of_mem_maximalAtlas
theorem contMDiffAt_symm_of_mem_maximalAtlas {x : H} (h : e ∈ maximalAtlas I M)
(hx : x ∈ e.target) : ContMDiffAt I I n e.symm x :=
(contMDiffOn_symm_of_mem_maximalAtlas h).contMDiffAt <| e.open_target.mem_nhds hx
#align cont_mdiff_at_symm_of_mem_maximal_atlas contMDiffAt_symm_of_mem_maximalAtlas
theorem contMDiffOn_chart : ContMDiffOn I I n (chartAt H x) (chartAt H x).source :=
contMDiffOn_of_mem_maximalAtlas <| chart_mem_maximalAtlas I x
#align cont_mdiff_on_chart contMDiffOn_chart
theorem contMDiffOn_chart_symm : ContMDiffOn I I n (chartAt H x).symm (chartAt H x).target :=
contMDiffOn_symm_of_mem_maximalAtlas <| chart_mem_maximalAtlas I x
#align cont_mdiff_on_chart_symm contMDiffOn_chart_symm
theorem contMDiffAt_extend {x : M} (he : e ∈ maximalAtlas I M) (hx : x ∈ e.source) :
ContMDiffAt I 𝓘(𝕜, E) n (e.extend I) x :=
(contMDiff_model _).comp x <| contMDiffAt_of_mem_maximalAtlas he hx
#align cont_mdiff_at_extend contMDiffAt_extend
theorem contMDiffAt_extChartAt' {x' : M} (h : x' ∈ (chartAt H x).source) :
ContMDiffAt I 𝓘(𝕜, E) n (extChartAt I x) x' :=
contMDiffAt_extend (chart_mem_maximalAtlas I x) h
#align cont_mdiff_at_ext_chart_at' contMDiffAt_extChartAt'
theorem contMDiffAt_extChartAt : ContMDiffAt I 𝓘(𝕜, E) n (extChartAt I x) x :=
contMDiffAt_extChartAt' <| mem_chart_source H x
#align cont_mdiff_at_ext_chart_at contMDiffAt_extChartAt
theorem contMDiffOn_extChartAt : ContMDiffOn I 𝓘(𝕜, E) n (extChartAt I x) (chartAt H x).source :=
fun _x' hx' => (contMDiffAt_extChartAt' hx').contMDiffWithinAt
#align cont_mdiff_on_ext_chart_at contMDiffOn_extChartAt
| Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean | 105 | 110 | theorem contMDiffOn_extend_symm (he : e ∈ maximalAtlas I M) :
ContMDiffOn 𝓘(𝕜, E) I n (e.extend I).symm (I '' e.target) := by |
refine (contMDiffOn_symm_of_mem_maximalAtlas he).comp
(contMDiffOn_model_symm.mono <| image_subset_range _ _) ?_
simp_rw [image_subset_iff, PartialEquiv.restr_coe_symm, I.toPartialEquiv_coe_symm,
preimage_preimage, I.left_inv, preimage_id']; rfl
| 1,880 |
import Mathlib.Geometry.Manifold.ContMDiff.Basic
open Set ChartedSpace SmoothManifoldWithCorners
open scoped Manifold
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
-- declare a smooth manifold `M` over the pair `(E, H)`.
{E : Type*}
[NormedAddCommGroup E] [NormedSpace 𝕜 E] {H : Type*} [TopologicalSpace H]
{I : ModelWithCorners 𝕜 E H} {M : Type*} [TopologicalSpace M] [ChartedSpace H M]
[SmoothManifoldWithCorners I M]
-- declare a smooth manifold `M'` over the pair `(E', H')`.
{E' : Type*}
[NormedAddCommGroup E'] [NormedSpace 𝕜 E'] {H' : Type*} [TopologicalSpace H']
{I' : ModelWithCorners 𝕜 E' H'} {M' : Type*} [TopologicalSpace M'] [ChartedSpace H' M']
[SmoothManifoldWithCorners I' M']
-- declare functions, sets, points and smoothness indices
{e : PartialHomeomorph M H} {x : M} {m n : ℕ∞}
section Atlas
theorem contMDiff_model : ContMDiff I 𝓘(𝕜, E) n I := by
intro x
refine (contMDiffAt_iff _ _).mpr ⟨I.continuousAt, ?_⟩
simp only [mfld_simps]
refine contDiffWithinAt_id.congr_of_eventuallyEq ?_ ?_
· exact Filter.eventuallyEq_of_mem self_mem_nhdsWithin fun x₂ => I.right_inv
simp_rw [Function.comp_apply, I.left_inv, Function.id_def]
#align cont_mdiff_model contMDiff_model
theorem contMDiffOn_model_symm : ContMDiffOn 𝓘(𝕜, E) I n I.symm (range I) := by
rw [contMDiffOn_iff]
refine ⟨I.continuousOn_symm, fun x y => ?_⟩
simp only [mfld_simps]
exact contDiffOn_id.congr fun x' => I.right_inv
#align cont_mdiff_on_model_symm contMDiffOn_model_symm
theorem contMDiffOn_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) : ContMDiffOn I I n e e.source :=
ContMDiffOn.of_le
((contDiffWithinAt_localInvariantProp I I ∞).liftPropOn_of_mem_maximalAtlas
(contDiffWithinAtProp_id I) h)
le_top
#align cont_mdiff_on_of_mem_maximal_atlas contMDiffOn_of_mem_maximalAtlas
theorem contMDiffOn_symm_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) :
ContMDiffOn I I n e.symm e.target :=
ContMDiffOn.of_le
((contDiffWithinAt_localInvariantProp I I ∞).liftPropOn_symm_of_mem_maximalAtlas
(contDiffWithinAtProp_id I) h)
le_top
#align cont_mdiff_on_symm_of_mem_maximal_atlas contMDiffOn_symm_of_mem_maximalAtlas
theorem contMDiffAt_of_mem_maximalAtlas (h : e ∈ maximalAtlas I M) (hx : x ∈ e.source) :
ContMDiffAt I I n e x :=
(contMDiffOn_of_mem_maximalAtlas h).contMDiffAt <| e.open_source.mem_nhds hx
#align cont_mdiff_at_of_mem_maximal_atlas contMDiffAt_of_mem_maximalAtlas
theorem contMDiffAt_symm_of_mem_maximalAtlas {x : H} (h : e ∈ maximalAtlas I M)
(hx : x ∈ e.target) : ContMDiffAt I I n e.symm x :=
(contMDiffOn_symm_of_mem_maximalAtlas h).contMDiffAt <| e.open_target.mem_nhds hx
#align cont_mdiff_at_symm_of_mem_maximal_atlas contMDiffAt_symm_of_mem_maximalAtlas
theorem contMDiffOn_chart : ContMDiffOn I I n (chartAt H x) (chartAt H x).source :=
contMDiffOn_of_mem_maximalAtlas <| chart_mem_maximalAtlas I x
#align cont_mdiff_on_chart contMDiffOn_chart
theorem contMDiffOn_chart_symm : ContMDiffOn I I n (chartAt H x).symm (chartAt H x).target :=
contMDiffOn_symm_of_mem_maximalAtlas <| chart_mem_maximalAtlas I x
#align cont_mdiff_on_chart_symm contMDiffOn_chart_symm
theorem contMDiffAt_extend {x : M} (he : e ∈ maximalAtlas I M) (hx : x ∈ e.source) :
ContMDiffAt I 𝓘(𝕜, E) n (e.extend I) x :=
(contMDiff_model _).comp x <| contMDiffAt_of_mem_maximalAtlas he hx
#align cont_mdiff_at_extend contMDiffAt_extend
theorem contMDiffAt_extChartAt' {x' : M} (h : x' ∈ (chartAt H x).source) :
ContMDiffAt I 𝓘(𝕜, E) n (extChartAt I x) x' :=
contMDiffAt_extend (chart_mem_maximalAtlas I x) h
#align cont_mdiff_at_ext_chart_at' contMDiffAt_extChartAt'
theorem contMDiffAt_extChartAt : ContMDiffAt I 𝓘(𝕜, E) n (extChartAt I x) x :=
contMDiffAt_extChartAt' <| mem_chart_source H x
#align cont_mdiff_at_ext_chart_at contMDiffAt_extChartAt
theorem contMDiffOn_extChartAt : ContMDiffOn I 𝓘(𝕜, E) n (extChartAt I x) (chartAt H x).source :=
fun _x' hx' => (contMDiffAt_extChartAt' hx').contMDiffWithinAt
#align cont_mdiff_on_ext_chart_at contMDiffOn_extChartAt
theorem contMDiffOn_extend_symm (he : e ∈ maximalAtlas I M) :
ContMDiffOn 𝓘(𝕜, E) I n (e.extend I).symm (I '' e.target) := by
refine (contMDiffOn_symm_of_mem_maximalAtlas he).comp
(contMDiffOn_model_symm.mono <| image_subset_range _ _) ?_
simp_rw [image_subset_iff, PartialEquiv.restr_coe_symm, I.toPartialEquiv_coe_symm,
preimage_preimage, I.left_inv, preimage_id']; rfl
#align cont_mdiff_on_extend_symm contMDiffOn_extend_symm
| Mathlib/Geometry/Manifold/ContMDiff/Atlas.lean | 113 | 116 | theorem contMDiffOn_extChartAt_symm (x : M) :
ContMDiffOn 𝓘(𝕜, E) I n (extChartAt I x).symm (extChartAt I x).target := by |
convert contMDiffOn_extend_symm (chart_mem_maximalAtlas I x)
rw [extChartAt_target, I.image_eq]
| 1,880 |
import Mathlib.Geometry.Manifold.ContMDiff.Atlas
import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear
import Mathlib.Topology.VectorBundle.Constructions
#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
assert_not_exists mfderiv
open Bundle Set PartialHomeomorph
open Function (id_def)
open Filter
open scoped Manifold Bundle Topology
variable {𝕜 B B' F M : Type*} {E : B → Type*}
section
variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [∀ x, TopologicalSpace (E x)]
{HB : Type*} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
instance FiberBundle.chartedSpace' : ChartedSpace (B × F) (TotalSpace F E) where
atlas := (fun e : Trivialization F (π F E) => e.toPartialHomeomorph) '' trivializationAtlas F E
chartAt x := (trivializationAt F E x.proj).toPartialHomeomorph
mem_chart_source x :=
(trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
chart_mem_atlas _ := mem_image_of_mem _ (trivialization_mem_atlas F E _)
#align fiber_bundle.charted_space FiberBundle.chartedSpace'
theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace F E) :
chartAt (B × F) x = (trivializationAt F E x.proj).toPartialHomeomorph :=
rfl
--attribute [local reducible] ModelProd
instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F E) :=
ChartedSpace.comp _ (B × F) _
#align fiber_bundle.charted_space' FiberBundle.chartedSpace
| Mathlib/Geometry/Manifold/VectorBundle/Basic.lean | 108 | 114 | theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
chartAt (ModelProd HB F) x =
(trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
(chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by |
dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
chartAt_self_eq]
rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
| 1,881 |
import Mathlib.Geometry.Manifold.ContMDiff.Atlas
import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear
import Mathlib.Topology.VectorBundle.Constructions
#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
assert_not_exists mfderiv
open Bundle Set PartialHomeomorph
open Function (id_def)
open Filter
open scoped Manifold Bundle Topology
variable {𝕜 B B' F M : Type*} {E : B → Type*}
section
variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [∀ x, TopologicalSpace (E x)]
{HB : Type*} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
instance FiberBundle.chartedSpace' : ChartedSpace (B × F) (TotalSpace F E) where
atlas := (fun e : Trivialization F (π F E) => e.toPartialHomeomorph) '' trivializationAtlas F E
chartAt x := (trivializationAt F E x.proj).toPartialHomeomorph
mem_chart_source x :=
(trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
chart_mem_atlas _ := mem_image_of_mem _ (trivialization_mem_atlas F E _)
#align fiber_bundle.charted_space FiberBundle.chartedSpace'
theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace F E) :
chartAt (B × F) x = (trivializationAt F E x.proj).toPartialHomeomorph :=
rfl
--attribute [local reducible] ModelProd
instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F E) :=
ChartedSpace.comp _ (B × F) _
#align fiber_bundle.charted_space' FiberBundle.chartedSpace
theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
chartAt (ModelProd HB F) x =
(trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
(chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by
dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
chartAt_self_eq]
rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
#align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
| Mathlib/Geometry/Manifold/VectorBundle/Basic.lean | 117 | 121 | theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
(hy : y ∈ (chartAt (ModelProd HB F) x).target) :
((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 := by |
simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊢
exact (trivializationAt F E x.proj).proj_symm_apply hy.2
| 1,881 |
import Mathlib.Geometry.Manifold.ContMDiff.Atlas
import Mathlib.Geometry.Manifold.VectorBundle.FiberwiseLinear
import Mathlib.Topology.VectorBundle.Constructions
#align_import geometry.manifold.vector_bundle.basic from "leanprover-community/mathlib"@"e473c3198bb41f68560cab68a0529c854b618833"
assert_not_exists mfderiv
open Bundle Set PartialHomeomorph
open Function (id_def)
open Filter
open scoped Manifold Bundle Topology
variable {𝕜 B B' F M : Type*} {E : B → Type*}
section
variable [TopologicalSpace F] [TopologicalSpace (TotalSpace F E)] [∀ x, TopologicalSpace (E x)]
{HB : Type*} [TopologicalSpace HB] [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
instance FiberBundle.chartedSpace' : ChartedSpace (B × F) (TotalSpace F E) where
atlas := (fun e : Trivialization F (π F E) => e.toPartialHomeomorph) '' trivializationAtlas F E
chartAt x := (trivializationAt F E x.proj).toPartialHomeomorph
mem_chart_source x :=
(trivializationAt F E x.proj).mem_source.mpr (mem_baseSet_trivializationAt F E x.proj)
chart_mem_atlas _ := mem_image_of_mem _ (trivialization_mem_atlas F E _)
#align fiber_bundle.charted_space FiberBundle.chartedSpace'
theorem FiberBundle.chartedSpace'_chartAt (x : TotalSpace F E) :
chartAt (B × F) x = (trivializationAt F E x.proj).toPartialHomeomorph :=
rfl
--attribute [local reducible] ModelProd
instance FiberBundle.chartedSpace : ChartedSpace (ModelProd HB F) (TotalSpace F E) :=
ChartedSpace.comp _ (B × F) _
#align fiber_bundle.charted_space' FiberBundle.chartedSpace
theorem FiberBundle.chartedSpace_chartAt (x : TotalSpace F E) :
chartAt (ModelProd HB F) x =
(trivializationAt F E x.proj).toPartialHomeomorph ≫ₕ
(chartAt HB x.proj).prod (PartialHomeomorph.refl F) := by
dsimp only [chartAt_comp, prodChartedSpace_chartAt, FiberBundle.chartedSpace'_chartAt,
chartAt_self_eq]
rw [Trivialization.coe_coe, Trivialization.coe_fst' _ (mem_baseSet_trivializationAt F E x.proj)]
#align fiber_bundle.charted_space_chart_at FiberBundle.chartedSpace_chartAt
theorem FiberBundle.chartedSpace_chartAt_symm_fst (x : TotalSpace F E) (y : ModelProd HB F)
(hy : y ∈ (chartAt (ModelProd HB F) x).target) :
((chartAt (ModelProd HB F) x).symm y).proj = (chartAt HB x.proj).symm y.1 := by
simp only [FiberBundle.chartedSpace_chartAt, mfld_simps] at hy ⊢
exact (trivializationAt F E x.proj).proj_symm_apply hy.2
#align fiber_bundle.charted_space_chart_at_symm_fst FiberBundle.chartedSpace_chartAt_symm_fst
end
section
variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup F] [NormedSpace 𝕜 F]
[TopologicalSpace (TotalSpace F E)] [∀ x, TopologicalSpace (E x)] {EB : Type*}
[NormedAddCommGroup EB] [NormedSpace 𝕜 EB] {HB : Type*} [TopologicalSpace HB]
(IB : ModelWithCorners 𝕜 EB HB) (E' : B → Type*) [∀ x, Zero (E' x)] {EM : Type*}
[NormedAddCommGroup EM] [NormedSpace 𝕜 EM] {HM : Type*} [TopologicalSpace HM]
{IM : ModelWithCorners 𝕜 EM HM} [TopologicalSpace M] [ChartedSpace HM M]
[Is : SmoothManifoldWithCorners IM M] {n : ℕ∞}
variable [TopologicalSpace B] [ChartedSpace HB B] [FiberBundle F E]
protected theorem FiberBundle.extChartAt (x : TotalSpace F E) :
extChartAt (IB.prod 𝓘(𝕜, F)) x =
(trivializationAt F E x.proj).toPartialEquiv ≫
(extChartAt IB x.proj).prod (PartialEquiv.refl F) := by
simp_rw [extChartAt, FiberBundle.chartedSpace_chartAt, extend]
simp only [PartialEquiv.trans_assoc, mfld_simps]
-- Porting note: should not be needed
rw [PartialEquiv.prod_trans, PartialEquiv.refl_trans]
#align fiber_bundle.ext_chart_at FiberBundle.extChartAt
protected theorem FiberBundle.extChartAt_target (x : TotalSpace F E) :
(extChartAt (IB.prod 𝓘(𝕜, F)) x).target =
((extChartAt IB x.proj).target ∩
(extChartAt IB x.proj).symm ⁻¹' (trivializationAt F E x.proj).baseSet) ×ˢ univ := by
rw [FiberBundle.extChartAt, PartialEquiv.trans_target, Trivialization.target_eq, inter_prod]
rfl
theorem FiberBundle.writtenInExtChartAt_trivializationAt {x : TotalSpace F E} {y}
(hy : y ∈ (extChartAt (IB.prod 𝓘(𝕜, F)) x).target) :
writtenInExtChartAt (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) x
(trivializationAt F E x.proj) y = y :=
writtenInExtChartAt_chartAt_comp _ _ hy
theorem FiberBundle.writtenInExtChartAt_trivializationAt_symm {x : TotalSpace F E} {y}
(hy : y ∈ (extChartAt (IB.prod 𝓘(𝕜, F)) x).target) :
writtenInExtChartAt (IB.prod 𝓘(𝕜, F)) (IB.prod 𝓘(𝕜, F)) (trivializationAt F E x.proj x)
(trivializationAt F E x.proj).toPartialHomeomorph.symm y = y :=
writtenInExtChartAt_chartAt_symm_comp _ _ hy
namespace Bundle
variable {IB}
| Mathlib/Geometry/Manifold/VectorBundle/Basic.lean | 178 | 196 | theorem contMDiffWithinAt_totalSpace (f : M → TotalSpace F E) {s : Set M} {x₀ : M} :
ContMDiffWithinAt IM (IB.prod 𝓘(𝕜, F)) n f s x₀ ↔
ContMDiffWithinAt IM IB n (fun x => (f x).proj) s x₀ ∧
ContMDiffWithinAt IM 𝓘(𝕜, F) n (fun x ↦ (trivializationAt F E (f x₀).proj (f x)).2) s x₀ := by |
simp (config := { singlePass := true }) only [contMDiffWithinAt_iff_target]
rw [and_and_and_comm, ← FiberBundle.continuousWithinAt_totalSpace, and_congr_right_iff]
intro hf
simp_rw [modelWithCornersSelf_prod, FiberBundle.extChartAt, Function.comp,
PartialEquiv.trans_apply, PartialEquiv.prod_coe, PartialEquiv.refl_coe,
extChartAt_self_apply, modelWithCornersSelf_coe, Function.id_def, ← chartedSpaceSelf_prod]
refine (contMDiffWithinAt_prod_iff _).trans (and_congr ?_ Iff.rfl)
have h1 : (fun x => (f x).proj) ⁻¹' (trivializationAt F E (f x₀).proj).baseSet ∈ 𝓝[s] x₀ :=
((FiberBundle.continuous_proj F E).continuousWithinAt.comp hf (mapsTo_image f s))
((Trivialization.open_baseSet _).mem_nhds (mem_baseSet_trivializationAt F E _))
refine EventuallyEq.contMDiffWithinAt_iff (eventually_of_mem h1 fun x hx => ?_) ?_
· simp_rw [Function.comp, PartialHomeomorph.coe_coe, Trivialization.coe_coe]
rw [Trivialization.coe_fst']
exact hx
· simp only [mfld_simps]
| 1,881 |
import Mathlib.Geometry.Manifold.SmoothManifoldWithCorners
import Mathlib.Topology.Compactness.Paracompact
import Mathlib.Topology.Metrizable.Urysohn
#align_import geometry.manifold.metrizable from "leanprover-community/mathlib"@"d1bd9c5df2867c1cb463bc6364446d57bdd9f7f1"
open TopologicalSpace
| Mathlib/Geometry/Manifold/Metrizable.lean | 24 | 31 | theorem ManifoldWithCorners.metrizableSpace {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]
[FiniteDimensional ℝ E] {H : Type*} [TopologicalSpace H] (I : ModelWithCorners ℝ E H)
(M : Type*) [TopologicalSpace M] [ChartedSpace H M] [SigmaCompactSpace M] [T2Space M] :
MetrizableSpace M := by |
haveI := I.locallyCompactSpace; haveI := ChartedSpace.locallyCompactSpace H M
haveI := I.secondCountableTopology
haveI := ChartedSpace.secondCountable_of_sigma_compact H M
exact metrizableSpace_of_t3_second_countable M
| 1,882 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
namespace FDerivMeasurableAux
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ y ∈ ball x r', ∀ z ∈ ball x r', ‖f z - f y - L (z - y)‖ < ε * r }
#align fderiv_measurable_aux.A FDerivMeasurableAux.A
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align fderiv_measurable_aux.B FDerivMeasurableAux.B
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align fderiv_measurable_aux.D FDerivMeasurableAux.D
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 133 | 141 | theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by |
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le_of_lt hx')
intro y hy z hz
exact hr' y (B hy) z (B hz)
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
namespace FDerivMeasurableAux
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ y ∈ ball x r', ∀ z ∈ ball x r', ‖f z - f y - L (z - y)‖ < ε * r }
#align fderiv_measurable_aux.A FDerivMeasurableAux.A
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align fderiv_measurable_aux.B FDerivMeasurableAux.B
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align fderiv_measurable_aux.D FDerivMeasurableAux.D
theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le_of_lt hx')
intro y hy z hz
exact hr' y (B hy) z (B hz)
#align fderiv_measurable_aux.is_open_A FDerivMeasurableAux.isOpen_A
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 144 | 145 | theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε) := by |
simp [B, isOpen_biUnion, IsOpen.inter, isOpen_A]
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
namespace FDerivMeasurableAux
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ y ∈ ball x r', ∀ z ∈ ball x r', ‖f z - f y - L (z - y)‖ < ε * r }
#align fderiv_measurable_aux.A FDerivMeasurableAux.A
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align fderiv_measurable_aux.B FDerivMeasurableAux.B
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align fderiv_measurable_aux.D FDerivMeasurableAux.D
theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le_of_lt hx')
intro y hy z hz
exact hr' y (B hy) z (B hz)
#align fderiv_measurable_aux.is_open_A FDerivMeasurableAux.isOpen_A
theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε) := by
simp [B, isOpen_biUnion, IsOpen.inter, isOpen_A]
#align fderiv_measurable_aux.is_open_B FDerivMeasurableAux.isOpen_B
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 148 | 151 | theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by |
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans_le (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [mem_ball.1 hy, r'r.2, @dist_nonneg _ _ y x]
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
namespace FDerivMeasurableAux
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ y ∈ ball x r', ∀ z ∈ ball x r', ‖f z - f y - L (z - y)‖ < ε * r }
#align fderiv_measurable_aux.A FDerivMeasurableAux.A
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align fderiv_measurable_aux.B FDerivMeasurableAux.B
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align fderiv_measurable_aux.D FDerivMeasurableAux.D
theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le_of_lt hx')
intro y hy z hz
exact hr' y (B hy) z (B hz)
#align fderiv_measurable_aux.is_open_A FDerivMeasurableAux.isOpen_A
theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε) := by
simp [B, isOpen_biUnion, IsOpen.inter, isOpen_A]
#align fderiv_measurable_aux.is_open_B FDerivMeasurableAux.isOpen_B
theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans_le (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [mem_ball.1 hy, r'r.2, @dist_nonneg _ _ y x]
#align fderiv_measurable_aux.A_mono FDerivMeasurableAux.A_mono
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 154 | 159 | theorem le_of_mem_A {r ε : ℝ} {L : E →L[𝕜] F} {x : E} (hx : x ∈ A f L r ε) {y z : E}
(hy : y ∈ closedBall x (r / 2)) (hz : z ∈ closedBall x (r / 2)) :
‖f z - f y - L (z - y)‖ ≤ ε * r := by |
rcases hx with ⟨r', r'mem, hr'⟩
apply le_of_lt
exact hr' _ ((mem_closedBall.1 hy).trans_lt r'mem.1) _ ((mem_closedBall.1 hz).trans_lt r'mem.1)
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
namespace FDerivMeasurableAux
def A (f : E → F) (L : E →L[𝕜] F) (r ε : ℝ) : Set E :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ y ∈ ball x r', ∀ z ∈ ball x r', ‖f z - f y - L (z - y)‖ < ε * r }
#align fderiv_measurable_aux.A FDerivMeasurableAux.A
def B (f : E → F) (K : Set (E →L[𝕜] F)) (r s ε : ℝ) : Set E :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align fderiv_measurable_aux.B FDerivMeasurableAux.B
def D (f : E → F) (K : Set (E →L[𝕜] F)) : Set E :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align fderiv_measurable_aux.D FDerivMeasurableAux.D
theorem isOpen_A (L : E →L[𝕜] F) (r ε : ℝ) : IsOpen (A f L r ε) := by
rw [Metric.isOpen_iff]
rintro x ⟨r', r'_mem, hr'⟩
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between r'_mem.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le r'_mem.2)⟩
refine ⟨r' - s, by linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have B : ball x' s ⊆ ball x r' := ball_subset (le_of_lt hx')
intro y hy z hz
exact hr' y (B hy) z (B hz)
#align fderiv_measurable_aux.is_open_A FDerivMeasurableAux.isOpen_A
theorem isOpen_B {K : Set (E →L[𝕜] F)} {r s ε : ℝ} : IsOpen (B f K r s ε) := by
simp [B, isOpen_biUnion, IsOpen.inter, isOpen_A]
#align fderiv_measurable_aux.is_open_B FDerivMeasurableAux.isOpen_B
theorem A_mono (L : E →L[𝕜] F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans_le (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [mem_ball.1 hy, r'r.2, @dist_nonneg _ _ y x]
#align fderiv_measurable_aux.A_mono FDerivMeasurableAux.A_mono
theorem le_of_mem_A {r ε : ℝ} {L : E →L[𝕜] F} {x : E} (hx : x ∈ A f L r ε) {y z : E}
(hy : y ∈ closedBall x (r / 2)) (hz : z ∈ closedBall x (r / 2)) :
‖f z - f y - L (z - y)‖ ≤ ε * r := by
rcases hx with ⟨r', r'mem, hr'⟩
apply le_of_lt
exact hr' _ ((mem_closedBall.1 hy).trans_lt r'mem.1) _ ((mem_closedBall.1 hz).trans_lt r'mem.1)
#align fderiv_measurable_aux.le_of_mem_A FDerivMeasurableAux.le_of_mem_A
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 162 | 181 | theorem mem_A_of_differentiable {ε : ℝ} (hε : 0 < ε) {x : E} (hx : DifferentiableAt 𝕜 f x) :
∃ R > 0, ∀ r ∈ Ioo (0 : ℝ) R, x ∈ A f (fderiv 𝕜 f x) r ε := by |
let δ := (ε / 2) / 2
obtain ⟨R, R_pos, hR⟩ :
∃ R > 0, ∀ y ∈ ball x R, ‖f y - f x - fderiv 𝕜 f x (y - x)‖ ≤ δ * ‖y - x‖ :=
eventually_nhds_iff_ball.1 <| hx.hasFDerivAt.isLittleO.bound <| by positivity
refine ⟨R, R_pos, fun r hr => ?_⟩
have : r ∈ Ioc (r / 2) r := right_mem_Ioc.2 <| half_lt_self hr.1
refine ⟨r, this, fun y hy z hz => ?_⟩
calc
‖f z - f y - (fderiv 𝕜 f x) (z - y)‖ =
‖f z - f x - (fderiv 𝕜 f x) (z - x) - (f y - f x - (fderiv 𝕜 f x) (y - x))‖ := by
simp only [map_sub]; abel_nf
_ ≤ ‖f z - f x - (fderiv 𝕜 f x) (z - x)‖ + ‖f y - f x - (fderiv 𝕜 f x) (y - x)‖ :=
norm_sub_le _ _
_ ≤ δ * ‖z - x‖ + δ * ‖y - x‖ :=
add_le_add (hR _ (ball_subset_ball hr.2.le hz)) (hR _ (ball_subset_ball hr.2.le hy))
_ ≤ δ * r + δ * r := by rw [mem_ball_iff_norm] at hz hy; gcongr
_ = (ε / 2) * r := by ring
_ < ε * r := by gcongr; exacts [hr.1, half_lt_self hε]
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
section RightDeriv
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
variable {f : ℝ → F} (K : Set F)
namespace RightDerivMeasurableAux
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ᵉ (y ∈ Icc x (x + r')) (z ∈ Icc x (x + r')),
‖f z - f y - (z - y) • L‖ ≤ ε * r }
#align right_deriv_measurable_aux.A RightDerivMeasurableAux.A
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align right_deriv_measurable_aux.B RightDerivMeasurableAux.B
def D (f : ℝ → F) (K : Set F) : Set ℝ :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align right_deriv_measurable_aux.D RightDerivMeasurableAux.D
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 473 | 483 | theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by |
rcases hx with ⟨r', rr', hr'⟩
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have A : Icc x' (x' + s) ⊆ Icc x (x + r') := by
apply Icc_subset_Icc hx'.1.le
linarith [hx'.2]
intro y hy z hz
exact hr' y (A hy) z (A hz)
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
section RightDeriv
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
variable {f : ℝ → F} (K : Set F)
namespace RightDerivMeasurableAux
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ᵉ (y ∈ Icc x (x + r')) (z ∈ Icc x (x + r')),
‖f z - f y - (z - y) • L‖ ≤ ε * r }
#align right_deriv_measurable_aux.A RightDerivMeasurableAux.A
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align right_deriv_measurable_aux.B RightDerivMeasurableAux.B
def D (f : ℝ → F) (K : Set F) : Set ℝ :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align right_deriv_measurable_aux.D RightDerivMeasurableAux.D
theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by
rcases hx with ⟨r', rr', hr'⟩
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have A : Icc x' (x' + s) ⊆ Icc x (x + r') := by
apply Icc_subset_Icc hx'.1.le
linarith [hx'.2]
intro y hy z hz
exact hr' y (A hy) z (A hz)
#align right_deriv_measurable_aux.A_mem_nhds_within_Ioi RightDerivMeasurableAux.A_mem_nhdsWithin_Ioi
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 486 | 492 | theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) :
B f K r s ε ∈ 𝓝[>] x := by |
obtain ⟨L, LK, hL₁, hL₂⟩ : ∃ L : F, L ∈ K ∧ x ∈ A f L r ε ∧ x ∈ A f L s ε := by
simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx
filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hL₂] with y hy₁ hy₂
simp only [B, mem_iUnion, mem_inter_iff, exists_prop]
exact ⟨L, LK, hy₁, hy₂⟩
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
section RightDeriv
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
variable {f : ℝ → F} (K : Set F)
namespace RightDerivMeasurableAux
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ᵉ (y ∈ Icc x (x + r')) (z ∈ Icc x (x + r')),
‖f z - f y - (z - y) • L‖ ≤ ε * r }
#align right_deriv_measurable_aux.A RightDerivMeasurableAux.A
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align right_deriv_measurable_aux.B RightDerivMeasurableAux.B
def D (f : ℝ → F) (K : Set F) : Set ℝ :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align right_deriv_measurable_aux.D RightDerivMeasurableAux.D
theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by
rcases hx with ⟨r', rr', hr'⟩
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have A : Icc x' (x' + s) ⊆ Icc x (x + r') := by
apply Icc_subset_Icc hx'.1.le
linarith [hx'.2]
intro y hy z hz
exact hr' y (A hy) z (A hz)
#align right_deriv_measurable_aux.A_mem_nhds_within_Ioi RightDerivMeasurableAux.A_mem_nhdsWithin_Ioi
theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) :
B f K r s ε ∈ 𝓝[>] x := by
obtain ⟨L, LK, hL₁, hL₂⟩ : ∃ L : F, L ∈ K ∧ x ∈ A f L r ε ∧ x ∈ A f L s ε := by
simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx
filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hL₂] with y hy₁ hy₂
simp only [B, mem_iUnion, mem_inter_iff, exists_prop]
exact ⟨L, LK, hy₁, hy₂⟩
#align right_deriv_measurable_aux.B_mem_nhds_within_Ioi RightDerivMeasurableAux.B_mem_nhdsWithin_Ioi
theorem measurableSet_B {K : Set F} {r s ε : ℝ} : MeasurableSet (B f K r s ε) :=
measurableSet_of_mem_nhdsWithin_Ioi fun _ hx => B_mem_nhdsWithin_Ioi hx
#align right_deriv_measurable_aux.measurable_set_B RightDerivMeasurableAux.measurableSet_B
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 499 | 502 | theorem A_mono (L : F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by |
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [hy.1, hy.2, r'r.2]
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
section RightDeriv
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
variable {f : ℝ → F} (K : Set F)
namespace RightDerivMeasurableAux
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ᵉ (y ∈ Icc x (x + r')) (z ∈ Icc x (x + r')),
‖f z - f y - (z - y) • L‖ ≤ ε * r }
#align right_deriv_measurable_aux.A RightDerivMeasurableAux.A
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align right_deriv_measurable_aux.B RightDerivMeasurableAux.B
def D (f : ℝ → F) (K : Set F) : Set ℝ :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align right_deriv_measurable_aux.D RightDerivMeasurableAux.D
theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by
rcases hx with ⟨r', rr', hr'⟩
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have A : Icc x' (x' + s) ⊆ Icc x (x + r') := by
apply Icc_subset_Icc hx'.1.le
linarith [hx'.2]
intro y hy z hz
exact hr' y (A hy) z (A hz)
#align right_deriv_measurable_aux.A_mem_nhds_within_Ioi RightDerivMeasurableAux.A_mem_nhdsWithin_Ioi
theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) :
B f K r s ε ∈ 𝓝[>] x := by
obtain ⟨L, LK, hL₁, hL₂⟩ : ∃ L : F, L ∈ K ∧ x ∈ A f L r ε ∧ x ∈ A f L s ε := by
simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx
filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hL₂] with y hy₁ hy₂
simp only [B, mem_iUnion, mem_inter_iff, exists_prop]
exact ⟨L, LK, hy₁, hy₂⟩
#align right_deriv_measurable_aux.B_mem_nhds_within_Ioi RightDerivMeasurableAux.B_mem_nhdsWithin_Ioi
theorem measurableSet_B {K : Set F} {r s ε : ℝ} : MeasurableSet (B f K r s ε) :=
measurableSet_of_mem_nhdsWithin_Ioi fun _ hx => B_mem_nhdsWithin_Ioi hx
#align right_deriv_measurable_aux.measurable_set_B RightDerivMeasurableAux.measurableSet_B
theorem A_mono (L : F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [hy.1, hy.2, r'r.2]
#align right_deriv_measurable_aux.A_mono RightDerivMeasurableAux.A_mono
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 505 | 510 | theorem le_of_mem_A {r ε : ℝ} {L : F} {x : ℝ} (hx : x ∈ A f L r ε) {y z : ℝ}
(hy : y ∈ Icc x (x + r / 2)) (hz : z ∈ Icc x (x + r / 2)) :
‖f z - f y - (z - y) • L‖ ≤ ε * r := by |
rcases hx with ⟨r', r'mem, hr'⟩
have A : x + r / 2 ≤ x + r' := by linarith [r'mem.1]
exact hr' _ ((Icc_subset_Icc le_rfl A) hy) _ ((Icc_subset_Icc le_rfl A) hz)
| 1,883 |
import Mathlib.Analysis.Calculus.Deriv.Basic
import Mathlib.Analysis.Calculus.Deriv.Slope
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.MeasureTheory.Constructions.BorelSpace.ContinuousLinearMap
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Basic
#align_import analysis.calculus.fderiv_measurable from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
set_option linter.uppercaseLean3 false -- A B D
noncomputable section
open Set Metric Asymptotics Filter ContinuousLinearMap MeasureTheory TopologicalSpace
open scoped Topology
section fderiv
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F]
variable {f : E → F} (K : Set (E →L[𝕜] F))
section RightDeriv
variable {F : Type*} [NormedAddCommGroup F] [NormedSpace ℝ F]
variable {f : ℝ → F} (K : Set F)
namespace RightDerivMeasurableAux
def A (f : ℝ → F) (L : F) (r ε : ℝ) : Set ℝ :=
{ x | ∃ r' ∈ Ioc (r / 2) r, ∀ᵉ (y ∈ Icc x (x + r')) (z ∈ Icc x (x + r')),
‖f z - f y - (z - y) • L‖ ≤ ε * r }
#align right_deriv_measurable_aux.A RightDerivMeasurableAux.A
def B (f : ℝ → F) (K : Set F) (r s ε : ℝ) : Set ℝ :=
⋃ L ∈ K, A f L r ε ∩ A f L s ε
#align right_deriv_measurable_aux.B RightDerivMeasurableAux.B
def D (f : ℝ → F) (K : Set F) : Set ℝ :=
⋂ e : ℕ, ⋃ n : ℕ, ⋂ (p ≥ n) (q ≥ n), B f K ((1 / 2) ^ p) ((1 / 2) ^ q) ((1 / 2) ^ e)
#align right_deriv_measurable_aux.D RightDerivMeasurableAux.D
theorem A_mem_nhdsWithin_Ioi {L : F} {r ε x : ℝ} (hx : x ∈ A f L r ε) : A f L r ε ∈ 𝓝[>] x := by
rcases hx with ⟨r', rr', hr'⟩
rw [mem_nhdsWithin_Ioi_iff_exists_Ioo_subset]
obtain ⟨s, s_gt, s_lt⟩ : ∃ s : ℝ, r / 2 < s ∧ s < r' := exists_between rr'.1
have : s ∈ Ioc (r / 2) r := ⟨s_gt, le_of_lt (s_lt.trans_le rr'.2)⟩
refine ⟨x + r' - s, by simp only [mem_Ioi]; linarith, fun x' hx' => ⟨s, this, ?_⟩⟩
have A : Icc x' (x' + s) ⊆ Icc x (x + r') := by
apply Icc_subset_Icc hx'.1.le
linarith [hx'.2]
intro y hy z hz
exact hr' y (A hy) z (A hz)
#align right_deriv_measurable_aux.A_mem_nhds_within_Ioi RightDerivMeasurableAux.A_mem_nhdsWithin_Ioi
theorem B_mem_nhdsWithin_Ioi {K : Set F} {r s ε x : ℝ} (hx : x ∈ B f K r s ε) :
B f K r s ε ∈ 𝓝[>] x := by
obtain ⟨L, LK, hL₁, hL₂⟩ : ∃ L : F, L ∈ K ∧ x ∈ A f L r ε ∧ x ∈ A f L s ε := by
simpa only [B, mem_iUnion, mem_inter_iff, exists_prop] using hx
filter_upwards [A_mem_nhdsWithin_Ioi hL₁, A_mem_nhdsWithin_Ioi hL₂] with y hy₁ hy₂
simp only [B, mem_iUnion, mem_inter_iff, exists_prop]
exact ⟨L, LK, hy₁, hy₂⟩
#align right_deriv_measurable_aux.B_mem_nhds_within_Ioi RightDerivMeasurableAux.B_mem_nhdsWithin_Ioi
theorem measurableSet_B {K : Set F} {r s ε : ℝ} : MeasurableSet (B f K r s ε) :=
measurableSet_of_mem_nhdsWithin_Ioi fun _ hx => B_mem_nhdsWithin_Ioi hx
#align right_deriv_measurable_aux.measurable_set_B RightDerivMeasurableAux.measurableSet_B
theorem A_mono (L : F) (r : ℝ) {ε δ : ℝ} (h : ε ≤ δ) : A f L r ε ⊆ A f L r δ := by
rintro x ⟨r', r'r, hr'⟩
refine ⟨r', r'r, fun y hy z hz => (hr' y hy z hz).trans (mul_le_mul_of_nonneg_right h ?_)⟩
linarith [hy.1, hy.2, r'r.2]
#align right_deriv_measurable_aux.A_mono RightDerivMeasurableAux.A_mono
theorem le_of_mem_A {r ε : ℝ} {L : F} {x : ℝ} (hx : x ∈ A f L r ε) {y z : ℝ}
(hy : y ∈ Icc x (x + r / 2)) (hz : z ∈ Icc x (x + r / 2)) :
‖f z - f y - (z - y) • L‖ ≤ ε * r := by
rcases hx with ⟨r', r'mem, hr'⟩
have A : x + r / 2 ≤ x + r' := by linarith [r'mem.1]
exact hr' _ ((Icc_subset_Icc le_rfl A) hy) _ ((Icc_subset_Icc le_rfl A) hz)
#align right_deriv_measurable_aux.le_of_mem_A RightDerivMeasurableAux.le_of_mem_A
| Mathlib/Analysis/Calculus/FDeriv/Measurable.lean | 513 | 538 | theorem mem_A_of_differentiable {ε : ℝ} (hε : 0 < ε) {x : ℝ}
(hx : DifferentiableWithinAt ℝ f (Ici x) x) :
∃ R > 0, ∀ r ∈ Ioo (0 : ℝ) R, x ∈ A f (derivWithin f (Ici x) x) r ε := by |
have := hx.hasDerivWithinAt
simp_rw [hasDerivWithinAt_iff_isLittleO, isLittleO_iff] at this
rcases mem_nhdsWithin_Ici_iff_exists_Ico_subset.1 (this (half_pos hε)) with ⟨m, xm, hm⟩
refine ⟨m - x, by linarith [show x < m from xm], fun r hr => ?_⟩
have : r ∈ Ioc (r / 2) r := ⟨half_lt_self hr.1, le_rfl⟩
refine ⟨r, this, fun y hy z hz => ?_⟩
calc
‖f z - f y - (z - y) • derivWithin f (Ici x) x‖ =
‖f z - f x - (z - x) • derivWithin f (Ici x) x -
(f y - f x - (y - x) • derivWithin f (Ici x) x)‖ := by
congr 1; simp only [sub_smul]; abel
_ ≤
‖f z - f x - (z - x) • derivWithin f (Ici x) x‖ +
‖f y - f x - (y - x) • derivWithin f (Ici x) x‖ :=
(norm_sub_le _ _)
_ ≤ ε / 2 * ‖z - x‖ + ε / 2 * ‖y - x‖ :=
(add_le_add (hm ⟨hz.1, hz.2.trans_lt (by linarith [hr.2])⟩)
(hm ⟨hy.1, hy.2.trans_lt (by linarith [hr.2])⟩))
_ ≤ ε / 2 * r + ε / 2 * r := by
gcongr
· rw [Real.norm_of_nonneg] <;> linarith [hz.1, hz.2]
· rw [Real.norm_of_nonneg] <;> linarith [hy.1, hy.2]
_ = ε * r := by ring
| 1,883 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 33 | 38 | theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by |
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
| 1,884 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 40 | 45 | theorem measurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun x ↦ lineDeriv 𝕜 f x v) := by |
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (measurable_deriv_with_param hg).comp measurable_prod_mk_right
| 1,884 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
theorem measurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (measurable_deriv_with_param hg).comp measurable_prod_mk_right
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 47 | 52 | theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) :
StronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) := by |
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (stronglyMeasurable_deriv_with_param hg).comp_measurable measurable_prod_mk_right
| 1,884 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
theorem measurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (measurable_deriv_with_param hg).comp measurable_prod_mk_right
theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) :
StronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (stronglyMeasurable_deriv_with_param hg).comp_measurable measurable_prod_mk_right
theorem aemeasurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) (μ : Measure E) :
AEMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(measurable_lineDeriv hf).aemeasurable
theorem aestronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F]
(hf : Continuous f) (μ : Measure E) :
AEStronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(stronglyMeasurable_lineDeriv hf).aestronglyMeasurable
variable [SecondCountableTopology E]
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 72 | 81 | theorem measurableSet_lineDifferentiableAt_uncurry (hf : Continuous f) :
MeasurableSet {p : E × E | LineDifferentiableAt 𝕜 f p.1 p.2} := by |
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
have M_meas : MeasurableSet {q : (E × E) × 𝕜 | DifferentiableAt 𝕜 (g q.1) q.2} :=
measurableSet_of_differentiableAt_with_param 𝕜 this
exact measurable_prod_mk_right M_meas
| 1,884 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
theorem measurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (measurable_deriv_with_param hg).comp measurable_prod_mk_right
theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) :
StronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (stronglyMeasurable_deriv_with_param hg).comp_measurable measurable_prod_mk_right
theorem aemeasurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) (μ : Measure E) :
AEMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(measurable_lineDeriv hf).aemeasurable
theorem aestronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F]
(hf : Continuous f) (μ : Measure E) :
AEStronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(stronglyMeasurable_lineDeriv hf).aestronglyMeasurable
variable [SecondCountableTopology E]
theorem measurableSet_lineDifferentiableAt_uncurry (hf : Continuous f) :
MeasurableSet {p : E × E | LineDifferentiableAt 𝕜 f p.1 p.2} := by
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
have M_meas : MeasurableSet {q : (E × E) × 𝕜 | DifferentiableAt 𝕜 (g q.1) q.2} :=
measurableSet_of_differentiableAt_with_param 𝕜 this
exact measurable_prod_mk_right M_meas
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 83 | 90 | theorem measurable_lineDeriv_uncurry [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun (p : E × E) ↦ lineDeriv 𝕜 f p.1 p.2) := by |
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
exact (measurable_deriv_with_param this).comp measurable_prod_mk_right
| 1,884 |
import Mathlib.Analysis.Calculus.LineDeriv.Basic
import Mathlib.Analysis.Calculus.FDeriv.Measurable
open MeasureTheory
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜] [LocallyCompactSpace 𝕜]
{E : Type*} [NormedAddCommGroup E] [NormedSpace 𝕜 E] [MeasurableSpace E] [OpensMeasurableSpace E]
{F : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] [CompleteSpace F]
{f : E → F} {v : E}
theorem measurableSet_lineDifferentiableAt (hf : Continuous f) :
MeasurableSet {x : E | LineDifferentiableAt 𝕜 f x v} := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact measurable_prod_mk_right (measurableSet_of_differentiableAt_with_param 𝕜 hg)
theorem measurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (measurable_deriv_with_param hg).comp measurable_prod_mk_right
theorem stronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F] (hf : Continuous f) :
StronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) := by
borelize 𝕜
let g : E → 𝕜 → F := fun x t ↦ f (x + t • v)
have hg : Continuous g.uncurry := by apply hf.comp; continuity
exact (stronglyMeasurable_deriv_with_param hg).comp_measurable measurable_prod_mk_right
theorem aemeasurable_lineDeriv [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) (μ : Measure E) :
AEMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(measurable_lineDeriv hf).aemeasurable
theorem aestronglyMeasurable_lineDeriv [SecondCountableTopologyEither E F]
(hf : Continuous f) (μ : Measure E) :
AEStronglyMeasurable (fun x ↦ lineDeriv 𝕜 f x v) μ :=
(stronglyMeasurable_lineDeriv hf).aestronglyMeasurable
variable [SecondCountableTopology E]
theorem measurableSet_lineDifferentiableAt_uncurry (hf : Continuous f) :
MeasurableSet {p : E × E | LineDifferentiableAt 𝕜 f p.1 p.2} := by
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
have M_meas : MeasurableSet {q : (E × E) × 𝕜 | DifferentiableAt 𝕜 (g q.1) q.2} :=
measurableSet_of_differentiableAt_with_param 𝕜 this
exact measurable_prod_mk_right M_meas
theorem measurable_lineDeriv_uncurry [MeasurableSpace F] [BorelSpace F]
(hf : Continuous f) : Measurable (fun (p : E × E) ↦ lineDeriv 𝕜 f p.1 p.2) := by
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
exact (measurable_deriv_with_param this).comp measurable_prod_mk_right
| Mathlib/Analysis/Calculus/LineDeriv/Measurable.lean | 92 | 99 | theorem stronglyMeasurable_lineDeriv_uncurry (hf : Continuous f) :
StronglyMeasurable (fun (p : E × E) ↦ lineDeriv 𝕜 f p.1 p.2) := by |
borelize 𝕜
let g : (E × E) → 𝕜 → F := fun p t ↦ f (p.1 + t • p.2)
have : Continuous g.uncurry :=
hf.comp <| (continuous_fst.comp continuous_fst).add
<| continuous_snd.smul (continuous_snd.comp continuous_fst)
exact (stronglyMeasurable_deriv_with_param this).comp_measurable measurable_prod_mk_right
| 1,884 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Function Set Filter
open scoped Topology Filter
variable {E X : Type*}
structure ContDiffBump (c : E) where
(rIn rOut : ℝ)
rIn_pos : 0 < rIn
rIn_lt_rOut : rIn < rOut
#align cont_diff_bump ContDiffBump
#align cont_diff_bump.r ContDiffBump.rIn
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R ContDiffBump.rOut
#align cont_diff_bump.r_pos ContDiffBump.rIn_pos
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.r_lt_R ContDiffBump.rIn_lt_rOut
-- Porting note(#5171): linter not yet ported; was @[nolint has_nonempty_instance]
structure ContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where
toFun : ℝ → E → ℝ
mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Icc (0 : ℝ) 1
symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x
smooth : ContDiffOn ℝ ⊤ (uncurry toFun) (Ioi (1 : ℝ) ×ˢ (univ : Set E))
eq_one : ∀ R : ℝ, 1 < R → ∀ x : E, ‖x‖ ≤ 1 → toFun R x = 1
support : ∀ R : ℝ, 1 < R → Function.support (toFun R) = Metric.ball (0 : E) R
#align cont_diff_bump_base ContDiffBumpBase
class HasContDiffBump (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] : Prop where
out : Nonempty (ContDiffBumpBase E)
#align has_cont_diff_bump HasContDiffBump
def someContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E]
[hb : HasContDiffBump E] : ContDiffBumpBase E :=
Nonempty.some hb.out
#align some_cont_diff_bump_base someContDiffBumpBase
namespace ContDiffBump
theorem rOut_pos {c : E} (f : ContDiffBump c) : 0 < f.rOut :=
f.rIn_pos.trans f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R_pos ContDiffBump.rOut_pos
| Mathlib/Analysis/Calculus/BumpFunction/Basic.lean | 118 | 120 | theorem one_lt_rOut_div_rIn {c : E} (f : ContDiffBump c) : 1 < f.rOut / f.rIn := by |
rw [one_lt_div f.rIn_pos]
exact f.rIn_lt_rOut
| 1,885 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Function Set Filter
open scoped Topology Filter
variable {E X : Type*}
structure ContDiffBump (c : E) where
(rIn rOut : ℝ)
rIn_pos : 0 < rIn
rIn_lt_rOut : rIn < rOut
#align cont_diff_bump ContDiffBump
#align cont_diff_bump.r ContDiffBump.rIn
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R ContDiffBump.rOut
#align cont_diff_bump.r_pos ContDiffBump.rIn_pos
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.r_lt_R ContDiffBump.rIn_lt_rOut
-- Porting note(#5171): linter not yet ported; was @[nolint has_nonempty_instance]
structure ContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where
toFun : ℝ → E → ℝ
mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Icc (0 : ℝ) 1
symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x
smooth : ContDiffOn ℝ ⊤ (uncurry toFun) (Ioi (1 : ℝ) ×ˢ (univ : Set E))
eq_one : ∀ R : ℝ, 1 < R → ∀ x : E, ‖x‖ ≤ 1 → toFun R x = 1
support : ∀ R : ℝ, 1 < R → Function.support (toFun R) = Metric.ball (0 : E) R
#align cont_diff_bump_base ContDiffBumpBase
class HasContDiffBump (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] : Prop where
out : Nonempty (ContDiffBumpBase E)
#align has_cont_diff_bump HasContDiffBump
def someContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E]
[hb : HasContDiffBump E] : ContDiffBumpBase E :=
Nonempty.some hb.out
#align some_cont_diff_bump_base someContDiffBumpBase
namespace ContDiffBump
theorem rOut_pos {c : E} (f : ContDiffBump c) : 0 < f.rOut :=
f.rIn_pos.trans f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R_pos ContDiffBump.rOut_pos
theorem one_lt_rOut_div_rIn {c : E} (f : ContDiffBump c) : 1 < f.rOut / f.rIn := by
rw [one_lt_div f.rIn_pos]
exact f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.one_lt_R_div_r ContDiffBump.one_lt_rOut_div_rIn
instance (c : E) : Inhabited (ContDiffBump c) :=
⟨⟨1, 2, zero_lt_one, one_lt_two⟩⟩
variable [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup X] [NormedSpace ℝ X]
[HasContDiffBump E] {c : E} (f : ContDiffBump c) {x : E} {n : ℕ∞}
@[coe] def toFun {c : E} (f : ContDiffBump c) : E → ℝ :=
(someContDiffBumpBase E).toFun (f.rOut / f.rIn) ∘ fun x ↦ (f.rIn⁻¹ • (x - c))
#align cont_diff_bump.to_fun ContDiffBump.toFun
instance : CoeFun (ContDiffBump c) fun _ => E → ℝ :=
⟨toFun⟩
protected theorem apply (x : E) :
f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c)) :=
rfl
#align cont_diff_bump.def ContDiffBump.apply
protected theorem sub (x : E) : f (c - x) = f (c + x) := by
simp [f.apply, ContDiffBumpBase.symmetric]
#align cont_diff_bump.sub ContDiffBump.sub
protected theorem neg (f : ContDiffBump (0 : E)) (x : E) : f (-x) = f x := by
simp_rw [← zero_sub, f.sub, zero_add]
#align cont_diff_bump.neg ContDiffBump.neg
open Metric
| Mathlib/Analysis/Calculus/BumpFunction/Basic.lean | 154 | 157 | theorem one_of_mem_closedBall (hx : x ∈ closedBall c f.rIn) : f x = 1 := by |
apply ContDiffBumpBase.eq_one _ _ f.one_lt_rOut_div_rIn
simpa only [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_nonneg f.rIn_pos.le, ← div_eq_inv_mul,
div_le_one f.rIn_pos] using mem_closedBall_iff_norm.1 hx
| 1,885 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Function Set Filter
open scoped Topology Filter
variable {E X : Type*}
structure ContDiffBump (c : E) where
(rIn rOut : ℝ)
rIn_pos : 0 < rIn
rIn_lt_rOut : rIn < rOut
#align cont_diff_bump ContDiffBump
#align cont_diff_bump.r ContDiffBump.rIn
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R ContDiffBump.rOut
#align cont_diff_bump.r_pos ContDiffBump.rIn_pos
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.r_lt_R ContDiffBump.rIn_lt_rOut
-- Porting note(#5171): linter not yet ported; was @[nolint has_nonempty_instance]
structure ContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where
toFun : ℝ → E → ℝ
mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Icc (0 : ℝ) 1
symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x
smooth : ContDiffOn ℝ ⊤ (uncurry toFun) (Ioi (1 : ℝ) ×ˢ (univ : Set E))
eq_one : ∀ R : ℝ, 1 < R → ∀ x : E, ‖x‖ ≤ 1 → toFun R x = 1
support : ∀ R : ℝ, 1 < R → Function.support (toFun R) = Metric.ball (0 : E) R
#align cont_diff_bump_base ContDiffBumpBase
class HasContDiffBump (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] : Prop where
out : Nonempty (ContDiffBumpBase E)
#align has_cont_diff_bump HasContDiffBump
def someContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E]
[hb : HasContDiffBump E] : ContDiffBumpBase E :=
Nonempty.some hb.out
#align some_cont_diff_bump_base someContDiffBumpBase
namespace ContDiffBump
theorem rOut_pos {c : E} (f : ContDiffBump c) : 0 < f.rOut :=
f.rIn_pos.trans f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R_pos ContDiffBump.rOut_pos
theorem one_lt_rOut_div_rIn {c : E} (f : ContDiffBump c) : 1 < f.rOut / f.rIn := by
rw [one_lt_div f.rIn_pos]
exact f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.one_lt_R_div_r ContDiffBump.one_lt_rOut_div_rIn
instance (c : E) : Inhabited (ContDiffBump c) :=
⟨⟨1, 2, zero_lt_one, one_lt_two⟩⟩
variable [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup X] [NormedSpace ℝ X]
[HasContDiffBump E] {c : E} (f : ContDiffBump c) {x : E} {n : ℕ∞}
@[coe] def toFun {c : E} (f : ContDiffBump c) : E → ℝ :=
(someContDiffBumpBase E).toFun (f.rOut / f.rIn) ∘ fun x ↦ (f.rIn⁻¹ • (x - c))
#align cont_diff_bump.to_fun ContDiffBump.toFun
instance : CoeFun (ContDiffBump c) fun _ => E → ℝ :=
⟨toFun⟩
protected theorem apply (x : E) :
f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c)) :=
rfl
#align cont_diff_bump.def ContDiffBump.apply
protected theorem sub (x : E) : f (c - x) = f (c + x) := by
simp [f.apply, ContDiffBumpBase.symmetric]
#align cont_diff_bump.sub ContDiffBump.sub
protected theorem neg (f : ContDiffBump (0 : E)) (x : E) : f (-x) = f x := by
simp_rw [← zero_sub, f.sub, zero_add]
#align cont_diff_bump.neg ContDiffBump.neg
open Metric
theorem one_of_mem_closedBall (hx : x ∈ closedBall c f.rIn) : f x = 1 := by
apply ContDiffBumpBase.eq_one _ _ f.one_lt_rOut_div_rIn
simpa only [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_nonneg f.rIn_pos.le, ← div_eq_inv_mul,
div_le_one f.rIn_pos] using mem_closedBall_iff_norm.1 hx
#align cont_diff_bump.one_of_mem_closed_ball ContDiffBump.one_of_mem_closedBall
theorem nonneg : 0 ≤ f x :=
(ContDiffBumpBase.mem_Icc (someContDiffBumpBase E) _ _).1
#align cont_diff_bump.nonneg ContDiffBump.nonneg
theorem nonneg' (x : E) : 0 ≤ f x := f.nonneg
#align cont_diff_bump.nonneg' ContDiffBump.nonneg'
theorem le_one : f x ≤ 1 :=
(ContDiffBumpBase.mem_Icc (someContDiffBumpBase E) _ _).2
#align cont_diff_bump.le_one ContDiffBump.le_one
| Mathlib/Analysis/Calculus/BumpFunction/Basic.lean | 172 | 176 | theorem support_eq : Function.support f = Metric.ball c f.rOut := by |
simp only [toFun, support_comp_eq_preimage, ContDiffBumpBase.support _ _ f.one_lt_rOut_div_rIn]
ext x
simp only [mem_ball_iff_norm, sub_zero, norm_smul, mem_preimage, Real.norm_eq_abs, abs_inv,
abs_of_pos f.rIn_pos, ← div_eq_inv_mul, div_lt_div_right f.rIn_pos]
| 1,885 |
import Mathlib.Analysis.Calculus.ContDiff.Basic
import Mathlib.Analysis.NormedSpace.FiniteDimension
#align_import analysis.calculus.bump_function_inner from "leanprover-community/mathlib"@"3bce8d800a6f2b8f63fe1e588fd76a9ff4adcebe"
noncomputable section
open Function Set Filter
open scoped Topology Filter
variable {E X : Type*}
structure ContDiffBump (c : E) where
(rIn rOut : ℝ)
rIn_pos : 0 < rIn
rIn_lt_rOut : rIn < rOut
#align cont_diff_bump ContDiffBump
#align cont_diff_bump.r ContDiffBump.rIn
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R ContDiffBump.rOut
#align cont_diff_bump.r_pos ContDiffBump.rIn_pos
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.r_lt_R ContDiffBump.rIn_lt_rOut
-- Porting note(#5171): linter not yet ported; was @[nolint has_nonempty_instance]
structure ContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] where
toFun : ℝ → E → ℝ
mem_Icc : ∀ (R : ℝ) (x : E), toFun R x ∈ Icc (0 : ℝ) 1
symmetric : ∀ (R : ℝ) (x : E), toFun R (-x) = toFun R x
smooth : ContDiffOn ℝ ⊤ (uncurry toFun) (Ioi (1 : ℝ) ×ˢ (univ : Set E))
eq_one : ∀ R : ℝ, 1 < R → ∀ x : E, ‖x‖ ≤ 1 → toFun R x = 1
support : ∀ R : ℝ, 1 < R → Function.support (toFun R) = Metric.ball (0 : E) R
#align cont_diff_bump_base ContDiffBumpBase
class HasContDiffBump (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E] : Prop where
out : Nonempty (ContDiffBumpBase E)
#align has_cont_diff_bump HasContDiffBump
def someContDiffBumpBase (E : Type*) [NormedAddCommGroup E] [NormedSpace ℝ E]
[hb : HasContDiffBump E] : ContDiffBumpBase E :=
Nonempty.some hb.out
#align some_cont_diff_bump_base someContDiffBumpBase
namespace ContDiffBump
theorem rOut_pos {c : E} (f : ContDiffBump c) : 0 < f.rOut :=
f.rIn_pos.trans f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.R_pos ContDiffBump.rOut_pos
theorem one_lt_rOut_div_rIn {c : E} (f : ContDiffBump c) : 1 < f.rOut / f.rIn := by
rw [one_lt_div f.rIn_pos]
exact f.rIn_lt_rOut
set_option linter.uppercaseLean3 false in
#align cont_diff_bump.one_lt_R_div_r ContDiffBump.one_lt_rOut_div_rIn
instance (c : E) : Inhabited (ContDiffBump c) :=
⟨⟨1, 2, zero_lt_one, one_lt_two⟩⟩
variable [NormedAddCommGroup E] [NormedSpace ℝ E] [NormedAddCommGroup X] [NormedSpace ℝ X]
[HasContDiffBump E] {c : E} (f : ContDiffBump c) {x : E} {n : ℕ∞}
@[coe] def toFun {c : E} (f : ContDiffBump c) : E → ℝ :=
(someContDiffBumpBase E).toFun (f.rOut / f.rIn) ∘ fun x ↦ (f.rIn⁻¹ • (x - c))
#align cont_diff_bump.to_fun ContDiffBump.toFun
instance : CoeFun (ContDiffBump c) fun _ => E → ℝ :=
⟨toFun⟩
protected theorem apply (x : E) :
f x = (someContDiffBumpBase E).toFun (f.rOut / f.rIn) (f.rIn⁻¹ • (x - c)) :=
rfl
#align cont_diff_bump.def ContDiffBump.apply
protected theorem sub (x : E) : f (c - x) = f (c + x) := by
simp [f.apply, ContDiffBumpBase.symmetric]
#align cont_diff_bump.sub ContDiffBump.sub
protected theorem neg (f : ContDiffBump (0 : E)) (x : E) : f (-x) = f x := by
simp_rw [← zero_sub, f.sub, zero_add]
#align cont_diff_bump.neg ContDiffBump.neg
open Metric
theorem one_of_mem_closedBall (hx : x ∈ closedBall c f.rIn) : f x = 1 := by
apply ContDiffBumpBase.eq_one _ _ f.one_lt_rOut_div_rIn
simpa only [norm_smul, Real.norm_eq_abs, abs_inv, abs_of_nonneg f.rIn_pos.le, ← div_eq_inv_mul,
div_le_one f.rIn_pos] using mem_closedBall_iff_norm.1 hx
#align cont_diff_bump.one_of_mem_closed_ball ContDiffBump.one_of_mem_closedBall
theorem nonneg : 0 ≤ f x :=
(ContDiffBumpBase.mem_Icc (someContDiffBumpBase E) _ _).1
#align cont_diff_bump.nonneg ContDiffBump.nonneg
theorem nonneg' (x : E) : 0 ≤ f x := f.nonneg
#align cont_diff_bump.nonneg' ContDiffBump.nonneg'
theorem le_one : f x ≤ 1 :=
(ContDiffBumpBase.mem_Icc (someContDiffBumpBase E) _ _).2
#align cont_diff_bump.le_one ContDiffBump.le_one
theorem support_eq : Function.support f = Metric.ball c f.rOut := by
simp only [toFun, support_comp_eq_preimage, ContDiffBumpBase.support _ _ f.one_lt_rOut_div_rIn]
ext x
simp only [mem_ball_iff_norm, sub_zero, norm_smul, mem_preimage, Real.norm_eq_abs, abs_inv,
abs_of_pos f.rIn_pos, ← div_eq_inv_mul, div_lt_div_right f.rIn_pos]
#align cont_diff_bump.support_eq ContDiffBump.support_eq
| Mathlib/Analysis/Calculus/BumpFunction/Basic.lean | 179 | 180 | theorem tsupport_eq : tsupport f = closedBall c f.rOut := by |
simp_rw [tsupport, f.support_eq, closure_ball _ f.rOut_pos.ne']
| 1,885 |
import Mathlib.Analysis.NormedSpace.FiniteDimension
import Mathlib.Analysis.RCLike.Basic
#align_import data.is_R_or_C.lemmas from "leanprover-community/mathlib"@"468b141b14016d54b479eb7a0fff1e360b7e3cf6"
variable {K E : Type*} [RCLike K]
namespace RCLike
@[simp, rclike_simps]
| Mathlib/Analysis/RCLike/Lemmas.lean | 71 | 74 | theorem reCLM_norm : ‖(reCLM : K →L[ℝ] ℝ)‖ = 1 := by |
apply le_antisymm (LinearMap.mkContinuous_norm_le _ zero_le_one _)
convert ContinuousLinearMap.ratio_le_opNorm (reCLM : K →L[ℝ] ℝ) (1 : K)
simp
| 1,886 |
import Mathlib.Analysis.Convex.Cone.Extension
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Analysis.NormedSpace.Extend
import Mathlib.Analysis.RCLike.Lemmas
#align_import analysis.normed_space.hahn_banach.extension from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
universe u v
namespace Real
variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace ℝ E]
| Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean | 44 | 59 | theorem exists_extension_norm_eq (p : Subspace ℝ E) (f : p →L[ℝ] ℝ) :
∃ g : E →L[ℝ] ℝ, (∀ x : p, g x = f x) ∧ ‖g‖ = ‖f‖ := by |
rcases exists_extension_of_le_sublinear ⟨p, f⟩ (fun x => ‖f‖ * ‖x‖)
(fun c hc x => by simp only [norm_smul c x, Real.norm_eq_abs, abs_of_pos hc, mul_left_comm])
(fun x y => by -- Porting note: placeholder filled here
rw [← left_distrib]
exact mul_le_mul_of_nonneg_left (norm_add_le x y) (@norm_nonneg _ _ f))
fun x => le_trans (le_abs_self _) (f.le_opNorm _) with ⟨g, g_eq, g_le⟩
set g' :=
g.mkContinuous ‖f‖ fun x => abs_le.2 ⟨neg_le.1 <| g.map_neg x ▸ norm_neg x ▸ g_le (-x), g_le x⟩
refine ⟨g', g_eq, ?_⟩
apply le_antisymm (g.mkContinuous_norm_le (norm_nonneg f) _)
refine f.opNorm_le_bound (norm_nonneg _) fun x => ?_
dsimp at g_eq
rw [← g_eq]
apply g'.le_opNorm
| 1,887 |
import Mathlib.Analysis.Convex.Cone.Extension
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Analysis.NormedSpace.Extend
import Mathlib.Analysis.RCLike.Lemmas
#align_import analysis.normed_space.hahn_banach.extension from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
universe u v
section DualVector
variable (𝕜 : Type v) [RCLike 𝕜]
variable {E : Type u} [NormedAddCommGroup E] [NormedSpace 𝕜 E]
open ContinuousLinearEquiv Submodule
open scoped Classical
| Mathlib/Analysis/NormedSpace/HahnBanach/Extension.lean | 151 | 163 | theorem coord_norm' {x : E} (h : x ≠ 0) : ‖(‖x‖ : 𝕜) • coord 𝕜 x h‖ = 1 := by |
#adaptation_note
/--
`set_option maxSynthPendingDepth 2` required after https://github.com/leanprover/lean4/pull/4119
Alternatively, we can add:
```
let X : SeminormedAddCommGroup (↥(span 𝕜 {x}) →L[𝕜] 𝕜) := inferInstance
have : BoundedSMul 𝕜 (↥(span 𝕜 {x}) →L[𝕜] 𝕜) := @NormedSpace.boundedSMul 𝕜 _ _ X _
```
-/
set_option maxSynthPendingDepth 2 in
rw [norm_smul (α := 𝕜) (x := coord 𝕜 x h), RCLike.norm_coe_norm, coord_norm,
mul_inv_cancel (mt norm_eq_zero.mp h)]
| 1,887 |
import Mathlib.Analysis.NormedSpace.HahnBanach.Extension
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Analysis.LocallyConvex.Polar
#align_import analysis.normed_space.dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Bornology
universe u v
namespace NormedSpace
section General
variable (𝕜 : Type*) [NontriviallyNormedField 𝕜]
variable (E : Type*) [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
variable (F : Type*) [NormedAddCommGroup F] [NormedSpace 𝕜 F]
abbrev Dual : Type _ := E →L[𝕜] 𝕜
#align normed_space.dual NormedSpace.Dual
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_eq until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : NormedSpace 𝕜 (Dual 𝕜 E) := inferInstance
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_le until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : SeminormedAddCommGroup (Dual 𝕜 E) := inferInstance
def inclusionInDoubleDual : E →L[𝕜] Dual 𝕜 (Dual 𝕜 E) :=
ContinuousLinearMap.apply 𝕜 𝕜
#align normed_space.inclusion_in_double_dual NormedSpace.inclusionInDoubleDual
@[simp]
theorem dual_def (x : E) (f : Dual 𝕜 E) : inclusionInDoubleDual 𝕜 E x f = f x :=
rfl
#align normed_space.dual_def NormedSpace.dual_def
theorem inclusionInDoubleDual_norm_eq :
‖inclusionInDoubleDual 𝕜 E‖ = ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖ :=
ContinuousLinearMap.opNorm_flip _
#align normed_space.inclusion_in_double_dual_norm_eq NormedSpace.inclusionInDoubleDual_norm_eq
| Mathlib/Analysis/NormedSpace/Dual.lean | 82 | 84 | theorem inclusionInDoubleDual_norm_le : ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1 := by |
rw [inclusionInDoubleDual_norm_eq]
exact ContinuousLinearMap.norm_id_le
| 1,888 |
import Mathlib.Analysis.NormedSpace.HahnBanach.Extension
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Analysis.LocallyConvex.Polar
#align_import analysis.normed_space.dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Bornology
universe u v
namespace NormedSpace
section General
variable (𝕜 : Type*) [NontriviallyNormedField 𝕜]
variable (E : Type*) [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
variable (F : Type*) [NormedAddCommGroup F] [NormedSpace 𝕜 F]
abbrev Dual : Type _ := E →L[𝕜] 𝕜
#align normed_space.dual NormedSpace.Dual
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_eq until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : NormedSpace 𝕜 (Dual 𝕜 E) := inferInstance
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_le until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : SeminormedAddCommGroup (Dual 𝕜 E) := inferInstance
def inclusionInDoubleDual : E →L[𝕜] Dual 𝕜 (Dual 𝕜 E) :=
ContinuousLinearMap.apply 𝕜 𝕜
#align normed_space.inclusion_in_double_dual NormedSpace.inclusionInDoubleDual
@[simp]
theorem dual_def (x : E) (f : Dual 𝕜 E) : inclusionInDoubleDual 𝕜 E x f = f x :=
rfl
#align normed_space.dual_def NormedSpace.dual_def
theorem inclusionInDoubleDual_norm_eq :
‖inclusionInDoubleDual 𝕜 E‖ = ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖ :=
ContinuousLinearMap.opNorm_flip _
#align normed_space.inclusion_in_double_dual_norm_eq NormedSpace.inclusionInDoubleDual_norm_eq
theorem inclusionInDoubleDual_norm_le : ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1 := by
rw [inclusionInDoubleDual_norm_eq]
exact ContinuousLinearMap.norm_id_le
#align normed_space.inclusion_in_double_dual_norm_le NormedSpace.inclusionInDoubleDual_norm_le
| Mathlib/Analysis/NormedSpace/Dual.lean | 87 | 88 | theorem double_dual_bound (x : E) : ‖(inclusionInDoubleDual 𝕜 E) x‖ ≤ ‖x‖ := by |
simpa using ContinuousLinearMap.le_of_opNorm_le _ (inclusionInDoubleDual_norm_le 𝕜 E) x
| 1,888 |
import Mathlib.Analysis.NormedSpace.HahnBanach.Extension
import Mathlib.Analysis.NormedSpace.RCLike
import Mathlib.Analysis.LocallyConvex.Polar
#align_import analysis.normed_space.dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open scoped Classical
open Topology Bornology
universe u v
namespace NormedSpace
section General
variable (𝕜 : Type*) [NontriviallyNormedField 𝕜]
variable (E : Type*) [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
variable (F : Type*) [NormedAddCommGroup F] [NormedSpace 𝕜 F]
abbrev Dual : Type _ := E →L[𝕜] 𝕜
#align normed_space.dual NormedSpace.Dual
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_eq until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : NormedSpace 𝕜 (Dual 𝕜 E) := inferInstance
-- TODO: helper instance for elaboration of inclusionInDoubleDual_norm_le until
-- leanprover/lean4#2522 is resolved; remove once fixed
instance : SeminormedAddCommGroup (Dual 𝕜 E) := inferInstance
def inclusionInDoubleDual : E →L[𝕜] Dual 𝕜 (Dual 𝕜 E) :=
ContinuousLinearMap.apply 𝕜 𝕜
#align normed_space.inclusion_in_double_dual NormedSpace.inclusionInDoubleDual
@[simp]
theorem dual_def (x : E) (f : Dual 𝕜 E) : inclusionInDoubleDual 𝕜 E x f = f x :=
rfl
#align normed_space.dual_def NormedSpace.dual_def
theorem inclusionInDoubleDual_norm_eq :
‖inclusionInDoubleDual 𝕜 E‖ = ‖ContinuousLinearMap.id 𝕜 (Dual 𝕜 E)‖ :=
ContinuousLinearMap.opNorm_flip _
#align normed_space.inclusion_in_double_dual_norm_eq NormedSpace.inclusionInDoubleDual_norm_eq
theorem inclusionInDoubleDual_norm_le : ‖inclusionInDoubleDual 𝕜 E‖ ≤ 1 := by
rw [inclusionInDoubleDual_norm_eq]
exact ContinuousLinearMap.norm_id_le
#align normed_space.inclusion_in_double_dual_norm_le NormedSpace.inclusionInDoubleDual_norm_le
theorem double_dual_bound (x : E) : ‖(inclusionInDoubleDual 𝕜 E) x‖ ≤ ‖x‖ := by
simpa using ContinuousLinearMap.le_of_opNorm_le _ (inclusionInDoubleDual_norm_le 𝕜 E) x
#align normed_space.double_dual_bound NormedSpace.double_dual_bound
def dualPairing : Dual 𝕜 E →ₗ[𝕜] E →ₗ[𝕜] 𝕜 :=
ContinuousLinearMap.coeLM 𝕜
#align normed_space.dual_pairing NormedSpace.dualPairing
@[simp]
theorem dualPairing_apply {v : Dual 𝕜 E} {x : E} : dualPairing 𝕜 E v x = v x :=
rfl
#align normed_space.dual_pairing_apply NormedSpace.dualPairing_apply
| Mathlib/Analysis/NormedSpace/Dual.lean | 101 | 103 | theorem dualPairing_separatingLeft : (dualPairing 𝕜 E).SeparatingLeft := by |
rw [LinearMap.separatingLeft_iff_ker_eq_bot, LinearMap.ker_eq_bot]
exact ContinuousLinearMap.coe_injective
| 1,888 |
import Mathlib.Analysis.NormedSpace.Dual
import Mathlib.Analysis.NormedSpace.OperatorNorm.Completeness
#align_import analysis.normed_space.weak_dual from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
noncomputable section
open Filter Function Bornology Metric Set
open Topology Filter
variable {𝕜 : Type*} [NontriviallyNormedField 𝕜]
variable {E : Type*} [SeminormedAddCommGroup E] [NormedSpace 𝕜 E]
namespace NormedSpace
namespace Dual
def toWeakDual : Dual 𝕜 E ≃ₗ[𝕜] WeakDual 𝕜 E :=
LinearEquiv.refl 𝕜 (E →L[𝕜] 𝕜)
#align normed_space.dual.to_weak_dual NormedSpace.Dual.toWeakDual
@[simp]
theorem coe_toWeakDual (x' : Dual 𝕜 E) : toWeakDual x' = x' :=
rfl
#align normed_space.dual.coe_to_weak_dual NormedSpace.Dual.coe_toWeakDual
@[simp]
theorem toWeakDual_eq_iff (x' y' : Dual 𝕜 E) : toWeakDual x' = toWeakDual y' ↔ x' = y' :=
Function.Injective.eq_iff <| LinearEquiv.injective toWeakDual
#align normed_space.dual.to_weak_dual_eq_iff NormedSpace.Dual.toWeakDual_eq_iff
theorem toWeakDual_continuous : Continuous fun x' : Dual 𝕜 E => toWeakDual x' :=
WeakBilin.continuous_of_continuous_eval _ fun z => (inclusionInDoubleDual 𝕜 E z).continuous
#align normed_space.dual.to_weak_dual_continuous NormedSpace.Dual.toWeakDual_continuous
def continuousLinearMapToWeakDual : Dual 𝕜 E →L[𝕜] WeakDual 𝕜 E :=
{ toWeakDual with cont := toWeakDual_continuous }
#align normed_space.dual.continuous_linear_map_to_weak_dual NormedSpace.Dual.continuousLinearMapToWeakDual
| Mathlib/Analysis/NormedSpace/WeakDual.lean | 141 | 145 | theorem dual_norm_topology_le_weak_dual_topology :
(UniformSpace.toTopologicalSpace : TopologicalSpace (Dual 𝕜 E)) ≤
(WeakDual.instTopologicalSpace : TopologicalSpace (WeakDual 𝕜 E)) := by |
convert (@toWeakDual_continuous _ _ _ _ (by assumption)).le_induced
exact induced_id.symm
| 1,889 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
#align_import measure_theory.function.special_functions.is_R_or_C from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
noncomputable section
open NNReal ENNReal
namespace RCLike
variable {𝕜 : Type*} [RCLike 𝕜]
@[measurability]
theorem measurable_re : Measurable (re : 𝕜 → ℝ) :=
continuous_re.measurable
#align is_R_or_C.measurable_re RCLike.measurable_re
@[measurability]
theorem measurable_im : Measurable (im : 𝕜 → ℝ) :=
continuous_im.measurable
#align is_R_or_C.measurable_im RCLike.measurable_im
end RCLike
section
variable {α 𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace α] {f : α → 𝕜} {μ : MeasureTheory.Measure α}
@[measurability]
theorem RCLike.measurable_ofReal : Measurable ((↑) : ℝ → 𝕜) :=
RCLike.continuous_ofReal.measurable
#align is_R_or_C.measurable_of_real RCLike.measurable_ofReal
| Mathlib/MeasureTheory/Function/SpecialFunctions/RCLike.lean | 73 | 77 | theorem measurable_of_re_im (hre : Measurable fun x => RCLike.re (f x))
(him : Measurable fun x => RCLike.im (f x)) : Measurable f := by |
convert Measurable.add (M := 𝕜) (RCLike.measurable_ofReal.comp hre)
((RCLike.measurable_ofReal.comp him).mul_const RCLike.I)
exact (RCLike.re_add_im _).symm
| 1,890 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Constructions.BorelSpace.Complex
#align_import measure_theory.function.special_functions.is_R_or_C from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
noncomputable section
open NNReal ENNReal
namespace RCLike
variable {𝕜 : Type*} [RCLike 𝕜]
@[measurability]
theorem measurable_re : Measurable (re : 𝕜 → ℝ) :=
continuous_re.measurable
#align is_R_or_C.measurable_re RCLike.measurable_re
@[measurability]
theorem measurable_im : Measurable (im : 𝕜 → ℝ) :=
continuous_im.measurable
#align is_R_or_C.measurable_im RCLike.measurable_im
end RCLike
section
variable {α 𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace α] {f : α → 𝕜} {μ : MeasureTheory.Measure α}
@[measurability]
theorem RCLike.measurable_ofReal : Measurable ((↑) : ℝ → 𝕜) :=
RCLike.continuous_ofReal.measurable
#align is_R_or_C.measurable_of_real RCLike.measurable_ofReal
theorem measurable_of_re_im (hre : Measurable fun x => RCLike.re (f x))
(him : Measurable fun x => RCLike.im (f x)) : Measurable f := by
convert Measurable.add (M := 𝕜) (RCLike.measurable_ofReal.comp hre)
((RCLike.measurable_ofReal.comp him).mul_const RCLike.I)
exact (RCLike.re_add_im _).symm
#align measurable_of_re_im measurable_of_re_im
| Mathlib/MeasureTheory/Function/SpecialFunctions/RCLike.lean | 80 | 84 | theorem aemeasurable_of_re_im (hre : AEMeasurable (fun x => RCLike.re (f x)) μ)
(him : AEMeasurable (fun x => RCLike.im (f x)) μ) : AEMeasurable f μ := by |
convert AEMeasurable.add (M := 𝕜) (RCLike.measurable_ofReal.comp_aemeasurable hre)
((RCLike.measurable_ofReal.comp_aemeasurable him).mul_const RCLike.I)
exact (RCLike.re_add_im _).symm
| 1,890 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
| Mathlib/MeasureTheory/Function/L2Space.lean | 42 | 43 | theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by |
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
| Mathlib/MeasureTheory/Function/L2Space.lean | 46 | 51 | theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by |
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
| Mathlib/MeasureTheory/Function/L2Space.lean | 54 | 57 | theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by |
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
section InnerProductSpace
variable {α : Type*} {m : MeasurableSpace α} {p : ℝ≥0∞} {μ : Measure α}
variable {E 𝕜 : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y
theorem Memℒp.const_inner (c : E) {f : α → E} (hf : Memℒp f p μ) : Memℒp (fun a => ⟪c, f a⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner aestronglyMeasurable_const hf.1)
(eventually_of_forall fun _ => norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.const_inner MeasureTheory.Memℒp.const_inner
theorem Memℒp.inner_const {f : α → E} (hf : Memℒp f p μ) (c : E) : Memℒp (fun a => ⟪f a, c⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner hf.1 aestronglyMeasurable_const)
(eventually_of_forall fun x => by rw [mul_comm]; exact norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.inner_const MeasureTheory.Memℒp.inner_const
variable {f : α → E}
| Mathlib/MeasureTheory/Function/L2Space.lean | 81 | 83 | theorem Integrable.const_inner (c : E) (hf : Integrable f μ) :
Integrable (fun x => ⟪c, f x⟫) μ := by |
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.const_inner c
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
section InnerProductSpace
variable {α : Type*} {m : MeasurableSpace α} {p : ℝ≥0∞} {μ : Measure α}
variable {E 𝕜 : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y
theorem Memℒp.const_inner (c : E) {f : α → E} (hf : Memℒp f p μ) : Memℒp (fun a => ⟪c, f a⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner aestronglyMeasurable_const hf.1)
(eventually_of_forall fun _ => norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.const_inner MeasureTheory.Memℒp.const_inner
theorem Memℒp.inner_const {f : α → E} (hf : Memℒp f p μ) (c : E) : Memℒp (fun a => ⟪f a, c⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner hf.1 aestronglyMeasurable_const)
(eventually_of_forall fun x => by rw [mul_comm]; exact norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.inner_const MeasureTheory.Memℒp.inner_const
variable {f : α → E}
theorem Integrable.const_inner (c : E) (hf : Integrable f μ) :
Integrable (fun x => ⟪c, f x⟫) μ := by
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.const_inner c
#align measure_theory.integrable.const_inner MeasureTheory.Integrable.const_inner
| Mathlib/MeasureTheory/Function/L2Space.lean | 86 | 88 | theorem Integrable.inner_const (hf : Integrable f μ) (c : E) :
Integrable (fun x => ⟪f x, c⟫) μ := by |
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.inner_const c
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
section InnerProductSpace
variable {α : Type*} {m : MeasurableSpace α} {p : ℝ≥0∞} {μ : Measure α}
variable {E 𝕜 : Type*} [RCLike 𝕜] [NormedAddCommGroup E] [InnerProductSpace 𝕜 E]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y
theorem Memℒp.const_inner (c : E) {f : α → E} (hf : Memℒp f p μ) : Memℒp (fun a => ⟪c, f a⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner aestronglyMeasurable_const hf.1)
(eventually_of_forall fun _ => norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.const_inner MeasureTheory.Memℒp.const_inner
theorem Memℒp.inner_const {f : α → E} (hf : Memℒp f p μ) (c : E) : Memℒp (fun a => ⟪f a, c⟫) p μ :=
hf.of_le_mul (AEStronglyMeasurable.inner hf.1 aestronglyMeasurable_const)
(eventually_of_forall fun x => by rw [mul_comm]; exact norm_inner_le_norm _ _)
#align measure_theory.mem_ℒp.inner_const MeasureTheory.Memℒp.inner_const
variable {f : α → E}
theorem Integrable.const_inner (c : E) (hf : Integrable f μ) :
Integrable (fun x => ⟪c, f x⟫) μ := by
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.const_inner c
#align measure_theory.integrable.const_inner MeasureTheory.Integrable.const_inner
theorem Integrable.inner_const (hf : Integrable f μ) (c : E) :
Integrable (fun x => ⟪f x, c⟫) μ := by
rw [← memℒp_one_iff_integrable] at hf ⊢; exact hf.inner_const c
#align measure_theory.integrable.inner_const MeasureTheory.Integrable.inner_const
variable [CompleteSpace E] [NormedSpace ℝ E]
theorem _root_.integral_inner {f : α → E} (hf : Integrable f μ) (c : E) :
∫ x, ⟪c, f x⟫ ∂μ = ⟪c, ∫ x, f x ∂μ⟫ :=
((innerSL 𝕜 c).restrictScalars ℝ).integral_comp_comm hf
#align integral_inner integral_inner
variable (𝕜)
-- variable binder update doesn't work for lemmas which refer to `𝕜` only via the notation
-- Porting note: removed because it causes ambiguity in the lemma below
-- local notation "⟪" x ", " y "⟫" => @inner 𝕜 E _ x y
| Mathlib/MeasureTheory/Function/L2Space.lean | 104 | 106 | theorem _root_.integral_eq_zero_of_forall_integral_inner_eq_zero (f : α → E) (hf : Integrable f μ)
(hf_int : ∀ c : E, ∫ x, ⟪c, f x⟫ ∂μ = 0) : ∫ x, f x ∂μ = 0 := by |
specialize hf_int (∫ x, f x ∂μ); rwa [integral_inner hf, inner_self_eq_zero] at hf_int
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
namespace L2
variable {α E F 𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E]
[InnerProductSpace 𝕜 E] [NormedAddCommGroup F]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
| Mathlib/MeasureTheory/Function/L2Space.lean | 118 | 121 | theorem snorm_rpow_two_norm_lt_top (f : Lp F 2 μ) : snorm (fun x => ‖f x‖ ^ (2 : ℝ)) 1 μ < ∞ := by |
have h_two : ENNReal.ofReal (2 : ℝ) = 2 := by simp [zero_le_one]
rw [snorm_norm_rpow f zero_lt_two, one_mul, h_two]
exact ENNReal.rpow_lt_top_of_nonneg zero_le_two (Lp.snorm_ne_top f)
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
namespace L2
variable {α E F 𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E]
[InnerProductSpace 𝕜 E] [NormedAddCommGroup F]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
theorem snorm_rpow_two_norm_lt_top (f : Lp F 2 μ) : snorm (fun x => ‖f x‖ ^ (2 : ℝ)) 1 μ < ∞ := by
have h_two : ENNReal.ofReal (2 : ℝ) = 2 := by simp [zero_le_one]
rw [snorm_norm_rpow f zero_lt_two, one_mul, h_two]
exact ENNReal.rpow_lt_top_of_nonneg zero_le_two (Lp.snorm_ne_top f)
#align measure_theory.L2.snorm_rpow_two_norm_lt_top MeasureTheory.L2.snorm_rpow_two_norm_lt_top
| Mathlib/MeasureTheory/Function/L2Space.lean | 124 | 140 | theorem snorm_inner_lt_top (f g : α →₂[μ] E) : snorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞ := by |
have h : ∀ x, ‖⟪f x, g x⟫‖ ≤ ‖‖f x‖ ^ (2 : ℝ) + ‖g x‖ ^ (2 : ℝ)‖ := by
intro x
rw [← @Nat.cast_two ℝ, Real.rpow_natCast, Real.rpow_natCast]
calc
‖⟪f x, g x⟫‖ ≤ ‖f x‖ * ‖g x‖ := norm_inner_le_norm _ _
_ ≤ 2 * ‖f x‖ * ‖g x‖ :=
(mul_le_mul_of_nonneg_right (le_mul_of_one_le_left (norm_nonneg _) one_le_two)
(norm_nonneg _))
-- TODO(kmill): the type ascription is getting around an elaboration error
_ ≤ ‖(‖f x‖ ^ 2 + ‖g x‖ ^ 2 : ℝ)‖ := (two_mul_le_add_sq _ _).trans (le_abs_self _)
refine (snorm_mono_ae (ae_of_all _ h)).trans_lt ((snorm_add_le ?_ ?_ le_rfl).trans_lt ?_)
· exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
· exact ((Lp.aestronglyMeasurable g).norm.aemeasurable.pow_const _).aestronglyMeasurable
rw [ENNReal.add_lt_top]
exact ⟨snorm_rpow_two_norm_lt_top f, snorm_rpow_two_norm_lt_top g⟩
| 1,891 |
import Mathlib.Analysis.RCLike.Lemmas
import Mathlib.MeasureTheory.Function.StronglyMeasurable.Inner
import Mathlib.MeasureTheory.Integral.SetIntegral
#align_import measure_theory.function.l2_space from "leanprover-community/mathlib"@"83a66c8775fa14ee5180c85cab98e970956401ad"
set_option linter.uppercaseLean3 false
noncomputable section
open TopologicalSpace MeasureTheory MeasureTheory.Lp Filter
open scoped NNReal ENNReal MeasureTheory
namespace MeasureTheory
section
variable {α F : Type*} {m : MeasurableSpace α} {μ : Measure α} [NormedAddCommGroup F]
theorem Memℒp.integrable_sq {f : α → ℝ} (h : Memℒp f 2 μ) : Integrable (fun x => f x ^ 2) μ := by
simpa [← memℒp_one_iff_integrable] using h.norm_rpow two_ne_zero ENNReal.two_ne_top
#align measure_theory.mem_ℒp.integrable_sq MeasureTheory.Memℒp.integrable_sq
theorem memℒp_two_iff_integrable_sq_norm {f : α → F} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => ‖f x‖ ^ 2) μ := by
rw [← memℒp_one_iff_integrable]
convert (memℒp_norm_rpow_iff hf two_ne_zero ENNReal.two_ne_top).symm
· simp
· rw [div_eq_mul_inv, ENNReal.mul_inv_cancel two_ne_zero ENNReal.two_ne_top]
#align measure_theory.mem_ℒp_two_iff_integrable_sq_norm MeasureTheory.memℒp_two_iff_integrable_sq_norm
theorem memℒp_two_iff_integrable_sq {f : α → ℝ} (hf : AEStronglyMeasurable f μ) :
Memℒp f 2 μ ↔ Integrable (fun x => f x ^ 2) μ := by
convert memℒp_two_iff_integrable_sq_norm hf using 3
simp
#align measure_theory.mem_ℒp_two_iff_integrable_sq MeasureTheory.memℒp_two_iff_integrable_sq
end
namespace L2
variable {α E F 𝕜 : Type*} [RCLike 𝕜] [MeasurableSpace α] {μ : Measure α} [NormedAddCommGroup E]
[InnerProductSpace 𝕜 E] [NormedAddCommGroup F]
local notation "⟪" x ", " y "⟫" => @inner 𝕜 _ _ x y
theorem snorm_rpow_two_norm_lt_top (f : Lp F 2 μ) : snorm (fun x => ‖f x‖ ^ (2 : ℝ)) 1 μ < ∞ := by
have h_two : ENNReal.ofReal (2 : ℝ) = 2 := by simp [zero_le_one]
rw [snorm_norm_rpow f zero_lt_two, one_mul, h_two]
exact ENNReal.rpow_lt_top_of_nonneg zero_le_two (Lp.snorm_ne_top f)
#align measure_theory.L2.snorm_rpow_two_norm_lt_top MeasureTheory.L2.snorm_rpow_two_norm_lt_top
theorem snorm_inner_lt_top (f g : α →₂[μ] E) : snorm (fun x : α => ⟪f x, g x⟫) 1 μ < ∞ := by
have h : ∀ x, ‖⟪f x, g x⟫‖ ≤ ‖‖f x‖ ^ (2 : ℝ) + ‖g x‖ ^ (2 : ℝ)‖ := by
intro x
rw [← @Nat.cast_two ℝ, Real.rpow_natCast, Real.rpow_natCast]
calc
‖⟪f x, g x⟫‖ ≤ ‖f x‖ * ‖g x‖ := norm_inner_le_norm _ _
_ ≤ 2 * ‖f x‖ * ‖g x‖ :=
(mul_le_mul_of_nonneg_right (le_mul_of_one_le_left (norm_nonneg _) one_le_two)
(norm_nonneg _))
-- TODO(kmill): the type ascription is getting around an elaboration error
_ ≤ ‖(‖f x‖ ^ 2 + ‖g x‖ ^ 2 : ℝ)‖ := (two_mul_le_add_sq _ _).trans (le_abs_self _)
refine (snorm_mono_ae (ae_of_all _ h)).trans_lt ((snorm_add_le ?_ ?_ le_rfl).trans_lt ?_)
· exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
· exact ((Lp.aestronglyMeasurable g).norm.aemeasurable.pow_const _).aestronglyMeasurable
rw [ENNReal.add_lt_top]
exact ⟨snorm_rpow_two_norm_lt_top f, snorm_rpow_two_norm_lt_top g⟩
#align measure_theory.L2.snorm_inner_lt_top MeasureTheory.L2.snorm_inner_lt_top
section InnerProductSpace
open scoped ComplexConjugate
instance : Inner 𝕜 (α →₂[μ] E) :=
⟨fun f g => ∫ a, ⟪f a, g a⟫ ∂μ⟩
theorem inner_def (f g : α →₂[μ] E) : ⟪f, g⟫ = ∫ a : α, ⟪f a, g a⟫ ∂μ :=
rfl
#align measure_theory.L2.inner_def MeasureTheory.L2.inner_def
| Mathlib/MeasureTheory/Function/L2Space.lean | 154 | 167 | theorem integral_inner_eq_sq_snorm (f : α →₂[μ] E) :
∫ a, ⟪f a, f a⟫ ∂μ = ENNReal.toReal (∫⁻ a, (‖f a‖₊ : ℝ≥0∞) ^ (2 : ℝ) ∂μ) := by |
simp_rw [inner_self_eq_norm_sq_to_K]
norm_cast
rw [integral_eq_lintegral_of_nonneg_ae]
rotate_left
· exact Filter.eventually_of_forall fun x => sq_nonneg _
· exact ((Lp.aestronglyMeasurable f).norm.aemeasurable.pow_const _).aestronglyMeasurable
congr
ext1 x
have h_two : (2 : ℝ) = ((2 : ℕ) : ℝ) := by simp
rw [← Real.rpow_natCast _ 2, ← h_two, ←
ENNReal.ofReal_rpow_of_nonneg (norm_nonneg _) zero_le_two, ofReal_norm_eq_coe_nnnorm]
norm_cast
| 1,891 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
| Mathlib/Probability/Variance.lean | 65 | 72 | theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by |
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
| Mathlib/Probability/Variance.lean | 75 | 89 | theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by |
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
#align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top
| Mathlib/Probability/Variance.lean | 92 | 97 | theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) :
evariance X μ < ∞ ↔ Memℒp X 2 μ := by |
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩
contrapose
rw [not_lt, top_le_iff]
exact evariance_eq_top hX
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
#align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top
theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) :
evariance X μ < ∞ ↔ Memℒp X 2 μ := by
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩
contrapose
rw [not_lt, top_le_iff]
exact evariance_eq_top hX
#align probability_theory.evariance_lt_top_iff_mem_ℒp ProbabilityTheory.evariance_lt_top_iff_memℒp
| Mathlib/Probability/Variance.lean | 100 | 103 | theorem _root_.MeasureTheory.Memℒp.ofReal_variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
ENNReal.ofReal (variance X μ) = evariance X μ := by |
rw [variance, ENNReal.ofReal_toReal]
exact hX.evariance_lt_top.ne
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
#align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top
theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) :
evariance X μ < ∞ ↔ Memℒp X 2 μ := by
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩
contrapose
rw [not_lt, top_le_iff]
exact evariance_eq_top hX
#align probability_theory.evariance_lt_top_iff_mem_ℒp ProbabilityTheory.evariance_lt_top_iff_memℒp
theorem _root_.MeasureTheory.Memℒp.ofReal_variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
ENNReal.ofReal (variance X μ) = evariance X μ := by
rw [variance, ENNReal.ofReal_toReal]
exact hX.evariance_lt_top.ne
#align measure_theory.mem_ℒp.of_real_variance_eq MeasureTheory.Memℒp.ofReal_variance_eq
| Mathlib/Probability/Variance.lean | 106 | 113 | theorem evariance_eq_lintegral_ofReal (X : Ω → ℝ) (μ : Measure Ω) :
evariance X μ = ∫⁻ ω, ENNReal.ofReal ((X ω - μ[X]) ^ 2) ∂μ := by |
rw [evariance]
congr
ext1 ω
rw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two]
congr
exact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
#align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top
theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) :
evariance X μ < ∞ ↔ Memℒp X 2 μ := by
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩
contrapose
rw [not_lt, top_le_iff]
exact evariance_eq_top hX
#align probability_theory.evariance_lt_top_iff_mem_ℒp ProbabilityTheory.evariance_lt_top_iff_memℒp
theorem _root_.MeasureTheory.Memℒp.ofReal_variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
ENNReal.ofReal (variance X μ) = evariance X μ := by
rw [variance, ENNReal.ofReal_toReal]
exact hX.evariance_lt_top.ne
#align measure_theory.mem_ℒp.of_real_variance_eq MeasureTheory.Memℒp.ofReal_variance_eq
theorem evariance_eq_lintegral_ofReal (X : Ω → ℝ) (μ : Measure Ω) :
evariance X μ = ∫⁻ ω, ENNReal.ofReal ((X ω - μ[X]) ^ 2) ∂μ := by
rw [evariance]
congr
ext1 ω
rw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two]
congr
exact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm
#align probability_theory.evariance_eq_lintegral_of_real ProbabilityTheory.evariance_eq_lintegral_ofReal
| Mathlib/Probability/Variance.lean | 116 | 125 | theorem _root_.MeasureTheory.Memℒp.variance_eq_of_integral_eq_zero (hX : Memℒp X 2 μ)
(hXint : μ[X] = 0) : variance X μ = μ[X ^ (2 : Nat)] := by |
rw [variance, evariance_eq_lintegral_ofReal, ← ofReal_integral_eq_lintegral_ofReal,
ENNReal.toReal_ofReal (by positivity)] <;>
simp_rw [hXint, sub_zero]
· rfl
· convert hX.integrable_norm_rpow two_ne_zero ENNReal.two_ne_top with ω
simp only [Pi.sub_apply, Real.norm_eq_abs, coe_two, ENNReal.one_toReal,
Real.rpow_two, sq_abs, abs_pow]
· exact ae_of_all _ fun ω => pow_two_nonneg _
| 1,892 |
import Mathlib.Probability.Notation
import Mathlib.Probability.Integration
import Mathlib.MeasureTheory.Function.L2Space
#align_import probability.variance from "leanprover-community/mathlib"@"f0c8bf9245297a541f468be517f1bde6195105e9"
open MeasureTheory Filter Finset
noncomputable section
open scoped MeasureTheory ProbabilityTheory ENNReal NNReal
namespace ProbabilityTheory
-- Porting note: this lemma replaces `ENNReal.toReal_bit0`, which does not exist in Lean 4
private lemma coe_two : ENNReal.toReal 2 = (2 : ℝ) := rfl
-- Porting note: Consider if `evariance` or `eVariance` is better. Also,
-- consider `eVariationOn` in `Mathlib.Analysis.BoundedVariation`.
def evariance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ≥0∞ :=
∫⁻ ω, (‖X ω - μ[X]‖₊ : ℝ≥0∞) ^ 2 ∂μ
#align probability_theory.evariance ProbabilityTheory.evariance
def variance {Ω : Type*} {_ : MeasurableSpace Ω} (X : Ω → ℝ) (μ : Measure Ω) : ℝ :=
(evariance X μ).toReal
#align probability_theory.variance ProbabilityTheory.variance
variable {Ω : Type*} {m : MeasurableSpace Ω} {X : Ω → ℝ} {μ : Measure Ω}
theorem _root_.MeasureTheory.Memℒp.evariance_lt_top [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
evariance X μ < ∞ := by
have := ENNReal.pow_lt_top (hX.sub <| memℒp_const <| μ[X]).2 2
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top, ← ENNReal.rpow_two] at this
simp only [coe_two, Pi.sub_apply, ENNReal.one_toReal, one_div] at this
rw [← ENNReal.rpow_mul, inv_mul_cancel (two_ne_zero : (2 : ℝ) ≠ 0), ENNReal.rpow_one] at this
simp_rw [ENNReal.rpow_two] at this
exact this
#align measure_theory.mem_ℒp.evariance_lt_top MeasureTheory.Memℒp.evariance_lt_top
theorem evariance_eq_top [IsFiniteMeasure μ] (hXm : AEStronglyMeasurable X μ) (hX : ¬Memℒp X 2 μ) :
evariance X μ = ∞ := by
by_contra h
rw [← Ne, ← lt_top_iff_ne_top] at h
have : Memℒp (fun ω => X ω - μ[X]) 2 μ := by
refine ⟨hXm.sub aestronglyMeasurable_const, ?_⟩
rw [snorm_eq_lintegral_rpow_nnnorm two_ne_zero ENNReal.two_ne_top]
simp only [coe_two, ENNReal.one_toReal, ENNReal.rpow_two, Ne]
exact ENNReal.rpow_lt_top_of_nonneg (by linarith) h.ne
refine hX ?_
-- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert this.add (memℒp_const <| μ [X])
ext ω
rw [Pi.add_apply, sub_add_cancel]
#align probability_theory.evariance_eq_top ProbabilityTheory.evariance_eq_top
theorem evariance_lt_top_iff_memℒp [IsFiniteMeasure μ] (hX : AEStronglyMeasurable X μ) :
evariance X μ < ∞ ↔ Memℒp X 2 μ := by
refine ⟨?_, MeasureTheory.Memℒp.evariance_lt_top⟩
contrapose
rw [not_lt, top_le_iff]
exact evariance_eq_top hX
#align probability_theory.evariance_lt_top_iff_mem_ℒp ProbabilityTheory.evariance_lt_top_iff_memℒp
theorem _root_.MeasureTheory.Memℒp.ofReal_variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
ENNReal.ofReal (variance X μ) = evariance X μ := by
rw [variance, ENNReal.ofReal_toReal]
exact hX.evariance_lt_top.ne
#align measure_theory.mem_ℒp.of_real_variance_eq MeasureTheory.Memℒp.ofReal_variance_eq
theorem evariance_eq_lintegral_ofReal (X : Ω → ℝ) (μ : Measure Ω) :
evariance X μ = ∫⁻ ω, ENNReal.ofReal ((X ω - μ[X]) ^ 2) ∂μ := by
rw [evariance]
congr
ext1 ω
rw [pow_two, ← ENNReal.coe_mul, ← nnnorm_mul, ← pow_two]
congr
exact (Real.toNNReal_eq_nnnorm_of_nonneg <| sq_nonneg _).symm
#align probability_theory.evariance_eq_lintegral_of_real ProbabilityTheory.evariance_eq_lintegral_ofReal
theorem _root_.MeasureTheory.Memℒp.variance_eq_of_integral_eq_zero (hX : Memℒp X 2 μ)
(hXint : μ[X] = 0) : variance X μ = μ[X ^ (2 : Nat)] := by
rw [variance, evariance_eq_lintegral_ofReal, ← ofReal_integral_eq_lintegral_ofReal,
ENNReal.toReal_ofReal (by positivity)] <;>
simp_rw [hXint, sub_zero]
· rfl
· convert hX.integrable_norm_rpow two_ne_zero ENNReal.two_ne_top with ω
simp only [Pi.sub_apply, Real.norm_eq_abs, coe_two, ENNReal.one_toReal,
Real.rpow_two, sq_abs, abs_pow]
· exact ae_of_all _ fun ω => pow_two_nonneg _
#align measure_theory.mem_ℒp.variance_eq_of_integral_eq_zero MeasureTheory.Memℒp.variance_eq_of_integral_eq_zero
| Mathlib/Probability/Variance.lean | 128 | 139 | theorem _root_.MeasureTheory.Memℒp.variance_eq [IsFiniteMeasure μ] (hX : Memℒp X 2 μ) :
variance X μ = μ[(X - fun _ => μ[X] :) ^ (2 : Nat)] := by |
rw [variance, evariance_eq_lintegral_ofReal, ← ofReal_integral_eq_lintegral_ofReal,
ENNReal.toReal_ofReal (by positivity)]
· rfl
· -- Porting note: `μ[X]` without whitespace is ambiguous as it could be GetElem,
-- and `convert` cannot disambiguate based on typeclass inference failure.
convert (hX.sub <| memℒp_const (μ [X])).integrable_norm_rpow two_ne_zero ENNReal.two_ne_top
with ω
simp only [Pi.sub_apply, Real.norm_eq_abs, coe_two, ENNReal.one_toReal,
Real.rpow_two, sq_abs, abs_pow]
· exact ae_of_all _ fun ω => pow_two_nonneg _
| 1,892 |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNReal
variable {α β γ δ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
[MeasurableSpace δ]
namespace ProbabilityTheory
structure IdentDistrib (f : α → γ) (g : β → γ)
(μ : Measure α := by volume_tac)
(ν : Measure β := by volume_tac) : Prop where
aemeasurable_fst : AEMeasurable f μ
aemeasurable_snd : AEMeasurable g ν
map_eq : Measure.map f μ = Measure.map g ν
#align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
namespace IdentDistrib
open TopologicalSpace
variable {μ : Measure α} {ν : Measure β} {f : α → γ} {g : β → γ}
protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf
map_eq := rfl }
#align probability_theory.ident_distrib.refl ProbabilityTheory.IdentDistrib.refl
protected theorem symm (h : IdentDistrib f g μ ν) : IdentDistrib g f ν μ :=
{ aemeasurable_fst := h.aemeasurable_snd
aemeasurable_snd := h.aemeasurable_fst
map_eq := h.map_eq.symm }
#align probability_theory.ident_distrib.symm ProbabilityTheory.IdentDistrib.symm
protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
(h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ :=
{ aemeasurable_fst := h₁.aemeasurable_fst
aemeasurable_snd := h₂.aemeasurable_snd
map_eq := h₁.map_eq.trans h₂.map_eq }
#align probability_theory.ident_distrib.trans ProbabilityTheory.IdentDistrib.trans
protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
(hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
{ aemeasurable_fst := hu.comp_aemeasurable h.aemeasurable_fst
aemeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_aemeasurable h.aemeasurable_snd
map_eq := by
rw [← AEMeasurable.map_map_of_aemeasurable hu h.aemeasurable_fst, ←
AEMeasurable.map_map_of_aemeasurable _ h.aemeasurable_snd, h.map_eq]
rwa [← h.map_eq] }
#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aemeasurable
protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
h.comp_of_aemeasurable hu.aemeasurable
#align probability_theory.ident_distrib.comp ProbabilityTheory.IdentDistrib.comp
protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =ᵐ[μ] g) :
IdentDistrib f g μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf.congr heq
map_eq := Measure.map_congr heq }
#align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
lemma _root_.MeasureTheory.AEMeasurable.identDistrib_mk
(hf : AEMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf hf.ae_eq_mk
lemma _root_.MeasureTheory.AEStronglyMeasurable.identDistrib_mk
[TopologicalSpace γ] [PseudoMetrizableSpace γ] [BorelSpace γ]
(hf : AEStronglyMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf.aemeasurable hf.ae_eq_mk
| Mathlib/Probability/IdentDistrib.lean | 132 | 135 | theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
μ (f ⁻¹' s) = ν (g ⁻¹' s) := by |
rw [← Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, ←
Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
| 1,893 |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNReal
variable {α β γ δ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
[MeasurableSpace δ]
namespace ProbabilityTheory
structure IdentDistrib (f : α → γ) (g : β → γ)
(μ : Measure α := by volume_tac)
(ν : Measure β := by volume_tac) : Prop where
aemeasurable_fst : AEMeasurable f μ
aemeasurable_snd : AEMeasurable g ν
map_eq : Measure.map f μ = Measure.map g ν
#align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
namespace IdentDistrib
open TopologicalSpace
variable {μ : Measure α} {ν : Measure β} {f : α → γ} {g : β → γ}
protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf
map_eq := rfl }
#align probability_theory.ident_distrib.refl ProbabilityTheory.IdentDistrib.refl
protected theorem symm (h : IdentDistrib f g μ ν) : IdentDistrib g f ν μ :=
{ aemeasurable_fst := h.aemeasurable_snd
aemeasurable_snd := h.aemeasurable_fst
map_eq := h.map_eq.symm }
#align probability_theory.ident_distrib.symm ProbabilityTheory.IdentDistrib.symm
protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
(h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ :=
{ aemeasurable_fst := h₁.aemeasurable_fst
aemeasurable_snd := h₂.aemeasurable_snd
map_eq := h₁.map_eq.trans h₂.map_eq }
#align probability_theory.ident_distrib.trans ProbabilityTheory.IdentDistrib.trans
protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
(hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
{ aemeasurable_fst := hu.comp_aemeasurable h.aemeasurable_fst
aemeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_aemeasurable h.aemeasurable_snd
map_eq := by
rw [← AEMeasurable.map_map_of_aemeasurable hu h.aemeasurable_fst, ←
AEMeasurable.map_map_of_aemeasurable _ h.aemeasurable_snd, h.map_eq]
rwa [← h.map_eq] }
#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aemeasurable
protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
h.comp_of_aemeasurable hu.aemeasurable
#align probability_theory.ident_distrib.comp ProbabilityTheory.IdentDistrib.comp
protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =ᵐ[μ] g) :
IdentDistrib f g μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf.congr heq
map_eq := Measure.map_congr heq }
#align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
lemma _root_.MeasureTheory.AEMeasurable.identDistrib_mk
(hf : AEMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf hf.ae_eq_mk
lemma _root_.MeasureTheory.AEStronglyMeasurable.identDistrib_mk
[TopologicalSpace γ] [PseudoMetrizableSpace γ] [BorelSpace γ]
(hf : AEStronglyMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf.aemeasurable hf.ae_eq_mk
theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
rw [← Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, ←
Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
#align probability_theory.ident_distrib.measure_mem_eq ProbabilityTheory.IdentDistrib.measure_mem_eq
alias measure_preimage_eq := measure_mem_eq
#align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
| Mathlib/Probability/IdentDistrib.lean | 141 | 145 | theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet {x | p x})
(hp : ∀ᵐ x ∂μ, p (f x)) : ∀ᵐ x ∂ν, p (g x) := by |
apply (ae_map_iff h.aemeasurable_snd pmeas).1
rw [← h.map_eq]
exact (ae_map_iff h.aemeasurable_fst pmeas).2 hp
| 1,893 |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNReal
variable {α β γ δ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
[MeasurableSpace δ]
namespace ProbabilityTheory
structure IdentDistrib (f : α → γ) (g : β → γ)
(μ : Measure α := by volume_tac)
(ν : Measure β := by volume_tac) : Prop where
aemeasurable_fst : AEMeasurable f μ
aemeasurable_snd : AEMeasurable g ν
map_eq : Measure.map f μ = Measure.map g ν
#align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
namespace IdentDistrib
open TopologicalSpace
variable {μ : Measure α} {ν : Measure β} {f : α → γ} {g : β → γ}
protected theorem refl (hf : AEMeasurable f μ) : IdentDistrib f f μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf
map_eq := rfl }
#align probability_theory.ident_distrib.refl ProbabilityTheory.IdentDistrib.refl
protected theorem symm (h : IdentDistrib f g μ ν) : IdentDistrib g f ν μ :=
{ aemeasurable_fst := h.aemeasurable_snd
aemeasurable_snd := h.aemeasurable_fst
map_eq := h.map_eq.symm }
#align probability_theory.ident_distrib.symm ProbabilityTheory.IdentDistrib.symm
protected theorem trans {ρ : Measure δ} {h : δ → γ} (h₁ : IdentDistrib f g μ ν)
(h₂ : IdentDistrib g h ν ρ) : IdentDistrib f h μ ρ :=
{ aemeasurable_fst := h₁.aemeasurable_fst
aemeasurable_snd := h₂.aemeasurable_snd
map_eq := h₁.map_eq.trans h₂.map_eq }
#align probability_theory.ident_distrib.trans ProbabilityTheory.IdentDistrib.trans
protected theorem comp_of_aemeasurable {u : γ → δ} (h : IdentDistrib f g μ ν)
(hu : AEMeasurable u (Measure.map f μ)) : IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
{ aemeasurable_fst := hu.comp_aemeasurable h.aemeasurable_fst
aemeasurable_snd := by rw [h.map_eq] at hu; exact hu.comp_aemeasurable h.aemeasurable_snd
map_eq := by
rw [← AEMeasurable.map_map_of_aemeasurable hu h.aemeasurable_fst, ←
AEMeasurable.map_map_of_aemeasurable _ h.aemeasurable_snd, h.map_eq]
rwa [← h.map_eq] }
#align probability_theory.ident_distrib.comp_of_ae_measurable ProbabilityTheory.IdentDistrib.comp_of_aemeasurable
protected theorem comp {u : γ → δ} (h : IdentDistrib f g μ ν) (hu : Measurable u) :
IdentDistrib (u ∘ f) (u ∘ g) μ ν :=
h.comp_of_aemeasurable hu.aemeasurable
#align probability_theory.ident_distrib.comp ProbabilityTheory.IdentDistrib.comp
protected theorem of_ae_eq {g : α → γ} (hf : AEMeasurable f μ) (heq : f =ᵐ[μ] g) :
IdentDistrib f g μ μ :=
{ aemeasurable_fst := hf
aemeasurable_snd := hf.congr heq
map_eq := Measure.map_congr heq }
#align probability_theory.ident_distrib.of_ae_eq ProbabilityTheory.IdentDistrib.of_ae_eq
lemma _root_.MeasureTheory.AEMeasurable.identDistrib_mk
(hf : AEMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf hf.ae_eq_mk
lemma _root_.MeasureTheory.AEStronglyMeasurable.identDistrib_mk
[TopologicalSpace γ] [PseudoMetrizableSpace γ] [BorelSpace γ]
(hf : AEStronglyMeasurable f μ) : IdentDistrib f (hf.mk f) μ μ :=
IdentDistrib.of_ae_eq hf.aemeasurable hf.ae_eq_mk
theorem measure_mem_eq (h : IdentDistrib f g μ ν) {s : Set γ} (hs : MeasurableSet s) :
μ (f ⁻¹' s) = ν (g ⁻¹' s) := by
rw [← Measure.map_apply_of_aemeasurable h.aemeasurable_fst hs, ←
Measure.map_apply_of_aemeasurable h.aemeasurable_snd hs, h.map_eq]
#align probability_theory.ident_distrib.measure_mem_eq ProbabilityTheory.IdentDistrib.measure_mem_eq
alias measure_preimage_eq := measure_mem_eq
#align probability_theory.ident_distrib.measure_preimage_eq ProbabilityTheory.IdentDistrib.measure_preimage_eq
theorem ae_snd (h : IdentDistrib f g μ ν) {p : γ → Prop} (pmeas : MeasurableSet {x | p x})
(hp : ∀ᵐ x ∂μ, p (f x)) : ∀ᵐ x ∂ν, p (g x) := by
apply (ae_map_iff h.aemeasurable_snd pmeas).1
rw [← h.map_eq]
exact (ae_map_iff h.aemeasurable_fst pmeas).2 hp
#align probability_theory.ident_distrib.ae_snd ProbabilityTheory.IdentDistrib.ae_snd
theorem ae_mem_snd (h : IdentDistrib f g μ ν) {t : Set γ} (tmeas : MeasurableSet t)
(ht : ∀ᵐ x ∂μ, f x ∈ t) : ∀ᵐ x ∂ν, g x ∈ t :=
h.ae_snd tmeas ht
#align probability_theory.ident_distrib.ae_mem_snd ProbabilityTheory.IdentDistrib.ae_mem_snd
theorem aestronglyMeasurable_fst [TopologicalSpace γ] [MetrizableSpace γ] [OpensMeasurableSpace γ]
[SecondCountableTopology γ] (h : IdentDistrib f g μ ν) : AEStronglyMeasurable f μ :=
h.aemeasurable_fst.aestronglyMeasurable
#align probability_theory.ident_distrib.ae_strongly_measurable_fst ProbabilityTheory.IdentDistrib.aestronglyMeasurable_fst
| Mathlib/Probability/IdentDistrib.lean | 162 | 168 | theorem aestronglyMeasurable_snd [TopologicalSpace γ] [MetrizableSpace γ] [BorelSpace γ]
(h : IdentDistrib f g μ ν) (hf : AEStronglyMeasurable f μ) : AEStronglyMeasurable g ν := by |
refine aestronglyMeasurable_iff_aemeasurable_separable.2 ⟨h.aemeasurable_snd, ?_⟩
rcases (aestronglyMeasurable_iff_aemeasurable_separable.1 hf).2 with ⟨t, t_sep, ht⟩
refine ⟨closure t, t_sep.closure, ?_⟩
apply h.ae_mem_snd isClosed_closure.measurableSet
filter_upwards [ht] with x hx using subset_closure hx
| 1,893 |
import Mathlib.Probability.Variance
import Mathlib.MeasureTheory.Function.UniformIntegrable
#align_import probability.ident_distrib from "leanprover-community/mathlib"@"f2ce6086713c78a7f880485f7917ea547a215982"
open MeasureTheory Filter Finset
noncomputable section
open scoped Topology MeasureTheory ENNReal NNReal
variable {α β γ δ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ]
[MeasurableSpace δ]
namespace ProbabilityTheory
structure IdentDistrib (f : α → γ) (g : β → γ)
(μ : Measure α := by volume_tac)
(ν : Measure β := by volume_tac) : Prop where
aemeasurable_fst : AEMeasurable f μ
aemeasurable_snd : AEMeasurable g ν
map_eq : Measure.map f μ = Measure.map g ν
#align probability_theory.ident_distrib ProbabilityTheory.IdentDistrib
section UniformIntegrable
open TopologicalSpace
variable {E : Type*} [MeasurableSpace E] [NormedAddCommGroup E] [BorelSpace E]
{μ : Measure α} [IsFiniteMeasure μ]
| Mathlib/Probability/IdentDistrib.lean | 326 | 348 | theorem Memℒp.uniformIntegrable_of_identDistrib_aux {ι : Type*} {f : ι → α → E} {j : ι} {p : ℝ≥0∞}
(hp : 1 ≤ p) (hp' : p ≠ ∞) (hℒp : Memℒp (f j) p μ) (hfmeas : ∀ i, StronglyMeasurable (f i))
(hf : ∀ i, IdentDistrib (f i) (f j) μ μ) : UniformIntegrable f p μ := by |
refine uniformIntegrable_of' hp hp' hfmeas fun ε hε => ?_
by_cases hι : Nonempty ι
swap; · exact ⟨0, fun i => False.elim (hι <| Nonempty.intro i)⟩
obtain ⟨C, hC₁, hC₂⟩ := hℒp.snorm_indicator_norm_ge_pos_le (hfmeas _) hε
refine ⟨⟨C, hC₁.le⟩, fun i => le_trans (le_of_eq ?_) hC₂⟩
have : {x | (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖f i x‖₊} = {x | C ≤ ‖f i x‖} := by
ext x
simp_rw [← norm_toNNReal]
exact Real.le_toNNReal_iff_coe_le (norm_nonneg _)
rw [this, ← snorm_norm, ← snorm_norm (Set.indicator _ _)]
simp_rw [norm_indicator_eq_indicator_norm, coe_nnnorm]
let F : E → ℝ := (fun x : E => if (⟨C, hC₁.le⟩ : ℝ≥0) ≤ ‖x‖₊ then ‖x‖ else 0)
have F_meas : Measurable F := by
apply measurable_norm.indicator (measurableSet_le measurable_const measurable_nnnorm)
have : ∀ k, (fun x ↦ Set.indicator {x | C ≤ ‖f k x‖} (fun a ↦ ‖f k a‖) x) = F ∘ f k := by
intro k
ext x
simp only [Set.indicator, Set.mem_setOf_eq]; norm_cast
rw [this, this, ← snorm_map_measure F_meas.aestronglyMeasurable (hf i).aemeasurable_fst,
(hf i).map_eq, snorm_map_measure F_meas.aestronglyMeasurable (hf j).aemeasurable_fst]
| 1,893 |
import Mathlib.Analysis.Convex.Cone.Extension
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.normed_space.hahn_banach.separation from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
open Set
open Pointwise
variable {𝕜 E : Type*}
| Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean | 47 | 76 | theorem separate_convex_open_set [TopologicalSpace E] [AddCommGroup E] [TopologicalAddGroup E]
[Module ℝ E] [ContinuousSMul ℝ E] {s : Set E} (hs₀ : (0 : E) ∈ s) (hs₁ : Convex ℝ s)
(hs₂ : IsOpen s) {x₀ : E} (hx₀ : x₀ ∉ s) : ∃ f : E →L[ℝ] ℝ, f x₀ = 1 ∧ ∀ x ∈ s, f x < 1 := by |
let f : E →ₗ.[ℝ] ℝ := LinearPMap.mkSpanSingleton x₀ 1 (ne_of_mem_of_not_mem hs₀ hx₀).symm
have := exists_extension_of_le_sublinear f (gauge s) (fun c hc => gauge_smul_of_nonneg hc.le)
(gauge_add_le hs₁ <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀) ?_
· obtain ⟨φ, hφ₁, hφ₂⟩ := this
have hφ₃ : φ x₀ = 1 := by
rw [← f.domain.coe_mk x₀ (Submodule.mem_span_singleton_self _), hφ₁,
LinearPMap.mkSpanSingleton'_apply_self]
have hφ₄ : ∀ x ∈ s, φ x < 1 := fun x hx =>
(hφ₂ x).trans_lt (gauge_lt_one_of_mem_of_isOpen hs₂ hx)
refine ⟨⟨φ, ?_⟩, hφ₃, hφ₄⟩
refine
φ.continuous_of_nonzero_on_open _ (hs₂.vadd (-x₀)) (Nonempty.vadd_set ⟨0, hs₀⟩)
(vadd_set_subset_iff.mpr fun x hx => ?_)
change φ (-x₀ + x) ≠ 0
rw [map_add, map_neg]
specialize hφ₄ x hx
linarith
rintro ⟨x, hx⟩
obtain ⟨y, rfl⟩ := Submodule.mem_span_singleton.1 hx
rw [LinearPMap.mkSpanSingleton'_apply]
simp only [mul_one, Algebra.id.smul_eq_mul, Submodule.coe_mk]
obtain h | h := le_or_lt y 0
· exact h.trans (gauge_nonneg _)
· rw [gauge_smul_of_nonneg h.le, smul_eq_mul, le_mul_iff_one_le_right h]
exact
one_le_gauge_of_not_mem (hs₁.starConvex hs₀)
(absorbent_nhds_zero <| hs₂.mem_nhds hs₀).absorbs hx₀
| 1,894 |
import Mathlib.Analysis.Convex.Cone.Extension
import Mathlib.Analysis.Convex.Gauge
import Mathlib.Topology.Algebra.Module.FiniteDimension
import Mathlib.Topology.Algebra.Module.LocallyConvex
#align_import analysis.normed_space.hahn_banach.separation from "leanprover-community/mathlib"@"915591b2bb3ea303648db07284a161a7f2a9e3d4"
open Set
open Pointwise
variable {𝕜 E : Type*}
theorem separate_convex_open_set [TopologicalSpace E] [AddCommGroup E] [TopologicalAddGroup E]
[Module ℝ E] [ContinuousSMul ℝ E] {s : Set E} (hs₀ : (0 : E) ∈ s) (hs₁ : Convex ℝ s)
(hs₂ : IsOpen s) {x₀ : E} (hx₀ : x₀ ∉ s) : ∃ f : E →L[ℝ] ℝ, f x₀ = 1 ∧ ∀ x ∈ s, f x < 1 := by
let f : E →ₗ.[ℝ] ℝ := LinearPMap.mkSpanSingleton x₀ 1 (ne_of_mem_of_not_mem hs₀ hx₀).symm
have := exists_extension_of_le_sublinear f (gauge s) (fun c hc => gauge_smul_of_nonneg hc.le)
(gauge_add_le hs₁ <| absorbent_nhds_zero <| hs₂.mem_nhds hs₀) ?_
· obtain ⟨φ, hφ₁, hφ₂⟩ := this
have hφ₃ : φ x₀ = 1 := by
rw [← f.domain.coe_mk x₀ (Submodule.mem_span_singleton_self _), hφ₁,
LinearPMap.mkSpanSingleton'_apply_self]
have hφ₄ : ∀ x ∈ s, φ x < 1 := fun x hx =>
(hφ₂ x).trans_lt (gauge_lt_one_of_mem_of_isOpen hs₂ hx)
refine ⟨⟨φ, ?_⟩, hφ₃, hφ₄⟩
refine
φ.continuous_of_nonzero_on_open _ (hs₂.vadd (-x₀)) (Nonempty.vadd_set ⟨0, hs₀⟩)
(vadd_set_subset_iff.mpr fun x hx => ?_)
change φ (-x₀ + x) ≠ 0
rw [map_add, map_neg]
specialize hφ₄ x hx
linarith
rintro ⟨x, hx⟩
obtain ⟨y, rfl⟩ := Submodule.mem_span_singleton.1 hx
rw [LinearPMap.mkSpanSingleton'_apply]
simp only [mul_one, Algebra.id.smul_eq_mul, Submodule.coe_mk]
obtain h | h := le_or_lt y 0
· exact h.trans (gauge_nonneg _)
· rw [gauge_smul_of_nonneg h.le, smul_eq_mul, le_mul_iff_one_le_right h]
exact
one_le_gauge_of_not_mem (hs₁.starConvex hs₀)
(absorbent_nhds_zero <| hs₂.mem_nhds hs₀).absorbs hx₀
#align separate_convex_open_set separate_convex_open_set
variable [TopologicalSpace E] [AddCommGroup E] [TopologicalAddGroup E] [Module ℝ E]
[ContinuousSMul ℝ E] {s t : Set E} {x y : E}
| Mathlib/Analysis/NormedSpace/HahnBanach/Separation.lean | 84 | 112 | theorem geometric_hahn_banach_open (hs₁ : Convex ℝ s) (hs₂ : IsOpen s) (ht : Convex ℝ t)
(disj : Disjoint s t) : ∃ (f : E →L[ℝ] ℝ) (u : ℝ), (∀ a ∈ s, f a < u) ∧ ∀ b ∈ t, u ≤ f b := by |
obtain rfl | ⟨a₀, ha₀⟩ := s.eq_empty_or_nonempty
· exact ⟨0, 0, by simp, fun b _hb => le_rfl⟩
obtain rfl | ⟨b₀, hb₀⟩ := t.eq_empty_or_nonempty
· exact ⟨0, 1, fun a _ha => zero_lt_one, by simp⟩
let x₀ := b₀ - a₀
let C := x₀ +ᵥ (s - t)
have : (0 : E) ∈ C :=
⟨a₀ - b₀, sub_mem_sub ha₀ hb₀, by simp_rw [x₀, vadd_eq_add, sub_add_sub_cancel', sub_self]⟩
have : Convex ℝ C := (hs₁.sub ht).vadd _
have : x₀ ∉ C := by
intro hx₀
rw [← add_zero x₀] at hx₀
exact disj.zero_not_mem_sub_set (vadd_mem_vadd_set_iff.1 hx₀)
obtain ⟨f, hf₁, hf₂⟩ := separate_convex_open_set ‹0 ∈ C› ‹_› (hs₂.sub_right.vadd _) ‹x₀ ∉ C›
have : f b₀ = f a₀ + 1 := by simp [x₀, ← hf₁]
have forall_le : ∀ a ∈ s, ∀ b ∈ t, f a ≤ f b := by
intro a ha b hb
have := hf₂ (x₀ + (a - b)) (vadd_mem_vadd_set <| sub_mem_sub ha hb)
simp only [f.map_add, f.map_sub, hf₁] at this
linarith
refine ⟨f, sInf (f '' t), image_subset_iff.1 (?_ : f '' s ⊆ Iio (sInf (f '' t))), fun b hb => ?_⟩
· rw [← interior_Iic]
refine interior_maximal (image_subset_iff.2 fun a ha => ?_) (f.isOpenMap_of_ne_zero ?_ _ hs₂)
· exact le_csInf (Nonempty.image _ ⟨_, hb₀⟩) (forall_mem_image.2 <| forall_le _ ha)
· rintro rfl
simp at hf₁
· exact csInf_le ⟨f a₀, forall_mem_image.2 <| forall_le _ ha₀⟩ (mem_image_of_mem _ hb)
| 1,894 |
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import number_theory.modular from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open Complex hiding abs_two
open Matrix hiding mul_smul
open Matrix.SpecialLinearGroup UpperHalfPlane ModularGroup
noncomputable section
local notation "SL(" n ", " R ")" => SpecialLinearGroup (Fin n) R
local macro "↑ₘ" t:term:80 : term => `(term| ($t : Matrix (Fin 2) (Fin 2) ℤ))
open scoped UpperHalfPlane ComplexConjugate
namespace ModularGroup
variable {g : SL(2, ℤ)} (z : ℍ)
section BottomRow
| Mathlib/NumberTheory/Modular.lean | 85 | 89 | theorem bottom_row_coprime {R : Type*} [CommRing R] (g : SL(2, R)) :
IsCoprime ((↑g : Matrix (Fin 2) (Fin 2) R) 1 0) ((↑g : Matrix (Fin 2) (Fin 2) R) 1 1) := by |
use -(↑g : Matrix (Fin 2) (Fin 2) R) 0 1, (↑g : Matrix (Fin 2) (Fin 2) R) 0 0
rw [add_comm, neg_mul, ← sub_eq_add_neg, ← det_fin_two]
exact g.det_coe
| 1,895 |
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import number_theory.modular from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open Complex hiding abs_two
open Matrix hiding mul_smul
open Matrix.SpecialLinearGroup UpperHalfPlane ModularGroup
noncomputable section
local notation "SL(" n ", " R ")" => SpecialLinearGroup (Fin n) R
local macro "↑ₘ" t:term:80 : term => `(term| ($t : Matrix (Fin 2) (Fin 2) ℤ))
open scoped UpperHalfPlane ComplexConjugate
namespace ModularGroup
variable {g : SL(2, ℤ)} (z : ℍ)
section BottomRow
theorem bottom_row_coprime {R : Type*} [CommRing R] (g : SL(2, R)) :
IsCoprime ((↑g : Matrix (Fin 2) (Fin 2) R) 1 0) ((↑g : Matrix (Fin 2) (Fin 2) R) 1 1) := by
use -(↑g : Matrix (Fin 2) (Fin 2) R) 0 1, (↑g : Matrix (Fin 2) (Fin 2) R) 0 0
rw [add_comm, neg_mul, ← sub_eq_add_neg, ← det_fin_two]
exact g.det_coe
#align modular_group.bottom_row_coprime ModularGroup.bottom_row_coprime
| Mathlib/NumberTheory/Modular.lean | 94 | 104 | theorem bottom_row_surj {R : Type*} [CommRing R] :
Set.SurjOn (fun g : SL(2, R) => (↑g : Matrix (Fin 2) (Fin 2) R) 1) Set.univ
{cd | IsCoprime (cd 0) (cd 1)} := by |
rintro cd ⟨b₀, a, gcd_eqn⟩
let A := of ![![a, -b₀], cd]
have det_A_1 : det A = 1 := by
convert gcd_eqn
rw [det_fin_two]
simp [A, (by ring : a * cd 1 + b₀ * cd 0 = b₀ * cd 0 + a * cd 1)]
refine ⟨⟨A, det_A_1⟩, Set.mem_univ _, ?_⟩
ext; simp [A]
| 1,895 |
import Mathlib.Analysis.Complex.UpperHalfPlane.Basic
import Mathlib.LinearAlgebra.GeneralLinearGroup
import Mathlib.LinearAlgebra.Matrix.GeneralLinearGroup
import Mathlib.Topology.Instances.Matrix
import Mathlib.Topology.Algebra.Module.FiniteDimension
#align_import number_theory.modular from "leanprover-community/mathlib"@"2196ab363eb097c008d4497125e0dde23fb36db2"
open Complex hiding abs_two
open Matrix hiding mul_smul
open Matrix.SpecialLinearGroup UpperHalfPlane ModularGroup
noncomputable section
local notation "SL(" n ", " R ")" => SpecialLinearGroup (Fin n) R
local macro "↑ₘ" t:term:80 : term => `(term| ($t : Matrix (Fin 2) (Fin 2) ℤ))
open scoped UpperHalfPlane ComplexConjugate
namespace ModularGroup
variable {g : SL(2, ℤ)} (z : ℍ)
section TendstoLemmas
open Filter ContinuousLinearMap
attribute [local simp] ContinuousLinearMap.coe_smul
| Mathlib/NumberTheory/Modular.lean | 117 | 161 | theorem tendsto_normSq_coprime_pair :
Filter.Tendsto (fun p : Fin 2 → ℤ => normSq ((p 0 : ℂ) * z + p 1)) cofinite atTop := by |
-- using this instance rather than the automatic `Function.module` makes unification issues in
-- `LinearEquiv.closedEmbedding_of_injective` less bad later in the proof.
letI : Module ℝ (Fin 2 → ℝ) := NormedSpace.toModule
let π₀ : (Fin 2 → ℝ) →ₗ[ℝ] ℝ := LinearMap.proj 0
let π₁ : (Fin 2 → ℝ) →ₗ[ℝ] ℝ := LinearMap.proj 1
let f : (Fin 2 → ℝ) →ₗ[ℝ] ℂ := π₀.smulRight (z : ℂ) + π₁.smulRight 1
have f_def : ⇑f = fun p : Fin 2 → ℝ => (p 0 : ℂ) * ↑z + p 1 := by
ext1
dsimp only [π₀, π₁, f, LinearMap.coe_proj, real_smul, LinearMap.coe_smulRight,
LinearMap.add_apply]
rw [mul_one]
have :
(fun p : Fin 2 → ℤ => normSq ((p 0 : ℂ) * ↑z + ↑(p 1))) =
normSq ∘ f ∘ fun p : Fin 2 → ℤ => ((↑) : ℤ → ℝ) ∘ p := by
ext1
rw [f_def]
dsimp only [Function.comp_def]
rw [ofReal_intCast, ofReal_intCast]
rw [this]
have hf : LinearMap.ker f = ⊥ := by
let g : ℂ →ₗ[ℝ] Fin 2 → ℝ :=
LinearMap.pi ![imLm, imLm.comp ((z : ℂ) • ((conjAe : ℂ →ₐ[ℝ] ℂ) : ℂ →ₗ[ℝ] ℂ))]
suffices ((z : ℂ).im⁻¹ • g).comp f = LinearMap.id by exact LinearMap.ker_eq_bot_of_inverse this
apply LinearMap.ext
intro c
have hz : (z : ℂ).im ≠ 0 := z.2.ne'
rw [LinearMap.comp_apply, LinearMap.smul_apply, LinearMap.id_apply]
ext i
dsimp only [Pi.smul_apply, LinearMap.pi_apply, smul_eq_mul]
fin_cases i
· show (z : ℂ).im⁻¹ * (f c).im = c 0
rw [f_def, add_im, im_ofReal_mul, ofReal_im, add_zero, mul_left_comm, inv_mul_cancel hz,
mul_one]
· show (z : ℂ).im⁻¹ * ((z : ℂ) * conj (f c)).im = c 1
rw [f_def, RingHom.map_add, RingHom.map_mul, mul_add, mul_left_comm, mul_conj, conj_ofReal,
conj_ofReal, ← ofReal_mul, add_im, ofReal_im, zero_add, inv_mul_eq_iff_eq_mul₀ hz]
simp only [ofReal_im, ofReal_re, mul_im, zero_add, mul_zero]
have hf' : ClosedEmbedding f := f.closedEmbedding_of_injective hf
have h₂ : Tendsto (fun p : Fin 2 → ℤ => ((↑) : ℤ → ℝ) ∘ p) cofinite (cocompact _) := by
convert Tendsto.pi_map_coprodᵢ fun _ => Int.tendsto_coe_cofinite
· rw [coprodᵢ_cofinite]
· rw [coprodᵢ_cocompact]
exact tendsto_normSq_cocompact_atTop.comp (hf'.tendsto_cocompact.comp h₂)
| 1,895 |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Finsupp
variable {σ R : Type*}
section Ring
variable [Ring R]
protected noncomputable def inv.aux (a : R) (φ : MvPowerSeries σ R) : MvPowerSeries σ R
| n =>
letI := Classical.decEq σ
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if _ : x.2 < n then coeff R x.1 φ * inv.aux a φ x.2 else 0
termination_by n => n
#align mv_power_series.inv.aux MvPowerSeries.inv.aux
theorem coeff_inv_aux [DecidableEq σ] (n : σ →₀ ℕ) (a : R) (φ : MvPowerSeries σ R) :
coeff R n (inv.aux a φ) =
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if x.2 < n then coeff R x.1 φ * coeff R x.2 (inv.aux a φ) else 0 :=
show inv.aux a φ n = _ by
cases Subsingleton.elim ‹DecidableEq σ› (Classical.decEq σ)
rw [inv.aux]
rfl
#align mv_power_series.coeff_inv_aux MvPowerSeries.coeff_inv_aux
def invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) : MvPowerSeries σ R :=
inv.aux (↑u⁻¹) φ
#align mv_power_series.inv_of_unit MvPowerSeries.invOfUnit
| Mathlib/RingTheory/MvPowerSeries/Inverse.lean | 90 | 97 | theorem coeff_invOfUnit [DecidableEq σ] (n : σ →₀ ℕ) (φ : MvPowerSeries σ R) (u : Rˣ) :
coeff R n (invOfUnit φ u) =
if n = 0 then ↑u⁻¹
else
-↑u⁻¹ *
∑ x ∈ antidiagonal n,
if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0 := by |
convert coeff_inv_aux n (↑u⁻¹) φ
| 1,896 |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Finsupp
variable {σ R : Type*}
section Ring
variable [Ring R]
protected noncomputable def inv.aux (a : R) (φ : MvPowerSeries σ R) : MvPowerSeries σ R
| n =>
letI := Classical.decEq σ
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if _ : x.2 < n then coeff R x.1 φ * inv.aux a φ x.2 else 0
termination_by n => n
#align mv_power_series.inv.aux MvPowerSeries.inv.aux
theorem coeff_inv_aux [DecidableEq σ] (n : σ →₀ ℕ) (a : R) (φ : MvPowerSeries σ R) :
coeff R n (inv.aux a φ) =
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if x.2 < n then coeff R x.1 φ * coeff R x.2 (inv.aux a φ) else 0 :=
show inv.aux a φ n = _ by
cases Subsingleton.elim ‹DecidableEq σ› (Classical.decEq σ)
rw [inv.aux]
rfl
#align mv_power_series.coeff_inv_aux MvPowerSeries.coeff_inv_aux
def invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) : MvPowerSeries σ R :=
inv.aux (↑u⁻¹) φ
#align mv_power_series.inv_of_unit MvPowerSeries.invOfUnit
theorem coeff_invOfUnit [DecidableEq σ] (n : σ →₀ ℕ) (φ : MvPowerSeries σ R) (u : Rˣ) :
coeff R n (invOfUnit φ u) =
if n = 0 then ↑u⁻¹
else
-↑u⁻¹ *
∑ x ∈ antidiagonal n,
if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0 := by
convert coeff_inv_aux n (↑u⁻¹) φ
#align mv_power_series.coeff_inv_of_unit MvPowerSeries.coeff_invOfUnit
@[simp]
| Mathlib/RingTheory/MvPowerSeries/Inverse.lean | 101 | 104 | theorem constantCoeff_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) :
constantCoeff σ R (invOfUnit φ u) = ↑u⁻¹ := by |
classical
rw [← coeff_zero_eq_constantCoeff_apply, coeff_invOfUnit, if_pos rfl]
| 1,896 |
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.Ideal.LocalRing
#align_import ring_theory.power_series.basic from "leanprover-community/mathlib"@"2d5739b61641ee4e7e53eca5688a08f66f2e6a60"
noncomputable section
open Finset (antidiagonal mem_antidiagonal)
namespace MvPowerSeries
open Finsupp
variable {σ R : Type*}
section Ring
variable [Ring R]
protected noncomputable def inv.aux (a : R) (φ : MvPowerSeries σ R) : MvPowerSeries σ R
| n =>
letI := Classical.decEq σ
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if _ : x.2 < n then coeff R x.1 φ * inv.aux a φ x.2 else 0
termination_by n => n
#align mv_power_series.inv.aux MvPowerSeries.inv.aux
theorem coeff_inv_aux [DecidableEq σ] (n : σ →₀ ℕ) (a : R) (φ : MvPowerSeries σ R) :
coeff R n (inv.aux a φ) =
if n = 0 then a
else
-a *
∑ x ∈ antidiagonal n, if x.2 < n then coeff R x.1 φ * coeff R x.2 (inv.aux a φ) else 0 :=
show inv.aux a φ n = _ by
cases Subsingleton.elim ‹DecidableEq σ› (Classical.decEq σ)
rw [inv.aux]
rfl
#align mv_power_series.coeff_inv_aux MvPowerSeries.coeff_inv_aux
def invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) : MvPowerSeries σ R :=
inv.aux (↑u⁻¹) φ
#align mv_power_series.inv_of_unit MvPowerSeries.invOfUnit
theorem coeff_invOfUnit [DecidableEq σ] (n : σ →₀ ℕ) (φ : MvPowerSeries σ R) (u : Rˣ) :
coeff R n (invOfUnit φ u) =
if n = 0 then ↑u⁻¹
else
-↑u⁻¹ *
∑ x ∈ antidiagonal n,
if x.2 < n then coeff R x.1 φ * coeff R x.2 (invOfUnit φ u) else 0 := by
convert coeff_inv_aux n (↑u⁻¹) φ
#align mv_power_series.coeff_inv_of_unit MvPowerSeries.coeff_invOfUnit
@[simp]
theorem constantCoeff_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) :
constantCoeff σ R (invOfUnit φ u) = ↑u⁻¹ := by
classical
rw [← coeff_zero_eq_constantCoeff_apply, coeff_invOfUnit, if_pos rfl]
#align mv_power_series.constant_coeff_inv_of_unit MvPowerSeries.constantCoeff_invOfUnit
| Mathlib/RingTheory/MvPowerSeries/Inverse.lean | 107 | 137 | theorem mul_invOfUnit (φ : MvPowerSeries σ R) (u : Rˣ) (h : constantCoeff σ R φ = u) :
φ * invOfUnit φ u = 1 :=
ext fun n =>
letI := Classical.decEq (σ →₀ ℕ)
if H : n = 0 then by
rw [H]
simp [coeff_mul, support_single_ne_zero, h]
else by
classical
have : ((0 : σ →₀ ℕ), n) ∈ antidiagonal n := by | rw [mem_antidiagonal, zero_add]
rw [coeff_one, if_neg H, coeff_mul, ← Finset.insert_erase this,
Finset.sum_insert (Finset.not_mem_erase _ _), coeff_zero_eq_constantCoeff_apply, h,
coeff_invOfUnit, if_neg H, neg_mul, mul_neg, Units.mul_inv_cancel_left, ←
Finset.insert_erase this, Finset.sum_insert (Finset.not_mem_erase _ _),
Finset.insert_erase this, if_neg (not_lt_of_ge <| le_rfl), zero_add, add_comm, ←
sub_eq_add_neg, sub_eq_zero, Finset.sum_congr rfl]
rintro ⟨i, j⟩ hij
rw [Finset.mem_erase, mem_antidiagonal] at hij
cases' hij with h₁ h₂
subst n
rw [if_pos]
suffices (0 : _) + j < i + j by simpa
apply add_lt_add_right
constructor
· intro s
exact Nat.zero_le _
· intro H
apply h₁
suffices i = 0 by simp [this]
ext1 s
exact Nat.eq_zero_of_le_zero (H s)
| 1,896 |
import Mathlib.Algebra.Polynomial.Degree.CardPowDegree
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.Ideal.LocalRing
#align_import number_theory.class_number.admissible_card_pow_degree from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
namespace Polynomial
open Polynomial
open AbsoluteValue Real
variable {Fq : Type*} [Fintype Fq]
| Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean | 36 | 57 | theorem exists_eq_polynomial [Semiring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (hb : natDegree b ≤ d) (A : Fin m.succ → Fq[X])
(hA : ∀ i, degree (A i) < degree b) : ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀ := by |
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `0`, ... `degree b - 1` ≤ `d - 1`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coeff j
have : Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ) := by
simpa using lt_of_le_of_lt hm (Nat.lt_succ_self m)
-- Therefore, the differences have all coefficients higher than `deg b - d` equal.
obtain ⟨i₀, i₁, i_ne, i_eq⟩ := Fintype.exists_ne_map_eq_of_card_lt f this
use i₀, i₁, i_ne
ext j
-- The coefficients higher than `deg b` are the same because they are equal to 0.
by_cases hbj : degree b ≤ j
· rw [coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj),
coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj)]
-- So we only need to look for the coefficients between `0` and `deg b`.
rw [not_le] at hbj
apply congr_fun i_eq.symm ⟨j, _⟩
exact lt_of_lt_of_le (coe_lt_degree.mp hbj) hb
| 1,897 |
import Mathlib.Algebra.Polynomial.Degree.CardPowDegree
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.Ideal.LocalRing
#align_import number_theory.class_number.admissible_card_pow_degree from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
namespace Polynomial
open Polynomial
open AbsoluteValue Real
variable {Fq : Type*} [Fintype Fq]
theorem exists_eq_polynomial [Semiring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (hb : natDegree b ≤ d) (A : Fin m.succ → Fq[X])
(hA : ∀ i, degree (A i) < degree b) : ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀ := by
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `0`, ... `degree b - 1` ≤ `d - 1`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coeff j
have : Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ) := by
simpa using lt_of_le_of_lt hm (Nat.lt_succ_self m)
-- Therefore, the differences have all coefficients higher than `deg b - d` equal.
obtain ⟨i₀, i₁, i_ne, i_eq⟩ := Fintype.exists_ne_map_eq_of_card_lt f this
use i₀, i₁, i_ne
ext j
-- The coefficients higher than `deg b` are the same because they are equal to 0.
by_cases hbj : degree b ≤ j
· rw [coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj),
coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj)]
-- So we only need to look for the coefficients between `0` and `deg b`.
rw [not_le] at hbj
apply congr_fun i_eq.symm ⟨j, _⟩
exact lt_of_lt_of_le (coe_lt_degree.mp hbj) hb
#align polynomial.exists_eq_polynomial Polynomial.exists_eq_polynomial
| Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean | 63 | 98 | theorem exists_approx_polynomial_aux [Ring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (A : Fin m.succ → Fq[X]) (hA : ∀ i, degree (A i) < degree b) :
∃ i₀ i₁, i₀ ≠ i₁ ∧ degree (A i₁ - A i₀) < ↑(natDegree b - d) := by |
have hb : b ≠ 0 := by
rintro rfl
specialize hA 0
rw [degree_zero] at hA
exact not_lt_of_le bot_le hA
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `degree b - 1`, ... `degree b - d`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coeff (natDegree b - j.succ)
have : Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ) := by
simpa using lt_of_le_of_lt hm (Nat.lt_succ_self m)
-- Therefore, the differences have all coefficients higher than `deg b - d` equal.
obtain ⟨i₀, i₁, i_ne, i_eq⟩ := Fintype.exists_ne_map_eq_of_card_lt f this
use i₀, i₁, i_ne
refine (degree_lt_iff_coeff_zero _ _).mpr fun j hj => ?_
-- The coefficients higher than `deg b` are the same because they are equal to 0.
by_cases hbj : degree b ≤ j
· refine coeff_eq_zero_of_degree_lt (lt_of_lt_of_le ?_ hbj)
exact lt_of_le_of_lt (degree_sub_le _ _) (max_lt (hA _) (hA _))
-- So we only need to look for the coefficients between `deg b - d` and `deg b`.
rw [coeff_sub, sub_eq_zero]
rw [not_le, degree_eq_natDegree hb] at hbj
have hbj : j < natDegree b := (@WithBot.coe_lt_coe _ _ _).mp hbj
have hj : natDegree b - j.succ < d := by
by_cases hd : natDegree b < d
· exact lt_of_le_of_lt tsub_le_self hd
· rw [not_lt] at hd
have := lt_of_le_of_lt hj (Nat.lt_succ_self j)
rwa [tsub_lt_iff_tsub_lt hd hbj] at this
have : j = b.natDegree - (natDegree b - j.succ).succ := by
rw [← Nat.succ_sub hbj, Nat.succ_sub_succ, tsub_tsub_cancel_of_le hbj.le]
convert congr_fun i_eq.symm ⟨natDegree b - j.succ, hj⟩
| 1,897 |
import Mathlib.Algebra.Polynomial.Degree.CardPowDegree
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.NumberTheory.ClassNumber.AdmissibleAbsoluteValue
import Mathlib.RingTheory.Ideal.LocalRing
#align_import number_theory.class_number.admissible_card_pow_degree from "leanprover-community/mathlib"@"0b9eaaa7686280fad8cce467f5c3c57ee6ce77f8"
namespace Polynomial
open Polynomial
open AbsoluteValue Real
variable {Fq : Type*} [Fintype Fq]
theorem exists_eq_polynomial [Semiring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (hb : natDegree b ≤ d) (A : Fin m.succ → Fq[X])
(hA : ∀ i, degree (A i) < degree b) : ∃ i₀ i₁, i₀ ≠ i₁ ∧ A i₁ = A i₀ := by
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `0`, ... `degree b - 1` ≤ `d - 1`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coeff j
have : Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ) := by
simpa using lt_of_le_of_lt hm (Nat.lt_succ_self m)
-- Therefore, the differences have all coefficients higher than `deg b - d` equal.
obtain ⟨i₀, i₁, i_ne, i_eq⟩ := Fintype.exists_ne_map_eq_of_card_lt f this
use i₀, i₁, i_ne
ext j
-- The coefficients higher than `deg b` are the same because they are equal to 0.
by_cases hbj : degree b ≤ j
· rw [coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj),
coeff_eq_zero_of_degree_lt (lt_of_lt_of_le (hA _) hbj)]
-- So we only need to look for the coefficients between `0` and `deg b`.
rw [not_le] at hbj
apply congr_fun i_eq.symm ⟨j, _⟩
exact lt_of_lt_of_le (coe_lt_degree.mp hbj) hb
#align polynomial.exists_eq_polynomial Polynomial.exists_eq_polynomial
theorem exists_approx_polynomial_aux [Ring Fq] {d : ℕ} {m : ℕ} (hm : Fintype.card Fq ^ d ≤ m)
(b : Fq[X]) (A : Fin m.succ → Fq[X]) (hA : ∀ i, degree (A i) < degree b) :
∃ i₀ i₁, i₀ ≠ i₁ ∧ degree (A i₁ - A i₀) < ↑(natDegree b - d) := by
have hb : b ≠ 0 := by
rintro rfl
specialize hA 0
rw [degree_zero] at hA
exact not_lt_of_le bot_le hA
-- Since there are > q^d elements of A, and only q^d choices for the highest `d` coefficients,
-- there must be two elements of A with the same coefficients at
-- `degree b - 1`, ... `degree b - d`.
-- In other words, the following map is not injective:
set f : Fin m.succ → Fin d → Fq := fun i j => (A i).coeff (natDegree b - j.succ)
have : Fintype.card (Fin d → Fq) < Fintype.card (Fin m.succ) := by
simpa using lt_of_le_of_lt hm (Nat.lt_succ_self m)
-- Therefore, the differences have all coefficients higher than `deg b - d` equal.
obtain ⟨i₀, i₁, i_ne, i_eq⟩ := Fintype.exists_ne_map_eq_of_card_lt f this
use i₀, i₁, i_ne
refine (degree_lt_iff_coeff_zero _ _).mpr fun j hj => ?_
-- The coefficients higher than `deg b` are the same because they are equal to 0.
by_cases hbj : degree b ≤ j
· refine coeff_eq_zero_of_degree_lt (lt_of_lt_of_le ?_ hbj)
exact lt_of_le_of_lt (degree_sub_le _ _) (max_lt (hA _) (hA _))
-- So we only need to look for the coefficients between `deg b - d` and `deg b`.
rw [coeff_sub, sub_eq_zero]
rw [not_le, degree_eq_natDegree hb] at hbj
have hbj : j < natDegree b := (@WithBot.coe_lt_coe _ _ _).mp hbj
have hj : natDegree b - j.succ < d := by
by_cases hd : natDegree b < d
· exact lt_of_le_of_lt tsub_le_self hd
· rw [not_lt] at hd
have := lt_of_le_of_lt hj (Nat.lt_succ_self j)
rwa [tsub_lt_iff_tsub_lt hd hbj] at this
have : j = b.natDegree - (natDegree b - j.succ).succ := by
rw [← Nat.succ_sub hbj, Nat.succ_sub_succ, tsub_tsub_cancel_of_le hbj.le]
convert congr_fun i_eq.symm ⟨natDegree b - j.succ, hj⟩
#align polynomial.exists_approx_polynomial_aux Polynomial.exists_approx_polynomial_aux
variable [Field Fq]
| Mathlib/NumberTheory/ClassNumber/AdmissibleCardPowDegree.lean | 106 | 149 | theorem exists_approx_polynomial {b : Fq[X]} (hb : b ≠ 0) {ε : ℝ} (hε : 0 < ε)
(A : Fin (Fintype.card Fq ^ ⌈-log ε / log (Fintype.card Fq)⌉₊).succ → Fq[X]) :
∃ i₀ i₁, i₀ ≠ i₁ ∧ (cardPowDegree (A i₁ % b - A i₀ % b) : ℝ) < cardPowDegree b • ε := by |
have hbε : 0 < cardPowDegree b • ε := by
rw [Algebra.smul_def, eq_intCast]
exact mul_pos (Int.cast_pos.mpr (AbsoluteValue.pos _ hb)) hε
have one_lt_q : 1 < Fintype.card Fq := Fintype.one_lt_card
have one_lt_q' : (1 : ℝ) < Fintype.card Fq := by assumption_mod_cast
have q_pos : 0 < Fintype.card Fq := by omega
have q_pos' : (0 : ℝ) < Fintype.card Fq := by assumption_mod_cast
-- If `b` is already small enough, then the remainders are equal and we are done.
by_cases le_b : b.natDegree ≤ ⌈-log ε / log (Fintype.card Fq)⌉₊
· obtain ⟨i₀, i₁, i_ne, mod_eq⟩ :=
exists_eq_polynomial le_rfl b le_b (fun i => A i % b) fun i => EuclideanDomain.mod_lt (A i) hb
refine ⟨i₀, i₁, i_ne, ?_⟩
rwa [mod_eq, sub_self, map_zero, Int.cast_zero]
-- Otherwise, it suffices to choose two elements whose difference is of small enough degree.
rw [not_le] at le_b
obtain ⟨i₀, i₁, i_ne, deg_lt⟩ := exists_approx_polynomial_aux le_rfl b (fun i => A i % b) fun i =>
EuclideanDomain.mod_lt (A i) hb
use i₀, i₁, i_ne
-- Again, if the remainders are equal we are done.
by_cases h : A i₁ % b = A i₀ % b
· rwa [h, sub_self, map_zero, Int.cast_zero]
have h' : A i₁ % b - A i₀ % b ≠ 0 := mt sub_eq_zero.mp h
-- If the remainders are not equal, we'll show their difference is of small degree.
-- In particular, we'll show the degree is less than the following:
suffices (natDegree (A i₁ % b - A i₀ % b) : ℝ) < b.natDegree + log ε / log (Fintype.card Fq) by
rwa [← Real.log_lt_log_iff (Int.cast_pos.mpr (cardPowDegree.pos h')) hbε,
cardPowDegree_nonzero _ h', cardPowDegree_nonzero _ hb, Algebra.smul_def, eq_intCast,
Int.cast_pow, Int.cast_natCast, Int.cast_pow, Int.cast_natCast,
log_mul (pow_ne_zero _ q_pos'.ne') hε.ne', ← rpow_natCast, ← rpow_natCast, log_rpow q_pos',
log_rpow q_pos', ← lt_div_iff (log_pos one_lt_q'), add_div,
mul_div_cancel_right₀ _ (log_pos one_lt_q').ne']
-- And that result follows from manipulating the result from `exists_approx_polynomial_aux`
-- to turn the `-⌈-stuff⌉₊` into `+ stuff`.
apply lt_of_lt_of_le (Nat.cast_lt.mpr (WithBot.coe_lt_coe.mp _)) _
swap
· convert deg_lt
rw [degree_eq_natDegree h']; rfl
rw [← sub_neg_eq_add, neg_div]
refine le_trans ?_ (sub_le_sub_left (Nat.le_ceil _) (b.natDegree : ℝ))
rw [← neg_div]
exact le_of_eq (Nat.cast_sub le_b.le)
| 1,897 |
import Mathlib.Algebra.CharP.Basic
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.Algebra.IsPrimePow
import Mathlib.Data.Nat.Factorization.Basic
#align_import algebra.char_p.local_ring from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
| Mathlib/Algebra/CharP/LocalRing.lean | 25 | 67 | theorem charP_zero_or_prime_power (R : Type*) [CommRing R] [LocalRing R] (q : ℕ)
[char_R_q : CharP R q] : q = 0 ∨ IsPrimePow q := by |
-- Assume `q := char(R)` is not zero.
apply or_iff_not_imp_left.2
intro q_pos
let K := LocalRing.ResidueField R
haveI RM_char := ringChar.charP K
let r := ringChar K
let n := q.factorization r
-- `r := char(R/m)` is either prime or zero:
cases' CharP.char_is_prime_or_zero K r with r_prime r_zero
· let a := q / r ^ n
-- If `r` is prime, we can write it as `r = a * q^n` ...
have q_eq_a_mul_rn : q = r ^ n * a := by rw [Nat.mul_div_cancel' (Nat.ord_proj_dvd q r)]
have r_ne_dvd_a := Nat.not_dvd_ord_compl r_prime q_pos
have rn_dvd_q : r ^ n ∣ q := ⟨a, q_eq_a_mul_rn⟩
rw [mul_comm] at q_eq_a_mul_rn
-- ... where `a` is a unit.
have a_unit : IsUnit (a : R) := by
by_contra g
rw [← mem_nonunits_iff] at g
rw [← LocalRing.mem_maximalIdeal] at g
have a_cast_zero := Ideal.Quotient.eq_zero_iff_mem.2 g
rw [map_natCast] at a_cast_zero
have r_dvd_a := (ringChar.spec K a).1 a_cast_zero
exact absurd r_dvd_a r_ne_dvd_a
-- Let `b` be the inverse of `a`.
cases' a_unit.exists_left_inv with a_inv h_inv_mul_a
have rn_cast_zero : ↑(r ^ n) = (0 : R) := by
rw [← @mul_one R _ ↑(r ^ n), mul_comm, ← Classical.choose_spec a_unit.exists_left_inv,
mul_assoc, ← Nat.cast_mul, ← q_eq_a_mul_rn, CharP.cast_eq_zero R q]
simp
have q_eq_rn := Nat.dvd_antisymm ((CharP.cast_eq_zero_iff R q (r ^ n)).mp rn_cast_zero) rn_dvd_q
have n_pos : n ≠ 0 := fun n_zero =>
absurd (by simpa [n_zero] using q_eq_rn) (CharP.char_ne_one R q)
-- Definition of prime power: `∃ r n, Prime r ∧ 0 < n ∧ r ^ n = q`.
exact ⟨r, ⟨n, ⟨r_prime.prime, ⟨pos_iff_ne_zero.mpr n_pos, q_eq_rn.symm⟩⟩⟩⟩
· haveI K_char_p_0 := ringChar.of_eq r_zero
haveI K_char_zero : CharZero K := CharP.charP_to_charZero K
haveI R_char_zero := RingHom.charZero (LocalRing.residue R)
-- Finally, `r = 0` would lead to a contradiction:
have q_zero := CharP.eq R char_R_q (CharP.ofCharZero R)
exact absurd q_zero q_pos
| 1,898 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace MixedCharZero
| Mathlib/Algebra/CharP/MixedCharZero.lean | 85 | 105 | theorem reduce_to_p_prime {P : Prop} :
(∀ p > 0, MixedCharZero R p → P) ↔ ∀ p : ℕ, p.Prime → MixedCharZero R p → P := by |
constructor
· intro h q q_prime q_mixedChar
exact h q (Nat.Prime.pos q_prime) q_mixedChar
· intro h q q_pos q_mixedChar
rcases q_mixedChar.charP_quotient with ⟨I, hI_ne_top, _⟩
-- Krull's Thm: There exists a prime ideal `P` such that `I ≤ P`
rcases Ideal.exists_le_maximal I hI_ne_top with ⟨M, hM_max, h_IM⟩
let r := ringChar (R ⧸ M)
have r_pos : r ≠ 0 := by
have q_zero :=
congr_arg (Ideal.Quotient.factor I M h_IM) (CharP.cast_eq_zero (R ⧸ I) q)
simp only [map_natCast, map_zero] at q_zero
apply ne_zero_of_dvd_ne_zero (ne_of_gt q_pos)
exact (CharP.cast_eq_zero_iff (R ⧸ M) r q).mp q_zero
have r_prime : Nat.Prime r :=
or_iff_not_imp_right.1 (CharP.char_is_prime_or_zero (R ⧸ M) r) r_pos
apply h r r_prime
have : CharZero R := q_mixedChar.toCharZero
exact ⟨⟨M, hM_max.ne_top, ringChar.of_eq rfl⟩⟩
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace MixedCharZero
theorem reduce_to_p_prime {P : Prop} :
(∀ p > 0, MixedCharZero R p → P) ↔ ∀ p : ℕ, p.Prime → MixedCharZero R p → P := by
constructor
· intro h q q_prime q_mixedChar
exact h q (Nat.Prime.pos q_prime) q_mixedChar
· intro h q q_pos q_mixedChar
rcases q_mixedChar.charP_quotient with ⟨I, hI_ne_top, _⟩
-- Krull's Thm: There exists a prime ideal `P` such that `I ≤ P`
rcases Ideal.exists_le_maximal I hI_ne_top with ⟨M, hM_max, h_IM⟩
let r := ringChar (R ⧸ M)
have r_pos : r ≠ 0 := by
have q_zero :=
congr_arg (Ideal.Quotient.factor I M h_IM) (CharP.cast_eq_zero (R ⧸ I) q)
simp only [map_natCast, map_zero] at q_zero
apply ne_zero_of_dvd_ne_zero (ne_of_gt q_pos)
exact (CharP.cast_eq_zero_iff (R ⧸ M) r q).mp q_zero
have r_prime : Nat.Prime r :=
or_iff_not_imp_right.1 (CharP.char_is_prime_or_zero (R ⧸ M) r) r_pos
apply h r r_prime
have : CharZero R := q_mixedChar.toCharZero
exact ⟨⟨M, hM_max.ne_top, ringChar.of_eq rfl⟩⟩
#align mixed_char_zero.reduce_to_p_prime MixedCharZero.reduce_to_p_prime
| Mathlib/Algebra/CharP/MixedCharZero.lean | 112 | 136 | theorem reduce_to_maximal_ideal {p : ℕ} (hp : Nat.Prime p) :
(∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p) ↔ ∃ I : Ideal R, I.IsMaximal ∧ CharP (R ⧸ I) p := by |
constructor
· intro g
rcases g with ⟨I, ⟨hI_not_top, _⟩⟩
-- Krull's Thm: There exists a prime ideal `M` such that `I ≤ M`.
rcases Ideal.exists_le_maximal I hI_not_top with ⟨M, ⟨hM_max, hM_ge⟩⟩
use M
constructor
· exact hM_max
· cases CharP.exists (R ⧸ M) with
| intro r hr =>
-- Porting note: This is odd. Added `have hr := hr`.
-- Without this it seems that lean does not find `hr` as an instance.
have hr := hr
convert hr
have r_dvd_p : r ∣ p := by
rw [← CharP.cast_eq_zero_iff (R ⧸ M) r p]
convert congr_arg (Ideal.Quotient.factor I M hM_ge) (CharP.cast_eq_zero (R ⧸ I) p)
symm
apply (Nat.Prime.eq_one_or_self_of_dvd hp r r_dvd_p).resolve_left
exact CharP.char_ne_one (R ⧸ M) r
· intro ⟨I, hI_max, h_charP⟩
use I
exact ⟨Ideal.IsMaximal.ne_top hI_max, h_charP⟩
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
| Mathlib/Algebra/CharP/MixedCharZero.lean | 161 | 169 | theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by |
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
set_option linter.uppercaseLean3 false in
#align Q_algebra_to_equal_char_zero EqualCharZero.of_algebraRat
section ConstructionAlgebraRat
variable {R}
| Mathlib/Algebra/CharP/MixedCharZero.lean | 178 | 189 | theorem PNat.isUnit_natCast [h : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))]
(n : ℕ+) : IsUnit (n : R) := by |
-- `n : R` is a unit iff `(n)` is not a proper ideal in `R`.
rw [← Ideal.span_singleton_eq_top]
-- So by contrapositive, we should show the quotient does not have characteristic zero.
apply not_imp_comm.mp (h.elim (Ideal.span {↑n}))
intro h_char_zero
-- In particular, the image of `n` in the quotient should be nonzero.
apply h_char_zero.cast_injective.ne n.ne_zero
-- But `n` generates the ideal, so its image is clearly zero.
rw [← map_natCast (Ideal.Quotient.mk _), Nat.cast_zero, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.subset_span (Set.mem_singleton _)
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
set_option linter.uppercaseLean3 false in
#align Q_algebra_to_equal_char_zero EqualCharZero.of_algebraRat
section ConstructionAlgebraRat
variable {R}
theorem PNat.isUnit_natCast [h : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))]
(n : ℕ+) : IsUnit (n : R) := by
-- `n : R` is a unit iff `(n)` is not a proper ideal in `R`.
rw [← Ideal.span_singleton_eq_top]
-- So by contrapositive, we should show the quotient does not have characteristic zero.
apply not_imp_comm.mp (h.elim (Ideal.span {↑n}))
intro h_char_zero
-- In particular, the image of `n` in the quotient should be nonzero.
apply h_char_zero.cast_injective.ne n.ne_zero
-- But `n` generates the ideal, so its image is clearly zero.
rw [← map_natCast (Ideal.Quotient.mk _), Nat.cast_zero, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.subset_span (Set.mem_singleton _)
#align equal_char_zero.pnat_coe_is_unit EqualCharZero.PNat.isUnit_natCast
@[coe]
noncomputable def pnatCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ℕ+ → Rˣ :=
fun n => (PNat.isUnit_natCast n).unit
noncomputable instance coePNatUnits
[Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : Coe ℕ+ Rˣ :=
⟨EqualCharZero.pnatCast⟩
#align equal_char_zero.pnat_has_coe_units EqualCharZero.coePNatUnits
@[simp]
| Mathlib/Algebra/CharP/MixedCharZero.lean | 204 | 209 | theorem pnatCast_one [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ((1 : ℕ+) : Rˣ) = 1 := by |
apply Units.ext
rw [Units.val_one]
change ((PNat.isUnit_natCast (R := R) 1).unit : R) = 1
rw [IsUnit.unit_spec (PNat.isUnit_natCast 1)]
rw [PNat.one_coe, Nat.cast_one]
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
set_option linter.uppercaseLean3 false in
#align Q_algebra_to_equal_char_zero EqualCharZero.of_algebraRat
section ConstructionAlgebraRat
variable {R}
theorem PNat.isUnit_natCast [h : Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))]
(n : ℕ+) : IsUnit (n : R) := by
-- `n : R` is a unit iff `(n)` is not a proper ideal in `R`.
rw [← Ideal.span_singleton_eq_top]
-- So by contrapositive, we should show the quotient does not have characteristic zero.
apply not_imp_comm.mp (h.elim (Ideal.span {↑n}))
intro h_char_zero
-- In particular, the image of `n` in the quotient should be nonzero.
apply h_char_zero.cast_injective.ne n.ne_zero
-- But `n` generates the ideal, so its image is clearly zero.
rw [← map_natCast (Ideal.Quotient.mk _), Nat.cast_zero, Ideal.Quotient.eq_zero_iff_mem]
exact Ideal.subset_span (Set.mem_singleton _)
#align equal_char_zero.pnat_coe_is_unit EqualCharZero.PNat.isUnit_natCast
@[coe]
noncomputable def pnatCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ℕ+ → Rˣ :=
fun n => (PNat.isUnit_natCast n).unit
noncomputable instance coePNatUnits
[Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : Coe ℕ+ Rˣ :=
⟨EqualCharZero.pnatCast⟩
#align equal_char_zero.pnat_has_coe_units EqualCharZero.coePNatUnits
@[simp]
theorem pnatCast_one [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] : ((1 : ℕ+) : Rˣ) = 1 := by
apply Units.ext
rw [Units.val_one]
change ((PNat.isUnit_natCast (R := R) 1).unit : R) = 1
rw [IsUnit.unit_spec (PNat.isUnit_natCast 1)]
rw [PNat.one_coe, Nat.cast_one]
#align equal_char_zero.pnat_coe_units_eq_one EqualCharZero.pnatCast_one
@[simp]
| Mathlib/Algebra/CharP/MixedCharZero.lean | 214 | 217 | theorem pnatCast_eq_natCast [Fact (∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I))] (n : ℕ+) :
((n : Rˣ) : R) = ↑n := by |
change ((PNat.isUnit_natCast (R := R) n).unit : R) = ↑n
simp only [IsUnit.unit_spec]
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
set_option linter.uppercaseLean3 false in
#align Q_algebra_to_equal_char_zero EqualCharZero.of_algebraRat
| Mathlib/Algebra/CharP/MixedCharZero.lean | 250 | 260 | theorem of_not_mixedCharZero [CharZero R] (h : ∀ p > 0, ¬MixedCharZero R p) :
∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by |
intro I hI_ne_top
suffices CharP (R ⧸ I) 0 from CharP.charP_to_charZero _
cases CharP.exists (R ⧸ I) with
| intro p hp =>
cases p with
| zero => exact hp
| succ p =>
have h_mixed : MixedCharZero R p.succ := ⟨⟨I, ⟨hI_ne_top, hp⟩⟩⟩
exact absurd h_mixed (h p.succ p.succ_pos)
| 1,899 |
import Mathlib.Algebra.CharP.LocalRing
import Mathlib.RingTheory.Ideal.Quotient
import Mathlib.Tactic.FieldSimp
#align_import algebra.char_p.mixed_char_zero from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
variable (R : Type*) [CommRing R]
class MixedCharZero (p : ℕ) : Prop where
[toCharZero : CharZero R]
charP_quotient : ∃ I : Ideal R, I ≠ ⊤ ∧ CharP (R ⧸ I) p
#align mixed_char_zero MixedCharZero
namespace EqualCharZero
theorem of_algebraRat [Algebra ℚ R] : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI
constructor
intro a b h_ab
contrapose! hI
-- `↑a - ↑b` is a unit contained in `I`, which contradicts `I ≠ ⊤`.
refine I.eq_top_of_isUnit_mem ?_ (IsUnit.map (algebraMap ℚ R) (IsUnit.mk0 (a - b : ℚ) ?_))
· simpa only [← Ideal.Quotient.eq_zero_iff_mem, map_sub, sub_eq_zero, map_natCast]
simpa only [Ne, sub_eq_zero] using (@Nat.cast_injective ℚ _ _).ne hI
set_option linter.uppercaseLean3 false in
#align Q_algebra_to_equal_char_zero EqualCharZero.of_algebraRat
theorem of_not_mixedCharZero [CharZero R] (h : ∀ p > 0, ¬MixedCharZero R p) :
∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I) := by
intro I hI_ne_top
suffices CharP (R ⧸ I) 0 from CharP.charP_to_charZero _
cases CharP.exists (R ⧸ I) with
| intro p hp =>
cases p with
| zero => exact hp
| succ p =>
have h_mixed : MixedCharZero R p.succ := ⟨⟨I, ⟨hI_ne_top, hp⟩⟩⟩
exact absurd h_mixed (h p.succ p.succ_pos)
#align not_mixed_char_to_equal_char_zero EqualCharZero.of_not_mixedCharZero
| Mathlib/Algebra/CharP/MixedCharZero.lean | 264 | 270 | theorem to_not_mixedCharZero (h : ∀ I : Ideal R, I ≠ ⊤ → CharZero (R ⧸ I)) :
∀ p > 0, ¬MixedCharZero R p := by |
intro p p_pos
by_contra hp_mixedChar
rcases hp_mixedChar.charP_quotient with ⟨I, hI_ne_top, hI_p⟩
replace hI_zero : CharP (R ⧸ I) 0 := @CharP.ofCharZero _ _ (h I hI_ne_top)
exact absurd (CharP.eq (R ⧸ I) hI_p hI_zero) (ne_of_gt p_pos)
| 1,899 |
import Mathlib.Algebra.Polynomial.Module.Basic
import Mathlib.Algebra.Ring.Idempotents
import Mathlib.RingTheory.Ideal.LocalRing
import Mathlib.RingTheory.Noetherian
import Mathlib.RingTheory.ReesAlgebra
import Mathlib.RingTheory.Finiteness
import Mathlib.Order.Basic
import Mathlib.Order.Hom.Lattice
#align_import ring_theory.filtration from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
universe u v
variable {R M : Type u} [CommRing R] [AddCommGroup M] [Module R M] (I : Ideal R)
open Polynomial
open scoped Polynomial
@[ext]
structure Ideal.Filtration (M : Type u) [AddCommGroup M] [Module R M] where
N : ℕ → Submodule R M
mono : ∀ i, N (i + 1) ≤ N i
smul_le : ∀ i, I • N i ≤ N (i + 1)
#align ideal.filtration Ideal.Filtration
variable (F F' : I.Filtration M) {I}
namespace Ideal.Filtration
| Mathlib/RingTheory/Filtration.lean | 67 | 71 | theorem pow_smul_le (i j : ℕ) : I ^ i • F.N j ≤ F.N (i + j) := by |
induction' i with _ ih
· simp
· rw [pow_succ', mul_smul, add_assoc, add_comm 1, ← add_assoc]
exact (smul_mono_right _ ih).trans (F.smul_le _)
| 1,900 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.