diff --git a/Mathlib/Geometry/Manifold/ContMDiff/Product.lean b/Mathlib/Geometry/Manifold/ContMDiff/Product.lean index 6eb4c75f0c438..755c972332459 100644 --- a/Mathlib/Geometry/Manifold/ContMDiff/Product.lean +++ b/Mathlib/Geometry/Manifold/ContMDiff/Product.lean @@ -402,8 +402,6 @@ variable {ι : Type*} [Fintype ι] {Fi : ι → Type*} [∀ i, NormedAddCommGrou theorem contMDiffWithinAt_pi_space : ContMDiffWithinAt I 𝓘(𝕜, ∀ i, Fi i) n φ s x ↔ ∀ i, ContMDiffWithinAt I 𝓘(𝕜, Fi i) n (fun x => φ x i) s x := by - -- Porting note: `simp` fails to apply it on the LHS - rw [contMDiffWithinAt_iff] simp only [contMDiffWithinAt_iff, continuousWithinAt_pi, contDiffWithinAt_pi, forall_and, writtenInExtChartAt, extChartAt_model_space_eq_id, (· ∘ ·), PartialEquiv.refl_coe, id] #align cont_mdiff_within_at_pi_space contMDiffWithinAt_pi_space diff --git a/Mathlib/Geometry/Manifold/Diffeomorph.lean b/Mathlib/Geometry/Manifold/Diffeomorph.lean index b999247cee358..3385b7b204e14 100644 --- a/Mathlib/Geometry/Manifold/Diffeomorph.lean +++ b/Mathlib/Geometry/Manifold/Diffeomorph.lean @@ -570,12 +570,11 @@ with model `I.trans_diffeomorph e`. -/ def toTransDiffeomorph (e : E ≃ₘ[𝕜] F) : M ≃ₘ⟮I, I.transDiffeomorph e⟯ M where toEquiv := Equiv.refl M contMDiff_toFun x := by - refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩ - refine' e.contDiff.contDiffWithinAt.congr' (fun y hy => _) _ - · simp only [Equiv.coe_refl, id, (· ∘ ·), I.coe_extChartAt_transDiffeomorph] - -- Porting note: `simp only` failed to used next lemma, converted to `rw` - rw [(extChartAt I x).right_inv hy.1] - exact + refine contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, ?_⟩ + refine e.contDiff.contDiffWithinAt.congr' (fun y hy ↦ ?_) ?_ + · simp only [Equiv.coe_refl, id, (· ∘ ·), I.coe_extChartAt_transDiffeomorph, + (extChartAt I x).right_inv hy.1] + · exact ⟨(extChartAt I x).map_source (mem_extChartAt_source I x), trivial, by simp only [mfld_simps]⟩ contMDiff_invFun x := by refine' contMDiffWithinAt_iff'.2 ⟨continuousWithinAt_id, _⟩ diff --git a/Mathlib/Geometry/Manifold/VectorBundle/Basic.lean b/Mathlib/Geometry/Manifold/VectorBundle/Basic.lean index 6d51d71323743..4b698898c9634 100644 --- a/Mathlib/Geometry/Manifold/VectorBundle/Basic.lean +++ b/Mathlib/Geometry/Manifold/VectorBundle/Basic.lean @@ -594,9 +594,7 @@ is a smooth vector bundle. -/ instance smoothVectorBundle : SmoothVectorBundle F Z.Fiber IB where smoothOn_coordChangeL := by rintro - - ⟨i, rfl⟩ ⟨i', rfl⟩ - -- Porting note: Originally `Z.smoothOn_coordChange IB i i'` - refine' - (VectorBundleCore.IsSmooth.smoothOn_coordChange (Z := Z) (IB := IB) i i').congr fun b hb => _ + refine (Z.smoothOn_coordChange IB i i').congr fun b hb ↦ ?_ ext v exact Z.localTriv_coordChange_eq i i' hb v #align vector_bundle_core.smooth_vector_bundle VectorBundleCore.smoothVectorBundle diff --git a/Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean b/Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean index ba92f076e9ff9..c2d6497405338 100644 --- a/Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean +++ b/Mathlib/Geometry/Manifold/VectorBundle/FiberwiseLinear.lean @@ -221,21 +221,6 @@ theorem SmoothFiberwiseLinear.locality_aux₂ (e : PartialHomeomorph (B × F) (B apply hux #align smooth_fiberwise_linear.locality_aux₂ SmoothFiberwiseLinear.locality_aux₂ -/- Porting note: `simp only [mem_iUnion]` fails in the next definition. This aux lemma is a -workaround. -/ -private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} : - (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) - (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) - (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U), - {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn - h2φ.continuousOn)}) ↔ - ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) - (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) - (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U), - e.EqOnSource - (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by - simp only [mem_iUnion, mem_setOf_eq] - variable (F B IB) /-- For `B` a manifold and `F` a normed space, the groupoid on `B × F` consisting of local @@ -249,7 +234,7 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U), {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn)} trans' := by - simp only [mem_aux] + simp only [mem_iUnion] rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ ⟨φ', U', hU', hφ', h2φ', heφ'⟩ refine' ⟨fun b => (φ b).trans (φ' b), _, hU.inter hU', _, _, Setoid.trans (PartialHomeomorph.EqOnSource.trans' heφ heφ') ⟨_, _⟩⟩ @@ -272,27 +257,38 @@ def smoothFiberwiseLinear : StructureGroupoid (B × F) where simp_rw [ContinuousLinearEquiv.symm_symm] exact hφ id_mem' := by - /- porting note: `simp_rw [mem_iUnion]` failed; expanding. Was: simp_rw [mem_iUnion] - refine' ⟨fun b => ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, _, _, ⟨_, fun b hb => _⟩⟩ - -/ - refine mem_iUnion.2 ⟨fun _ ↦ .refl 𝕜 F, mem_iUnion.2 ⟨univ, mem_iUnion.2 ⟨isOpen_univ, ?_⟩⟩⟩ - refine mem_iUnion.2 ⟨contMDiffOn_const, mem_iUnion.2 ⟨contMDiffOn_const, ?_, ?_⟩⟩ - · simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv, - PartialEquiv.refl_source, univ_prod_univ] - · exact eqOn_refl id _ + refine ⟨fun _ ↦ ContinuousLinearEquiv.refl 𝕜 F, univ, isOpen_univ, smoothOn_const, + smoothOn_const, ⟨?_, fun b _hb ↦ rfl⟩⟩ + simp only [FiberwiseLinear.partialHomeomorph, PartialHomeomorph.refl_partialEquiv, + PartialEquiv.refl_source, univ_prod_univ] locality' := by -- the hard work has been extracted to `locality_aux₁` and `locality_aux₂` - simp only [mem_aux] + simp only [mem_iUnion] intro e he obtain ⟨U, hU, h⟩ := SmoothFiberwiseLinear.locality_aux₁ e he exact SmoothFiberwiseLinear.locality_aux₂ e U hU h mem_of_eqOnSource' := by - simp only [mem_aux] + simp only [mem_iUnion] rintro e e' ⟨φ, U, hU, hφ, h2φ, heφ⟩ hee' exact ⟨φ, U, hU, hφ, h2φ, Setoid.trans hee' heφ⟩ #align smooth_fiberwise_linear smoothFiberwiseLinear +variable {F B IB} in +-- TODO: can this be inlined into the next lemma? +private theorem mem_aux {e : PartialHomeomorph (B × F) (B × F)} : + (e ∈ ⋃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) + (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) + (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U), + {e | e.EqOnSource (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn + h2φ.continuousOn)}) ↔ + ∃ (φ : B → F ≃L[𝕜] F) (U : Set B) (hU : IsOpen U) + (hφ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => φ x : B → F →L[𝕜] F) U) + (h2φ : SmoothOn IB 𝓘(𝕜, F →L[𝕜] F) (fun x => (φ x).symm : B → F →L[𝕜] F) U), + e.EqOnSource + (FiberwiseLinear.partialHomeomorph φ hU hφ.continuousOn h2φ.continuousOn) := by + simp only [mem_iUnion, mem_setOf_eq] + @[simp] theorem mem_smoothFiberwiseLinear_iff (e : PartialHomeomorph (B × F) (B × F)) : e ∈ smoothFiberwiseLinear B F IB ↔ diff --git a/Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean b/Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean index 4e6de44ca1fcd..57f58474f1a4f 100644 --- a/Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean +++ b/Mathlib/Geometry/Manifold/VectorBundle/Tangent.lean @@ -376,8 +376,8 @@ theorem tangentBundle_model_space_chartAt (p : TangentBundle I H) : ext x : 1 · ext; · rfl exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2 - · -- Porting note: was ext; · rfl; apply hEq_of_eq - refine congr_arg (TotalSpace.mk _) ?_ + · ext; · rfl + apply heq_of_eq exact (tangentBundleCore I H).coordChange_self (achart _ x.1) x.1 (mem_achart_source H x.1) x.2 simp_rw [TangentBundle.chartAt, FiberBundleCore.localTriv, FiberBundleCore.localTrivAsPartialEquiv, VectorBundleCore.toFiberBundleCore_baseSet,