@@ -325,6 +325,9 @@ lemma coe_support_eq_eq_iInter_zeroLocus :
325325 (I.support : Set X) = ⋂ U, X.zeroLocus (U := U.1 ) (I.ideal U) :=
326326 I.supportSet_eq_iInter_zeroLocus
327327
328+ @[simp] lemma mem_supportSet_iff_mem_support {I : IdealSheafData X} {x} :
329+ x ∈ I.supportSet ↔ x ∈ I.support := .rfl
330+
328331lemma mem_support_iff {I : IdealSheafData X} {x} :
329332 x ∈ I.support ↔ ∀ U, x ∈ X.zeroLocus (U := U.1 ) (I.ideal U) :=
330333 (Set.ext_iff.mp I.supportSet_eq_iInter_zeroLocus _).trans Set.mem_iInter
@@ -388,6 +391,65 @@ lemma support_eq_bot_iff : support I = ⊥ ↔ I = ⊤ := by
388391
389392end support
390393
394+ section Semiring
395+
396+ variable (I J K : X.IdealSheafData)
397+
398+ instance : Zero X.IdealSheafData where zero := ⊥
399+ instance : One X.IdealSheafData where one := ⊤
400+ instance : Add X.IdealSheafData where add := (· ⊔ ·)
401+
402+ instance : Mul X.IdealSheafData where
403+ mul I J := mkOfMemSupportIff (I.ideal * J.ideal) (by simp [Ideal.map_mul, map_ideal_basicOpen])
404+ (I.supportSet ∪ J.supportSet) fun U x hxU ↦ by
405+ simp [-mem_zeroLocus_iff, zeroLocus_mul, mem_support_iff_of_mem hxU]
406+
407+ instance : Pow X.IdealSheafData ℕ where
408+ pow I n := mkOfMemSupportIff (I.ideal ^ n) (by simp [Ideal.map_pow, map_ideal_basicOpen])
409+ (if n = 0 then ∅ else I.supportSet) fun U x hxU ↦ .symm <| by
410+ induction n <;> simp_all [-mem_zeroLocus_iff, zeroLocus_mul,
411+ pow_succ, mem_support_iff_of_mem hxU]
412+
413+ @[simp] lemma ideal_mul : (I * J).ideal = I.ideal * J.ideal := rfl
414+ @[simp] lemma support_mul : (I * J).support = I.support ⊔ J.support := rfl
415+ @[simp] lemma ideal_pow (n : ℕ) : (I ^ n).ideal = I.ideal ^ n := rfl
416+ @[simp] lemma support_pow_succ (n : ℕ) : (I ^ (n + 1 )).support = I.support := rfl
417+ lemma support_pow (n : ℕ) (hn : n ≠ 0 ) : (I ^ n).support = I.support := by cases n <;> simp_all
418+
419+ @[simp] lemma top_mul : ⊤ * I = I := by ext; simp
420+ @[simp] lemma mul_top : I * ⊤ = I := by ext; simp
421+ @[simp] lemma bot_mul : ⊥ * I = ⊥ := by ext; simp
422+ @[simp] lemma mul_bot : I * ⊥ = ⊥ := by ext; simp
423+ lemma mul_inf : I * (J ⊔ K) = I * J ⊔ I * K := by ext U : 2 ; exact mul_add _ _ _
424+ lemma inf_mul : (I ⊔ J) * K = I * K ⊔ J * K := by ext U : 2 ; exact add_mul _ _ _
425+
426+ instance : IdemCommSemiring X.IdealSheafData where
427+ add_assoc := sup_assoc
428+ zero_add := bot_sup_eq
429+ add_zero := sup_bot_eq
430+ add_comm := sup_comm
431+ mul_assoc _ _ _ := IdealSheafData.ext (mul_assoc _ _ _)
432+ mul_comm _ _ := IdealSheafData.ext (mul_comm _ _)
433+ zero_mul := bot_mul
434+ mul_zero := mul_bot
435+ one_mul := top_mul
436+ mul_one := mul_top
437+ nsmul := nsmulRec
438+ left_distrib := mul_inf
439+ right_distrib := inf_mul
440+ npow_zero _ := by ext; rfl
441+ npow_succ _ _ := by ext; rfl
442+ bot_le _ := bot_le
443+
444+ instance : IsOrderedRing X.IdealSheafData where
445+
446+ /-! We follow `Ideal` and set the simp normal form to be `⊥` and `⊤` and `⊔`. -/
447+ @[simp] lemma zero_eq_bot : (0 : X.IdealSheafData) = ⊥ := rfl
448+ @[simp] lemma one_eq_top : (1 : X.IdealSheafData) = ⊤ := rfl
449+ @[simp] lemma add_eq_sup : I + J = I ⊔ J := rfl
450+
451+ end Semiring
452+
391453section IsAffine
392454
393455/-- The ideal sheaf induced by an ideal of the global sections. -/
@@ -413,13 +475,22 @@ lemma ext_of_isAffine [IsAffine X] {I J : IdealSheafData X}
413475 (le_of_isAffine H.le).antisymm (le_of_isAffine H.ge)
414476
415477/-- Over affine schemes, ideal sheaves are in bijection with ideals of the global sections. -/
416- @[simps]
417- def equivOfIsAffine [IsAffine X] : IdealSheafData X ≃o Ideal Γ(X, ⊤) where
478+ def equivOfIsAffine [IsAffine X] : IdealSheafData X ≃+*o Ideal Γ(X, ⊤) where
418479 toFun := (ideal · ⟨⊤, isAffineOpen_top X⟩)
419480 invFun := ofIdealTop
420481 left_inv I := ext_of_isAffine (by simp)
421482 right_inv I := by simp
422- map_rel_iff' {I J} := ⟨le_of_isAffine, (· _)⟩
483+ map_mul' := by simp
484+ map_add' := by simp
485+ map_le_map_iff' := ⟨le_of_isAffine, (· _)⟩
486+
487+ @[simp]
488+ lemma equivOfIsAffine_apply [IsAffine X] (I : IdealSheafData X) :
489+ equivOfIsAffine I = I.ideal ⟨⊤, isAffineOpen_top X⟩ := rfl
490+
491+ @[simp]
492+ lemma equivOfIsAffine_symm_apply [IsAffine X] (I : Ideal Γ(X, ⊤)) :
493+ equivOfIsAffine.symm I = ofIdealTop I := rfl
423494
424495end IsAffine
425496
@@ -470,10 +541,16 @@ lemma radical_sup {I J : IdealSheafData X} :
470541
471542@[simp]
472543lemma radical_inf {I J : IdealSheafData X} :
473- radical (I ⊓ J) = ( radical I ⊓ radical J) := by
544+ radical (I ⊓ J) = radical I ⊓ radical J := by
474545 ext U : 2
475546 simp only [radical_ideal, ideal_inf, Pi.inf_apply, Ideal.radical_inf]
476547
548+ @[simp]
549+ lemma radical_mul {I J : IdealSheafData X} :
550+ radical (I * J) = radical I ⊓ radical J := by
551+ ext U : 2
552+ simp only [radical_ideal, ideal_mul, Pi.mul_apply, Ideal.radical_mul, ideal_inf, Pi.inf_apply]
553+
477554/-- The vanishing ideal sheaf of a closed set,
478555which is the largest ideal sheaf whose support is equal to it.
479556The reduced induced scheme structure on the closed set is the quotient of this ideal. -/
0 commit comments