Skip to content

Commit

Permalink
chore: rename Function.comp.assoc to Function.comp_assoc (#17098)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Sep 24, 2024
1 parent b479ce6 commit 067644f
Show file tree
Hide file tree
Showing 34 changed files with 66 additions and 65 deletions.
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Category/ModuleCat/Free.lean
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ theorem span_rightExact {w : ι' → S.X₃} (hv : ⊤ ≤ span R (range v))
· convert hw
simp only [AddHom.toFun_eq_coe, LinearMap.coe_toAddHom, Sum.elim_comp_inr]
rw [ModuleCat.epi_iff_surjective] at hE
rw [← Function.comp.assoc, Function.RightInverse.comp_eq_id (Function.rightInverse_invFun hE),
rw [← Function.comp_assoc, Function.RightInverse.comp_eq_id (Function.rightInverse_invFun hE),
Function.id_comp]

end Span
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Algebra/Module/PID.lean
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ theorem torsion_by_prime_power_decomposition (hN : Module.IsTorsion' N (Submonoi
⟨(@hN x).choose, by rw [← Quotient.mk_smul, (@hN x).choose_spec, Quotient.mk_zero]⟩
· have hs' := congr_arg (Submodule.map <| mkQ <| R ∙ s j) hs
rw [Submodule.map_span, Submodule.map_top, range_mkQ] at hs'; simp only [mkQ_apply] at hs'
simp only [s']; rw [← Function.comp.assoc, Set.range_comp (_ ∘ s), Fin.range_succAbove]
simp only [s']; rw [← Function.comp_assoc, Set.range_comp (_ ∘ s), Fin.range_succAbove]
rw [← Set.range_comp, ← Set.insert_image_compl_eq_range _ j, Function.comp_apply,
(Quotient.mk_eq_zero _).mpr (Submodule.mem_span_singleton_self _), span_insert_zero] at hs'
exact hs'
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Algebra/Order/Rearrangement.lean
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ theorem MonovaryOn.sum_comp_perm_smul_eq_sum_smul_iff (hfg : MonovaryOn f g s)
rw [σ.sum_comp' s (fun i j ↦ f i • g j) hσ]
congr
· convert h.comp_right σ
· rw [comp.assoc, inv_def, symm_comp_self, comp_id]
· rw [comp_assoc, inv_def, symm_comp_self, comp_id]
· rw [σ.eq_preimage_iff_image_eq, Set.image_perm hσ]
· convert h.comp_right σ.symm
· rw [comp.assoc, self_comp_symm, comp_id]
· rw [comp_assoc, self_comp_symm, comp_id]
· rw [σ.symm.eq_preimage_iff_image_eq]
exact Set.image_perm hσinv

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicGeometry/AffineScheme.lean
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ instance isOpenImmersion_fromSpec :
theorem range_fromSpec :
Set.range hU.fromSpec.1.base = (U : Set X) := by
delta IsAffineOpen.fromSpec; dsimp
rw [Function.comp.assoc, Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]
rw [Function.comp_assoc, Set.range_comp, Set.range_iff_surjective.mpr, Set.image_univ]
· exact Subtype.range_coe
erw [← coe_comp, ← TopCat.epi_iff_surjective] -- now `erw` after #13170
infer_instance
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/Calculus/ContDiff/Bounds.lean
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ theorem norm_iteratedFDerivWithin_prod_le [DecidableEq ι] [NormOneClass A'] {u
(g := (fun v ↦ v.multinomial *
∏ j ∈ insert i u, ‖iteratedFDerivWithin 𝕜 (v.count j) (f j) s x‖) ∘
Sym.toMultiset ∘ Subtype.val ∘ (Finset.symInsertEquiv hi).symm)
(by simp) (by simp only [← comp_apply (g := Finset.symInsertEquiv hi), comp.assoc]; simp)]
(by simp) (by simp only [← comp_apply (g := Finset.symInsertEquiv hi), comp_assoc]; simp)]
rw [← Finset.univ_sigma_univ, Finset.sum_sigma, Finset.sum_range]
simp only [comp_apply, Finset.symInsertEquiv_symm_apply_coe]
refine Finset.sum_le_sum ?_
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Analysis/Calculus/FDeriv/Equiv.lean
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ theorem comp_differentiableWithinAt_iff {f : G → E} {s : Set G} {x : G} :
fun H => ?_, fun H => iso.differentiable.differentiableAt.comp_differentiableWithinAt x H⟩
have : DifferentiableWithinAt 𝕜 (iso.symm ∘ iso ∘ f) s x :=
iso.symm.differentiable.differentiableAt.comp_differentiableWithinAt x H
rwa [← Function.comp.assoc iso.symm iso f, iso.symm_comp_self] at this
rwa [← Function.comp_assoc iso.symm iso f, iso.symm_comp_self] at this

theorem comp_differentiableAt_iff {f : G → E} {x : G} :
DifferentiableAt 𝕜 (iso ∘ f) x ↔ DifferentiableAt 𝕜 f x := by
Expand All @@ -107,7 +107,7 @@ theorem comp_hasFDerivWithinAt_iff {f : G → E} {s : Set G} {x : G} {f' : G →
HasFDerivWithinAt (iso ∘ f) ((iso : E →L[𝕜] F).comp f') s x ↔ HasFDerivWithinAt f f' s x := by
refine ⟨fun H => ?_, fun H => iso.hasFDerivAt.comp_hasFDerivWithinAt x H⟩
have A : f = iso.symm ∘ iso ∘ f := by
rw [← Function.comp.assoc, iso.symm_comp_self]
rw [← Function.comp_assoc, iso.symm_comp_self]
rfl
have B : f' = (iso.symm : F →L[𝕜] E).comp ((iso : E →L[𝕜] F).comp f') := by
rw [← ContinuousLinearMap.comp_assoc, iso.coe_symm_comp_coe, ContinuousLinearMap.id_comp]
Expand Down Expand Up @@ -174,7 +174,7 @@ theorem comp_right_differentiableWithinAt_iff {f : F → G} {s : Set F} {x : E}
apply H.comp (iso x) iso.symm.differentiableWithinAt
intro y hy
simpa only [mem_preimage, apply_symm_apply] using hy
rwa [Function.comp.assoc, iso.self_comp_symm] at this
rwa [Function.comp_assoc, iso.self_comp_symm] at this

theorem comp_right_differentiableAt_iff {f : F → G} {x : E} :
DifferentiableAt 𝕜 (f ∘ iso) x ↔ DifferentiableAt 𝕜 f (iso x) := by
Expand All @@ -198,7 +198,7 @@ theorem comp_right_hasFDerivWithinAt_iff {f : F → G} {s : Set F} {x : E} {f' :
refine ⟨fun H => ?_, fun H => H.comp x iso.hasFDerivWithinAt (mapsTo_preimage _ s)⟩
rw [← iso.symm_apply_apply x] at H
have A : f = (f ∘ iso) ∘ iso.symm := by
rw [Function.comp.assoc, iso.self_comp_symm]
rw [Function.comp_assoc, iso.self_comp_symm]
rfl
have B : f' = (f'.comp (iso : E →L[𝕜] F)).comp (iso.symm : F →L[𝕜] E) := by
rw [ContinuousLinearMap.comp_assoc, iso.coe_comp_coe_symm, ContinuousLinearMap.comp_id]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Analysis/Calculus/IteratedDeriv/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ iterated derivative. -/
theorem iteratedFDerivWithin_eq_equiv_comp :
iteratedFDerivWithin 𝕜 n f s =
ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F ∘ iteratedDerivWithin n f s := by
rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
rw [iteratedDerivWithin_eq_equiv_comp, ← Function.comp_assoc, LinearIsometryEquiv.self_comp_symm,
Function.id_comp]

/-- The `n`-th Fréchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
Expand Down Expand Up @@ -203,7 +203,7 @@ theorem iteratedDeriv_eq_equiv_comp : iteratedDeriv n f =
iterated derivative. -/
theorem iteratedFDeriv_eq_equiv_comp : iteratedFDeriv 𝕜 n f =
ContinuousMultilinearMap.piFieldEquiv 𝕜 (Fin n) F ∘ iteratedDeriv n f := by
rw [iteratedDeriv_eq_equiv_comp, ← Function.comp.assoc, LinearIsometryEquiv.self_comp_symm,
rw [iteratedDeriv_eq_equiv_comp, ← Function.comp_assoc, LinearIsometryEquiv.self_comp_symm,
Function.id_comp]

/-- The `n`-th Fréchet derivative applied to a vector `(m 0, ..., m (n-1))` is the derivative
Expand Down
12 changes: 6 additions & 6 deletions Mathlib/Analysis/Convex/Intrinsic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,8 @@ theorem image_intrinsicInterior (φ : P →ᵃⁱ[𝕜] Q) (s : Set P) :
let f := ((affineSpan 𝕜 s).isometryEquivMap φ).toHomeomorph
have : φ.toAffineMap ∘ (↑) ∘ f.symm = (↑) := funext isometryEquivMap.apply_symm_apply
rw [intrinsicInterior, intrinsicInterior, ← φ.coe_toAffineMap, ← map_span φ.toAffineMap s, ← this,
← Function.comp.assoc, image_comp, image_comp, f.symm.image_interior, f.image_symm,
← preimage_comp, Function.comp.assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
← Function.comp_assoc, image_comp, image_comp, f.symm.image_interior, f.image_symm,
← preimage_comp, Function.comp_assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
Function.comp_id, preimage_comp, φ.injective.preimage_image]

@[simp]
Expand All @@ -263,8 +263,8 @@ theorem image_intrinsicFrontier (φ : P →ᵃⁱ[𝕜] Q) (s : Set P) :
let f := ((affineSpan 𝕜 s).isometryEquivMap φ).toHomeomorph
have : φ.toAffineMap ∘ (↑) ∘ f.symm = (↑) := funext isometryEquivMap.apply_symm_apply
rw [intrinsicFrontier, intrinsicFrontier, ← φ.coe_toAffineMap, ← map_span φ.toAffineMap s, ← this,
← Function.comp.assoc, image_comp, image_comp, f.symm.image_frontier, f.image_symm,
← preimage_comp, Function.comp.assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
← Function.comp_assoc, image_comp, image_comp, f.symm.image_frontier, f.image_symm,
← preimage_comp, Function.comp_assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
Function.comp_id, preimage_comp, φ.injective.preimage_image]

@[simp]
Expand All @@ -276,8 +276,8 @@ theorem image_intrinsicClosure (φ : P →ᵃⁱ[𝕜] Q) (s : Set P) :
let f := ((affineSpan 𝕜 s).isometryEquivMap φ).toHomeomorph
have : φ.toAffineMap ∘ (↑) ∘ f.symm = (↑) := funext isometryEquivMap.apply_symm_apply
rw [intrinsicClosure, intrinsicClosure, ← φ.coe_toAffineMap, ← map_span φ.toAffineMap s, ← this,
← Function.comp.assoc, image_comp, image_comp, f.symm.image_closure, f.image_symm,
← preimage_comp, Function.comp.assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
← Function.comp_assoc, image_comp, image_comp, f.symm.image_closure, f.image_symm,
← preimage_comp, Function.comp_assoc, f.symm_comp_self, AffineIsometry.coe_toAffineMap,
Function.comp_id, preimage_comp, φ.injective.preimage_image]

end AffineIsometry
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,7 @@ theorem continuousAt_arg_coe_angle (h : x ≠ 0) : ContinuousAt ((↑) ∘ arg :
· exact Real.Angle.continuous_coe.continuousAt.comp (continuousAt_arg hs)
· rw [← Function.comp_id (((↑) : ℝ → Real.Angle) ∘ arg),
(Function.funext_iff.2 fun _ => (neg_neg _).symm : (id : ℂ → ℂ) = Neg.neg ∘ Neg.neg), ←
Function.comp.assoc]
Function.comp_assoc]
refine ContinuousAt.comp ?_ continuous_neg.continuousAt
suffices ContinuousAt (Function.update (((↑) ∘ arg) ∘ Neg.neg : ℂ → Real.Angle) 0 π) (-x) by
rwa [continuousAt_update_of_ne (neg_ne_zero.2 h)] at this
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Combinatorics/HalesJewett.lean
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def reindex (l : Subspace η α ι) (eη : η ≃ η') (eα : α ≃ α') (eι :

protected lemma IsMono.reindex {eη : η ≃ η'} {eα : α ≃ α'} {eι : ι ≃ ι'} {C : (ι → α) → κ}
(hl : l.IsMono C) : (l.reindex eη eα eι).IsMono fun x ↦ C <| eα.symm ∘ x ∘ eι := by
simp [reindex_isMono, Function.comp.assoc]; simpa [← Function.comp.assoc]
simp [reindex_isMono, Function.comp_assoc]; simpa [← Function.comp_assoc]

end Subspace

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Data/Fin/Tuple/Sort.lean
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ theorem comp_sort_eq_comp_iff_monotone : f ∘ σ = f ∘ sort f ↔ Monotone (f

/-- The sorted versions of a tuple `f` and of any permutation of `f` agree. -/
theorem comp_perm_comp_sort_eq_comp_sort : (f ∘ σ) ∘ sort (f ∘ σ) = f ∘ sort f := by
rw [Function.comp.assoc, ← Equiv.Perm.coe_mul]
rw [Function.comp_assoc, ← Equiv.Perm.coe_mul]
exact unique_monotone (monotone_sort (f ∘ σ)) (monotone_sort f)

/-- If a permutation `f ∘ σ` of the tuple `f` is not the same as `f ∘ sort f`, then `f ∘ σ`
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Dynamics/Ergodic/MeasurePreserving.lean
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,13 @@ protected theorem comp_left_iff {g : α → β} {e : β ≃ᵐ γ} (h : MeasureP
MeasurePreserving (e ∘ g) μa μc ↔ MeasurePreserving g μa μb := by
refine ⟨fun hg => ?_, fun hg => h.comp hg⟩
convert (MeasurePreserving.symm e h).comp hg
simp [← Function.comp.assoc e.symm e g]
simp [← Function.comp_assoc e.symm e g]

protected theorem comp_right_iff {g : α → β} {e : γ ≃ᵐ α} (h : MeasurePreserving e μc μa) :
MeasurePreserving (g ∘ e) μc μb ↔ MeasurePreserving g μa μb := by
refine ⟨fun hg => ?_, fun hg => hg.comp h⟩
convert hg.comp (MeasurePreserving.symm e h)
simp [Function.comp.assoc g e e.symm]
simp [Function.comp_assoc g e e.symm]

protected theorem sigmaFinite {f : α → β} (hf : MeasurePreserving f μa μb) [SigmaFinite μb] :
SigmaFinite μa :=
Expand Down
8 changes: 4 additions & 4 deletions Mathlib/Geometry/Manifold/LocalInvariantProperties.lean
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ theorem liftPropWithinAt_indep_chart_aux (he : e ∈ G.maximalAtlas M) (xe : x
(xf : g x ∈ f.source) (hf' : f' ∈ G'.maximalAtlas M') (xf' : g x ∈ f'.source)
(hgs : ContinuousWithinAt g s x) :
P (f ∘ g ∘ e.symm) (e.symm ⁻¹' s) (e x) ↔ P (f' ∘ g ∘ e'.symm) (e'.symm ⁻¹' s) (e' x) := by
rw [← Function.comp.assoc, hG.liftPropWithinAt_indep_chart_source_aux (f ∘ g) he xe he' xe',
Function.comp.assoc, hG.liftPropWithinAt_indep_chart_target_aux xe' hf xf hf' xf' hgs]
rw [← Function.comp_assoc, hG.liftPropWithinAt_indep_chart_source_aux (f ∘ g) he xe he' xe',
Function.comp_assoc, hG.liftPropWithinAt_indep_chart_target_aux xe' hf xf hf' xf' hgs]

theorem liftPropWithinAt_indep_chart [HasGroupoid M G] [HasGroupoid M' G']
(he : e ∈ G.maximalAtlas M) (xe : x ∈ e.source) (hf : f ∈ G'.maximalAtlas M')
Expand All @@ -292,9 +292,9 @@ theorem liftPropWithinAt_indep_chart_source [HasGroupoid M G] (he : e ∈ G.maxi
rw [liftPropWithinAt_self_source, liftPropWithinAt_iff',
e.symm.continuousWithinAt_iff_continuousWithinAt_comp_right xe, e.symm_symm]
refine and_congr Iff.rfl ?_
rw [Function.comp_apply, e.left_inv xe, ← Function.comp.assoc,
rw [Function.comp_apply, e.left_inv xe, ← Function.comp_assoc,
hG.liftPropWithinAt_indep_chart_source_aux (chartAt _ (g x) ∘ g) (chart_mem_maximalAtlas G x)
(mem_chart_source _ x) he xe, Function.comp.assoc]
(mem_chart_source _ x) he xe, Function.comp_assoc]

/-- A version of `liftPropWithinAt_indep_chart`, only for the target. -/
theorem liftPropWithinAt_indep_chart_target [HasGroupoid M' G'] (hf : f ∈ G'.maximalAtlas M')
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Geometry/Manifold/MFDeriv/Atlas.lean
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ theorem tangentMap_chart_symm {p : TangentBundle I M} {q : TangentBundle I H}
lemma mfderiv_chartAt_eq_tangentCoordChange {x y : M} (hsrc : x ∈ (chartAt H y).source) :
mfderiv I I (chartAt H y) x = tangentCoordChange I x y x := by
have := mdifferentiableAt_atlas I (ChartedSpace.chart_mem_atlas _) hsrc
simp [mfderiv, if_pos this, Function.comp.assoc]
simp [mfderiv, if_pos this, Function.comp_assoc]

end Charts

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ theorem symm_continuousWithinAt_comp_right_iff {X} [TopologicalSpace X] {f : H
· have := h.comp I.continuousWithinAt (mapsTo_preimage _ _)
simp_rw [preimage_inter, preimage_preimage, I.left_inv, preimage_id', preimage_range,
inter_univ] at this
rwa [Function.comp.assoc, I.symm_comp_self] at this
rwa [Function.comp_assoc, I.symm_comp_self] at this
· rw [← I.left_inv x] at h; exact h.comp I.continuousWithinAt_symm inter_subset_left

protected theorem locallyCompactSpace [LocallyCompactSpace E] (I : ModelWithCorners 𝕜 E H) :
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/LinearAlgebra/Alternating/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -603,8 +603,8 @@ theorem map_perm [DecidableEq ι] [Fintype ι] (v : ι → M) (σ : Equiv.Perm
-- Porting note: `apply` → `induction'`
induction' σ using Equiv.Perm.swap_induction_on' with s x y hxy hI
· simp
· -- Porting note: `← Function.comp.assoc` & `-Equiv.Perm.sign_swap'` are required.
simpa [← Function.comp.assoc, g.map_swap (v ∘ s) hxy,
· -- Porting note: `← Function.comp_assoc` & `-Equiv.Perm.sign_swap'` are required.
simpa [← Function.comp_assoc, g.map_swap (v ∘ s) hxy,
Equiv.Perm.sign_swap hxy, -Equiv.Perm.sign_swap'] using hI

theorem map_congr_perm [DecidableEq ι] [Fintype ι] (σ : Equiv.Perm ι) :
Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/Determinant.lean
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ theorem Basis.det_reindex' {ι' : Type*} [Fintype ι'] [DecidableEq ι'] (b : Ba

theorem Basis.det_reindex_symm {ι' : Type*} [Fintype ι'] [DecidableEq ι'] (b : Basis ι R M)
(v : ι → M) (e : ι' ≃ ι) : (b.reindex e.symm).det (v ∘ e) = b.det v := by
rw [Basis.det_reindex, Function.comp.assoc, e.self_comp_symm, Function.comp_id]
rw [Basis.det_reindex, Function.comp_assoc, e.self_comp_symm, Function.comp_id]

@[simp]
theorem Basis.det_map (b : Basis ι R M) (f : M ≃ₗ[R] M') (v : ι → M') :
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/LinearAlgebra/LinearDisjoint.lean
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ theorem linearIndependent_left_of_flat (H : M.LinearDisjoint N) [Module.Flat R N
{ι : Type*} {m : ι → M} (hm : LinearIndependent R m) : LinearMap.ker (mulLeftMap N m) = ⊥ := by
refine LinearMap.ker_eq_bot_of_injective ?_
classical simp_rw [mulLeftMap_eq_mulMap_comp, LinearMap.coe_comp, LinearEquiv.coe_coe,
← Function.comp.assoc, EquivLike.injective_comp]
← Function.comp_assoc, EquivLike.injective_comp]
rw [LinearIndependent, LinearMap.ker_eq_bot] at hm
exact H.injective.comp (Module.Flat.rTensor_preserves_injective_linearMap (M := N) _ hm)

Expand All @@ -332,7 +332,7 @@ theorem linearIndependent_right_of_flat (H : M.LinearDisjoint N) [Module.Flat R
{ι : Type*} {n : ι → N} (hn : LinearIndependent R n) : LinearMap.ker (mulRightMap M n) = ⊥ := by
refine LinearMap.ker_eq_bot_of_injective ?_
classical simp_rw [mulRightMap_eq_mulMap_comp, LinearMap.coe_comp, LinearEquiv.coe_coe,
← Function.comp.assoc, EquivLike.injective_comp]
← Function.comp_assoc, EquivLike.injective_comp]
rw [LinearIndependent, LinearMap.ker_eq_bot] at hn
exact H.injective.comp (Module.Flat.lTensor_preserves_injective_linearMap (M := M) _ hn)

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/LinearAlgebra/Matrix/Block.lean
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ theorem blockTriangular_reindex_iff {b : n → α} {e : m ≃ n} :
· convert h.submatrix
simp only [reindex_apply, submatrix_submatrix, submatrix_id_id, Equiv.symm_comp_self]
· convert h.submatrix
simp only [comp.assoc b e e.symm, Equiv.self_comp_symm, comp_id]
simp only [comp_assoc b e e.symm, Equiv.self_comp_symm, comp_id]

protected theorem BlockTriangular.transpose :
M.BlockTriangular b → Mᵀ.BlockTriangular (toDual ∘ b) :=
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/LinearAlgebra/RootSystem/Hom.lean
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ def Hom.comp {ι₁ M₁ N₁ ι₂ M₂ N₂ : Type*} [AddCommGroup M₁] [Modu
root_weightMap := by
ext i
simp only [LinearMap.coe_comp, Equiv.coe_trans]
rw [comp.assoc, f.root_weightMap, ← comp.assoc, g.root_weightMap, comp.assoc]
rw [comp_assoc, f.root_weightMap, ← comp_assoc, g.root_weightMap, comp_assoc]
coroot_coweightMap := by
ext i
simp only [LinearMap.coe_comp, Equiv.symm_trans_apply]
rw [comp.assoc, g.coroot_coweightMap, ← comp.assoc, f.coroot_coweightMap, comp.assoc]
rw [comp_assoc, g.coroot_coweightMap, ← comp_assoc, f.coroot_coweightMap, comp_assoc]
simp

@[simp]
Expand Down
4 changes: 2 additions & 2 deletions Mathlib/Logic/Function/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ theorem LeftInverse.eq_rightInverse {f : α → β} {g₁ g₂ : β → α} (h
(h₂ : RightInverse g₂ f) : g₁ = g₂ :=
calc
g₁ = g₁ ∘ f ∘ g₂ := by rw [h₂.comp_eq_id, comp_id]
_ = g₂ := by rw [← comp.assoc, h₁.comp_eq_id, id_comp]
_ = g₂ := by rw [← comp_assoc, h₁.comp_eq_id, id_comp]

attribute [local instance] Classical.propDecidable

Expand Down Expand Up @@ -672,7 +672,7 @@ theorem Injective.surjective_comp_right [Nonempty γ] (hf : Injective f) :
theorem Bijective.comp_right (hf : Bijective f) : Bijective fun g : β → γ ↦ g ∘ f :=
⟨hf.surjective.injective_comp_right, fun g ↦
⟨g ∘ surjInv hf.surjective,
by simp only [comp.assoc g _ f, (leftInverse_surjInv hf).comp_eq_id, comp_id]⟩⟩
by simp only [comp_assoc g _ f, (leftInverse_surjInv hf).comp_eq_id, comp_id]⟩⟩

end Extend

Expand Down
3 changes: 2 additions & 1 deletion Mathlib/Logic/Function/Defs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,9 @@ theorem comp_id (f : α → β) : f ∘ id = f := rfl
@[deprecated (since := "2024-01-14")] alias right_id := comp_id
@[deprecated (since := "2024-01-14")] alias comp.right_id := comp_id

theorem comp.assoc (f : φ → δ) (g : β → φ) (h : α → β) : (f ∘ g) ∘ h = f ∘ g ∘ h :=
theorem comp_assoc (f : φ → δ) (g : β → φ) (h : α → β) : (f ∘ g) ∘ h = f ∘ g ∘ h :=
rfl
@[deprecated (since := "2024-09-24")] alias comp.assoc := comp_assoc

@[deprecated (since := "2024-01-14")] alias comp_const_right := comp_const

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/MeasureTheory/Function/Jacobian.lean
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ theorem integrableOn_image_iff_integrableOn_abs_det_fderiv_smul (hs : Measurable
IntegrableOn g (f '' s) μ ↔ IntegrableOn (fun x => |(f' x).det| • g (f x)) s μ := by
rw [IntegrableOn, ← restrict_map_withDensity_abs_det_fderiv_eq_addHaar μ hs hf' hf,
(measurableEmbedding_of_fderivWithin hs hf' hf).integrable_map_iff]
simp only [Set.restrict_eq, ← Function.comp.assoc, ENNReal.ofReal]
simp only [Set.restrict_eq, ← Function.comp_assoc, ENNReal.ofReal]
rw [← (MeasurableEmbedding.subtype_coe hs).integrable_map_iff, map_comap_subtype_coe hs,
restrict_withDensity hs, integrable_withDensity_iff_integrable_coe_smul₀]
· simp_rw [IntegrableOn, Real.coe_toNNReal _ (abs_nonneg _), Function.comp_apply]
Expand Down
Loading

0 comments on commit 067644f

Please sign in to comment.