Skip to content

Commit

Permalink
perf: speed up some algebraic geometry with explicit universes (#12494)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben-VandeVelde committed Apr 29, 2024
1 parent a547a94 commit 888ba02
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicGeometry/AffineScheme.lean
Expand Up @@ -245,7 +245,7 @@ theorem isBasis_basicOpen (X : Scheme) [IsAffine X] :

namespace IsAffineOpen

variable {X Y : Scheme} {U : Opens X} (hU : IsAffineOpen U) (f : X.presheaf.obj (op U))
variable {X Y : Scheme.{u}} {U : Opens X} (hU : IsAffineOpen U) (f : X.presheaf.obj (op U))

local notation "𝖲𝗉𝖾𝖼 𝓞ₓ(U)" => Scheme.Spec.obj (op <| X.presheaf.obj <| op U)

Expand Down
2 changes: 1 addition & 1 deletion Mathlib/AlgebraicGeometry/FunctionField.lean
Expand Up @@ -106,7 +106,7 @@ instance functionField_isScalarTower [IrreducibleSpace X.carrier] (U : Opens X.c
rw [X.presheaf.germ_stalkSpecializes]
#align algebraic_geometry.function_field_is_scalar_tower AlgebraicGeometry.functionField_isScalarTower

noncomputable instance (R : CommRingCat) [IsDomain R] :
noncomputable instance (R : CommRingCat.{u}) [IsDomain R] :
Algebra R (Scheme.Spec.obj <| op R).functionField :=
RingHom.toAlgebra <| by change CommRingCat.of R ⟶ _; apply StructureSheaf.toStalk

Expand Down
4 changes: 3 additions & 1 deletion Mathlib/AlgebraicGeometry/Properties.lean
Expand Up @@ -23,6 +23,8 @@ We provide some basic properties of schemes
are reduced.
-/

universe u


open TopologicalSpace Opposite CategoryTheory CategoryTheory.Limits TopCat

Expand Down Expand Up @@ -89,7 +91,7 @@ theorem isReducedOfOpenImmersion {X Y : Scheme} (f : X ⟶ Y) [H : IsOpenImmersi
Y.presheaf.obj _ ≅ _).symm.commRingCatIsoToRingEquiv.injective
#align algebraic_geometry.is_reduced_of_open_immersion AlgebraicGeometry.isReducedOfOpenImmersion

instance {R : CommRingCat} [H : _root_.IsReduced R] : IsReduced (Scheme.Spec.obj <| op R) := by
instance {R : CommRingCat.{u}} [H : _root_.IsReduced R] : IsReduced (Scheme.Spec.obj <| op R) := by
apply (config := { allowSynthFailures := true }) isReducedOfStalkIsReduced
intro x; dsimp
have : _root_.IsReduced (CommRingCat.of <| Localization.AtPrime (PrimeSpectrum.asIdeal x)) := by
Expand Down

0 comments on commit 888ba02

Please sign in to comment.