diff --git a/Mathlib/Algebra/Category/AlgCat/Monoidal.lean b/Mathlib/Algebra/Category/AlgCat/Monoidal.lean index 9e1e41a35ececc..0a2bc6b51a4c20 100644 --- a/Mathlib/Algebra/Category/AlgCat/Monoidal.lean +++ b/Mathlib/Algebra/Category/AlgCat/Monoidal.lean @@ -34,12 +34,12 @@ open scoped TensorProduct /-- Auxiliary definition used to fight a timeout when building `AlgCat.instMonoidalCategory`. -/ @[simps!] -noncomputable abbrev tensorObj (X Y : AlgCat.{u} R) : AlgCat.{u} R := +abbrev tensorObj (X Y : AlgCat.{u} R) : AlgCat.{u} R := of R (X ⊗[R] Y) /-- Auxiliary definition used to fight a timeout when building `AlgCat.instMonoidalCategory`. -/ -noncomputable abbrev tensorHom {W X Y Z : AlgCat.{u} R} (f : W ⟶ X) (g : Y ⟶ Z) : +abbrev tensorHom {W X Y Z : AlgCat.{u} R} (f : W ⟶ X) (g : Y ⟶ Z) : tensorObj W Y ⟶ tensorObj X Z := ofHom <| Algebra.TensorProduct.map f.hom g.hom @@ -93,7 +93,7 @@ theorem hom_inv_associator {M N K : AlgCat.{u} R} : (α_ M N K).inv.hom = (Algebra.TensorProduct.assoc R R R M N K).symm.toAlgHom := rfl -noncomputable instance instMonoidalCategory : MonoidalCategory (AlgCat.{u} R) := +instance instMonoidalCategory : MonoidalCategory (AlgCat.{u} R) := Monoidal.induced (forget₂ (AlgCat R) (ModuleCat R)) { μIso := fun _ _ => Iso.refl _ diff --git a/Mathlib/Algebra/Category/Grp/EpiMono.lean b/Mathlib/Algebra/Category/Grp/EpiMono.lean index 1414285658ead5..2635d4e6a9d648 100644 --- a/Mathlib/Algebra/Category/Grp/EpiMono.lean +++ b/Mathlib/Algebra/Category/Grp/EpiMono.lean @@ -148,7 +148,7 @@ instance : DecidableEq X' := /-- Let `τ` be the permutation on `X'` exchanging `f.hom.range` and the point at infinity. -/ -noncomputable def tau : SX' := +def tau : SX' := Equiv.swap (fromCoset ⟨↑f.hom.range, ⟨1, one_leftCoset _⟩⟩) ∞ local notation "τ" => tau f diff --git a/Mathlib/Algebra/Category/Grp/FilteredColimits.lean b/Mathlib/Algebra/Category/Grp/FilteredColimits.lean index cb08a4df844268..5a5f78fc8a61d0 100644 --- a/Mathlib/Algebra/Category/Grp/FilteredColimits.lean +++ b/Mathlib/Algebra/Category/Grp/FilteredColimits.lean @@ -48,7 +48,7 @@ In the following, we will show that this has the structure of a group. @[to_additive /-- The colimit of `F ⋙ forget₂ AddGrpCat AddMonCat` in the category `AddMonCat`. In the following, we will show that this has the structure of an additive group. -/] -noncomputable abbrev G : MonCat := +abbrev G : MonCat := MonCat.FilteredColimits.colimit.{v, u} (F ⋙ forget₂ GrpCat MonCat.{max v u}) /-- The canonical projection into the colimit, as a quotient type. -/ @@ -109,7 +109,7 @@ theorem colimit_inv_mk_eq (x : Σ j, F.obj j) : (G.mk.{v, u} F x)⁻¹ = G.mk F rfl @[to_additive] -noncomputable instance colimitGroup : Group (G.{v, u} F) := +instance colimitGroup : Group (G.{v, u} F) := { colimitInv.{v, u} F, (G.{v, u} F).str with inv_mul_cancel := fun x => by refine Quot.inductionOn x ?_; clear x; intro x @@ -120,12 +120,12 @@ noncomputable instance colimitGroup : Group (G.{v, u} F) := /-- The bundled group giving the filtered colimit of a diagram. -/ @[to_additive /-- The bundled additive group giving the filtered colimit of a diagram. -/] -noncomputable def colimit : GrpCat.{max v u} := +def colimit : GrpCat.{max v u} := GrpCat.of (G.{v, u} F) /-- The cocone over the proposed colimit group. -/ @[to_additive /-- The cocone over the proposed colimit additive group. -/] -noncomputable def colimitCocone : Cocone F where +def colimitCocone : Cocone F where pt := colimit.{v, u} F ι.app J := GrpCat.ofHom ((MonCat.FilteredColimits.colimitCocone (F ⋙ forget₂ GrpCat MonCat)).ι.app J).hom @@ -134,12 +134,12 @@ noncomputable def colimitCocone : Cocone F where /-- The proposed colimit cocone is a colimit in `GrpCat`. -/ @[to_additive /-- The proposed colimit cocone is a colimit in `AddGroup`. -/] -noncomputable def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := +def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := isColimitOfReflects (forget₂ _ MonCat) (MonCat.FilteredColimits.colimitCoconeIsColimit (F ⋙ forget₂ GrpCat MonCat)) @[to_additive forget₂AddMon_preservesFilteredColimits] -noncomputable instance forget₂Mon_preservesFilteredColimits : +instance forget₂Mon_preservesFilteredColimits : PreservesFilteredColimits.{u} (forget₂ GrpCat.{u} MonCat.{u}) where preserves_filtered_colimits x hx1 _ := letI : Category.{u, u} x := hx1 @@ -147,7 +147,7 @@ noncomputable instance forget₂Mon_preservesFilteredColimits : (MonCat.FilteredColimits.colimitCoconeIsColimit.{u, u} _)⟩ @[to_additive] -noncomputable instance forget_preservesFilteredColimits : +instance forget_preservesFilteredColimits : PreservesFilteredColimits (forget GrpCat.{u}) := Limits.comp_preservesFilteredColimits (forget₂ GrpCat MonCat) (forget MonCat.{u}) @@ -169,11 +169,11 @@ In the following, we will show that this has the structure of a _commutative_ gr @[to_additive /-- The colimit of `F ⋙ forget₂ AddCommGrpCat AddGrpCat` in the category `AddGrpCat`. In the following, we will show that this has the structure of a _commutative_ additive group. -/] -noncomputable abbrev G : GrpCat.{max v u} := +abbrev G : GrpCat.{max v u} := GrpCat.FilteredColimits.colimit.{v, u} (F ⋙ forget₂ CommGrpCat.{max v u} GrpCat.{max v u}) @[to_additive] -noncomputable instance colimitCommGroup : CommGroup.{max v u} (G.{v, u} F) := +instance colimitCommGroup : CommGroup.{max v u} (G.{v, u} F) := { (G F).str, CommMonCat.FilteredColimits.colimitCommMonoid (F ⋙ forget₂ CommGrpCat CommMonCat.{max v u}) with } @@ -181,12 +181,12 @@ noncomputable instance colimitCommGroup : CommGroup.{max v u} (G.{v, u} F) := /-- The bundled commutative group giving the filtered colimit of a diagram. -/ @[to_additive /-- The bundled additive commutative group giving the filtered colimit of a diagram. -/] -noncomputable def colimit : CommGrpCat := +def colimit : CommGrpCat := CommGrpCat.of (G.{v, u} F) /-- The cocone over the proposed colimit commutative group. -/ @[to_additive /-- The cocone over the proposed colimit additive commutative group. -/] -noncomputable def colimitCocone : Cocone F where +def colimitCocone : Cocone F where pt := colimit.{v, u} F ι.app J := CommGrpCat.ofHom ((GrpCat.FilteredColimits.colimitCocone (F ⋙ forget₂ CommGrpCat GrpCat)).ι.app J).hom @@ -195,12 +195,12 @@ noncomputable def colimitCocone : Cocone F where /-- The proposed colimit cocone is a colimit in `CommGrpCat`. -/ @[to_additive /-- The proposed colimit cocone is a colimit in `AddCommGroup`. -/] -noncomputable def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := +def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := isColimitOfReflects (forget₂ _ GrpCat) (GrpCat.FilteredColimits.colimitCoconeIsColimit (F ⋙ forget₂ CommGrpCat GrpCat)) @[to_additive] -noncomputable instance forget₂Group_preservesFilteredColimits : +instance forget₂Group_preservesFilteredColimits : PreservesFilteredColimits (forget₂ CommGrpCat GrpCat.{u}) where preserves_filtered_colimits J hJ1 _ := letI : Category J := hJ1 @@ -210,7 +210,7 @@ noncomputable instance forget₂Group_preservesFilteredColimits : (F ⋙ forget₂ CommGrpCat GrpCat.{u})) } @[to_additive] -noncomputable instance forget_preservesFilteredColimits : +instance forget_preservesFilteredColimits : PreservesFilteredColimits (forget CommGrpCat.{u}) := Limits.comp_preservesFilteredColimits (forget₂ CommGrpCat GrpCat) (forget GrpCat.{u}) diff --git a/Mathlib/Algebra/Category/Grp/Limits.lean b/Mathlib/Algebra/Category/Grp/Limits.lean index 0e1076b924b990..7b8b4418a21fc6 100644 --- a/Mathlib/Algebra/Category/Grp/Limits.lean +++ b/Mathlib/Algebra/Category/Grp/Limits.lean @@ -67,7 +67,7 @@ section variable [Small.{u} (Functor.sections (F ⋙ forget GrpCat))] @[to_additive] -noncomputable instance limitGroup : +instance limitGroup : Group (Types.Small.limitCone.{v, u} (F ⋙ forget GrpCat.{u})).pt := inferInstanceAs <| Group (Shrink (F ⋙ forget GrpCat.{u}).sections) @@ -83,7 +83,7 @@ the existing limit. -/ All we need to do is notice that the limit point has an `AddGroup` instance available, and then reuse the existing limit. -/] -noncomputable instance Forget₂.createsLimit : +instance Forget₂.createsLimit : CreatesLimit F (forget₂ GrpCat.{u} MonCat.{u}) := -- Porting note: need to add `forget₂ GrpCat MonCat` reflects isomorphism letI : (forget₂ GrpCat.{u} MonCat.{u}).ReflectsIsomorphisms := @@ -111,14 +111,14 @@ noncomputable instance Forget₂.createsLimit : (Generally, you'll just want to use `limit F`.) -/ @[to_additive /-- A choice of limit cone for a functor into `GrpCat`. (Generally, you'll just want to use `limit F`.) -/] -noncomputable def limitCone : Cone F := +def limitCone : Cone F := liftLimit (limit.isLimit (F ⋙ forget₂ GrpCat.{u} MonCat.{u})) /-- The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.) -/ @[to_additive /-- The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.) -/] -noncomputable def limitConeIsLimit : IsLimit (limitCone F) := +def limitConeIsLimit : IsLimit (limitCone F) := liftedLimitIsLimit _ /-- If `(F ⋙ forget GrpCat).sections` is `u`-small, `F` has a limit. -/ @@ -196,13 +196,13 @@ instance forget_preservesLimits : PreservesLimits (forget GrpCat.{u}) := GrpCat.forget_preservesLimitsOfSize.{u, u} @[to_additive] -noncomputable instance forget_createsLimit : +instance forget_createsLimit : CreatesLimit F (forget GrpCat.{u}) := by set e : forget₂ GrpCat.{u} MonCat.{u} ⋙ forget MonCat.{u} ≅ forget GrpCat.{u} := Iso.refl _ exact createsLimitOfNatIso e @[to_additive] -noncomputable instance forget_createsLimitsOfShape : +instance forget_createsLimitsOfShape : CreatesLimitsOfShape J (forget GrpCat.{u}) where CreatesLimit := inferInstance @@ -210,7 +210,7 @@ noncomputable instance forget_createsLimitsOfShape : -/ @[to_additive /-- The forgetful functor from additive groups to types creates all limits. -/] -noncomputable instance forget_createsLimitsOfSize : +instance forget_createsLimitsOfSize : CreatesLimitsOfSize.{w, v} (forget GrpCat.{u}) where CreatesLimitsOfShape := inferInstance end GrpCat @@ -224,7 +224,7 @@ instance commGroupObj (j) : CommGroup ((F ⋙ forget CommGrpCat).obj j) := inferInstanceAs <| CommGroup (F.obj j) @[to_additive] -noncomputable instance limitCommGroup +instance limitCommGroup [Small.{u} (Functor.sections (F ⋙ forget CommGrpCat))] : CommGroup (Types.Small.limitCone.{v, u} (F ⋙ forget CommGrpCat.{u})).pt := letI : CommGroup (F ⋙ forget CommGrpCat.{u}).sections := @@ -245,7 +245,7 @@ and then reuse the existing limit. All we need to do is notice that the limit point has an `AddCommGroup` instance available, and then reuse the existing limit. -/] -noncomputable instance Forget₂.createsLimit : +instance Forget₂.createsLimit : CreatesLimit F (forget₂ CommGrpCat GrpCat.{u}) := createsLimitOfReflectsIso (fun c hc => by have : HasLimit _ := ⟨_, hc⟩ @@ -276,7 +276,7 @@ variable [Small.{u} (Functor.sections (F ⋙ forget CommGrpCat))] @[to_additive /-- A choice of limit cone for a functor into `AddCommGrpCat`. (Generally, you'll just want to use `limit F`.) -/] -noncomputable def limitCone : Cone F := +def limitCone : Cone F := letI : Small.{u} (Functor.sections ((F ⋙ forget₂ CommGrpCat GrpCat) ⋙ forget GrpCat)) := inferInstanceAs <| Small (Functor.sections (F ⋙ forget CommGrpCat)) liftLimit (limit.isLimit (F ⋙ forget₂ CommGrpCat.{u} GrpCat.{u})) @@ -286,7 +286,7 @@ noncomputable def limitCone : Cone F := @[to_additive /-- The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.) -/] -noncomputable def limitConeIsLimit : IsLimit (limitCone.{v, u} F) := +def limitConeIsLimit : IsLimit (limitCone.{v, u} F) := liftedLimitIsLimit _ /-- If `(F ⋙ forget CommGrpCat).sections` is `u`-small, `F` has a limit. -/ @@ -359,7 +359,7 @@ instance forget₂Group_preservesLimits : /-- An auxiliary declaration to speed up typechecking. -/ @[to_additive AddCommGrpCat.forget₂AddCommMon_preservesLimitsAux /-- An auxiliary declaration to speed up typechecking. -/] -noncomputable def forget₂CommMon_preservesLimitsAux +def forget₂CommMon_preservesLimitsAux [Small.{u} (F ⋙ forget CommGrpCat).sections] : IsLimit ((forget₂ CommGrpCat.{u} CommMonCat.{u}).mapCone (limitCone.{v, u} F)) := letI : Small.{u} (Functor.sections ((F ⋙ forget₂ _ CommMonCat) ⋙ forget CommMonCat)) := @@ -407,22 +407,22 @@ types.) -/] instance forget_preservesLimitsOfSize : PreservesLimitsOfSize.{w, v} (forget CommGrpCat.{u}) := inferInstance -noncomputable instance _root_.AddCommGrpCat.forget_preservesLimits : +instance _root_.AddCommGrpCat.forget_preservesLimits : PreservesLimits (forget AddCommGrpCat.{u}) := AddCommGrpCat.forget_preservesLimitsOfSize.{u, u} @[to_additive existing] -noncomputable instance forget_preservesLimits : PreservesLimits (forget CommGrpCat.{u}) := +instance forget_preservesLimits : PreservesLimits (forget CommGrpCat.{u}) := CommGrpCat.forget_preservesLimitsOfSize.{u, u} @[to_additive] -noncomputable instance forget_createsLimit : +instance forget_createsLimit : CreatesLimit F (forget CommGrpCat.{u}) := by set e : forget₂ CommGrpCat.{u} GrpCat.{u} ⋙ forget GrpCat.{u} ≅ forget CommGrpCat.{u} := .refl _ exact createsLimitOfNatIso e @[to_additive] -noncomputable instance forget_createsLimitsOfShape (J : Type v) [Category.{w} J] : +instance forget_createsLimitsOfShape (J : Type v) [Category.{w} J] : CreatesLimitsOfShape J (forget CommGrpCat.{u}) where CreatesLimit := inferInstance @@ -430,7 +430,7 @@ noncomputable instance forget_createsLimitsOfShape (J : Type v) [Category.{w} J] -/ @[to_additive /-- The forgetful functor from additive commutative groups to types creates all limits. -/] -noncomputable instance forget_createsLimitsOfSize : +instance forget_createsLimitsOfSize : CreatesLimitsOfSize.{w, v} (forget CommGrpCat.{u}) where CreatesLimitsOfShape := inferInstance diff --git a/Mathlib/Algebra/Category/ModuleCat/Sheaf/Quasicoherent.lean b/Mathlib/Algebra/Category/ModuleCat/Sheaf/Quasicoherent.lean index cecd0a5950edee..9588af7b721e67 100644 --- a/Mathlib/Algebra/Category/ModuleCat/Sheaf/Quasicoherent.lean +++ b/Mathlib/Algebra/Category/ModuleCat/Sheaf/Quasicoherent.lean @@ -129,7 +129,7 @@ def Presentation.isColimit {M : SheafOfModules.{u} R} (P : Presentation M) : set_option backward.defeqAttrib.useBackward true in /-- Mapping a presentation under an isomorphism. -/ @[simps] -noncomputable def Presentation.ofIsIso {M N : SheafOfModules.{u} R} (f : M ⟶ N) [IsIso f] +def Presentation.ofIsIso {M N : SheafOfModules.{u} R} (f : M ⟶ N) [IsIso f] (σ : M.Presentation) : N.Presentation where generators := σ.generators.ofEpi f relations := σ.relations.ofEpi ((kernelCompMono _ f).symm.trans <| eqToIso (by simp)).hom @@ -386,7 +386,7 @@ theorem Presentation.isQuasicoherent {M : SheafOfModules.{u} R} (P : Presentatio /-- Mapping quasicoherent data under an isomorphism. -/ @[simps] -noncomputable def QuasicoherentData.ofIsIso {M N : SheafOfModules.{u} R} (f : M ⟶ N) [IsIso f] +def QuasicoherentData.ofIsIso {M N : SheafOfModules.{u} R} (f : M ⟶ N) [IsIso f] (σ : M.QuasicoherentData) : N.QuasicoherentData where I := σ.I X := σ.X diff --git a/Mathlib/Algebra/Category/MonCat/FilteredColimits.lean b/Mathlib/Algebra/Category/MonCat/FilteredColimits.lean index 7bd13a893314d7..3854535e8ccb4d 100644 --- a/Mathlib/Algebra/Category/MonCat/FilteredColimits.lean +++ b/Mathlib/Algebra/Category/MonCat/FilteredColimits.lean @@ -52,7 +52,7 @@ abbrev M := (F ⋙ forget MonCat).ColimitType /-- The canonical projection into the colimit, as a quotient type. -/ @[to_additive /-- The canonical projection into the colimit, as a quotient type. -/] -noncomputable abbrev M.mk : (Σ j, F.obj j) → M.{v, u} F := +abbrev M.mk : (Σ j, F.obj j) → M.{v, u} F := fun x ↦ (F ⋙ forget MonCat).ιColimitType x.1 x.2 @[to_additive] @@ -79,7 +79,7 @@ variable [IsFiltered J] @[to_additive /-- As `J` is nonempty, we can pick an arbitrary object `j₀ : J`. We use this object to define the "zero" in the colimit as the equivalence class of `⟨j₀, 0 : F.obj j₀⟩`. -/] -noncomputable instance colimitOne : One (M.{v, u} F) where +instance colimitOne : One (M.{v, u} F) where one := M.mk F ⟨IsFiltered.nonempty.some,1⟩ /-- The definition of the "one" in the colimit is independent of the chosen object of `J`. @@ -103,7 +103,7 @@ and multiply them there. /-- The "unlifted" version of addition in the colimit. To add two dependent pairs `⟨j₁, x⟩` and `⟨j₂, y⟩`, we pass to a common successor of `j₁` and `j₂` (given by `IsFiltered.max`) and add them there. -/] -noncomputable def colimitMulAux (x y : Σ j, F.obj j) : M.{v, u} F := +def colimitMulAux (x y : Σ j, F.obj j) : M.{v, u} F := M.mk F ⟨IsFiltered.max x.fst y.fst, F.map (IsFiltered.leftToMax x.1 y.1) x.2 * F.map (IsFiltered.rightToMax x.1 y.1) y.2⟩ @@ -144,7 +144,7 @@ theorem colimitMulAux_eq_of_rel_right {x y y' : Σ j, F.obj j} /-- Multiplication in the colimit. See also `colimitMulAux`. -/ @[to_additive /-- Addition in the colimit. See also `colimitAddAux`. -/] -noncomputable instance colimitMul : Mul (M.{v, u} F) := +instance colimitMul : Mul (M.{v, u} F) := { mul := fun x y => by refine Quot.lift₂ (colimitMulAux F) ?_ ?_ x y · intro x y y' h @@ -180,7 +180,7 @@ lemma colimit_mul_mk_eq' {j : J} (x y : F.obj j) : simpa using! colimit_mul_mk_eq F ⟨j, x⟩ ⟨j, y⟩ j (𝟙 _) (𝟙 _) @[to_additive] -noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) := +instance colimitMulOneClass : MulOneClass (M.{v, u} F) := { colimitOne F, colimitMul F with one_mul := fun x => by @@ -191,7 +191,7 @@ noncomputable instance colimitMulOneClass : MulOneClass (M.{v, u} F) := rw [colimit_one_eq F j, colimit_mul_mk_eq', mul_one] } @[to_additive] -noncomputable instance colimitMonoid : Monoid (M.{v, u} F) := +instance colimitMonoid : Monoid (M.{v, u} F) := { colimitMulOneClass F with mul_assoc := fun x y z => by obtain ⟨j₁, x₁, rfl⟩ := x.mk_surjective @@ -209,14 +209,14 @@ noncomputable instance colimitMonoid : Monoid (M.{v, u} F) := /-- The bundled monoid giving the filtered colimit of a diagram. -/ @[to_additive /-- The bundled additive monoid giving the filtered colimit of a diagram. -/] -noncomputable def colimit : MonCat.{max v u} := +def colimit : MonCat.{max v u} := MonCat.of (M.{v, u} F) /-- The monoid homomorphism from a given monoid in the diagram to the colimit monoid. -/ @[to_additive /-- The additive monoid homomorphism from a given additive monoid in the diagram to the colimit additive monoid. -/] -noncomputable def coconeMorphism (j : J) : F.obj j ⟶ colimit F := +def coconeMorphism (j : J) : F.obj j ⟶ colimit F := ofHom { toFun := (Types.TypeMax.colimitCocone.{v, max v u, v} (F ⋙ forget MonCat)).ι.app j map_one' := (colimit_one_eq F j).symm @@ -231,7 +231,7 @@ theorem cocone_naturality {j j' : J} (f : j ⟶ j') : set_option backward.defeqAttrib.useBackward true in /-- The cocone over the proposed colimit monoid. -/ @[to_additive /-- The cocone over the proposed colimit additive monoid. -/] -noncomputable def colimitCocone : Cocone F where +def colimitCocone : Cocone F where pt := colimit.{v, u} F ι := { app := coconeMorphism F } @@ -246,7 +246,7 @@ The only thing left to see is that it is a monoid homomorphism. to the cocone point. As a function, this is simply given by the induced map of the corresponding cocone in `Type`. The only thing left to see is that it is an additive monoid homomorphism. -/] -noncomputable def colimitDesc (t : Cocone F) : colimit.{v, u} F ⟶ t.pt := +def colimitDesc (t : Cocone F) : colimit.{v, u} F ⟶ t.pt := ofHom { toFun := (F ⋙ forget MonCat).descColimitType ((F ⋙ forget MonCat).coconeTypesEquiv.symm ((forget MonCat).mapCocone t)) @@ -262,7 +262,7 @@ noncomputable def colimitDesc (t : Cocone F) : colimit.{v, u} F ⟶ t.pt := /-- The proposed colimit cocone is a colimit in `MonCat`. -/ @[to_additive /-- The proposed colimit cocone is a colimit in `AddMonCat`. -/] -noncomputable def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) where +def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) where desc := colimitDesc.{v, u} F fac t j := rfl uniq t m h := MonCat.ext fun y ↦ by @@ -295,13 +295,13 @@ In the following, we will show that this has the structure of a _commutative_ mo @[to_additive /-- The colimit of `F ⋙ forget₂ AddCommMonCat AddMonCat` in the category `AddMonCat`. In the following, we will show that this has the structure of a _commutative_ additive monoid. -/] -noncomputable abbrev M : MonCat.{max v u} := +abbrev M : MonCat.{max v u} := MonCat.FilteredColimits.colimit.{v, u} (F ⋙ forget₂ CommMonCat MonCat.{max v u}) set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in @[to_additive] -noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) := +instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) := { (M.{v, u} F) with mul_comm := fun x y => by obtain ⟨i, x, rfl⟩ := x.mk_surjective @@ -317,12 +317,12 @@ noncomputable instance colimitCommMonoid : CommMonoid.{max v u} (M.{v, u} F) := /-- The bundled commutative monoid giving the filtered colimit of a diagram. -/ @[to_additive /-- The bundled additive commutative monoid giving the filtered colimit of a diagram. -/] -noncomputable def colimit : CommMonCat.{max v u} := +def colimit : CommMonCat.{max v u} := CommMonCat.of (M.{v, u} F) /-- The cocone over the proposed colimit commutative monoid. -/ @[to_additive /-- The cocone over the proposed colimit additive commutative monoid. -/] -noncomputable def colimitCocone : Cocone F where +def colimitCocone : Cocone F where pt := colimit.{v, u} F ι.app j := ofHom ((MonCat.FilteredColimits.colimitCocone.{v, u} (F ⋙ forget₂ CommMonCat MonCat.{max v u})).ι.app j).hom @@ -332,19 +332,19 @@ noncomputable def colimitCocone : Cocone F where /-- The proposed colimit cocone is a colimit in `CommMonCat`. -/ @[to_additive /-- The proposed colimit cocone is a colimit in `AddCommMonCat`. -/] -noncomputable def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := +def colimitCoconeIsColimit : IsColimit (colimitCocone.{v, u} F) := isColimitOfReflects (forget₂ CommMonCat MonCat) (MonCat.FilteredColimits.colimitCoconeIsColimit (F ⋙ forget₂ _ _)) @[to_additive forget₂AddMonPreservesFilteredColimits] -noncomputable instance forget₂Mon_preservesFilteredColimits : +instance forget₂Mon_preservesFilteredColimits : PreservesFilteredColimits (forget₂ CommMonCat MonCat.{u}) where preserves_filtered_colimits _ _ _ := ⟨fun {F} => preservesColimit_of_preserves_colimit_cocone (colimitCoconeIsColimit.{u, u} F) (MonCat.FilteredColimits.colimitCoconeIsColimit (F ⋙ forget₂ CommMonCat MonCat.{u}))⟩ @[to_additive] -noncomputable instance forget_preservesFilteredColimits : +instance forget_preservesFilteredColimits : PreservesFilteredColimits (forget CommMonCat.{u}) := Limits.comp_preservesFilteredColimits (forget₂ CommMonCat MonCat) (forget MonCat) diff --git a/Mathlib/Algebra/Category/MonCat/Limits.lean b/Mathlib/Algebra/Category/MonCat/Limits.lean index a567874386d21b..e2c92085aa7fca 100644 --- a/Mathlib/Algebra/Category/MonCat/Limits.lean +++ b/Mathlib/Algebra/Category/MonCat/Limits.lean @@ -55,7 +55,7 @@ variable [Small.{u} (Functor.sections (F ⋙ forget MonCat))] set_option backward.inferInstanceAs.wrap.data false in @[to_additive] -noncomputable instance limitMonoid : +instance limitMonoid : Monoid (Types.Small.limitCone.{v, u} (F ⋙ forget MonCat.{u})).pt := inferInstanceAs <| Monoid (Shrink (F ⋙ forget MonCat.{u}).sections) @@ -63,7 +63,7 @@ set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- `limit.π (F ⋙ forget MonCat) j` as a `MonoidHom`. -/ @[to_additive /-- `limit.π (F ⋙ forget AddMonCat) j` as an `AddMonoidHom`. -/] -noncomputable def limitπMonoidHom (j : J) : +def limitπMonoidHom (j : J) : (Types.Small.limitCone.{v, u} (F ⋙ forget MonCat.{u})).pt →* F.obj j where toFun := (Types.Small.limitCone.{v, u} (F ⋙ forget MonCat.{u})).π.app j @@ -79,7 +79,7 @@ namespace HasLimits (Internal use only; use the limits API.) -/ @[to_additive /-- (Internal use only; use the limits API.) -/] -noncomputable def limitCone : Cone F := +def limitCone : Cone F := { pt := MonCat.of (Types.Small.limitCone (F ⋙ forget _)).pt π := { app j := ofHom (limitπMonoidHom F j) @@ -92,7 +92,7 @@ set_option backward.isDefEq.respectTransparency false in (Internal use only; use the limits API.) -/ @[to_additive /-- (Internal use only; use the limits API.) -/] -noncomputable def limitConeIsLimit : IsLimit (limitCone F) := by +def limitConeIsLimit : IsLimit (limitCone F) := by refine IsLimit.ofFaithful (forget MonCat) (Types.Small.limitConeIsLimit.{v, u} _) (fun s => ofHom { toFun := _, map_one' := ?_, map_mul' := ?_ }) (fun s => rfl) · simp @@ -130,7 +130,7 @@ instance hasLimits : HasLimits MonCat.{u} := /-- If `J` is `u`-small, the forgetful functor from `MonCat.{u}` preserves limits of shape `J`. -/ @[to_additive /-- If `J` is `u`-small, the forgetful functor from `AddMonCat.{u}` preserves limits of shape `J`. -/] -noncomputable instance forget_preservesLimitsOfShape [Small.{u} J] : +instance forget_preservesLimitsOfShape [Small.{u} J] : PreservesLimitsOfShape J (forget MonCat.{u}) where preservesLimit {F} := preservesLimit_of_preserves_limit_cone (limitConeIsLimit F) (Types.Small.limitConeIsLimit (F ⋙ forget _)) @@ -142,18 +142,18 @@ This means the underlying type of a limit can be computed as a limit in the cate /-- The forgetful functor from additive monoids to types preserves all limits. This means the underlying type of a limit can be computed as a limit in the category of types. -/] -noncomputable instance forget_preservesLimitsOfSize [UnivLE.{v, u}] : +instance forget_preservesLimitsOfSize [UnivLE.{v, u}] : PreservesLimitsOfSize.{w, v} (forget MonCat.{u}) where preservesLimitsOfShape := { } @[to_additive] -noncomputable instance forget_preservesLimits : PreservesLimits (forget MonCat.{u}) := +instance forget_preservesLimits : PreservesLimits (forget MonCat.{u}) := MonCat.forget_preservesLimitsOfSize.{u, u} set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in @[to_additive] -noncomputable instance forget_createsLimit : +instance forget_createsLimit : CreatesLimit F (forget MonCat.{u}) := by apply createsLimitOfReflectsIso intro c t @@ -185,18 +185,18 @@ noncomputable instance forget_createsLimit : · exact fun _ ↦ rfl @[to_additive] -noncomputable instance forget_createsLimitsOfShape : +instance forget_createsLimitsOfShape : CreatesLimitsOfShape J (forget MonCat.{u}) where CreatesLimit := inferInstance /-- The forgetful functor from monoids to types preserves all limits. -/ @[to_additive /-- The forgetful functor from additive monoids to types preserves all limits. -/] -noncomputable instance forget_createsLimitsOfSize : +instance forget_createsLimitsOfSize : CreatesLimitsOfSize.{w, v} (forget MonCat.{u}) where CreatesLimitsOfShape := inferInstance @[to_additive] -noncomputable instance forget_createsLimits : CreatesLimits (forget MonCat.{u}) := +instance forget_createsLimits : CreatesLimits (forget MonCat.{u}) := MonCat.forget_createsLimitsOfSize.{u, u} end MonCat @@ -214,7 +214,7 @@ instance commMonoidObj (j) : CommMonoid ((F ⋙ forget CommMonCat.{u}).obj j) := variable [Small.{u} (Functor.sections (F ⋙ forget CommMonCat))] @[to_additive] -noncomputable instance limitCommMonoid : +instance limitCommMonoid : CommMonoid (Types.Small.limitCone (F ⋙ forget CommMonCat.{u})).pt := letI : CommMonoid (F ⋙ forget CommMonCat.{u}).sections := @Submonoid.toCommMonoid (∀ j, F.obj j) _ @@ -233,7 +233,7 @@ and then reuse the existing limit. -/ All we need to do is notice that the limit point has an `AddCommMonoid` instance available, and then reuse the existing limit. -/] -noncomputable instance forget₂CreatesLimit : CreatesLimit F (forget₂ CommMonCat MonCat.{u}) := +instance forget₂CreatesLimit : CreatesLimit F (forget₂ CommMonCat MonCat.{u}) := createsLimitOfReflectsIso fun c' t => { liftedCone := { pt := CommMonCat.of (Types.Small.limitCone (F ⋙ forget CommMonCat)).pt @@ -252,7 +252,7 @@ noncomputable instance forget₂CreatesLimit : CreatesLimit F (forget₂ CommMon -/ @[to_additive /-- A choice of limit cone for a functor into `AddCommMonCat`. (Generally, you'll just want to use `limit F`.) -/] -noncomputable def limitCone : Cone F := +def limitCone : Cone F := liftLimit (limit.isLimit (F ⋙ forget₂ CommMonCat.{u} MonCat.{u})) /-- The chosen cone is a limit cone. @@ -261,7 +261,7 @@ noncomputable def limitCone : Cone F := @[to_additive /-- The chosen cone is a limit cone. (Generally, you'll just want to use `limit.cone F`.) -/] -noncomputable def limitConeIsLimit : IsLimit (limitCone F) := +def limitConeIsLimit : IsLimit (limitCone F) := liftedLimitIsLimit _ /-- If `(F ⋙ forget CommMonCat).sections` is `u`-small, `F` has a limit. -/ @@ -333,26 +333,26 @@ instance forget_preservesLimits : PreservesLimits (forget CommMonCat.{u}) := CommMonCat.forget_preservesLimitsOfSize.{u, u} @[to_additive] -noncomputable instance forget_createsLimit : +instance forget_createsLimit : CreatesLimit F (forget CommMonCat.{u}) := by set e : forget CommMonCat.{u} ≅ forget₂ CommMonCat.{u} MonCat.{u} ⋙ forget MonCat.{u} := NatIso.ofComponents (fun _ ↦ Iso.refl _) (fun _ ↦ rfl) exact createsLimitOfNatIso e.symm @[to_additive] -noncomputable instance forget_createsLimitsOfShape : +instance forget_createsLimitsOfShape : CreatesLimitsOfShape J (forget MonCat.{u}) where CreatesLimit := inferInstance /-- The forgetful functor from commutative monoids to types preserves all limits. -/ @[to_additive /-- The forgetful functor from commutative additive monoids to types preserves all limits. -/] -noncomputable instance forget_createsLimitsOfSize : +instance forget_createsLimitsOfSize : CreatesLimitsOfSize.{w, v} (forget MonCat.{u}) where CreatesLimitsOfShape := inferInstance @[to_additive] -noncomputable instance forget_createsLimits : CreatesLimits (forget MonCat.{u}) := +instance forget_createsLimits : CreatesLimits (forget MonCat.{u}) := CommMonCat.forget_createsLimitsOfSize.{u, u} end CommMonCat diff --git a/Mathlib/Algebra/Category/Ring/Under/Limits.lean b/Mathlib/Algebra/Category/Ring/Under/Limits.lean index 7b05204b482d33..468aadd08e7f8f 100644 --- a/Mathlib/Algebra/Category/Ring/Under/Limits.lean +++ b/Mathlib/Algebra/Category/Ring/Under/Limits.lean @@ -87,7 +87,7 @@ def tensorProductFanIsLimit [Finite ι] : IsLimit (tensorProductFan S P) := (IsLimit.equivIsoLimit (tensorProductFanIso P)).symm (Under.piFanIsLimit _) /-- `tensorProd R S` preserves the limit of the canonical fan on `P`. -/ -noncomputable -- marked noncomputable for performance (only) +-- marked noncomputable for performance (only) def piFanTensorProductIsLimit [Finite ι] : IsLimit ((tensorProd R S).mapCone (Under.piFan P)) := (isLimitMapConeFanMkEquiv (tensorProd R S) P _).symm <| tensorProductFanIsLimit P @@ -139,7 +139,7 @@ lemma equalizerFork'_ι {A B : Type u} [CommRing A] [CommRing B] [Algebra R A] [ /-- The canonical fork on `f g : A ⟶ B` is limiting. -/ -- marked noncomputable for performance (only) -noncomputable def equalizerForkIsLimit {A B : Under R} (f g : A ⟶ B) : +def equalizerForkIsLimit {A B : Under R} (f g : A ⟶ B) : IsLimit (Under.equalizerFork f g) := isLimitOfReflects (Under.forget R) <| (isLimitMapConeForkEquiv (Under.forget R) (equalizer_comp f g)).invFun <| @@ -167,7 +167,7 @@ lemma tensorProdEqualizer_ι {A B : Under R} (f g : A ⟶ B) : /-- If `S` is `R`-flat, `S ⊗[R] eq(f, g)` is isomorphic to `eq(𝟙 ⊗[R] f, 𝟙 ⊗[R] g)`. -/ -- marked noncomputable for performance (only) -noncomputable def equalizerForkTensorProdIso [Module.Flat R S] {A B : Under R} (f g : A ⟶ B) : +def equalizerForkTensorProdIso [Module.Flat R S] {A B : Under R} (f g : A ⟶ B) : tensorProdEqualizer f g ≅ Under.equalizerFork' (Algebra.TensorProduct.map (AlgHom.id S S) (toAlgHom f)) (Algebra.TensorProduct.map (AlgHom.id S S) (toAlgHom g)) := @@ -176,7 +176,7 @@ noncomputable def equalizerForkTensorProdIso [Module.Flat R S] {A B : Under R} ( apply AlgHom.coe_tensorEqualizer /-- If `S` is `R`-flat, `tensorProd R S` preserves the equalizer of `f` and `g`. -/ -noncomputable -- marked noncomputable for performance (only) +-- marked noncomputable for performance (only) def tensorProdMapEqualizerForkIsLimit [Module.Flat R S] {A B : Under R} (f g : A ⟶ B) : IsLimit ((tensorProd R S).mapCone <| Under.equalizerFork f g) := (isLimitMapConeForkEquiv (tensorProd R S) _).symm <| diff --git a/Mathlib/Algebra/Colimit/Ring.lean b/Mathlib/Algebra/Colimit/Ring.lean index 1091157c329aac..9d719bfee265ae 100644 --- a/Mathlib/Algebra/Colimit/Ring.lean +++ b/Mathlib/Algebra/Colimit/Ring.lean @@ -323,7 +323,7 @@ section open scoped Classical in /-- Noncomputable multiplicative inverse in a direct limit of fields. -/ -noncomputable def inv (p : Ring.DirectLimit G f) : Ring.DirectLimit G f := +def inv (p : Ring.DirectLimit G f) : Ring.DirectLimit G f := if H : p = 0 then 0 else Classical.choose (DirectLimit.exists_inv G f H) protected theorem mul_inv_cancel {p : Ring.DirectLimit G f} (hp : p ≠ 0) : p * inv G f p = 1 := by @@ -334,7 +334,7 @@ protected theorem inv_mul_cancel {p : Ring.DirectLimit G f} (hp : p ≠ 0) : inv /-- Noncomputable field structure on the direct limit of fields. See note [reducible non-instances]. -/ -protected noncomputable abbrev field [DirectedSystem G (f' · · ·)] : +protected abbrev field [DirectedSystem G (f' · · ·)] : Field (Ring.DirectLimit G (f' · · ·)) where -- This used to include the parent CommRing and Nontrivial instances, -- but leaving them implicit avoids a very expensive (2-3 minutes!) eta expansion. diff --git a/Mathlib/Algebra/GCDMonoid/Basic.lean b/Mathlib/Algebra/GCDMonoid/Basic.lean index 7b7826686220ea..ce6704d2884f32 100644 --- a/Mathlib/Algebra/GCDMonoid/Basic.lean +++ b/Mathlib/Algebra/GCDMonoid/Basic.lean @@ -1084,12 +1084,12 @@ def strongNormalizationMonoidOfMonoidHomRightInverse [DecidableEq α] (f : Assoc Associates.mk_one, map_one] @[deprecated (since := "2026-07-08")] -noncomputable alias normalizationMonoidOfMonoidHomRightInverse := +alias normalizationMonoidOfMonoidHomRightInverse := strongNormalizationMonoidOfMonoidHomRightInverse /-- Define `GCDMonoid` on a structure just from the `gcd` and its properties. -/ @[implicit_reducible] -noncomputable def gcdMonoidOfGCD [DecidableEq α] (gcd : α → α → α) +def gcdMonoidOfGCD [DecidableEq α] (gcd : α → α → α) (gcd_dvd_left : ∀ a b, gcd a b ∣ a) (gcd_dvd_right : ∀ a b, gcd a b ∣ b) (dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b) : GCDMonoid α := { gcd @@ -1117,7 +1117,7 @@ noncomputable def gcdMonoidOfGCD [DecidableEq α] (gcd : α → α → α) set_option backward.isDefEq.respectTransparency false in /-- Define `NormalizedGCDMonoid` on a structure just from the `gcd` and its properties. -/ @[implicit_reducible] -noncomputable def normalizedGCDMonoidOfGCD [NormalizationMonoid α] [DecidableEq α] (gcd : α → α → α) +def normalizedGCDMonoidOfGCD [NormalizationMonoid α] [DecidableEq α] (gcd : α → α → α) (gcd_dvd_left : ∀ a b, gcd a b ∣ a) (gcd_dvd_right : ∀ a b, gcd a b ∣ b) (dvd_gcd : ∀ {a b c}, a ∣ c → a ∣ b → a ∣ gcd c b) (normalize_gcd : ∀ a b, normalize (gcd a b) = gcd a b) : NormalizedGCDMonoid α := @@ -1146,7 +1146,7 @@ noncomputable def normalizedGCDMonoidOfGCD [NormalizationMonoid α] [DecidableEq /-- Define `GCDMonoid` on a structure just from the `lcm` and its properties. -/ @[implicit_reducible] -noncomputable def gcdMonoidOfLCM [DecidableEq α] (lcm : α → α → α) +def gcdMonoidOfLCM [DecidableEq α] (lcm : α → α → α) (dvd_lcm_left : ∀ a b, a ∣ lcm a b) (dvd_lcm_right : ∀ a b, b ∣ lcm a b) (lcm_dvd : ∀ {a b c}, c ∣ a → b ∣ a → lcm c b ∣ a) : GCDMonoid α := let exists_gcd a b := lcm_dvd (Dvd.intro b rfl) (Dvd.intro_left a rfl) @@ -1212,7 +1212,7 @@ noncomputable def gcdMonoidOfLCM [DecidableEq α] (lcm : α → α → α) set_option backward.isDefEq.respectTransparency false in /-- Define `NormalizedGCDMonoid` on a structure just from the `lcm` and its properties. -/ @[implicit_reducible] -noncomputable def normalizedGCDMonoidOfLCM [NormalizationMonoid α] [DecidableEq α] (lcm : α → α → α) +def normalizedGCDMonoidOfLCM [NormalizationMonoid α] [DecidableEq α] (lcm : α → α → α) (dvd_lcm_left : ∀ a b, a ∣ lcm a b) (dvd_lcm_right : ∀ a b, b ∣ lcm a b) (lcm_dvd : ∀ {a b c}, c ∣ a → b ∣ a → lcm c b ∣ a) (normalize_lcm : ∀ a b, normalize (lcm a b) = lcm a b) : NormalizedGCDMonoid α := @@ -1268,7 +1268,7 @@ noncomputable def normalizedGCDMonoidOfLCM [NormalizationMonoid α] [DecidableEq /-- Define a `GCDMonoid` structure on a monoid just from the existence of a `gcd`. -/ @[implicit_reducible] -noncomputable def gcdMonoidOfExistsGCD [DecidableEq α] +def gcdMonoidOfExistsGCD [DecidableEq α] (h : ∀ a b : α, ∃ c : α, ∀ d : α, d ∣ a ∧ d ∣ b ↔ d ∣ c) : GCDMonoid α := gcdMonoidOfGCD (fun a b => Classical.choose (h a b)) (fun a b => ((Classical.choose_spec (h a b) (Classical.choose (h a b))).2 dvd_rfl).1) @@ -1277,7 +1277,7 @@ noncomputable def gcdMonoidOfExistsGCD [DecidableEq α] /-- Define a `NormalizedGCDMonoid` structure on a monoid just from the existence of a `gcd`. -/ @[implicit_reducible] -noncomputable def normalizedGCDMonoidOfExistsGCD [NormalizationMonoid α] [DecidableEq α] +def normalizedGCDMonoidOfExistsGCD [NormalizationMonoid α] [DecidableEq α] (h : ∀ a b : α, ∃ c : α, ∀ d : α, d ∣ a ∧ d ∣ b ↔ d ∣ c) : NormalizedGCDMonoid α := normalizedGCDMonoidOfGCD (fun a b => normalize (Classical.choose (h a b))) (fun a b => @@ -1312,7 +1312,7 @@ theorem nonempty_strongNormalizedGCDMonoid_iff {α} [CommMonoidWithZero α] : /-- Define a `GCDMonoid` structure on a monoid just from the existence of an `lcm`. -/ @[implicit_reducible] -noncomputable def gcdMonoidOfExistsLCM [DecidableEq α] +def gcdMonoidOfExistsLCM [DecidableEq α] (h : ∀ a b : α, ∃ c : α, ∀ d : α, a ∣ d ∧ b ∣ d ↔ c ∣ d) : GCDMonoid α := gcdMonoidOfLCM (fun a b => Classical.choose (h a b)) (fun a b => ((Classical.choose_spec (h a b) (Classical.choose (h a b))).2 dvd_rfl).1) @@ -1321,7 +1321,7 @@ noncomputable def gcdMonoidOfExistsLCM [DecidableEq α] /-- Define a `NormalizedGCDMonoid` structure on a monoid just from the existence of an `lcm`. -/ @[implicit_reducible] -noncomputable def normalizedGCDMonoidOfExistsLCM [NormalizationMonoid α] [DecidableEq α] +def normalizedGCDMonoidOfExistsLCM [NormalizationMonoid α] [DecidableEq α] (h : ∀ a b : α, ∃ c : α, ∀ d : α, a ∣ d ∧ b ∣ d ↔ c ∣ d) : NormalizedGCDMonoid α := normalizedGCDMonoidOfLCM (fun a b => normalize (Classical.choose (h a b))) (fun a b => diff --git a/Mathlib/Algebra/Group/Finsupp.lean b/Mathlib/Algebra/Group/Finsupp.lean index a3ddce45119979..4110bf348c32f4 100644 --- a/Mathlib/Algebra/Group/Finsupp.lean +++ b/Mathlib/Algebra/Group/Finsupp.lean @@ -74,7 +74,7 @@ instance instIsLeftCancelAdd [IsLeftCancelAdd M] : IsLeftCancelAdd (ι →₀ M) /-- When ι is finite and M is an AddMonoid, then Finsupp.equivFunOnFinite gives an AddEquiv -/ -noncomputable def addEquivFunOnFinite {ι : Type*} [Finite ι] : +def addEquivFunOnFinite {ι : Type*} [Finite ι] : (ι →₀ M) ≃+ (ι → M) where __ := Finsupp.equivFunOnFinite map_add' _ _ := rfl @@ -82,7 +82,7 @@ noncomputable def addEquivFunOnFinite {ι : Type*} [Finite ι] : /-- If `M` is the trivial monoid, then the monoid of finitely supported functions `ι →₀ M` is is isomorphic to `M`. -/ @[simps! apply symm_apply] -noncomputable def uniqueAddEquiv (i : ι) [Subsingleton ι] : (ι →₀ M) ≃+ M where +def uniqueAddEquiv (i : ι) [Subsingleton ι] : (ι →₀ M) ≃+ M where toEquiv := uniqueEquiv i map_add' _ _ := rfl @@ -93,7 +93,7 @@ noncomputable def uniqueAddEquiv (i : ι) [Subsingleton ι] : (ι →₀ M) ≃+ /-- If `M` is the trivial monoid, then the monoid of finitely supported functions `ι →₀ M` is is isomorphic to `M`. -/ @[simps!, deprecated uniqueAddEquiv (since := "2026-05-06")] -noncomputable def _root_.AddEquiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃+ M where +def _root_.AddEquiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃+ M where toEquiv := .finsuppUnique map_add' _ _ := rfl @@ -114,7 +114,7 @@ def applyAddHom (a : ι) : (ι →₀ M) →+ M where /-- Coercion from a `Finsupp` to a function type is an `AddMonoidHom`. -/ @[simps] -noncomputable def coeFnAddHom : (ι →₀ M) →+ ι → M where +def coeFnAddHom : (ι →₀ M) →+ ι → M where toFun := (⇑) map_zero' := coe_zero map_add' := coe_add diff --git a/Mathlib/Algebra/Homology/Homotopy.lean b/Mathlib/Algebra/Homology/Homotopy.lean index a931b79b3bbc97..4c4fc6a4d9bf37 100644 --- a/Mathlib/Algebra/Homology/Homotopy.lean +++ b/Mathlib/Algebra/Homology/Homotopy.lean @@ -786,7 +786,7 @@ set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- A homotopy between morphisms of homological complexes `K ⟶ L` induces a homotopy between morphisms of short complexes `K.sc i ⟶ L.sc i`. -/ -noncomputable def Homotopy.toShortComplex (ho : Homotopy f g) (i : ι) : +def Homotopy.toShortComplex (ho : Homotopy f g) (i : ι) : ShortComplex.Homotopy ((shortComplexFunctor C c i).map f) ((shortComplexFunctor C c i).map g) where h₀ := @@ -832,7 +832,7 @@ lemma Homotopy.homologyMap_eq (ho : Homotopy f g) (i : ι) [K.HasHomology i] [L. open scoped Classical in ShortComplex.Homotopy.homologyMap_congr (ho.toShortComplex i) /-- The isomorphism in homology induced by a homotopy equivalence. -/ -noncomputable def HomotopyEquiv.toHomologyIso (h : HomotopyEquiv K L) (i : ι) +def HomotopyEquiv.toHomologyIso (h : HomotopyEquiv K L) (i : ι) [K.HasHomology i] [L.HasHomology i] : K.homology i ≅ L.homology i where hom := homologyMap h.hom i inv := homologyMap h.inv i diff --git a/Mathlib/Algebra/Homology/HomotopyCategory.lean b/Mathlib/Algebra/Homology/HomotopyCategory.lean index 8fafd08769e51a..c305bac80b9ea7 100644 --- a/Mathlib/Algebra/Homology/HomotopyCategory.lean +++ b/Mathlib/Algebra/Homology/HomotopyCategory.lean @@ -200,14 +200,14 @@ section variable [CategoryWithHomology V] /-- The `i`-th homology, as a functor from the homotopy category. -/ -noncomputable def homologyFunctor (i : ι) : HomotopyCategory V c ⥤ V := +def homologyFunctor (i : ι) : HomotopyCategory V c ⥤ V := CategoryTheory.Quotient.lift _ (HomologicalComplex.homologyFunctor V c i) (by rintro K L f g ⟨h⟩ exact h.homologyMap_eq i) /-- The homology functor on the homotopy category is induced by the homology functor on homological complexes. -/ -noncomputable def homologyFunctorFactors (i : ι) : +def homologyFunctorFactors (i : ι) : quotient V c ⋙ homologyFunctor V c i ≅ HomologicalComplex.homologyFunctor V c i := Quotient.lift.isLift _ _ _ diff --git a/Mathlib/Algebra/MvPolynomial/Equiv.lean b/Mathlib/Algebra/MvPolynomial/Equiv.lean index df04f114b1b633..4cf14d4b0c8240 100644 --- a/Mathlib/Algebra/MvPolynomial/Equiv.lean +++ b/Mathlib/Algebra/MvPolynomial/Equiv.lean @@ -439,7 +439,6 @@ variable (R S₁ S₂) in /-- The algebra isomorphism between multivariable polynomials in variables `S₁` of multivariable polynomials in variables `S₂` and multivariable polynomials in variables `S₂` of multivariable polynomials in variables `S₁`. -/ -noncomputable def commAlgEquiv : MvPolynomial S₁ (MvPolynomial S₂ R) ≃ₐ[R] MvPolynomial S₂ (MvPolynomial S₁ R) := AddMonoidAlgebra.commAlgEquiv _ @@ -881,7 +880,7 @@ section toMvPolynomial variable {R S σ τ : Type*} [CommSemiring R] [CommSemiring S] [Algebra R S] /-- The embedding of `R[X]` into `R[Xᵢ]` as an `R`-algebra homomorphism. -/ -noncomputable def Polynomial.toMvPolynomial (i : σ) : R[X] →ₐ[R] MvPolynomial σ R := +def Polynomial.toMvPolynomial (i : σ) : R[X] →ₐ[R] MvPolynomial σ R := aeval (MvPolynomial.X i) @[simp] diff --git a/Mathlib/Algebra/MvPolynomial/Eval.lean b/Mathlib/Algebra/MvPolynomial/Eval.lean index 46547815cf52ca..11f467c592468a 100644 --- a/Mathlib/Algebra/MvPolynomial/Eval.lean +++ b/Mathlib/Algebra/MvPolynomial/Eval.lean @@ -860,7 +860,7 @@ Warning: This produces a diamond for global instance. -/ @[instance_reducible] -noncomputable def algebraMvPolynomial : Algebra (MvPolynomial σ R) (MvPolynomial σ S) := +def algebraMvPolynomial : Algebra (MvPolynomial σ R) (MvPolynomial σ S) := inferInstanceAs <| Algebra (AddMonoidAlgebra _ _) (AddMonoidAlgebra _ _) attribute [local instance] algebraMvPolynomial diff --git a/Mathlib/Algebra/Order/Group/Cyclic.lean b/Mathlib/Algebra/Order/Group/Cyclic.lean index e8141a76b1bc79..bae149618cd0b5 100644 --- a/Mathlib/Algebra/Order/Group/Cyclic.lean +++ b/Mathlib/Algebra/Order/Group/Cyclic.lean @@ -48,7 +48,7 @@ lemma exists_generator_lt_one : ∃ (a : G), a < 1 ∧ Subgroup.zpowers a = H := the subgroup that is `< 1`. -/ @[to_additive negGen /-- Given an additive subgroup of an additive cyclic linearly ordered commutative group, this is a negative generator of the subgroup. -/] -protected noncomputable def genLTOne : G := H.exists_generator_lt_one.choose +protected def genLTOne : G := H.exists_generator_lt_one.choose @[to_additive negGen_neg] lemma genLTOne_lt_one : H.genLTOne < 1 := @@ -92,7 +92,7 @@ variable (G) [Nontrivial G] [IsCyclic G] /-- Given a cyclic linearly ordered commutative group, this is a generator that is `< 1`. -/ @[to_additive negGen /-- Given an additive cyclic linearly ordered commutative group, this is a negative generator of it. -/] -noncomputable def genLTOne : G := (⊤ : Subgroup G).genLTOne +def genLTOne : G := (⊤ : Subgroup G).genLTOne @[to_additive (attr := simp) negGen_eq_of_top] lemma genLTOne_eq_of_top : genLTOne G = (⊤ : Subgroup G).genLTOne := rfl diff --git a/Mathlib/Algebra/Polynomial/Derivative.lean b/Mathlib/Algebra/Polynomial/Derivative.lean index 0005c6c05137f9..077e37d0ec95a8 100644 --- a/Mathlib/Algebra/Polynomial/Derivative.lean +++ b/Mathlib/Algebra/Polynomial/Derivative.lean @@ -352,7 +352,7 @@ theorem iterate_derivative_mul {n} (p q : R[X]) : Iterated derivatives as a finite support function. -/ @[simps! apply_apply] -noncomputable def derivativeFinsupp : R[X] →ₗ[R] ℕ →₀ R[X] where +def derivativeFinsupp : R[X] →ₗ[R] ℕ →₀ R[X] where toFun p := .onFinset (range (p.natDegree + 1)) (derivative^[·] p) fun i ↦ by contrapose; simp_all [iterate_derivative_eq_zero] map_add' _ _ := by ext; simp diff --git a/Mathlib/Algebra/Polynomial/Div.lean b/Mathlib/Algebra/Polynomial/Div.lean index dd34b114930c06..e0ea29f3768ae9 100644 --- a/Mathlib/Algebra/Polynomial/Div.lean +++ b/Mathlib/Algebra/Polynomial/Div.lean @@ -117,7 +117,7 @@ theorem div_wf_lemma (h : degree q ≤ degree p ∧ p ≠ 0) (hq : Monic q) : h.2 (by rw [leadingCoeff_monic_mul hq, leadingCoeff_mul_X_pow, leadingCoeff_C]) /-- See `divByMonic`. -/ -noncomputable def divModByMonicAux : ∀ (_p : R[X]) {q : R[X]}, Monic q → R[X] × R[X] +def divModByMonicAux : ∀ (_p : R[X]) {q : R[X]}, Monic q → R[X] × R[X] | p, q, hq => letI := Classical.decEq R if h : degree q ≤ degree p ∧ p ≠ 0 then diff --git a/Mathlib/Algebra/Polynomial/Inductions.lean b/Mathlib/Algebra/Polynomial/Inductions.lean index 4b7167ad718b36..093e20388ba9ae 100644 --- a/Mathlib/Algebra/Polynomial/Inductions.lean +++ b/Mathlib/Algebra/Polynomial/Inductions.lean @@ -81,7 +81,6 @@ theorem divX_X_pow : divX (X ^ n : R[X]) = if (n = 0) then 0 else X ^ (n - 1) := simp [coeff_X_pow] /-- `divX` as an additive homomorphism. -/ -noncomputable def divX_hom : R[X] →+ R[X] := { toFun := divX map_zero' := divX_zero @@ -133,7 +132,7 @@ theorem degree_divX_lt (hp0 : p ≠ 0) : (divX p).degree < p.degree := by /-- An induction principle for polynomials, valued in Sort* instead of Prop. -/ @[elab_as_elim] -noncomputable def recOnHorner {M : R[X] → Sort*} (p : R[X]) (M0 : M 0) +def recOnHorner {M : R[X] → Sort*} (p : R[X]) (M0 : M 0) (MC : ∀ p a, coeff p 0 = 0 → a ≠ 0 → M p → M (p + C a)) (MX : ∀ p, p ≠ 0 → M p → M (p * X)) : M p := letI := Classical.decEq R diff --git a/Mathlib/Algebra/Polynomial/Monic.lean b/Mathlib/Algebra/Polynomial/Monic.lean index 57ee0de96fefca..f67d5cfd00d7cd 100644 --- a/Mathlib/Algebra/Polynomial/Monic.lean +++ b/Mathlib/Algebra/Polynomial/Monic.lean @@ -259,7 +259,7 @@ def MonicDegreeEq.mk (p : R[X]) (hp : p.Monic) (hp' : p.natDegree = n) : ⟨p, by rw [← hp', ← leadingCoeff, hp], fun i hi ↦ coeff_eq_zero_of_natDegree_lt (hp'.trans_lt hi)⟩ /-- The image of a monic polynomial of degree `n` under a ring homomorphism. -/ -@[simps] noncomputable +@[simps] def MonicDegreeEq.map (p : MonicDegreeEq R n) (f : R →+* S) : MonicDegreeEq S n := ⟨p.1.map f, by simp +contextual [coeff_map, p.2]⟩ diff --git a/Mathlib/Algebra/Polynomial/Roots.lean b/Mathlib/Algebra/Polynomial/Roots.lean index c55613f8ce6cd2..680b55c94adcf2 100644 --- a/Mathlib/Algebra/Polynomial/Roots.lean +++ b/Mathlib/Algebra/Polynomial/Roots.lean @@ -55,7 +55,7 @@ section Roots /-- `roots p` noncomputably gives a multiset containing all the roots of `p`, including their multiplicities. -/ -noncomputable def roots (p : R[X]) : Multiset R := +def roots (p : R[X]) : Multiset R := haveI := Classical.decEq R haveI := Classical.dec (p = 0) if h : p = 0 then ∅ else Classical.choose (exists_multiset_roots h) @@ -469,7 +469,7 @@ variable [CommRing T] /-- Given a polynomial `p` with coefficients in a ring `T` and a `T`-algebra `S`, `aroots p S` is the multiset of roots of `p` regarded as a polynomial over `S`. -/ -noncomputable abbrev aroots (p : T[X]) (S) [CommRing S] [IsDomain S] [Algebra T S] : Multiset S := +abbrev aroots (p : T[X]) (S) [CommRing S] [IsDomain S] [Algebra T S] : Multiset S := (p.map (algebraMap T S)).roots theorem aroots_def (p : T[X]) (S) [CommRing S] [IsDomain S] [Algebra T S] : diff --git a/Mathlib/Algebra/Polynomial/Taylor.lean b/Mathlib/Algebra/Polynomial/Taylor.lean index 26f5f808efba4d..a57b1b9626d30d 100644 --- a/Mathlib/Algebra/Polynomial/Taylor.lean +++ b/Mathlib/Algebra/Polynomial/Taylor.lean @@ -188,7 +188,7 @@ variable {R : Type*} [CommRing R] (r : R) (f : R[X]) set_option linter.style.whitespace false in -- manual alignment is not recognised /-- `Polynomial.taylor` as an `AlgEquiv` for commutative rings. -/ -noncomputable def taylorEquiv (r : R) : R[X] ≃ₐ[R] R[X] where +def taylorEquiv (r : R) : R[X] ≃ₐ[R] R[X] where invFun := taylorAlgHom (-r) left_inv P := by simp [taylor, comp_assoc] right_inv P := by simp [taylor, comp_assoc] diff --git a/Mathlib/Algebra/Vertex/VertexOperator.lean b/Mathlib/Algebra/Vertex/VertexOperator.lean index 635dcc0682f0a4..7676bcb88da75b 100644 --- a/Mathlib/Algebra/Vertex/VertexOperator.lean +++ b/Mathlib/Algebra/Vertex/VertexOperator.lean @@ -78,7 +78,7 @@ theorem coeff_eq_zero_of_lt_order (A : VertexOperator R V) (n : ℤ) (x : V) /-- Given an endomorphism-valued function on integers satisfying a pointwise bounded-pole condition, we produce a vertex operator. -/ -noncomputable def of_coeff (f : ℤ → Module.End R V) +def of_coeff (f : ℤ → Module.End R V) (hf : ∀ x, BddBelow (Function.support fun y ↦ f y x)) : VertexOperator R V := HVertexOperator.of_coeff f fun x ↦ (BddBelow.isWF (hf x)).isPWO diff --git a/Mathlib/AlgebraicGeometry/AffineScheme.lean b/Mathlib/AlgebraicGeometry/AffineScheme.lean index fb0f92073d1e68..18c22290af3339 100644 --- a/Mathlib/AlgebraicGeometry/AffineScheme.lean +++ b/Mathlib/AlgebraicGeometry/AffineScheme.lean @@ -127,7 +127,6 @@ theorem IsAffine.iff_of_isIso {X Y : Scheme} (f : X ⟶ Y) [IsIso f] : IsAffine /-- If `f : X ⟶ Y` is a morphism between affine schemes, the corresponding arrow is isomorphic to the arrow of the morphism on prime spectra induced by the map on global sections. -/ -noncomputable def arrowIsoSpecΓOfIsAffine {X Y : Scheme} [IsAffine X] [IsAffine Y] (f : X ⟶ Y) : Arrow.mk f ≅ Arrow.mk (Spec.map f.appTop) := Arrow.isoMk X.isoSpec Y.isoSpec (ΓSpec.adjunction.unit_naturality _) @@ -233,9 +232,9 @@ instance hasLimits : HasLimits AffineScheme.{u} := by haveI : HasLimits AffineScheme.{u}ᵒᵖᵒᵖ := Limits.hasLimits_op_of_hasColimits exact Adjunction.has_limits_of_equivalence (opOpEquivalence AffineScheme.{u}).inverse -noncomputable instance Γ_preservesLimits : PreservesLimits Γ.{u}.rightOp := inferInstance +instance Γ_preservesLimits : PreservesLimits Γ.{u}.rightOp := inferInstance -noncomputable instance forgetToScheme_preservesLimits : PreservesLimits forgetToScheme := by +instance forgetToScheme_preservesLimits : PreservesLimits forgetToScheme := by apply +allowSynthFailures @preservesLimits_of_natIso _ _ _ _ _ _ (Functor.isoWhiskerRight equivCommRingCat.unitIso forgetToScheme).symm change PreservesLimits (equivCommRingCat.functor ⋙ Scheme.Spec) @@ -331,7 +330,6 @@ theorem isBasis_basicOpen (X : Scheme) [IsAffine X] : rfl /-- The canonical map `U ⟶ Spec Γ(X, U)` for an open `U ⊆ X`. -/ -noncomputable def Scheme.Opens.toSpecΓ {X : Scheme.{u}} (U : X.Opens) : U.toScheme ⟶ Spec Γ(X, U) := U.toScheme.toSpecΓ ≫ Spec.map U.topIso.inv @@ -633,7 +631,6 @@ theorem exists_basicOpen_le {V : X.Opens} (x : V) (h : ↑x ∈ U) : simpa [Scheme.image_basicOpen] using! (U.ι.image_mono h₂).trans (U.ι.image_preimage_le _) exact ⟨U.topIso.hom.hom r, by simp [Scheme.Opens.toScheme_presheaf_obj, h₁, h₂]⟩ -noncomputable instance {R : CommRingCat} {U} : Algebra R Γ(Spec R, U) := inferInstanceAs (Algebra R ((Spec.structureSheaf R).presheaf.obj _)) @@ -762,7 +759,7 @@ theorem _root_.AlgebraicGeometry.exists_basicOpen_le_affine_inter exact ⟨f', g, hf', hf'.symm ▸ hg₂⟩ /-- The prime ideal of `𝒪ₓ(U)` corresponding to a point `x : U`. -/ -noncomputable def primeIdealOf (x : U) : +def primeIdealOf (x : U) : PrimeSpectrum Γ(X, U) := hU.isoSpec.hom x @@ -964,7 +961,7 @@ set_option backward.isDefEq.respectTransparency false in open _root_.PrimeSpectrum in /-- The restriction of `Spec.map f` to a basic open `D(r)` is isomorphic to `Spec.map` of the localization of `f` away from `r`. -/ -noncomputable def SpecMapRestrictBasicOpenIso {R S : CommRingCat} (f : R ⟶ S) (r : R) : +def SpecMapRestrictBasicOpenIso {R S : CommRingCat} (f : R ⟶ S) (r : R) : Arrow.mk (Spec.map f ∣_ (PrimeSpectrum.basicOpen r)) ≅ Arrow.mk (Spec.map <| CommRingCat.ofHom (Localization.awayMap f.hom r)) := by refine Arrow.isoMk ?_ ?_ ?_ @@ -1267,7 +1264,6 @@ variable {R S : CommRingCat.{u}} (f : R ⟶ S) (p : PrimeSpectrum S) (x : PrimeS variable (R) (x : PrimeSpectrum R) in /-- The stalk of `Spec R` at `x` is isomorphic to `Rₚ`, where `p` is the prime corresponding to `x`. -/ -noncomputable def Spec.stalkIso : (Spec R).presheaf.stalk x ≅ .of (Localization.AtPrime x.asIdeal) := (StructureSheaf.stalkIso ..).toCommRingCatIso.symm diff --git a/Mathlib/AlgebraicGeometry/AffineTransitionLimit.lean b/Mathlib/AlgebraicGeometry/AffineTransitionLimit.lean index 0bfee543aed3b0..b4930f7e285e78 100644 --- a/Mathlib/AlgebraicGeometry/AffineTransitionLimit.lean +++ b/Mathlib/AlgebraicGeometry/AffineTransitionLimit.lean @@ -537,14 +537,14 @@ set_option backward.isDefEq.respectTransparency false in /-- (Implementation) The covering of `D(i')` by the pullback of the diagonal components of `X ×ₛ X`. See the section docstring. -/ -noncomputable def 𝒰D₀ : Scheme.OpenCover.{u} (D.obj A.i') := +def 𝒰D₀ : Scheme.OpenCover.{u} (D.obj A.i') := Scheme.Cover.mkOfCovers (Σ i : A.𝒰S.I₀, (A.𝒰X i).I₀) _ (fun i ↦ ((Scheme.Pullback.diagonalCover f A.𝒰S A.𝒰X).pullback₁ A.g).f ⟨i.1, i.2, i.2⟩) (fun x ↦ by simpa [← Set.mem_range, Scheme.Pullback.range_fst, Scheme.Pullback.diagonalCoverDiagonalRange] using A.range_g_subset ⟨x, rfl⟩) /-- (Implementation) An affine open cover refining `𝒰D₀`. See the section docstring. -/ -noncomputable def 𝒰D : Scheme.OpenCover.{u} (D.obj A.i') := +def 𝒰D : Scheme.OpenCover.{u} (D.obj A.i') := A.𝒰D₀.bind fun _ ↦ Scheme.affineCover _ attribute [-simp] cast_eq eq_mpr_eq_cast diff --git a/Mathlib/AlgebraicGeometry/Cover/Open.lean b/Mathlib/AlgebraicGeometry/Cover/Open.lean index 7d4cf90cf18dc8..5112c7943f9eee 100644 --- a/Mathlib/AlgebraicGeometry/Cover/Open.lean +++ b/Mathlib/AlgebraicGeometry/Cover/Open.lean @@ -202,7 +202,6 @@ lemma OpenCover.pullbackCoverAffineRefinementObjIso_inv_pullbackHom /-- A family of elements spanning the unit ideal of `R` gives an affine open cover of `Spec R`. -/ @[simps] -noncomputable def affineOpenCoverOfSpanRangeEqTop {R : CommRingCat} {ι : Type*} (s : ι → R) (hs : Ideal.span (Set.range s) = ⊤) : (Spec R).AffineOpenCover where I₀ := ι diff --git a/Mathlib/AlgebraicGeometry/Fiber.lean b/Mathlib/AlgebraicGeometry/Fiber.lean index 186ddc1e9f5700..bb68ad87ab1c43 100644 --- a/Mathlib/AlgebraicGeometry/Fiber.lean +++ b/Mathlib/AlgebraicGeometry/Fiber.lean @@ -76,7 +76,7 @@ lemma isPullback_fiberToSpecResidueField_of_isPullback {P X Y Z : Scheme.{u}} {f set_option backward.isDefEq.respectTransparency false in /-- The morphism from the fiber of `Spec S ⟶ Spec R` at some prime `p` to `Spec κ(p)` is isomorphic to the map induced by `κ(p) ⟶ κ(p) ⊗[R] S`. -/ -noncomputable def Spec.fiberToSpecResidueFieldIso (R S : Type u) [CommRing R] [CommRing S] +def Spec.fiberToSpecResidueFieldIso (R S : Type u) [CommRing R] [CommRing S] [Algebra R S] (p : PrimeSpectrum R) : Arrow.mk ((Spec.map (CommRingCat.ofHom <| algebraMap R S)).fiberToSpecResidueField p) ≅ Arrow.mk (Spec.map <| CommRingCat.ofHom <| diff --git a/Mathlib/AlgebraicGeometry/Gluing.lean b/Mathlib/AlgebraicGeometry/Gluing.lean index 2c642da6af605a..2fe4b193bf8f12 100644 --- a/Mathlib/AlgebraicGeometry/Gluing.lean +++ b/Mathlib/AlgebraicGeometry/Gluing.lean @@ -523,7 +523,6 @@ namespace IsLocallyDirected /-- (Implementation detail) The intersection `V` in the glue data associated to a locally directed diagram. -/ -noncomputable def V (i j : J) : (F.obj i).Opens := ⨆ (k : Σ k, (k ⟶ i) × (k ⟶ j)), (F.map k.2.1).opensRange lemma V_self (i) : V F i i = ⊤ := @@ -734,7 +733,6 @@ The cocone associated to a locally directed diagram is a colimit. One usually does not want to use this directly, and instead use the generic `colimit` API. -/ -noncomputable def isColimit : IsColimit (cocone F) where desc s := Multicoequalizer.desc _ _ (fun i ↦ s.ι.app ↓i) (by rintro ⟨i, j⟩ @@ -759,7 +757,6 @@ The cocone associated to a locally directed diagram is a colimit as locally ring One usually does not want to use this directly, and instead use the generic `colimit` API. -/ -noncomputable def isColimitForgetToLocallyRingedSpace : IsColimit (Scheme.forgetToLocallyRingedSpace.mapCocone (cocone F)) where desc s := (glueData F).isoLocallyRingedSpace.hom ≫ diff --git a/Mathlib/AlgebraicGeometry/IdealSheaf/Subscheme.lean b/Mathlib/AlgebraicGeometry/IdealSheaf/Subscheme.lean index d767fc855ecdee..d23098f1ca5acd 100644 --- a/Mathlib/AlgebraicGeometry/IdealSheaf/Subscheme.lean +++ b/Mathlib/AlgebraicGeometry/IdealSheaf/Subscheme.lean @@ -675,7 +675,6 @@ lemma ideal_ker_le_ker_ΓSpecIso_inv_comp : set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- (Implementation): Use `Hom.toImage` instead which has better def-eqs. -/ -noncomputable def Hom.toImageAux : X ⟶ f.image := Cover.glueMorphisms ((Y.openCoverOfIsOpenCover _ (iSup_affineOpens_eq_top Y)).pullback₁ f) (fun U ↦ (pullback.snd f U.1.ι ≫ U.1.toSpecΓ).liftQuotient _ @@ -695,7 +694,6 @@ lemma Hom.toImageAux_spec : simp [IdealSheafData.glueDataObjι, Scheme.Hom.liftQuotient_comp_assoc, pullback.condition] /-- The morphism from the domain to the scheme-theoretic image. -/ -noncomputable def Hom.toImage : X ⟶ f.image := f.toImageAux.copyBase (fun x ↦ ⟨f x, f.range_subset_ker_support ⟨x, rfl⟩⟩) (funext fun x ↦ Subtype.ext congr($f.toImageAux_spec x)) @@ -757,7 +755,6 @@ set_option backward.defeqAttrib.useBackward true in open IdealSheafData in /-- The adjunction between `Y.IdealSheafData` and `(Over Y)ᵒᵖ` given by taking kernels. -/ @[simps] -noncomputable def kerAdjunction (Y : Scheme.{u}) : (subschemeFunctor Y).rightOp ⊣ Y.kerFunctor where unit.app I := eqToHom (by simp) counit.app f := (Over.homMk f.unop.hom.toImage f.unop.hom.toImage_imageι).op diff --git a/Mathlib/AlgebraicGeometry/OpenImmersion.lean b/Mathlib/AlgebraicGeometry/OpenImmersion.lean index a8b61e1491ec98..48d095e6f0198e 100644 --- a/Mathlib/AlgebraicGeometry/OpenImmersion.lean +++ b/Mathlib/AlgebraicGeometry/OpenImmersion.lean @@ -762,7 +762,6 @@ lemma isPullback {U V X Y : Scheme.{u}} (g : U ⟶ V) (iU : U ⟶ X) (iV : V ⟶ /-- If `f` is an open immersion `X ⟶ Y`, the global sections of `X` are naturally isomorphic to the sections of `Y` over the image of `f`. -/ -noncomputable def ΓIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] (U : Y.Opens) : Γ(X, f ⁻¹ᵁ U) ≅ Γ(Y, f.opensRange ⊓ U) := (f.appIso (f ⁻¹ᵁ U)).symm ≪≫ @@ -788,7 +787,6 @@ lemma app_ΓIso_hom {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] (U : Y. /-- Given an open immersion `f : U ⟶ X`, the isomorphism between global sections of `U` and the sections of `X` at the image of `f`. -/ -noncomputable def ΓIsoTop {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] : Γ(X, ⊤) ≅ Γ(Y, f.opensRange) := (f.appIso ⊤).symm ≪≫ Y.presheaf.mapIso (eqToIso f.image_top_eq_opensRange.symm).op @@ -865,7 +863,7 @@ lemma image_zeroLocus {U : X.Opens} (s : Set Γ(X, U)) : is a pullback square and `g` is an open immersion, then the stalk map induced by `snd` at `p` is isomorphic to the stalk map of `f` at `fst p`. -/ -noncomputable def stalkMapIsoOfIsPullback {P X Y Z : Scheme.{u}} +def stalkMapIsoOfIsPullback {P X Y Z : Scheme.{u}} {fst : P ⟶ X} {snd : P ⟶ Y} {f : X ⟶ Z} {g : Y ⟶ Z} (h : IsPullback fst snd f g) [IsOpenImmersion g] (p : P) (x : X := fst p) (hx : fst p = x := by cat_disch) : Arrow.mk (f.stalkMap x) ≅ Arrow.mk (snd.stalkMap p) := diff --git a/Mathlib/AlgebraicGeometry/Pullbacks.lean b/Mathlib/AlgebraicGeometry/Pullbacks.lean index bd40b94c85ad3f..2c676c3b087f69 100644 --- a/Mathlib/AlgebraicGeometry/Pullbacks.lean +++ b/Mathlib/AlgebraicGeometry/Pullbacks.lean @@ -630,13 +630,11 @@ variable (f : X ⟶ Y) (𝒰 : OpenCover.{u} Y) (𝒱 : ∀ i, OpenCover.{w} (( Given `𝒰 i` covering `Y` and `𝒱 i j` covering `𝒰 i`, this is the open cover `𝒱 i j₁ ×[𝒰 i] 𝒱 i j₂` ranging over all `i`, `j₁`, `j₂`. -/ -noncomputable def diagonalCover : (pullback.diagonalObj f).OpenCover := (openCoverOfBase 𝒰 f f).bind fun i ↦ openCoverOfLeftRight (𝒱 i) (𝒱 i) (𝒰.pullbackHom _ _) (𝒰.pullbackHom _ _) /-- The image of `𝒱 i j₁ ×[𝒰 i] 𝒱 i j₂` in `diagonalCover` with `j₁ = j₂` -/ -noncomputable def diagonalCoverDiagonalRange : (pullback.diagonalObj f).Opens := ⨆ i : Σ i, (𝒱 i).I₀, ((diagonalCover f 𝒰 𝒱).f ⟨i.1, i.2, i.2⟩).opensRange @@ -654,7 +652,6 @@ set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- The restriction of the diagonal `X ⟶ X ×ₛ X` to `𝒱 i j ×[𝒰 i] 𝒱 i j` is the diagonal `𝒱 i j ⟶ 𝒱 i j ×[𝒰 i] 𝒱 i j`. -/ -noncomputable def diagonalRestrictIsoDiagonal (i j) : Arrow.mk (pullback.diagonal f ∣_ ((diagonalCover f 𝒰 𝒱).f ⟨i, j, j⟩).opensRange) ≅ Arrow.mk (pullback.diagonal ((𝒱 i).f j ≫ pullback.snd _ _)) := by @@ -715,7 +712,6 @@ open TensorProduct Algebra.TensorProduct CommRingCat RingHomClass /-- The isomorphism between the fibred product of two schemes `Spec S` and `Spec T` over a scheme `Spec R` and the `Spec` of the tensor product `S ⊗[R] T`. -/ -noncomputable def pullbackSpecIso : pullback (Spec.map (CommRingCat.ofHom (algebraMap R S))) (Spec.map (CommRingCat.ofHom (algebraMap R T))) ≅ Spec (.of <| S ⊗[R] T) := diff --git a/Mathlib/AlgebraicGeometry/ResidueField.lean b/Mathlib/AlgebraicGeometry/ResidueField.lean index 20c400e69b5ca9..1a3bdded163edc 100644 --- a/Mathlib/AlgebraicGeometry/ResidueField.lean +++ b/Mathlib/AlgebraicGeometry/ResidueField.lean @@ -243,10 +243,9 @@ instance {X : Scheme.{u}} (x : X) : IsPreimmersion (X.fromSpecResidueField x) := rw [IsPreimmersion.comp_iff] infer_instance -@[simps] noncomputable +@[simps] instance (x : X) : (Spec (X.residueField x)).Over X := ⟨X.fromSpecResidueField x⟩ -noncomputable instance (x : X) : (Spec (X.residueField x)).CanonicallyOver X where @[reassoc (attr := simp)] @@ -296,7 +295,6 @@ section Spec variable (R : CommRingCat) (x : Spec R) /-- The residue fields of `Spec R` are isomorphic to `Ideal.ResidueField`. -/ -noncomputable def Spec.residueFieldIso : (Spec R).residueField x ≅ .of x.asIdeal.ResidueField := (IsLocalRing.ResidueField.mapEquiv diff --git a/Mathlib/AlgebraicGeometry/Restrict.lean b/Mathlib/AlgebraicGeometry/Restrict.lean index 6e9b51c80d71e1..6993624797367d 100644 --- a/Mathlib/AlgebraicGeometry/Restrict.lean +++ b/Mathlib/AlgebraicGeometry/Restrict.lean @@ -233,7 +233,7 @@ lemma Scheme.Opens.mem_basicOpen_toScheme {U : X.Opens} {V : Scheme.Opens U} {r exact congr(x ∈ $(U.ι.preimage_basicOpen r)).to_iff.symm /-- If `U ≤ V`, then `U` is also a subscheme of `V`. -/ -protected noncomputable +protected def Scheme.homOfLE (X : Scheme.{u}) {U V : X.Opens} (e : U ≤ V) : (U : Scheme.{u}) ⟶ V := IsOpenImmersion.lift V.ι U.ι (by simpa using e) @@ -370,7 +370,6 @@ def Scheme.restrictFunctorΓ : X.restrictFunctor.op ⋙ (Over.forget X).op ⋙ S congr 1) /-- `X ∣_ U ∣_ V` is isomorphic to `X ∣_ V ∣_ U` -/ -noncomputable def Scheme.restrictRestrictComm (X : Scheme.{u}) (U V : X.Opens) : (U.ι ⁻¹ᵁ V).toScheme ≅ V.ι ⁻¹ᵁ U := IsOpenImmersion.isoOfRangeEq (Opens.ι _ ≫ U.ι) (Opens.ι _ ≫ V.ι) <| by @@ -379,7 +378,6 @@ def Scheme.restrictRestrictComm (X : Scheme.{u}) (U V : X.Opens) : /-- If `f : X ⟶ Y` is an open immersion, then for any `U : X.Opens`, we have the isomorphism `U ≅ f ''ᵁ U`. -/ -noncomputable def Scheme.Hom.isoImage {X Y : Scheme.{u}} (f : X ⟶ Y) [IsOpenImmersion f] (U : X.Opens) : U.toScheme ≅ f ''ᵁ U := @@ -446,7 +444,6 @@ lemma Scheme.ι_toIso_inv (X : Scheme.{u}) : Opens.ι _ ≫ X.topIso.inv = 𝟙 X.topIso.hom_inv_id /-- If `U = V`, then `X ∣_ U` is isomorphic to `X ∣_ V`. -/ -noncomputable def Scheme.isoOfEq (X : Scheme.{u}) {U V : X.Opens} (e : U = V) : (U : Scheme.{u}) ≅ V := IsOpenImmersion.isoOfRangeEq U.ι V.ι (by rw [e]) @@ -475,7 +472,7 @@ lemma Scheme.isoOfEq_rfl (X : Scheme.{u}) (U : X.Opens) : X.isoOfEq (refl U) = I end /-- The restriction of an isomorphism onto an open set. -/ -noncomputable def Scheme.Hom.preimageIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso (C := Scheme) f] +def Scheme.Hom.preimageIso {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso (C := Scheme) f] (U : Y.Opens) : (f ⁻¹ᵁ U).toScheme ≅ U := by apply IsOpenImmersion.isoOfRangeEq (f := (f ⁻¹ᵁ U).ι ≫ f) U.ι _ dsimp @@ -493,7 +490,7 @@ lemma Scheme.Hom.preimageIso_inv_ι {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso (C : IsOpenImmersion.isoOfRangeEq_inv_fac _ _ _ /-- If `U ≤ V` are opens of `X`, the restriction of `U` to `V` is isomorphic to `U`. -/ -noncomputable def Scheme.Opens.isoOfLE {X : Scheme.{u}} {U V : X.Opens} (hUV : U ≤ V) : +def Scheme.Opens.isoOfLE {X : Scheme.{u}} {U V : X.Opens} (hUV : U ≤ V) : (V.ι ⁻¹ᵁ U).toScheme ≅ U := IsOpenImmersion.isoOfRangeEq ((V.ι ⁻¹ᵁ U).ι ≫ V.ι) U.ι <| by have : V.ι ''ᵁ (V.ι ⁻¹ᵁ U) = U := by simpa [Scheme.Hom.image_preimage_eq_opensRange_inf] @@ -847,7 +844,7 @@ end Scheme.Hom set_option backward.isDefEq.respectTransparency false in /-- `f.resLE U V` induces `f.appLE U V` on global sections. -/ -noncomputable def arrowResLEAppIso (f : X ⟶ Y) (U : Y.Opens) (V : X.Opens) (e : V ≤ f ⁻¹ᵁ U) : +def arrowResLEAppIso (f : X ⟶ Y) (U : Y.Opens) (V : X.Opens) (e : V ≤ f ⁻¹ᵁ U) : Arrow.mk ((f.resLE U V e).appTop) ≅ Arrow.mk (f.appLE U V e) := Arrow.isoMk U.topIso V.topIso <| by simp only [Scheme.Opens.topIso_hom, eqToHom_op, Arrow.mk_hom, Scheme.Hom.map_appLE] @@ -878,7 +875,6 @@ set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- The restriction of an open cover to an open subset. -/ @[simps! I₀ X f] -noncomputable def Scheme.OpenCover.restrict {X : Scheme.{u}} (𝒰 : Scheme.OpenCover.{v} X) (U : Opens X) : U.toScheme.OpenCover := by refine Cover.copy (𝒰.pullback₁ U.ι) 𝒰.I₀ _ (𝒰.f · ∣_ U) (Equiv.refl _) diff --git a/Mathlib/AlgebraicGeometry/Scheme.lean b/Mathlib/AlgebraicGeometry/Scheme.lean index 20bb3f23a28425..4355c8aa97231c 100644 --- a/Mathlib/AlgebraicGeometry/Scheme.lean +++ b/Mathlib/AlgebraicGeometry/Scheme.lean @@ -302,7 +302,7 @@ def forgetToTop : Scheme ⥤ TopCat := Scheme.forgetToLocallyRingedSpace ⋙ LocallyRingedSpace.forgetToTop /-- An isomorphism of schemes induces a homeomorphism of the underlying topological spaces. -/ -noncomputable def homeoOfIso {X Y : Scheme.{u}} (e : X ≅ Y) : X ≃ₜ Y := +def homeoOfIso {X Y : Scheme.{u}} (e : X ≅ Y) : X ≃ₜ Y := TopCat.homeoOfIso (forgetToTop.mapIso e) @[simp] @@ -323,7 +323,7 @@ lemma homeoOfIso_apply {X Y : Scheme} (e : X ≅ Y) (x : X) : alias _root_.CategoryTheory.Iso.schemeIsoToHomeo := homeoOfIso /-- An isomorphism of schemes induces a homeomorphism of the underlying topological spaces. -/ -noncomputable def Hom.homeomorph {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso (C := Scheme) f] : +def Hom.homeomorph {X Y : Scheme.{u}} (f : X ⟶ Y) [IsIso (C := Scheme) f] : X ≃ₜ Y := (asIso f).schemeIsoToHomeo @@ -1000,7 +1000,7 @@ lemma germ_stalkMap_apply (U : Y.Opens) (x : X) (hx : f x ∈ U) (y) : set_option backward.defeqAttrib.useBackward true in /-- If `x = y`, the stalk maps are isomorphic. -/ -noncomputable def arrowStalkMapIsoOfEq {x y : X} +def arrowStalkMapIsoOfEq {x y : X} (h : x = y) : Arrow.mk (f.stalkMap x) ≅ Arrow.mk (f.stalkMap y) := Arrow.isoMk (Y.presheaf.stalkCongr <| (Inseparable.of_eq h).map f.continuous) (X.presheaf.stalkCongr <| Inseparable.of_eq h) <| by diff --git a/Mathlib/AlgebraicGeometry/Sites/SmallAffineZariski.lean b/Mathlib/AlgebraicGeometry/Sites/SmallAffineZariski.lean index 8b07f852c49337..dddec39cb22367 100644 --- a/Mathlib/AlgebraicGeometry/Sites/SmallAffineZariski.lean +++ b/Mathlib/AlgebraicGeometry/Sites/SmallAffineZariski.lean @@ -222,7 +222,7 @@ category instance on the indices. -/ exact ⟨U, ⟨x, hxU⟩, rfl⟩ set_option backward.isDefEq.respectTransparency false in -noncomputable instance : (Scheme.AffineZariskiSite.directedCover X).LocallyDirected where +instance : (Scheme.AffineZariskiSite.directedCover X).LocallyDirected where trans f := X.homOfLE (((Scheme.AffineZariskiSite.toOpensFunctor _).map f).le) directed {U V} x := by let a := (pullback.fst _ _ ≫ U.1.ι) x @@ -258,7 +258,7 @@ together once the theory of quasi-coherent `𝒪ₓ`-algebras are developed. set_option backward.defeqAttrib.useBackward true in variable (X) in /-- `X` is the colimit of its affine opens. See `isColimit_cocone` below. -/ -@[simps] noncomputable def cocone : +@[simps] def cocone : Limits.Cocone (toOpensFunctor X ⋙ X.presheaf.rightOp ⋙ Scheme.Spec) where pt := X ι.app U := U.2.fromSpec @@ -343,7 +343,7 @@ alias _root_.AlgebraicGeometry.Scheme.preservesLocalization_toOpensFunctor := set_option backward.isDefEq.respectTransparency false in variable (X) in /-- `X` is the colimit of its affine opens. -/ -noncomputable def isColimitCocone : IsColimit (cocone X) := +def isColimitCocone : IsColimit (cocone X) := letI D := relativeGluingData (X := X) (.of_isIso (𝟙 _)) letI F := D.functor -- Why doesn't typeclass synthesis work here? diff --git a/Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean b/Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean index 0110b8af599dbe..2d2bd9d502db6e 100644 --- a/Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean +++ b/Mathlib/AlgebraicTopology/DoldKan/HomotopyEquivalence.lean @@ -32,7 +32,7 @@ namespace DoldKan variable {C : Type*} [Category* C] [Preadditive C] (X : SimplicialObject C) /-- Inductive construction of homotopies from `P q` to `𝟙 _` -/ -noncomputable def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _) +def homotopyPToId : ∀ q : ℕ, Homotopy (P q : K[X] ⟶ _) (𝟙 _) | 0 => Homotopy.refl _ | q + 1 => by refine diff --git a/Mathlib/AlgebraicTopology/DoldKan/Projections.lean b/Mathlib/AlgebraicTopology/DoldKan/Projections.lean index e960ff9b0464b6..c3b97f0a6013f5 100644 --- a/Mathlib/AlgebraicTopology/DoldKan/Projections.lean +++ b/Mathlib/AlgebraicTopology/DoldKan/Projections.lean @@ -47,7 +47,7 @@ variable {C : Type*} [Category* C] [Preadditive C] {X : SimplicialObject C} /-- This is the inductive definition of the projections `P q : K[X] ⟶ K[X]`, with `P 0 := 𝟙 _` and `P (q+1) := P q ≫ (𝟙 _ + Hσ q)`. -/ -noncomputable def P : ℕ → (K[X] ⟶ K[X]) +def P : ℕ → (K[X] ⟶ K[X]) | 0 => 𝟙 _ | q + 1 => P q ≫ (𝟙 _ + Hσ q) diff --git a/Mathlib/AlgebraicTopology/SingularHomology/Basic.lean b/Mathlib/AlgebraicTopology/SingularHomology/Basic.lean index 67a2ba669291b6..8f03f84d594da3 100644 --- a/Mathlib/AlgebraicTopology/SingularHomology/Basic.lean +++ b/Mathlib/AlgebraicTopology/SingularHomology/Basic.lean @@ -105,7 +105,6 @@ variable (R : C) (X : TopCat.{w}) [TotallyDisconnectedSpace X] /-- If `X` is totally disconnected, its singular chain complex is given by `R[X] ←0- R[X] ←𝟙- R[X] ←0- R[X] ⋯`, where `R[X]` is the coproduct of copies of `R` indexed by elements of `X`. -/ -noncomputable def singularChainComplexFunctorIsoOfTotallyDisconnectedSpace : ((singularChainComplexFunctor C).obj R).obj X ≅ (ChainComplex.alternatingConst.obj (∐ fun _ : X ↦ R)) := @@ -131,7 +130,6 @@ lemma isZero_singularHomologyFunctor_of_totallyDisconnectedSpace /-- The zeroth singular homology of a totally disconnected space is the free `R`-module generated by elements of `X`. -/ -noncomputable def singularHomologyFunctorZeroOfTotallyDisconnectedSpace [CategoryWithHomology C] : ((singularHomologyFunctor C 0).obj R).obj X ≅ ∐ fun _ : X ↦ R := have : HasZeroObject C := diff --git a/Mathlib/Analysis/CStarAlgebra/Classes.lean b/Mathlib/Analysis/CStarAlgebra/Classes.lean index 023287c12afe89..8e1d50ee6f3131 100644 --- a/Mathlib/Analysis/CStarAlgebra/Classes.lean +++ b/Mathlib/Analysis/CStarAlgebra/Classes.lean @@ -41,57 +41,57 @@ class CStarAlgebra (A : Type*) extends NormedRing A, StarRing A, CompleteSpace A /-- The class of unital commutative (complex) C⋆-algebras. -/ class CommCStarAlgebra (A : Type*) extends NormedCommRing A, CStarAlgebra A -noncomputable instance (priority := 100) CStarAlgebra.toNonUnitalCStarAlgebra (A : Type*) +instance (priority := 100) CStarAlgebra.toNonUnitalCStarAlgebra (A : Type*) [CStarAlgebra A] : NonUnitalCStarAlgebra A where -noncomputable instance (priority := 100) CommCStarAlgebra.toNonUnitalCommCStarAlgebra (A : Type*) +instance (priority := 100) CommCStarAlgebra.toNonUnitalCommCStarAlgebra (A : Type*) [CommCStarAlgebra A] : NonUnitalCommCStarAlgebra A where -noncomputable instance StarSubalgebra.cstarAlgebra {S A : Type*} [CStarAlgebra A] +instance StarSubalgebra.cstarAlgebra {S A : Type*} [CStarAlgebra A] [SetLike S A] [SubringClass S A] [SMulMemClass S ℂ A] [StarMemClass S A] (s : S) [h_closed : IsClosed (s : Set A)] : CStarAlgebra s where toCompleteSpace := h_closed.completeSpace_coe norm_mul_self_le x := CStarRing.norm_star_mul_self (x := (x : A)) |>.symm.le -noncomputable instance StarSubalgebra.commCStarAlgebra {S A : Type*} [CommCStarAlgebra A] +instance StarSubalgebra.commCStarAlgebra {S A : Type*} [CommCStarAlgebra A] [SetLike S A] [SubringClass S A] [SMulMemClass S ℂ A] [StarMemClass S A] (s : S) [h_closed : IsClosed (s : Set A)] : CommCStarAlgebra s where toCompleteSpace := h_closed.completeSpace_coe norm_mul_self_le x := CStarRing.norm_star_mul_self (x := (x : A)) |>.symm.le mul_comm _ _ := Subtype.ext <| mul_comm _ _ -noncomputable instance NonUnitalStarSubalgebra.nonUnitalCStarAlgebra {S A : Type*} +instance NonUnitalStarSubalgebra.nonUnitalCStarAlgebra {S A : Type*} [NonUnitalCStarAlgebra A] [SetLike S A] [NonUnitalSubringClass S A] [SMulMemClass S ℂ A] [StarMemClass S A] (s : S) [h_closed : IsClosed (s : Set A)] : NonUnitalCStarAlgebra s where toCompleteSpace := h_closed.completeSpace_coe norm_mul_self_le x := CStarRing.norm_star_mul_self (x := (x : A)) |>.symm.le -noncomputable instance NonUnitalStarSubalgebra.nonUnitalCommCStarAlgebra {S A : Type*} +instance NonUnitalStarSubalgebra.nonUnitalCommCStarAlgebra {S A : Type*} [NonUnitalCommCStarAlgebra A] [SetLike S A] [NonUnitalSubringClass S A] [SMulMemClass S ℂ A] [StarMemClass S A] (s : S) [h_closed : IsClosed (s : Set A)] : NonUnitalCommCStarAlgebra s where toCompleteSpace := h_closed.completeSpace_coe norm_mul_self_le x := CStarRing.norm_star_mul_self (x := (x : A)) |>.symm.le mul_comm _ _ := Subtype.ext <| mul_comm _ _ -noncomputable instance : CommCStarAlgebra ℂ where +instance : CommCStarAlgebra ℂ where section Elemental variable {A : Type*} -noncomputable instance [CStarAlgebra A] (x : A) : +instance [CStarAlgebra A] (x : A) : CStarAlgebra (StarAlgebra.elemental ℂ x) := StarSubalgebra.cstarAlgebra _ (h_closed := StarAlgebra.elemental.isClosed ℂ x) -noncomputable instance [NonUnitalCStarAlgebra A] (x : A) : +instance [NonUnitalCStarAlgebra A] (x : A) : NonUnitalCStarAlgebra (NonUnitalStarAlgebra.elemental ℂ x) := NonUnitalStarSubalgebra.nonUnitalCStarAlgebra _ (h_closed := NonUnitalStarAlgebra.elemental.isClosed ℂ x) -noncomputable instance [CStarAlgebra A] (x : A) [IsStarNormal x] : +instance [CStarAlgebra A] (x : A) [IsStarNormal x] : CommCStarAlgebra (StarAlgebra.elemental ℂ x) where -noncomputable instance [NonUnitalCStarAlgebra A] (x : A) [IsStarNormal x] : +instance [NonUnitalCStarAlgebra A] (x : A) [IsStarNormal x] : NonUnitalCommCStarAlgebra (NonUnitalStarAlgebra.elemental ℂ x) where end Elemental @@ -100,15 +100,15 @@ section Pi variable {ι : Type*} {A : ι → Type*} [Fintype ι] -noncomputable instance [(i : ι) → NonUnitalCStarAlgebra (A i)] : +instance [(i : ι) → NonUnitalCStarAlgebra (A i)] : NonUnitalCStarAlgebra (Π i, A i) where -noncomputable instance [(i : ι) → NonUnitalCommCStarAlgebra (A i)] : +instance [(i : ι) → NonUnitalCommCStarAlgebra (A i)] : NonUnitalCommCStarAlgebra (Π i, A i) where -noncomputable instance [(i : ι) → CStarAlgebra (A i)] : CStarAlgebra (Π i, A i) where +instance [(i : ι) → CStarAlgebra (A i)] : CStarAlgebra (Π i, A i) where -noncomputable instance [(i : ι) → CommCStarAlgebra (A i)] : CommCStarAlgebra (Π i, A i) where +instance [(i : ι) → CommCStarAlgebra (A i)] : CommCStarAlgebra (Π i, A i) where end Pi @@ -116,15 +116,15 @@ section Prod variable {A B : Type*} -noncomputable instance [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : +instance [NonUnitalCStarAlgebra A] [NonUnitalCStarAlgebra B] : NonUnitalCStarAlgebra (A × B) where -noncomputable instance [NonUnitalCommCStarAlgebra A] [NonUnitalCommCStarAlgebra B] : +instance [NonUnitalCommCStarAlgebra A] [NonUnitalCommCStarAlgebra B] : NonUnitalCommCStarAlgebra (A × B) where -noncomputable instance [CStarAlgebra A] [CStarAlgebra B] : CStarAlgebra (A × B) where +instance [CStarAlgebra A] [CStarAlgebra B] : CStarAlgebra (A × B) where -noncomputable instance [CommCStarAlgebra A] [CommCStarAlgebra B] : CommCStarAlgebra (A × B) where +instance [CommCStarAlgebra A] [CommCStarAlgebra B] : CommCStarAlgebra (A × B) where end Prod @@ -132,12 +132,12 @@ namespace MulOpposite variable {A : Type*} -noncomputable instance [NonUnitalCStarAlgebra A] : NonUnitalCStarAlgebra Aᵐᵒᵖ where +instance [NonUnitalCStarAlgebra A] : NonUnitalCStarAlgebra Aᵐᵒᵖ where -noncomputable instance [NonUnitalCommCStarAlgebra A] : NonUnitalCommCStarAlgebra Aᵐᵒᵖ where +instance [NonUnitalCommCStarAlgebra A] : NonUnitalCommCStarAlgebra Aᵐᵒᵖ where -noncomputable instance [CStarAlgebra A] : CStarAlgebra Aᵐᵒᵖ where +instance [CStarAlgebra A] : CStarAlgebra Aᵐᵒᵖ where -noncomputable instance [CommCStarAlgebra A] : CommCStarAlgebra Aᵐᵒᵖ where +instance [CommCStarAlgebra A] : CommCStarAlgebra Aᵐᵒᵖ where end MulOpposite diff --git a/Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Instances.lean b/Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Instances.lean index 79341b514c28bc..81c8c7b47e3875 100644 --- a/Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Instances.lean +++ b/Mathlib/Analysis/CStarAlgebra/ContinuousFunctionalCalculus/Instances.lean @@ -73,7 +73,7 @@ This range of this map is contained in the range of `(↑) : A → A⁺¹` (see and so we may restrict it to `A` to get the necessary homomorphism for the non-unital continuous functional calculus. -/ -noncomputable def cfcₙAux : C(σₙ 𝕜 a, 𝕜)₀ →⋆ₙₐ[𝕜] A⁺¹ := +def cfcₙAux : C(σₙ 𝕜 a, 𝕜)₀ →⋆ₙₐ[𝕜] A⁺¹ := (cfcHom (R := 𝕜) (hp₁.mpr ha) : C(σ 𝕜 (a : A⁺¹), 𝕜) →⋆ₙₐ[𝕜] A⁺¹) |>.comp (Homeomorph.compStarAlgEquiv' 𝕜 𝕜 <| .setCongr <| (quasispectrum_eq_spectrum_inr' 𝕜 𝕜 a).symm) |>.comp ContinuousMapZero.toContinuousMapHom diff --git a/Mathlib/Analysis/Calculus/ContDiff/FTaylorSeries.lean b/Mathlib/Analysis/Calculus/ContDiff/FTaylorSeries.lean index 084664a10b855d..1386ab9cfb2701 100644 --- a/Mathlib/Analysis/Calculus/ContDiff/FTaylorSeries.lean +++ b/Mathlib/Analysis/Calculus/ContDiff/FTaylorSeries.lean @@ -395,7 +395,7 @@ variable (𝕜) derivative of `f` is the derivative of the `n`-th derivative of `f` along this set, together with an uncurrying step to see it as a multilinear map in `n+1` variables.. -/ -noncomputable def iteratedFDerivWithin (n : ℕ) (f : E → F) (s : Set E) : E → E [×n]→L[𝕜] F := +def iteratedFDerivWithin (n : ℕ) (f : E → F) (s : Set E) : E → E [×n]→L[𝕜] F := Nat.recOn n (fun x => ContinuousMultilinearMap.uncurry0 𝕜 E (f x)) fun _ rec x => ContinuousLinearMap.uncurryLeft (fderivWithin 𝕜 rec s x) @@ -800,7 +800,7 @@ lemma HasFTaylorSeriesUpTo.tsupport_subset {m : ℕ} (h : m ≤ n) variable (𝕜) /-- The `n`-th derivative of a function, as a multilinear map, defined inductively. -/ -noncomputable def iteratedFDeriv (n : ℕ) (f : E → F) : E → E [×n]→L[𝕜] F := +def iteratedFDeriv (n : ℕ) (f : E → F) : E → E [×n]→L[𝕜] F := Nat.recOn n (fun x => ContinuousMultilinearMap.uncurry0 𝕜 E (f x)) fun _ rec x => ContinuousLinearMap.uncurryLeft (fderiv 𝕜 rec x) diff --git a/Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean b/Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean index 1d5373d10243b0..43f1e8f0b9e62d 100644 --- a/Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean +++ b/Mathlib/Analysis/Calculus/ContDiff/FaaDiBruno.lean @@ -161,7 +161,7 @@ lemma injective_embSigma (n : ℕ) : Injective (embSigma n) := by /-- The best proof would probably to establish the bijection with Finpartitions, but we opt for a direct argument, embedding `OrderedPartition n` in a type which is obviously finite. -/ -noncomputable instance : Fintype (OrderedFinpartition n) := +instance : Fintype (OrderedFinpartition n) := Fintype.ofInjective _ (injective_embSigma n) instance instUniqueZero : Unique (OrderedFinpartition 0) := by @@ -189,12 +189,12 @@ lemma emb_ne_emb_of_ne {i j : Fin c.length} {a : Fin (c.partSize i)} {b : Fin (c c.emb_injective.ne (a₁ := ⟨i, a⟩) (a₂ := ⟨j, b⟩) (by simp [h]) /-- Given `j : Fin n`, the index of the part to which it belongs. -/ -noncomputable def index (j : Fin n) : Fin c.length := +def index (j : Fin n) : Fin c.length := (c.exists_inverse j).choose.1 /-- The inverse of `c.emb` for `c : OrderedFinpartition`. It maps `j : Fin n` to the point in `Fin (c.partSize (c.index j))` which is mapped back to `j` by `c.emb (c.index j)`. -/ -noncomputable def invEmbedding (j : Fin n) : +def invEmbedding (j : Fin n) : Fin (c.partSize (c.index j)) := (c.exists_inverse j).choose.2 @[simp] lemma emb_invEmbedding (j : Fin n) : @@ -203,7 +203,7 @@ noncomputable def invEmbedding (j : Fin n) : /-- An ordered finpartition gives an equivalence between `Fin n` and the disjoint union of the parts, each of them parameterized by `Fin (c.partSize i)`. -/ -noncomputable def equivSigma : ((i : Fin c.length) × Fin (c.partSize i)) ≃ Fin n where +def equivSigma : ((i : Fin c.length) × Fin (c.partSize i)) ≃ Fin n where toFun p := c.emb p.1 p.2 invFun i := ⟨c.index i, c.invEmbedding i⟩ right_inv _ := by simp @@ -829,7 +829,7 @@ def compAlongOrderedFinpartitionₗ : variable (𝕜 E F G) in /-- Bundled version of `compAlongOrderedFinpartition`, depending continuously linearly on `f` and continuously multilinearly on `p`. -/ -noncomputable def compAlongOrderedFinpartitionL : +def compAlongOrderedFinpartitionL : (F [×c.length]→L[𝕜] G) →L[𝕜] ContinuousMultilinearMap 𝕜 (fun i ↦ E [×c.partSize i]→L[𝕜] F) (E [×n]→L[𝕜] G) := by refine MultilinearMap.mkContinuousLinear c.compAlongOrderedFinpartitionₗ 1 fun f p ↦ ?_ @@ -900,7 +900,7 @@ the iterated derivatives of `g` and of `f`. Not to be confused with another notion of composition for formal multilinear series, called just `FormalMultilinearSeries.comp`, appearing in the composition of analytic functions. -/ -protected noncomputable def taylorComp +protected def taylorComp (q : FormalMultilinearSeries 𝕜 F G) (p : FormalMultilinearSeries 𝕜 E F) : FormalMultilinearSeries 𝕜 E G := fun n ↦ ∑ c : OrderedFinpartition n, q.compAlongOrderedFinpartition p c diff --git a/Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean b/Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean index c868edf4a29c29..090cfb609e9a82 100644 --- a/Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean +++ b/Mathlib/Analysis/Calculus/FormalMultilinearSeries.lean @@ -250,7 +250,7 @@ variable {ι : Type*} {E : ι → Type*} [∀ i, AddCommGroup (E i)] [∀ i, Mod /-- Realize a ContinuousMultilinearMap on `∀ i : ι, E i` as the evaluation of a FormalMultilinearSeries by choosing an arbitrary identification `ι ≃ Fin (Fintype.card ι)`. -/ -noncomputable def toFormalMultilinearSeries : FormalMultilinearSeries 𝕜 (∀ i, E i) F := +def toFormalMultilinearSeries : FormalMultilinearSeries 𝕜 (∀ i, E i) F := fun n ↦ if h : Fintype.card ι = n then (f.compContinuousLinearMap .proj).domDomCongr (Fintype.equivFinOfCardEq h) else 0 @@ -271,7 +271,7 @@ variable [Semiring 𝕜] {n : ℕ} [AddCommMonoid E] [Module 𝕜 E] [Topologica /-- The index of the first non-zero coefficient in `p` (or `0` if all coefficients are zero). This is the order of the isolated zero of an analytic function `f` at a point if `p` is the Taylor series of `f` at that point. -/ -noncomputable def order (p : FormalMultilinearSeries 𝕜 E F) : ℕ := +def order (p : FormalMultilinearSeries 𝕜 E F) : ℕ := sInf { n | p n ≠ 0 } @[simp] @@ -340,7 +340,7 @@ variable [NontriviallyNormedField 𝕜] [NormedAddCommGroup E] [NormedSpace 𝕜 /-- The formal counterpart of `dslope`, corresponding to the expansion of `(f z - f 0) / z`. If `f` has `p` as a power series, then `dslope f` has `fslope p` as a power series. -/ -noncomputable def fslope (p : FormalMultilinearSeries 𝕜 𝕜 E) : FormalMultilinearSeries 𝕜 𝕜 E := +def fslope (p : FormalMultilinearSeries 𝕜 𝕜 E) : FormalMultilinearSeries 𝕜 𝕜 E := fun n => (p (n + 1)).curryLeft 1 @[simp] diff --git a/Mathlib/Analysis/Complex/Basic.lean b/Mathlib/Analysis/Complex/Basic.lean index ded2fe18b25a89..71cee5eccd1e65 100644 --- a/Mathlib/Analysis/Complex/Basic.lean +++ b/Mathlib/Analysis/Complex/Basic.lean @@ -334,7 +334,7 @@ theorem ofRealCLM_coe : (ofRealCLM : ℝ →ₗ[ℝ] ℂ) = ofRealAm.toLinearMap theorem ofRealCLM_apply (x : ℝ) : ofRealCLM x = x := rfl -noncomputable instance : RCLike ℂ where +instance : RCLike ℂ where re := ⟨⟨Complex.re, Complex.zero_re⟩, Complex.add_re⟩ im := ⟨⟨Complex.im, Complex.zero_im⟩, Complex.add_im⟩ I := Complex.I diff --git a/Mathlib/Analysis/Complex/Norm.lean b/Mathlib/Analysis/Complex/Norm.lean index 7c04b44f1a7d9e..b47fa0eb20ec75 100644 --- a/Mathlib/Analysis/Complex/Norm.lean +++ b/Mathlib/Analysis/Complex/Norm.lean @@ -281,11 +281,11 @@ theorem isCauSeq_im (f : CauSeq ℂ (‖·‖)) : IsCauSeq abs fun n ↦ (f n).i simpa only [← ofReal_sub, norm_real, sub_re, sub_im] using (abs_im_le_norm _).trans_lt <| H _ ij /-- The real part of a complex Cauchy sequence, as a real Cauchy sequence. -/ -noncomputable def cauSeqRe (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := +def cauSeqRe (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := ⟨_, isCauSeq_re f⟩ /-- The imaginary part of a complex Cauchy sequence, as a real Cauchy sequence. -/ -noncomputable def cauSeqIm (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := +def cauSeqIm (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := ⟨_, isCauSeq_im f⟩ theorem isCauSeq_norm {f : ℕ → ℂ} (hf : IsCauSeq (‖·‖) f) : @@ -294,7 +294,7 @@ theorem isCauSeq_norm {f : ℕ → ℂ} (hf : IsCauSeq (‖·‖) f) : ⟨i, fun j hj ↦ lt_of_le_of_lt (abs_norm_sub_norm_le _ _) (hi j hj)⟩ /-- The limit of a Cauchy sequence of complex numbers. -/ -noncomputable def limAux (f : CauSeq ℂ (‖·‖)) : ℂ := +def limAux (f : CauSeq ℂ (‖·‖)) : ℂ := ⟨CauSeq.lim (cauSeqRe f), CauSeq.lim (cauSeqIm f)⟩ theorem equiv_limAux (f : CauSeq ℂ (‖·‖)) : @@ -335,7 +335,7 @@ theorem isCauSeq_conj (f : CauSeq ℂ (‖·‖)) : simp_rw [← map_sub, norm_conj]; exact hi j hj⟩ /-- The complex conjugate of a complex Cauchy sequence, as a complex Cauchy sequence. -/ -noncomputable def cauSeqConj (f : CauSeq ℂ (‖·‖)) : CauSeq ℂ (‖·‖) := +def cauSeqConj (f : CauSeq ℂ (‖·‖)) : CauSeq ℂ (‖·‖) := ⟨_, isCauSeq_conj f⟩ theorem lim_conj (f : CauSeq ℂ (‖·‖)) : lim (cauSeqConj f) = conj (lim f) := @@ -343,7 +343,7 @@ theorem lim_conj (f : CauSeq ℂ (‖·‖)) : lim (cauSeqConj f) = conj (lim f) (by simp [cauSeqConj, (lim_im _).symm, cauSeqIm, (lim_neg _).symm]; rfl) /-- The norm of a complex Cauchy sequence, as a real Cauchy sequence. -/ -noncomputable def cauSeqNorm (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := +def cauSeqNorm (f : CauSeq ℂ (‖·‖)) : CauSeq ℝ abs := ⟨_, isCauSeq_norm f.2⟩ theorem lim_norm (f : CauSeq ℂ (‖·‖)) : lim (cauSeqNorm f) = ‖lim f‖ := diff --git a/Mathlib/Analysis/Complex/UpperHalfPlane/MoebiusAction.lean b/Mathlib/Analysis/Complex/UpperHalfPlane/MoebiusAction.lean index 91ed0eb715979c..03bac493a09961 100644 --- a/Mathlib/Analysis/Complex/UpperHalfPlane/MoebiusAction.lean +++ b/Mathlib/Analysis/Complex/UpperHalfPlane/MoebiusAction.lean @@ -89,7 +89,7 @@ lemma moebius_im (g : GL (Fin 2) ℝ) (z : ℂ) : ring /-- Automorphism of `ℂ`: the identity if `0 < det g` and conjugation otherwise. -/ -noncomputable def σ (g : GL (Fin 2) ℝ) : ℂ ≃A[ℝ] ℂ := +def σ (g : GL (Fin 2) ℝ) : ℂ ≃A[ℝ] ℂ := if 0 < g.det.val then .refl ℝ ℂ else Complex.conjCAE lemma σ_conj (g : GL (Fin 2) ℝ) (z : ℂ) : σ g (conj z) = conj (σ g z) := by @@ -280,7 +280,7 @@ end PGLAction section SLAction -noncomputable instance SLAction {R : Type*} [CommRing R] [Algebra R ℝ] : MulAction SL(2, R) ℍ := +instance SLAction {R : Type*} [CommRing R] [Algebra R ℝ] : MulAction SL(2, R) ℍ := MulAction.compHom ℍ <| SpecialLinearGroup.mapGL ℝ theorem coe_specialLinearGroup_apply {R : Type*} [CommRing R] [Algebra R ℝ] (g : SL(2, R)) (z : ℍ) : @@ -343,7 +343,7 @@ end SLAction section toSL2R /-- Map from `ℍ` to `SL(2, ℝ)`, giving a continuous section of the map `g ↦ g • I`. -/ -noncomputable def toSL2R (z : ℍ) : SL(2, ℝ) := +def toSL2R (z : ℍ) : SL(2, ℝ) := ⟨!![√z.im, z.re / √z.im; 0, 1 / √z.im], by simp [mul_inv_cancel₀ (Real.sqrt_ne_zero'.mpr z.im_pos)]⟩ diff --git a/Mathlib/Analysis/InnerProductSpace/Basic.lean b/Mathlib/Analysis/InnerProductSpace/Basic.lean index 6171f8318e2fb8..69c216e27671af 100644 --- a/Mathlib/Analysis/InnerProductSpace/Basic.lean +++ b/Mathlib/Analysis/InnerProductSpace/Basic.lean @@ -154,7 +154,7 @@ variable {F} variable {𝕜} @[deprecated (since := "2025-12-26")] alias sesqFormOfInner := innerₛₗ -@[deprecated (since := "2025-12-26")] noncomputable alias bilinFormOfRealInner := innerₗ +@[deprecated (since := "2025-12-26")] alias bilinFormOfRealInner := innerₗ /-- An inner product with a sum on the left. -/ theorem sum_inner {ι : Type*} (s : Finset ι) (f : ι → E) (x : E) : @@ -984,7 +984,7 @@ protected theorem Complex.inner (w z : ℂ) : ⟪w, z⟫_ℝ = (z * conj w).re : end RCLikeToReal /-- An `RCLike` field is a real inner product space. -/ -noncomputable instance RCLike.toInnerProductSpaceReal : InnerProductSpace ℝ 𝕜 where +instance RCLike.toInnerProductSpaceReal : InnerProductSpace ℝ 𝕜 where __ := Inner.rclikeToReal 𝕜 𝕜 norm_sq_eq_re_inner := norm_sq_eq_re_inner conj_inner_symm x y := inner_re_symm .. diff --git a/Mathlib/Analysis/InnerProductSpace/LinearMap.lean b/Mathlib/Analysis/InnerProductSpace/LinearMap.lean index 79f8dfa984ef81..2ac8b7dd61a874 100644 --- a/Mathlib/Analysis/InnerProductSpace/LinearMap.lean +++ b/Mathlib/Analysis/InnerProductSpace/LinearMap.lean @@ -198,7 +198,7 @@ variable {E' : Type*} [SeminormedAddCommGroup E'] [InnerProductSpace 𝕜 E'] -- Note: odd and expensive build behavior is explicitly turned off using `noncomputable` /-- Given `f : E →L[𝕜] E'`, construct the continuous sesquilinear form `fun x y ↦ ⟪x, A y⟫`, given as a continuous linear map. -/ -noncomputable def toSesqForm : (E →L[𝕜] E') →L[𝕜] E' →L⋆[𝕜] E →L[𝕜] 𝕜 := +def toSesqForm : (E →L[𝕜] E') →L[𝕜] E' →L⋆[𝕜] E →L[𝕜] 𝕜 := (ContinuousLinearMap.flipₗᵢ' E E' 𝕜 (starRingEnd 𝕜) (RingHom.id 𝕜)).toContinuousLinearEquiv ∘L ContinuousLinearMap.compSL E E' (E' →L⋆[𝕜] 𝕜) (RingHom.id 𝕜) (RingHom.id 𝕜) (innerSLFlip 𝕜) @@ -300,7 +300,7 @@ This is also sometimes referred to as an outer product of vectors on a Hilbert s This corresponds to the matrix outer product `Matrix.vecMulVec`, see `InnerProductSpace.toMatrix_rankOne` and `InnerProductSpace.symm_toEuclideanLin_rankOne` in `Mathlib/Analysis/InnerProductSpace/PiL2.lean`. -/ -noncomputable def rankOne : E →L[𝕜] F →L⋆[𝕜] F →L[𝕜] E := +def rankOne : E →L[𝕜] F →L⋆[𝕜] F →L[𝕜] E := .flip <| .comp (.smulRightL 𝕜 _ _) (innerSL 𝕜) lemma rankOne_def (x : E) (y : F) : rankOne 𝕜 x y = (innerSL 𝕜 y).smulRight x := rfl diff --git a/Mathlib/Analysis/InnerProductSpace/LinearPMap.lean b/Mathlib/Analysis/InnerProductSpace/LinearPMap.lean index da112f39df47a6..14e1c4a3f48a0e 100644 --- a/Mathlib/Analysis/InnerProductSpace/LinearPMap.lean +++ b/Mathlib/Analysis/InnerProductSpace/LinearPMap.lean @@ -261,7 +261,7 @@ namespace Submodule Note that the adjoint is taken with respect to the L^2 inner product on `E × F`, which is defined as `WithLp 2 (E × F)`. -/ -protected noncomputable +protected def adjoint (g : Submodule 𝕜 (E × F)) : Submodule 𝕜 (F × E) := (g.map ((LinearEquiv.skewSwap 𝕜 F E).symm.trans (WithLp.linearEquiv 2 𝕜 (F × E)).symm).toLinearMap).orthogonal.map diff --git a/Mathlib/Analysis/InnerProductSpace/PiL2.lean b/Mathlib/Analysis/InnerProductSpace/PiL2.lean index 297d9435e95b06..d3cdc07c9e85e1 100644 --- a/Mathlib/Analysis/InnerProductSpace/PiL2.lean +++ b/Mathlib/Analysis/InnerProductSpace/PiL2.lean @@ -223,7 +223,6 @@ section restrict₂ variable {I J : Finset ι'} /-- The restriction from `EuclideanSpace 𝕜 J` to `EuclideanSpace 𝕜 I` when `I ⊆ J`. -/ -noncomputable def restrict₂ (hIJ : I ⊆ J) : EuclideanSpace 𝕜 J →L[𝕜] EuclideanSpace 𝕜 I where toFun x := toLp 2 (Finset.restrict₂ («π» := fun _ ↦ 𝕜) hIJ x.ofLp) @@ -649,7 +648,7 @@ variable {ι 𝕜 : Type*} [Unique ι] [RCLike 𝕜] variable (ι 𝕜) in /-- `OrthonormalBasis.singleton ι 𝕜` is the orthonormal basis sending the unique element of `ι` to `1 : 𝕜`. -/ -protected noncomputable def singleton : OrthonormalBasis ι 𝕜 𝕜 := +protected def singleton : OrthonormalBasis ι 𝕜 𝕜 := (Basis.singleton ι 𝕜).toOrthonormalBasis (by simp) @[simp] @@ -804,7 +803,7 @@ namespace EuclideanSpace variable (𝕜 ι) /-- The basis `Pi.basisFun`, bundled as an orthonormal basis of `EuclideanSpace 𝕜 ι`. -/ -noncomputable def basisFun : OrthonormalBasis ι 𝕜 (EuclideanSpace 𝕜 ι) := +def basisFun : OrthonormalBasis ι 𝕜 (EuclideanSpace 𝕜 ι) := ⟨LinearIsometryEquiv.refl _ _⟩ @[simp] @@ -1014,7 +1013,7 @@ variable {A : ι → Submodule 𝕜 E} /-- Given an internal direct sum decomposition of a module `M`, and an orthonormal basis for each of the components of the direct sum, the disjoint union of these orthonormal bases is an orthonormal basis for `M`. -/ -noncomputable def DirectSum.IsInternal.collectedOrthonormalBasis +def DirectSum.IsInternal.collectedOrthonormalBasis (hV : OrthogonalFamily 𝕜 (fun i => A i) fun i => (A i).subtypeₗᵢ) [DecidableEq ι] (hV_sum : DirectSum.IsInternal fun i => A i) {α : ι → Type*} [∀ i, Fintype (α i)] (v_family : ∀ i, OrthonormalBasis (α i) 𝕜 (A i)) : OrthonormalBasis (Σ i, α i) 𝕜 E := @@ -1175,7 +1174,7 @@ open Module isometry mapping `S` into `V` can be extended to a full isometry of `V`. TODO: The case when `S` is a finite-dimensional subspace of an infinite-dimensional `V`. -/ -noncomputable def LinearIsometry.extend (L : S →ₗᵢ[𝕜] V) : V →ₗᵢ[𝕜] V := by +def LinearIsometry.extend (L : S →ₗᵢ[𝕜] V) : V →ₗᵢ[𝕜] V := by -- Build an isometry from Sᗮ to L(S)ᗮ through `EuclideanSpace` let d := finrank 𝕜 Sᗮ let LS := LinearMap.range L.toLinearMap diff --git a/Mathlib/Analysis/InnerProductSpace/ProdL2.lean b/Mathlib/Analysis/InnerProductSpace/ProdL2.lean index 263b0b741d20b9..a3ae0342d5d69c 100644 --- a/Mathlib/Analysis/InnerProductSpace/ProdL2.lean +++ b/Mathlib/Analysis/InnerProductSpace/ProdL2.lean @@ -177,7 +177,7 @@ theorem quotientEquivOrthogonal_symm_eq_mk (x : E) (hx : x ∈ Kᗮ) : K.quotientEquivOrthogonal.symm ⟨x, hx⟩ = Quotient.mk x := by simp -noncomputable instance instQuotientInnerProductSpace : +instance instQuotientInnerProductSpace : InnerProductSpace 𝕜 (E ⧸ K) where inner x y := ⟪K.quotientEquivOrthogonal x, K.quotientEquivOrthogonal y⟫_𝕜 add_left x y z := by rw [map_add, inner_add_left] diff --git a/Mathlib/Analysis/InnerProductSpace/l2Space.lean b/Mathlib/Analysis/InnerProductSpace/l2Space.lean index a4d66041103696..71efcc8349d16c 100644 --- a/Mathlib/Analysis/InnerProductSpace/l2Space.lean +++ b/Mathlib/Analysis/InnerProductSpace/l2Space.lean @@ -290,7 +290,7 @@ theorem IsHilbertSum.mkInternal [∀ i, CompleteSpace <| F i] i.e `lp G 2`. Note that this goes in the opposite direction from `OrthogonalFamily.linearIsometry`. -/ -noncomputable def IsHilbertSum.linearIsometryEquiv (hV : IsHilbertSum 𝕜 G V) : E ≃ₗᵢ[𝕜] lp G 2 := +def IsHilbertSum.linearIsometryEquiv (hV : IsHilbertSum 𝕜 G V) : E ≃ₗᵢ[𝕜] lp G 2 := LinearIsometryEquiv.symm <| LinearIsometryEquiv.ofSurjective hV.OrthogonalFamily.linearIsometry hV.surjective_isometry diff --git a/Mathlib/Analysis/MeanInequalitiesPow.lean b/Mathlib/Analysis/MeanInequalitiesPow.lean index d157730b07294d..b6e44916f7dea5 100644 --- a/Mathlib/Analysis/MeanInequalitiesPow.lean +++ b/Mathlib/Analysis/MeanInequalitiesPow.lean @@ -320,7 +320,7 @@ theorem rpow_add_le_add_rpow {p : ℝ} (a b : ℝ≥0∞) (hp : 0 ≤ p) (hp1 : /-- A constant for the inequality `‖f + g‖_{L^p} ≤ C * (‖f‖_{L^p} + ‖g‖_{L^p})`. It is equal to `1` for `p ≥ 1` or `p = 0`, and `2^(1/p-1)` in the more tricky interval `(0, 1)`. -/ -@[expose] noncomputable def LpAddConst (p : ℝ≥0∞) : ℝ≥0∞ := +@[expose] def LpAddConst (p : ℝ≥0∞) : ℝ≥0∞ := if p ∈ Set.Ioo (0 : ℝ≥0∞) 1 then (2 : ℝ≥0∞) ^ (1 / p.toReal - 1) else 1 theorem LpAddConst_of_one_le {p : ℝ≥0∞} (hp : 1 ≤ p) : LpAddConst p = 1 := by diff --git a/Mathlib/Analysis/Normed/Group/Quotient.lean b/Mathlib/Analysis/Normed/Group/Quotient.lean index a2be9239e6f3e8..fdef4f25f4bd9c 100644 --- a/Mathlib/Analysis/Normed/Group/Quotient.lean +++ b/Mathlib/Analysis/Normed/Group/Quotient.lean @@ -112,7 +112,7 @@ private lemma norm_aux (x : M ⧸ S) : {m : M | (m : M ⧸ S) = x}.Nonempty := Q @[to_additive /-- The norm of `x` on the quotient by a subgroup `S` is defined as the infimum of the norm on `x + S`. -/] -noncomputable def groupSeminorm : GroupSeminorm (M ⧸ S) where +def groupSeminorm : GroupSeminorm (M ⧸ S) where toFun x := infDist 1 {m : M | (m : M ⧸ S) = x} map_one' := infDist_zero_of_mem (by simp) mul_le' x y := by @@ -132,7 +132,7 @@ noncomputable def groupSeminorm : GroupSeminorm (M ⧸ S) where @[to_additive /-- The norm of `x` on the quotient by a subgroup `S` is defined as the infimum of the norm on `x + S`. -/] -noncomputable instance instNorm : Norm (M ⧸ S) where norm := groupSeminorm +instance instNorm : Norm (M ⧸ S) where norm := groupSeminorm @[to_additive] lemma norm_eq_groupSeminorm (x : M ⧸ S) : ‖x‖ = groupSeminorm x := rfl @@ -206,7 +206,7 @@ lemma exists_norm_mul_lt (S : Subgroup M) (m : M) {ε : ℝ} (hε : 0 < ε) : variable (S) in /-- The seminormed group structure on the quotient by a subgroup. -/ @[to_additive /-- The seminormed group structure on the quotient by an additive subgroup. -/] -noncomputable instance instSeminormedCommGroup : SeminormedCommGroup (M ⧸ S) where +instance instSeminormedCommGroup : SeminormedCommGroup (M ⧸ S) where toUniformSpace := IsTopologicalGroup.leftUniformSpace (M ⧸ S) __ := groupSeminorm.toSeminormedCommGroup uniformity_dist := by @@ -216,7 +216,7 @@ noncomputable instance instSeminormedCommGroup : SeminormedCommGroup (M ⧸ S) w variable (S) in /-- The quotient in the category of normed groups. -/ @[to_additive /-- The quotient in the category of normed groups. -/] -noncomputable instance instNormedCommGroup [hS : IsClosed (S : Set M)] : +instance instNormedCommGroup [hS : IsClosed (S : Set M)] : NormedCommGroup (M ⧸ S) where __ := MetricSpace.ofT0PseudoMetricSpace _ @@ -279,7 +279,7 @@ namespace AddSubgroup open NormedAddGroupHom /-- The morphism from a seminormed group to the quotient by a subgroup. -/ -noncomputable def normedMk (S : AddSubgroup M) : NormedAddGroupHom M (M ⧸ S) where +def normedMk (S : AddSubgroup M) : NormedAddGroupHom M (M ⧸ S) where __ := QuotientAddGroup.mk' S bound' := ⟨1, fun m => by simpa [one_mul] using norm_mk_le_norm⟩ @@ -343,7 +343,7 @@ structure IsQuotient (f : NormedAddGroupHom M N) : Prop where /-- Given `f : NormedAddGroupHom M N` such that `f s = 0` for all `s ∈ S`, where, `S : AddSubgroup M` is closed, the induced morphism `NormedAddGroupHom (M ⧸ S) N`. -/ -noncomputable def lift {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M) +def lift {N : Type*} [SeminormedAddCommGroup N] (S : AddSubgroup M) (f : NormedAddGroupHom M N) (hf : ∀ s ∈ S, f s = 0) : NormedAddGroupHom (M ⧸ S) N := { QuotientAddGroup.lift S f.toAddMonoidHom hf with bound' := ⟨‖f‖, norm_lift_apply_le f hf⟩ } diff --git a/Mathlib/Analysis/Normed/Lp/lpSpace.lean b/Mathlib/Analysis/Normed/Lp/lpSpace.lean index 172f73b6945bf4..5833d042825cb9 100644 --- a/Mathlib/Analysis/Normed/Lp/lpSpace.lean +++ b/Mathlib/Analysis/Normed/Lp/lpSpace.lean @@ -747,7 +747,7 @@ variable [NormedRing 𝕜] [Module 𝕜 E] [IsBoundedSMul 𝕜 E] [CompleteSpace variable (α 𝕜 E) in /-- Summation (i.e., `tsum`) in `ℓ¹(α, E)` as a continuous linear map. -/ @[simps!] -noncomputable def tsumCLM : ℓ¹(α, E) →L[𝕜] E := +def tsumCLM : ℓ¹(α, E) →L[𝕜] E := LinearMap.mkContinuous { toFun f := ∑' i, f i map_add' f g := by @@ -1070,7 +1070,7 @@ def lsingle (p) (i : α) : E i →ₗ[𝕜] lp E p where /-- The basis for `ℓ⁰(α, 𝕜)` given by `lp.single`. -/ @[simps repr_apply] -noncomputable def zeroBasis : Module.Basis α 𝕜 ℓ⁰(α, 𝕜) where +def zeroBasis : Module.Basis α 𝕜 ℓ⁰(α, 𝕜) where repr := { toFun x := .ofSupportFinite ⇑x <| memℓp_zero_iff.mp x.2 invFun x := ⟨⇑x, memℓp_zero_iff.mpr x.hasFiniteSupport⟩ diff --git a/Mathlib/Analysis/Normed/Module/Bases.lean b/Mathlib/Analysis/Normed/Module/Bases.lean index 8a0fb89ad36437..55de2626c222c0 100644 --- a/Mathlib/Analysis/Normed/Module/Bases.lean +++ b/Mathlib/Analysis/Normed/Module/Bases.lean @@ -206,7 +206,7 @@ namespace UnconditionalSchauderBasis variable (b : UnconditionalSchauderBasis β 𝕜 X) /-- The basis constant for unconditional bases (supremum over all finite sets) as `enorm`. -/ -noncomputable def enormProjBound : ℝ≥0∞ := ⨆ A : Finset β, ‖b.proj A‖ₑ +def enormProjBound : ℝ≥0∞ := ⨆ A : Finset β, ‖b.proj A‖ₑ /-- The `enorm` of any projection is bounded by the basis constant. -/ theorem enorm_proj_le_enormProjBound (A : Finset β) : ‖b.proj A‖ₑ ≤ b.enormProjBound := @@ -237,7 +237,7 @@ theorem exists_norm_proj_le [CompleteSpace X] : ∃ C : ℝ, ∀ A : Finset β, /-- The basis constant for unconditional bases (supremum over all finite sets) as `nnnorm`. It requires completeness to guarantee that the supremum is finite, see lemma `bddAbove_range_nnnorm_proj` below. -/ -noncomputable def nnnormProjBound : ℝ≥0 := ⨆ A : Finset β, ‖b.proj A‖₊ +def nnnormProjBound : ℝ≥0 := ⨆ A : Finset β, ‖b.proj A‖₊ /-- The projection norms are bounded above in a complete space. -/ theorem bddAbove_range_nnnorm_proj [CompleteSpace X] : @@ -317,7 +317,7 @@ theorem exists_norm_proj_le [CompleteSpace X] : ∃ C : ℝ, ∀ n : ℕ, ‖b.p exact ⟨M, Set.forall_mem_range.mp hM⟩ /-- The basis constant for Schauder bases (supremum over projections) as `enorm`. -/ -noncomputable def enormProjBound : ℝ≥0∞ := ⨆ n, ‖b.proj n‖ₑ +def enormProjBound : ℝ≥0∞ := ⨆ n, ‖b.proj n‖ₑ /-- The enorm of any projection is bounded by the basis constant. -/ theorem enorm_proj_le_enormProjBound (n : ℕ) : ‖b.proj n‖ₑ ≤ b.enormProjBound := @@ -326,7 +326,7 @@ theorem enorm_proj_le_enormProjBound (n : ℕ) : ‖b.proj n‖ₑ ≤ b.enormPr /-- The basis constant for Schauder bases (supremum over projections) as `nnnorm`. Requires completeness to guarantee the supremum is finite, see lemma `bddAbove_range_nnnorm_proj` below. -/ -noncomputable def nnnormProjBound : ℝ≥0 := ⨆ n, ‖b.proj n‖₊ +def nnnormProjBound : ℝ≥0 := ⨆ n, ‖b.proj n‖₊ /-- The projection norms are bounded above in a complete space. -/ theorem bddAbove_range_nnnorm_proj [CompleteSpace X] : diff --git a/Mathlib/Analysis/Normed/Module/Multilinear/Basic.lean b/Mathlib/Analysis/Normed/Module/Multilinear/Basic.lean index d179029f25fa13..4df7f15f39eb2e 100644 --- a/Mathlib/Analysis/Normed/Module/Multilinear/Basic.lean +++ b/Mathlib/Analysis/Normed/Module/Multilinear/Basic.lean @@ -1098,7 +1098,7 @@ open Function in `ContinuousMultilinearMap.compContinuousLinearMap` sending a continuous multilinear map `g` to `g (f₁ ·, ..., fₙ ·)` is continuous-linear in `g` and multilinear in `f₁, ..., fₙ`. -/ -noncomputable def compContinuousLinearMapMultilinear : +def compContinuousLinearMapMultilinear : MultilinearMap 𝕜 (fun i ↦ E i →L[𝕜] E₁ i) ((ContinuousMultilinearMap 𝕜 E₁ G) →L[𝕜] ContinuousMultilinearMap 𝕜 E G) where toFun := compContinuousLinearMapL @@ -1119,7 +1119,7 @@ noncomputable def compContinuousLinearMapMultilinear : sending a continuous multilinear map `g` to `g (f₁ ·, ..., fₙ ·)` is continuous-linear in `g` and continuous-multilinear in `f₁, ..., fₙ`. -/ @[simps! apply_apply] -noncomputable def compContinuousLinearMapContinuousMultilinear : +def compContinuousLinearMapContinuousMultilinear : ContinuousMultilinearMap 𝕜 (fun i ↦ E i →L[𝕜] E₁ i) ((ContinuousMultilinearMap 𝕜 E₁ G) →L[𝕜] ContinuousMultilinearMap 𝕜 E G) := MultilinearMap.mkContinuous (𝕜 := 𝕜) (E := fun i ↦ E i →L[𝕜] E₁ i) @@ -1132,7 +1132,7 @@ variable {𝕜 E E₁ G} /-- Fréchet derivative of `compContinuousLinearMap f g` with respect to `g`. The derivative with respect to `f` is given by `compContinuousLinearMapL`. -/ -noncomputable def fderivCompContinuousLinearMap [DecidableEq ι] +def fderivCompContinuousLinearMap [DecidableEq ι] (f : ContinuousMultilinearMap 𝕜 E₁ G) (g : ∀ i, E i →L[𝕜] E₁ i) : (∀ i, E i →L[𝕜] E₁ i) →L[𝕜] ContinuousMultilinearMap 𝕜 E G := ContinuousLinearMap.apply _ _ f @@ -1152,7 +1152,7 @@ continuous multilinear map of `k` vectors `v₁, ..., vₖ`, mapping them to `f (x₁, (v_{e.symm 2})₂, x₃, ...)`, where at indices `i` in `s` one uses the `i`-th coordinate of the vector `v_{e.symm i}` and otherwise one uses the `i`-th coordinate of a reference vector `x`. This is continuous multilinear in the components of `x` outside of `s`, and in the `v_j`. -/ -noncomputable def iteratedFDerivComponent {α : Type*} [Fintype α] +def iteratedFDerivComponent {α : Type*} [Fintype α] (f : ContinuousMultilinearMap 𝕜 E₁ G) {s : Set ι} (e : α ≃ s) [DecidablePred (· ∈ s)] : ContinuousMultilinearMap 𝕜 (fun (i : {a : ι // a ∉ s}) ↦ E₁ i) (ContinuousMultilinearMap 𝕜 (fun (_ : α) ↦ (∀ i, E₁ i)) G) := diff --git a/Mathlib/Analysis/Normed/Module/Multilinear/Curry.lean b/Mathlib/Analysis/Normed/Module/Multilinear/Curry.lean index 14e5230d77ab1b..dcff1e2a27a096 100644 --- a/Mathlib/Analysis/Normed/Module/Multilinear/Curry.lean +++ b/Mathlib/Analysis/Normed/Module/Multilinear/Curry.lean @@ -663,7 +663,7 @@ variable {F G : Type*} [NormedAddCommGroup F] [NormedSpace 𝕜 F] live in a different universe. However, one can always lift it to a continuous multilinear map on `(G × (Π i, E i)) ^ (1 + n)`, which maps `(v_0, ..., v_n)` to `B (g_0) (u_1, ..., u_n)` where `g_0` is the `G`-coordinate of `v_0` and `u_i` is the `E_i` coordinate of `v_i`. -/ -noncomputable def continuousMultilinearMapOption (B : G →L[𝕜] ContinuousMultilinearMap 𝕜 E F) : +def continuousMultilinearMapOption (B : G →L[𝕜] ContinuousMultilinearMap 𝕜 E F) : ContinuousMultilinearMap 𝕜 (fun (_ : Option ι) ↦ (G × (Π i, E i))) F := MultilinearMap.mkContinuous { toFun := fun p ↦ B (p none).1 (fun i ↦ (p i).2 i) diff --git a/Mathlib/Analysis/Normed/Module/WeakDual.lean b/Mathlib/Analysis/Normed/Module/WeakDual.lean index 99aeca6008b7bf..aecb267e79580e 100644 --- a/Mathlib/Analysis/Normed/Module/WeakDual.lean +++ b/Mathlib/Analysis/Normed/Module/WeakDual.lean @@ -409,7 +409,7 @@ open StrongDual /-- The extension `StrongDual.extendRCLike` as a continuous linear equivalence between the weak duals. -/ @[simps! -isSimp apply symm_apply] -noncomputable def extendRCLikeL : WeakDual ℝ F ≃L[ℝ] WeakDual 𝕜 F where +def extendRCLikeL : WeakDual ℝ F ≃L[ℝ] WeakDual 𝕜 F where toLinearEquiv := toStrongDual ≪≫ₗ extendRCLikeₗ ≪≫ₗ toWeakDual.restrictScalars ℝ continuous_toFun := continuous_of_continuous_eval_re fun x ↦ by simpa [extendRCLikeₗ_apply] using eval_continuous x diff --git a/Mathlib/Analysis/Real/Hyperreal.lean b/Mathlib/Analysis/Real/Hyperreal.lean index ca05db1a5571ab..346eba232956a4 100644 --- a/Mathlib/Analysis/Real/Hyperreal.lean +++ b/Mathlib/Analysis/Real/Hyperreal.lean @@ -388,7 +388,7 @@ theorem isSt_iff {x r} : IsSt x r ↔ 0 ≤ mk x ∧ stdPart x = r where open scoped Classical in /-- Standard part function: like a "round" to ℝ instead of ℤ -/ @[deprecated stdPart (since := "2026-01-05")] -noncomputable def st : ℝ* → ℝ := fun x => if h : ∃ r, IsSt x r then Classical.choose h else 0 +def st : ℝ* → ℝ := fun x => if h : ∃ r, IsSt x r then Classical.choose h else 0 @[deprecated "`st` is deprecated" (since := "2026-01-05")] theorem st_eq (x : ℝ*) : st x = stdPart x := by diff --git a/Mathlib/Analysis/SpecialFunctions/Complex/Log.lean b/Mathlib/Analysis/SpecialFunctions/Complex/Log.lean index 969f190fefacf8..d6c3264bf19edc 100644 --- a/Mathlib/Analysis/SpecialFunctions/Complex/Log.lean +++ b/Mathlib/Analysis/SpecialFunctions/Complex/Log.lean @@ -27,7 +27,7 @@ open scoped Real Topology ComplexConjugate /-- Inverse of the `exp` function. Returns values such that `(log x).im > - π` and `(log x).im ≤ π`. `log 0 = 0` -/ @[pp_nodot] -noncomputable def log (x : ℂ) : ℂ := +def log (x : ℂ) : ℂ := Real.log ‖x‖ + arg x * I theorem log_re (x : ℂ) : x.log.re = Real.log ‖x‖ := by simp [log] @@ -293,7 +293,7 @@ open scoped Real This definition is used to prove that `Complex.log` is complex differentiable at all points but the negative real semi-axis. -/ -noncomputable def expOpenPartialHomeomorph : OpenPartialHomeomorph ℂ ℂ where +def expOpenPartialHomeomorph : OpenPartialHomeomorph ℂ ℂ where toFun := exp invFun := log source := {z : ℂ | z.im ∈ Ioo (-π) π} diff --git a/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean index a57539a4f3e2de..2c21241f079a47 100644 --- a/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean @@ -245,7 +245,7 @@ end GammaRecurrence section GammaDef /-- The `n`th function in this family is `Γ(s)` if `-n < s.re`, and junk otherwise. -/ -private noncomputable def GammaAux : ℕ → ℂ → ℂ +private def GammaAux : ℕ → ℂ → ℂ | 0 => GammaIntegral | n + 1 => fun s : ℂ => GammaAux n (s + 1) / s diff --git a/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean b/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean index 40edeb5bc6a42d..8e4f5032484a69 100644 --- a/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean +++ b/Mathlib/Analysis/SpecialFunctions/Gamma/Beta.lean @@ -57,7 +57,7 @@ section BetaIntegral namespace Complex /-- The Beta function `Β (u, v)`, defined as `∫ x:ℝ in 0..1, x ^ (u - 1) * (1 - x) ^ (v - 1)`. -/ -noncomputable def betaIntegral (u v : ℂ) : ℂ := +def betaIntegral (u v : ℂ) : ℂ := ∫ x : ℝ in 0..1, (x : ℂ) ^ (u - 1) * (1 - (x : ℂ)) ^ (v - 1) /-- Auxiliary lemma for `betaIntegral_convergent`, showing convergence at the left endpoint. -/ @@ -227,7 +227,7 @@ namespace Complex /-- The sequence with `n`-th term `n ^ s * n! / (s * (s + 1) * ... * (s + n))`, for complex `s`. We will show that this tends to `Γ(s)` as `n → ∞`. -/ -noncomputable def GammaSeq (s : ℂ) (n : ℕ) := +def GammaSeq (s : ℂ) (n : ℕ) := (n : ℂ) ^ s * n ! / ∏ j ∈ Finset.range (n + 1), (s + j) theorem GammaSeq_eq_betaIntegral_of_re_pos {s : ℂ} (hs : 0 < re s) (n : ℕ) : @@ -461,7 +461,7 @@ namespace Real /-- The sequence with `n`-th term `n ^ s * n! / (s * (s + 1) * ... * (s + n))`, for real `s`. We will show that this tends to `Γ(s)` as `n → ∞`. -/ -noncomputable def GammaSeq (s : ℝ) (n : ℕ) := +def GammaSeq (s : ℝ) (n : ℕ) := (n : ℝ) ^ s * n ! / ∏ j ∈ Finset.range (n + 1), (s + j) /-- Euler's limit formula for the real Gamma function. -/ diff --git a/Mathlib/Analysis/SpecialFunctions/Log/Base.lean b/Mathlib/Analysis/SpecialFunctions/Log/Base.lean index 43dbd2c7b55957..af3ab14b20250b 100644 --- a/Mathlib/Analysis/SpecialFunctions/Log/Base.lean +++ b/Mathlib/Analysis/SpecialFunctions/Log/Base.lean @@ -40,7 +40,7 @@ variable {b x y : ℝ} /-- The real logarithm in a given base. As with the natural logarithm, we define `logb b x` to be `logb b |x|` for `x < 0`, and `0` for `x = 0`. -/ @[pp_nodot] -noncomputable def logb (b x : ℝ) : ℝ := +def logb (b x : ℝ) : ℝ := log x / log b theorem log_div_log : log x / log b = logb b x := diff --git a/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean index fe745c1c5d5d34..d8cc64fa19874e 100644 --- a/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Log/Basic.lean @@ -41,7 +41,7 @@ to `log |x|` for `x < 0`, and to `0` for `0`. We use this unconventional extensi `(-∞, 0]` as it gives the formula `log (x * y) = log x + log y` for all nonzero `x` and `y`, and the derivative of `log` is `1/x` away from `0`. -/ @[pp_nodot, wikidata Q11197] -noncomputable def log (x : ℝ) : ℝ := +def log (x : ℝ) : ℝ := if hx : x = 0 then 0 else expOrderIso.symm ⟨|x|, abs_pos.2 hx⟩ theorem log_of_ne_zero (hx : x ≠ 0) : log x = expOrderIso.symm ⟨|x|, abs_pos.2 hx⟩ := @@ -456,7 +456,7 @@ theorem isLittleO_const_log_atTop {c : ℝ} : (fun _ => c) =o[atTop] log := by aesop (add safe forward log_pos) /-- `Real.exp` as an `OpenPartialHomeomorph` with `source = univ` and `target = {z | 0 < z}`. -/ -@[simps] noncomputable def expPartialHomeomorph : OpenPartialHomeomorph ℝ ℝ where +@[simps] def expPartialHomeomorph : OpenPartialHomeomorph ℝ ℝ where toFun := Real.exp invFun := Real.log source := univ diff --git a/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean b/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean index ae94fa6b17397c..ea9c3d2841eb53 100644 --- a/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean +++ b/Mathlib/Analysis/SpecialFunctions/PolarCoord.lean @@ -180,7 +180,7 @@ open scoped Real ENNReal /-- The polar coordinates open partial homeomorphism in `ℂ`, mapping `r (cos θ + I * sin θ)` to `(r, θ)`. It is a homeomorphism between `ℂ - ℝ≤0` and `(0, +∞) × (-π, π)`. -/ -protected noncomputable def polarCoord : OpenPartialHomeomorph ℂ (ℝ × ℝ) := +protected def polarCoord : OpenPartialHomeomorph ℂ (ℝ × ℝ) := equivRealProdCLM.toHomeomorph.transOpenPartialHomeomorph polarCoord protected theorem polarCoord_apply (a : ℂ) : @@ -228,7 +228,7 @@ variable {ι : Type*} open ContinuousLinearMap in /-- The derivative of `polarCoord.symm` on `ι → ℝ × ℝ`, see `hasFDerivAt_pi_polarCoord_symm`. -/ -noncomputable def fderivPiPolarCoordSymm (p : ι → ℝ × ℝ) : (ι → ℝ × ℝ) →L[ℝ] ι → ℝ × ℝ := +def fderivPiPolarCoordSymm (p : ι → ℝ × ℝ) : (ι → ℝ × ℝ) →L[ℝ] ι → ℝ × ℝ := pi fun i ↦ (fderivPolarCoordSymm (p i)).comp (proj i) theorem injOn_pi_polarCoord_symm : diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean b/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean index 6e98036e4a5139..99280c9d267b9c 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/NNReal.lean @@ -33,10 +33,10 @@ variable {x : ℝ≥0} {w y z : ℝ} /-- The nonnegative real power function `x^y`, defined for `x : ℝ≥0` and `y : ℝ` as the restriction of the real power function. For `x > 0`, it is equal to `exp (y log x)`. For `x = 0`, one sets `0 ^ 0 = 1` and `0 ^ y = 0` for `y ≠ 0`. -/ -noncomputable def rpow (x : ℝ≥0) (y : ℝ) : ℝ≥0 := +def rpow (x : ℝ≥0) (y : ℝ) : ℝ≥0 := ⟨(x : ℝ) ^ y, Real.rpow_nonneg x.2 y⟩ -noncomputable instance : Pow ℝ≥0 ℝ := +instance : Pow ℝ≥0 ℝ := ⟨rpow⟩ @[simp] @@ -482,11 +482,11 @@ namespace ENNReal `y : ℝ` as the restriction of the real power function if `0 < x < ⊤`, and with the natural values for `0` and `⊤` (i.e., `0 ^ x = 0` for `x > 0`, `1` for `x = 0` and `⊤` for `x < 0`, and `⊤ ^ x = 1 / 0 ^ x`). -/ -noncomputable def rpow : ℝ≥0∞ → ℝ → ℝ≥0∞ +def rpow : ℝ≥0∞ → ℝ → ℝ≥0∞ | some x, y => if x = 0 ∧ y < 0 then ⊤ else (x ^ y : ℝ≥0) | none, y => if 0 < y then ⊤ else if y = 0 then 1 else 0 -noncomputable instance : Pow ℝ≥0∞ ℝ := +instance : Pow ℝ≥0∞ ℝ := ⟨rpow⟩ @[simp] diff --git a/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean b/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean index 4fa7722f332deb..b1df9620c1b1ae 100644 --- a/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean +++ b/Mathlib/Analysis/SpecialFunctions/Pow/Real.lean @@ -32,10 +32,10 @@ variable {x y z : ℝ} For `x > 0`, it is equal to `exp (y log x)`. For `x = 0`, one sets `0 ^ 0=1` and `0 ^ y=0` for `y ≠ 0`. For `x < 0`, the definition is somewhat arbitrary as it depends on the choice of a complex determination of the logarithm. With our conventions, it is equal to `exp (y log x) cos (π y)`. -/ -noncomputable def rpow (x y : ℝ) := +def rpow (x y : ℝ) := ((x : ℂ) ^ (y : ℂ)).re -noncomputable instance : Pow ℝ ℝ := ⟨rpow⟩ +instance : Pow ℝ ℝ := ⟨rpow⟩ @[simp] theorem rpow_eq_pow (x y : ℝ) : rpow x y = x ^ y := rfl diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean index a4f209c1ff56de..e7967e5f9351f5 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Arctan.lean @@ -115,7 +115,7 @@ def tanOrderIso : Ioo (-(π / 2)) (π / 2) ≃o ℝ := /-- Inverse of the `tan` function, returns values in the range `-π / 2 < arctan x` and `arctan x < π / 2` -/ @[pp_nodot] -noncomputable def arctan (x : ℝ) : ℝ := +def arctan (x : ℝ) : ℝ := tanOrderIso.symm x @[simp] diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean index 86ee5817a80fec..363417f6b6579e 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean @@ -124,7 +124,7 @@ see `Mathlib/Analysis/Real/Pi/Bounds.lean`. Denoted `π`, once the `Real` namespace is opened. -/ @[wikidata Q167] -protected noncomputable def pi : ℝ := +protected def pi : ℝ := 2 * Classical.choose exists_cos_eq_zero @[inherit_doc] @@ -194,7 +194,7 @@ open Real open Real NNReal /-- `π` considered as a nonnegative real. -/ -noncomputable def pi : ℝ≥0 := +def pi : ℝ≥0 := ⟨π, Real.pi_pos.le⟩ @[simp] @@ -638,7 +638,7 @@ variable (x : ℝ) starting with `x`. We define it here because `cos (pi / 2 ^ (n+1)) = sqrtTwoAddSeries 0 n / 2` -/ @[simp] -noncomputable def sqrtTwoAddSeries (x : ℝ) : ℕ → ℝ +def sqrtTwoAddSeries (x : ℝ) : ℕ → ℝ | 0 => x | n + 1 => √(2 + sqrtTwoAddSeries x n) diff --git a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean index 806794b8a9289b..21e144bc2fabbf 100644 --- a/Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean +++ b/Mathlib/Analysis/SpecialFunctions/Trigonometric/Inverse.lean @@ -30,7 +30,7 @@ variable {x y : ℝ} /-- Inverse of the `sin` function, returns values in the range `-π / 2 ≤ arcsin x ≤ π / 2`. It defaults to `-π / 2` on `(-∞, -1)` and to `π / 2` to `(1, ∞)`. -/ @[pp_nodot] -noncomputable def arcsin : ℝ → ℝ := +def arcsin : ℝ → ℝ := Subtype.val ∘ IccExtend (neg_le_self zero_le_one) sinOrderIso.symm theorem arcsin_mem_Icc (x : ℝ) : arcsin x ∈ Icc (-(π / 2)) (π / 2) := @@ -272,7 +272,7 @@ theorem tan_arcsin (x : ℝ) : tan (arcsin x) = x / √(1 - x ^ 2) := by /-- Inverse of the `cos` function, returns values in the range `0 ≤ arccos x` and `arccos x ≤ π`. It defaults to `π` on `(-∞, -1)` and to `0` to `(1, ∞)`. -/ @[pp_nodot] -noncomputable def arccos (x : ℝ) : ℝ := +def arccos (x : ℝ) : ℝ := π / 2 - arcsin x theorem arccos_eq_pi_div_two_sub_arcsin (x : ℝ) : arccos x = π / 2 - arcsin x := @@ -448,7 +448,7 @@ def cosPartialHomeomorph : OpenPartialHomeomorph ℝ ℝ where /-- `Real.cos` and `Real.arccos` as a (partial) equivalence from `[0, π]` to `[-1, 1]` -/ @[simps] -noncomputable def cosPartialEquiv : PartialEquiv ℝ ℝ where +def cosPartialEquiv : PartialEquiv ℝ ℝ where toFun θ := cos θ invFun x := arccos x source := Icc 0 π diff --git a/Mathlib/CategoryTheory/Abelian/Basic.lean b/Mathlib/CategoryTheory/Abelian/Basic.lean index 40f6ab0cf38964..aab1ed28e43027 100644 --- a/Mathlib/CategoryTheory/Abelian/Basic.lean +++ b/Mathlib/CategoryTheory/Abelian/Basic.lean @@ -437,7 +437,7 @@ def coim : Arrow C ⥤ C where map {f g} u := cokernel.desc _ (u.left ≫ Abelian.coimage.π g.hom) <| by simp [← Category.assoc, coimage.comp_π_eq_zero]; simp -@[deprecated (since := "2025-10-31")] noncomputable alias coimageFunctor := coim +@[deprecated (since := "2025-10-31")] alias coimageFunctor := coim set_option backward.defeqAttrib.useBackward true in /-- The image and coimage of an arrow are naturally isomorphic. -/ @@ -516,7 +516,7 @@ set_option backward.isDefEq.respectTransparency false in /-- If `F : D ⥤ C` is a functor to an abelian category, `i : X ⟶ Y` is a morphism admitting a cokernel such that `F` preserves this cokernel and `F.map i` is a mono, then `F.map X` identifies to the kernel of `F.map (cokernel.π i)`. -/ -noncomputable def isLimitMapConeOfKernelForkOfι +def isLimitMapConeOfKernelForkOfι {X Y : D} (i : X ⟶ Y) [HasCokernel i] (F : D ⥤ C) [F.PreservesZeroMorphisms] [Mono (F.map i)] [PreservesColimit (parallelPair i 0) F] : @@ -533,7 +533,7 @@ set_option backward.isDefEq.respectTransparency false in /-- If `F : D ⥤ C` is a functor to an abelian category, `p : X ⟶ Y` is a morphism admitting a kernel such that `F` preserves this kernel and `F.map p` is an epi, then `F.map Y` identifies to the cokernel of `F.map (kernel.ι p)`. -/ -noncomputable def isColimitMapCoconeOfCokernelCoforkOfπ +def isColimitMapCoconeOfCokernelCoforkOfπ {X Y : D} (p : X ⟶ Y) [HasKernel p] (F : D ⥤ C) [F.PreservesZeroMorphisms] [Epi (F.map p)] [PreservesLimit (parallelPair p 0) F] : @@ -869,7 +869,7 @@ a kernel `i : K ⟶ X`, a cokernel `p : Y ⟶ Q` such that `f` factors as `f = where `π : X ⟶ I` is a cokernel of `i` and `ι : I ⟶ Y` is a kernel of `p`. This assumption is packaged in a structure `AbelianStruct f`. -/ @[implicit_reducible] -noncomputable def mk' [HasFiniteProducts C] +def mk' [HasFiniteProducts C] (h : ∀ ⦃X Y : C⦄ (f : X ⟶ Y), Nonempty (AbelianStruct f)) : Abelian C where has_kernels := ⟨fun f ↦ ⟨_, (h f).some.isLimitKernelFork⟩⟩ diff --git a/Mathlib/CategoryTheory/Abelian/FunctorCategory.lean b/Mathlib/CategoryTheory/Abelian/FunctorCategory.lean index 03b80ffcfd3966..02261552289c2e 100644 --- a/Mathlib/CategoryTheory/Abelian/FunctorCategory.lean +++ b/Mathlib/CategoryTheory/Abelian/FunctorCategory.lean @@ -93,7 +93,7 @@ instance functor_category_isIso_coimageImageComparison : end FunctorCategory -noncomputable instance functorCategoryAbelian : Abelian (C ⥤ D) := +instance functorCategoryAbelian : Abelian (C ⥤ D) := let _ : HasKernels (C ⥤ D) := inferInstance let _ : HasCokernels (C ⥤ D) := inferInstance Abelian.ofCoimageImageComparisonIsIso diff --git a/Mathlib/CategoryTheory/Abelian/Injective/Resolution.lean b/Mathlib/CategoryTheory/Abelian/Injective/Resolution.lean index 0bc98d1925ba10..8c136d19430588 100644 --- a/Mathlib/CategoryTheory/Abelian/Injective/Resolution.lean +++ b/Mathlib/CategoryTheory/Abelian/Injective/Resolution.lean @@ -347,7 +347,7 @@ end InjectiveResolution variable [Abelian C] /-- Given an injective presentation `M → I`, the short complex `0 → M → I → N → 0`. -/ -noncomputable abbrev InjectivePresentation.shortComplex +abbrev InjectivePresentation.shortComplex {X : C} (ip : InjectivePresentation X) : ShortComplex C := ShortComplex.mk ip.f (Limits.cokernel.π ip.f) (Limits.cokernel.condition ip.f) diff --git a/Mathlib/CategoryTheory/Abelian/Transfer.lean b/Mathlib/CategoryTheory/Abelian/Transfer.lean index 099e982bca1390..278e957e6141fd 100644 --- a/Mathlib/CategoryTheory/Abelian/Transfer.lean +++ b/Mathlib/CategoryTheory/Abelian/Transfer.lean @@ -145,7 +145,7 @@ instance hasFiniteLimits [HasFiniteLimits C] : end Preadditive variable (C) in -noncomputable instance abelian [Abelian C] : +instance abelian [Abelian C] : Abelian.{w} (ShrinkHoms C) := abelianOfEquivalence (inverse C) end ShrinkHoms @@ -182,7 +182,7 @@ instance hasFiniteLimits [HasFiniteLimits C] : end Preadditive variable (C) in -noncomputable instance abelian [Abelian C] : +instance abelian [Abelian C] : Abelian (AsSmall.{w} C) := abelianOfEquivalence equiv.inverse end AsSmall diff --git a/Mathlib/CategoryTheory/Comma/Over/Pullback.lean b/Mathlib/CategoryTheory/Comma/Over/Pullback.lean index 45e64ac8d25c1c..333a3b012c51df 100644 --- a/Mathlib/CategoryTheory/Comma/Over/Pullback.lean +++ b/Mathlib/CategoryTheory/Comma/Over/Pullback.lean @@ -144,7 +144,7 @@ open Limits set_option backward.defeqAttrib.useBackward true in /-- The category over any object `X` factors through the category over the terminal object `T`. -/ @[simps!] -noncomputable def forgetMapTerminal {T : C} (hT : IsTerminal T) : +def forgetMapTerminal {T : C} (hT : IsTerminal T) : forget X ≅ map (hT.from X) ⋙ (equivalenceOfIsTerminal hT).functor := NatIso.ofComponents fun X ↦ .refl _ @@ -184,7 +184,7 @@ instance : (forget X).IsLeftAdjoint := ⟨_, ⟨forgetAdjStar X⟩⟩ set_option backward.isDefEq.respectTransparency false in /-- Lifting to over `Y` and pulling back along `X ⟶ Y` is the same as lifting to over `X`. -/ @[simps!] -noncomputable def starPullbackIsoStar [HasPullbacks C] {X Y : C} (f : X ⟶ Y) : +def starPullbackIsoStar [HasPullbacks C] {X Y : C} (f : X ⟶ Y) : star Y ⋙ pullback f ≅ star X := NatIso.ofComponents (fun Z ↦ @@ -283,7 +283,7 @@ instance isRightAdjoint_post [HasPushouts D] {Y : D} {G : D ⥤ C} [G.IsRightAdj /-- The category under any object `X` factors through the category under the initial object `I`. -/ @[simps!] -noncomputable def forgetMapInitial {I : C} (hI : IsInitial I) : +def forgetMapInitial {I : C} (hI : IsInitial I) : forget X ≅ map (hI.to X) ⋙ (equivalenceOfIsInitial hI).functor := NatIso.ofComponents fun X ↦ .refl _ diff --git a/Mathlib/CategoryTheory/Countable.lean b/Mathlib/CategoryTheory/Countable.lean index 0addaeb860ed21..8e99174e9c247d 100644 --- a/Mathlib/CategoryTheory/Countable.lean +++ b/Mathlib/CategoryTheory/Countable.lean @@ -58,7 +58,7 @@ instance {i j : ObjAsType α} : Countable (i ⟶ j) := instance : CountableCategory (ObjAsType α) where /-- The constructed category is indeed equivalent to `α`. -/ -noncomputable def objAsTypeEquiv : ObjAsType α ≌ α := +def objAsTypeEquiv : ObjAsType α ≌ α := (inducedFunctor (equivShrink.{0} α).symm).asEquivalence /-- A countable category `α` is equivalent to a *small* category with objects in `Type`. -/ @@ -79,7 +79,7 @@ instance {i j : HomAsType α} : Countable (i ⟶ j) := instance : CountableCategory (HomAsType α) where /-- The constructed category is indeed equivalent to `α`. -/ -noncomputable def homAsTypeEquiv : HomAsType α ≌ α := +def homAsTypeEquiv : HomAsType α ≌ α := (ShrinkHoms.equivalence _).symm.trans (objAsTypeEquiv _) end CountableCategory diff --git a/Mathlib/CategoryTheory/FinCategory/AsType.lean b/Mathlib/CategoryTheory/FinCategory/AsType.lean index 5fe1e4c0b6fcfa..7cf8ea2d390968 100644 --- a/Mathlib/CategoryTheory/FinCategory/AsType.lean +++ b/Mathlib/CategoryTheory/FinCategory/AsType.lean @@ -33,7 +33,7 @@ instance {i j : ObjAsType α} : Fintype (i ⟶ j) := Fintype.ofEquiv _ InducedCategory.homEquiv.symm /-- The constructed category is indeed equivalent to `α`. -/ -noncomputable def objAsTypeEquiv : ObjAsType α ≌ α := +def objAsTypeEquiv : ObjAsType α ≌ α := (inducedFunctor (Fintype.equivFin α).symm).asEquivalence /-- A FinCategory `α` is equivalent to a FinCategory in `Type`. -/ @@ -42,7 +42,7 @@ abbrev AsType : Type := Fin (Fintype.card α) @[simps -isSimp id comp] -noncomputable instance categoryAsType : SmallCategory (AsType α) where +instance categoryAsType : SmallCategory (AsType α) where Hom i j := Fin (Fintype.card (@Quiver.Hom (ObjAsType α) _ i j)) id _ := Fintype.equivFin _ (𝟙 _) comp f g := Fintype.equivFin _ ((Fintype.equivFin _).symm f ≫ (Fintype.equivFin _).symm g) @@ -51,31 +51,31 @@ attribute [local simp] categoryAsType_id categoryAsType_comp /-- The "identity" functor from `AsType α` to `ObjAsType α`. -/ @[simps] -noncomputable def asTypeToObjAsType : AsType α ⥤ ObjAsType α where +def asTypeToObjAsType : AsType α ⥤ ObjAsType α where obj := id map {_ _} := (Fintype.equivFin _).symm set_option backward.isDefEq.respectTransparency false in /-- The "identity" functor from `ObjAsType α` to `AsType α`. -/ @[simps] -noncomputable def objAsTypeToAsType : ObjAsType α ⥤ AsType α where +def objAsTypeToAsType : ObjAsType α ⥤ AsType α where obj := id map {_ _} := Fintype.equivFin _ set_option backward.defeqAttrib.useBackward true in set_option backward.isDefEq.respectTransparency false in /-- The constructed category (`AsType α`) is equivalent to `ObjAsType α`. -/ -noncomputable def asTypeEquivObjAsType : AsType α ≌ ObjAsType α where +def asTypeEquivObjAsType : AsType α ≌ ObjAsType α where functor := asTypeToObjAsType α inverse := objAsTypeToAsType α unitIso := NatIso.ofComponents Iso.refl counitIso := NatIso.ofComponents Iso.refl -noncomputable instance asTypeFinCategory : FinCategory (AsType α) where +instance asTypeFinCategory : FinCategory (AsType α) where fintypeHom := fun _ _ => show Fintype (Fin _) from inferInstance /-- The constructed category (`AsType α`) is indeed equivalent to `α`. -/ -noncomputable def equivAsType : AsType α ≌ α := +def equivAsType : AsType α ≌ α := (asTypeEquivObjAsType α).trans (objAsTypeEquiv α) end FinCategory diff --git a/Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean b/Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean index 5408ed6c593fbd..ba29c9c9e272ea 100644 --- a/Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean +++ b/Mathlib/CategoryTheory/Limits/Constructions/Over/Connected.lean @@ -174,7 +174,6 @@ def conePostIso (F : J ⥤ C) (i : J) : attribute [local instance] IsCofiltered.isConnected in /-- The functor taking a cone over `F` to a cone over `Over.post F : Over i ⥤ Over (F.obj i)` preserves limit cones -/ -noncomputable def isLimitConePost [IsCofilteredOrEmpty J] {F : J ⥤ C} {c : Cone F} (i : J) (hc : IsLimit c) : IsLimit ((conePost F i).obj c) := isLimitOfReflects (Over.forget _) diff --git a/Mathlib/CategoryTheory/Limits/Final.lean b/Mathlib/CategoryTheory/Limits/Final.lean index 40de447a51ef95..275b1ed0380feb 100644 --- a/Mathlib/CategoryTheory/Limits/Final.lean +++ b/Mathlib/CategoryTheory/Limits/Final.lean @@ -1222,7 +1222,7 @@ variable {J C : Type*} [Category* J] [Category* C] {D : J ⥤ C} set_option backward.defeqAttrib.useBackward true in /-- If `Over j ⥤ J` is initial, restricting a limit cone to the diagram above `j`, preserves the limit. -/ -noncomputable def Limits.IsLimit.overPost {c : Cone D} (hc : IsLimit c) (j : J) +def Limits.IsLimit.overPost {c : Cone D} (hc : IsLimit c) (j : J) [(CategoryTheory.Over.forget j).Initial] : IsLimit (c.overPost j) := by haveI : Nonempty (Over j) := ⟨Over.mk (𝟙 j)⟩ letI c'' := Over.liftCone (Over.forget j ⋙ D) (X := D.obj j) @@ -1237,7 +1237,7 @@ noncomputable def Limits.IsLimit.overPost {c : Cone D} (hc : IsLimit c) (j : J) set_option backward.defeqAttrib.useBackward true in /-- If `Over j ⥤ J` is final, restricting a colimit cocone to the diagram below `j`, preserves the limit. -/ -noncomputable def Limits.IsColimit.underPost {c : Cocone D} (hc : IsColimit c) (j : J) +def Limits.IsColimit.underPost {c : Cocone D} (hc : IsColimit c) (j : J) [(CategoryTheory.Under.forget j).Final] : IsColimit (c.underPost j) := by haveI : Nonempty (Under j) := ⟨CategoryTheory.Under.mk (𝟙 j)⟩ letI c'' := Under.liftCocone (CategoryTheory.Under.forget j ⋙ D) (X := D.obj j) diff --git a/Mathlib/CategoryTheory/Limits/FormalCoproducts/Basic.lean b/Mathlib/CategoryTheory/Limits/FormalCoproducts/Basic.lean index 2c1324ea862275..b6d06899872958 100644 --- a/Mathlib/CategoryTheory/Limits/FormalCoproducts/Basic.lean +++ b/Mathlib/CategoryTheory/Limits/FormalCoproducts/Basic.lean @@ -401,18 +401,18 @@ instance : PreservesColimitsOfShape (Discrete J) ((eval.{w} C A).obj F) := preservesColimitsOfShape_of_discrete _ /-- The yoneda embedding of `FormalCoproduct.{v} C` into `v`-presheaves. -/ -protected noncomputable abbrev yoneda : +protected abbrev yoneda : FormalCoproduct.{v} C ⥤ Cᵒᵖ ⥤ Type v := (eval _ _).obj yoneda /-- The yoneda embedding of `FormalCoproduct.{w} C` into `max w v`-presheaves. -/ -protected noncomputable abbrev uliftYoneda : +protected abbrev uliftYoneda : FormalCoproduct.{w} C ⥤ Cᵒᵖ ⥤ Type (max w v) := (eval _ _).obj uliftYoneda /-- The yoneda embedding of `FormalCoproduct.{w} C` into `w`-presheaves for a locally `w`-small category. -/ -protected noncomputable abbrev shrinkYoneda [LocallySmall.{w} C] : +protected abbrev shrinkYoneda [LocallySmall.{w} C] : FormalCoproduct.{w} C ⥤ Cᵒᵖ ⥤ Type w := (eval _ _).obj shrinkYoneda diff --git a/Mathlib/CategoryTheory/Limits/HasLimits.lean b/Mathlib/CategoryTheory/Limits/HasLimits.lean index 32b9ff4f07b696..c91656de65a655 100644 --- a/Mathlib/CategoryTheory/Limits/HasLimits.lean +++ b/Mathlib/CategoryTheory/Limits/HasLimits.lean @@ -571,7 +571,7 @@ a limit cone for any `F : J ⥤ C`. -/ /-- The limit cone obtained from a right adjoint of the constant functor. -/ @[simps] -noncomputable def coneOfAdj (F : J ⥤ C) : Cone F where +def coneOfAdj (F : J ⥤ C) : Cone F where pt := L.obj F π := adj.counit.app F diff --git a/Mathlib/CategoryTheory/Limits/Over.lean b/Mathlib/CategoryTheory/Limits/Over.lean index ebf513ada46641..5bd012ca0d985c 100644 --- a/Mathlib/CategoryTheory/Limits/Over.lean +++ b/Mathlib/CategoryTheory/Limits/Over.lean @@ -95,7 +95,7 @@ the cocone `c` also lifts to the diagram on `Over`. -/ ι.app j := Over.homMk (c.ι.app j) /-- `Over.liftCocone` is limiting if the original cocone is. -/ -noncomputable def isColimitLiftCocone {F : J ⥤ C} (c : Cocone F) {X : C} (f : c.pt ⟶ X) +def isColimitLiftCocone {F : J ⥤ C} (c : Cocone F) {X : C} (f : c.pt ⟶ X) (hc : IsColimit c) : IsColimit (liftCocone c f) := isColimitOfReflects (Over.forget _) hc @@ -156,7 +156,7 @@ the cone `c` also lifts to the diagram on `Under`. -/ π.app j := Under.homMk (c.π.app j) /-- `Under.liftCone` is limiting if the original cone is. -/ -noncomputable def isLimitLiftCone {F : J ⥤ C} (c : Cone F) {X : C} +def isLimitLiftCone {F : J ⥤ C} (c : Cone F) {X : C} (f : X ⟶ c.pt) (hc : IsLimit c) : IsLimit (liftCone c f) := isLimitOfReflects (Under.forget _) hc diff --git a/Mathlib/CategoryTheory/Limits/Preserves/FunctorCategory.lean b/Mathlib/CategoryTheory/Limits/Preserves/FunctorCategory.lean index 1445294592acbc..33962ff1f11c49 100644 --- a/Mathlib/CategoryTheory/Limits/Preserves/FunctorCategory.lean +++ b/Mathlib/CategoryTheory/Limits/Preserves/FunctorCategory.lean @@ -255,7 +255,7 @@ variable [HasLimitsOfShape J C] [HasColimitsOfShape K C] variable [PreservesLimitsOfShape J (colim : (K ⥤ C) ⥤ _)] set_option backward.isDefEq.respectTransparency false in -noncomputable instance : PreservesLimitsOfShape J (colim : (K ⥤ D ⥤ C) ⥤ _) := +instance : PreservesLimitsOfShape J (colim : (K ⥤ D ⥤ C) ⥤ _) := preservesLimitsOfShape_of_evaluation _ _ (fun d => let i : (colim : (K ⥤ D ⥤ C) ⥤ _) ⋙ (evaluation D C).obj d ≅ colimit ((whiskeringRight K (D ⥤ C) C).obj ((evaluation D C).obj d)).flip := @@ -273,7 +273,7 @@ variable [HasColimitsOfShape J C] [HasLimitsOfShape K C] variable [PreservesColimitsOfShape J (lim : (K ⥤ C) ⥤ _)] set_option backward.isDefEq.respectTransparency false in -noncomputable instance : PreservesColimitsOfShape J (lim : (K ⥤ D ⥤ C) ⥤ _) := +instance : PreservesColimitsOfShape J (lim : (K ⥤ D ⥤ C) ⥤ _) := preservesColimitsOfShape_of_evaluation _ _ (fun d => let i : (lim : (K ⥤ D ⥤ C) ⥤ _) ⋙ (evaluation D C).obj d ≅ limit ((whiskeringRight K (D ⥤ C) C).obj ((evaluation D C).obj d)).flip := diff --git a/Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean b/Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean index ef1f44c142b9dd..a21ccf0867e2dd 100644 --- a/Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean +++ b/Mathlib/CategoryTheory/Limits/Preserves/Shapes/Kernels.lean @@ -305,7 +305,7 @@ instance preservesKernel_zero : exact (Fork.ext (G.mapIso (asIso (Fork.ι c))).symm (by simp))⟩ set_option backward.defeqAttrib.useBackward true in -noncomputable instance preservesCokernel_zero : +instance preservesCokernel_zero : PreservesColimit (parallelPair (0 : X ⟶ Y) 0) G where preserves {c} hc := ⟨by have := CokernelCofork.IsColimit.isIso_π c hc rfl diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean b/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean index 168fcf4e55e9dc..b80ff942c17688 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Biproducts.lean @@ -293,7 +293,7 @@ def whiskerToCocone {f : J → C} (c : Bicone f) (g : K ≃ J) : Cocone.ext (Iso.refl _) (by simp) /-- Whiskering a bicone with an equivalence between types preserves being a bilimit bicone. -/ -noncomputable def whiskerIsBilimitIff {f : J → C} (c : Bicone f) (g : K ≃ J) : +def whiskerIsBilimitIff {f : J → C} (c : Bicone f) (g : K ≃ J) : (c.whisker g).IsBilimit ≃ c.IsBilimit := by refine equivOfSubsingletonOfSubsingleton (fun hc => ⟨?_, ?_⟩) fun hc => ⟨?_, ?_⟩ · let this := IsLimit.ofIsoLimit hc.isLimit (Bicone.whiskerToCone c g) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean b/Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean index 9e6c063246d766..955b7e6fcf7f64 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Diagonal.lean @@ -519,11 +519,11 @@ namespace pushout variable {X Y : C} (f : X ⟶ Y) [HasPushout f f] /-- The codiagonal object of a morphism `f : X ⟶ Y` is `pushout f f`. -/ -noncomputable abbrev codiagonalObj (f : X ⟶ Y) [HasPushout f f] : C := +abbrev codiagonalObj (f : X ⟶ Y) [HasPushout f f] : C := pushout f f /-- The codiagonal morphism `pushout f f ⟶ Y` for a morphism `f : X ⟶ Y`. -/ -noncomputable def codiagonal (f : X ⟶ Y) [HasPushout f f] : codiagonalObj f ⟶ Y := +def codiagonal (f : X ⟶ Y) [HasPushout f f] : codiagonalObj f ⟶ Y := pushout.desc (𝟙 Y) (𝟙 Y) rfl @[reassoc (attr := simp)] diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Images.lean b/Mathlib/CategoryTheory/Limits/Shapes/Images.lean index 7a32afb6b3122a..7cafa97fc48f9f 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Images.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Images.lean @@ -1007,7 +1007,7 @@ variable (C) set_option backward.isDefEq.respectTransparency false in /-- A category with strong epi mono factorisations admits functorial epi/mono factorizations. -/ -noncomputable def functorialEpiMonoFactorizationData : +def functorialEpiMonoFactorizationData : FunctorialFactorizationData (epimorphisms C) (monomorphisms C) where Z := im i := { app := fun f => factorThruImage f.hom } diff --git a/Mathlib/CategoryTheory/Limits/Shapes/IsTerminal.lean b/Mathlib/CategoryTheory/Limits/Shapes/IsTerminal.lean index f68d561c9176f3..15e7b03162b5e4 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/IsTerminal.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/IsTerminal.lean @@ -240,7 +240,6 @@ def isLimitEmptyConeEquiv (c₁ : Cone F₁) (c₂ : Cone F₂) (h : c₁.pt ≅ simp only [eq_iff_true_of_subsingleton] /-- If `F` is an empty diagram, then a cone over `F` is limiting iff the cone point is terminal. -/ -noncomputable def isLimitEquivIsTerminalOfIsEmpty {J : Type*} [Category* J] [IsEmpty J] {F : J ⥤ C} (c : Cone F) : IsLimit c ≃ IsTerminal c.pt := (IsLimit.whiskerEquivalenceEquiv (equivalenceOfIsEmpty (Discrete PEmpty.{1}) _)).trans @@ -270,7 +269,6 @@ def isColimitEmptyCoconeEquiv (c₁ : Cocone F₁) (c₂ : Cocone F₂) (h : c /-- If `F` is an empty diagram, then a cocone over `F` is colimiting iff the cocone point is initial. -/ -noncomputable def isColimitEquivIsInitialOfIsEmpty {J : Type*} [Category* J] [IsEmpty J] {F : J ⥤ C} (c : Cocone F) : IsColimit c ≃ IsInitial c.pt := (IsColimit.whiskerEquivalenceEquiv (equivalenceOfIsEmpty (Discrete PEmpty.{1}) _)).trans diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean b/Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean index a76ecb17ce0a6b..bfb0389ab7cf7e 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean @@ -1284,7 +1284,7 @@ variable [HasKernels C] /-- The kernel of an arrow is natural. -/ @[simps] -noncomputable def ker : Arrow C ⥤ C where +def ker : Arrow C ⥤ C where obj f := kernel f.hom map {f g} u := kernel.lift _ (kernel.ι _ ≫ u.left) (by simp) @@ -1302,7 +1302,7 @@ variable [HasCokernels C] /-- The cokernel of an arrow is natural. -/ @[simps] -noncomputable def coker : Arrow C ⥤ C where +def coker : Arrow C ⥤ C where obj f := cokernel f.hom map {f g} u := cokernel.desc _ (u.right ≫ cokernel.π _) (by simp [← Arrow.w_assoc u]) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Equalizers.lean b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Equalizers.lean index fee3e3f67f5143..88834d84fe8f3b 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Equalizers.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Equalizers.lean @@ -237,7 +237,7 @@ namespace Cofork /-- A cofork is a colimit cocone if and only if the corresponding fork in the opposite category is a limit cone. -/ -noncomputable -- just for performance; compilation takes several seconds +-- just for performance; compilation takes several seconds def isColimitEquivIsLimitOp {X Y : C} {f g : X ⟶ Y} (c : Cofork f g) : IsColimit c ≃ IsLimit c.op := by apply equivOfSubsingletonOfSubsingleton @@ -249,7 +249,7 @@ def isColimitEquivIsLimitOp {X Y : C} {f g : X ⟶ Y} (c : Cofork f g) : /-- A cofork is a colimit cocone in `Cᵒᵖ` if and only if the corresponding fork in `C` is a limit cone. -/ -noncomputable -- just for performance; compilation takes several seconds +-- just for performance; compilation takes several seconds def isColimitEquivIsLimitUnop {X Y : Cᵒᵖ} {f g : X ⟶ Y} (c : Cofork f g) : IsColimit c ≃ IsLimit c.unop := by apply equivOfSubsingletonOfSubsingleton diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Products.lean b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Products.lean index 7ed24f4290765c..4ef6f1f80c9bd2 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Products.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Products.lean @@ -105,7 +105,7 @@ def Cofan.op (c : Cofan Z) : Fan (op <| Z ·) := Fan.mk _ (fun a ↦ (c.inj a).o set_option backward.defeqAttrib.useBackward true in /-- If a `Cofan` is colimit, then its opposite is limit. -/ -- noncomputability is just for performance (compilation takes a while) -noncomputable def Cofan.IsColimit.op {c : Cofan Z} (hc : IsColimit c) : IsLimit c.op := by +def Cofan.IsColimit.op {c : Cofan Z} (hc : IsColimit c) : IsLimit c.op := by let e : Discrete.functor (Opposite.op <| Z ·) ≅ (Discrete.opposite α).inverse ⋙ (Discrete.functor Z).op := Discrete.natIso (fun _ ↦ Iso.refl _) refine IsLimit.ofIsoLimit ((IsLimit.postcomposeInvEquiv e _).2 @@ -217,7 +217,7 @@ def Fan.op (f : Fan Z) : Cofan (op <| Z ·) := Cofan.mk _ (fun a ↦ (f.proj a). set_option backward.defeqAttrib.useBackward true in /-- If a `Fan` is limit, then its opposite is colimit. -/ -- noncomputability is just for performance (compilation takes a while) -noncomputable def Fan.IsLimit.op {f : Fan Z} (hf : IsLimit f) : IsColimit f.op := by +def Fan.IsLimit.op {f : Fan Z} (hf : IsLimit f) : IsColimit f.op := by let e : Discrete.functor (Opposite.op <| Z ·) ≅ (Discrete.opposite α).inverse ⋙ (Discrete.functor Z).op := Discrete.natIso (fun _ ↦ Iso.refl _) refine IsColimit.ofIsoColimit ((IsColimit.precomposeHomEquiv e _).2 diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Pullbacks.lean b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Pullbacks.lean index ffe8ab9e0a96bc..e94ec049e52464 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Pullbacks.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Opposites/Pullbacks.lean @@ -193,7 +193,7 @@ def unopOpIso {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f /-- A pushout cone is a colimit cocone if and only if the corresponding pullback cone in the opposite category is a limit cone. -/ -noncomputable -- just for performance; compilation takes several seconds +-- just for performance; compilation takes several seconds def isColimitEquivIsLimitOp {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : IsColimit c ≃ IsLimit c.op := by apply equivOfSubsingletonOfSubsingleton @@ -207,7 +207,7 @@ def isColimitEquivIsLimitOp {X Y Z : C} {f : X ⟶ Y} {g : X ⟶ Z} (c : Pushout /-- A pushout cone is a colimit cocone in `Cᵒᵖ` if and only if the corresponding pullback cone in `C` is a limit cone. -/ -noncomputable -- just for performance; compilation takes several seconds +-- just for performance; compilation takes several seconds def isColimitEquivIsLimitUnop {X Y Z : Cᵒᵖ} {f : X ⟶ Y} {g : X ⟶ Z} (c : PushoutCocone f g) : IsColimit c ≃ IsLimit c.unop := by apply equivOfSubsingletonOfSubsingleton @@ -261,7 +261,7 @@ instance {X Y Z : Cᵒᵖ} (f : X ⟶ Z) (g : Y ⟶ Z) [HasPullback f g] : HasPu /-- The pullback of `f` and `g` in `C` is isomorphic to the pushout of `f.op` and `g.op` in `Cᵒᵖ`. -/ -noncomputable def pullbackIsoUnopPushout {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [h : HasPullback f g] : +def pullbackIsoUnopPushout {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [h : HasPullback f g] : pullback f g ≅ unop (pushout f.op g.op) := IsLimit.conePointUniqueUpToIso (@limit.isLimit _ _ _ _ _ h) ((PushoutCocone.isColimitEquivIsLimitUnop _) (colimit.isColimit (span f.op g.op))) @@ -288,7 +288,7 @@ theorem pullbackIsoUnopPushout_hom_inr {X Y Z : C} (f : X ⟶ Z) (g : Y ⟶ Z) [ /-- The pullback of `f` and `g` in `Cᵒᵖ` is isomorphic to the pushout of `f.unop` and `g.unop` in `C`. -/ -noncomputable def pullbackIsoOpPushout {X Y Z : Cᵒᵖ} (f : X ⟶ Z) (g : Y ⟶ Z) [h : HasPullback f g] : +def pullbackIsoOpPushout {X Y Z : Cᵒᵖ} (f : X ⟶ Z) (g : Y ⟶ Z) [h : HasPullback f g] : pullback f g ≅ op (pushout f.unop g.unop) := IsLimit.conePointUniqueUpToIso (@limit.isLimit _ _ _ _ _ h) ((PushoutCocone.isColimitEquivIsLimitOp _) (colimit.isColimit (span f.unop g.unop))) @@ -337,7 +337,7 @@ instance {X Y Z : Cᵒᵖ} (f : X ⟶ Y) (g : X ⟶ Z) [HasPushout f g] : HasPul /-- The pushout of `f` and `g` in `C` is isomorphic to the pullback of `f.op` and `g.op` in `Cᵒᵖ`. -/ -noncomputable def pushoutIsoUnopPullback {X Y Z : C} (f : X ⟶ Z) (g : X ⟶ Y) [h : HasPushout f g] : +def pushoutIsoUnopPullback {X Y Z : C} (f : X ⟶ Z) (g : X ⟶ Y) [h : HasPushout f g] : pushout f g ≅ unop (pullback f.op g.op) := IsColimit.coconePointUniqueUpToIso (@colimit.isColimit _ _ _ _ _ h) ((PullbackCone.isLimitEquivIsColimitUnop _) (limit.isLimit (cospan f.op g.op))) @@ -364,7 +364,7 @@ theorem pushoutIsoUnopPullback_inv_snd {X Y Z : C} (f : X ⟶ Z) (g : X ⟶ Y) [ /-- The pushout of `f` and `g` in `Cᵒᵖ` is isomorphic to the pullback of `f.unop` and `g.unop` in `C`. -/ -noncomputable def pushoutIsoOpPullback {X Y Z : Cᵒᵖ} (f : X ⟶ Z) (g : X ⟶ Y) [h : HasPushout f g] : +def pushoutIsoOpPullback {X Y Z : Cᵒᵖ} (f : X ⟶ Z) (g : X ⟶ Y) [h : HasPushout f g] : pushout f g ≅ op (pullback f.unop g.unop) := IsColimit.coconePointUniqueUpToIso (@colimit.isColimit _ _ _ _ _ h) ((PullbackCone.isLimitEquivIsColimitOp _) (limit.isLimit (cospan f.unop g.unop))) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Products.lean b/Mathlib/CategoryTheory/Limits/Shapes/Products.lean index e7c71c245c1e4f..e993f52f9b441b 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Products.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Products.lean @@ -1043,7 +1043,7 @@ end Fubini variable (α) in /-- The functor `(f : α → C) ↦ ∏ᶜ f`. -/ @[simps] -noncomputable def Pi.functor [HasProductsOfShape α C] : (α → C) ⥤ C where +def Pi.functor [HasProductsOfShape α C] : (α → C) ⥤ C where obj f := ∏ᶜ f map {f g} t := Pi.map t @@ -1075,7 +1075,7 @@ attribute [local simp] Functor.pi in /-- The `∏ᶜ` functor composed with the pointwise constant functor `Π i, I i ⥤ (α → C)` is isomorphic to the constant functor with value `∏ᶜ X`. -/ @[simps!] -noncomputable def Pi.constCompPiIsoConst [HasProductsOfShape α C] {I : α → Type*} +def Pi.constCompPiIsoConst [HasProductsOfShape α C] {I : α → Type*} [∀ i, Category* (I i)] (X : α → C) : Functor.pi (fun i ↦ (Functor.const (I i)).obj (X i)) ⋙ Pi.functor α ≅ (Functor.const _).obj (∏ᶜ X) := @@ -1084,7 +1084,7 @@ noncomputable def Pi.constCompPiIsoConst [HasProductsOfShape α C] {I : α → T variable (α) in /-- The functor `(f : α → C) ↦ ∐ f`. -/ @[simps] -noncomputable def Sigma.functor [HasCoproductsOfShape α C] : (α → C) ⥤ C where +def Sigma.functor [HasCoproductsOfShape α C] : (α → C) ⥤ C where obj f := ∐ f map {f g} t := Sigma.map t @@ -1120,7 +1120,7 @@ attribute [local simp] Functor.pi in /-- The `∐` functor composed with the pointwise constant functor `Π i, I i ⥤ (α → C)` is isomorphic to the constant functor with value `∐ X`. -/ @[simps!] -noncomputable def Sigma.constCompSigmaIsoConst [HasCoproductsOfShape α C] {I : α → Type*} +def Sigma.constCompSigmaIsoConst [HasCoproductsOfShape α C] {I : α → Type*} [∀ i, Category* (I i)] (X : α → C) : Functor.pi (fun i ↦ (Functor.const (I i)).obj (X i)) ⋙ Sigma.functor α ≅ (Functor.const _).obj (∐ X) := diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean index 213eba6bf41e43..b4ca50b66a74da 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Assoc.lean @@ -142,7 +142,7 @@ theorem hasPullback_assoc_symm [HasPullback f₁ (g₃ ≫ f₂)] : HasPullback ⟨⟨⟨_, pullbackAssocSymmIsPullback f₁ f₂ f₃ f₄⟩⟩⟩ /-- The canonical isomorphism `(X₁ ×[Y₁] X₂) ×[Y₂] X₃ ≅ X₁ ×[Y₁] (X₂ ×[Y₂] X₃)`. -/ -noncomputable def pullbackAssoc [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄] +def pullbackAssoc [HasPullback ((pullback.snd _ _ : Z₁ ⟶ X₂) ≫ f₃) f₄] [HasPullback f₁ ((pullback.fst _ _ : Z₂ ⟶ X₂) ≫ f₂)] : pullback (pullback.snd _ _ ≫ f₃ : pullback f₁ f₂ ⟶ _) f₄ ≅ pullback f₁ (pullback.fst _ _ ≫ f₂ : pullback f₃ f₄ ⟶ _) := @@ -314,7 +314,7 @@ theorem hasPushout_assoc_symm [HasPushout g₁ (g₂ ≫ f₃)] : HasPushout (g ⟨⟨⟨_, pushoutAssocSymmIsPushout g₁ g₂ g₃ g₄⟩⟩⟩ /-- The canonical isomorphism `(X₁ ⨿[Z₁] X₂) ⨿[Z₂] X₃ ≅ X₁ ⨿[Z₁] (X₂ ⨿[Z₂] X₃)`. -/ -noncomputable def pushoutAssoc [HasPushout (g₃ ≫ (pushout.inr _ _ : X₂ ⟶ Y₁)) g₄] +def pushoutAssoc [HasPushout (g₃ ≫ (pushout.inr _ _ : X₂ ⟶ Y₁)) g₄] [HasPushout g₁ (g₂ ≫ (pushout.inl _ _ : X₂ ⟶ Y₂))] : pushout (g₃ ≫ pushout.inr _ _ : _ ⟶ pushout g₁ g₂) g₄ ≅ pushout g₁ (g₂ ≫ pushout.inl _ _ : _ ⟶ pushout g₃ g₄) := diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean index e2e5e749c297f5..71f729609d53c4 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/HasPullback.lean @@ -625,7 +625,7 @@ variable {C} set_option backward.isDefEq.respectTransparency false in /-- `X ×[Y] (Y ⨯ Z) ≅ X ⨯ Z` -/ -noncomputable def pullbackProdFstIsoProd {X Y : C} (f : X ⟶ Y) (Z : C) +def pullbackProdFstIsoProd {X Y : C} (f : X ⟶ Y) (Z : C) [HasBinaryProduct Y Z] [HasBinaryProduct X Z] [HasPullback f (prod.fst : Y ⨯ Z ⟶ _)] : pullback f (prod.fst : Y ⨯ Z ⟶ _) ≅ X ⨯ Z where hom := prod.lift (pullback.fst _ _) (pullback.snd _ _ ≫ prod.snd) @@ -676,7 +676,7 @@ section set_option backward.isDefEq.respectTransparency false in /-- `(Z ⨯ Y) ×[Y] X ≅ Z ⨯ X` -/ -noncomputable def pullbackProdSndIsoProd {X Y : C} (f : X ⟶ Y) (Z : C) +def pullbackProdSndIsoProd {X Y : C} (f : X ⟶ Y) (Z : C) [HasBinaryProduct Z Y] [HasBinaryProduct Z X] [HasPullback (prod.snd : Z ⨯ Y ⟶ Y) f] : pullback (prod.snd : Z ⨯ Y ⟶ Y) f ≅ Z ⨯ X where hom := prod.lift (pullback.fst _ _ ≫ prod.fst) (pullback.snd _ _) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Basic.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Basic.lean index 842a249e0832c2..392ee701504805 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Basic.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Basic.lean @@ -770,7 +770,7 @@ variable {X Y Z : C} {f f' : X ⟶ Y} {g g' : Y ⟶ Z} /-- If `f : X ⟶ Y`, `g g' : Y ⟶ Z` forms a pullback square, then `f` is the equalizer of `g` and `g'`. -/ -noncomputable def IsPullback.isLimitFork (H : IsPullback f f g g') : IsLimit (Fork.ofι f H.w) := by +def IsPullback.isLimitFork (H : IsPullback f f g g') : IsLimit (Fork.ofι f H.w) := by fapply Fork.IsLimit.mk · exact fun s => H.isLimit.lift (PullbackCone.mk s.ι s.ι s.condition) · exact fun s => H.isLimit.fac _ WalkingCospan.left @@ -780,7 +780,7 @@ noncomputable def IsPullback.isLimitFork (H : IsPullback f f g g') : IsLimit (Fo /-- If `f f' : X ⟶ Y`, `g : Y ⟶ Z` forms a pushout square, then `g` is the coequalizer of `f` and `f'`. -/ -noncomputable def IsPushout.isLimitFork (H : IsPushout f f' g g) : +def IsPushout.isLimitFork (H : IsPushout f f' g g) : IsColimit (Cofork.ofπ g H.w) := by fapply Cofork.IsColimit.mk · exact fun s => H.isColimit.desc (PushoutCocone.mk s.π s.π s.condition) @@ -1002,7 +1002,7 @@ namespace IsPullback set_option backward.defeqAttrib.useBackward true in /-- An `IsPullback` square yields an isomorphism `Over.mk fst ≅ Over.mk (pullback.fst f g)` in `Over X`. -/ -noncomputable def isoOverPullback {P : C} {fst : P ⟶ X} {snd : P ⟶ Y} +def isoOverPullback {P : C} {fst : P ⟶ X} {snd : P ⟶ Y} (h : IsPullback fst snd f g) : Over.mk fst ≅ Over.mk (pullback.fst f g) := Over.isoMk (h.isoIsPullback _ _ (IsPullback.of_hasPullback f g)) (by simp) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Defs.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Defs.lean index 3c85d926fb1d50..67da64077a1d69 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Defs.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/IsPullback/Defs.lean @@ -99,11 +99,11 @@ theorem cone_snd (h : IsPullback fst snd f g) : h.cone.snd = snd := /-- The cone obtained from `IsPullback fst snd f g` is a limit cone. -/ -noncomputable def isLimit (h : IsPullback fst snd f g) : IsLimit h.cone := +def isLimit (h : IsPullback fst snd f g) : IsLimit h.cone := h.isLimit'.some /-- API for PullbackCone.IsLimit.lift for `IsPullback` -/ -noncomputable def lift (hP : IsPullback fst snd f g) {W : C} (h : W ⟶ X) (k : W ⟶ Y) +def lift (hP : IsPullback fst snd f g) {W : C} (h : W ⟶ X) (k : W ⟶ Y) (w : h ≫ f = k ≫ g) : W ⟶ P := PullbackCone.IsLimit.lift hP.isLimit h k w @@ -163,7 +163,7 @@ variable {P' : C} {fst' : P' ⟶ X} {snd' : P' ⟶ Y} /-- Any object at the top left of a pullback square is isomorphic to the object at the top left of any other pullback square with the same cospan. -/ -noncomputable def isoIsPullback (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) : +def isoIsPullback (h : IsPullback fst snd f g) (h' : IsPullback fst' snd' f g) : P ≅ P' := IsLimit.conePointUniqueUpToIso h.isLimit h'.isLimit @@ -191,7 +191,7 @@ end /-- Any object at the top left of a pullback square is isomorphic to the pullback provided by the `HasLimit` API. -/ -noncomputable def isoPullback (h : IsPullback fst snd f g) [HasPullback f g] : P ≅ pullback f g := +def isoPullback (h : IsPullback fst snd f g) [HasPullback f g] : P ≅ pullback f g := (limit.isoLimitCone ⟨_, h.isLimit⟩).symm @@ -239,11 +239,11 @@ theorem cocone_inr (h : IsPushout f g inl inr) : h.cocone.inr = inr := /-- The cocone obtained from `IsPushout f g inl inr` is a colimit cocone. -/ -noncomputable def isColimit (h : IsPushout f g inl inr) : IsColimit h.cocone := +def isColimit (h : IsPushout f g inl inr) : IsColimit h.cocone := h.isColimit'.some /-- API for PushoutCocone.IsColimit.lift for `IsPushout` -/ -noncomputable def desc (hP : IsPushout f g inl inr) {W : C} (h : X ⟶ W) (k : Y ⟶ W) +def desc (hP : IsPushout f g inl inr) {W : C} (h : X ⟶ W) (k : Y ⟶ W) (w : f ≫ h = g ≫ k) : P ⟶ W := PushoutCocone.IsColimit.desc hP.isColimit h k w @@ -302,7 +302,7 @@ variable {P' : C} {inl' : X ⟶ P'} {inr' : Y ⟶ P'} /-- Any object at the bottom right of a pushout square is isomorphic to the object at the bottom right of any other pushout square with the same span. -/ -noncomputable def isoIsPushout (h : IsPushout f g inl inr) (h' : IsPushout f g inl' inr') : +def isoIsPushout (h : IsPushout f g inl inr) (h' : IsPushout f g inl' inr') : P ≅ P' := IsColimit.coconePointUniqueUpToIso h.isColimit h'.isColimit @@ -330,7 +330,7 @@ end /-- Any object at the top left of a pullback square is isomorphic to the pullback provided by the `HasLimit` API. -/ -noncomputable def isoPushout (h : IsPushout f g inl inr) [HasPushout f g] : P ≅ pushout f g := +def isoPushout (h : IsPushout f g inl inr) [HasPushout f g] : P ≅ pushout f g := (colimit.isoColimitCocone ⟨_, h.isColimit⟩).symm set_option backward.isDefEq.respectTransparency false in diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Mono.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Mono.lean index 705894aae5d3af..1474f8f608c0e6 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Mono.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Mono.lean @@ -142,7 +142,7 @@ instance mono_pullback_to_prod {C : Type*} [Category* C] {X Y Z : C} (f : X ⟶ · simpa using congrArg (fun f => f ≫ prod.snd) h⟩ /-- The pullback of `f, g` is also the pullback of `f ≫ i, g ≫ i` for any mono `i`. -/ -noncomputable def pullbackIsPullbackOfCompMono (f : X ⟶ W) (g : Y ⟶ W) (i : W ⟶ Z) [Mono i] +def pullbackIsPullbackOfCompMono (f : X ⟶ W) (g : Y ⟶ W) (i : W ⟶ Z) [Mono i] [HasPullback f g] : IsLimit (PullbackCone.mk (pullback.fst f g) (pullback.snd f g) -- Porting note: following used to be _ (show (pullback.fst f g) ≫ f ≫ i = (pullback.snd f g) ≫ g ≫ i by @@ -321,7 +321,7 @@ instance epi_coprod_to_pushout {C : Type*} [Category* C] {X Y Z : C} (f : X ⟶ · simpa using congrArg (fun f => coprod.inr ≫ f) h⟩ /-- The pushout of `f, g` is also the pullback of `h ≫ f, h ≫ g` for any epi `h`. -/ -noncomputable def pushoutIsPushoutOfEpiComp (f : X ⟶ Y) (g : X ⟶ Z) (h : W ⟶ X) [Epi h] +def pushoutIsPushoutOfEpiComp (f : X ⟶ Y) (g : X ⟶ Z) (h : W ⟶ X) [Epi h] [HasPushout f g] : IsColimit (PushoutCocone.mk (pushout.inl f g) (pushout.inr f g) (show (h ≫ f) ≫ pushout.inl f g = (h ≫ g) ≫ pushout.inr f g from by simp only [Category.assoc]; rw [cancel_epi]; exact pushout.condition)) := diff --git a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean index df7be2d7bf6cf9..d5f46a5daa5542 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/Pullback/Pasting.lean @@ -455,7 +455,7 @@ instance hasPullbackHorizPaste : HasPullback (f' ≫ f) g := } /-- The canonical isomorphism `W ×[X] (X ×[Z] Y) ≅ W ×[Z] Y` -/ -noncomputable def pullbackRightPullbackFstIso : +def pullbackRightPullbackFstIso : pullback f' (pullback.fst f g) ≅ pullback (f' ≫ f) g := IsLimit.conePointUniqueUpToIso (pasteHorizIsPullback rfl (pullback.isLimit f g) (pullback.isLimit f' (pullback.fst f g))) @@ -582,7 +582,7 @@ instance : HasPushout f (g ≫ g') := } /-- The canonical isomorphism `(Y ⨿[X] Z) ⨿[Z] W ≅ Y ⨿[X] W` -/ -noncomputable def pushoutLeftPushoutInrIso : +def pushoutLeftPushoutInrIso : pushout (pushout.inr f g) g' ≅ pushout f (g ≫ g') := IsColimit.coconePointUniqueUpToIso (pasteHorizIsPushout rfl (pushout.isColimit f g) (pushout.isColimit (pushout.inr f g) g')) @@ -650,7 +650,7 @@ instance hasPushoutVertPaste : HasPushout (f ≫ f') g := } /-- The canonical isomorphism `W ⨿[Y] (Y ⨿[X] Z) ≅ W ⨿[X] Z` -/ -noncomputable def pushoutRightPushoutInlIso : +def pushoutRightPushoutInlIso : pushout f' (pushout.inl f g) ≅ pushout (f ≫ f') g := IsColimit.coconePointUniqueUpToIso (pasteVertIsPushout rfl (pushout.isColimit f g) (pushout.isColimit f' (pushout.inl f g))) diff --git a/Mathlib/CategoryTheory/Limits/Shapes/RegularMono.lean b/Mathlib/CategoryTheory/Limits/Shapes/RegularMono.lean index 260c995a2118c9..9ef1508d2a75df 100644 --- a/Mathlib/CategoryTheory/Limits/Shapes/RegularMono.lean +++ b/Mathlib/CategoryTheory/Limits/Shapes/RegularMono.lean @@ -118,7 +118,7 @@ lemma isRegularMono_of_regularMono {f : X ⟶ Y} (h : RegularMono f) : IsRegular def IsRegularMono.getStruct (f : X ⟶ Y) [IsRegularMono f] : RegularMono f := IsRegularMono.regularMono.some -@[deprecated (since := "2025-12-01")] noncomputable alias regularMonoOfIsRegularMono := +@[deprecated (since := "2025-12-01")] alias regularMonoOfIsRegularMono := IsRegularMono.getStruct /-- An equalizer diagram gives rise to a regular monomorphism. -/ @@ -374,7 +374,7 @@ lemma isRegularEpi_of_regularEpi {f : X ⟶ Y} (h : RegularEpi f) : IsRegularEpi def IsRegularEpi.getStruct (f : X ⟶ Y) [h : IsRegularEpi f] : RegularEpi f := h.regularEpi.some -@[deprecated (since := "2025-12-01")] noncomputable alias regularEpiOfIsRegularEpi := +@[deprecated (since := "2025-12-01")] alias regularEpiOfIsRegularEpi := IsRegularEpi.getStruct /-- A coequalizer diagram gives rise to a regular epimorphism. -/ @@ -539,7 +539,7 @@ lemma isRegularEpi_iff_effectiveEpi {B X : C} (f : X ⟶ B) [HasPullback f f] : /-- Let `p : Y ⟶ X` be an effective epimorphism, `p₁ : Z ⟶ Y` and `p₂ : Z ⟶ Y` two morphisms which make `Z` the pullback of two copies of `Y` over `X`. Then, `Y ⟶ X` is the coequalizer of `p₁` and `p₂`. -/ -noncomputable def EffectiveEpiStruct.isColimitCoforkOfIsPullback +def EffectiveEpiStruct.isColimitCoforkOfIsPullback {X Y Z : C} {p : Y ⟶ X} (hp : EffectiveEpiStruct p) {p₁ p₂ : Z ⟶ Y} (sq : IsPullback p₁ p₂ p p) : IsColimit (Cofork.ofπ p sq.w) := @@ -620,7 +620,7 @@ theorem isIso_of_regularEpi_of_mono (f : X ⟶ Y) (h : RegularEpi f) [Mono f] : section /-- A regular monomorphism in `C` induces a regular epimorphism in `Cᵒᵖ`. -/ -noncomputable def RegularMono.op {X Y : C} {f : X ⟶ Y} (hf : RegularMono f) : +def RegularMono.op {X Y : C} {f : X ⟶ Y} (hf : RegularMono f) : RegularEpi f.op where W := .op hf.Z left := hf.left.op @@ -629,7 +629,7 @@ noncomputable def RegularMono.op {X Y : C} {f : X ⟶ Y} (hf : RegularMono f) : isColimit := Fork.isLimitOfιEquivIsColimitOp _ _ hf.w _ rfl hf.isLimit /-- A regular monomorphism in `Cᵒᵖ` induces a regular epimorphism in `C`. -/ -noncomputable def RegularMono.unop {X Y : Cᵒᵖ} {f : X ⟶ Y} (hf : RegularMono f) : +def RegularMono.unop {X Y : Cᵒᵖ} {f : X ⟶ Y} (hf : RegularMono f) : RegularEpi f.unop where W := hf.Z.unop left := hf.left.unop @@ -638,7 +638,7 @@ noncomputable def RegularMono.unop {X Y : Cᵒᵖ} {f : X ⟶ Y} (hf : RegularMo isColimit := Fork.isLimitOfιEquivIsColimitUnop _ _ hf.w _ rfl hf.isLimit /-- A regular epimorphism in `C` induces a regular monomorphism in `Cᵒᵖ`. -/ -noncomputable def RegularEpi.op {X Y : C} {f : X ⟶ Y} (hf : RegularEpi f) : +def RegularEpi.op {X Y : C} {f : X ⟶ Y} (hf : RegularEpi f) : RegularMono f.op where Z := .op hf.W left := hf.left.op @@ -647,7 +647,7 @@ noncomputable def RegularEpi.op {X Y : C} {f : X ⟶ Y} (hf : RegularEpi f) : isLimit := Cofork.isColimitOfπEquivIsLimitOp _ _ hf.w _ rfl hf.isColimit /-- A regular epimorphism in `Cᵒᵖ` induces a regular monomorphism in `C`. -/ -noncomputable def RegularEpi.unop {X Y : Cᵒᵖ} {f : X ⟶ Y} (hf : RegularEpi f) : +def RegularEpi.unop {X Y : Cᵒᵖ} {f : X ⟶ Y} (hf : RegularEpi f) : RegularMono f.unop where Z := hf.W.unop left := hf.left.unop diff --git a/Mathlib/CategoryTheory/Limits/WeakLimits/WeakEqualizers.lean b/Mathlib/CategoryTheory/Limits/WeakLimits/WeakEqualizers.lean index ce51e6a949d41c..02b857e2040460 100644 --- a/Mathlib/CategoryTheory/Limits/WeakLimits/WeakEqualizers.lean +++ b/Mathlib/CategoryTheory/Limits/WeakLimits/WeakEqualizers.lean @@ -38,16 +38,16 @@ variable [HasWeakEqualizer f g] /-- If a weak equalizer of `f` and `g` exists, we can access an arbitrary choice of such by saying `weakEqualizer f g`. -/ -noncomputable abbrev weakEqualizer : C := +abbrev weakEqualizer : C := weakLimit (parallelPair f g) /-- If a weak equalizer of `f` and `g` exists, we can access the morphism `weakEqualizer f g ⟶ X` by saying `weakEqualizer.ι f g`. -/ -noncomputable abbrev weakEqualizer.ι : weakEqualizer f g ⟶ X := +abbrev weakEqualizer.ι : weakEqualizer f g ⟶ X := weakLimit.π (parallelPair f g) WalkingParallelPair.zero /-- A weak equalizer cone for a parallel pair `f` and `g` -/ -noncomputable abbrev weakEqualizer.fork : Fork f g := +abbrev weakEqualizer.fork : Fork f g := weakLimit.cone (parallelPair f g) @[simp] @@ -73,7 +73,7 @@ variable {f g} /-- A morphism `k : W ⟶ X` satisfying `k ≫ f = k ≫ g` factors through the weak equalizer of `f` and `g` via `weakEqualizer.lift : W ⟶ weakEqualizer f g`. -/ -noncomputable abbrev weakEqualizer.lift {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) : +abbrev weakEqualizer.lift {W : C} (k : W ⟶ X) (h : k ≫ f = k ≫ g) : W ⟶ weakEqualizer f g := weakLimit.lift (parallelPair f g) (Fork.ofι k h) diff --git a/Mathlib/CategoryTheory/Monoidal/Closed/Ideal.lean b/Mathlib/CategoryTheory/Monoidal/Closed/Ideal.lean index 7f13bdcd60cb0a..83e9f268474675 100644 --- a/Mathlib/CategoryTheory/Monoidal/Closed/Ideal.lean +++ b/Mathlib/CategoryTheory/Monoidal/Closed/Ideal.lean @@ -246,7 +246,7 @@ This bijection has two key properties: Together these help show that `L` preserves binary products. This should be considered *internal implementation* towards `preservesBinaryProductsOfExponentialIdeal`. -/ -noncomputable def bijection (A B : C) (X : D) : +def bijection (A B : C) (X : D) : ((reflector i).obj (A ⊗ B) ⟶ X) ≃ ((reflector i).obj A ⊗ (reflector i).obj B ⟶ X) := calc _ ≃ (A ⊗ B ⟶ i.obj X) := (reflectorAdjunction i).homEquiv _ _ diff --git a/Mathlib/CategoryTheory/Monoidal/DayConvolution.lean b/Mathlib/CategoryTheory/Monoidal/DayConvolution.lean index a1f3dfdb59c13e..27e1f81558bb8e 100644 --- a/Mathlib/CategoryTheory/Monoidal/DayConvolution.lean +++ b/Mathlib/CategoryTheory/Monoidal/DayConvolution.lean @@ -1254,7 +1254,7 @@ variable {C V} in construct an `InducedLawfulDayConvolutionMonoidalCategoryStructCore` by letting all other data be the generic ones from the `HasPointwiseLeftKanExtension` API. -/ @[implicit_reducible] -noncomputable def ofHasDayConvolutions +def ofHasDayConvolutions {D : Type u₃} [Category.{v₃} D] (ι : D ⥤ C ⥤ V) (ffι : ι.FullyFaithful) @@ -1333,7 +1333,7 @@ of relevant colimits by the tensor product of `V`, we can define a `MonoidalCate from the data of a fully faithful functor `ι : D ⥤ C ⥤ V` whose essential image contains a Day convolution unit and is stable under binary Day convolutions. -/ @[implicit_reducible] -noncomputable def monoidalOfHasDayConvolutions : MonoidalCategory D := +def monoidalOfHasDayConvolutions : MonoidalCategory D := letI induced : InducedLawfulDayConvolutionMonoidalCategoryStructCore C V D := .ofHasDayConvolutions ι ffι essImageDayConvolution essImageDayConvolutionUnit letI := induced.mkMonoidalCategoryStruct @@ -1345,7 +1345,7 @@ open InducedLawfulDayConvolutionMonoidalCategoryStructCore in /-- The monoidal category constructed via `monoidalOfHasDayConvolutions` has a canonical `LawfulDayConvolutionMonoidalCategoryStruct C V D`. -/ @[implicit_reducible] -noncomputable def lawfulDayConvolutionMonoidalCategoryStructOfHasDayConvolutions : +def lawfulDayConvolutionMonoidalCategoryStructOfHasDayConvolutions : letI := monoidalOfHasDayConvolutions ι ffι essImageDayConvolution essImageDayConvolutionUnit LawfulDayConvolutionMonoidalCategoryStruct C V D := diff --git a/Mathlib/CategoryTheory/Sites/CoverLifting.lean b/Mathlib/CategoryTheory/Sites/CoverLifting.lean index 7590a8bf0ece84..196024f302c385 100644 --- a/Mathlib/CategoryTheory/Sites/CoverLifting.lean +++ b/Mathlib/CategoryTheory/Sites/CoverLifting.lean @@ -318,7 +318,7 @@ variable [G.IsContinuous J K] Given a functor between sites that is continuous and cocontinuous, the pushforward for the continuous functor `G` is left adjoint to the pushforward for the cocontinuous functor `G`. -/ -noncomputable def sheafAdjunctionCocontinuous : +def sheafAdjunctionCocontinuous : G.sheafPushforwardContinuous A J K ⊣ G.sheafPushforwardCocontinuous A J K := (G.op.ranAdjunction A).restrictFullyFaithful (fullyFaithfulSheafToPresheaf K A) (fullyFaithfulSheafToPresheaf J A) diff --git a/Mathlib/CategoryTheory/Sites/Sheaf.lean b/Mathlib/CategoryTheory/Sites/Sheaf.lean index 1ee14826e07ea4..59d87366fbb2ac 100644 --- a/Mathlib/CategoryTheory/Sites/Sheaf.lean +++ b/Mathlib/CategoryTheory/Sites/Sheaf.lean @@ -483,7 +483,7 @@ lemma Sheaf.isTerminalTerminal_from_hom {X : A} (hX : IsTerminal X) (G : Sheaf J ((Sheaf.isTerminalTerminal J hX).from G).hom = (Functor.isTerminalConst _ hX).from G.obj := rfl /-- If the topology is discrete, any sheaf is terminal. -/ -noncomputable def Sheaf.isTerminalOfEqTop (H : J = ⊤) (F : Sheaf J A) : +def Sheaf.isTerminalOfEqTop (H : J = ⊤) (F : Sheaf J A) : IsTerminal F := by refine IsTerminal.isTerminalOfObj (sheafToPresheaf _ _) _ ?_ refine Functor.isTerminal fun X ↦ Sheaf.isTerminalOfBotCover _ _ ?_ diff --git a/Mathlib/CategoryTheory/Subobject/Basic.lean b/Mathlib/CategoryTheory/Subobject/Basic.lean index 520297ad6eb9cf..d606804dd6560d 100644 --- a/Mathlib/CategoryTheory/Subobject/Basic.lean +++ b/Mathlib/CategoryTheory/Subobject/Basic.lean @@ -149,12 +149,12 @@ protected theorem lift_mk {α : Sort*} {X : C} (F : ∀ ⦃A : C⦄ (f : A ⟶ X /-- The category of subobjects is equivalent to the `MonoOver` category. It is more convenient to use the former due to the partial order instance, but oftentimes it is easier to define structures on the latter. -/ -noncomputable def equivMonoOver (X : C) : Subobject X ≌ MonoOver X := +def equivMonoOver (X : C) : Subobject X ≌ MonoOver X := ThinSkeleton.equivalence _ /-- Use choice to pick a representative `MonoOver X` for each `Subobject X`. -/ -noncomputable def representative {X : C} : Subobject X ⥤ MonoOver X := +def representative {X : C} : Subobject X ⥤ MonoOver X := (equivMonoOver X).functor instance : (representative (X := X)).IsEquivalence := @@ -164,7 +164,7 @@ instance : (representative (X := X)).IsEquivalence := then pick an arbitrary representative using `representative.obj`. This is isomorphic (in `MonoOver X`) to the original `A`. -/ -noncomputable def representativeIso {X : C} (A : MonoOver X) : +def representativeIso {X : C} (A : MonoOver X) : representative.obj ((toThinSkeleton _).obj A) ≅ A := (equivMonoOver X).counitIso.app A @@ -177,7 +177,7 @@ lemma thinSkeleton_mk_representative_eq_self {X : C} (A : Subobject X) : Prefer to use the coercion `P : C` rather than explicitly writing `underlying.obj P`. -/ -noncomputable def underlying {X : C} : Subobject X ⥤ C := +def underlying {X : C} : Subobject X ⥤ C := representative ⋙ MonoOver.forget _ ⋙ Over.forget _ instance : CoeOut (Subobject X) C where coe Y := underlying.obj Y @@ -186,12 +186,12 @@ instance : CoeOut (Subobject X) C where coe Y := underlying.obj Y then pick an arbitrary choice of underlying object `(Subobject.mk f : C)` back in `C`, it is isomorphic (in `C`) to the original `X`. -/ -noncomputable def underlyingIso {X Y : C} (f : X ⟶ Y) [Mono f] : (Subobject.mk f : C) ≅ X := +def underlyingIso {X Y : C} (f : X ⟶ Y) [Mono f] : (Subobject.mk f : C) ≅ X := (MonoOver.forget _ ⋙ Over.forget _).mapIso (representativeIso (MonoOver.mk f)) /-- The morphism in `C` from the arbitrarily chosen underlying object to the ambient object. -/ -noncomputable def arrow {X : C} (Y : Subobject X) : (Y : C) ⟶ X := +def arrow {X : C} (Y : Subobject X) : (Y : C) ⟶ X := (representative.obj Y).obj.hom instance arrow_mono {X : C} (Y : Subobject X) : Mono Y.arrow := @@ -623,7 +623,7 @@ lemma isPullback_aux (f : X ⟶ Y) (y : Subobject Y) : For instance in the category of sets, `Subobject.pullbackπ f y` is the restriction of `f` to elements of `X` that are in the preimage of `y ⊆ Y`. -/ -noncomputable def pullbackπ (f : X ⟶ Y) (y : Subobject Y) : +def pullbackπ (f : X ⟶ Y) (y : Subobject Y) : ((Subobject.pullback f).obj y : C) ⟶ (y : C) := (isPullback_aux f y).choose diff --git a/Mathlib/CategoryTheory/Subobject/Classifier/Defs.lean b/Mathlib/CategoryTheory/Subobject/Classifier/Defs.lean index bce43342532765..044abb1b8b307c 100644 --- a/Mathlib/CategoryTheory/Subobject/Classifier/Defs.lean +++ b/Mathlib/CategoryTheory/Subobject/Classifier/Defs.lean @@ -244,7 +244,7 @@ instance truthIsSplitMono : IsSplitMono (truth C) := alias _root_.CategoryTheory.HasClassifier.truthIsSplitMono := truthIsSplitMono /-- `truth C` is a regular monomorphism (because it is split). -/ -noncomputable def truthIsRegularMono : RegularMono (truth C) := +def truthIsRegularMono : RegularMono (truth C) := RegularMono.ofIsSplitMono (truth C) @[deprecated (since := "2026-03-06")] diff --git a/Mathlib/Condensed/Discrete/Colimit.lean b/Mathlib/Condensed/Discrete/Colimit.lean index 789a1ec6e5c50d..3b62959b8b283a 100644 --- a/Mathlib/Condensed/Discrete/Colimit.lean +++ b/Mathlib/Condensed/Discrete/Colimit.lean @@ -42,7 +42,7 @@ set_option backward.defeqAttrib.useBackward true in The functor `locallyConstantPresheaf` takes cofiltered limits of finite sets with surjective projection maps to colimits. -/ -noncomputable def isColimitLocallyConstantPresheaf (hc : IsLimit c) [∀ i, Epi (c.π.app i)] : +def isColimitLocallyConstantPresheaf (hc : IsLimit c) [∀ i, Epi (c.π.app i)] : IsColimit <| (locallyConstantPresheaf X).mapCocone c.op := by refine Types.FilteredColimit.isColimitOf _ _ ?_ ?_ · intro (f : LocallyConstant c.pt X) @@ -75,7 +75,7 @@ lemma isColimitLocallyConstantPresheaf_desc_apply (hc : IsLimit c) [∀ i, Epi ( rfl /-- `isColimitLocallyConstantPresheaf` in the case of `S.asLimit`. -/ -noncomputable def isColimitLocallyConstantPresheafDiagram (S : Profinite) : +def isColimitLocallyConstantPresheafDiagram (S : Profinite) : IsColimit <| (locallyConstantPresheaf X).mapCocone S.asLimitCone.op := isColimitLocallyConstantPresheaf _ _ S.asLimit @@ -210,7 +210,7 @@ def fintypeCatAsCofanIsColimit (X : Profinite) [Finite X] : variable [PreservesFiniteProducts F] -noncomputable instance (X : Profinite) [Finite X] : +instance (X : Profinite) [Finite X] : PreservesLimitsOfShape (Discrete X) F := let X' := (Countable.toSmall.{0} X).equiv_small.choose let e : X ≃ X' := (Countable.toSmall X).equiv_small.choose_spec.some @@ -329,7 +329,7 @@ set_option backward.defeqAttrib.useBackward true in The functor `locallyConstantPresheaf` takes sequential limits of finite sets with surjective projection maps to colimits. -/ -noncomputable def isColimitLocallyConstantPresheaf (hc : IsLimit c) [∀ i, Epi (c.π.app i)] : +def isColimitLocallyConstantPresheaf (hc : IsLimit c) [∀ i, Epi (c.π.app i)] : IsColimit <| (locallyConstantPresheaf X).mapCocone c.op := by refine Types.FilteredColimit.isColimitOf _ _ ?_ ?_ · intro (f : LocallyConstant c.pt X) @@ -363,7 +363,7 @@ lemma isColimitLocallyConstantPresheaf_desc_apply (hc : IsLimit c) [∀ i, Epi ( rfl /-- `isColimitLocallyConstantPresheaf` in the case of `S.asLimit`. -/ -noncomputable def isColimitLocallyConstantPresheafDiagram (S : LightProfinite) : +def isColimitLocallyConstantPresheafDiagram (S : LightProfinite) : IsColimit <| (locallyConstantPresheaf X).mapCocone (coconeRightOpOfCone S.asLimitCone) := (Functor.Final.isColimitWhiskerEquiv (opOpEquivalence ℕ).inverse _).symm (isColimitLocallyConstantPresheaf _ _ S.asLimit) @@ -504,7 +504,7 @@ def fintypeCatAsCofanIsColimit (X : LightProfinite) [Finite X] : variable [PreservesFiniteProducts F] -noncomputable instance (X : FintypeCat.{u}) : PreservesLimitsOfShape (Discrete X) F := +instance (X : FintypeCat.{u}) : PreservesLimitsOfShape (Discrete X) F := let X' := (Countable.toSmall.{0} X).equiv_small.choose let e : X ≃ X' := (Countable.toSmall X).equiv_small.choose_spec.some have : Finite X' := Finite.of_equiv X e diff --git a/Mathlib/Data/EReal/Basic.lean b/Mathlib/Data/EReal/Basic.lean index 2e8a1d014a1c2c..3780ae1c529a57 100644 --- a/Mathlib/Data/EReal/Basic.lean +++ b/Mathlib/Data/EReal/Basic.lean @@ -693,7 +693,7 @@ theorem coe_ennreal_nsmul (n : ℕ) (x : ℝ≥0∞) : (↑(n • x) : EReal) = /-! ### toENNReal -/ /-- `x.toENNReal` returns `x` if it is nonnegative, `0` otherwise. -/ -noncomputable def toENNReal (x : EReal) : ℝ≥0∞ := +def toENNReal (x : EReal) : ℝ≥0∞ := if x = ⊤ then ⊤ else ENNReal.ofReal x.toReal diff --git a/Mathlib/Data/EReal/Inv.lean b/Mathlib/Data/EReal/Inv.lean index 20f2c4bbc6a20c..3a27023078fe92 100644 --- a/Mathlib/Data/EReal/Inv.lean +++ b/Mathlib/Data/EReal/Inv.lean @@ -204,7 +204,7 @@ protected def inv : EReal → EReal instance : Inv (EReal) := ⟨EReal.inv⟩ -noncomputable instance : DivInvMonoid EReal where inv := EReal.inv +instance : DivInvMonoid EReal where inv := EReal.inv @[simp] lemma inv_bot : (⊥ : EReal)⁻¹ = 0 := rfl @@ -219,7 +219,7 @@ lemma inv_zero : (0 : EReal)⁻¹ = 0 := by change (0 : ℝ)⁻¹ = (0 : EReal) rw [GroupWithZero.inv_zero, coe_zero] -noncomputable instance : DivInvOneMonoid EReal where +instance : DivInvOneMonoid EReal where inv_one := by nth_rw 1 [← coe_one, ← coe_inv 1, _root_.inv_one, coe_one] lemma inv_neg (a : EReal) : (-a)⁻¹ = -a⁻¹ := by diff --git a/Mathlib/Data/Finsupp/Basic.lean b/Mathlib/Data/Finsupp/Basic.lean index ff4e89bf70c22e..13f0a4fd9aa951 100644 --- a/Mathlib/Data/Finsupp/Basic.lean +++ b/Mathlib/Data/Finsupp/Basic.lean @@ -1006,7 +1006,7 @@ def curryEquiv : (α × β →₀ M) ≃ (α →₀ β →₀ M) where left_inv := uncurry_curry right_inv := curry_uncurry -@[deprecated (since := "2026-01-03")] noncomputable alias finsuppProdEquiv := curryEquiv +@[deprecated (since := "2026-01-03")] alias finsuppProdEquiv := curryEquiv theorem filter_curry (f : α × β →₀ M) (p : α → Prop) [DecidablePred p] : (f.filter fun a : α × β => p a.1).curry = f.curry.filter p := by @@ -1021,7 +1021,7 @@ variable [AddZeroClass M] /-- The additive monoid isomorphism between `α × β →₀ M` and `α →₀ β →₀ M` given by currying/uncurrying. -/ @[simps! symm_apply] -noncomputable def curryAddEquiv : (α × β →₀ M) ≃+ (α →₀ β →₀ M) where +def curryAddEquiv : (α × β →₀ M) ≃+ (α →₀ β →₀ M) where __ := curryEquiv map_add' _ _ := by ext; simp @@ -1366,7 +1366,7 @@ variable {η : Type*} [Fintype η] {ιs : η → Type*} [Zero α] and `Π j, (ιs j →₀ α)`. This is the `Finsupp` version of `Equiv.Pi_curry`. -/ -noncomputable def sigmaFinsuppEquivPiFinsupp : ((Σ j, ιs j) →₀ α) ≃ ∀ j, ιs j →₀ α where +def sigmaFinsuppEquivPiFinsupp : ((Σ j, ιs j) →₀ α) ≃ ∀ j, ιs j →₀ α where toFun := split invFun f := onFinset (Finset.univ.sigma fun j => (f j).support) (fun ji => f ji.1 ji.2) fun _ hg => @@ -1388,7 +1388,7 @@ theorem sigmaFinsuppEquivPiFinsupp_apply (f : (Σ j, ιs j) →₀ α) (j i) : This is the `AddEquiv` version of `Finsupp.sigmaFinsuppEquivPiFinsupp`. -/ -noncomputable def sigmaFinsuppAddEquivPiFinsupp {α : Type*} {ιs : η → Type*} [AddMonoid α] : +def sigmaFinsuppAddEquivPiFinsupp {α : Type*} {ιs : η → Type*} [AddMonoid α] : ((Σ j, ιs j) →₀ α) ≃+ ∀ j, ιs j →₀ α := { sigmaFinsuppEquivPiFinsupp with map_add' := fun f g => by diff --git a/Mathlib/Data/Finsupp/Defs.lean b/Mathlib/Data/Finsupp/Defs.lean index 67dea8abf8c631..1d0d786a3ddb91 100644 --- a/Mathlib/Data/Finsupp/Defs.lean +++ b/Mathlib/Data/Finsupp/Defs.lean @@ -270,7 +270,7 @@ section OfSupportFinite variable [Zero M] /-- The natural `Finsupp` induced by the function `f` given that it has finite support. -/ -noncomputable def ofSupportFinite (f : α → M) (hf : (Function.support f).Finite) : α →₀ M where +def ofSupportFinite (f : α → M) (hf : (Function.support f).Finite) : α →₀ M where support := hf.toFinset toFun := f mem_support_toFun _ := hf.mem_toFinset diff --git a/Mathlib/Data/Finsupp/Option.lean b/Mathlib/Data/Finsupp/Option.lean index 53a2921070925f..b18adb260d95a4 100644 --- a/Mathlib/Data/Finsupp/Option.lean +++ b/Mathlib/Data/Finsupp/Option.lean @@ -105,7 +105,6 @@ theorem some_update_none (f : Option α →₀ M) (a : M) : /-- `Finsupp`s from `Option` are equivalent to pairs of an element and a `Finsupp` on the original type. -/ @[simps] -noncomputable def optionEquiv : (Option α →₀ M) ≃ M × (α →₀ M) where toFun P := (P none, P.some) invFun P := (P.2.embDomain .some).update none P.1 diff --git a/Mathlib/Data/Finsupp/PointwiseSMul.lean b/Mathlib/Data/Finsupp/PointwiseSMul.lean index 36dfdbab2ed44b..f3a99bb24c9f39 100644 --- a/Mathlib/Data/Finsupp/PointwiseSMul.lean +++ b/Mathlib/Data/Finsupp/PointwiseSMul.lean @@ -24,7 +24,7 @@ namespace Finsupp @[deprecated (since := "2026-02-13")] alias finite_vaddAntidiagonal := Set.SMulAntidiagonal.finite_of_finite_fst -@[deprecated (since := "2026-02-13")] noncomputable alias vaddAntidiagonal := +@[deprecated (since := "2026-02-13")] alias vaddAntidiagonal := Finset.VAddAntidiagonal @[deprecated (since := "2026-02-13")] alias mem_vaddAntidiagonal_iff := diff --git a/Mathlib/Data/Finsupp/Single.lean b/Mathlib/Data/Finsupp/Single.lean index 21adbb24170720..56e770ad251b62 100644 --- a/Mathlib/Data/Finsupp/Single.lean +++ b/Mathlib/Data/Finsupp/Single.lean @@ -243,7 +243,7 @@ theorem card_support_le_one' [Nonempty α] {f : α →₀ M} : /-- If `α` has a unique term, then finitely supported functions `α →₀ M` are in bijection with `M`. -/ @[simps] -noncomputable def uniqueEquiv (a : α) [Subsingleton α] : (α →₀ M) ≃ M where +def uniqueEquiv (a : α) [Subsingleton α] : (α →₀ M) ≃ M where toFun f := f a invFun := single a left_inv f := by ext b; simp [Subsingleton.elim b a] @@ -257,7 +257,7 @@ noncomputable def uniqueEquiv (a : α) [Subsingleton α] : (α →₀ M) ≃ M w If `α` has a unique term, the type of finitely supported functions `α →₀ β` is equivalent to `β`. -/ @[simps!, deprecated uniqueEquiv (since := "2026-05-06")] -noncomputable def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M := +def _root_.Equiv.finsuppUnique {ι : Type*} [Unique ι] : (ι →₀ M) ≃ M := Finsupp.equivFunOnFinite.trans (Equiv.funUnique ι M) @[simp] diff --git a/Mathlib/Data/Real/ConjExponents.lean b/Mathlib/Data/Real/ConjExponents.lean index e923a5955d86f6..15e1c640539455 100644 --- a/Mathlib/Data/Real/ConjExponents.lean +++ b/Mathlib/Data/Real/ConjExponents.lean @@ -399,7 +399,7 @@ protected lemma Real.HolderConjugate.toNNReal {p q : ℝ} (h : p.HolderConjugate namespace ENNReal /-- The conjugate exponent of `p` is `q = 1 + (p - 1)⁻¹`, so that `p⁻¹ + q⁻¹ = 1`. -/ -noncomputable def conjExponent (p : ℝ≥0∞) : ℝ≥0∞ := 1 + (p - 1)⁻¹ +def conjExponent (p : ℝ≥0∞) : ℝ≥0∞ := 1 + (p - 1)⁻¹ lemma coe_conjExponent {p : ℝ≥0} (hp : 1 < p) : p.conjExponent = conjExponent p := by rw [NNReal.conjExponent, conjExponent] diff --git a/Mathlib/Dynamics/SymbolicDynamics/Basic.lean b/Mathlib/Dynamics/SymbolicDynamics/Basic.lean index a4fc0e98d9f987..0ce167d394c8d5 100644 --- a/Mathlib/Dynamics/SymbolicDynamics/Basic.lean +++ b/Mathlib/Dynamics/SymbolicDynamics/Basic.lean @@ -369,7 +369,7 @@ This definition does not assume left-cancellation; it only *chooses* a preimage. Uniqueness (and the usual equations such as `Pattern.shift p v (v + w) = p.config w`) require a left-cancellation hypothesis and are proved in separate lemmas. -/] -protected noncomputable def Pattern.mulShift (p : Pattern A G) (v : G) : G → A := by +protected def Pattern.mulShift (p : Pattern A G) (v : G) : G → A := by classical intro h if hmem : h ∈ p.support.image (v * ·) then @@ -387,7 +387,7 @@ to a finite subset `U : Finset G`. The pattern has `config g = x g` for `g ∈ U` and `config g = default` outside `U`, with support `U`. In other words, `Pattern.fromConfig x U` is the partial configuration of `x` visible on the coordinates in `U`, padded with `default` elsewhere. -/ -noncomputable def fromConfig (x : G → A) (U : Finset G) : Pattern A G := by +def fromConfig (x : G → A) (U : Finset G) : Pattern A G := by classical exact { config := fun g => if g ∈ U then x g else default, support := U, diff --git a/Mathlib/FieldTheory/Finite/Extension.lean b/Mathlib/FieldTheory/Finite/Extension.lean index 299773369de76c..18d4a0e0dea513 100644 --- a/Mathlib/FieldTheory/Finite/Extension.lean +++ b/Mathlib/FieldTheory/Finite/Extension.lean @@ -63,7 +63,7 @@ theorem nonempty_algHom_extension [Algebra (ZMod p) k] : Nonempty (k →ₐ[ZMod p] Extension k p n) := nonempty_algHom_of_finrank_dvd (finrank_zmod_extension k p n ▸ dvd_mul_right _ _) -noncomputable instance : Algebra k (Extension k p n) := +instance : Algebra k (Extension k p n) := letI := ZMod.algebra k p (nonempty_algHom_extension k p n).some.toAlgebra @@ -100,7 +100,7 @@ theorem card_algEquiv_extension : Fintype.card Gal(Extension k p n / k) = n := Fintype.card_eq_nat_card.trans <| natCard_algEquiv_extension k p n /-- The Frobenius automorphism `x ↦ x ^ Nat.card k` that fixes `k`. -/ -noncomputable def Extension.frob : +def Extension.frob : Gal(Extension k p n / k) := haveI := Fintype.ofFinite k FiniteField.frobeniusAlgEquivOfAlgebraic _ _ @@ -127,7 +127,7 @@ theorem Extension.exists_frob_pow_eq (g : Gal(Extension k p n/k)) : /-- Given any field extension of finite fields `l/k` of degree `n`, we have a non-unique isomorphism between `l` and our chosen `Extension k p n`. -/ -noncomputable def algEquivExtension (l : Type*) [Field l] [Algebra k l] +def algEquivExtension (l : Type*) [Field l] [Algebra k l] (h : Module.finrank k l = n) : l ≃ₐ[k] Extension k p n := by refine Nonempty.some ?_ have : Module.Finite k l := Module.finite_of_finrank_pos <| h ▸ NeZero.pos n diff --git a/Mathlib/FieldTheory/Fixed.lean b/Mathlib/FieldTheory/Fixed.lean index aac5f0fa40dcf1..b62e2064d67293 100644 --- a/Mathlib/FieldTheory/Fixed.lean +++ b/Mathlib/FieldTheory/Fixed.lean @@ -315,7 +315,7 @@ theorem cardinalMk_algHom (K : Type u) (V : Type v) (W : Type w) [Field K] [Ring Cardinal.mk (V →ₐ[K] W) ≤ finrank W (V →ₗ[K] W) := (linearIndependent_toLinearMap K V W).cardinalMk_le_finrank -noncomputable instance AlgEquiv.fintype (K : Type u) (V : Type v) [Field K] [Field V] [Algebra K V] +instance AlgEquiv.fintype (K : Type u) (V : Type v) [Field K] [Field V] [Algebra K V] [FiniteDimensional K V] : Fintype (V ≃ₐ[K] V) := Fintype.ofEquiv (V →ₐ[K] V) (algEquivEquivAlgHom K V).symm diff --git a/Mathlib/FieldTheory/LinearDisjoint.lean b/Mathlib/FieldTheory/LinearDisjoint.lean index 5894be8689642f..5c28e8dcb1bc85 100644 --- a/Mathlib/FieldTheory/LinearDisjoint.lean +++ b/Mathlib/FieldTheory/LinearDisjoint.lean @@ -267,7 +267,7 @@ Note that the condition `A.toSubalgebra ⊔ B.toSubalgebra = ⊤` is equivalent `A ⊔ B = ⊤` in many cases, see `IntermediateField.sup_toSubalgebra_of_isAlgebraic_right` and similar results. -/ -noncomputable def basisOfBasisRight (H : A.LinearDisjoint B) +def basisOfBasisRight (H : A.LinearDisjoint B) (H' : A.toSubalgebra ⊔ B.toSubalgebra = ⊤) {ι : Type*} (b : Basis ι F B) : Basis ι A E := (linearDisjoint_iff'.mp H).basisOfBasisRight H' b @@ -290,7 +290,7 @@ Note that the condition `A.toSubalgebra ⊔ B.toSubalgebra = ⊤` is equivalent `A ⊔ B = ⊤` in many cases, see `IntermediateField.sup_toSubalgebra_of_isAlgebraic_right` and similar results. -/ -noncomputable def basisOfBasisLeft (H : A.LinearDisjoint B) +def basisOfBasisLeft (H : A.LinearDisjoint B) (H' : A.toSubalgebra ⊔ B.toSubalgebra = ⊤) {ι : Type*} (b : Basis ι F A) : Basis ι B E := (linearDisjoint_iff'.mp H).basisOfBasisLeft H' b diff --git a/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean b/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean index 98287a725d13c4..4dd50b15a7c1d4 100644 --- a/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean +++ b/Mathlib/FieldTheory/Minpoly/IsIntegrallyClosed.lean @@ -240,7 +240,7 @@ theorem _root_.Algebra.adjoin.powerBasis'_gen (hx : IsIntegral R x) : If `x` generates `S` over `R` and is integral over `R`, then it defines a power basis. See `PowerBasis.ofAdjoinEqTop` for a version over a field. -/ -noncomputable def _root_.PowerBasis.ofAdjoinEqTop' {x : S} (hx : IsIntegral R x) +def _root_.PowerBasis.ofAdjoinEqTop' {x : S} (hx : IsIntegral R x) (hx' : adjoin R {x} = ⊤) : PowerBasis R S := (adjoin.powerBasis' hx).map ((Subalgebra.equivOfEq _ _ hx').trans Subalgebra.topEquiv) diff --git a/Mathlib/FieldTheory/Normal/Basic.lean b/Mathlib/FieldTheory/Normal/Basic.lean index 96b5e118c94bab..457f155fcd10b1 100644 --- a/Mathlib/FieldTheory/Normal/Basic.lean +++ b/Mathlib/FieldTheory/Normal/Basic.lean @@ -187,7 +187,7 @@ variable (E : Type*) [Field E] [Algebra F E] [Algebra K₁ E] [Algebra K₂ E] [ /-- If `E/Kᵢ/F` are towers of fields with `E/F` normal then we can lift an algebra homomorphism `ϕ : K₁ →ₐ[F] K₂` to `ϕ.liftNormal E : E →ₐ[F] E`. -/ @[stacks 0BME "Part 2"] -noncomputable def AlgHom.liftNormal [h : Normal F E] : E →ₐ[F] E := +def AlgHom.liftNormal [h : Normal F E] : E →ₐ[F] E := @AlgHom.restrictScalars F K₁ E E _ _ _ _ _ _ ((IsScalarTower.toAlgHom F K₂ E).comp ϕ).toRingHom.toAlgebra _ _ _ _ <| Nonempty.some <| @@ -213,7 +213,7 @@ theorem AlgHom.restrict_liftNormal (ϕ : K₁ →ₐ[F] K₁) [Normal F K₁] [N /-- If `E/Kᵢ/F` are towers of fields with `E/F` normal then we can lift an algebra isomorphism `ϕ : K₁ ≃ₐ[F] K₂` to `ϕ.liftNormal E : Gal(E/F)`. -/ -noncomputable def AlgEquiv.liftNormal [Normal F E] : Gal(E/F) := +def AlgEquiv.liftNormal [Normal F E] : Gal(E/F) := AlgEquiv.ofBijective (χ.toAlgHom.liftNormal E) (AlgHom.normal_bijective F E E _) @[simp] diff --git a/Mathlib/FieldTheory/PrimitiveElement.lean b/Mathlib/FieldTheory/PrimitiveElement.lean index 7808f3e877d094..9511dc0b63d320 100644 --- a/Mathlib/FieldTheory/PrimitiveElement.lean +++ b/Mathlib/FieldTheory/PrimitiveElement.lean @@ -228,7 +228,7 @@ theorem exists_primitive_element : ∃ α : E, F⟮α⟯ = ⊤ := by a finite separable field extension has a basis `1, α, α^2, ..., α^n`. See also `exists_primitive_element`. -/ -noncomputable def powerBasisOfFiniteOfSeparable : PowerBasis F E := +def powerBasisOfFiniteOfSeparable : PowerBasis F E := let α := (exists_primitive_element F E).choose let pb := adjoin.powerBasis (Algebra.IsSeparable.isIntegral F α) have e : F⟮α⟯ = ⊤ := (exists_primitive_element F E).choose_spec diff --git a/Mathlib/FieldTheory/PurelyInseparable/PerfectClosure.lean b/Mathlib/FieldTheory/PurelyInseparable/PerfectClosure.lean index d22f0846dcb214..fd443f5fc05e6a 100644 --- a/Mathlib/FieldTheory/PurelyInseparable/PerfectClosure.lean +++ b/Mathlib/FieldTheory/PurelyInseparable/PerfectClosure.lean @@ -170,7 +170,6 @@ def perfectClosure.algEquivOfAlgEquiv (i : E ≃ₐ[F] K) : perfectClosure F E ≃ₐ[F] perfectClosure F K := (intermediateFieldMap i _).trans (equivOfEq (map_eq_of_algEquiv i)) -noncomputable alias AlgEquiv.perfectClosure := perfectClosure.algEquivOfAlgEquiv end map diff --git a/Mathlib/FieldTheory/RatFunc/AsPolynomial.lean b/Mathlib/FieldTheory/RatFunc/AsPolynomial.lean index cbd35a8c1442d5..3d282c0793c11a 100644 --- a/Mathlib/FieldTheory/RatFunc/AsPolynomial.lean +++ b/Mathlib/FieldTheory/RatFunc/AsPolynomial.lean @@ -226,7 +226,7 @@ variable {K L : Type*} [Field K] [Field L] [Algebra K L] (f : L) (h : Transcende /-- Given a transcendental `f : L`, the `K`-algebra isomorphism between `RatFunc K` and `L` given by sending `X` to `f`. -/ -noncomputable def algEquivOfTranscendental : RatFunc K ≃ₐ[K] K⟮f⟯ := +def algEquivOfTranscendental : RatFunc K ≃ₐ[K] K⟮f⟯ := IsFractionRing.algEquivOfAlgEquiv (Polynomial.algEquivOfTranscendental K f h) @[simp] diff --git a/Mathlib/Geometry/Manifold/GroupLieAlgebra.lean b/Mathlib/Geometry/Manifold/GroupLieAlgebra.lean index 0a011da1035f3d..16979273c639c9 100644 --- a/Mathlib/Geometry/Manifold/GroupLieAlgebra.lean +++ b/Mathlib/Geometry/Manifold/GroupLieAlgebra.lean @@ -59,7 +59,7 @@ abbrev GroupLieAlgebra : Type _ := TangentSpace% (1 : G) is given by the image of `v` under left-multiplication by `g`. -/ @[to_additive /-- The invariant vector field associated to a vector `v` in the Lie algebra. At a point `g`, it is given by the image of `v` under left-addition by `g`. -/] -noncomputable def mulInvariantVectorField (v : GroupLieAlgebra I G) (g : G) : TangentSpace% g := +def mulInvariantVectorField (v : GroupLieAlgebra I G) (g : G) : TangentSpace% g := mfderiv% (g * ·) (1 : G) v set_option backward.isDefEq.respectTransparency false in @@ -90,7 +90,7 @@ open VectorField taking the Lie bracket of the associated invariant vector fields, at the identity. -/ @[to_additive /-- The Lie bracket of two vectors `v` and `w` in the Lie algebra of an additive Lie group is obtained by taking the Lie bracket of the associated invariant vector fields, at zero. -/] -noncomputable instance : Bracket (GroupLieAlgebra I G) (GroupLieAlgebra I G) where +instance : Bracket (GroupLieAlgebra I G) (GroupLieAlgebra I G) where bracket v w := mlieBracket I (mulInvariantVectorField v) (mulInvariantVectorField w) (1 : G) @[to_additive] @@ -226,7 +226,7 @@ lemma mulInvariantVector_mlieBracket (v w : GroupLieAlgebra I G) : given by the Lie bracket of invariant vector fields. -/ @[to_additive /-- The tangent space at the identity of an additive Lie group is a Lie ring, for the bracket given by the Lie bracket of invariant vector fields. -/] -noncomputable instance : LieRing (GroupLieAlgebra I G) where +instance : LieRing (GroupLieAlgebra I G) where add_lie u v w := by simp only [GroupLieAlgebra.bracket_def, mulInvariantVectorField_add] rw [mlieBracket_add_left] @@ -248,7 +248,7 @@ Therefore, we state and prove by hand the additive version. -/ /-- The tangent space at the identity of an additive Lie group is a Lie algebra, for the bracket given by the Lie bracket of invariant vector fields. -/ -noncomputable instance instLieAlgebraAddGroupLieAlgebra +instance instLieAlgebraAddGroupLieAlgebra {G : Type*} [TopologicalSpace G] [ChartedSpace H G] [AddGroup G] [LieAddGroup I (minSmoothness 𝕜 3) G] : LieAlgebra 𝕜 (AddGroupLieAlgebra I G) where lie_smul c v w := by @@ -258,7 +258,7 @@ noncomputable instance instLieAlgebraAddGroupLieAlgebra /-- The tangent space at the identity of a Lie group is a Lie algebra, for the bracket given by the Lie bracket of invariant vector fields. -/ -noncomputable instance instLieAlgebraGroupLieAlgebra : LieAlgebra 𝕜 (GroupLieAlgebra I G) where +instance instLieAlgebraGroupLieAlgebra : LieAlgebra 𝕜 (GroupLieAlgebra I G) where lie_smul c v w := by simp only [GroupLieAlgebra.bracket_def, mulInvariantVectorField_smul] rw [mlieBracket_const_smul_right] diff --git a/Mathlib/Geometry/Manifold/IsManifold/Basic.lean b/Mathlib/Geometry/Manifold/IsManifold/Basic.lean index 5dc7b8202b1ab3..dc70d23be2b5b5 100644 --- a/Mathlib/Geometry/Manifold/IsManifold/Basic.lean +++ b/Mathlib/Geometry/Manifold/IsManifold/Basic.lean @@ -335,7 +335,7 @@ def ofConvexRange have : range φ = φ.target := by rw [← φ.image_source_eq_target, hsource, image_univ.symm] simp [this, hint] -@[deprecated (since := "2025-12-19")] noncomputable alias of_convex_range := +@[deprecated (since := "2025-12-19")] alias of_convex_range := ModelWithCorners.ofConvexRange theorem convex_range [NormedSpace ℝ E] : Convex ℝ (range I) := by diff --git a/Mathlib/Geometry/Manifold/Riemannian/Basic.lean b/Mathlib/Geometry/Manifold/Riemannian/Basic.lean index aca6592592b743..72c2f5e6dd504e 100644 --- a/Mathlib/Geometry/Manifold/Riemannian/Basic.lean +++ b/Mathlib/Geometry/Manifold/Riemannian/Basic.lean @@ -100,7 +100,7 @@ set_option backward.isDefEq.respectTransparency false in variable (F) in /-- The standard Riemannian metric on a vector space with an inner product, given by this inner product on each tangent space. -/ -noncomputable def riemannianMetricVectorSpace : +def riemannianMetricVectorSpace : ContMDiffRiemannianMetric 𝓘(ℝ, F) ω F (fun (x : F) ↦ TangentSpace% x) where inner x := (innerSL ℝ (E := F) : F →L[ℝ] F →L[ℝ] ℝ) symm x v w := real_inner_comm _ _ @@ -123,7 +123,7 @@ noncomputable def riemannianMetricVectorSpace : ext v w simp [hom_trivializationAt_apply, ContinuousLinearMap.inCoordinates, TangentSpace] -noncomputable instance : RiemannianBundle (fun (x : F) ↦ TangentSpace% x) := +instance : RiemannianBundle (fun (x : F) ↦ TangentSpace% x) := ⟨(riemannianMetricVectorSpace F).toRiemannianMetric⟩ set_option backward.isDefEq.respectTransparency false in @@ -521,7 +521,7 @@ additionally the predicate `IsRiemannianManifold I M`. -/ (fun _ hc ↦ eventually_riemannianEDist_lt I x hc)) @[deprecated (since := "2026-01-08")] -noncomputable alias PseudoEmetricSpace.ofRiemannianMetric := PseudoEMetricSpace.ofRiemannianMetric +alias PseudoEmetricSpace.ofRiemannianMetric := PseudoEMetricSpace.ofRiemannianMetric /-- Given a manifold with a Riemannian metric, consider the associated Riemannian distance. Then by definition the distance is the infimum of the length of paths between the points, i.e., the @@ -544,6 +544,6 @@ additionally the predicate `IsRiemannianManifold I M`. -/ EMetricSpace.ofT0PseudoEMetricSpace M @[deprecated (since := "2026-01-08")] -noncomputable alias EmetricSpace.ofRiemannianMetric := EMetricSpace.ofRiemannianMetric +alias EmetricSpace.ofRiemannianMetric := EMetricSpace.ofRiemannianMetric end diff --git a/Mathlib/Geometry/Manifold/Riemannian/PathELength.lean b/Mathlib/Geometry/Manifold/Riemannian/PathELength.lean index f41e39caaafe9b..d6627cf60c0b2e 100644 --- a/Mathlib/Geometry/Manifold/Riemannian/PathELength.lean +++ b/Mathlib/Geometry/Manifold/Riemannian/PathELength.lean @@ -205,7 +205,7 @@ variable {x y z : M} {r : ℝ≥0∞} {a b : ℝ} variable (I) in /-- The Riemannian extended distance between two points, in a manifold where the tangent spaces have an extended norm, defined as the infimum of the lengths of `C^1` paths between the points. -/ -noncomputable irreducible_def riemannianEDist (x y : M) : ℝ≥0∞ := +irreducible_def riemannianEDist (x y : M) : ℝ≥0∞ := ⨅ (γ : Path x y) (_ : CMDiff 1 γ), ∫⁻ x, ‖mfderiv% γ x 1‖ₑ /-- The Riemannian edistance is bounded above by the length of any `C^1` path from `x` to `y`. diff --git a/Mathlib/Geometry/Manifold/Sheaf/Smooth.lean b/Mathlib/Geometry/Manifold/Sheaf/Smooth.lean index 8d6122641d7aeb..0566d3703003e4 100644 --- a/Mathlib/Geometry/Manifold/Sheaf/Smooth.lean +++ b/Mathlib/Geometry/Manifold/Sheaf/Smooth.lean @@ -174,7 +174,7 @@ variable [Group G] [LieGroup I ∞ G] open Manifold in @[to_additive] -noncomputable instance (U : (Opens (TopCat.of M))ᵒᵖ) : +instance (U : (Opens (TopCat.of M))ᵒᵖ) : Group ((smoothSheaf IM I M G).presheaf.obj U) := inferInstanceAs <| Group C^∞⟮IM, (unop U : Opens M); I, G⟯ @@ -182,7 +182,7 @@ noncomputable instance (U : (Opens (TopCat.of M))ᵒᵖ) : -/ @[to_additive /-- The presheaf of smooth functions from `M` to `G`, for `G` an additive Lie group, as a presheaf of additive groups. -/] -noncomputable def smoothPresheafGroup : TopCat.Presheaf GrpCat.{u} (TopCat.of M) := +def smoothPresheafGroup : TopCat.Presheaf GrpCat.{u} (TopCat.of M) := { obj := fun U ↦ GrpCat.of ((smoothSheaf IM I M G).presheaf.obj U) map := fun h ↦ GrpCat.ofHom <| ContMDiffMap.restrictMonoidHom IM I G <| CategoryTheory.leOfHom h.unop @@ -193,7 +193,7 @@ noncomputable def smoothPresheafGroup : TopCat.Presheaf GrpCat.{u} (TopCat.of M) groups. -/ @[to_additive /-- The sheaf of smooth functions from `M` to `G`, for `G` an additive Lie group, as a sheaf of additive groups. -/] -noncomputable def smoothSheafGroup : TopCat.Sheaf GrpCat.{u} (TopCat.of M) := +def smoothSheafGroup : TopCat.Sheaf GrpCat.{u} (TopCat.of M) := { obj := smoothPresheafGroup IM I M G property := by rw [CategoryTheory.Presheaf.isSheaf_iff_isSheaf_forget _ _ (CategoryTheory.forget GrpCat)] @@ -205,7 +205,7 @@ section CommLieGroup variable [CommGroup A] [CommGroup A'] [LieGroup I ∞ A] [LieGroup I' ∞ A'] open Manifold in -@[to_additive] noncomputable instance (U : (Opens (TopCat.of M))ᵒᵖ) : +@[to_additive] instance (U : (Opens (TopCat.of M))ᵒᵖ) : CommGroup ((smoothSheaf IM I M A).presheaf.obj U) := inferInstanceAs <| CommGroup C^∞⟮IM, (unop U : Opens M); I, A⟯ @@ -213,7 +213,7 @@ open Manifold in presheaf of abelian groups. -/ @[to_additive /-- The presheaf of smooth functions from `M` to `A`, for `A` an additive abelian Lie group, as a presheaf of additive abelian groups. -/] -noncomputable def smoothPresheafCommGroup : TopCat.Presheaf CommGrpCat.{u} (TopCat.of M) := +def smoothPresheafCommGroup : TopCat.Presheaf CommGrpCat.{u} (TopCat.of M) := { obj := fun U ↦ CommGrpCat.of ((smoothSheaf IM I M A).presheaf.obj U) map := fun h ↦ CommGrpCat.ofHom <| ContMDiffMap.restrictMonoidHom IM I A <| CategoryTheory.leOfHom h.unop @@ -224,7 +224,7 @@ noncomputable def smoothPresheafCommGroup : TopCat.Presheaf CommGrpCat.{u} (TopC sheaf of abelian groups. -/ @[to_additive /-- The sheaf of smooth functions from `M` to `A`, for `A` an abelian additive Lie group, as a sheaf of abelian additive groups. -/] -noncomputable def smoothSheafCommGroup : TopCat.Sheaf CommGrpCat.{u} (TopCat.of M) := +def smoothSheafCommGroup : TopCat.Sheaf CommGrpCat.{u} (TopCat.of M) := { obj := smoothPresheafCommGroup IM I M A property := by rw [CategoryTheory.Presheaf.isSheaf_iff_isSheaf_forget _ _ @@ -238,7 +238,7 @@ open scoped Manifold in @[to_additive /-- For a manifold `M` and a smooth homomorphism `φ` between abelian additive Lie groups `A`, `A'`, the 'left-composition-by-`φ`' morphism of sheaves from `smoothSheafAddCommGroup IM I M A` to `smoothSheafAddCommGroup IM I' M A'`. -/] -noncomputable def smoothSheafCommGroup.compLeft (φ : A →* A') (hφ : CMDiff ∞ φ) : +def smoothSheafCommGroup.compLeft (φ : A →* A') (hφ : CMDiff ∞ φ) : smoothSheafCommGroup IM I M A ⟶ smoothSheafCommGroup IM I' M A' := CategoryTheory.ObjectProperty.homMk <| { app := fun _ ↦ CommGrpCat.ofHom <| ContMDiffMap.compLeftMonoidHom _ _ φ hφ diff --git a/Mathlib/Geometry/Manifold/VectorBundle/LocalFrame.lean b/Mathlib/Geometry/Manifold/VectorBundle/LocalFrame.lean index a051a620ddc6e5..c83461dc83bf24 100644 --- a/Mathlib/Geometry/Manifold/VectorBundle/LocalFrame.lean +++ b/Mathlib/Geometry/Manifold/VectorBundle/LocalFrame.lean @@ -173,7 +173,7 @@ lemma toBasisAt_coe (hs : IsLocalFrameOn I F n s u) (hx : x ∈ u) (i : ι) : /-- If `{sᵢ}` is a local frame on a vector bundle, `F` being finite-dimensional implies the indexing set being finite. -/ @[implicit_reducible] -noncomputable def fintypeOfFiniteDimensional [VectorBundle 𝕜 F V] [FiniteDimensional 𝕜 F] +def fintypeOfFiniteDimensional [VectorBundle 𝕜 F V] [FiniteDimensional 𝕜 F] (hs : IsLocalFrameOn I F n s u) (hx : x ∈ u) : Fintype ι := by have : FiniteDimensional 𝕜 (V x) := by let phi := (trivializationAt F V x).linearEquivAt 𝕜 x diff --git a/Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean b/Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean index 77cf146fd37afc..d8f7cf4db3a2ed 100644 --- a/Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean +++ b/Mathlib/GroupTheory/FreeGroup/GeneratorEquiv.lean @@ -23,7 +23,7 @@ variable {α β G H : Type*} open IsFreeGroup Module /-- `A` is a basis of the ℤ-module `FreeAbelianGroup A`. -/ -noncomputable def FreeAbelianGroup.basis (α : Type*) : Basis α ℤ (FreeAbelianGroup α) := +def FreeAbelianGroup.basis (α : Type*) : Basis α ℤ (FreeAbelianGroup α) := ⟨(FreeAbelianGroup.equivFinsupp α).toIntLinearEquiv⟩ /-- Isomorphic free abelian groups (as modules) have equivalent bases. -/ diff --git a/Mathlib/LinearAlgebra/Basis/Basic.lean b/Mathlib/LinearAlgebra/Basis/Basic.lean index 9bf07fec3e2dbe..35cc93bda51c91 100644 --- a/Mathlib/LinearAlgebra/Basis/Basic.lean +++ b/Mathlib/LinearAlgebra/Basis/Basic.lean @@ -108,7 +108,7 @@ section Mk variable (hli : LinearIndependent R v) (hsp : ⊤ ≤ span R (range v)) /-- A linear independent family of vectors spanning the whole module is a basis. -/ -protected noncomputable def mk : Basis ι R M := +protected def mk : Basis ι R M := .ofRepr { hli.repr.comp (LinearMap.id.codRestrict _ fun _ => hsp Submodule.mem_top) with invFun := Finsupp.linearCombination _ v @@ -167,7 +167,7 @@ section Span variable (hli : LinearIndependent R v) /-- A linear independent family of vectors is a basis for their span. -/ -protected noncomputable def span : Basis ι R (span R (range v)) := +protected def span : Basis ι R (span R (range v)) := Basis.mk (linearIndependent_span hli) <| by intro x _ have : ∀ i, v i ∈ span R (range v) := fun i ↦ subset_span (Set.mem_range_self _) diff --git a/Mathlib/LinearAlgebra/Basis/Defs.lean b/Mathlib/LinearAlgebra/Basis/Defs.lean index c4ff6d939ed635..18fd1424a877fe 100644 --- a/Mathlib/LinearAlgebra/Basis/Defs.lean +++ b/Mathlib/LinearAlgebra/Basis/Defs.lean @@ -672,7 +672,7 @@ theorem forall_coord_eq_zero_iff {x : M} : (∀ i, b.coord i x = 0) ↔ x = 0 := b.repr.map_eq_zero_iff /-- The sum of the coordinates of an element `m : M` with respect to a basis. -/ -noncomputable def sumCoords : M →ₗ[R] R := +def sumCoords : M →ₗ[R] R := (Finsupp.lsum ℕ fun _ => LinearMap.id) ∘ₗ (b.repr : M →ₗ[R] ι →₀ R) @[simp] diff --git a/Mathlib/LinearAlgebra/Basis/Fin.lean b/Mathlib/LinearAlgebra/Basis/Fin.lean index c2cc98a0e87750..b3ca48717a46f4 100644 --- a/Mathlib/LinearAlgebra/Basis/Fin.lean +++ b/Mathlib/LinearAlgebra/Basis/Fin.lean @@ -41,7 +41,7 @@ section Fin /-- Let `b` be a basis for a submodule `N` of `M`. If `y : M` is linear independent of `N` and `y` and `N` together span the whole of `M`, then there is a basis for `M` whose basis vectors are given by `Fin.cons y b`. -/ -noncomputable def mkFinCons {n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N) +def mkFinCons {n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R M := have span_b : N = Submodule.span R (Set.range (N.subtype ∘ b)) := by @@ -64,7 +64,7 @@ theorem coe_mkFinCons {n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R /-- Let `b` be a basis for a submodule `N ≤ O`. If `y ∈ O` is linear independent of `N` and `y` and `N` together span the whole of `O`, then there is a basis for `O` whose basis vectors are given by `Fin.cons y b`. -/ -noncomputable def mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) +def mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) (b : Basis (Fin n) R N) (hNO : N ≤ O) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R O := mkFinCons ⟨y, yO⟩ (b.map (Submodule.comapSubtypeEquivOfLe hNO).symm) @@ -82,7 +82,7 @@ theorem coe_mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) /-- Let `b` be a basis for a submodule `N` of `M`. If `y : M` is linear independent of `N` and `y` and `N` together span the whole of `M`, then there is a basis for `M` whose basis vectors are given by `Fin.snoc b y`. -/ -noncomputable def mkFinSnoc {n : ℕ} {N : Submodule R M} (b : Basis (Fin n) R N) (y : M) +def mkFinSnoc {n : ℕ} {N : Submodule R M} (b : Basis (Fin n) R N) (y : M) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R M := have span_b : N = Submodule.span R (Set.range (N.subtype ∘ b)) := by @@ -105,7 +105,7 @@ theorem coe_mkFinSnoc {n : ℕ} {N : Submodule R M} (b : Basis (Fin n) R N) (y : /-- Let `b` be a basis for a submodule `N ≤ O`. If `y ∈ O` is linear independent of `N` and `y` and `N` together span the whole of `O`, then there is a basis for `O` whose basis vectors are given by `Fin.snoc b y`. -/ -noncomputable def mkFinSnocOfLE {n : ℕ} {N O : Submodule R M} (b : Basis (Fin n) R N) +def mkFinSnocOfLE {n : ℕ} {N O : Submodule R M} (b : Basis (Fin n) R N) (hNO : N ≤ O) (y : M) (yO : y ∈ O) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R O := mkFinSnoc (b.map (Submodule.comapSubtypeEquivOfLe hNO).symm) ⟨y, yO⟩ diff --git a/Mathlib/LinearAlgebra/Determinant.lean b/Mathlib/LinearAlgebra/Determinant.lean index 8390d28ac03e97..830f82fe6fecd3 100644 --- a/Mathlib/LinearAlgebra/Determinant.lean +++ b/Mathlib/LinearAlgebra/Determinant.lean @@ -539,7 +539,7 @@ theorem LinearEquiv.coe_ofIsUnitDet {f : M →ₗ[R] M'} {v : Basis ι R M} {v' rfl /-- Builds a linear equivalence from an endomorphism whose determinant is a unit. -/ -noncomputable def LinearMap.equivOfIsUnitDet +def LinearMap.equivOfIsUnitDet [Module.Free R M] [Module.Finite R M] {f : M →ₗ[R] M} (h : IsUnit f.det) : M ≃ₗ[R] M := by diff --git a/Mathlib/LinearAlgebra/Dimension/Constructions.lean b/Mathlib/LinearAlgebra/Dimension/Constructions.lean index 349ee1030152c1..4069ed0a906149 100644 --- a/Mathlib/LinearAlgebra/Dimension/Constructions.lean +++ b/Mathlib/LinearAlgebra/Dimension/Constructions.lean @@ -439,7 +439,7 @@ open Submodule Module variable (R) in /-- The rank of a set of vectors as a natural number. -/ -protected noncomputable def Set.finrank (s : Set M) : ℕ := +protected def Set.finrank (s : Set M) : ℕ := finrank R (span R s) theorem finrank_span_le_card (s : Set M) [Fintype s] : finrank R (span R s) ≤ s.toFinset.card := @@ -570,7 +570,7 @@ variable {R V : Type*} [CommRing R] [AddCommGroup V] [Module R V] /-- Given a basis `bW` of a submodule of an `R`-module `V`, and a basis `bQ` of the quotient `V ⧸ W`, this is a basis of `V` combining `bW` and a lift of `bQ`. -/ -noncomputable def sumQuot : +def sumQuot : Basis (m ⊕ n) R V := by let b : m ⊕ n → V := Sum.elim (fun i ↦ bW i) ((Function.surjInv W.mkQ_surjective) ∘ bQ) have br : W.mkQ ∘ b ∘ Sum.inr = bQ := by diff --git a/Mathlib/LinearAlgebra/Dimension/Finite.lean b/Mathlib/LinearAlgebra/Dimension/Finite.lean index d08c8e0cf7ff44..c1a5b37330fa55 100644 --- a/Mathlib/LinearAlgebra/Dimension/Finite.lean +++ b/Mathlib/LinearAlgebra/Dimension/Finite.lean @@ -139,7 +139,7 @@ theorem Module.Basis.nonempty_fintype_index_of_rank_lt_aleph0 {ι : Type*} (b : /-- If a module has a finite dimension, all bases are indexed by a finite type. -/ @[implicit_reducible] -noncomputable def Module.Basis.fintypeIndexOfRankLtAleph0 {ι : Type*} (b : Basis ι R M) +def Module.Basis.fintypeIndexOfRankLtAleph0 {ι : Type*} (b : Basis ι R M) (h : Module.rank R M < ℵ₀) : Fintype ι := Classical.choice (b.nonempty_fintype_index_of_rank_lt_aleph0 h) @@ -267,7 +267,7 @@ theorem iSupIndep.subtype_ne_bot_le_finrank_aux /-- If `p` is an independent family of submodules of an `R`-finite module `M`, then the number of nontrivial subspaces in the family `p` is finite. -/ @[implicit_reducible] -noncomputable def iSupIndep.fintypeNeBotOfFiniteDimensional +def iSupIndep.fintypeNeBotOfFiniteDimensional {p : ι → Submodule R M} (hp : iSupIndep p) : Fintype { i : ι // p i ≠ ⊥ } := by suffices #{ i // p i ≠ ⊥ } < (ℵ₀ : Cardinal.{w}) by diff --git a/Mathlib/LinearAlgebra/Dimension/Free.lean b/Mathlib/LinearAlgebra/Dimension/Free.lean index e61fdf32557a31..1cff9c8f7a320e 100644 --- a/Mathlib/LinearAlgebra/Dimension/Free.lean +++ b/Mathlib/LinearAlgebra/Dimension/Free.lean @@ -222,7 +222,7 @@ theorem FiniteDimensional.nonempty_linearEquiv_iff_finrank_eq [Module.Finite R M variable (M M') /-- Two finite and free modules are isomorphic if they have the same (finite) rank. -/ -noncomputable def LinearEquiv.ofFinrankEq [Module.Finite R M] [Module.Finite R M'] +def LinearEquiv.ofFinrankEq [Module.Finite R M] [Module.Finite R M'] (cond : finrank R M = finrank R M') : M ≃ₗ[R] M' := Classical.choice <| FiniteDimensional.nonempty_linearEquiv_of_finrank_eq cond @@ -289,19 +289,19 @@ lemma finrank_bot_le_finrank_of_isScalarTower_of_free (S T : Type*) [Semiring S] variable (R M) /-- A finite rank free module has a basis indexed by `Fin (finrank R M)`. -/ -noncomputable def finBasis [Module.Finite R M] : +def finBasis [Module.Finite R M] : Basis (Fin (finrank R M)) R M := (Module.Free.chooseBasis R M).reindex (Fintype.equivFinOfCardEq (finrank_eq_card_chooseBasisIndex R M).symm) /-- A rank `n` free module has a basis indexed by `Fin n`. -/ -noncomputable def finBasisOfFinrankEq [Module.Finite R M] {n : ℕ} (hn : finrank R M = n) : +def finBasisOfFinrankEq [Module.Finite R M] {n : ℕ} (hn : finrank R M = n) : Basis (Fin n) R M := (finBasis R M).reindex (finCongr hn) variable {R M} /-- A free module with rank 1 has a basis with one element. -/ -noncomputable def basisUnique (ι : Type*) [Unique ι] +def basisUnique (ι : Type*) [Unique ι] (h : finrank R M = 1) : Basis ι R M := haveI : Module.Finite R M := @@ -368,7 +368,7 @@ theorem _root_.LinearMap.existsUnique_eq_smul_id_of_finrank_eq_one /-- Endomorphisms of a free module of rank one are homotheties. -/ @[simps apply] -noncomputable def _root_.LinearEquiv.smul_id_of_finrank_eq_one (d1 : Module.finrank R M = 1) : +def _root_.LinearEquiv.smul_id_of_finrank_eq_one (d1 : Module.finrank R M = 1) : R ≃ₗ[R] (M →ₗ[R] M) where toFun := fun c ↦ c • LinearMap.id map_add' c d := by ext; simp [add_smul] diff --git a/Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean b/Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean index 368c32cb3e9fed..4535bafa94bcfc 100644 --- a/Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean +++ b/Mathlib/LinearAlgebra/Dimension/StrongRankCondition.lean @@ -497,7 +497,7 @@ theorem rank_of_bijective_algebraMap {R S : Type*} [CommSemiring R] [Semiring S] /-- Given a basis of a ring over itself indexed by a type `ι`, then `ι` is `Unique`. -/ @[implicit_reducible] -noncomputable def _root_.Module.Basis.unique {ι : Type*} (b : Basis ι R R) : Unique ι := by +def _root_.Module.Basis.unique {ι : Type*} (b : Basis ι R R) : Unique ι := by have : Cardinal.mk ι = ↑(Module.finrank R R) := (Module.mk_finrank_eq_card_basis b).symm have : Subsingleton ι ∧ Nonempty ι := by simpa [Cardinal.eq_one_iff_unique] exact Nonempty.some ((unique_iff_subsingleton_and_nonempty _).2 this) @@ -511,7 +511,7 @@ theorem rank_lt_aleph0 [Module.Finite R M] : Module.rank R M < ℵ₀ := by exact (ciSup_le' fun i => linearIndependent_le_span_finset _ i.prop S hS).trans_lt natCast_lt_aleph0 -noncomputable instance {R M : Type*} [DivisionRing R] [AddCommGroup M] [Module R M] +instance {R M : Type*} [DivisionRing R] [AddCommGroup M] [Module R M] {s t : Set M} [Module.Finite R (span R t)] (hs : LinearIndepOn R id s) (hst : s ⊆ t) : Fintype (hs.extend hst) := by diff --git a/Mathlib/LinearAlgebra/DirectSum/Finsupp.lean b/Mathlib/LinearAlgebra/DirectSum/Finsupp.lean index f9f45ce304e736..741a1de0c462c2 100644 --- a/Mathlib/LinearAlgebra/DirectSum/Finsupp.lean +++ b/Mathlib/LinearAlgebra/DirectSum/Finsupp.lean @@ -53,7 +53,7 @@ namespace TensorProduct variable (ι : Type*) [DecidableEq ι] /-- The tensor product of `ι →₀ M` and `N` is linearly equivalent to `ι →₀ M ⊗[R] N` -/ -noncomputable def finsuppLeft : +def finsuppLeft : (ι →₀ M) ⊗[R] N ≃ₗ[S] ι →₀ M ⊗[R] N := AlgebraTensorModule.congr (finsuppLEquivDirectSum S M ι) (.refl R N) ≪≫ₗ directSumLeft _ S (fun _ ↦ M) N ≪≫ₗ (finsuppLEquivDirectSum _ _ ι).symm @@ -88,7 +88,7 @@ lemma finsuppLeft_symm_apply_single (i : ι) (m : M) (n : N) : variable (R S M N ι) in /-- The tensor product of `M` and `ι →₀ N` is linearly equivalent to `ι →₀ M ⊗[R] N` -/ -noncomputable def finsuppRight : +def finsuppRight : M ⊗[R] (ι →₀ N) ≃ₗ[S] ι →₀ M ⊗[R] N := AlgebraTensorModule.congr (.refl S M) (finsuppLEquivDirectSum R N ι) ≪≫ₗ directSumRight R S M (fun _ : ι ↦ N) ≪≫ₗ (finsuppLEquivDirectSum _ _ ι).symm @@ -136,7 +136,7 @@ lemma finsuppLeft'_apply (x : (ι →₀ M) ⊗[R] N) : variable (R M N ι) in /-- The tensor product of `ι →₀ R` and `N` is linearly equivalent to `ι →₀ N` -/ -noncomputable def finsuppScalarLeft : +def finsuppScalarLeft : (ι →₀ R) ⊗[R] N ≃ₗ[R] ι →₀ N := finsuppLeft R R R N ι ≪≫ₗ (Finsupp.mapRange.linearEquiv (TensorProduct.lid R N)) @@ -163,7 +163,7 @@ lemma finsuppScalarLeft_symm_apply_single (i : ι) (n : N) : variable (R S M N ι) in /-- The tensor product of `M` and `ι →₀ R` is linearly equivalent to `ι →₀ M` -/ -noncomputable def finsuppScalarRight : +def finsuppScalarRight : M ⊗[R] (ι →₀ R) ≃ₗ[S] ι →₀ M := finsuppRight R S M R ι ≪≫ₗ Finsupp.mapRange.linearEquiv (AlgebraTensorModule.rid R S M) diff --git a/Mathlib/LinearAlgebra/Dual/Lemmas.lean b/Mathlib/LinearAlgebra/Dual/Lemmas.lean index c2415b5462af86..d7de6af7e9641b 100644 --- a/Mathlib/LinearAlgebra/Dual/Lemmas.lean +++ b/Mathlib/LinearAlgebra/Dual/Lemmas.lean @@ -442,7 +442,7 @@ theorem dualAnnihilator_inj {W W' : Subspace K V} : /-- Given a subspace `W` of `V` and an element of its dual `φ`, `dualLift W φ` is an arbitrary extension of `φ` to an element of the dual of `V`. That is, `dualLift W φ` sends `w ∈ W` to `φ x` and `x` in a chosen complement of `W` to `0`. -/ -noncomputable def dualLift (W : Subspace K V) : Module.Dual K W →ₗ[K] Module.Dual K V := +def dualLift (W : Subspace K V) : Module.Dual K W →ₗ[K] Module.Dual K V := W.subtype.leftInverse.dualMap variable {W : Subspace K V} @@ -475,7 +475,7 @@ theorem dualLift_injective : Function.Injective W.dualLift := /-- The quotient by the `dualAnnihilator` of a subspace is isomorphic to the dual of that subspace. -/ -noncomputable def quotAnnihilatorEquiv (W : Subspace K V) : +def quotAnnihilatorEquiv (W : Subspace K V) : (Module.Dual K V ⧸ W.dualAnnihilator) ≃ₗ[K] Module.Dual K W := (quotEquivOfEq _ _ W.dualRestrict_ker_eq_dualAnnihilator).symm.trans <| W.dualRestrict.quotKerEquivOfSurjective dualRestrict_surjective @@ -487,7 +487,7 @@ theorem quotAnnihilatorEquiv_apply (W : Subspace K V) (φ : Module.Dual K V) : rfl /-- The natural isomorphism from the dual of a subspace `W` to `W.dualLift.range`. -/ -noncomputable def dualEquivDual (W : Subspace K V) : +def dualEquivDual (W : Subspace K V) : Module.Dual K W ≃ₗ[K] LinearMap.range W.dualLift := LinearEquiv.ofInjective _ dualLift_injective @@ -525,13 +525,13 @@ theorem dualAnnihilator_dualAnnihilator_eq (W : Subspace K V) : rwa [← OrderIso.symm_apply_eq] /-- The quotient by the dual is isomorphic to its dual annihilator. -/ -noncomputable def quotDualEquivAnnihilator (W : Subspace K V) : +def quotDualEquivAnnihilator (W : Subspace K V) : (Module.Dual K V ⧸ LinearMap.range W.dualLift) ≃ₗ[K] W.dualAnnihilator := LinearEquiv.quotEquivOfQuotEquiv <| LinearEquiv.trans W.quotAnnihilatorEquiv W.dualEquivDual open scoped Classical in /-- The quotient by a subspace is isomorphic to its dual annihilator. -/ -noncomputable def quotEquivAnnihilator (W : Subspace K V) : (V ⧸ W) ≃ₗ[K] W.dualAnnihilator := +def quotEquivAnnihilator (W : Subspace K V) : (V ⧸ W) ≃ₗ[K] W.dualAnnihilator := let φ := (Basis.ofVectorSpace K W).toDualEquiv.trans W.dualEquivDual let ψ := LinearEquiv.quotEquivOfEquiv φ (Basis.ofVectorSpace K V).toDualEquiv ψ ≪≫ₗ W.quotDualEquivAnnihilator diff --git a/Mathlib/LinearAlgebra/Finsupp/Defs.lean b/Mathlib/LinearAlgebra/Finsupp/Defs.lean index 51d89abaf6ff11..162d505486b476 100644 --- a/Mathlib/LinearAlgebra/Finsupp/Defs.lean +++ b/Mathlib/LinearAlgebra/Finsupp/Defs.lean @@ -58,7 +58,7 @@ variable [Finite α] [AddCommMonoid M] [Semiring R] [Module R M] /-- Given `Finite α`, `linearEquivFunOnFinite R` is the natural `R`-linear equivalence between `α →₀ β` and `α → β`. -/ @[simps apply] -noncomputable def linearEquivFunOnFinite : (α →₀ M) ≃ₗ[R] α → M := +def linearEquivFunOnFinite : (α →₀ M) ≃ₗ[R] α → M := { equivFunOnFinite with toFun := (⇑) map_add' := fun _ _ => rfl @@ -282,7 +282,7 @@ variable (R) in This is the `LinearEquiv` version of `Finsupp.curryEquiv`. -/ @[simps +simpRhs] -noncomputable def curryLinearEquiv : (α × β →₀ M) ≃ₗ[R] α →₀ β →₀ M where +def curryLinearEquiv : (α × β →₀ M) ≃ₗ[R] α →₀ β →₀ M where toAddEquiv := curryAddEquiv map_smul' c f := by ext; simp @@ -330,7 +330,7 @@ variable (ι : Type*) {R M : Type*} [Semiring R] [AddCommMonoid M] [Module R M] /-- If `M` is an `R`-module and `ι` is a type, then an additive endomorphism of `M` that commutes with all `R`-endomorphisms of `M` gives rise to an additive endomorphism of `ι →₀ M` that commutes with all `R`-endomorphisms of `ι →₀ M`. -/ -@[simps] noncomputable def ringHomEndFinsupp : +@[simps] def ringHomEndFinsupp : End (End R M) M →+* End (End R (ι →₀ M)) (ι →₀ M) where toFun f := { toFun := Finsupp.mapRange.addMonoidHom f @@ -352,7 +352,7 @@ variable {ι} of `ι →₀ M` that commutes with all `R`-endomorphisms of `ι →₀ M` comes from an additive endomorphism of `M` that commutes with all `R`-endomorphisms of `M`. See (15) in F4 of §28 on p.131 of [Lorenz2008]. -/ -@[simps!] noncomputable def ringEquivEndFinsupp (i : ι) : +@[simps!] def ringEquivEndFinsupp (i : ι) : End (End R M) M ≃+* End (End R (ι →₀ M)) (ι →₀ M) where __ := ringHomEndFinsupp ι invFun f := diff --git a/Mathlib/LinearAlgebra/Finsupp/LSum.lean b/Mathlib/LinearAlgebra/Finsupp/LSum.lean index 8c750fbab1c821..129428cde3b4c7 100644 --- a/Mathlib/LinearAlgebra/Finsupp/LSum.lean +++ b/Mathlib/LinearAlgebra/Finsupp/LSum.lean @@ -140,7 +140,7 @@ variable [Module S M] [SMulCommClass R S M] /-- A slight rearrangement from `lsum` gives us the bijection underlying the free-forgetful adjunction for R-modules. -/ -noncomputable def lift : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := +def lift : (X → M) ≃+ ((X →₀ R) →ₗ[R] M) := (AddEquiv.arrowCongr (Equiv.refl X) (ringLmapEquivSelf R ℕ M).toAddEquiv.symm).trans (lsum _ : _ ≃ₗ[ℕ] _).toAddEquiv @@ -156,7 +156,7 @@ set_option backward.defeqAttrib.useBackward true in /-- Given compatible `S` and `R`-module structures on `M` and a type `X`, the set of functions `X → M` is `S`-linearly equivalent to the `R`-linear maps from the free `R`-module on `X` to `M`. -/ -noncomputable def llift : (X → M) ≃ₗ[S] (X →₀ R) →ₗ[R] M := +def llift : (X → M) ≃ₗ[S] (X →₀ R) →ₗ[R] M := { lift M R X with map_smul' := by intros diff --git a/Mathlib/LinearAlgebra/Finsupp/Pi.lean b/Mathlib/LinearAlgebra/Finsupp/Pi.lean index b182855f479a7b..ad8912a66cb4bd 100644 --- a/Mathlib/LinearAlgebra/Finsupp/Pi.lean +++ b/Mathlib/LinearAlgebra/Finsupp/Pi.lean @@ -39,7 +39,7 @@ variable [AddCommMonoid M] [Semiring R] [Module R M] /-- If `α` has a unique term, then the type of finitely supported functions `α →₀ M` is `R`-linearly equivalent to `M`. -/ @[simps! apply symm_apply] -noncomputable def uniqueLinearEquiv [Subsingleton α] (a : α) : (α →₀ M) ≃ₗ[R] M where +def uniqueLinearEquiv [Subsingleton α] (a : α) : (α →₀ M) ≃ₗ[R] M where toAddEquiv := uniqueAddEquiv a map_smul' _ _ := rfl @@ -50,7 +50,7 @@ noncomputable def uniqueLinearEquiv [Subsingleton α] (a : α) : (α →₀ M) /-- If `α` has a unique term, then the type of finitely supported functions `α →₀ M` is `R`-linearly equivalent to `M`. -/ @[deprecated uniqueLinearEquiv (since := "2026-05-06")] -noncomputable def LinearEquiv.finsuppUnique (α : Type*) [Unique α] : (α →₀ M) ≃ₗ[R] M := +def LinearEquiv.finsuppUnique (α : Type*) [Unique α] : (α →₀ M) ≃ₗ[R] M := { Finsupp.equivFunOnFinite.trans (Equiv.funUnique α M) with map_add' := fun _ _ => rfl map_smul' := fun _ _ => rfl } @@ -256,7 +256,7 @@ section variable {M : Type*} [AddCommMonoid M] {X Y Z : Type*} /-- The map `(X → M) → (Y → M)` induced by a map `X → Y` between finite types. -/ -noncomputable def map [Finite X] [Finite Y] (f : X → Y) (s : X → M) : Y → M := +def map [Finite X] [Finite Y] (f : X → Y) (s : X → M) : Y → M := Finsupp.equivFunOnFinite (Finsupp.mapDomain f (Finsupp.equivFunOnFinite.symm s)) lemma map_apply_apply [Fintype X] [Finite Y] [DecidableEq Y] (f : X → Y) (s : X → M) (y : Y) : @@ -293,7 +293,7 @@ section variable (R M : Type*) [Semiring R] [AddCommMonoid M] [Module R M] {X Y Z : Type*} /-- The linear map `(X → M) →ₗ[R] (Y → M)` induced by a map `X → Y` between finite types. -/ -noncomputable def linearMap [Finite X] [Finite Y] (f : X → Y) : +def linearMap [Finite X] [Finite Y] (f : X → Y) : (X → M) →ₗ[R] (Y → M) := (((Finsupp.linearEquivFunOnFinite R M Y)).comp (Finsupp.lmapDomain M R f)).comp (Finsupp.linearEquivFunOnFinite R M X).symm.toLinearMap diff --git a/Mathlib/LinearAlgebra/Finsupp/SumProd.lean b/Mathlib/LinearAlgebra/Finsupp/SumProd.lean index 8aad66182cf555..a8db4acdb292d3 100644 --- a/Mathlib/LinearAlgebra/Finsupp/SumProd.lean +++ b/Mathlib/LinearAlgebra/Finsupp/SumProd.lean @@ -77,7 +77,7 @@ variable (R) `(Σ (j : η), ιs j) →₀ M` and `(j : η) → (ιs j →₀ M)`. This is the `LinearEquiv` version of `Finsupp.sigmaFinsuppAddEquivPiFinsupp`. -/ -noncomputable def sigmaFinsuppLEquivPiFinsupp {M : Type*} {ιs : η → Type*} [AddCommMonoid M] +def sigmaFinsuppLEquivPiFinsupp {M : Type*} {ιs : η → Type*} [AddCommMonoid M] [Module R M] : ((Σ j, ιs j) →₀ M) ≃ₗ[R] (j : _) → (ιs j →₀ M) := { sigmaFinsuppAddEquivPiFinsupp with map_smul' := fun c f => by diff --git a/Mathlib/LinearAlgebra/Finsupp/Supported.lean b/Mathlib/LinearAlgebra/Finsupp/Supported.lean index a774d2ba9954e7..d777bf6989dd89 100644 --- a/Mathlib/LinearAlgebra/Finsupp/Supported.lean +++ b/Mathlib/LinearAlgebra/Finsupp/Supported.lean @@ -265,7 +265,7 @@ theorem lmapDomain_disjoint_ker (f : α → α') {s : Set α} end LMapDomain /-- An equivalence of sets induces a linear equivalence of `Finsupp`s supported on those sets. -/ -noncomputable def congr {α' : Type*} (s : Set α) (t : Set α') (e : s ≃ t) : +def congr {α' : Type*} (s : Set α) (t : Set α') (e : s ≃ t) : supported M R s ≃ₗ[R] supported M R t := by haveI := Classical.decPred fun x => x ∈ s haveI := Classical.decPred fun x => x ∈ t diff --git a/Mathlib/LinearAlgebra/Finsupp/VectorSpace.lean b/Mathlib/LinearAlgebra/Finsupp/VectorSpace.lean index 96ece9a77addc2..3de7cc01abf3bb 100644 --- a/Mathlib/LinearAlgebra/Finsupp/VectorSpace.lean +++ b/Mathlib/LinearAlgebra/Finsupp/VectorSpace.lean @@ -39,7 +39,7 @@ variable [Semiring R] [∀ i, AddCommMonoid (M i)] [∀ i, Module R (M i)] /-- The direct sum of free modules is free. Note that while this is stated for `DFinsupp` not `DirectSum`, the types are defeq. -/ -noncomputable def basis {η : ι → Type*} (b : ∀ i, Basis (η i) R (M i)) : +def basis {η : ι → Type*} (b : ∀ i, Basis (η i) R (M i)) : Basis (Σ i, η i) R (Π₀ i, M i) := .ofRepr ((mapRange.linearEquiv fun i => (b i).repr).trans (sigmaFinsuppLequivDFinsupp R).symm) diff --git a/Mathlib/LinearAlgebra/LinearIndependent/Lemmas.lean b/Mathlib/LinearAlgebra/LinearIndependent/Lemmas.lean index ab631ec1d803f9..a980332d7adffa 100644 --- a/Mathlib/LinearAlgebra/LinearIndependent/Lemmas.lean +++ b/Mathlib/LinearAlgebra/LinearIndependent/Lemmas.lean @@ -802,7 +802,7 @@ variable {K} {s t : Set ι} /-- `LinearIndepOn.extend` adds vectors to a linear independent set `s ⊆ t` until it spans all elements of `t`. -/ -noncomputable def LinearIndepOn.extend (hs : LinearIndepOn K v s) (hst : s ⊆ t) : Set ι := +def LinearIndepOn.extend (hs : LinearIndepOn K v s) (hst : s ⊆ t) : Set ι := Classical.choose (exists_linearIndepOn_extension hs hst) theorem LinearIndepOn.extend_subset (hs : LinearIndepOn K v s) (hst : s ⊆ t) : hs.extend hst ⊆ t := diff --git a/Mathlib/LinearAlgebra/Matrix/ToLin.lean b/Mathlib/LinearAlgebra/Matrix/ToLin.lean index bbd8ec8bd71fcd..f7cbb2f4cbc3c4 100644 --- a/Mathlib/LinearAlgebra/Matrix/ToLin.lean +++ b/Mathlib/LinearAlgebra/Matrix/ToLin.lean @@ -944,7 +944,7 @@ theorem toMatrix_lsmul (x : R) : This definition is useful for doing (more) explicit computations with `LinearMap.mulLeft`, such as the trace form or norm map for algebras. -/ -noncomputable def leftMulMatrix : S →ₐ[R] Matrix m m R where +def leftMulMatrix : S →ₐ[R] Matrix m m R where toFun x := LinearMap.toMatrix b b (Algebra.lmul R S x) map_zero' := by rw [map_zero, map_zero] @@ -1073,7 +1073,6 @@ then `Basis.linearMap b₁ b₂` is the basis of `M₁ →ₗ[R] M₂` indexed b where `(i, j)` indexes the linear map that sends `b j` to `b i` and sends all other basis vectors to `0`. -/ @[simps! -isSimp repr_apply repr_symm_apply] -noncomputable def linearMap (b₁ : Basis ι₁ R M₁) (b₂ : Basis ι₂ R M₂) : Basis (ι₂ × ι₁) R (M₁ →ₗ[R] M₂) := (Matrix.stdBasis R ι₂ ι₁).map (LinearMap.toMatrix b₁ b₂).symm @@ -1099,7 +1098,6 @@ then `Basis.end b` is the basis of `Module.End R M` indexed by `ι × ι` where `(i, j)` indexes the linear map that sends `b j` to `b i` and sends all other basis vectors to `0`. -/ @[simps! -isSimp repr_apply repr_symm_apply] -noncomputable abbrev «end» (b : Basis ι R M) : Basis (ι × ι) R (Module.End R M) := b.linearMap b diff --git a/Mathlib/LinearAlgebra/Projection.lean b/Mathlib/LinearAlgebra/Projection.lean index ce2883ee8ff818..a31084be403ed3 100644 --- a/Mathlib/LinearAlgebra/Projection.lean +++ b/Mathlib/LinearAlgebra/Projection.lean @@ -135,7 +135,7 @@ See also: * `Submodule.projectionOntoL` and `Submodule.projectionL` for the continuous versions. * `Submodule.orthogonalProjection` and `Submodule.orthogonalProjectionOnto` for the projections along the orthogonal subspace. -/ -noncomputable def projection (hpq : IsCompl p q) := +def projection (hpq : IsCompl p q) := p.subtype ∘ₗ p.projectionOnto q hpq variable {p q} diff --git a/Mathlib/LinearAlgebra/RootSystem/Basic.lean b/Mathlib/LinearAlgebra/RootSystem/Basic.lean index 12e44086c77825..3178759e9ad65f 100644 --- a/Mathlib/LinearAlgebra/RootSystem/Basic.lean +++ b/Mathlib/LinearAlgebra/RootSystem/Basic.lean @@ -267,7 +267,7 @@ def mk'' : refine (coroot_eq_coreflection_of_root_eq_of_span_eq_top p root coroot hp hs hsp ?_) rw [equiv_of_mapsTo_apply, (exist_eq_reflection_of_mapsTo p root coroot i j hs).choose_spec] -@[deprecated (since := "2025-12-14")] noncomputable alias _root_.RootSystem.mk' := mk'' +@[deprecated (since := "2025-12-14")] alias _root_.RootSystem.mk' := mk'' variable {p root coroot hp hs hsp} in lemma isRootSystem_mk'' (h_int : ∀ i j, ∃ z : ℤ, z = p (root i) (coroot j)) : diff --git a/Mathlib/LinearAlgebra/TensorProduct/Basis.lean b/Mathlib/LinearAlgebra/TensorProduct/Basis.lean index d026a04c23f79c..0785f11da110cc 100644 --- a/Mathlib/LinearAlgebra/TensorProduct/Basis.lean +++ b/Mathlib/LinearAlgebra/TensorProduct/Basis.lean @@ -60,7 +60,6 @@ theorem tensorProduct_repr_tmul_apply (b : Basis ι S M) (c : Basis κ R N) (m : variable (S : Type*) [Semiring S] [Algebra R S] /-- The lift of an `R`-basis of `M` to an `S`-basis of the base change `S ⊗[R] M`. -/ -noncomputable def baseChange (b : Basis ι R M) : Basis ι S (S ⊗[R] M) := (tensorProduct (.singleton Unit S) b).reindex (Equiv.punitProd ι) diff --git a/Mathlib/MeasureTheory/Constructions/HaarToSphere.lean b/Mathlib/MeasureTheory/Constructions/HaarToSphere.lean index 63ebf1c46e112e..0c82afee184f2c 100644 --- a/Mathlib/MeasureTheory/Constructions/HaarToSphere.lean +++ b/Mathlib/MeasureTheory/Constructions/HaarToSphere.lean @@ -199,7 +199,7 @@ private lemma ball_subset_sector_of_small_epsilon /-- Lower estimate on the measure of the `ε`-cone in an `n`-dimensional normed space divided by the measure of the ball. -/ @[irreducible] -noncomputable def toSphereBallBound (n : ℕ) (ε : ℝ) : ℝ≥0 := +def toSphereBallBound (n : ℕ) (ε : ℝ) : ℝ≥0 := if n ≠ 0 ∧ 0 < ε then n * ((min (Real.toNNReal ε) 2) / 4) ^ n else 1 theorem toSphereBallBound_pos (n : ℕ) (ε : ℝ) : 0 < toSphereBallBound n ε := by diff --git a/Mathlib/MeasureTheory/Covering/Besicovitch.lean b/Mathlib/MeasureTheory/Covering/Besicovitch.lean index efe2280ce46e21..38bc12ba8e4c3e 100644 --- a/Mathlib/MeasureTheory/Covering/Besicovitch.lean +++ b/Mathlib/MeasureTheory/Covering/Besicovitch.lean @@ -236,7 +236,7 @@ variable [Nonempty β] (p : TauPackage β α) /-- Choose inductively large balls with centers that are not contained in the union of already chosen balls. This is a transfinite induction. -/ -noncomputable def index : Ordinal.{u} → β +def index : Ordinal.{u} → β | i => -- `Z` is the set of points that are covered by already constructed balls let Z := ⋃ j : { j // j < i }, ball (p.c (index j)) (p.r (index j)) @@ -263,7 +263,7 @@ def R (i : Ordinal.{u}) : ℝ := /-- Group the balls into disjoint families, by assigning to a ball the smallest color for which it does not intersect any already chosen ball of this color. -/ -noncomputable def color : Ordinal.{u} → ℕ +def color : Ordinal.{u} → ℕ | i => let A : Set ℕ := ⋃ (j : { j // j < i }) diff --git a/Mathlib/MeasureTheory/Function/L1Space/Integrable.lean b/Mathlib/MeasureTheory/Function/L1Space/Integrable.lean index cc312fd5c05404..29f645e8247c49 100644 --- a/Mathlib/MeasureTheory/Function/L1Space/Integrable.lean +++ b/Mathlib/MeasureTheory/Function/L1Space/Integrable.lean @@ -859,7 +859,7 @@ theorem memL1_smul_of_L1_withDensity {f : α → ℝ≥0} (f_meas : Measurable f variable (μ) /-- The map `u ↦ f • u` is an isometry between the `L^1` spaces for `μ.withDensity f` and `μ`. -/ -noncomputable def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) : +def withDensitySMulLI {f : α → ℝ≥0} (f_meas : Measurable f) : Lp E 1 (μ.withDensity fun x => f x) →ₗᵢ[ℝ] Lp E 1 μ where toFun u := (memL1_smul_of_L1_withDensity f_meas u).toLp _ map_add' := by diff --git a/Mathlib/MeasureTheory/Function/LpSeminorm/Defs.lean b/Mathlib/MeasureTheory/Function/LpSeminorm/Defs.lean index 74d96d2baebf72..a3e6af8f53a729 100644 --- a/Mathlib/MeasureTheory/Function/LpSeminorm/Defs.lean +++ b/Mathlib/MeasureTheory/Function/LpSeminorm/Defs.lean @@ -142,7 +142,7 @@ lemma eLpNorm_nnreal_pow_eq_lintegral {f : α → ε} {p : ℝ≥0} (hp : p ≠ and to `essSup ‖f‖ μ` for `p = ∞`. This is well-defined only if `MemLp f p μ`. Otherwise, it equals `0`. -/ -noncomputable def lpNorm (f : α → E) (p : ℝ≥0∞) (μ : Measure α) : ℝ := +def lpNorm (f : α → E) (p : ℝ≥0∞) (μ : Measure α) : ℝ := open scoped Classical in if AEStronglyMeasurable f μ then (eLpNorm f p μ).toReal else 0 end Lp diff --git a/Mathlib/MeasureTheory/Function/LpSpace/Basic.lean b/Mathlib/MeasureTheory/Function/LpSpace/Basic.lean index da03fba965ce30..a87f94889fd663 100644 --- a/Mathlib/MeasureTheory/Function/LpSpace/Basic.lean +++ b/Mathlib/MeasureTheory/Function/LpSpace/Basic.lean @@ -879,7 +879,7 @@ variable [NormedSpace ℝ E] {ν : Measure α} {c : ℝ≥0∞} /-- The canonical map from `Lᵖ ν` to `Lᵖ μ` when `μ` is bounded by a finite multiple of `ν`. This is the linear map version. Use instead the continuous linear map version `LpToLpOfMeasureLeSMul` -/ -private noncomputable def LpToLpOfMeasureLeSMulₗ (hc : c ≠ ∞) (h : μ ≤ c • ν) : +private def LpToLpOfMeasureLeSMulₗ (hc : c ≠ ∞) (h : μ ≤ c • ν) : Lp E p ν →ₗ[ℝ] Lp E p μ where toFun f := ((Lp.memLp f).of_measure_le_smul hc h).toLp f map_add' f g := by @@ -917,7 +917,7 @@ private lemma norm_LpToLpOfMeasureLeSMulₗ_apply_le /-- The canonical map from `Lᵖ ν` to `Lᵖ μ` when `μ` is bounded by a finite multiple of `ν`. -/ @[no_expose] -noncomputable def LpToLpOfMeasureLeSMul [Fact (1 ≤ p)] (hc : c ≠ ∞) (h : μ ≤ c • ν) : +def LpToLpOfMeasureLeSMul [Fact (1 ≤ p)] (hc : c ≠ ∞) (h : μ ≤ c • ν) : Lp E p ν →L[ℝ] Lp E p μ := LinearMap.mkContinuous (LpToLpOfMeasureLeSMulₗ hc h) (c.toReal ^ (1 / p).toReal) (fun _ ↦ norm_LpToLpOfMeasureLeSMulₗ_apply_le hc h) @@ -1011,17 +1011,17 @@ section Star variable {R : Type*} [NormedAddCommGroup R] [StarAddMonoid R] [NormedStarGroup R] -protected noncomputable instance {p : ℝ≥0∞} : Star (Lp R p μ) where +protected instance {p : ℝ≥0∞} : Star (Lp R p μ) where star f := ⟨star (f : α →ₘ[μ] R), by simpa [Lp.mem_Lp_iff_eLpNorm_lt_top] using Lp.eLpNorm_lt_top f⟩ lemma coeFn_star {p : ℝ≥0∞} (f : Lp R p μ) : (star f : Lp R p μ) =ᵐ[μ] star f := (f : α →ₘ[μ] R).coeFn_star -noncomputable instance {p : ℝ≥0∞} : InvolutiveStar (Lp R p μ) where +instance {p : ℝ≥0∞} : InvolutiveStar (Lp R p μ) where star_involutive _ := Subtype.ext <| star_involutive _ -noncomputable instance [TrivialStar R] {p : ℝ≥0∞} : TrivialStar (Lp R p μ) where +instance [TrivialStar R] {p : ℝ≥0∞} : TrivialStar (Lp R p μ) where star_trivial _ := Subtype.ext <| star_trivial _ end Star diff --git a/Mathlib/MeasureTheory/Function/SimpleFuncDense.lean b/Mathlib/MeasureTheory/Function/SimpleFuncDense.lean index 6e73d26a9b78c4..64a33becfb02ed 100644 --- a/Mathlib/MeasureTheory/Function/SimpleFuncDense.lean +++ b/Mathlib/MeasureTheory/Function/SimpleFuncDense.lean @@ -56,7 +56,7 @@ variable [MeasurableSpace α] [PseudoEMetricSpace α] [OpensMeasurableSpace α] /-- `nearestPtInd e N x` is the index `k` such that `e k` is the nearest point to `x` among the points `e 0`, ..., `e N`. If more than one point are at the same distance from `x`, then `nearestPtInd e N x` returns the least of their indices. -/ -noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ +def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ | 0 => const α 0 | N + 1 => piecewise (⋂ k ≤ N, { x | edist (e (N + 1)) x < edist (e k) x }) @@ -68,7 +68,7 @@ noncomputable def nearestPtInd (e : ℕ → α) : ℕ → α →ₛ ℕ /-- `nearestPt e N x` is the nearest point to `x` among the points `e 0`, ..., `e N`. If more than one point are at the same distance from `x`, then `nearestPt e N x` returns the point with the least possible index. -/ -noncomputable def nearestPt (e : ℕ → α) (N : ℕ) : α →ₛ α := +def nearestPt (e : ℕ → α) (N : ℕ) : α →ₛ α := (nearestPtInd e N).map e @[simp] @@ -119,7 +119,7 @@ variable [MeasurableSpace β] {f : β → α} /-- Approximate a measurable function by a sequence of simple functions `F n` such that `F n x ∈ s`. -/ -noncomputable def approxOn (f : β → α) (hf : Measurable f) (s : Set α) (y₀ : α) (h₀ : y₀ ∈ s) +def approxOn (f : β → α) (hf : Measurable f) (s : Set α) (y₀ : α) (h₀ : y₀ ∈ s) [SeparableSpace s] (n : ℕ) : β →ₛ α := haveI : Nonempty s := ⟨⟨y₀, h₀⟩⟩ comp (nearestPt (fun k => Nat.casesOn k y₀ ((↑) ∘ denseSeq s) : ℕ → α) n) f hf diff --git a/Mathlib/MeasureTheory/Group/Measure.lean b/Mathlib/MeasureTheory/Group/Measure.lean index 8686ad446ae983..8797a06768aa5c 100644 --- a/Mathlib/MeasureTheory/Group/Measure.lean +++ b/Mathlib/MeasureTheory/Group/Measure.lean @@ -295,7 +295,7 @@ namespace Measure /-- The measure `A ↦ μ (A⁻¹)`, where `A⁻¹` is the pointwise inverse of `A`. -/ @[to_additive /-- The measure `A ↦ μ (- A)`, where `- A` is the pointwise negation of `A`. -/] -protected noncomputable def inv [Inv G] (μ : Measure G) : Measure G := +protected def inv [Inv G] (μ : Measure G) : Measure G := Measure.map inv μ /-- A measure is invariant under negation if `- μ = μ`. Equivalently, this means that for all diff --git a/Mathlib/MeasureTheory/Integral/RieszMarkovKakutani/Basic.lean b/Mathlib/MeasureTheory/Integral/RieszMarkovKakutani/Basic.lean index 0ca50c305d8d76..decb2788eb9154 100644 --- a/Mathlib/MeasureTheory/Integral/RieszMarkovKakutani/Basic.lean +++ b/Mathlib/MeasureTheory/Integral/RieszMarkovKakutani/Basic.lean @@ -271,7 +271,7 @@ section RieszContentRegular variable [T2Space X] [LocallyCompactSpace X] /-- The content induced by the linear functional `Λ`. -/ -noncomputable def rieszContent (Λ : C_c(X, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) : Content X where +def rieszContent (Λ : C_c(X, ℝ≥0) →ₗ[ℝ≥0] ℝ≥0) : Content X where toFun := rieszContentAux Λ mono' := fun _ _ ↦ rieszContentAux_mono Λ sup_disjoint' := fun _ _ disj _ _ ↦ rieszContentAux_union Λ disj diff --git a/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean b/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean index 76562fe0173c36..51049e5127ad59 100644 --- a/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean +++ b/Mathlib/MeasureTheory/Measure/FiniteMeasure.lean @@ -851,7 +851,7 @@ variable {Ω Ω' : Type*} [MeasurableSpace Ω] [MeasurableSpace Ω'] If `f` is injective and sends each measurable set to a null-measurable set, then for each measurable set `s` we have `comap f μ s = μ (f '' s)`. Otherwise, the pullback is defined to be zero. -/ -noncomputable def comap +def comap (f : Ω → Ω') (μ : FiniteMeasure Ω') : FiniteMeasure Ω := ⟨Measure.comap f μ, by infer_instance⟩ @@ -900,7 +900,7 @@ section map variable {Ω Ω' : Type*} [MeasurableSpace Ω] [MeasurableSpace Ω'] /-- The push-forward of a finite measure by a function between measurable spaces. -/ -noncomputable def map (ν : FiniteMeasure Ω) (f : Ω → Ω') : FiniteMeasure Ω' := +def map (ν : FiniteMeasure Ω) (f : Ω → Ω') : FiniteMeasure Ω' := ⟨(ν : Measure Ω).map f, (ν : Measure Ω).isFiniteMeasure_map f⟩ @[simp] lemma toMeasure_map (ν : FiniteMeasure Ω) (f : Ω → Ω') : @@ -933,7 +933,7 @@ lemma map_apply (ν : FiniteMeasure Ω) {f : Ω → Ω'} (f_mble : Measurable f) simp [toMeasure_smul] /-- The push-forward of a finite measure by a function between measurable spaces as a linear map. -/ -noncomputable def mapHom {f : Ω → Ω'} (f_mble : Measurable f) : +def mapHom {f : Ω → Ω'} (f_mble : Measurable f) : FiniteMeasure Ω →ₗ[ℝ≥0] FiniteMeasure Ω' where toFun := fun ν ↦ ν.map f map_add' := map_add f_mble @@ -975,7 +975,7 @@ lemma continuous_map {f : Ω → Ω'} (f_cont : Continuous f) : /-- The push-forward of a finite measure by a continuous function between Borel spaces as a continuous linear map. -/ -noncomputable def mapCLM {f : Ω → Ω'} (f_cont : Continuous f) : +def mapCLM {f : Ω → Ω'} (f_cont : Continuous f) : FiniteMeasure Ω →L[ℝ≥0] FiniteMeasure Ω' where toFun := fun ν ↦ ν.map f map_add' := map_add f_cont.measurable diff --git a/Mathlib/MeasureTheory/Measure/Haar/Basic.lean b/Mathlib/MeasureTheory/Measure/Haar/Basic.lean index 0d5daf17221d2e..7db3fd62b5ebe1 100644 --- a/Mathlib/MeasureTheory/Measure/Haar/Basic.lean +++ b/Mathlib/MeasureTheory/Measure/Haar/Basic.lean @@ -91,7 +91,7 @@ namespace haar it is the smallest number of (left) translates of `V` that is necessary to cover `K`. It is defined to be 0 if no finite number of translates cover `K`. -/ @[to_additive addIndex /-- additive version of `MeasureTheory.Measure.haar.index` -/] -noncomputable def index (K V : Set G) : ℕ := +def index (K V : Set G) : ℕ := sInf <| Finset.card '' { t : Finset G | K ⊆ ⋃ g ∈ t, (fun h => g * h) ⁻¹' V } @[to_additive addIndex_empty] @@ -105,7 +105,7 @@ variable [TopologicalSpace G] The argument `K` is a (bundled) compact set, so that we can consider `prehaar K₀ U` as an element of `haarProduct` (below). -/ @[to_additive /-- additive version of `MeasureTheory.Measure.haar.prehaar` -/] -noncomputable def prehaar (K₀ U : Set G) (K : Compacts G) : ℝ := +def prehaar (K₀ U : Set G) (K : Compacts G) : ℝ := (index (K : Set G) U : ℝ) / index K₀ U @[to_additive] @@ -347,7 +347,7 @@ theorem nonempty_iInter_clPrehaar (K₀ : PositiveCompacts G) : but it can differ slightly. We do know that `haarMeasure K₀ (interior K) ≤ chaar K₀ K ≤ haarMeasure K₀ K`. -/ @[to_additive addCHaar /-- additive version of `MeasureTheory.Measure.haar.chaar` -/] -noncomputable def chaar (K₀ : PositiveCompacts G) (K : Compacts G) : ℝ := +def chaar (K₀ : PositiveCompacts G) (K : Compacts G) : ℝ := Classical.choose (nonempty_iInter_clPrehaar K₀) K @[to_additive addCHaar_mem_addHaarProduct] @@ -459,7 +459,7 @@ theorem is_left_invariant_chaar {K₀ : PositiveCompacts G} (g : G) (K : Compact /-- The function `chaar` interpreted in `ℝ≥0`, as a content -/ @[to_additive /-- additive version of `MeasureTheory.Measure.haar.haarContent` -/] -noncomputable def haarContent (K₀ : PositiveCompacts G) : Content G where +def haarContent (K₀ : PositiveCompacts G) : Content G where toFun K := ⟨chaar K₀ K, chaar_nonneg _ _⟩ mono' K₁ K₂ h := by simp only [← NNReal.coe_le_coe, NNReal.toReal, chaar_mono, h] sup_disjoint' K₁ K₂ h _h₁ h₂ := by simp only [chaar_sup_eq h]; rfl @@ -514,7 +514,7 @@ variable [TopologicalSpace G] [IsTopologicalGroup G] [MeasurableSpace G] [BorelS @[to_additive /-- The Haar measure on the locally compact additive group `G`, scaled so that `addHaarMeasure K₀ K₀ = 1`. -/] -noncomputable def haarMeasure (K₀ : PositiveCompacts G) : Measure G := +def haarMeasure (K₀ : PositiveCompacts G) : Measure G := ((haarContent K₀).measure K₀)⁻¹ • (haarContent K₀).measure @[to_additive] @@ -577,7 +577,7 @@ instance isHaarMeasure_haarMeasure (K₀ : PositiveCompacts G) : IsHaarMeasure ( /-- `haar` is some choice of a Haar measure, on a locally compact group. -/ @[to_additive /-- `addHaar` is some choice of a Haar measure, on a locally compact additive group. -/] -noncomputable abbrev haar [LocallyCompactSpace G] : Measure G := +abbrev haar [LocallyCompactSpace G] : Measure G := haarMeasure <| Classical.arbitrary _ /-! Steinhaus theorem: if `E` has positive measure, then `E / E` contains a neighborhood of zero. diff --git a/Mathlib/MeasureTheory/Measure/MeasureSpace.lean b/Mathlib/MeasureTheory/Measure/MeasureSpace.lean index 11af89700356d5..a9a5859c9d84ec 100644 --- a/Mathlib/MeasureTheory/Measure/MeasureSpace.lean +++ b/Mathlib/MeasureTheory/Measure/MeasureSpace.lean @@ -1298,7 +1298,7 @@ section Sum variable {f : ι → Measure α} /-- Sum of an indexed family of measures. -/ -noncomputable def sum (f : ι → Measure α) : Measure α := +def sum (f : ι → Measure α) : Measure α := (OuterMeasure.sum fun i => (f i).toOuterMeasure).toMeasure <| le_trans (le_iInf fun _ => le_toOuterMeasure_caratheodory _) (OuterMeasure.le_sum_caratheodory _) diff --git a/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean b/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean index 6546d9f12b53b9..2b274ada218843 100644 --- a/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean +++ b/Mathlib/MeasureTheory/Measure/ProbabilityMeasure.lean @@ -603,7 +603,7 @@ variable {Ω Ω' : Type*} [MeasurableSpace Ω] [MeasurableSpace Ω'] namespace ProbabilityMeasure /-- The push-forward of a probability measure by a measurable function. -/ -noncomputable def map (ν : ProbabilityMeasure Ω) {f : Ω → Ω'} (f_aemble : AEMeasurable f ν) : +def map (ν : ProbabilityMeasure Ω) {f : Ω → Ω'} (f_aemble : AEMeasurable f ν) : ProbabilityMeasure Ω' := ⟨(ν : Measure Ω).map f, (ν : Measure Ω).isProbabilityMeasure_map f_aemble⟩ diff --git a/Mathlib/MeasureTheory/Measure/Prod.lean b/Mathlib/MeasureTheory/Measure/Prod.lean index 2f3c5ca3e1db60..e308434b7c4328 100644 --- a/Mathlib/MeasureTheory/Measure/Prod.lean +++ b/Mathlib/MeasureTheory/Measure/Prod.lean @@ -511,7 +511,7 @@ lemma nullMeasurable_comp_snd [NeZero μ] {f : β → γ} : forall₂_congr fun s _ ↦ nullMeasurableSet_preimage_snd (t := f ⁻¹' s) /-- `μ.prod ν` has finite spanning sets in rectangles of finite spanning sets. -/ -noncomputable def FiniteSpanningSetsIn.prod {ν : Measure β} {C : Set (Set α)} {D : Set (Set β)} +def FiniteSpanningSetsIn.prod {ν : Measure β} {C : Set (Set α)} {D : Set (Set β)} (hμ : μ.FiniteSpanningSetsIn C) (hν : ν.FiniteSpanningSetsIn D) : (μ.prod ν).FiniteSpanningSetsIn (image2 (· ×ˢ ·) C D) := by haveI := hν.sigmaFinite @@ -1083,7 +1083,7 @@ namespace Measure variable {ρ : Measure (α × β)} /-- Marginal measure on `α` obtained from a measure `ρ` on `α × β`, defined by `ρ.map Prod.fst`. -/ -noncomputable def fst (ρ : Measure (α × β)) : Measure α := +def fst (ρ : Measure (α × β)) : Measure α := ρ.map Prod.fst theorem fst_apply {s : Set α} (hs : MeasurableSet s) : ρ.fst s = ρ (Prod.fst ⁻¹' s) := by @@ -1145,7 +1145,7 @@ lemma fst_sum {ι : Type*} (μ : ι → Measure (α × β)) : (sum μ).fst = sum theorem fst_mono {μ : Measure (α × β)} (h : ρ ≤ μ) : ρ.fst ≤ μ.fst := map_mono h measurable_fst /-- Marginal measure on `β` obtained from a measure on `ρ` `α × β`, defined by `ρ.map Prod.snd`. -/ -noncomputable def snd (ρ : Measure (α × β)) : Measure β := +def snd (ρ : Measure (α × β)) : Measure β := ρ.map Prod.snd theorem snd_apply {s : Set β} (hs : MeasurableSet s) : ρ.snd s = ρ (Prod.snd ⁻¹' s) := by diff --git a/Mathlib/MeasureTheory/Measure/Stieltjes.lean b/Mathlib/MeasureTheory/Measure/Stieltjes.lean index abbd8b02fc8ddc..e4d778b7ef5c3d 100644 --- a/Mathlib/MeasureTheory/Measure/Stieltjes.lean +++ b/Mathlib/MeasureTheory/Measure/Stieltjes.lean @@ -214,7 +214,7 @@ instance : Module ℝ≥0 (StieltjesFunction R) where /-- If a function `f : R → ℝ` is monotone, then the function mapping `x` to the right limit of `f` at `x` is a Stieltjes function, i.e., it is monotone and right-continuous. -/ -noncomputable def _root_.Monotone.stieltjesFunction [OrderTopology R] +def _root_.Monotone.stieltjesFunction [OrderTopology R] {f : R → ℝ} (hf : Monotone f) : StieltjesFunction R where toFun := rightLim f mono' _ _ hxy := hf.rightLim hxy diff --git a/Mathlib/NumberTheory/Cyclotomic/Basic.lean b/Mathlib/NumberTheory/Cyclotomic/Basic.lean index 7e7c1e70257a3b..7840e396f88163 100644 --- a/Mathlib/NumberTheory/Cyclotomic/Basic.lean +++ b/Mathlib/NumberTheory/Cyclotomic/Basic.lean @@ -599,7 +599,7 @@ theorem isAbelianGalois [IsCyclotomicExtension S K L] : __ := isMulCommutative S K L /-- Any two `S`-cyclotomic extensions are isomorphic. -/ -noncomputable def algEquiv [IsCyclotomicExtension S K L] +def algEquiv [IsCyclotomicExtension S K L] (L' : Type*) [Field L'] [Algebra K L'] [IsCyclotomicExtension S K L'] : L ≃ₐ[K] L' := (nonempty_algEquiv_adjoin_of_isSepClosed S K L (AlgebraicClosure K)).some.trans (nonempty_algEquiv_adjoin_of_isSepClosed S K L' (AlgebraicClosure K)).some.symm diff --git a/Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean b/Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean index f666358b220b7f..0548e9ca5a2f00 100644 --- a/Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean +++ b/Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean @@ -580,7 +580,7 @@ lemma differentiableAt_update_of_residue /-- The even part of the Hurwitz zeta function, i.e. the meromorphic function of `s` which agrees with `1 / 2 * ∑' (n : ℤ), 1 / |n + a| ^ s` for `1 < re s` -/ -noncomputable def hurwitzZetaEven (a : UnitAddCircle) := +def hurwitzZetaEven (a : UnitAddCircle) := Function.update (fun s ↦ completedHurwitzZetaEven a s / Gammaℝ s) 0 (if a = 0 then -1 / 2 else 0) @@ -694,7 +694,7 @@ lemma hasSum_nat_hurwitzZetaEven_of_mem_Icc {a : ℝ} (ha : a ∈ Icc 0 1) {s : /-- The cosine zeta function, i.e. the meromorphic function of `s` which agrees with `∑' (n : ℕ), cos (2 * π * a * n) / n ^ s` for `1 < re s`. -/ -noncomputable def cosZeta (a : UnitAddCircle) := +def cosZeta (a : UnitAddCircle) := Function.update (fun s : ℂ ↦ completedCosZeta a s / Gammaℝ s) 0 (-1 / 2) lemma cosZeta_apply_zero (a : UnitAddCircle) : cosZeta a 0 = -1 / 2 := diff --git a/Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean b/Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean index 8a2e6b51e1118c..75217bc16b0225 100644 --- a/Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean +++ b/Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean @@ -455,7 +455,7 @@ lemma hasSum_int_completedHurwitzZetaOdd (a : ℝ) {s : ℂ} (hs : 1 < re s) : /-- The odd part of the Hurwitz zeta function, i.e. the meromorphic function of `s` which agrees with `1 / 2 * ∑' (n : ℤ), sign (n + a) / |n + a| ^ s` for `1 < re s` -/ -noncomputable def hurwitzZetaOdd (a : UnitAddCircle) (s : ℂ) := +def hurwitzZetaOdd (a : UnitAddCircle) (s : ℂ) := completedHurwitzZetaOdd a s / Gammaℝ (s + 1) lemma hurwitzZetaOdd_neg (a : UnitAddCircle) (s : ℂ) : @@ -470,7 +470,7 @@ lemma differentiable_hurwitzZetaOdd (a : UnitAddCircle) : /-- The sine zeta function, i.e. the meromorphic function of `s` which agrees with `∑' (n : ℕ), sin (2 * π * a * n) / n ^ s` for `1 < re s`. -/ -noncomputable def sinZeta (a : UnitAddCircle) (s : ℂ) := +def sinZeta (a : UnitAddCircle) (s : ℂ) := completedSinZeta a s / Gammaℝ (s + 1) lemma sinZeta_neg (a : UnitAddCircle) (s : ℂ) : diff --git a/Mathlib/NumberTheory/ModularForms/Basic.lean b/Mathlib/NumberTheory/ModularForms/Basic.lean index adb231dd128cb8..79870583e249b3 100644 --- a/Mathlib/NumberTheory/ModularForms/Basic.lean +++ b/Mathlib/NumberTheory/ModularForms/Basic.lean @@ -687,7 +687,7 @@ variable {k : ℤ} {Γ : Subgroup (GL (Fin 2) ℝ)} {F : Type*} [FunLike F ℍ open ConjAct Pointwise in /-- Translating a `ModularForm` by `GL(2, ℝ)`, to obtain a new `ModularForm`. -/ -noncomputable def ModularForm.translate [ModularFormClass F Γ k] (g : GL (Fin 2) ℝ) : +def ModularForm.translate [ModularFormClass F Γ k] (g : GL (Fin 2) ℝ) : ModularForm (toConjAct g⁻¹ • Γ) k where __ := SlashInvariantForm.translate f g bdd_at_cusps' {c} hc γ hγ := by @@ -704,7 +704,7 @@ lemma ModularForm.coe_translate [ModularFormClass F Γ k] (g : GL (Fin 2) ℝ) : open ConjAct Pointwise in /-- Translating a `CuspForm` by `SL(2, ℤ)`, to obtain a new `CuspForm`. -/ -noncomputable def CuspForm.translate [CuspFormClass F Γ k] (g : GL (Fin 2) ℝ) : +def CuspForm.translate [CuspFormClass F Γ k] (g : GL (Fin 2) ℝ) : CuspForm (toConjAct g⁻¹ • Γ) k where __ := ModularForm.translate f g zero_at_cusps' {c} hc γ hγ := by diff --git a/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean b/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean index 2f1efe31a9068a..c70fb2e25558db 100644 --- a/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean +++ b/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Basic.lean @@ -40,7 +40,7 @@ def eisensteinSeriesMF {k : ℤ} {N : ℕ} [NeZero N] (hk : 3 ≤ k) (a : Fin 2 rw [OnePoint.isBoundedAt_iff_forall_SL2Z hc] exact fun γ hγ ↦ isBoundedAtImInfty_eisensteinSeriesSIF a hk γ -@[deprecated (since := "2026-02-10")] noncomputable alias eisensteinSeries_MF := eisensteinSeriesMF +@[deprecated (since := "2026-02-10")] alias eisensteinSeries_MF := eisensteinSeriesMF /-- Normalised Eisenstein series of level 1 and weight `k`, here they have been scaled by `1/2` since we sum over coprime pairs. -/ diff --git a/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Defs.lean b/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Defs.lean index 510b6f87e8faaa..0d93bd3e4b97f2 100644 --- a/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Defs.lean +++ b/Mathlib/NumberTheory/ModularForms/EisensteinSeries/Defs.lean @@ -222,7 +222,7 @@ def eisensteinSeriesSIF (k : ℤ) : SlashInvariantForm (Gamma N) k where simp [SpecialLinearGroup.mapGL, ← SL_slash, eisensteinSeries_slash_apply, Gamma_mem'.mp hA] @[deprecated (since := "2026-02-10")] -noncomputable alias eisensteinSeries_SIF := eisensteinSeriesSIF +alias eisensteinSeries_SIF := eisensteinSeriesSIF lemma eisensteinSeriesSIF_apply (k : ℤ) (z : ℍ) : eisensteinSeriesSIF a k z = eisensteinSeries a k z := rfl diff --git a/Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean b/Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean index 7b811a0b046993..08491d5c5fdd14 100644 --- a/Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean +++ b/Mathlib/NumberTheory/ModularForms/SlashInvariantForms.lean @@ -296,7 +296,7 @@ theorem coe_intCast [Γ.HasDetPlusMinusOne] (z : ℤ) : ⇑(z : SlashInvariantFo open ConjAct Pointwise in /-- Translating a `SlashInvariantForm` by `g : GL (Fin 2) ℝ`, to obtain a new `SlashInvariantForm` of level `g⁻¹ Γ g`. -/ -noncomputable def translate [SlashInvariantFormClass F Γ k] (f : F) (g : GL (Fin 2) ℝ) : +def translate [SlashInvariantFormClass F Γ k] (f : F) (g : GL (Fin 2) ℝ) : SlashInvariantForm (toConjAct g⁻¹ • Γ) k where toFun := f ∣[k] g slash_action_eq' j hj := by diff --git a/Mathlib/NumberTheory/NumberField/CanonicalEmbedding/PolarCoord.lean b/Mathlib/NumberTheory/NumberField/CanonicalEmbedding/PolarCoord.lean index a01452ffe40947..12f67aa6d51d59 100644 --- a/Mathlib/NumberTheory/NumberField/CanonicalEmbedding/PolarCoord.lean +++ b/Mathlib/NumberTheory/NumberField/CanonicalEmbedding/PolarCoord.lean @@ -70,7 +70,7 @@ abbrev realMixedSpace := The natural homeomorphism between the mixed space `ℝ^r₁ × ℂ^r₂` and the real mixed space `ℝ^r₁ × (ℝ × ℝ)^r₂`. -/ -noncomputable def mixedSpaceToRealMixedSpace : mixedSpace K ≃ₜ realMixedSpace K := +def mixedSpaceToRealMixedSpace : mixedSpace K ≃ₜ realMixedSpace K := (Homeomorph.refl _).prodCongr <| .piCongrRight fun _ ↦ Complex.equivRealProdCLM.toHomeomorph @[simp] diff --git a/Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean b/Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean index c9a4d626332a35..503733e71cf2f6 100644 --- a/Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean +++ b/Mathlib/NumberTheory/NumberField/Units/DirichletTheorem.lean @@ -170,7 +170,7 @@ theorem log_le_of_logEmbedding_le {r : ℝ} {x : (𝓞 K)ˣ} (hr : 0 ≤ r) variable (K) /-- The lattice formed by the image of the logarithmic embedding. -/ -noncomputable def _root_.NumberField.Units.unitLattice : +def _root_.NumberField.Units.unitLattice : Submodule ℤ (logSpace K) := Submodule.map (logEmbedding K).toIntLinearMap ⊤ diff --git a/Mathlib/NumberTheory/Padics/PadicNumbers.lean b/Mathlib/NumberTheory/Padics/PadicNumbers.lean index 0308dc88ff0d0c..ab6a4921198296 100644 --- a/Mathlib/NumberTheory/Padics/PadicNumbers.lean +++ b/Mathlib/NumberTheory/Padics/PadicNumbers.lean @@ -1178,7 +1178,7 @@ open WithZero open scoped Classical in /-- The `p`-adic valuation on `ℚ_[p]`, as a `Valuation`, bundled `Padic.valuation`. -/ @[simps] -noncomputable def mulValuation : Valuation ℚ_[p] ℤᵐ⁰ where +def mulValuation : Valuation ℚ_[p] ℤᵐ⁰ where toFun x := if x = 0 then 0 else exp (-x.valuation) map_zero' := by simp map_one' := by simp diff --git a/Mathlib/NumberTheory/Padics/RingHoms.lean b/Mathlib/NumberTheory/Padics/RingHoms.lean index 7c697875793946..c5ada8a92b60b7 100644 --- a/Mathlib/NumberTheory/Padics/RingHoms.lean +++ b/Mathlib/NumberTheory/Padics/RingHoms.lean @@ -351,7 +351,7 @@ def residueField : IsLocalRing.ResidueField ℤ_[p] ≃+* ZMod p := open scoped Classical in /-- `appr n x` gives a value `v : ℕ` such that `x` and `↑v : ℤ_p` are congruent mod `p^n`. See `appr_spec`. -/ -noncomputable def appr : ℤ_[p] → ℕ → ℕ +def appr : ℤ_[p] → ℕ → ℕ | _x, 0 => 0 | x, n + 1 => let y := x - appr x n diff --git a/Mathlib/RepresentationTheory/Coinduced.lean b/Mathlib/RepresentationTheory/Coinduced.lean index 44a3d67e79da9e..64bdcc3c456109 100644 --- a/Mathlib/RepresentationTheory/Coinduced.lean +++ b/Mathlib/RepresentationTheory/Coinduced.lean @@ -209,7 +209,7 @@ noncomputable section CoindIso such that for all `g : G`, `h : H`, `f (φ g * h) = A.ρ g (f h)`, is `k`-linearly equivalent to the `G`-representation morphisms `k[H] ⟶ A`. -/ @[simps] -noncomputable def coindVEquiv : +def coindVEquiv : A.ρ.coindV φ ≃ₗ[k] (res φ (leftRegular k H) ⟶ A) where toFun f := Rep.ofHom ⟨linearCombination _ f.1 ∘ₗ (MonoidAlgebra.coeffLinearEquiv _).toLinearMap, fun g ↦ by dsimp; ext; simp [f.2 g]⟩ @@ -224,14 +224,14 @@ noncomputable def coindVEquiv : /-- `coind φ A` and `coind' φ A` are isomorphic representations, with the underlying `k`-linear equivalence given by `coindVEquiv`. -/ -noncomputable def coindIso : coind φ A ≅ coind' φ A := +def coindIso : coind φ A ≅ coind' φ A := Rep.mkIso <| .mk (coindVEquiv φ A) fun h => by ext; simp [homEquiv] /-- Given a monoid homomorphism `φ : G →* H`, the coinduction functors `Rep k G ⥤ Rep k H` given by `coindFunctor k φ` and `coindFunctor' k φ` are naturally isomorphic, with isomorphism on objects given by `coindIso φ`. -/ @[simps!] -noncomputable def coindFunctorIso : coindFunctor k φ ≅ coindFunctor' k φ := +def coindFunctorIso : coindFunctor k φ ≅ coindFunctor' k φ := NatIso.ofComponents (coindIso φ) fun _ => by ext exact coind'_ext _ fun _ ↦ by simp [coindIso, coindMap'] @@ -294,16 +294,16 @@ but removing it seems to be harmless. -/ variable (k) in /-- Given a monoid homomorphism `φ : G →* H`, the coinduction functor `Rep k G ⥤ Rep k H` is right adjoint to the restriction functor along `φ`. -/ -noncomputable abbrev resCoindAdjunction : resFunctor.{max w t} φ ⊣ coindFunctor k φ := +abbrev resCoindAdjunction : resFunctor.{max w t} φ ⊣ coindFunctor k φ := Adjunction.mkOfHomEquiv { homEquiv X Y := (resCoindHomEquiv φ X Y).toEquiv homEquiv_naturality_left_symm := by intros; rfl homEquiv_naturality_right := by intros; ext; rfl } -noncomputable instance : (coindFunctor.{max w t} k φ).IsRightAdjoint := +instance : (coindFunctor.{max w t} k φ).IsRightAdjoint := (resCoindAdjunction k φ).isRightAdjoint -noncomputable instance : (resFunctor.{max w t} (k := k) φ).IsLeftAdjoint := +instance : (resFunctor.{max w t} (k := k) φ).IsLeftAdjoint := (resCoindAdjunction k φ).isLeftAdjoint instance {G : Type w} [Group G] (S : Subgroup G) : diff --git a/Mathlib/RepresentationTheory/Homological/GroupCohomology/Basic.lean b/Mathlib/RepresentationTheory/Homological/GroupCohomology/Basic.lean index 26589cea82c1a9..6462ddde36752b 100644 --- a/Mathlib/RepresentationTheory/Homological/GroupCohomology/Basic.lean +++ b/Mathlib/RepresentationTheory/Homological/GroupCohomology/Basic.lean @@ -120,7 +120,7 @@ set_option backward.isDefEq.respectTransparency false in /-- Given a `k`-linear `G`-representation `A`, this is the complex of inhomogeneous cochains $$0 \to \mathrm{Fun}(G^0, A) \to \mathrm{Fun}(G^1, A) \to \mathrm{Fun}(G^2, A) \to \dots$$ which calculates the group cohomology of `A`. -/ -noncomputable abbrev inhomogeneousCochains : CochainComplex (ModuleCat k) ℕ := +abbrev inhomogeneousCochains : CochainComplex (ModuleCat k) ℕ := CochainComplex.of (fun n => ModuleCat.of k ((Fin n → G) → A)) (fun n => inhomogeneousCochains.d A n) fun n => by classical diff --git a/Mathlib/RepresentationTheory/Homological/GroupHomology/Basic.lean b/Mathlib/RepresentationTheory/Homological/GroupHomology/Basic.lean index 23f095f27942ee..b372a899277216 100644 --- a/Mathlib/RepresentationTheory/Homological/GroupHomology/Basic.lean +++ b/Mathlib/RepresentationTheory/Homological/GroupHomology/Basic.lean @@ -154,7 +154,7 @@ set_option backward.isDefEq.respectTransparency false in /-- Given a `k`-linear `G`-representation `A`, this is the complex of inhomogeneous chains $$\dots \to \bigoplus_{G^1} A \to \bigoplus_{G^0} A \to 0$$ which calculates the group homology of `A`. -/ -noncomputable abbrev inhomogeneousChains : +abbrev inhomogeneousChains : ChainComplex (ModuleCat k) ℕ := ChainComplex.of (fun n => ModuleCat.of k ((Fin n → G) →₀ A)) (fun n => inhomogeneousChains.d A n) fun n => by diff --git a/Mathlib/RepresentationTheory/Rep/Basic.lean b/Mathlib/RepresentationTheory/Rep/Basic.lean index f825c0de10ee70..bcbffe8f5d5d92 100644 --- a/Mathlib/RepresentationTheory/Rep/Basic.lean +++ b/Mathlib/RepresentationTheory/Rep/Basic.lean @@ -759,7 +759,7 @@ variable {G : Type v} [Group G] (A B C : Rep.{w} k G) `(B, ρ₂)` to the representation `Homₖ(A, B)` that maps `g : G` and `f : A →ₗ[k] B` to `(ρ₂ g) ∘ₗ f ∘ₗ (ρ₁ g⁻¹)`. -/ @[simps] -protected noncomputable def ihom : Rep k G ⥤ Rep k G where +protected def ihom : Rep k G ⥤ Rep k G where obj B := Rep.of (Representation.linHom A.ρ B.ρ) map {X} {Y} f := Rep.ofHom ⟨LinearMap.llcomp k _ _ _ f.hom.toLinearMap, fun g ↦ by ext; simp [Representation.IntertwiningMap.toLinearMap_apply, ← hom_comm_apply]⟩ @@ -794,7 +794,7 @@ def tensorHomEquiv (A B C : Rep.{u} k G) : (A ⊗ B ⟶ C) ≃ (B ⟶ (Rep.ihom variable {A B C} -noncomputable instance : MonoidalClosed (Rep k G) where +instance : MonoidalClosed (Rep k G) where closed A := { rightAdj := Rep.ihom A adj := Adjunction.mkOfHomEquiv ({ diff --git a/Mathlib/RingTheory/Adjoin/Field.lean b/Mathlib/RingTheory/Adjoin/Field.lean index f81cd0b92fe5cc..97079e67247da9 100644 --- a/Mathlib/RingTheory/Adjoin/Field.lean +++ b/Mathlib/RingTheory/Adjoin/Field.lean @@ -54,7 +54,7 @@ theorem AlgEquiv.coe_adjoinSingletonEquivAdjoinRootMinpoly_symm {R : Type*} [Com /-- Produce an algebra homomorphism `Adjoin R {x} →ₐ[R] T` sending `x` to a root of `x`'s minimal polynomial in `T`. -/ -noncomputable def Algebra.adjoin.liftSingleton {S T : Type*} +def Algebra.adjoin.liftSingleton {S T : Type*} [CommRing S] [CommRing T] [Algebra F S] [Algebra F T] (x : S) (y : T) (h : aeval y (minpoly F x) = 0) : Algebra.adjoin F {x} →ₐ[F] T := diff --git a/Mathlib/RingTheory/AdjoinRoot.lean b/Mathlib/RingTheory/AdjoinRoot.lean index bf58bd9bd4f793..e064dd25f376ea 100644 --- a/Mathlib/RingTheory/AdjoinRoot.lean +++ b/Mathlib/RingTheory/AdjoinRoot.lean @@ -453,7 +453,7 @@ def mapAlgEquiv (f : S ≃ₐ[R] T) (p : S[X]) (q : T[X]) (h : Associated (p.map variable (R) in /-- The canonical algebraic homomorphism from `AdjoinRoot f` to `AdjoinRoot g`, where the polynomial `g : S[X]` divides `f`. -/ -noncomputable def algHomOfDvd (f g : S[X]) (hgf : g ∣ f) : AdjoinRoot f →ₐ[R] AdjoinRoot g := +def algHomOfDvd (f g : S[X]) (hgf : g ∣ f) : AdjoinRoot f →ₐ[R] AdjoinRoot g := mapAlgHom (.id R S) _ _ <| by simpa lemma coe_algHomOfDvd (f g : S[X]) (hgf) : @@ -468,7 +468,7 @@ lemma coe_algHomOfDvd (f g : S[X]) (hgf) : variable (R) in /-- The canonical algebraic equivalence between `AdjoinRoot p` and `AdjoinRoot g`, where the two polynomials `f g : S[X]` are associated. -/ -noncomputable def algEquivOfAssociated (f g : S[X]) (hfg : Associated f g) : +def algEquivOfAssociated (f g : S[X]) (hfg : Associated f g) : AdjoinRoot f ≃ₐ[R] AdjoinRoot g := mapAlgEquiv .refl f g <| by simpa lemma coe_algEquivOfAssociated (f g : S[X]) (hfg) : @@ -488,7 +488,7 @@ lemma algEquivOfAssociated_toAlgHom (f g : S[X]) (hfg) : variable (R) in /-- The canonical algebraic equivalence between `AdjoinRoot f` and `AdjoinRoot g`, where the two polynomials `f g : S[X]` are equal. -/ -noncomputable def algEquivOfEq (f g : S[X]) (hfg : f = g) : AdjoinRoot f ≃ₐ[R] AdjoinRoot g := +def algEquivOfEq (f g : S[X]) (hfg : f = g) : AdjoinRoot f ≃ₐ[R] AdjoinRoot g := algEquivOfAssociated R f g (by rw [hfg]) lemma coe_algEquivOfEq (f g : S[X]) (hfg) : @@ -513,12 +513,12 @@ variable [Field K] {f : K[X]} instance span_maximal_of_irreducible [Fact (Irreducible f)] : (span {f}).IsMaximal := PrincipalIdealRing.isMaximal_of_irreducible <| Fact.out -noncomputable instance instGroupWithZero [Fact (Irreducible f)] : GroupWithZero (AdjoinRoot f) := +instance instGroupWithZero [Fact (Irreducible f)] : GroupWithZero (AdjoinRoot f) := fast_instance% Quotient.groupWithZero (span {f} : Ideal K[X]) /-- If `R` is a field and `f` is irreducible, then `AdjoinRoot f` is a field -/ @[stacks 09FX "first part, see also 09FI"] -noncomputable instance instField [Fact (Irreducible f)] : Field (AdjoinRoot f) where +instance instField [Fact (Irreducible f)] : Field (AdjoinRoot f) where __ := instCommRing _ __ := instGroupWithZero nnqsmul := (· • ·) @@ -949,7 +949,7 @@ theorem quotAdjoinRootEquivQuotPolynomialQuot_symm_mk_mk (p : R[X]) : /-- Promote `AdjoinRoot.quotAdjoinRootEquivQuotPolynomialQuot` to an `AlgEquiv`. -/ @[simps!] -noncomputable def quotEquivQuotMap (f : R[X]) (I : Ideal R) : +def quotEquivQuotMap (f : R[X]) (I : Ideal R) : (AdjoinRoot f ⧸ Ideal.map (of f) I) ≃ₐ[R] (R ⧸ I)[X] ⧸ Ideal.span ({Polynomial.map (Ideal.Quotient.mk I) f} : Set (R ⧸ I)[X]) := AlgEquiv.ofRingEquiv @@ -1024,7 +1024,7 @@ variable [CommRing R] [CommRing S] [Algebra R S] /-- Let `α` have minimal polynomial `f` over `R` and `I` be an ideal of `R`, then `R[α] / (I) = (R[x] / (f)) / pS = (R/p)[x] / (f mod p)`. -/ @[simps!] -noncomputable def quotientEquivQuotientMinpolyMap (pb : PowerBasis R S) (I : Ideal R) : +def quotientEquivQuotientMinpolyMap (pb : PowerBasis R S) (I : Ideal R) : (S ⧸ I.map (algebraMap R S)) ≃ₐ[R] Polynomial (R ⧸ I) ⧸ Ideal.span ({(minpoly R pb.gen).map (Ideal.Quotient.mk I)} : Set (Polynomial (R ⧸ I))) := diff --git a/Mathlib/RingTheory/Bialgebra/MonoidAlgebra.lean b/Mathlib/RingTheory/Bialgebra/MonoidAlgebra.lean index fb4f490cda5313..a6e95fa16a3e8d 100644 --- a/Mathlib/RingTheory/Bialgebra/MonoidAlgebra.lean +++ b/Mathlib/RingTheory/Bialgebra/MonoidAlgebra.lean @@ -56,7 +56,7 @@ instance instBialgebra : Bialgebra R A[M] where variable (R) [AddMonoid M] [AddMonoid N] in /-- If `f : M → N` is a monoid hom, then `AddMonoidAlgebra.mapDomain f` is a bialgebra hom between their additive monoid algebras. -/ -noncomputable def _root_.AddMonoidAlgebra.mapDomainBialgHom (f : M →+ N) : +def _root_.AddMonoidAlgebra.mapDomainBialgHom (f : M →+ N) : AddMonoidAlgebra R M →ₐc[R] AddMonoidAlgebra R N := .ofAlgHom (AddMonoidAlgebra.mapDomainAlgHom R R f) (by ext; simp) (by ext; simp) @@ -65,7 +65,7 @@ variable (R) in /-- If `f : M → N` is a monoid hom, then `MonoidAlgebra.mapDomain f` is a bialgebra hom between their monoid algebras. -/ @[to_additive existing (attr := simps!)] -noncomputable def mapDomainBialgHom (f : M →* N) : R[M] →ₐc[R] R[N] := +def mapDomainBialgHom (f : M →* N) : R[M] →ₐc[R] R[N] := .ofAlgHom (mapDomainAlgHom R R f) (by ext; simp) (by ext; simp) @[to_additive (attr := simp)] diff --git a/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean b/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean index d692d814ba6e86..cbaab26683f01f 100644 --- a/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean +++ b/Mathlib/RingTheory/DedekindDomain/AdicValuation.lean @@ -621,7 +621,7 @@ def equivCompletion : adicCompletion K v ≃ (v.valuation K).Completion where left_inv _ := rfl right_inv _ := rfl -noncomputable instance : Field (adicCompletion K v) := fast_instance% (equivCompletion K v).field +instance : Field (adicCompletion K v) := fast_instance% (equivCompletion K v).field /-- `adicCompletion.toCompletion` as a ring isomorphism onto the underlying completion. -/ @[simps! apply] @@ -648,7 +648,7 @@ theorem toCompletion_surjective : Function.Surjective (toCompletion (K := K) (v theorem ofCompletion_surjective : Function.Surjective (ofCompletion (K := K) (v := v)) := (equivCompletion K v).symm.surjective -noncomputable instance : UniformSpace (adicCompletion K v) := .comap toCompletion inferInstance +instance : UniformSpace (adicCompletion K v) := .comap toCompletion inferInstance theorem isUniformInducing_toCompletion : IsUniformInducing (toCompletion (K := K) (v := v)) := ⟨rfl⟩ @@ -658,7 +658,7 @@ instance : IsUniformAddGroup (adicCompletion K v) := /-- The `v`-adic valuation on `adicCompletion K v`, transported from the completion along `equiv`. -/ -noncomputable def valuation : Valuation (adicCompletion K v) ℤᵐ⁰ := +def valuation : Valuation (adicCompletion K v) ℤᵐ⁰ := Valued.v.comap (equiv K v).toRingHom theorem valueGroup_eq : @@ -679,7 +679,7 @@ def valueGroupEquiv : /-- The order-preserving multiplicative equivalence between the `ValueGroup₀` of the completion's valuation, pulled back along `equiv`, and that of the completion. -/ -noncomputable def valueGroupOrderIso : +def valueGroupOrderIso : ValueGroup₀ (.ofClass (valuation K v)) ≃*o ValueGroup₀ (.ofClass (Valued.v : Valuation (v.valuation K).Completion ℤᵐ⁰)) where toFun := WithZero.map' (valueGroupEquiv K v) @@ -710,7 +710,7 @@ theorem valueGroupOrderIso_restrict (x : adicCompletion K v) : apply embedding_strictMono.injective rw [embedding_valueGroupOrderIso, embedding_restrict, embedding_restrict]; rfl -noncomputable instance : Valued (adicCompletion K v) ℤᵐ⁰ where +instance : Valued (adicCompletion K v) ℤᵐ⁰ where v := valuation K v is_topological_valuation s := by rw [(isUniformInducing_toCompletion K v).isInducing.nhds_eq_comap 0, toCompletion_zero, @@ -728,7 +728,7 @@ noncomputable instance : Valued (adicCompletion K v) ℤᵐ⁰ where valueGroupOrderIso_restrict] simpa using hx -noncomputable instance : CompleteSpace (adicCompletion K v) := +instance : CompleteSpace (adicCompletion K v) := ((isUniformInducing_toCompletion K v).completeSpace_congr (toCompletion_surjective K v)).mpr inferInstance @@ -840,7 +840,7 @@ instance adicValued.uniformContinuousConstSMul : open UniformSpace in /-- The `S`-algebra structure on the underlying completion. -/ -noncomputable instance instAlgebraCompletion : Algebra S ((v.valuation K).Completion) where +instance instAlgebraCompletion : Algebra S ((v.valuation K).Completion) where toSMul := Completion.instSMul _ _ algebraMap := Completion.coeRingHom.comp (algebraMap S (WithVal (v.valuation K))) commutes' r x := by @@ -856,7 +856,7 @@ noncomputable instance instAlgebraCompletion : Algebra S ((v.valuation K).Comple simp [Algebra.smul_def, Completion.algebraMap_def, WithVal.algebraMap_right_apply, Completion.coeRingHom] -noncomputable instance : Algebra S (v.adicCompletion K) := +instance : Algebra S (v.adicCompletion K) := fast_instance% (adicCompletion.equivCompletion K v).algebra S theorem algebraMap_adicCompletion_toCompletion (r : S) : diff --git a/Mathlib/RingTheory/DedekindDomain/Factorization.lean b/Mathlib/RingTheory/DedekindDomain/Factorization.lean index c25fa26cb9ebc7..599a7480ed658e 100644 --- a/Mathlib/RingTheory/DedekindDomain/Factorization.lean +++ b/Mathlib/RingTheory/DedekindDomain/Factorization.lean @@ -701,7 +701,6 @@ namespace FractionalIdeal /-- `c.divMod b a` (i.e. `c / b mod a`) is an arbitrary `x` such that `c = bx + a`. This is zero if the above is not possible, i.e. when `a = 0` or `b = 0` or `¬ a ≤ c`. -/ -noncomputable def divMod (c b a : FractionalIdeal R⁰ K) : K := letI := Classical.propDecidable if h : a ≤ c ∧ a ≠ 0 ∧ b ≠ 0 then @@ -734,7 +733,6 @@ lemma divMod_zero_of_not_le {a b c : FractionalIdeal R⁰ K} (hac : ¬ a ≤ c) /-- Let `I J I' J'` be nonzero fractional ideals in a Dedekind domain with `J ≤ I` and `J' ≤ I'`. If `I/J = I'/J'` in the group of fractional ideals (i.e. `I * J' = I' * J`), then `I/J ≃ I'/J'` as quotient `R`-modules. -/ -noncomputable def quotientEquiv (I J I' J' : FractionalIdeal R⁰ K) (H : I * J' = I' * J) (h : J ≤ I) (h' : J' ≤ I') (hJ' : J' ≠ 0) (hI : I ≠ 0) : (I ⧸ J.coeToSubmodule.comap I.coeToSubmodule.subtype) ≃ₗ[R] diff --git a/Mathlib/RingTheory/Etale/StandardEtale.lean b/Mathlib/RingTheory/Etale/StandardEtale.lean index 64f44f09d4c17b..5360c28db7b352 100644 --- a/Mathlib/RingTheory/Etale/StandardEtale.lean +++ b/Mathlib/RingTheory/Etale/StandardEtale.lean @@ -241,7 +241,7 @@ lemma equivMvPolynomialQuotient_symm_apply : simp [equivMvPolynomialQuotient, StandardEtalePair.Ring]; rfl /-- Mapping a standard etale pair under a ring homomorphism. -/ -@[simps] protected noncomputable def map (f : R →+* S) : StandardEtalePair S where +@[simps] protected def map (f : R →+* S) : StandardEtalePair S where f := P.f.map f monic_f := P.monic_f.map _ g := P.g.map f @@ -347,7 +347,6 @@ lemma StandardEtalePresentation.hom_ext {f₁ f₂ : S →ₐ[R] T} (h : f₁ P. open scoped TensorProduct /-- The base change of a standard etale algebra is standard etale. -/ -noncomputable def StandardEtalePresentation.baseChange : StandardEtalePresentation T (T ⊗[R] S) where __ := P.map (algebraMap R T) diff --git a/Mathlib/RingTheory/FreeCommRing.lean b/Mathlib/RingTheory/FreeCommRing.lean index d04ee6c24b36e5..9956874c0b0bca 100644 --- a/Mathlib/RingTheory/FreeCommRing.lean +++ b/Mathlib/RingTheory/FreeCommRing.lean @@ -406,14 +406,14 @@ def freeCommRingPEmptyEquivInt : FreeCommRing PEmpty.{u + 1} ≃+* ℤ := RingEquiv.trans (freeCommRingEquivMvPolynomialInt _) (MvPolynomial.isEmptyRingEquiv _ PEmpty) @[deprecated (since := "2026-02-08")] -noncomputable alias freeCommRingPemptyEquivInt := freeCommRingPEmptyEquivInt +alias freeCommRingPemptyEquivInt := freeCommRingPEmptyEquivInt /-- The free commutative ring on a type with one term is isomorphic to `ℤ[X]`. -/ def freeCommRingPUnitEquivPolynomialInt : FreeCommRing PUnit.{u + 1} ≃+* ℤ[X] := (freeCommRingEquivMvPolynomialInt _).trans (MvPolynomial.uniqueAlgEquiv ℤ PUnit).toRingEquiv @[deprecated (since := "2026-02-08")] -noncomputable alias freeCommRingPunitEquivPolynomialInt := freeCommRingPUnitEquivPolynomialInt +alias freeCommRingPunitEquivPolynomialInt := freeCommRingPUnitEquivPolynomialInt open FreeRing @@ -422,11 +422,11 @@ def freeRingPEmptyEquivInt : FreeRing PEmpty.{u + 1} ≃+* ℤ := RingEquiv.trans (subsingletonEquivFreeCommRing _) freeCommRingPEmptyEquivInt @[deprecated (since := "2026-02-08")] -noncomputable alias freeRingPemptyEquivInt := freeRingPEmptyEquivInt +alias freeRingPemptyEquivInt := freeRingPEmptyEquivInt /-- The free ring on a type with one term is isomorphic to `ℤ[X]`. -/ def freeRingPUnitEquivPolynomialInt : FreeRing PUnit.{u + 1} ≃+* ℤ[X] := RingEquiv.trans (subsingletonEquivFreeCommRing _) freeCommRingPUnitEquivPolynomialInt @[deprecated (since := "2026-02-08")] -noncomputable alias freeRingPunitEquivPolynomialInt := freeRingPUnitEquivPolynomialInt +alias freeRingPunitEquivPolynomialInt := freeRingPUnitEquivPolynomialInt diff --git a/Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean b/Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean index 4658ca2c7240e3..bb0b557b7768d8 100644 --- a/Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean +++ b/Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean @@ -749,7 +749,7 @@ variable (f : 𝒜 →+*ᵍ ℬ) (I : Ideal A) [I.IsPrime] (J : Ideal B) [J.IsPr -- `AtPrime.map` one day. /-- If `f : 𝒜 →+*ᵍ ℬ` is a graded ring homomorphism and `I` is a prime ideal of `A` and `J` is a prime ideal of `B` and `f⁻¹ J = I` then we have a map `AtPrime 𝒜 I →+* AtPrime ℬ J`. -/ -noncomputable def localRingHom : AtPrime 𝒜 I →+* AtPrime ℬ J := +def localRingHom : AtPrime 𝒜 I →+* AtPrime ℬ J := map f <| Localization.le_comap_primeCompl_iff.mpr <| hIJ ▸ le_rfl variable {f I J hIJ} diff --git a/Mathlib/RingTheory/Kaehler/Basic.lean b/Mathlib/RingTheory/Kaehler/Basic.lean index c1c64b7ac4ba81..79ea681b9557ae 100644 --- a/Mathlib/RingTheory/Kaehler/Basic.lean +++ b/Mathlib/RingTheory/Kaehler/Basic.lean @@ -377,7 +377,7 @@ local instance instR : Module R (KaehlerDifferential.ideal R S).cotangentIdeal : /-- Derivations into `Ω[S⁄R]` is equivalent to derivations into `(KaehlerDifferential.ideal R S).cotangentIdeal`. -/ -noncomputable def KaehlerDifferential.endEquivDerivation' : +def KaehlerDifferential.endEquivDerivation' : Derivation R S Ω[S⁄R] ≃ₗ[S] Derivation R S (ideal R S).cotangentIdeal := LinearEquiv.compDer ((KaehlerDifferential.ideal R S).cotangentEquivIdeal.restrictScalars S) @@ -394,7 +394,7 @@ def KaehlerDifferential.endEquivAuxEquiv : The endomorphisms of `Ω[S⁄R]` corresponds to sections of the surjection `S ⊗[R] S ⧸ J ^ 2 →ₐ[R] S`, with `J` being the kernel of the multiplication map `S ⊗[R] S →ₐ[R] S`. -/ -noncomputable def KaehlerDifferential.endEquiv : +def KaehlerDifferential.endEquiv : Module.End S Ω[S⁄R] ≃ { f // (TensorProduct.lmul' R : S ⊗[R] S →ₐ[R] S).kerSquareLift.comp f = AlgHom.id R S } := (KaehlerDifferential.linearMapEquivDerivation R S).toEquiv.trans <| @@ -473,7 +473,7 @@ This is the kernel of the surjection `Finsupp.linearCombination S Ω[S⁄R] S (KaehlerDifferential.D R S)`. See `KaehlerDifferential.kerTotal_eq` and `KaehlerDifferential.linearCombination_surjective`. -/ -noncomputable def KaehlerDifferential.kerTotal : Submodule S (S →₀ S) := +def KaehlerDifferential.kerTotal : Submodule S (S →₀ S) := Submodule.span S (((Set.range fun x : S × S => single x.1 1 + single x.2 1 - single (x.1 + x.2) 1) ∪ Set.range fun x : S × S => single x.2 x.1 + single x.1 x.2 - single (x.1 * x.2) 1) ∪ @@ -510,7 +510,7 @@ theorem KaehlerDifferential.kerTotal_mkQ_single_smul (r : R) (x y) : (y𝖣r • Finsupp.smul_single, mul_comm, Algebra.smul_def] /-- The (universal) derivation into `(S →₀ S) ⧸ KaehlerDifferential.kerTotal R S`. -/ -noncomputable def KaehlerDifferential.derivationQuotKerTotal : +def KaehlerDifferential.derivationQuotKerTotal : Derivation R S ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) where toFun x := 1𝖣x map_add' _ _ := KaehlerDifferential.kerTotal_mkQ_single_add _ _ _ _ _ @@ -549,7 +549,7 @@ theorem KaehlerDifferential.linearCombination_surjective : /-- `Ω[S⁄R]` is isomorphic to `S` copies of `S` with kernel `KaehlerDifferential.kerTotal`. -/ @[simps!] -noncomputable def KaehlerDifferential.quotKerTotalEquiv : +def KaehlerDifferential.quotKerTotalEquiv : ((S →₀ S) ⧸ KaehlerDifferential.kerTotal R S) ≃ₗ[S] Ω[S⁄R] := { (KaehlerDifferential.kerTotal R S).liftQ (Finsupp.linearCombination S (KaehlerDifferential.D R S)) @@ -715,7 +715,7 @@ theorem KaehlerDifferential.map_surjective : /-- The lift of the map `Ω[A⁄R] →ₗ[A] Ω[B⁄R]` to the base change along `A → B`. This is the first map in the exact sequence `B ⊗[A] Ω[A⁄R] → Ω[B⁄R] → Ω[B⁄A] → 0`. -/ -noncomputable def KaehlerDifferential.mapBaseChange : B ⊗[A] Ω[A⁄R] →ₗ[B] Ω[B⁄R] := +def KaehlerDifferential.mapBaseChange : B ⊗[A] Ω[A⁄R] →ₗ[B] Ω[B⁄R] := (TensorProduct.isBaseChange A Ω[A⁄R] B).lift (KaehlerDifferential.map R R A B) @[simp] @@ -760,7 +760,6 @@ end /-- The map `I → B ⊗[A] Ω[A⁄R]` where `I = ker(A → B)`. -/ @[simps] -noncomputable def KaehlerDifferential.kerToTensor : RingHom.ker (algebraMap A B) →ₗ[A] B ⊗[A] Ω[A⁄R] where toFun x := 1 ⊗ₜ D R A x @@ -771,7 +770,6 @@ def KaehlerDifferential.kerToTensor : RingHom.id_apply] /-- The map `I/I² → B ⊗[A] Ω[A⁄R]` where `I = ker(A → B)`. -/ -noncomputable def KaehlerDifferential.kerCotangentToTensor : (RingHom.ker (algebraMap A B)).Cotangent →ₗ[A] B ⊗[A] Ω[A⁄R] := Submodule.liftQ _ (kerToTensor R A B) <| by diff --git a/Mathlib/RingTheory/LaurentSeries.lean b/Mathlib/RingTheory/LaurentSeries.lean index 86c866fe9a00d5..d364a9fd83e71d 100644 --- a/Mathlib/RingTheory/LaurentSeries.lean +++ b/Mathlib/RingTheory/LaurentSeries.lean @@ -971,7 +971,7 @@ instance : Valued (ratfuncAdicComplPkg (K := K).space) (WithZero (Multiplicative variable (K) /-- Having established that the `K⸨X⸩` is complete and contains `K⟮X⟯` as a dense subspace, it gives rise to an abstract completion of `K⟮X⟯`. -/ -noncomputable def LaurentSeriesPkg : +def LaurentSeriesPkg : AbstractCompletion (WithVal (polynomialValuationX K)) where space := K⸨X⸩ coe := (↑) ∘ WithVal.equiv _ diff --git a/Mathlib/RingTheory/LinearDisjoint.lean b/Mathlib/RingTheory/LinearDisjoint.lean index fe0d53ff6a84e6..97711004581762 100644 --- a/Mathlib/RingTheory/LinearDisjoint.lean +++ b/Mathlib/RingTheory/LinearDisjoint.lean @@ -251,7 +251,7 @@ If `A` and `B` are linearly disjoint subalgebras in a commutative algebra `S` ov such that `A ⊔ B = S`, then this is the natural isomorphism `A ⊗[R] B ≃ₐ[A] S` induced by multiplication in `S`. -/ -noncomputable def mulMapLeftOfSupEqTop (H' : A ⊔ B = ⊤) : +def mulMapLeftOfSupEqTop (H' : A ⊔ B = ⊤) : A ⊗[R] B ≃ₐ[A] S := (AlgEquiv.ofInjective (Algebra.TensorProduct.productLeftAlgHom (Algebra.ofId A S) B.val) H.injective).trans ((Subalgebra.equivOfEq _ _ (by @@ -267,7 +267,7 @@ theorem mulMapLeftOfSupEqTop_tmul (H' : A ⊔ B = ⊤) (a : A) (b : B) : If `A` and `B` are linearly disjoint subalgebras in a commutative algebra `S` over `R` such that `A ⊔ B = S`, then any `R`-basis of `B` is also an `A`-basis of `S`. -/ -noncomputable def basisOfBasisRight (H' : A ⊔ B = ⊤) {ι : Type*} (b : Basis ι R B) : +def basisOfBasisRight (H' : A ⊔ B = ⊤) {ι : Type*} (b : Basis ι R B) : Basis ι A S := (b.baseChange A).map (H.mulMapLeftOfSupEqTop H').toLinearEquiv @@ -297,7 +297,7 @@ theorem leftMulMatrix_basisOfBasisRight_algebraMap (H' : A ⊔ B = ⊤) {ι : Ty If `A` and `B` are subalgebras in a commutative algebra `S` over `R`, and if they are linearly disjoint and such that `A ⊔ B = S`, then any `R`-basis of `A` is also a `B`-basis of `S`. -/ -noncomputable def basisOfBasisLeft (H' : A ⊔ B = ⊤) {ι : Type*} (b : Basis ι R A) : +def basisOfBasisLeft (H' : A ⊔ B = ⊤) {ι : Type*} (b : Basis ι R A) : Basis ι B S := (b.baseChange B).map (H.symm.mulMapLeftOfSupEqTop (by rwa [sup_comm])).toLinearEquiv diff --git a/Mathlib/RingTheory/MatrixPolynomialAlgebra.lean b/Mathlib/RingTheory/MatrixPolynomialAlgebra.lean index 49eab5fdaf1b32..d8b743893e2e83 100644 --- a/Mathlib/RingTheory/MatrixPolynomialAlgebra.lean +++ b/Mathlib/RingTheory/MatrixPolynomialAlgebra.lean @@ -50,7 +50,7 @@ The algebra isomorphism stating "matrices of polynomials are the same as polynom it's an algebra equivalence, and characterised extensionally by the lemma `matPolyEquiv_coeff_apply` below.) -/ -noncomputable def matPolyEquiv : Matrix n n R[X] ≃ₐ[R] (Matrix n n R)[X] := +def matPolyEquiv : Matrix n n R[X] ≃ₐ[R] (Matrix n n R)[X] := ((matrixEquivTensor n R R[X]).trans (Algebra.TensorProduct.comm R _ _)).trans (polyEquivTensor R (Matrix n n R)).symm diff --git a/Mathlib/RingTheory/MvPowerSeries/Equiv.lean b/Mathlib/RingTheory/MvPowerSeries/Equiv.lean index 4dc31fa468316c..ad628c7894f69b 100644 --- a/Mathlib/RingTheory/MvPowerSeries/Equiv.lean +++ b/Mathlib/RingTheory/MvPowerSeries/Equiv.lean @@ -169,7 +169,6 @@ namespace PowerSeries /-- Given a power series `p : R⟦X⟧` and an index `i`, we may view it as a multivariate power series `toMvPowerSeries i p : MvPowerSeries σ R`. -/ -noncomputable def toMvPowerSeries : PowerSeries R →ₐ[R] MvPowerSeries σ R := MvPowerSeries.rename (fun _ ↦ i) diff --git a/Mathlib/RingTheory/MvPowerSeries/Inverse.lean b/Mathlib/RingTheory/MvPowerSeries/Inverse.lean index ef53346a2f3738..2d2f731ec320ef 100644 --- a/Mathlib/RingTheory/MvPowerSeries/Inverse.lean +++ b/Mathlib/RingTheory/MvPowerSeries/Inverse.lean @@ -62,7 +62,7 @@ well-founded recursion on the coefficients of the inverse. the totalised inverse formal power series `(_)⁻¹` and the inverse formal power series that depends on an inverse of the constant coefficient `invOfUnit`. -/ -protected noncomputable def inv.aux (a : R) (φ : MvPowerSeries σ R) : MvPowerSeries σ R +protected def inv.aux (a : R) (φ : MvPowerSeries σ R) : MvPowerSeries σ R | n => letI := Classical.decEq σ if n = 0 then a diff --git a/Mathlib/RingTheory/PiTensorProduct.lean b/Mathlib/RingTheory/PiTensorProduct.lean index df1663a1d5ae85..1ff095006f1745 100644 --- a/Mathlib/RingTheory/PiTensorProduct.lean +++ b/Mathlib/RingTheory/PiTensorProduct.lean @@ -268,7 +268,7 @@ variable (R ι) The algebra equivalence from the tensor product of the constant family with value `R` to `R`, given by multiplication of the entries. -/ -noncomputable def constantBaseRingEquiv : (⨂[R] _ : ι, R) ≃ₐ[R] R := +def constantBaseRingEquiv : (⨂[R] _ : ι, R) ≃ₐ[R] R := letI toFun := lift (MultilinearMap.mkPiAlgebra R ι R) AlgEquiv.ofAlgHom (AlgHom.ofLinearMap diff --git a/Mathlib/RingTheory/Polynomial/Dickson.lean b/Mathlib/RingTheory/Polynomial/Dickson.lean index 99c6d0c632f322..a9d0f1f360e409 100644 --- a/Mathlib/RingTheory/Polynomial/Dickson.lean +++ b/Mathlib/RingTheory/Polynomial/Dickson.lean @@ -60,7 +60,7 @@ variable {R S : Type*} [CommRing R] [CommRing S] (k : ℕ) (a : R) /-- `dickson` is the `n`-th (generalised) Dickson polynomial of the `k`-th kind associated to the element `a ∈ R`. -/ -noncomputable def dickson : ℕ → R[X] +def dickson : ℕ → R[X] | 0 => 3 - k | 1 => X | n + 2 => X * dickson (n + 1) - C a * dickson n diff --git a/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean b/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean index ebc7dd98babcdf..23a0ba7abc1983 100644 --- a/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean +++ b/Mathlib/RingTheory/Polynomial/Hermite/Basic.lean @@ -45,7 +45,7 @@ open Polynomial namespace Polynomial /-- the probabilists' Hermite polynomials. -/ -noncomputable def hermite : ℕ → Polynomial ℤ +def hermite : ℕ → Polynomial ℤ | 0 => 1 | n + 1 => X * hermite n - derivative (hermite n) diff --git a/Mathlib/RingTheory/Polynomial/UniqueFactorization.lean b/Mathlib/RingTheory/Polynomial/UniqueFactorization.lean index 2c4bffb6833eac..e11d2845c631b5 100644 --- a/Mathlib/RingTheory/Polynomial/UniqueFactorization.lean +++ b/Mathlib/RingTheory/Polynomial/UniqueFactorization.lean @@ -98,7 +98,7 @@ only finitely many monic factors. (Note that its factors up to unit may be more than monic factors.) See also `UniqueFactorizationMonoid.fintypeSubtypeDvd`. -/ @[implicit_reducible] -noncomputable def fintypeSubtypeMonicDvd (f : D[X]) (hf : f ≠ 0) : +def fintypeSubtypeMonicDvd (f : D[X]) (hf : f ≠ 0) : Fintype { g : D[X] // g.Monic ∧ g ∣ f } := by set G := { g : D[X] // g.Monic ∧ g ∣ f } let y : Associates D[X] := Associates.mk f diff --git a/Mathlib/RingTheory/PolynomialLaw/Basic.lean b/Mathlib/RingTheory/PolynomialLaw/Basic.lean index 1a1843e362c313..d2a05a022b25d7 100644 --- a/Mathlib/RingTheory/PolynomialLaw/Basic.lean +++ b/Mathlib/RingTheory/PolynomialLaw/Basic.lean @@ -122,7 +122,7 @@ theorem id_apply' {S : Type u} [CommSemiring S] [Algebra R S] : (id : M →ₚₗ[R] M).toFun' S = _root_.id := rfl /-- The sum of two polynomial laws -/ -noncomputable def add : M →ₚₗ[R] N where +def add : M →ₚₗ[R] N where toFun' S _ _ := f.toFun' S + g.toFun' S instance : Add (PolynomialLaw R M N) := ⟨add⟩ @@ -186,7 +186,7 @@ variable {R : Type u} [CommRing R] (f : M →ₚₗ[R] N) /-- The opposite of a polynomial law -/ -noncomputable def neg : M →ₚₗ[R] N where +def neg : M →ₚₗ[R] N where toFun' S _ _ := (-1 : R) • f.toFun' S instance : Neg (M →ₚₗ[R] N) := ⟨neg⟩ diff --git a/Mathlib/RingTheory/PowerSeries/Basic.lean b/Mathlib/RingTheory/PowerSeries/Basic.lean index 6363eb10d7665b..c6332dd819b2e2 100644 --- a/Mathlib/RingTheory/PowerSeries/Basic.lean +++ b/Mathlib/RingTheory/PowerSeries/Basic.lean @@ -540,7 +540,7 @@ variable [CommSemiring R] open Finset Nat /-- The ring homomorphism taking a power series `f(X)` to `f(aX)`. -/ -noncomputable def rescale (a : R) : R⟦X⟧ →+* R⟦X⟧ where +def rescale (a : R) : R⟦X⟧ →+* R⟦X⟧ where toFun f := PowerSeries.mk fun n => a ^ n * PowerSeries.coeff n f map_zero' := by ext @@ -707,7 +707,7 @@ theorem rescale_neg_one_X : rescale (-1 : A) X = -X := by rw [rescale_X, map_neg, map_one, neg_one_mul] /-- The ring homomorphism taking a power series `f(X)` to `f(-X)`. -/ -noncomputable def evalNegHom : A⟦X⟧ →+* A⟦X⟧ := +def evalNegHom : A⟦X⟧ →+* A⟦X⟧ := rescale (-1 : A) @[simp] diff --git a/Mathlib/RingTheory/RootsOfUnity/Basic.lean b/Mathlib/RingTheory/RootsOfUnity/Basic.lean index cd6d861a10e498..220f6da89eb652 100644 --- a/Mathlib/RingTheory/RootsOfUnity/Basic.lean +++ b/Mathlib/RingTheory/RootsOfUnity/Basic.lean @@ -307,7 +307,6 @@ namespace IsCyclic /-- The isomorphism from the group of group homomorphisms from a finite cyclic group `G` of order `n` into another group `G'` to the group of `n`th roots of unity in `G'` determined by a generator `g` of `G`. It sends `φ : G →* G'` to `φ g`. -/ -noncomputable def monoidHomMulEquivRootsOfUnityOfGenerator {G : Type*} [CommGroup G] {g : G} (hg : ∀ (x : G), x ∈ Subgroup.zpowers g) (G' : Type*) [CommGroup G'] : (G →* G') ≃* rootsOfUnity (Nat.card G) G' where diff --git a/Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean b/Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean index 7195f3618a935e..9a6e208383d756 100644 --- a/Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean +++ b/Mathlib/RingTheory/RootsOfUnity/PrimitiveRoots.lean @@ -533,7 +533,6 @@ lemma map_rootsOfUnity {S F} [CommRing S] [IsDomain S] [FunLike F R S] [MonoidHo then the `n`-th roots of unity in `R` and `S` are isomorphic. Also see `IsPrimitiveRoot.map_rootsOfUnity` for the equality as `Subgroup Sˣ`. -/ @[simps! -isSimp apply_coe_val apply_coe_inv_val] -noncomputable def _root_.rootsOfUnityEquivOfPrimitiveRoots {S F} [CommRing S] [IsDomain S] [FunLike F R S] [MonoidHomClass F R S] {n : ℕ} [NeZero n] {f : F} (hf : Function.Injective f) (hζ : (primitiveRoots n R).Nonempty) : @@ -780,7 +779,7 @@ variable [CommRing S] [IsDomain S] {μ : S} {n : ℕ} (hμ : IsPrimitiveRoot μ /-- The `MonoidHom` that takes an automorphism to the power of `μ` that `μ` gets mapped to under it. -/ -noncomputable def autToPow [NeZero n] : (S ≃ₐ[R] S) →* (ZMod n)ˣ := +def autToPow [NeZero n] : (S ≃ₐ[R] S) →* (ZMod n)ˣ := let μ' := hμ.toRootsOfUnity have ho : orderOf μ' = n := by refine Eq.trans ?_ hμ.eq_orderOf.symm -- `rw [hμ.eq_orderOf]` gives "motive not type correct" diff --git a/Mathlib/RingTheory/Spectrum/Maximal/Localization.lean b/Mathlib/RingTheory/Spectrum/Maximal/Localization.lean index 040355ebc361fc..170a447322e177 100644 --- a/Mathlib/RingTheory/Spectrum/Maximal/Localization.lean +++ b/Mathlib/RingTheory/Spectrum/Maximal/Localization.lean @@ -86,7 +86,7 @@ variable {R S} (f : R →+* S) (g : S →+* P) (hf : Function.Bijective f) (hg : /-- Functoriality of `PiLocalization` but restricted to bijective ring homs. If R and S are commutative rings, surjectivity would be enough. -/ -noncomputable def mapPiLocalization : PiLocalization R →+* PiLocalization S := +def mapPiLocalization : PiLocalization R →+* PiLocalization S := RingHom.pi fun I ↦ (Localization.localRingHom _ _ f rfl).comp <| Pi.evalRingHom _ (⟨_, I.2.comap_bijective f hf⟩ : MaximalSpectrum R) @@ -215,7 +215,7 @@ theorem isMaximal_of_toPiLocalization_surjective (surj : Function.Surjective (to variable (f : R →+* S) /-- A ring homomorphism induces a homomorphism between the products of localizations at primes. -/ -noncomputable def mapPiLocalization : PiLocalization R →+* PiLocalization S := +def mapPiLocalization : PiLocalization R →+* PiLocalization S := RingHom.pi fun I ↦ (Localization.localRingHom _ I.1 f rfl).comp (Pi.evalRingHom _ (comap f I)) theorem mapPiLocalization_naturality : diff --git a/Mathlib/RingTheory/Spectrum/Prime/Basic.lean b/Mathlib/RingTheory/Spectrum/Prime/Basic.lean index 645de1ee070a05..704af056d530f2 100644 --- a/Mathlib/RingTheory/Spectrum/Prime/Basic.lean +++ b/Mathlib/RingTheory/Spectrum/Prime/Basic.lean @@ -96,7 +96,7 @@ def primeSpectrumProdOfSum : PrimeSpectrum R ⊕ PrimeSpectrum S → PrimeSpectr /-- The prime spectrum of `R × S` is in bijection with the disjoint unions of the prime spectrum of `R` and the prime spectrum of `S`. -/ -noncomputable def primeSpectrumProd : +def primeSpectrumProd : PrimeSpectrum (R × S) ≃ PrimeSpectrum R ⊕ PrimeSpectrum S := Equiv.symm <| Equiv.ofBijective (primeSpectrumProdOfSum R S) (by diff --git a/Mathlib/RingTheory/Spectrum/Prime/Topology.lean b/Mathlib/RingTheory/Spectrum/Prime/Topology.lean index 6a73b5aede0902..e9d012bb35683a 100644 --- a/Mathlib/RingTheory/Spectrum/Prime/Topology.lean +++ b/Mathlib/RingTheory/Spectrum/Prime/Topology.lean @@ -492,7 +492,6 @@ lemma isClosedEmbedding_comap_snd : IsClosedEmbedding (comap (RingHom.snd R S)) /-- The prime spectrum of `R × S` is homeomorphic to the disjoint union of `PrimeSpectrum R` and `PrimeSpectrum S`. -/ -noncomputable def primeSpectrumProdHomeo : PrimeSpectrum (R × S) ≃ₜ PrimeSpectrum R ⊕ PrimeSpectrum S := by refine ((primeSpectrumProd R S).symm.toHomeomorphOfIsInducing ?_).symm @@ -723,7 +722,7 @@ lemma isOpenEmbedding_sigmaToPi : Topology.IsOpenEmbedding (sigmaToPi R) := by /-- If `ι` is finite, the disjoint union of the prime spectra of the `R i` is homeomorphic to the prime spectrum of the product. -/ -noncomputable def sigmaToPiHomeo {ι : Type*} (R : ι → Type*) [∀ i, CommRing (R i)] [Finite ι] : +def sigmaToPiHomeo {ι : Type*} (R : ι → Type*) [∀ i, CommRing (R i)] [Finite ι] : (Σ i, PrimeSpectrum (R i)) ≃ₜ PrimeSpectrum (Π i, R i) := (isOpenEmbedding_sigmaToPi R).toHomeomorphOfSurjective (sigmaToPi_bijective R).surjective diff --git a/Mathlib/RingTheory/TensorProduct/MvPolynomial.lean b/Mathlib/RingTheory/TensorProduct/MvPolynomial.lean index cf25c5461a1c52..de6d993ce1b329 100644 --- a/Mathlib/RingTheory/TensorProduct/MvPolynomial.lean +++ b/Mathlib/RingTheory/TensorProduct/MvPolynomial.lean @@ -64,7 +64,7 @@ variable [CommSemiring N] [Algebra R N] /-- The algebra morphism from a tensor product of a polynomial algebra by an algebra to a polynomial algebra -/ -noncomputable def rTensorAlgEquiv : S ⊗[R] MvPolynomial σ N ≃ₐ[S] MvPolynomial σ (S ⊗[R] N) := +def rTensorAlgEquiv : S ⊗[R] MvPolynomial σ N ≃ₐ[S] MvPolynomial σ (S ⊗[R] N) := AddMonoidAlgebra.rTensorEquivAlgEquiv R .. @[deprecated (since := "2026-06-18")] alias rTensorAlgHom := rTensorAlgEquiv @@ -86,7 +86,7 @@ lemma rTensorAlgEquiv_apply (x : N ⊗[R] MvPolynomial σ S) : /-- The tensor product of the polynomial algebra by an algebra is algebraically equivalent to a polynomial algebra with coefficients in that algebra -/ -noncomputable def scalarRTensorAlgEquiv : N ⊗[R] MvPolynomial σ R ≃ₐ[N] MvPolynomial σ N := +def scalarRTensorAlgEquiv : N ⊗[R] MvPolynomial σ R ≃ₐ[N] MvPolynomial σ N := AddMonoidAlgebra.scalarTensorEquiv R N variable (R) @@ -94,7 +94,7 @@ variable (A : Type*) [CommSemiring A] [Algebra R A] /-- Tensoring `MvPolynomial σ R` on the left by an `R`-algebra `A` is algebraically equivalent to `MvPolynomial σ A`. -/ -noncomputable def algebraTensorAlgEquiv : +def algebraTensorAlgEquiv : A ⊗[R] MvPolynomial σ R ≃ₐ[A] MvPolynomial σ A := AddMonoidAlgebra.scalarTensorEquiv .. diff --git a/Mathlib/RingTheory/Valuation/Basic.lean b/Mathlib/RingTheory/Valuation/Basic.lean index a669fb8572cbfd..dba6f15dcb17d7 100644 --- a/Mathlib/RingTheory/Valuation/Basic.lean +++ b/Mathlib/RingTheory/Valuation/Basic.lean @@ -802,7 +802,7 @@ open MonoidWithZeroHom MonoidWithZeroHom.ValueGroup₀ /-- An equivalence of valuations `v.IsEquiv w` induces the following map from `ValueGroup₀ v` to `ValueGroup₀ w`: given `x : ValueGroup₀ v` and nonzero `a b : R` such that `(v a) * x = (v b)`, `valueGroup₀Fun x` is defined as `(w b) * (w a)⁻¹`. -/ -noncomputable def valueGroup₀Fun (h : v.IsEquiv w) (x : ValueGroup₀ (.ofClass v)) : +def valueGroup₀Fun (h : v.IsEquiv w) (x : ValueGroup₀ (.ofClass v)) : ValueGroup₀ (.ofClass w) := if hx : x = 0 then 0 else haveI c := (x.zero_or_exists_mk'.resolve_left hx).choose @@ -820,7 +820,7 @@ theorem valueGroup₀Fun_spec (h : v.IsEquiv w) {r s : R} (hr : v r ≠ 0) (hs : theorem valueGroup₀Fun_zero (h : v.IsEquiv w) : valueGroup₀Fun h 0 = 0 := by simp [valueGroup₀Fun] /-- The isomorphism between the `ValueGroup₀`'s of two equivalent valuations. -/ -noncomputable def orderMonoidIso (h : v.IsEquiv w) : +def orderMonoidIso (h : v.IsEquiv w) : ValueGroup₀ (.ofClass v) ≃*o ValueGroup₀ (.ofClass w) where toFun := valueGroup₀Fun h invFun := valueGroup₀Fun h.symm diff --git a/Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean b/Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean index 0cb1d9d4957031..027f7f3fdbe5bb 100644 --- a/Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean +++ b/Mathlib/RingTheory/Valuation/ValuativeRel/Basic.lean @@ -1138,7 +1138,6 @@ variable (R) in /-- The maximal element that is `< 1` in the value group of a discrete valuation. -/ -- TODO: Link to `Valuation.IsUniformizer` once we connect `Valuation.IsRankOneDiscrete` with -- `ValuativeRel`. -noncomputable def uniformizer [IsDiscrete R] : ValueGroupWithZero R := IsDiscrete.has_maximal_element.choose @@ -1179,7 +1178,6 @@ of valuations that are compatible with the valuative relation, in the sense that isomorphic to the subgroup (with zero) generated by `v '' R` for any compatible `v`. `ValueGroupWithZero.embed v` is exactly this isomorphism map; it will later be upgraded to `ValueGroupWithZero.orderMonoidIso v`. -/ -noncomputable def embed [v.Compatible] : ValueGroupWithZero R →*₀ ValueGroup₀ (.ofClass v) where toFun := ValueGroupWithZero.lift (fun r s ↦ (restrict₀ (.ofClass v) r / (restrict₀ (.ofClass v) s))) <| by @@ -1292,7 +1290,6 @@ theorem orderMonoidIso_embed [v.Compatible] {Γ' : Type*} [LinearOrderedCommGrou /-- If a valuation `v` is compatible with the valuative relation, then `ValueGroupWithZero R` is isomorphic to the image group (with zero) of `v` as an ordered group with zero. -/ -noncomputable def orderMonoidIso [v.Compatible] : ValueGroupWithZero R ≃*o ValueGroup₀ (.ofClass v) where __ := embed v invFun x := embedding ((isEquiv v (valuation R)).orderMonoidIso x) diff --git a/Mathlib/RingTheory/WittVector/Basic.lean b/Mathlib/RingTheory/WittVector/Basic.lean index 50fafa7aa18b02..40acff23fdf19a 100644 --- a/Mathlib/RingTheory/WittVector/Basic.lean +++ b/Mathlib/RingTheory/WittVector/Basic.lean @@ -250,7 +250,7 @@ variable {p R} /-- `WittVector.map f` is the ring homomorphism `𝕎 R →+* 𝕎 S` naturally induced by a ring homomorphism `f : R →+* S`. It acts coefficientwise. -/ -noncomputable def map (f : R →+* S) : 𝕎 R →+* 𝕎 S where +def map (f : R →+* S) : 𝕎 R →+* 𝕎 S where toFun := mapFun f map_zero' := mapFun.zero f map_one' := mapFun.one f @@ -340,7 +340,7 @@ end Invertible /-- `WittVector.coeff x 0` as a `RingHom` -/ @[simps] -noncomputable def constantCoeff : 𝕎 R →+* R where +def constantCoeff : 𝕎 R →+* R where toFun x := x.coeff 0 map_zero' := by simp map_one' := by simp diff --git a/Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean b/Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean index 8ea43e8cd2eebd..b616d6f46cae19 100644 --- a/Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean +++ b/Mathlib/RingTheory/WittVector/DiscreteValuationRing.lean @@ -51,7 +51,7 @@ def succNthValUnits (n : ℕ) (a : Units k) (A : 𝕎 k) (bs : Fin (n + 1) → k Recursively defines the sequence of coefficients for the inverse to a Witt vector whose first entry is a unit. -/ -noncomputable def inverseCoeff (a : Units k) (A : 𝕎 k) : ℕ → k +def inverseCoeff (a : Units k) (A : 𝕎 k) : ℕ → k | 0 => ↑a⁻¹ | n + 1 => succNthValUnits n a A fun i => inverseCoeff a A i.val diff --git a/Mathlib/RingTheory/WittVector/Frobenius.lean b/Mathlib/RingTheory/WittVector/Frobenius.lean index 83e2d0296f451b..d28fe8868a82b3 100644 --- a/Mathlib/RingTheory/WittVector/Frobenius.lean +++ b/Mathlib/RingTheory/WittVector/Frobenius.lean @@ -80,7 +80,7 @@ local notation "v" => multiplicity `p * (frobeniusPolyAux p n) + X n ^ p = frobeniusPoly p n`. This makes it easy to show that `frobeniusPoly p n` is congruent to `X n ^ p` modulo `p`. -/ -noncomputable def frobeniusPolyAux : ℕ → MvPolynomial ℕ ℤ +def frobeniusPolyAux : ℕ → MvPolynomial ℕ ℤ | n => X (n + 1) - ∑ i : Fin n, have _ := i.is_lt ∑ j ∈ range (p ^ (n - i)), (((X (i : ℕ) ^ p) ^ (p ^ (n - (i : ℕ)) - (j + 1)) : MvPolynomial ℕ ℤ) * diff --git a/Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean b/Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean index 25380ba5a64305..9937927830b67a 100644 --- a/Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean +++ b/Mathlib/RingTheory/WittVector/FrobeniusFractionField.lean @@ -177,7 +177,7 @@ section IsAlgClosed variable {k : Type*} [Field k] [CharP k p] [IsAlgClosed k] /-- Recursively defines the sequence of coefficients for `WittVector.frobeniusRotation`. -/ -noncomputable def frobeniusRotationCoeff {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) +def frobeniusRotationCoeff {a₁ a₂ : 𝕎 k} (ha₁ : a₁.coeff 0 ≠ 0) (ha₂ : a₂.coeff 0 ≠ 0) : ℕ → k | 0 => solution p a₁ a₂ | n + 1 => succNthVal p n a₁ a₂ (fun i => frobeniusRotationCoeff ha₁ ha₂ i.val) ha₁ ha₂ diff --git a/Mathlib/RingTheory/WittVector/MulP.lean b/Mathlib/RingTheory/WittVector/MulP.lean index 8f60f4eaeb1a14..5d500934b33136 100644 --- a/Mathlib/RingTheory/WittVector/MulP.lean +++ b/Mathlib/RingTheory/WittVector/MulP.lean @@ -41,7 +41,7 @@ noncomputable section variable (p) in /-- `wittMulN p n` is the family of polynomials that computes the coefficients of `x * n` in terms of the coefficients of the Witt vector `x`. -/ -noncomputable def wittMulN : ℕ → ℕ → MvPolynomial ℕ ℤ +def wittMulN : ℕ → ℕ → MvPolynomial ℕ ℤ | 0 => 0 | n + 1 => fun k => bind₁ (Function.uncurry <| ![wittMulN n, X]) (wittAdd p k) diff --git a/Mathlib/RingTheory/WittVector/Truncated.lean b/Mathlib/RingTheory/WittVector/Truncated.lean index c5bf274255efd8..a78cdf35f9f38e 100644 --- a/Mathlib/RingTheory/WittVector/Truncated.lean +++ b/Mathlib/RingTheory/WittVector/Truncated.lean @@ -285,7 +285,7 @@ variable [Fact p.Prime] /-- `truncate n` is a ring homomorphism that truncates `x` to its first `n` entries to obtain a `TruncatedWittVector`, which has the same base `p` as `x`. -/ -noncomputable def truncate : 𝕎 R →+* TruncatedWittVector p n R where +def truncate : 𝕎 R →+* TruncatedWittVector p n R where toFun := truncateFun n map_zero' := truncateFun_zero p n R map_add' := truncateFun_add n diff --git a/Mathlib/RingTheory/WittVector/Verschiebung.lean b/Mathlib/RingTheory/WittVector/Verschiebung.lean index 7cd46cd4950ffc..8687fd0020cf10 100644 --- a/Mathlib/RingTheory/WittVector/Verschiebung.lean +++ b/Mathlib/RingTheory/WittVector/Verschiebung.lean @@ -107,7 +107,7 @@ variable [hp : Fact p.Prime] This is an additive monoid hom with underlying function `verschiebung_fun`. -/ -noncomputable def verschiebung : 𝕎 R →+ 𝕎 R where +def verschiebung : 𝕎 R →+ 𝕎 R where toFun := verschiebungFun map_zero' := by ext ⟨⟩ <;> rw [verschiebungFun_coeff] <;> diff --git a/Mathlib/SetTheory/Ordinal/Basic.lean b/Mathlib/SetTheory/Ordinal/Basic.lean index fa5a7b2d04f2ad..76448d06188885 100644 --- a/Mathlib/SetTheory/Ordinal/Basic.lean +++ b/Mathlib/SetTheory/Ordinal/Basic.lean @@ -136,7 +136,7 @@ instance hasWellFounded_toType (o : Ordinal) : WellFoundedRelation o.ToType := namespace Ordinal @[no_expose] -noncomputable instance (o : Ordinal) : SuccOrder o.ToType := +instance (o : Ordinal) : SuccOrder o.ToType := .ofLinearWellFoundedLT _ /-! ### Basic properties of the order type -/ @@ -548,7 +548,7 @@ def ToType.mk {o : Ordinal} : Set.Iio o ≃o o.ToType where right_inv _ := enum_typein _ _ map_rel_iff' := enum_le_enum' _ -@[deprecated (since := "2025-12-04")] noncomputable alias enumIsoToType := ToType.mk +@[deprecated (since := "2025-12-04")] alias enumIsoToType := ToType.mk /-- Convert an element of `α.toType` to the corresponding `Ordinal` -/ abbrev ToType.toOrd {o : Ordinal} (α : o.ToType) : Set.Iio o := ToType.mk.symm α diff --git a/Mathlib/Topology/Algebra/InfiniteSum/Defs.lean b/Mathlib/Topology/Algebra/InfiniteSum/Defs.lean index 01c9ccbcfcd3fa..562e7d59347e36 100644 --- a/Mathlib/Topology/Algebra/InfiniteSum/Defs.lean +++ b/Mathlib/Topology/Algebra/InfiniteSum/Defs.lean @@ -139,7 +139,7 @@ separated. When the support of `f` is finite, we make the most reasonable choice over the support. Otherwise, we choose arbitrarily an `a` satisfying `HasSum f a`. Similar remarks apply to more general summation filters.) -/] -noncomputable irreducible_def tprod (f : β → α) (L := unconditional β) := +irreducible_def tprod (f : β → α) (L := unconditional β) := if h : Multipliable f L then if L.HasSupport ∧ (mulSupport f ∩ L.support).Finite then finprod (L.support.mulIndicator f) else if HasProd f 1 L then 1 diff --git a/Mathlib/Topology/Algebra/PontryaginDual.lean b/Mathlib/Topology/Algebra/PontryaginDual.lean index 2dd281ea6672e0..24b6f4645ebbcd 100644 --- a/Mathlib/Topology/Algebra/PontryaginDual.lean +++ b/Mathlib/Topology/Algebra/PontryaginDual.lean @@ -102,7 +102,7 @@ instance [CompactSpace A] : DiscreteTopology (PontryaginDual A) := by instance [DiscreteTopology A] [CompactSpace A] : Finite (PontryaginDual A) := finite_of_compact_of_discrete -noncomputable instance [DiscreteTopology A] [CompactSpace A] : Fintype (PontryaginDual A) := +instance [DiscreteTopology A] [CompactSpace A] : Fintype (PontryaginDual A) := .ofFinite _ /-- `PontryaginDual` is a contravariant functor. -/ diff --git a/Mathlib/Topology/Algebra/UniformMulAction.lean b/Mathlib/Topology/Algebra/UniformMulAction.lean index 88ca68e321b869..ed62cee4e4f984 100644 --- a/Mathlib/Topology/Algebra/UniformMulAction.lean +++ b/Mathlib/Topology/Algebra/UniformMulAction.lean @@ -193,7 +193,7 @@ section SMul variable [SMul M X] @[to_additive] -noncomputable instance : SMul M (Completion X) := +instance : SMul M (Completion X) := ⟨fun c => Completion.map (c • ·)⟩ @[to_additive] @@ -237,7 +237,7 @@ theorem coe_smul (c : M) (x : X) : (↑(c • x) : Completion X) = c • (x : Co end SMul @[to_additive] -noncomputable instance [Monoid M] [MulAction M X] [UniformContinuousConstSMul M X] : +instance [Monoid M] [MulAction M X] [UniformContinuousConstSMul M X] : MulAction M (Completion X) where one_smul := ext' (continuous_const_smul _) continuous_id fun a => by rw [← coe_smul, one_smul] mul_smul x y := diff --git a/Mathlib/Topology/Algebra/UniformRing.lean b/Mathlib/Topology/Algebra/UniformRing.lean index b86b231883cd69..efd62ddc2c7d89 100644 --- a/Mathlib/Topology/Algebra/UniformRing.lean +++ b/Mathlib/Topology/Algebra/UniformRing.lean @@ -267,7 +267,7 @@ variable {γ : Type*} [UniformSpace γ] [Semiring γ] [IsTopologicalSemiring γ] variable [T2Space γ] [CompleteSpace γ] /-- The dense inducing extension as a ring homomorphism. -/ -noncomputable def IsDenseInducing.extendRingHom {i : α →+* β} {f : α →+* γ} +def IsDenseInducing.extendRingHom {i : α →+* β} {f : α →+* γ} (ue : IsUniformInducing i) (dr : DenseRange i) (hf : UniformContinuous f) : β →+* γ where toFun := (ue.isDenseInducing dr).extend f map_one' := by diff --git a/Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean b/Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean index a9b32ee97e30ed..7f6c37165952c8 100644 --- a/Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean +++ b/Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean @@ -146,7 +146,6 @@ theorem range_pullback_to_prod {X Y Z : TopCat.{u}} (f : X ⟶ Z) (g : Y ⟶ Z) cat_disch /-- The pullback along an embedding is (isomorphic to) the preimage. -/ -noncomputable def pullbackHomeoPreimage {X Y Z : Type*} [TopologicalSpace X] [TopologicalSpace Y] [TopologicalSpace Z] (f : X → Z) (hf : Continuous f) (g : Y → Z) (hg : IsEmbedding g) : diff --git a/Mathlib/Topology/ContinuousMap/Bounded/Basic.lean b/Mathlib/Topology/ContinuousMap/Bounded/Basic.lean index 8ee7a7818b0865..068e45ad4ee281 100644 --- a/Mathlib/Topology/ContinuousMap/Bounded/Basic.lean +++ b/Mathlib/Topology/ContinuousMap/Bounded/Basic.lean @@ -465,7 +465,7 @@ end Extend /-- The indicator function of a clopen set, as a bounded continuous function. -/ @[simps] -noncomputable def indicator (s : Set α) (hs : IsClopen s) : BoundedContinuousFunction α ℝ where +def indicator (s : Set α) (hs : IsClopen s) : BoundedContinuousFunction α ℝ where toFun := s.indicator 1 continuous_toFun := continuous_indicator (by simp [hs]) <| continuous_const.continuousOn map_bounded' := ⟨1, fun x y ↦ by by_cases hx : x ∈ s <;> by_cases hy : y ∈ s <;> simp [hx, hy]⟩ diff --git a/Mathlib/Topology/DenseEmbedding.lean b/Mathlib/Topology/DenseEmbedding.lean index cf3e63756da367..8213cb339a343a 100644 --- a/Mathlib/Topology/DenseEmbedding.lean +++ b/Mathlib/Topology/DenseEmbedding.lean @@ -231,7 +231,7 @@ variable [TopologicalSpace α] [TopologicalSpace β] {s : Set α} is dense then the coercion `(↑) : s → α` automatically satisfies `IsUniformInducing` and `IsDenseInducing` so this gives access to the theorems satisfied by a uniform extension by simply mentioning the density hypothesis. -/ -noncomputable def extend (hs : Dense s) (f : s → β) : α → β := +def extend (hs : Dense s) (f : s → β) : α → β := hs.isDenseInducing_val.extend f variable {f : s → β} diff --git a/Mathlib/Topology/ExtremallyDisconnected.lean b/Mathlib/Topology/ExtremallyDisconnected.lean index 1916abbee2f674..b9ec1cd7919f63 100644 --- a/Mathlib/Topology/ExtremallyDisconnected.lean +++ b/Mathlib/Topology/ExtremallyDisconnected.lean @@ -244,7 +244,7 @@ set_option backward.privateInPublic.warn false in /-- Lemma 2.3 in [Gleason, *Projective topological spaces*][gleason1958]: a continuous surjection from a compact Hausdorff space to an extremally disconnected Hausdorff space satisfying the "Zorn subset condition" is a homeomorphism. -/ -noncomputable def ExtremallyDisconnected.homeoCompactToT2 [ExtremallyDisconnected A] [T2Space A] +def ExtremallyDisconnected.homeoCompactToT2 [ExtremallyDisconnected A] [T2Space A] [T2Space E] [CompactSpace E] {ρ : E → A} (ρ_cont : Continuous ρ) (ρ_surj : ρ.Surjective) (zorn_subset : ∀ E₀ : Set E, E₀ ≠ univ → IsClosed E₀ → ρ '' E₀ ≠ univ) : E ≃ₜ A := ρ_cont.homeoOfEquivCompactToT2 diff --git a/Mathlib/Topology/Instances/AddCircle/Real.lean b/Mathlib/Topology/Instances/AddCircle/Real.lean index b360e250d0d12b..1b2157d1298162 100644 --- a/Mathlib/Topology/Instances/AddCircle/Real.lean +++ b/Mathlib/Topology/Instances/AddCircle/Real.lean @@ -58,7 +58,7 @@ namespace ZMod variable {N : ℕ} [NeZero N] /-- The `AddMonoidHom` from `ZMod N` to `ℝ / ℤ` sending `j mod N` to `j / N mod 1`. -/ -noncomputable def toAddCircle : ZMod N →+ UnitAddCircle := +def toAddCircle : ZMod N →+ UnitAddCircle := lift N ⟨AddMonoidHom.mk' (fun j ↦ ↑(j / N : ℝ)) (by simp [add_div]), by simp [div_self (NeZero.ne _)]⟩ diff --git a/Mathlib/Topology/Instances/ENNReal/Lemmas.lean b/Mathlib/Topology/Instances/ENNReal/Lemmas.lean index 06a8d14917dfe5..5ac2d95c1c3961 100644 --- a/Mathlib/Topology/Instances/ENNReal/Lemmas.lean +++ b/Mathlib/Topology/Instances/ENNReal/Lemmas.lean @@ -748,7 +748,7 @@ section truncateToReal /-- With truncation level `t`, the truncated cast `ℝ≥0∞ → ℝ` is given by `x ↦ (min t x).toReal`. Unlike `ENNReal.toReal`, this cast is continuous and monotone when `t ≠ ∞`. -/ -noncomputable def truncateToReal (t x : ℝ≥0∞) : ℝ := (min t x).toReal +def truncateToReal (t x : ℝ≥0∞) : ℝ := (min t x).toReal lemma truncateToReal_eq_toReal {t x : ℝ≥0∞} (t_ne_top : t ≠ ∞) (x_le : x ≤ t) : truncateToReal t x = x.toReal := by diff --git a/Mathlib/Topology/Instances/NNReal/Lemmas.lean b/Mathlib/Topology/Instances/NNReal/Lemmas.lean index cd1f53297b9ea3..2c06f8d7425691 100644 --- a/Mathlib/Topology/Instances/NNReal/Lemmas.lean +++ b/Mathlib/Topology/Instances/NNReal/Lemmas.lean @@ -60,7 +60,7 @@ theorem _root_.continuous_real_toNNReal : Continuous Real.toNNReal := /-- `Real.toNNReal` bundled as a continuous map for convenience. -/ @[simps -fullyApplied] -noncomputable def _root_.ContinuousMap.realToNNReal : C(ℝ, ℝ≥0) := +def _root_.ContinuousMap.realToNNReal : C(ℝ, ℝ≥0) := .mk Real.toNNReal continuous_real_toNNReal @[simp] diff --git a/Mathlib/Topology/Instances/Nat.lean b/Mathlib/Topology/Instances/Nat.lean index d14479e55807b7..1358948c2de137 100644 --- a/Mathlib/Topology/Instances/Nat.lean +++ b/Mathlib/Topology/Instances/Nat.lean @@ -22,7 +22,7 @@ open Filter Metric Set Topology namespace Nat -noncomputable instance : Dist ℕ := +instance : Dist ℕ := ⟨fun x y => dist (x : ℝ) y⟩ theorem dist_eq (x y : ℕ) : dist x y = |(x : ℝ) - y| := rfl diff --git a/Mathlib/Topology/MetricSpace/HausdorffDistance.lean b/Mathlib/Topology/MetricSpace/HausdorffDistance.lean index bc5626fe15264c..042cae9104078a 100644 --- a/Mathlib/Topology/MetricSpace/HausdorffDistance.lean +++ b/Mathlib/Topology/MetricSpace/HausdorffDistance.lean @@ -448,7 +448,7 @@ namespace EMetric open Metric @[deprecated (since := "2026-01-08")] -noncomputable alias infEdist := infEDist +alias infEdist := infEDist @[deprecated (since := "2026-01-08")] alias infEdist_empty := infEDist_empty @@ -503,7 +503,7 @@ alias _root_.IsCompact.exists_infEdist_eq_edist := _root_.IsCompact.exists_infED @[deprecated (since := "2026-01-08")] alias exists_pos_forall_lt_edist := exists_pos_forall_lt_edist @[deprecated (since := "2026-01-08")] alias infEdist_prod := infEDist_prod -@[deprecated (since := "2026-01-08")] noncomputable alias hausdorffEdist := hausdorffEDist +@[deprecated (since := "2026-01-08")] alias hausdorffEdist := hausdorffEDist @[deprecated (since := "2026-01-08")] alias hausdorffEdist_def := hausdorffEDist_def @[deprecated (since := "2026-01-08")] alias hausdorffEdist_self := hausdorffEDist_self @[deprecated (since := "2026-01-08")] alias hausdorffEdist_comm := hausdorffEDist_comm diff --git a/Mathlib/Topology/MetricSpace/PiNat.lean b/Mathlib/Topology/MetricSpace/PiNat.lean index a503e533a8f72a..7325479e19b3e7 100644 --- a/Mathlib/Topology/MetricSpace/PiNat.lean +++ b/Mathlib/Topology/MetricSpace/PiNat.lean @@ -1004,7 +1004,7 @@ def toPiNatEquiv : X ≃ PiNatEmbed X Y f where variable (X Y f) in /-- `X` equipped with the distance coming from `∀ i, Y i` embeds in `∀ i, Y i`. -/ -noncomputable def embed : PiNatEmbed X Y f → ∀ i, Y i := fun x i ↦ f i x.ofPiNat +def embed : PiNatEmbed X Y f → ∀ i, Y i := fun x i ↦ f i x.ofPiNat lemma embed_injective (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : Injective (embed X Y f) := by @@ -1015,7 +1015,7 @@ variable [Encodable ι] section PseudoEMetricSpace variable [∀ i, PseudoEMetricSpace (Y i)] -noncomputable instance : PseudoEMetricSpace (PiNatEmbed X Y f) := +instance : PseudoEMetricSpace (PiNatEmbed X Y f) := .induced (embed X Y f) PiCountable.pseudoEMetricSpace lemma edist_def (x y : PiNatEmbed X Y f) : @@ -1028,7 +1028,7 @@ end PseudoEMetricSpace section PseudoMetricSpace variable [∀ i, PseudoMetricSpace (Y i)] -noncomputable instance : PseudoMetricSpace (PiNatEmbed X Y f) := +instance : PseudoMetricSpace (PiNatEmbed X Y f) := .induced (embed X Y f) PiCountable.pseudoMetricSpace lemma dist_def (x y : PiNatEmbed X Y f) : @@ -1049,7 +1049,7 @@ variable [∀ i, EMetricSpace (Y i)] /-- If the functions `f i : X → Y i` separate points of `X`, then `X` can be embedded into `∀ i, Y i`. -/ -noncomputable abbrev emetricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : +abbrev emetricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : EMetricSpace (PiNatEmbed X Y f) := .induced (embed X Y f) (embed_injective separating_f) PiCountable.emetricSpace @@ -1065,7 +1065,7 @@ variable [∀ i, MetricSpace (Y i)] /-- If the functions `f i : X → Y i` separate points of `X`, then `X` can be embedded into `∀ i, Y i`. -/ -noncomputable abbrev metricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : +abbrev metricSpace (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : MetricSpace (PiNatEmbed X Y f) := (emetricSpace separating_f).toMetricSpace fun x y ↦ by simp [edist_dist] @@ -1083,7 +1083,7 @@ variable (X Y f) in /-- Homeomorphism between `X` and its embedding into `∀ i, Y i` induced by a separating family of continuous functions `f i : X → Y i`. -/ @[simps!] -noncomputable def toPiNatHomeo (continuous_f : ∀ i, Continuous (f i)) +def toPiNatHomeo (continuous_f : ∀ i, Continuous (f i)) (separating_f : Pairwise fun x y ↦ ∃ i, f i x ≠ f i y) : X ≃ₜ PiNatEmbed X Y f := (toPiNatEquiv X Y f).toHomeomorphOfIsInducing @@ -1110,7 +1110,7 @@ interval `I` so that the distances remain bounded. The function `(fun x n ↦ distDenseSeq n x) : X → ℕ → I` is a mapping from `X` to the Hilbert cube. -/ -noncomputable abbrev distDenseSeq (n : ℕ) (x : X) : I := +abbrev distDenseSeq (n : ℕ) (x : X) : I := have : Nonempty X := ⟨x⟩ projIcc _ _ zero_le_one <| dist x (denseSeq X n) diff --git a/Mathlib/Topology/Sheaves/CommRingCat.lean b/Mathlib/Topology/Sheaves/CommRingCat.lean index 58124e187e0c0c..ab93ab506d171f 100644 --- a/Mathlib/Topology/Sheaves/CommRingCat.lean +++ b/Mathlib/Topology/Sheaves/CommRingCat.lean @@ -79,7 +79,7 @@ structure SubmonoidPresheaf (F : X.Presheaf CommRingCat) where variable {F : X.Presheaf CommRingCat.{w}} (G : F.SubmonoidPresheaf) /-- The localization of a presheaf of `CommRing`s with respect to a `SubmonoidPresheaf`. -/ -protected noncomputable def SubmonoidPresheaf.localizationPresheaf : X.Presheaf CommRingCat where +protected def SubmonoidPresheaf.localizationPresheaf : X.Presheaf CommRingCat where obj U := CommRingCat.of <| Localization (G.obj U) map {_ _} i := CommRingCat.ofHom <| IsLocalization.map _ (F.map i).hom (G.map i) map_id U := by @@ -114,7 +114,7 @@ variable (F) /-- Given a submonoid at each of the stalks, we may define a submonoid presheaf consisting of sections whose restriction onto each stalk falls in the given submonoid. -/ @[simps] -noncomputable def submonoidPresheafOfStalk (S : ∀ x : X, Submonoid (F.stalk x)) : +def submonoidPresheafOfStalk (S : ∀ x : X, Submonoid (F.stalk x)) : F.SubmonoidPresheaf where obj U := ⨅ x : U.unop, Submonoid.comap (F.germ U.unop x.1 x.2).hom (S x) map {U V} i := by @@ -125,15 +125,15 @@ noncomputable def submonoidPresheafOfStalk (S : ∀ x : X, Submonoid (F.stalk x) rw [F.germ_res] exact hs ⟨_, i.unop.le x.2⟩ -noncomputable instance : Inhabited F.SubmonoidPresheaf := +instance : Inhabited F.SubmonoidPresheaf := ⟨F.submonoidPresheafOfStalk fun _ => ⊥⟩ /-- The localization of a presheaf of `CommRing`s at locally non-zero-divisor sections. -/ -noncomputable def totalQuotientPresheaf : X.Presheaf CommRingCat.{w} := +def totalQuotientPresheaf : X.Presheaf CommRingCat.{w} := (F.submonoidPresheafOfStalk fun x => (F.stalk x)⁰).localizationPresheaf /-- The map into the presheaf of total quotient rings -/ -noncomputable def toTotalQuotientPresheaf : F ⟶ F.totalQuotientPresheaf := +def toTotalQuotientPresheaf : F ⟶ F.totalQuotientPresheaf := SubmonoidPresheaf.toLocalizationPresheaf _ deriving Epi diff --git a/Mathlib/Topology/Sheaves/Skyscraper.lean b/Mathlib/Topology/Sheaves/Skyscraper.lean index 1799712bd64344..218e9a2b148d36 100644 --- a/Mathlib/Topology/Sheaves/Skyscraper.lean +++ b/Mathlib/Topology/Sheaves/Skyscraper.lean @@ -155,7 +155,7 @@ set_option backward.isDefEq.respectTransparency false in The cocone at `A` for the stalk functor of `skyscraperPresheaf p₀ A` when `y ∈ closure {p₀}` is a colimit -/ -noncomputable def skyscraperPresheafCoconeIsColimitOfSpecializes {y : X} (h : p₀ ⤳ y) : +def skyscraperPresheafCoconeIsColimitOfSpecializes {y : X} (h : p₀ ⤳ y) : IsColimit (skyscraperPresheafCoconeOfSpecializes p₀ A h) where desc c := eqToHom (if_pos trivial).symm ≫ c.ι.app (op ⊤) fac c U := by @@ -173,7 +173,7 @@ noncomputable def skyscraperPresheafCoconeIsColimitOfSpecializes {y : X} (h : p /-- If `y ∈ closure {p₀}`, then the stalk of `skyscraperPresheaf p₀ A` at `y` is `A`. -/ -noncomputable def skyscraperPresheafStalkOfSpecializes [HasColimits C] {y : X} (h : p₀ ⤳ y) : +def skyscraperPresheafStalkOfSpecializes [HasColimits C] {y : X} (h : p₀ ⤳ y) : (skyscraperPresheaf p₀ A).stalk y ≅ A := colimit.isoColimitCocone ⟨_, skyscraperPresheafCoconeIsColimitOfSpecializes p₀ A h⟩ @@ -199,7 +199,7 @@ set_option backward.isDefEq.respectTransparency false in The cocone at `*` for the stalk functor of `skyscraperPresheaf p₀ A` when `y ∉ closure {p₀}` is a colimit -/ -noncomputable def skyscraperPresheafCoconeIsColimitOfNotSpecializes {y : X} (h : ¬p₀ ⤳ y) : +def skyscraperPresheafCoconeIsColimitOfNotSpecializes {y : X} (h : ¬p₀ ⤳ y) : IsColimit (skyscraperPresheafCocone p₀ A y) := let h1 : ∃ U : OpenNhds y, p₀ ∉ U.1 := let ⟨U, ho, h₀, hy⟩ := not_specializes_iff_exists_open.mp h @@ -220,7 +220,7 @@ noncomputable def skyscraperPresheafCoconeIsColimitOfNotSpecializes {y : X} (h : /-- If `y ∉ closure {p₀}`, then the stalk of `skyscraperPresheaf p₀ A` at `y` is isomorphic to a terminal object. -/ -noncomputable def skyscraperPresheafStalkOfNotSpecializes [HasColimits C] {y : X} (h : ¬p₀ ⤳ y) : +def skyscraperPresheafStalkOfNotSpecializes [HasColimits C] {y : X} (h : ¬p₀ ⤳ y) : (skyscraperPresheaf p₀ A).stalk y ≅ terminal C := colimit.isoColimitCocone ⟨_, skyscraperPresheafCoconeIsColimitOfNotSpecializes _ A h⟩ @@ -419,7 +419,7 @@ instance [HasColimits C] : (skyscraperSheafFunctor p₀ : C ⥤ Sheaf C X).IsRig /-- Taking stalks is the left adjoint of `skyscraperSheafFunctor ⋙ Sheaf.forget`. Useful only when the fact that `skyscraperPresheafFunctor` factors through `Sheaf C X` is relevant. -/ -noncomputable def skyscraperSheafForgetAdjunction [HasColimits C] : +def skyscraperSheafForgetAdjunction [HasColimits C] : Presheaf.stalkFunctor C p₀ ⊣ skyscraperSheafFunctor p₀ ⋙ Sheaf.forget C X := skyscraperPresheafStalkAdjunction p₀ @@ -429,7 +429,6 @@ variable {A p₀} in On an open set not containing `p₀`, the value of skyscraper sheaf supported at `p₀` is a terminal object. -/ -noncomputable def isTerminalSkyscraperSheafObjObjOfNotMem {U : (Opens X)ᵒᵖ} (h : p₀ ∉ unop U) : IsTerminal ((skyscraperSheaf p₀ A).obj.obj U) := by dsimp diff --git a/Mathlib/Topology/Sheaves/Stalks.lean b/Mathlib/Topology/Sheaves/Stalks.lean index b700bd02c76c02..d651d99e92145c 100644 --- a/Mathlib/Topology/Sheaves/Stalks.lean +++ b/Mathlib/Topology/Sheaves/Stalks.lean @@ -350,7 +350,7 @@ variable {C} set_option backward.defeqAttrib.useBackward true in /-- If `x` specializes to `y`, then there is a natural map `F.stalk y ⟶ F.stalk x`. -/ -noncomputable def stalkSpecializes (F : X.Presheaf C) {x y : X} (h : x ⤳ y) : +def stalkSpecializes (F : X.Presheaf C) {x y : X} (h : x ⤳ y) : F.stalk y ⟶ F.stalk x := by refine colimit.desc _ ⟨_, fun U => ?_, ?_⟩ · exact diff --git a/Mathlib/Topology/VectorBundle/Basic.lean b/Mathlib/Topology/VectorBundle/Basic.lean index a2f4df1e3a9076..56dd9c28eb8370 100644 --- a/Mathlib/Topology/VectorBundle/Basic.lean +++ b/Mathlib/Topology/VectorBundle/Basic.lean @@ -535,7 +535,7 @@ variable (F E) [VectorBundle R F E] in /-- A continuous linear equivalence between the fiber at `b` and the model fiber, induced by the preferred trivialisation at each `b`. -/ @[simps!] -noncomputable def VectorBundle.continuousLinearEquivAt (b : B) : E b ≃L[R] F := +def VectorBundle.continuousLinearEquivAt (b : B) : E b ≃L[R] F := (trivializationAt F E b).continuousLinearEquivAt R b (FiberBundle.mem_baseSet_trivializationAt' b) /-! ### Constructing vector bundles -/