From 1bdb65d3d1cd27fe43dbc47f37941ffe2731ee36 Mon Sep 17 00:00:00 2001 From: mortberg Date: Tue, 16 Apr 2024 08:42:05 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20agda/cub?= =?UTF-8?q?ical@598dfa5c85492f503d04164e79dc4bb0e1e54a24=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cubical.Algebra.Everything.html | 5 - Cubical.Algebra.ZariskiLattice.Base.html | 221 ----- ...cal.Algebra.ZariskiLattice.Properties.html | 209 ----- ...Algebra.ZariskiLattice.StructureSheaf.html | 411 --------- ...ZariskiLattice.StructureSheafPullback.html | 443 ---------- ...ebra.ZariskiLattice.UniversalProperty.html | 409 --------- Cubical.AlgebraicGeometry.Everything.html | 14 + ...aicGeometry.Functorial.ZFunctors.Base.html | 247 ++++++ ...etry.Functorial.ZFunctors.CompactOpen.html | 384 +++++++++ ...ry.Functorial.ZFunctors.OpenSubscheme.html | 203 +++++ ...metry.Functorial.ZFunctors.QcQsScheme.html | 84 ++ ...AlgebraicGeometry.ZariskiLattice.Base.html | 221 +++++ ...aicGeometry.ZariskiLattice.Properties.html | 209 +++++ ...eometry.ZariskiLattice.StructureSheaf.html | 411 +++++++++ ...ZariskiLattice.StructureSheafPullback.html | 443 ++++++++++ ...etry.ZariskiLattice.UniversalProperty.html | 409 +++++++++ Cubical.Categories.Instances.ZFunctors.html | 803 +----------------- Cubical.Papers.AffineSchemes.html | 292 +++---- Cubical.Papers.FunctorialQcQsSchemes.html | 226 ++--- Cubical.README.html | 23 +- 20 files changed, 2913 insertions(+), 2754 deletions(-) delete mode 100644 Cubical.Algebra.ZariskiLattice.Base.html delete mode 100644 Cubical.Algebra.ZariskiLattice.Properties.html delete mode 100644 Cubical.Algebra.ZariskiLattice.StructureSheaf.html delete mode 100644 Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html delete mode 100644 Cubical.Algebra.ZariskiLattice.UniversalProperty.html create mode 100644 Cubical.AlgebraicGeometry.Everything.html create mode 100644 Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base.html create mode 100644 Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen.html create mode 100644 Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme.html create mode 100644 Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme.html create mode 100644 Cubical.AlgebraicGeometry.ZariskiLattice.Base.html create mode 100644 Cubical.AlgebraicGeometry.ZariskiLattice.Properties.html create mode 100644 Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf.html create mode 100644 Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback.html create mode 100644 Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty.html diff --git a/Cubical.Algebra.Everything.html b/Cubical.Algebra.Everything.html index df4563ee1b..383a5ddaa3 100644 --- a/Cubical.Algebra.Everything.html +++ b/Cubical.Algebra.Everything.html @@ -164,9 +164,4 @@ import Cubical.Algebra.Semiring import Cubical.Algebra.Semiring.BigOps import Cubical.Algebra.SymmetricGroup -import Cubical.Algebra.ZariskiLattice.Base -import Cubical.Algebra.ZariskiLattice.Properties -import Cubical.Algebra.ZariskiLattice.StructureSheaf -import Cubical.Algebra.ZariskiLattice.StructureSheafPullback -import Cubical.Algebra.ZariskiLattice.UniversalProperty \ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.Base.html b/Cubical.Algebra.ZariskiLattice.Base.html deleted file mode 100644 index 2a0a60c6e5..0000000000 --- a/Cubical.Algebra.ZariskiLattice.Base.html +++ /dev/null @@ -1,221 +0,0 @@ - -Cubical.Algebra.ZariskiLattice.Base
{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Algebra.ZariskiLattice.Base where
-
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Equiv
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.Univalence
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Transport
-
-import Cubical.Data.Empty as 
-open import Cubical.Data.Bool
-open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
-                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
-                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
-                                      ; ·-identityʳ to ·ℕ-rid)
-open import Cubical.Data.Sigma.Base
-open import Cubical.Data.Sigma.Properties
-open import Cubical.Data.FinData
-open import Cubical.Data.Unit
-open import Cubical.Relation.Nullary
-open import Cubical.Relation.Binary
-open import Cubical.Relation.Binary.Order.Poset
-
-open import Cubical.Algebra.Ring
-open import Cubical.Algebra.Ring.Properties
-open import Cubical.Algebra.Ring.BigOps
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.BinomialThm
-open import Cubical.Algebra.CommRing.Ideal
-open import Cubical.Algebra.CommRing.Ideal.Sum
-open import Cubical.Algebra.CommRing.FGIdeal
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.Matrix
-
-open import Cubical.HITs.SetQuotients as SQ
-
-open Iso
-open BinaryRelation
-open isEquivRel
-
-private
-  variable
-     ℓ' : Level
-
-
-module ZarLat (R' : CommRing ) where
- open CommRingStr (snd R')
- open RingTheory (CommRing→Ring R')
- open Sum (CommRing→Ring R')
- open CommRingTheory R'
- open Exponentiation R'
- open BinomialThm R'
- open CommIdeal R'
- open RadicalIdeal R'
- open isCommIdeal
- open ProdFin R'
- open IdealSum R'
-
- private
-  R = fst R'
-  A = Σ[ n   ] (FinVec R n)
-  ⟨_⟩ : {n : }  FinVec R n  CommIdeal
-   V  =  V ⟩[ R' ]
-
- -- This is small!
- _≼_ : A  A  Type 
- (_ , α)  (_ , β) =  i  α i    β 
-
- private
-  isRefl≼ :  {a}  a  a
-  isRefl≼ i = ∈→∈√ _ _ (indInIdeal _ _ i)
-
-  isTrans≼ :  {a b c : A}  a  b  b  c  a  c
-  isTrans≼ a≼b b≼c i = (√FGIdealCharRImpl _ _ b≼c) _ (a≼b i)
-
- _∼_ :  A  A  Type  -- \sim
- α  β = (α  β) × (β  α)
-
- ∼PropValued : isPropValued (_∼_)
- ∼PropValued (_ , α) (_ , β) = isProp× (isPropΠ  i    β  .fst (α i) .snd))
-                                       (isPropΠ  i    α  .fst (β i) .snd))
-
- ∼EquivRel : isEquivRel (_∼_)
- reflexive ∼EquivRel _ = isRefl≼ , isRefl≼
- symmetric ∼EquivRel _ _ = Σ-swap-Iso .fun
- transitive ∼EquivRel _ _ _ a∼b b∼c = isTrans≼ (fst a∼b) (fst b∼c) , isTrans≼ (snd b∼c) (snd a∼b)
-
- -- lives in the same universe as R
- ZL : Type 
- ZL = A / (_∼_)
-
- --  need something big in our proofs though:
- _∼≡_ : A  A  Type (ℓ-suc )
- (_ , α) ∼≡ (_ , β) =   α     β 
-
- ≡→∼ :  {a b : A}  a ∼≡ b  a  b
- ≡→∼ r = √FGIdealCharLImpl _  _   x h  subst  p  x  p) r h)
-       , √FGIdealCharLImpl _  _   x h  subst  p  x  p) (sym r) h)
-
- ∼→≡ :  {a b : A}  a  b  a ∼≡ b
- ∼→≡ r = CommIdeal≡Char (√FGIdealCharRImpl _  _  (fst r))
-                        (√FGIdealCharRImpl _  _  (snd r))
-
- ∼≃≡ :  {a b : A}  (a  b)  (a ∼≡ b)
- ∼≃≡ = propBiimpl→Equiv (∼PropValued _ _) (isSetCommIdeal _ _) ∼→≡ ≡→∼
-
- 0z : ZL
- 0z = [ 0 ,  ()) ]
-
- 1z : ZL
- 1z = [ 1 , (replicateFinVec 1 1r) ]
-
- _∨z_ : ZL  ZL  ZL
- _∨z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel)
-                           (_ , α) (_ , β)  (_ , α ++Fin β))
-                           (_ , α) (_ , β)  ≡→∼ (cong 
-                             (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α))))
-    λ (_ , α) (_ , β) (_ , γ) α∼β  ≡→∼ (--need to show α∨γ ∼ β∨γ
-        α ++Fin γ       ≡⟨ cong  (FGIdealAddLemma _ α γ) 
-       ( α  +i  γ )    ≡⟨ sym (√+LContr _ _) 
-       (  α  +i  γ ) ≡⟨ cong  I   (I +i  γ )) (∼→≡ α∼β) 
-       (  β  +i  γ ) ≡⟨ √+LContr _ _ 
-       ( β  +i  γ )    ≡⟨ cong  (sym (FGIdealAddLemma _ β γ)) 
-        β ++Fin γ  )
-
- _∧z_ : ZL  ZL  ZL
- _∧z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel)
-                           (_ , α) (_ , β)  (_ , α ··Fin β))
-                           (_ , α) (_ , β)  ≡→∼ (cong 
-                             (FGIdealMultLemma _ α β ∙∙ ·iComm _ _ ∙∙ sym (FGIdealMultLemma _ β α))))
-    λ (_ , α) (_ , β) (_ , γ) α∼β  ≡→∼ (--need to show α∧γ ∼ β∧γ
-        α ··Fin γ        ≡⟨ cong  (FGIdealMultLemma _ α γ) 
-       ( α  ·i  γ )    ≡⟨ sym (√·LContr _ _) 
-       (  α  ·i  γ ) ≡⟨ cong  I   (I ·i  γ )) (∼→≡ α∼β) 
-       (  β  ·i  γ ) ≡⟨ √·LContr _ _ 
-       ( β  ·i  γ )    ≡⟨ cong  (sym (FGIdealMultLemma _ β γ)) 
-        β ··Fin γ  )
-
- -- join axioms
- ∨zAssoc :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∨z (𝔟 ∨z 𝔠)  (𝔞 ∨z 𝔟) ∨z 𝔠
- ∨zAssoc = SQ.elimProp3  _ _ _  squash/ _ _)
-          λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼ (cong  (IdealAddAssoc _ _ _ _)))
-
- ∨zComm :  (𝔞 𝔟 : ZL)  𝔞 ∨z 𝔟  𝔟 ∨z 𝔞
- ∨zComm = SQ.elimProp2  _ _  squash/ _ _)
-        λ (_ , α) (_ , β)  eq/ _ _
-          (≡→∼ (cong  (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α))))
-
- ∨zLid :  (𝔞 : ZL)  0z ∨z 𝔞  𝔞
- ∨zLid = SQ.elimProp  _  squash/ _ _) λ _  eq/ _ _ (reflexive ∼EquivRel _)
-
- ∨zRid :  (𝔞 : ZL)  𝔞 ∨z 0z  𝔞
- ∨zRid _ = ∨zComm _ _  ∨zLid _
-
-
- -- -- meet axioms
- ∧zAssoc :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∧z (𝔟 ∧z 𝔠)  (𝔞 ∧z 𝔟) ∧z 𝔠
- ∧zAssoc = SQ.elimProp3  _ _ _  squash/ _ _)
-    λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼
-      (  α ··Fin (β ··Fin γ)      ≡⟨ cong  (FGIdealMultLemma _ _ _) 
-        ( α  ·i  β ··Fin γ )    ≡⟨ cong  x   ( α  ·i x)) (FGIdealMultLemma _ _ _) 
-        ( α  ·i ( β  ·i  γ )) ≡⟨ cong  (·iAssoc _ _ _) 
-        (( α  ·i  β ) ·i  γ ) ≡⟨ cong  x   (x ·i  γ )) (sym (FGIdealMultLemma _ _ _)) 
-        ( α ··Fin β  ·i  γ )    ≡⟨ cong  (sym (FGIdealMultLemma _ _ _)) 
-         (α ··Fin β) ··Fin γ      ))
-
- ∧zComm :  (𝔞 𝔟 : ZL)  𝔞 ∧z 𝔟  𝔟 ∧z 𝔞
- ∧zComm = SQ.elimProp2  _ _  squash/ _ _)
-        λ (_ , α) (_ , β)  eq/ _ _ (≡→∼
-          (cong  (FGIdealMultLemma _ α β ∙∙ ·iComm _ _ ∙∙ sym (FGIdealMultLemma _ β α))))
-
- ∧zRid :  (𝔞 : ZL)  𝔞 ∧z 1z  𝔞
- ∧zRid = SQ.elimProp  _  squash/ _ _)
-   λ (_ , α)  eq/ _ _ (≡→∼ (cong 
-     ( α ··Fin (replicateFinVec 1 1r)  ≡⟨ FGIdealMultLemma _ _ _ 
-       α  ·i  (replicateFinVec 1 1r)  ≡⟨ cong ( α  ·i_) (contains1Is1 _ (indInIdeal _ _ zero)) 
-       α  ·i 1Ideal                     ≡⟨ ·iRid _ 
-       α  )))
-
-
- -- absorption and distributivity
- ∧zAbsorb∨z :  (𝔞 𝔟 : ZL)  𝔞 ∧z (𝔞 ∨z 𝔟)  𝔞
- ∧zAbsorb∨z = SQ.elimProp2  _ _  squash/ _ _)
-            λ (_ , α) (_ , β)  eq/ _ _ (≡→∼
-              (  α ··Fin (α ++Fin β)      ≡⟨ cong  (FGIdealMultLemma _ α (α ++Fin β)) 
-                ( α  ·i  α ++Fin β )    ≡⟨ cong  x   ( α  ·i x)) (FGIdealAddLemma _ α β) 
-                ( α  ·i ( α  +i  β )) ≡⟨ √·Absorb+ _ _ 
-                 α  ))
-
- ∧zLDist∨z :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∧z (𝔟 ∨z 𝔠)  (𝔞 ∧z 𝔟) ∨z (𝔞 ∧z 𝔠)
- ∧zLDist∨z = SQ.elimProp3  _ _ _  squash/ _ _)
-   λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼
-     (  α ··Fin (β ++Fin γ)             ≡⟨ cong  (FGIdealMultLemma _ _ _) 
-       ( α  ·i  β ++Fin γ )           ≡⟨ cong  x   ( α  ·i x)) (FGIdealAddLemma _ _ _) 
-       ( α  ·i ( β  +i  γ ))        ≡⟨ cong  (·iRdist+i _ _ _) 
-      -- L/R-dist are swapped
-      -- in Lattices vs Rings
-       ( α  ·i  β  +i  α  ·i  γ ) ≡⟨ cong₂  x y   (x +i y))
-                                                     (sym (FGIdealMultLemma _ _ _))
-                                                     (sym (FGIdealMultLemma _ _ _)) 
-       ( α ··Fin β  +i  α ··Fin γ )   ≡⟨ cong  (sym (FGIdealAddLemma _ _ _)) 
-        (α ··Fin β) ++Fin (α ··Fin γ)   ))
-
-
- ZariskiLattice : DistLattice 
- fst ZariskiLattice = ZL
- DistLatticeStr.0l (snd ZariskiLattice) = 0z
- DistLatticeStr.1l (snd ZariskiLattice) = 1z
- DistLatticeStr._∨l_ (snd ZariskiLattice) = _∨z_
- DistLatticeStr._∧l_ (snd ZariskiLattice) = _∧z_
- DistLatticeStr.isDistLattice (snd ZariskiLattice) =
-   makeIsDistLattice∧lOver∨l squash/ ∨zAssoc ∨zRid ∨zComm
-                                       ∧zAssoc ∧zRid ∧zComm ∧zAbsorb∨z ∧zLDist∨z
-
\ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.Properties.html b/Cubical.Algebra.ZariskiLattice.Properties.html deleted file mode 100644 index a7e84d80f6..0000000000 --- a/Cubical.Algebra.ZariskiLattice.Properties.html +++ /dev/null @@ -1,209 +0,0 @@ - -Cubical.Algebra.ZariskiLattice.Properties
{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Algebra.ZariskiLattice.Properties where
-
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Powerset using ()
-                                         renaming (_∈_ to _∈ₚ_ ; ∈-isProp to ∈ₚ-isProp)
-
-open import Cubical.Data.Nat using ()
-open import Cubical.Data.Sigma.Properties
-open import Cubical.Data.FinData
-open import Cubical.Relation.Binary.Order.Poset
-
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.Localisation
-open import Cubical.Algebra.CommRing.Ideal
-open import Cubical.Algebra.CommRing.FGIdeal
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Tactics.CommRingSolver
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.DistLattice.Downset
-
-open import Cubical.Algebra.ZariskiLattice.Base
-open import Cubical.Algebra.ZariskiLattice.UniversalProperty
-
-open import Cubical.HITs.SetQuotients as SQ
-import Cubical.HITs.PropositionalTruncation as PT
-
-
-private variable  : Level
-
-module _ (R : CommRing ) where
-  open Iso
-  open CommRingStr ⦃...⦄
-  open PosetStr ⦃...⦄
-
-  open Exponentiation R
-  open CommIdeal R
-  open RadicalIdeal R
-
-  open ZarLat R
-  open ZarLatUniversalProp R
-
-  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
-       using (IndPoset)
-
-  private
-    instance
-      _ = R .snd
-      _ = IndPoset .snd
-
-    ⟨_⟩ : {n : }  FinVec (fst R) n  CommIdeal
-     V  =  V ⟩[ R ]
-
-  unitLemmaZarLat :  f  D f  D 1r  f ∈ₚ R ˣ
-  unitLemmaZarLat f Df≡D1 = containsOne→Unit  (1∈√→1∈ _ 1∈√⟨f⟩)
-    where
-    D1≤Df : D 1r  D f
-    D1≤Df = subst (_≤ D f) Df≡D1 (is-refl _)
-
-    1∈√⟨f⟩ : 1r    replicateFinVec 1 f 
-    1∈√⟨f⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun D1≤Df .fst zero
-
-
-module LocDownSetIso (R : CommRing ) (f : R .fst) where
-  open CommRingStr ⦃...⦄
-  open DistLatticeStr ⦃...⦄
-  open PosetStr ⦃...⦄
-
-  open InvertingElementsBase R
-  open UniversalProp f
-
-  open ZarLat
-  open ZarLatUniversalProp
-  open IsSupport
-
-  open DistLatticeDownset (ZariskiLattice R)
-  open Order (DistLattice→Lattice (ZariskiLattice R))
-  open LatticeTheory (DistLattice→Lattice (ZariskiLattice R))
-  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (ZariskiLattice R)))
-       using () renaming (IndPoset to ZLRPoset)
-
-  open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice (ZariskiLattice R)))
-       using (≤-∧LPres ; ∧≤RCancel)
-
-  private
-    instance
-      _ = R .snd
-      _ = ZariskiLattice R .snd
-      _ = ZLRPoset .snd
-
-    powerLemma :  fⁿ  fⁿ ∈ₚ [ f ⁿ|n≥0]  D R f ∧l D R fⁿ  D R f
-    powerLemma fⁿ = PT.rec (squash/ _ _)
-                      λ (n , fⁿ≡f^n)  cong  x  D R f ∧l D R x) fⁿ≡f^n
-                                          ≤j→≤m _ _ (supportExpIneq (isSupportD R) n f)
-
-    locEqPowerLemma :  r fⁿ  fⁿ ∈ₚ [ f ⁿ|n≥0]
-                     D R f ∧l D R (r · fⁿ)  D R f ∧l D R r
-    locEqPowerLemma r fⁿ fⁿIsPow =
-      D R f ∧l D R (r · fⁿ)      ≡⟨ cong (D R f ∧l_) (isSupportD R .·≡∧ _ _) 
-      D R f ∧l (D R r ∧l D R fⁿ) ≡⟨ ∧lAssoc (D R f) (D R r) (D R fⁿ) 
-      (D R f ∧l D R r) ∧l D R fⁿ ≡⟨ ∧l.commAssocr (D R f) (D R r) (D R fⁿ) 
-      (D R f ∧l D R fⁿ) ∧l D R r ≡⟨ cong (_∧l D R r) (powerLemma _ fⁿIsPow) 
-      D R f ∧l D R r 
-
-    locEqPowerLemma2 :  r fᵐ fⁿ  fᵐ ∈ₚ [ f ⁿ|n≥0]  fⁿ ∈ₚ [ f ⁿ|n≥0]
-                     D R f ∧l D R (fᵐ · r · fⁿ)  D R f ∧l D R r
-    locEqPowerLemma2 r fᵐ fⁿ fᵐIsPow fⁿIsPow =
-      D R f ∧l D R (fᵐ · r · fⁿ) ≡⟨  locEqPowerLemma (fᵐ · r) fⁿ fⁿIsPow 
-      D R f ∧l D R (fᵐ · r)      ≡⟨ cong (D R f ∧l_) (isSupportD R .·≡∧ _ _) 
-      D R f ∧l (D R fᵐ ∧l D R r) ≡⟨ ∧lAssoc (D R f) (D R fᵐ) (D R r) 
-      (D R f ∧l D R fᵐ) ∧l D R r ≡⟨ cong (_∧l D R r) (powerLemma _ fᵐIsPow) 
-      D R f ∧l D R r 
-
-
-  locDownSupp : R[1/ f ]   (D R f)
-  locDownSupp =
-    SQ.rec
-      (isSetΣSndProp squash/ λ x  is-prop-valued x _)
-        -- the actual map: r/fⁿ ↦ Dr∧Df
-         (r , _)  (D R f ∧l D R r) , ≤m→≤j _ _ (∧≤RCancel (D R f) (D R r)))
-          -- coherence
-          λ (r , fⁿ , fⁿIsPow) (r' , fᵐ , fᵐIsPow) ((fᵏ , fᵏIsPow) , fᵏrfᵐ≡fᵏr'fⁿ)
-             Σ≡Prop  x  is-prop-valued x _)
-              (sym (locEqPowerLemma2 r fᵏ fᵐ fᵏIsPow fᵐIsPow)
-              ∙∙ cong  x  D R f ∧l D R x) fᵏrfᵐ≡fᵏr'fⁿ
-              ∙∙ locEqPowerLemma2 r' fᵏ fⁿ fᵏIsPow fⁿIsPow)
-
-  isSupportLocDownSupp : IsSupport R[1/ f ]AsCommRing (↓ᴰᴸ (D R f)) locDownSupp
-  pres0 isSupportLocDownSupp =
-    Σ≡Prop  x  is-prop-valued x _)
-           (cong (D R f ∧l_) (isSupportD R .pres0)  0lRightAnnihilates∧l (D R f))
-  pres1 isSupportLocDownSupp = Σ≡Prop  x  is-prop-valued x _) (∧lRid (D R f))
-  ·≡∧ isSupportLocDownSupp =
-    SQ.elimProp2
-       _ _  DistLatticeStr.is-set (↓ᴰᴸ (D R f) .snd) _ _)
-        λ (r , _) (r' , _)  Σ≡Prop  x  is-prop-valued x _)
-                               (cong (D R f ∧l_) (isSupportD R .·≡∧ r r')
-                                  ∧lLdist∧l (D R f) (D R r) (D R r'))
-  +≤∨ isSupportLocDownSupp =
-    SQ.elimProp2
-       _ _  DistLatticeStr.is-set (↓ᴰᴸ (D R f) .snd) _ _)
-        λ (r , fⁿ , fⁿIsPow) (r' , fᵐ , fᵐIsPow)
-           Σ≡Prop  x  is-prop-valued x _)
-                   (subst ((D R f ∧l D R ((r · fᵐ) + (r' · fⁿ))) ≤_)
-                          (path r r' fⁿ fᵐ fⁿIsPow fᵐIsPow)
-                          (ineq r r' fⁿ fᵐ))
-    where
-    ineq :  r r' fⁿ fᵐ
-          (D R f ∧l D R (r · fᵐ + r' · fⁿ))  (D R f ∧l (D R (r · fᵐ) ∨l D R (r' · fⁿ)))
-    ineq r r' fⁿ fᵐ = ≤m→≤j _ _ (≤-∧LPres (D R (r · fᵐ + r' · fⁿ))
-                                          (D R (r · fᵐ) ∨l D R (r' · fⁿ))
-                                          (D R f)
-                                (≤j→≤m _ _ (isSupportD R .+≤∨ (r · fᵐ) (r' · fⁿ))))
-
-    path :  r r' fⁿ fᵐ  fⁿ ∈ₚ [ f ⁿ|n≥0]  fᵐ ∈ₚ [ f ⁿ|n≥0]
-          D R f ∧l (D R (r · fᵐ) ∨l D R (r' · fⁿ))
-          (D R f ∧l D R r) ∨l (D R f ∧l D R r')
-    path r r' fⁿ fᵐ fⁿIsPow fᵐIsPow =
-      ∧lLdist∨l (D R f) (D R (r · fᵐ)) (D R (r' · fⁿ))
-       cong₂ (_∨l_) (locEqPowerLemma r fᵐ fᵐIsPow) (locEqPowerLemma r' fⁿ fⁿIsPow)
-
-
-  -- one direction of the equivalence
-  locToDownHom : DistLatticeHom (ZariskiLattice R[1/ f ]AsCommRing) (↓ᴰᴸ (D R f))
-  locToDownHom = ZLHasUniversalProp _ _ _ isSupportLocDownSupp .fst .fst
-
-  toDownSupp : R .fst   (D R f)
-  toDownSupp = locDownSupp  _/1
-
-  isSupportToDownSupp : IsSupport R (↓ᴰᴸ (D R f)) toDownSupp
-  isSupportToDownSupp = presSupportPrecomp /1AsCommRingHom _ _ isSupportLocDownSupp
-
-  -- the map ZL R → ZL R[1/f] → ↓Df is just Df∧_
-  -- does not type check without lossy unification!!!
-  toLocToDown≡ToDown : locToDownHom ∘dl inducedZarLatHom /1AsCommRingHom
-                      toDownHom (D R f)
-  toLocToDown≡ToDown =
-    cong fst (isContr→isProp
-      (ZLHasUniversalProp R (↓ᴰᴸ (D R f)) toDownSupp isSupportToDownSupp)
-        (locToDownHom ∘dl (inducedZarLatHom /1AsCommRingHom) , toLocToDownComm)
-        (toDownHom (D R f) , toDownComm))
-    where
-    toDownComm : toDownHom (D R f) .fst  (D R)  toDownSupp
-    toDownComm = funExt λ r  Σ≡Prop  x  is-prop-valued x _) refl
-
-    toLocToDownComm : locToDownHom .fst  inducedZarLatHom /1AsCommRingHom .fst  D R
-                     toDownSupp
-    toLocToDownComm =
-        locToDownHom .fst  (inducedZarLatHom /1AsCommRingHom) .fst  D R
-
-      ≡⟨ cong (locToDownHom .fst ∘_) (inducedZarLatHomComm /1AsCommRingHom) 
-
-        locToDownHom .fst  D R[1/ f ]AsCommRing  _/1
-
-      ≡⟨ ∘-assoc (locToDownHom .fst) (D R[1/ f ]AsCommRing) _/1 
-
-        (locToDownHom .fst  D R[1/ f ]AsCommRing)  _/1
-
-      ≡⟨ cong (_∘ _/1) (ZLHasUniversalProp _ _ _ isSupportLocDownSupp .fst .snd) 
-
-        locDownSupp  _/1 
-
\ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html b/Cubical.Algebra.ZariskiLattice.StructureSheaf.html deleted file mode 100644 index 84752c6a33..0000000000 --- a/Cubical.Algebra.ZariskiLattice.StructureSheaf.html +++ /dev/null @@ -1,411 +0,0 @@ - -Cubical.Algebra.ZariskiLattice.StructureSheaf
{-
-
-   This module defines the basic opens of the Zariski lattice and proves that they're a basis of the lattice.
-   It also contains the construction of the structure presheaf and a proof of the sheaf property on basic opens,
-   using the theory developed in the module PreSheafFromUniversalProp and its toSheaf.lemma.
-   Note that the structure sheaf is a functor into R-algebras and not just commutative rings.
-
--}
-
-{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Algebra.ZariskiLattice.StructureSheaf where
-
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Equiv
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.Univalence
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Transport
-open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence)
-                                         renaming ( _∈_ to _∈ₚ_ ; subst-∈ to subst-∈ₚ
-                                                  ; ∈-isProp to ∈ₚ-isProp)
-
-import Cubical.Data.Empty as 
-open import Cubical.Data.Bool hiding (_≤_)
-open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
-                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
-                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
-                                      ; ·-identityʳ to ·ℕ-rid)
-open import Cubical.Data.Sigma.Base
-open import Cubical.Data.Sigma.Properties
-open import Cubical.Data.FinData
-open import Cubical.Data.Unit
-open import Cubical.Relation.Nullary
-open import Cubical.Relation.Binary
-open import Cubical.Relation.Binary.Order.Poset
-
-open import Cubical.Algebra.Ring
-open import Cubical.Algebra.Ring.Properties
-open import Cubical.Algebra.Ring.BigOps
-open import Cubical.Algebra.Algebra
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.BinomialThm
-open import Cubical.Algebra.CommRing.Ideal
-open import Cubical.Algebra.CommRing.FGIdeal
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Algebra.CommRing.Localisation
-open import Cubical.Algebra.CommRing.Instances.Unit
-open import Cubical.Algebra.CommAlgebra.Base
-open import Cubical.Algebra.CommAlgebra.Properties
-open import Cubical.Algebra.CommAlgebra.Localisation
-open import Cubical.Tactics.CommRingSolver
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.DistLattice.Basis
-open import Cubical.Algebra.DistLattice.BigOps
-open import Cubical.Algebra.ZariskiLattice.Base
-open import Cubical.Algebra.ZariskiLattice.UniversalProperty
-
-open import Cubical.Categories.Category.Base hiding (_[_,_])
-open import Cubical.Categories.Functor
-open import Cubical.Categories.NaturalTransformation
-open import Cubical.Categories.Limits.Limits
-open import Cubical.Categories.Limits.Terminal
-open import Cubical.Categories.Limits.RightKan
-
-open import Cubical.Categories.Instances.CommRings
-open import Cubical.Categories.Instances.CommAlgebras
-open import Cubical.Categories.Instances.DistLattice
-open import Cubical.Categories.Instances.Semilattice
-
-open import Cubical.Categories.DistLatticeSheaf.Diagram
-open import Cubical.Categories.DistLatticeSheaf.Base
-open import Cubical.Categories.DistLatticeSheaf.Extension
-
-open import Cubical.HITs.SetQuotients as SQ
-open import Cubical.HITs.PropositionalTruncation as PT
-
-open Iso
-open BinaryRelation
-open isEquivRel
-
-
-module _ { : Level} (R' : CommRing ) where
- open CommRingStr ⦃...⦄
- open RingTheory (CommRing→Ring R')
- open CommIdeal R'
- open isCommIdeal
-
- open ZarLat R'
- open ZarLatUniversalProp R'
- open IsSupport
-
- open Join ZariskiLattice
- open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
- open IsBasis
-
- private
-  R = fst R'
-  instance
-   _ = snd R'
-  ⟨_⟩ₛ : R  CommIdeal -- s is for singleton
-   f ⟩ₛ =  replicateFinVec 1 f ⟩[ R' ]
-
- BasicOpens :  ZL
- BasicOpens 𝔞 = (∃[ f  R ] (D f  𝔞)) , isPropPropTrunc
-
- BO : Type 
- BO = Σ[ 𝔞  ZL ] (𝔞 ∈ₚ BasicOpens)
-
- basicOpensAreBasis : IsBasis ZariskiLattice BasicOpens
- contains1 basicOpensAreBasis =  1r , isSupportD .pres1 ∣₁
- ∧lClosed basicOpensAreBasis 𝔞 𝔟 = map2
-            λ (f , Df≡𝔞) (g , Dg≡𝔟)  (f · g) , isSupportD .·≡∧ f g  cong₂ (_∧z_) Df≡𝔞 Dg≡𝔟
- ⋁Basis basicOpensAreBasis = elimProp  _  isPropPropTrunc) Σhelper
-  where
-  Σhelper : (a : Σ[ n   ] FinVec R n)
-           ∃[ n   ] Σ[ α  FinVec ZL n ] (∀ i  α i ∈ₚ BasicOpens) × ( α  [ a ])
-  Σhelper (n , α) =  n , (D  α) ,  i   α i , refl ∣₁) , ⋁D≡ α ∣₁
-
- -- important fact that D(f)≤D(g) → isContr (R-Hom R[1/f] R[1/g])
- module _ where
-   open InvertingElementsBase R'
-
-   contrHoms : (f g : R)
-              D f  D g
-              isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra)
-   contrHoms f g Df≤Dg = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra
-     λ s s∈[gⁿ|n≥0]  subst-∈ₚ (R[1/ f ]AsCommRing ˣ)
-       (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere
-         (RadicalLemma.toUnit R' f g f∈√⟨g⟩ s s∈[gⁿ|n≥0])
-    where
-    open AlgLoc R' [ g ⁿ|n≥0] (powersFormMultClosedSubset g)
-         renaming (S⁻¹RHasAlgUniversalProp to R[1/g]HasAlgUniversalProp)
-    open S⁻¹RUniversalProp R' [ f ⁿ|n≥0] (powersFormMultClosedSubset f) using (_/1)
-    open RadicalIdeal R'
-
-    private
-     instance
-      _ = snd R[1/ f ]AsCommRing
-
-    f∈√⟨g⟩ : f    g ⟩ₛ
-    f∈√⟨g⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun Df≤Dg .fst zero
-
-
- -- The structure presheaf on BO
- ZariskiCat = DistLatticeCategory ZariskiLattice
-
- BOCat : Category  
- BOCat = ΣPropCat ZariskiCat BasicOpens
-
- private
-  P : ZL  Type _
-  P 𝔞 = Σ[ f  R ] (D f  𝔞) -- the untruncated defining property
-
-  𝓕 : Σ ZL P  CommAlgebra R' _
-  𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f]
-
-  uniqueHom :  (x y : Σ ZL P)  (fst x)  (fst y)  isContr (CommAlgebraHom (𝓕 y) (𝓕 x))
-  uniqueHom (𝔞 , f , p) (𝔟 , g , q) 𝔞≤𝔟 = contrHoms f g Df≤Dg
-    where
-    Df≤Dg : D f  D g
-    Df≤Dg = subst2 _≤_ (sym p) (sym q) 𝔞≤𝔟
-
-
-
- open PreSheafFromUniversalProp ZariskiCat P 𝓕 uniqueHom
- 𝓞ᴮ : Functor (BOCat ^op) CommRingsCategory
- 𝓞ᴮ = funcComp (ForgetfulCommAlgebra→CommRing R') universalPShf
-
- -- The extension
- open Functor
- open PreSheafExtension ZariskiLattice CommRingsCategory LimitsCommRingsCategory BasicOpens
- 𝓞 : Functor (ZariskiCat ^op) CommRingsCategory
- 𝓞 = DLRan 𝓞ᴮ
-
- toBasisPath :  f  𝓞 .F-ob (D f)  𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)
- toBasisPath f = cong  F  F .F-ob (D f ,  f , refl ∣₁))
-                      (NatIsoToPath isUnivalentCommRingsCategory (DLRanNatIso 𝓞ᴮ))
-
-
- open InvertingElementsBase R'
- private
-   Forgetful = ForgetfulCommAlgebra→CommRing R' {ℓ' = }
-
-   𝓞ᴮOb≡ :  f  𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)  R[1/ f ]AsCommRing
-   𝓞ᴮOb≡ f = 𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)     ≡⟨ refl 
-     -- all of this should hold by refl -----------------------------------------------------------
-     -- but somehow Agda takes forever to type-check if you don't use -----------------------------
-     -- the lemma funcCompOb≡ (which is just refl itself) or if you leave out ---------------------
-     -- any of the intermediate refl steps --------------------------------------------------------
-       (funcComp (ForgetfulCommAlgebra→CommRing R') universalPShf) .F-ob (D f ,  f , refl ∣₁)
-     ≡⟨ funcCompOb≡ Forgetful universalPShf _ 
-       Forgetful .F-ob R[1/ f ]AsCommAlgebra
-     ≡⟨ refl 
-     ----------------------------------------------------------------------------------------------
-     CommAlgebra→CommRing R[1/ f ]AsCommAlgebra ≡⟨ invElCommAlgebra→CommRingPath f 
-     R[1/ f ]AsCommRing                         
-
- baseSections :  f  𝓞 .F-ob (D f)  R[1/ f ]AsCommRing
- baseSections f = toBasisPath f  𝓞ᴮOb≡ f
-
- globalSection : 𝓞 .F-ob (D 1r)  R'
- globalSection = baseSections 1r   invertingUnitsPath _ _ (Units.RˣContainsOne _)
-
-
- open SheafOnBasis ZariskiLattice (CommRingsCategory { = }) BasicOpens basicOpensAreBasis
- open DistLatticeStr ⦃...⦄
- private instance _ = snd ZariskiLattice
-
- isSheaf𝓞ᴮ : isDLBasisSheaf 𝓞ᴮ
- isSheaf𝓞ᴮ {n = n} α = curriedHelper (fst  α) (snd  α)
-  where
-  curriedHelper : (𝔞 : FinVec ZL n) (𝔞∈BO :  i  𝔞 i ∈ₚ BasicOpens)
-                  (⋁𝔞∈BO :  𝔞 ∈ₚ BasicOpens)
-                 isLimCone _ _ (F-cone 𝓞ᴮ
-                                (condCone.B⋁Cone  i  𝔞 i , 𝔞∈BO i) ⋁𝔞∈BO))
-  curriedHelper 𝔞 = PT.elimFin  _  isPropΠ  _  isPropIsLimCone _ _ _))
-                     λ x  PT.elim  _  isPropIsLimCone _ _ _) (Σhelper x)
-    where
-    Σhelper : (x :  i  Σ[ f  R ] D f  𝔞 i)
-              (y : Σ[ g  R ] D g   𝔞)
-             isLimCone _ _ (F-cone 𝓞ᴮ
-                            (condCone.B⋁Cone  i  𝔞 i ,  x i ∣₁)  y ∣₁))
-    Σhelper x y = toSheaf.toLimCone theSheafCone doubleLocAlgCone
-                                    algPaths isLimConeDoubleLocAlgCone
-      where
-      f = fst  x
-      h = fst y
-      Df≡𝔞 = snd  x
-      Dh≡⋁𝔞 = snd y
-
-      open condCone  i  𝔞 i ,  f i , Df≡𝔞 i ∣₁)
-      theSheafCone = B⋁Cone  h , Dh≡⋁𝔞 ∣₁
-
-      DHelper : D h  [ n , f ] --⋁ (D ∘ f)
-      DHelper = Dh≡⋁𝔞  ⋁Ext  i  sym (Df≡𝔞 i))  ⋁D≡ f
-
-      open Exponentiation R'
-      open RadicalIdeal R'
-      open DoubleLoc R' h
-      open isMultClosedSubset (powersFormMultClosedSubset h)
-      open S⁻¹RUniversalProp R' [ h ⁿ|n≥0] (powersFormMultClosedSubset h)
-      open CommIdeal R[1/ h ]AsCommRing using ()
-                                        renaming (CommIdeal to CommIdealₕ ; _∈_ to _∈ₕ_)
-
-      instance
-       _ = snd R[1/ h ]AsCommRing
-
-      -- crucial facts about radical ideals
-      h∈√⟨f⟩ : h    f ⟩[ R' ]
-      h∈√⟨f⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun DHelper .fst zero
-
-      f∈√⟨h⟩ :  i  f i    h ⟩ₛ
-      f∈√⟨h⟩ i = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun
-                   (sym DHelper) .fst i
-
-      ff∈√⟨h⟩ :  i j  f i · f j    h ⟩ₛ
-      ff∈√⟨h⟩ i j =   h ⟩ₛ .snd .·Closed (f i) (f∈√⟨h⟩ j)
-
-      f/1 : FinVec (R[1/ h ]) n
-      f/1 i = (f i) /1
-
-      1∈⟨f/1⟩ : 1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
-      1∈⟨f/1⟩ = fromFact h∈√⟨f⟩
-       where
-       fromFact : h    f ⟩[ R' ]  1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
-       fromFact = PT.rec isPropPropTrunc (uncurry helper1)
-        where
-        helper1 : (m : )  h ^ m   f ⟩[ R' ]  1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
-        helper1 m = PT.map helper2
-         where
-         helper2 : Σ[ α  FinVec R n ]
-                     h ^ m  linearCombination R' α f
-                  Σ[ β  FinVec R[1/ h ] n ]
-                     1r  linearCombination R[1/ h ]AsCommRing β f/1
-         helper2 (α , hᵐ≡∑αf) = β , path
-          where
-          open Units R[1/ h ]AsCommRing
-          open Sum (CommRing→Ring R[1/ h ]AsCommRing)
-          open IsRingHom (snd /1AsCommRingHom)
-          open SumMap _ _ /1AsCommRingHom
-          instance
-           h⁻ᵐ : (h ^ m) /1 ∈ₚ (R[1/ h ]AsCommRing ˣ)
-           h⁻ᵐ = [ 1r , h ^ m ,  m , refl ∣₁ ]
-               , eq/ _ _ ((1r , containsOne) , solve! R')
-
-          β : FinVec R[1/ h ] n
-          β i = ((h ^ m) /1) ⁻¹ · α i /1
-
-          /1Path : (h ^ m) /1    i  α i /1 · f i /1)
-          /1Path = (h ^ m) /1
-                 ≡⟨ cong (_/1) hᵐ≡∑αf 
-                   (linearCombination R' α f) /1
-                 ≡⟨ ∑Map  i  α i · f i) 
-                     i  (α i · f i) /1)
-                 ≡⟨ ∑Ext  i  pres· (α i) (f i)) 
-                     i  α i /1 · f i /1) 
-
-          path : 1r    i   β i · f/1 i)
-          path = 1r
-               ≡⟨ sym (·-linv ((h ^ m) /1)) 
-                 ((h ^ m) /1) ⁻¹ · (h ^ m) /1
-               ≡⟨ cong (((h ^ m) /1) ⁻¹ ·_) /1Path 
-                 ((h ^ m) /1) ⁻¹ ·   i  α i /1 · f i /1)
-               ≡⟨ ∑Mulrdist (((h ^ m) /1) ⁻¹)  i  α i /1 · f i /1) 
-                   i   ((h ^ m) /1) ⁻¹ · (α i /1 · f i /1))
-               ≡⟨ ∑Ext  i  ·Assoc (((h ^ m) /1) ⁻¹) (α i /1) (f i /1)) 
-                   i   β i · f/1 i) 
-
-
-      -- Putting everything together:
-      -- First, the diagram and limiting cone we get from our lemma
-      -- in Cubical.Algebra.Localisation.Limit with R=R[1/h]
-      --      ⟨ f₁/1 , ... , fₙ/1 ⟩ = R[1/h]
-      --   ⇒  R[1/h] = lim { R[1/h][1/fᵢ] → R[1/h][1/fᵢfⱼ] ← R[1/h][1/fⱼ] }
-      doubleLocDiag = locDiagram R[1/ h ]AsCommRing f/1
-      doubleLocCone = locCone R[1/ h ]AsCommRing f/1
-      isLimConeDoubleLocCone : isLimCone _ _ doubleLocCone
-      isLimConeDoubleLocCone = isLimConeLocCone R[1/ h ]AsCommRing f/1 1∈⟨f/1⟩
-
-      -- this gives a limiting cone in R-algebras via _/1/1 : R → R[1/h][1/fᵢ]
-      -- note that the pair case looks more complicated as
-      -- R[1/h][(fᵢfⱼ)/1/1] =/= R[1/h][(fᵢ/1 · fⱼ/1)/1]
-      -- definitionally
-      open Cone
-      open IsRingHom
-
-      module D i = DoubleLoc R' h (f i)
-
-      /1/1Cone : Cone doubleLocDiag R'
-      coneOut /1/1Cone (sing i) = D./1/1AsCommRingHom i
-      fst (coneOut /1/1Cone (pair i j i<j)) r =
-          [ [ r , 1r ,  0 , refl ∣₁ ] , 1r ,  0 , refl ∣₁ ]
-      pres0 (snd (coneOut /1/1Cone (pair i j i<j))) = refl
-      pres1 (snd (coneOut /1/1Cone (pair i j i<j))) = refl
-      pres+ (snd (coneOut /1/1Cone (pair i j i<j))) x y =
-        cong [_] (≡-× (cong [_] (≡-×
-                      (cong₂ _+_ (solve! R') (solve! R'))
-                      (Σ≡Prop  _  isPropPropTrunc) (solve! R'))))
-                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
-      pres· (snd (coneOut /1/1Cone (pair i j i<j))) x y =
-        cong [_] (≡-× (cong [_] (≡-× refl
-                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r)))))
-                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
-      pres- (snd (coneOut /1/1Cone (pair i j i<j))) _ = refl
-      coneOutCommutes /1/1Cone idAr = idCompCommRingHom _
-      coneOutCommutes /1/1Cone singPairL = RingHom≡ (funExt
-         x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
-        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
-        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
-      coneOutCommutes /1/1Cone singPairR = RingHom≡ (funExt
-         x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
-        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
-        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
-
-      open LimitFromCommRing R' R[1/ h ]AsCommRing (DLShfDiag n )
-                             doubleLocDiag doubleLocCone /1/1Cone
-
-      -- get the desired cone in algebras:
-      isConeMor/1 : isConeMor /1/1Cone doubleLocCone /1AsCommRingHom
-      isConeMor/1 = isConeMorSingLemma /1/1Cone doubleLocCone
-                       _  RingHom≡ (funExt  _  refl)))
-
-      doubleLocAlgCone = algCone /1AsCommRingHom isConeMor/1
-      isLimConeDoubleLocAlgCone : isLimCone _ _ doubleLocAlgCone
-      isLimConeDoubleLocAlgCone = reflectsLimits /1AsCommRingHom isConeMor/1
-                                                 isLimConeDoubleLocCone
-
-      -- we only give the paths on objects
-      -- R[1/h][1/fᵢ] ≡ [1/fᵢ]
-      -- R[1/h][1/fᵢfⱼ] ≡ R[1/fᵢfⱼ]
-      algPaths :  v  F-ob algDiag v  F-ob (funcComp universalPShf BDiag) v
-      algPaths (sing i) = doubleLocCancel (f∈√⟨h⟩ i)
-        where
-        open DoubleAlgLoc R' h (f i)
-      algPaths (pair i j i<j) = path  doubleLocCancel (ff∈√⟨h⟩ i j)
-        where
-        open DoubleAlgLoc R' h (f i · f j)
-        open CommAlgChar R'
-
-        -- the naive def.
-        R[1/h][1/fᵢfⱼ]AsCommRingReg = InvertingElementsBase.R[1/_]AsCommRing
-                                        R[1/ h ]AsCommRing ((f i · f j) /1)
-
-        path : toCommAlg ( F-ob doubleLocDiag (pair i j i<j)
-                         , coneOut /1/1Cone (pair i j i<j))
-              toCommAlg (R[1/h][1/fᵢfⱼ]AsCommRingReg , /1/1AsCommRingHom (f i · f j))
-        path =  cong toCommAlg (ΣPathP (p , q))
-          where
-          eqInR[1/h] : (f i /1) · (f j /1)  (f i · f j) /1
-          eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· (f i) (f j))
-
-          p : F-ob doubleLocDiag (pair i j i<j)  R[1/h][1/fᵢfⱼ]AsCommRingReg
-          p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i)
-
-          q : PathP  i  CommRingHom R' (p i)) (coneOut /1/1Cone (pair i j i<j))
-                                                 (/1/1AsCommRingHom (f i · f j))
-          q = toPathP (RingHom≡ (funExt (
-                λ r  cong [_] (≡-× (cong [_] (≡-× (transportRefl _  transportRefl r)
-                    (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))
-                    (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))))
-
-
- -- our main result
- isSheaf𝓞 : isDLSheaf _ _ 𝓞
- isSheaf𝓞 = isDLSheafDLRan _ _ isSheaf𝓞ᴮ
-
\ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html b/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html deleted file mode 100644 index ec2ae6f445..0000000000 --- a/Cubical.Algebra.ZariskiLattice.StructureSheafPullback.html +++ /dev/null @@ -1,443 +0,0 @@ - -Cubical.Algebra.ZariskiLattice.StructureSheafPullback
{-
-
-   This module defines the basic opens of the Zariski lattice and proves that
-   they're a basis of the lattice. It also contains the construction of the
-   structure presheaf and a proof of the sheaf property on basic opens,
-   using the theory developed in the module PreSheafFromUniversalProp and its toSheaf.lemma.
-   Note that the structure sheaf is a functor into R-algebras and not just commutative rings.
-
--}
-
-{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Algebra.ZariskiLattice.StructureSheafPullback where
-
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Equiv
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.Univalence
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Transport
-open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence)
-                                         renaming (_∈_ to _∈ₚ_ ; subst-∈ to subst-∈ₚ)
-
-import Cubical.Data.Empty as 
-open import Cubical.Data.Bool hiding (_≤_)
-open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
-                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
-                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
-                                      ; ·-identityʳ to ·ℕ-rid)
-open import Cubical.Data.Sigma.Base
-open import Cubical.Data.Sigma.Properties
-open import Cubical.Data.FinData
-open import Cubical.Data.Unit
-open import Cubical.Relation.Nullary
-open import Cubical.Relation.Binary
-open import Cubical.Relation.Binary.Order.Poset
-
-open import Cubical.Algebra.Ring
-open import Cubical.Algebra.Ring.Properties
-open import Cubical.Algebra.Ring.BigOps
-open import Cubical.Algebra.Algebra
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.BinomialThm
-open import Cubical.Algebra.CommRing.Ideal
-open import Cubical.Algebra.CommRing.FGIdeal
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Algebra.CommRing.Localisation.Base
-open import Cubical.Algebra.CommRing.Localisation.UniversalProperty
-open import Cubical.Algebra.CommRing.Localisation.InvertingElements
-open import Cubical.Algebra.CommRing.Localisation.PullbackSquare
-open import Cubical.Algebra.CommAlgebra.Base
-open import Cubical.Algebra.CommAlgebra.Properties
-open import Cubical.Algebra.CommAlgebra.Localisation
-open import Cubical.Algebra.CommAlgebra.Instances.Unit
-open import Cubical.Tactics.CommRingSolver
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.DistLattice.Basis
-open import Cubical.Algebra.DistLattice.BigOps
-open import Cubical.Algebra.ZariskiLattice.Base
-open import Cubical.Algebra.ZariskiLattice.UniversalProperty
-
-open import Cubical.Categories.Category.Base hiding (_[_,_])
-open import Cubical.Categories.Functor
-open import Cubical.Categories.Limits.Terminal
-open import Cubical.Categories.Limits.Pullback
-open import Cubical.Categories.Instances.CommAlgebras
-open import Cubical.Categories.Instances.DistLattice
-open import Cubical.Categories.Instances.Semilattice
-open import Cubical.Categories.DistLatticeSheaf.Base
-
-open import Cubical.HITs.SetQuotients as SQ
-open import Cubical.HITs.PropositionalTruncation as PT
-
-open Iso
-open BinaryRelation
-open isEquivRel
-
-private
-  variable
-     ℓ' : Level
-
-
-
-module _ (R' : CommRing ) where
- open CommRingStr ⦃...⦄
- open RingTheory (CommRing→Ring R')
- open CommIdeal R'
- open isCommIdeal
-
- open ZarLat R'
- open ZarLatUniversalProp R'
- open IsSupport
-
- open Join ZariskiLattice
- open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
- open IsBasis
-
- private
-  R = fst R'
-  instance
-   _ = snd R'
-  ⟨_⟩ : R  CommIdeal
-   f  =  replicateFinVec 1 f ⟩[ R' ]
-  ⟨_⟩ₚ : R × R  CommIdeal -- p is for pair
-   f , g ⟩ₚ =  replicateFinVec 1 f ++Fin replicateFinVec 1 g ⟩[ R' ]
-
-
- BasicOpens :  ZL
- BasicOpens 𝔞 = (∃[ f  R ] (D f  𝔞)) , isPropPropTrunc
-
- BO : Type 
- BO = Σ[ 𝔞  ZL ] (𝔞 ∈ₚ BasicOpens)
-
- basicOpensAreBasis : IsBasis ZariskiLattice BasicOpens
- contains1 basicOpensAreBasis =  1r , isSupportD .pres1 ∣₁
- ∧lClosed basicOpensAreBasis 𝔞 𝔟 = map2
-            λ (f , Df≡𝔞) (g , Dg≡𝔟)  (f · g) , isSupportD .·≡∧ f g  cong₂ (_∧z_) Df≡𝔞 Dg≡𝔟
- ⋁Basis basicOpensAreBasis = elimProp  _  isPropPropTrunc) Σhelper
-  where
-  Σhelper : (a : Σ[ n   ] FinVec R n)
-           ∃[ n   ] Σ[ α  FinVec ZL n ] (∀ i  α i ∈ₚ BasicOpens) × ( α  [ a ])
-  Σhelper (n , α) =  n , (D  α) ,  i   α i , refl ∣₁) , path ∣₁
-   where
-   path :  (D  α)  [ n , α ]
-   path = funExt⁻ (cong fst ZLUniversalPropCorollary) _
-
-
- -- The structure presheaf on BO
- ZariskiCat = DistLatticeCategory ZariskiLattice
-
- BOCat : Category  
- BOCat = ΣPropCat ZariskiCat BasicOpens
-
- private
-  P : ZL  Type _
-  P 𝔞 = Σ[ f  R ] (D f  𝔞) -- the untruncated defining property
-
-  𝓕 : Σ ZL P  CommAlgebra R' _
-  𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f]
-
-  uniqueHom :  (x y : Σ ZL P)  (fst x)  (fst y)  isContr (CommAlgebraHom (𝓕 y) (𝓕 x))
-  uniqueHom (𝔞 , f , p) (𝔟 , g , q) = contrHoms 𝔞 𝔟 f g p q
-   where
-   open InvertingElementsBase R'
-
-   contrHoms : (𝔞 𝔟 : ZL) (f g : R) (p : D f  𝔞) (q : D g  𝔟)
-              𝔞  𝔟  isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra)
-   contrHoms 𝔞 𝔟 f g p q 𝔞≤𝔟 = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra
-     λ s s∈[gⁿ|n≥0]  subst-∈ₚ (R[1/ f ]AsCommRing ˣ)
-       (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere
-         (RadicalLemma.toUnit R' f g f∈√⟨g⟩ s s∈[gⁿ|n≥0])
-    where
-    open AlgLoc R' [ g ⁿ|n≥0] (powersFormMultClosedSubset g)
-         renaming (S⁻¹RHasAlgUniversalProp to R[1/g]HasAlgUniversalProp)
-    open S⁻¹RUniversalProp R' [ f ⁿ|n≥0] (powersFormMultClosedSubset f) using (_/1)
-    open RadicalIdeal R'
-
-    private
-     instance
-      _ = snd R[1/ f ]AsCommRing
-
-    Df≤Dg : D f  D g
-    Df≤Dg = subst2 _≤_ (sym p) (sym q) 𝔞≤𝔟
-
-    f∈√⟨g⟩ : f    g 
-    f∈√⟨g⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun Df≤Dg .fst zero
-
-
- open PreSheafFromUniversalProp ZariskiCat P 𝓕 uniqueHom
- BasisStructurePShf : Functor (BOCat ^op) (CommAlgebrasCategory R')
- BasisStructurePShf = universalPShf
-
-
- -- now prove the sheaf properties
- open SheafOnBasis ZariskiLattice (CommAlgebrasCategory R' {ℓ' = })
-                   BasicOpens basicOpensAreBasis
-
- -- only proof for weak notion of sheaf on a basis
- isSheafBasisStructurePShf : isDLBasisSheafPullback BasisStructurePShf
- fst isSheafBasisStructurePShf 0∈BO = subst (isTerminal (CommAlgebrasCategory R'))
-                                        (sym R[1/0]≡0  λ i  F-ob (0z , canonical0∈BO≡0∈BO i))
-                                          (TerminalCommAlgebra R' .snd)
-   where
-   open Functor ⦃...⦄
-   instance
-    _ = BasisStructurePShf
-
-   canonical0∈BO : 0z ∈ₚ BasicOpens
-   canonical0∈BO =  0r , isSupportD .pres0 ∣₁
-
-   canonical0∈BO≡0∈BO : canonical0∈BO  0∈BO
-   canonical0∈BO≡0∈BO = BasicOpens 0z .snd _ _
-
-   R[1/0]≡0 : R[1/ 0r ]AsCommAlgebra  UnitCommAlgebra R'
-   R[1/0]≡0 = uaCommAlgebra (e , eIsRHom)
-    where
-    open InvertingElementsBase R' using (isContrR[1/0])
-    open IsAlgebraHom
-
-    e : R[1/ 0r ]AsCommAlgebra .fst  UnitCommAlgebra R' .fst
-    e = isContr→Equiv isContrR[1/0] isContrUnit*
-
-    eIsRHom : IsCommAlgebraEquiv (R[1/ 0r ]AsCommAlgebra .snd) e (UnitCommAlgebra R' .snd)
-    pres0 eIsRHom = refl
-    pres1 eIsRHom = refl
-    pres+ eIsRHom _ _ = refl
-    pres· eIsRHom _ _ = refl
-    pres- eIsRHom _ = refl
-    pres⋆ eIsRHom _ _ = refl
-
- snd isSheafBasisStructurePShf (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO = curriedHelper 𝔞 𝔟 𝔞∈BO 𝔟∈BO 𝔞∨𝔟∈BO
-  where
-  open condSquare
-  {-
-     here:
-     BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf =
-
-     𝓞 (𝔞∨𝔟) → 𝓞 (𝔞)
-
-       ↓         ↓
-
-     𝓞 (𝔟)  →  𝓞 (𝔞∧𝔟)
-
-  -}
-  curriedHelper : (𝔞 𝔟 : ZL) (𝔞∈BO : 𝔞 ∈ₚ BasicOpens) (𝔟∈BO : 𝔟 ∈ₚ BasicOpens)
-                  (𝔞∨𝔟∈BO : 𝔞 ∨z 𝔟 ∈ₚ BasicOpens)
-                 isPullback (CommAlgebrasCategory R') _ _ _
-                             (BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf)
-  curriedHelper 𝔞 𝔟 = elim3  𝔞∈BO 𝔟∈BO 𝔞∨𝔟∈BO  isPropIsPullback _ _ _ _
-                            (BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf))
-                            Σhelper
-   where
-   -- write everything explicitly so things can type-check
-   thePShfCospan : (a : Σ[ f  R ] D f  𝔞) (b : Σ[ g  R ] D g  𝔟)
-                  Cospan (CommAlgebrasCategory R')
-   Cospan.l (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob (𝔟 ,  g , Dg≡𝔟 ∣₁)
-   Cospan.m (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob
-            (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)
-   Cospan.r (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob (𝔞 ,  f , Df≡𝔞 ∣₁)
-   Cospan.s₁ (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-hom
-             {x = (𝔟 ,  g , Dg≡𝔟 ∣₁)}
-             {y = (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)}
-             (hom-∧₂  ZariskiLattice (CommAlgebrasCategory R' {ℓ' = }) 𝔞 𝔟)
-   Cospan.s₂ (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-hom
-             {x = (𝔞 ,  f , Df≡𝔞 ∣₁)}
-             {y = (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)}
-             (hom-∧₁  ZariskiLattice (CommAlgebrasCategory R' {ℓ' = }) 𝔞 𝔟)
-
-   Σhelper : (a : Σ[ f  R ] D f  𝔞) (b : Σ[ g  R ] D g  𝔟) (c : Σ[ h  R ] D h  𝔞 ∨z 𝔟)
-            isPullback (CommAlgebrasCategory R') (thePShfCospan a b) _ _
-                        (BFsq (𝔞 ,  a ∣₁) (𝔟 ,  b ∣₁)  c ∣₁ BasisStructurePShf)
-   Σhelper (f , Df≡𝔞) (g , Dg≡𝔟) (h , Dh≡𝔞∨𝔟) = toSheafPB.lemma
-           (𝔞 ∨z 𝔟 ,  h , Dh≡𝔞∨𝔟 ∣₁)
-           (𝔞 ,  f , Df≡𝔞 ∣₁)
-           (𝔟 ,  g , Dg≡𝔟 ∣₁)
-           (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)
-           (Bsq (𝔞 ,  f , Df≡𝔞 ∣₁) (𝔟 ,  g , Dg≡𝔟 ∣₁)  h , Dh≡𝔞∨𝔟 ∣₁)
-           theAlgebraCospan theAlgebraPullback refl gPath fPath fgPath
-    where
-    open Exponentiation R'
-    open RadicalIdeal R'
-    open InvertingElementsBase R'
-    open DoubleLoc R' h
-    open S⁻¹RUniversalProp R' [ h ⁿ|n≥0] (powersFormMultClosedSubset h)
-    open CommIdeal R[1/ h ]AsCommRing using () renaming (CommIdeal to CommIdealₕ ; _∈_ to _∈ₕ_)
-
-    instance
-     _ = snd R[1/ h ]AsCommRing
-
-    ⟨_⟩ₕ : R[1/ h ] × R[1/ h ]  CommIdealₕ
-     x , y ⟩ₕ =  replicateFinVec 1 x ++Fin replicateFinVec 1 y ⟩[ R[1/ h ]AsCommRing ]
-
-    -- the crucial algebraic fact:
-    DHelper : D h  D f ∨z D g
-    DHelper = Dh≡𝔞∨𝔟  cong₂ (_∨z_) (sym Df≡𝔞) (sym Dg≡𝔟)
-
-    f∈√⟨h⟩ : f    h 
-    f∈√⟨h⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun (sym DHelper) .fst zero
-
-    g∈√⟨h⟩ : g    h 
-    g∈√⟨h⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun (sym DHelper) .fst one
-
-    fg∈√⟨h⟩ : (f · g)    h 
-    fg∈√⟨h⟩ =   h  .snd .·Closed f g∈√⟨h⟩
-
-    1∈fgIdeal : 1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
-    1∈fgIdeal = helper1 (isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun DHelper .fst zero)
-     where
-     helper1 : h    f , g ⟩ₚ
-              1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
-     helper1 = PT.rec isPropPropTrunc (uncurry helper2)
-      where
-      helper2 : (n : )
-               h ^ n   f , g ⟩ₚ
-               1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
-      helper2 n = map helper3
-       where
-       helper3 : Σ[ α  FinVec R 2 ]
-                  h ^ n  linearCombination R' α  { zero  f ; (suc zero)  g })
-                Σ[ β  FinVec R[1/ h ] 2 ]
-                  1r  linearCombination R[1/ h ]AsCommRing β
-                                         λ { zero  f /1 ; (suc zero)  g /1 }
-       helper3 (α , p) = β , path
-        where
-        β : FinVec R[1/ h ] 2
-        β zero = [ α zero , h ^ n ,  n , refl ∣₁ ]
-        β (suc zero) = [ α (suc zero) , h ^ n ,  n , refl ∣₁ ]
-
-        path : 1r  linearCombination R[1/ h ]AsCommRing β
-                                      λ { zero  f /1 ; (suc zero)  g /1 }
-        path = eq/ _ _ ((1r ,  0 , refl ∣₁) , bigPath)
-              cong (β zero · (f /1) +_) (sym (+IdR (β (suc zero) · (g /1))))
-         where
-         bigPath : 1r · 1r · ((h ^ n · 1r) · (h ^ n · 1r))
-                  1r · (α zero · f · (h ^ n · 1r) + α (suc zero) · g · (h ^ n · 1r)) · 1r
-         bigPath = solve! R'  cong (h ^ n ·_) p  solve! R'
-
-    {-
-
-      We get the following pullback square in CommRings
-
-        R[1/h]   →    R[1/h][1/f]
-              ⌟
-        ↓             ↓
-
-        R[1/h][1/g] → R[1/h][1/fg]
-
-      this lifts to a pullback in R-Algebras using PullbackFromCommRing
-      as all for rings have canonical morphisms coming from R
-      and all the triangles commute.
-
-      Then using toSheaf.lemma we get the desired square
-
-        R[1/h]  →  R[1/f]
-              ⌟
-        ↓          ↓
-
-        R[1/g]  →  R[1/fg]
-
-      by only providing paths between the corresponding vertices of the square.
-      These paths are constructed using S⁻¹RAlgCharEquiv, which gives
-      an equivalent characterization of the universal property of localization
-      that can be found in e.g. Cor 3.2 of Atiyah-MacDonald
-
-    -}
-
-    theRingCospan = fgCospan R[1/ h ]AsCommRing (f /1) (g /1)
-    theRingPullback = fgPullback R[1/ h ]AsCommRing (f /1) (g /1) 1∈fgIdeal
-
-    R[1/h][1/f] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing (f /1)
-    R[1/h][1/f]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (f /1)
-    R[1/h][1/g] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing (g /1)
-    R[1/h][1/g]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (g /1)
-    R[1/h][1/fg] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing ((f /1) · (g /1))
-    R[1/h][1/fg]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing
-                               R[1/ h ]AsCommRing ((f /1) · (g /1))
-
-    open IsRingHom
-    /1/1AsCommRingHomFG : CommRingHom R' R[1/h][1/fg]AsCommRing
-    fst /1/1AsCommRingHomFG r = [ [ r , 1r ,  0 , refl ∣₁ ] , 1r ,  0 , refl ∣₁ ]
-    pres0 (snd /1/1AsCommRingHomFG) = refl
-    pres1 (snd /1/1AsCommRingHomFG) = refl
-    pres+ (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-×
-                                         (cong₂ _+_ (solve! R') (solve! R'))
-                                         (Σ≡Prop  _  isPropPropTrunc) (solve! R'))))
-                                         (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
-    pres· (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× refl
-                                            (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r)))))
-                                            (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
-    pres- (snd /1/1AsCommRingHomFG) x = refl
-
-    open Cospan
-    open Pullback
-    open RingHoms
-    isRHomR[1/h]→R[1/h][1/f] : theRingPullback .pbPr₂ ∘r /1AsCommRingHom  /1/1AsCommRingHom f
-    isRHomR[1/h]→R[1/h][1/f] = RingHom≡ (funExt  x  refl))
-
-    isRHomR[1/h]→R[1/h][1/g] : theRingPullback .pbPr₁ ∘r /1AsCommRingHom  /1/1AsCommRingHom g
-    isRHomR[1/h]→R[1/h][1/g] = RingHom≡ (funExt  x  refl))
-
-    isRHomR[1/h][1/f]→R[1/h][1/fg] : theRingCospan .s₂ ∘r /1/1AsCommRingHom f  /1/1AsCommRingHomFG
-    isRHomR[1/h][1/f]→R[1/h][1/fg] = RingHom≡ (funExt
-       x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
-          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
-          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
-
-    isRHomR[1/h][1/g]→R[1/h][1/fg] : theRingCospan .s₁ ∘r /1/1AsCommRingHom g  /1/1AsCommRingHomFG
-    isRHomR[1/h][1/g]→R[1/h][1/fg] = RingHom≡ (funExt
-       x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
-          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
-          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
-
-
-    open PullbackFromCommRing R' theRingCospan theRingPullback
-         /1AsCommRingHom (/1/1AsCommRingHom f) (/1/1AsCommRingHom g) /1/1AsCommRingHomFG
-    theAlgebraCospan = algCospan isRHomR[1/h]→R[1/h][1/f]
-                                 isRHomR[1/h]→R[1/h][1/g]
-                                 isRHomR[1/h][1/f]→R[1/h][1/fg]
-                                 isRHomR[1/h][1/g]→R[1/h][1/fg]
-    theAlgebraPullback = algPullback isRHomR[1/h]→R[1/h][1/f]
-                                     isRHomR[1/h]→R[1/h][1/g]
-                                     isRHomR[1/h][1/f]→R[1/h][1/fg]
-                                     isRHomR[1/h][1/g]→R[1/h][1/fg]
-
-    --and the three remaining paths
-    fPath : theAlgebraCospan .r  R[1/ f ]AsCommAlgebra
-    fPath = doubleLocCancel f∈√⟨h⟩
-     where
-     open DoubleAlgLoc R' h f
-
-    gPath : theAlgebraCospan .l  R[1/ g ]AsCommAlgebra
-    gPath = doubleLocCancel g∈√⟨h⟩
-     where
-     open DoubleAlgLoc R' h g
-
-    fgPath : theAlgebraCospan .m  R[1/ (f · g) ]AsCommAlgebra
-    fgPath = path  doubleLocCancel fg∈√⟨h⟩
-     where
-     open DoubleAlgLoc R' h (f · g)
-     open CommAlgChar R'
-
-     R[1/h][1/fg]AsCommRing' = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing ((f · g) /1)
-
-     path : toCommAlg (R[1/h][1/fg]AsCommRing , /1/1AsCommRingHomFG)
-           toCommAlg (R[1/h][1/fg]AsCommRing' , /1/1AsCommRingHom (f · g))
-     path = cong toCommAlg (ΣPathP (p , q))
-      where
-      eqInR[1/h] : (f /1) · (g /1)  (f · g) /1
-      eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· f g)
-
-      p : R[1/h][1/fg]AsCommRing  R[1/h][1/fg]AsCommRing'
-      p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i)
-
-      q : PathP  i  CommRingHom R' (p i)) /1/1AsCommRingHomFG (/1/1AsCommRingHom (f · g))
-      q = toPathP (RingHom≡ (funExt (
-            λ x  cong [_] (≡-× (cong [_] (≡-× (transportRefl _  transportRefl x)
-                (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))
-                (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))))
-
\ No newline at end of file diff --git a/Cubical.Algebra.ZariskiLattice.UniversalProperty.html b/Cubical.Algebra.ZariskiLattice.UniversalProperty.html deleted file mode 100644 index 3b6750d3b4..0000000000 --- a/Cubical.Algebra.ZariskiLattice.UniversalProperty.html +++ /dev/null @@ -1,409 +0,0 @@ - -Cubical.Algebra.ZariskiLattice.UniversalProperty
{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Algebra.ZariskiLattice.UniversalProperty where
-
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Equiv
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.Univalence
-open import Cubical.Foundations.HLevels
-open import Cubical.Foundations.Transport
-open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence) renaming (_∈_ to _∈ₚ_)
-
-import Cubical.Data.Empty as 
-open import Cubical.Data.Bool hiding (_≤_)
-open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
-                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
-                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
-                                      ; ·-identityʳ to ·ℕ-rid)
-open import Cubical.Data.Sigma.Base
-open import Cubical.Data.Sigma.Properties
-open import Cubical.Data.FinData
-open import Cubical.Data.Unit
-open import Cubical.Relation.Nullary
-open import Cubical.Relation.Binary
-open import Cubical.Relation.Binary.Order.Poset
-
-open import Cubical.Algebra.Ring
-open import Cubical.Algebra.Ring.Properties
-open import Cubical.Algebra.Ring.BigOps
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.BinomialThm
-open import Cubical.Algebra.CommRing.Ideal
-open import Cubical.Algebra.CommRing.FGIdeal
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.DistLattice.Basis
-open import Cubical.Algebra.DistLattice.BigOps
-open import Cubical.Algebra.Matrix
-
-open import Cubical.Algebra.ZariskiLattice.Base
-
-open import Cubical.HITs.SetQuotients as SQ
-open import Cubical.HITs.PropositionalTruncation as PT
-
-private
-  variable
-     ℓ' : Level
-
-
-module _ (R' : CommRing ) (L' : DistLattice ℓ') where
-
- open CommRingStr (R' .snd)
- open RingTheory (CommRing→Ring R')
- open Sum (CommRing→Ring R')
- open CommRingTheory R'
- open Exponentiation R'
- open Units R'
-
- open DistLatticeStr (L' .snd) renaming (is-set to isSetL)
- open Join L'
- open LatticeTheory (DistLattice→Lattice L')
- open Order (DistLattice→Lattice L')
- open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L'))
- open PosetReasoning IndPoset
- open PosetStr (IndPoset .snd) hiding (_≤_)
- private
-  R = fst R'
-  L = fst L'
-
- record IsSupport (d : R  L) : Type (ℓ-max  ℓ') where
-  constructor issupport
-
-  field
-   pres0 : d 0r  0l
-   pres1 : d 1r  1l
-   ·≡∧ :  x y  d (x · y)  d x ∧l d y
-   +≤∨ :  x y  d (x + y)  d x ∨l d y
-
-  ∑≤⋁ : {n : } (U : FinVec R n)  d ( U)   λ i  d (U i)
-  ∑≤⋁ {n = zero} U = ∨lRid _  pres0
-  ∑≤⋁ {n = suc n} U = d ( U)                        ≤⟨ ∨lIdem _ 
-                       d (U zero  +  (U  suc))     ≤⟨ +≤∨ _ _ 
-                       d (U zero) ∨l d ( (U  suc)) ≤⟨ ≤-∨LPres _ _ _ (∑≤⋁ (U  suc)) 
-                       d (U zero) ∨l  (d  U  suc) ≤⟨ ∨lIdem _ 
-                        (d  U) 
-
-  d·LCancel :  x y  d (x · y)  d y
-  d·LCancel x y = subst  a  a  d y) (sym (·≡∧ x y)) (∧≤LCancelJoin _ _)
-
-  d·RCancel :  x y  d (x · y)  d x
-  d·RCancel x y = subst  a  a  d x) (sym (·≡∧ x y)) (∧≤RCancelJoin _ _)
-
-  linearCombination≤LCancel : {n : } (α β : FinVec R n)
-                             d (linearCombination R' α β)   (d  β)
-  linearCombination≤LCancel α β = is-trans _ _ _ (∑≤⋁  i  α i · β i))
-                                                 (≤-⋁Ext _ _ λ i  d·LCancel (α i) (β i))
-
-  supportUnit :  x  x ∈ₚ   d x  1l
-  supportUnit x (x⁻¹ , xx⁻¹≡1) = is-antisym _ _ (1lRightAnnihilates∨l _)
-                                               (subst (_≤ d x) (cong d xx⁻¹≡1  pres1) (d·RCancel _ _))
-
-  supportIdem :  (n : ) (x : R)  d (x ^ (suc n))  d x
-  supportIdem zero x = ·≡∧ _ _ ∙∙ cong (d x ∧l_) pres1 ∙∙ ∧lRid _
-  supportIdem (suc n) x = ·≡∧ _ _ ∙∙ cong (d x ∧l_) (supportIdem n x) ∙∙ ∧lIdem _
-
-  supportExpIneq :  (n : ) (x : R)  d x  d (x ^ n)
-  supportExpIneq zero x = cong (d x ∨l_) pres1 ∙∙ 1lRightAnnihilates∨l _ ∙∙ sym pres1
-  supportExpIneq (suc n) x = subst  y  d x  y) (sym (supportIdem _ x)) (∨lIdem _)
-
-  -- the crucial lemma about support maps
-  open CommIdeal R'
-  open RadicalIdeal R'
-  open isCommIdeal
-  private
-   ⟨_⟩ : {n : }  FinVec R n  CommIdeal
-    V  =  V ⟩[ R' ]
-
-  supportRadicalIneq :  {n : } (α : FinVec R n) (x : R)
-                     x    α   d x   (d  α)
-  supportRadicalIneq α x = PT.elim  _  isSetL _ _)
-         (uncurry  n  (PT.elim  _  isSetL _ _) (uncurry (curriedHelper n)))))
-   where
-   curriedHelper : (n : ) (β : FinVec R _)
-                  x ^ n  linearCombination R' β α  d x   (d  α)
-   curriedHelper n β xⁿ≡∑βα = d x ≤⟨ supportExpIneq n x 
-                              d (x ^ n)
-     ≤⟨ subst  y  y   (d  α)) (sym (cong d xⁿ≡∑βα)) (linearCombination≤LCancel β α) 
-                               (d  α) 
-
--- precomposition with a ring hom
-module _ {A B : CommRing } (φ : CommRingHom A B)
-         (L : DistLattice ) (d : B .fst  L .fst) where
-  open IsSupport
-  open CommRingStr ⦃...⦄
-  open DistLatticeStr ⦃...⦄
-  open IsRingHom
-  private
-    instance
-      _ = L .snd
-      _ = A .snd
-      _ = B .snd
-
-  presSupportPrecomp : IsSupport B L d  IsSupport A L (d  fst φ)
-  pres0 (presSupportPrecomp dIsSupport) = cong d (φ .snd .pres0)  dIsSupport .pres0
-  pres1 (presSupportPrecomp dIsSupport) = cong d (φ .snd .pres1)  dIsSupport .pres1
-  ·≡∧ (presSupportPrecomp dIsSupport) x y = cong d (φ .snd .pres· x y)
-                     dIsSupport .·≡∧ (φ .fst x) (φ .fst y)
-  +≤∨ (presSupportPrecomp dIsSupport) x y =
-    let open JoinSemilattice
-              (Lattice→JoinSemilattice (DistLattice→Lattice L))
-    in subst  z  z  (d (φ .fst x)) ∨l (d (φ .fst y)))
-             (sym (cong d (φ .snd .pres+ x y)))
-             (dIsSupport .+≤∨ (φ .fst x) (φ .fst y))
-
-
-
-module ZarLatUniversalProp (R' : CommRing ) where
- open CommRingStr (snd R')
- open RingTheory (CommRing→Ring R')
- open Sum (CommRing→Ring R')
- open CommRingTheory R'
- open Exponentiation R'
- open BinomialThm R'
- open CommIdeal R'
- open RadicalIdeal R'
- open isCommIdeal
- open ProdFin R'
-
- open ZarLat R'
- open IsSupport
-
- private
-  R = fst R'
-  ⟨_⟩ : {n : }  FinVec R n  CommIdeal
-   V  =  V ⟩[ R' ]
-
-
- D : R  ZL
- D x = [ 1 , replicateFinVec 1 x ] -- λ x → √⟨x⟩
-
- isSupportD : IsSupport R' ZariskiLattice D
- pres0 isSupportD = eq/ _ _ (≡→∼ (cong  (0FGIdeal _  sym (emptyFGIdeal _ _))))
- pres1 isSupportD = refl
- ·≡∧ isSupportD x y = cong {B = λ _  ZL}  U  [ 1 , U ]) (Length1··Fin x y)
- +≤∨ isSupportD x y = eq/ _ _ (≡→∼ (cong  (CommIdeal≡Char
-                                           (inclOfFGIdeal _ 3Vec  2Vec  3Vec⊆2Vec)
-                                           (inclOfFGIdeal _ 2Vec  3Vec  2Vec⊆3Vec))))
-  where
-  2Vec = replicateFinVec 1 x ++Fin replicateFinVec 1 y
-  3Vec = replicateFinVec 1 (x + y) ++Fin (replicateFinVec 1 x ++Fin replicateFinVec 1 y)
-
-  3Vec⊆2Vec :  (i : Fin 3)  3Vec i   2Vec 
-  3Vec⊆2Vec zero =  2Vec  .snd .+Closed (indInIdeal _ _ zero) (indInIdeal _ _ (suc zero))
-  3Vec⊆2Vec (suc zero) = indInIdeal _ _ zero
-  3Vec⊆2Vec (suc (suc zero)) = indInIdeal _ _ (suc zero)
-
-  2Vec⊆3Vec :  (i : Fin 2)  2Vec i   3Vec 
-  2Vec⊆3Vec zero = indInIdeal _ _ (suc zero)
-  2Vec⊆3Vec (suc zero) = indInIdeal _ _ (suc (suc zero))
-
-
- -- defintion of the universal property
- hasZarLatUniversalProp : (L : DistLattice ℓ') (D : R  fst L)
-                         IsSupport R' L D
-                         Type _
- hasZarLatUniversalProp {ℓ' = ℓ'} L D _ =  (L' : DistLattice ℓ') (d : R  fst L')
-                                        IsSupport R' L' d
-                                        ∃![ χ  DistLatticeHom L L' ] (fst χ)  D  d
-
- isPropZarLatUniversalProp : (L : DistLattice ℓ') (D : R  fst L) (isSupportD : IsSupport R' L D)
-                          isProp (hasZarLatUniversalProp L D isSupportD)
- isPropZarLatUniversalProp L D isSupportD = isPropΠ3  _ _ _  isPropIsContr)
-
- ZLHasUniversalProp : hasZarLatUniversalProp ZariskiLattice D isSupportD
- ZLHasUniversalProp L' d isSupportd = (χ , funExt χcomp) , χunique
-  where
-  open DistLatticeStr (snd L') renaming (is-set to isSetL)
-  open LatticeTheory (DistLattice→Lattice L')
-  open Join L'
-  open IsLatticeHom
-  L = fst L'
-
-  χ : DistLatticeHom ZariskiLattice L'
-  fst χ = SQ.rec isSetL  (_ , α)   (d  α))
-                         λ (_ , α) (_ , β)  curriedHelper α β
-   where
-   curriedHelper : {n m : } (α : FinVec R n) (β : FinVec R m)
-                  (n , α)  (m , β)   (d  α)   (d  β)
-   curriedHelper α β α∼β = is-antisym _ _ ineq1 ineq2
-    where
-    open Order (DistLattice→Lattice L')
-    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L'))
-    open PosetReasoning IndPoset
-    open PosetStr (IndPoset .snd) hiding (_≤_)
-
-    incl1 :   α     β 
-    incl1 = ⊆-refl-consequence _ _ (cong fst (∼→≡ α∼β)) .fst
-
-    ineq1 :  (d  α)   (d  β)
-    ineq1 = ⋁IsMax (d  α) ( (d  β))
-            λ i  supportRadicalIneq isSupportd β (α i) (√FGIdealCharLImpl α  β  incl1 i)
-
-    incl2 :   β     α 
-    incl2 = ⊆-refl-consequence _ _ (cong fst (∼→≡ α∼β)) .snd
-
-    ineq2 :  (d  β)   (d  α)
-    ineq2 = ⋁IsMax (d  β) ( (d  α))
-            λ i  supportRadicalIneq isSupportd α (β i) (√FGIdealCharLImpl β  α  incl2 i)
-
-
-  pres0 (snd χ) = refl
-  pres1 (snd χ) = ∨lRid _  isSupportd .pres1
-  pres∨l (snd χ) = elimProp2  _ _  isSetL _ _) (uncurry  n α  uncurry (curriedHelper n α)))
-   where
-   curriedHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
-                   (d  (α ++Fin β))   (d  α) ∨l  (d  β)
-   curriedHelper zero α _ β = sym (∨lLid _)
-   curriedHelper (suc n) α _ β =
-                    (d  (α ++Fin β)) ≡⟨ refl 
-                   d (α zero) ∨l  (d  ((α  suc) ++Fin β))
-
-                  ≡⟨ cong (d (α zero) ∨l_) (curriedHelper _ (α  suc) _ β) 
-
-                   d (α zero) ∨l ( (d  α  suc) ∨l  (d  β))
-                  ≡⟨ ∨lAssoc _ _ _ 
-
-                    (d  α) ∨l  (d  β) 
-
-  pres∧l (snd χ) = elimProp2  _ _  isSetL _ _) (uncurry  n α  uncurry (curriedHelper n α)))
-   where
-   -- have to repeat this one here so the termination checker won't complain
-   oldHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
-               (d  (α ++Fin β))   (d  α) ∨l  (d  β)
-   oldHelper zero α _ β = sym (∨lLid _)
-   oldHelper (suc n) α _ β = cong (d (α zero) ∨l_) (oldHelper _ (α  suc) _ β)  ∨lAssoc _ _ _
-
-   curriedHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
-                   (d  (α ··Fin β))   (d  α) ∧l  (d  β)
-   curriedHelper zero α _ β = sym (0lLeftAnnihilates∧l _)
-   curriedHelper (suc n) α _ β =
-       (d  (α ··Fin β)) ≡⟨ refl 
-       (d  ((λ j  α zero · β j) ++Fin ((α  suc) ··Fin β)))
-
-     ≡⟨ oldHelper _  j  α zero · β j) _ ((α  suc) ··Fin β) 
-
-       (d   j  α zero · β j)) ∨l  (d  ((α  suc) ··Fin β))
-
-     ≡⟨ cong (_∨l  (d  ((α  suc) ··Fin β))) (⋁Ext  j  isSupportd .·≡∧ (α zero) (β j))) 
-
-        j  d (α zero) ∧l d (β j)) ∨l  (d  ((α  suc) ··Fin β))
-
-     ≡⟨ cong (_∨l  (d  ((α  suc) ··Fin β))) (sym (⋁Meetrdist _ _)) 
-
-      (d (α zero) ∧l  (d  β)) ∨l  (d  ((α  suc) ··Fin β))
-
-     ≡⟨ cong ((d (α zero) ∧l  (d  β)) ∨l_) (curriedHelper _ (α  suc) _ β) 
-
-      (d (α zero) ∧l  (d  β)) ∨l ( (d  α  suc) ∧l  (d  β))
-
-     ≡⟨ sym (∧lRdist∨l _ _ _) 
-
-       (d  α) ∧l  (d  β) 
-
-
-  χcomp :  (f : R)  χ .fst (D f)  d f
-  χcomp f = ∨lRid (d f)
-
-  χunique : (y : Σ[ χ'  DistLatticeHom ZariskiLattice L' ] fst χ'  D  d)
-           (χ , funExt χcomp)  y
-  χunique (χ' , χ'∘D≡d) = Σ≡Prop  _  isSetΠ  _  isSetL) _ _) (LatticeHom≡f _ _
-                                 (funExt (elimProp  _  isSetL _ _) (uncurry uniqHelper))))
-   where
-   uniqHelper : (n : ) (α : FinVec R n)  fst χ [ n , α ]  fst χ' [ n , α ]
-   uniqHelper zero _ = sym (cong  α  fst χ' [ 0 , α ]) (funExt  ()))  χ' .snd .pres0)
-   uniqHelper (suc n) α =
-        (d  α) ≡⟨ refl 
-       d (α zero) ∨l  (d  α  suc)
-
-      ≡⟨ cong (d (α zero) ∨l_) (uniqHelper n (α  suc))  -- the inductive step
-
-       d (α zero) ∨l fst χ' [ n , α  suc ]
-
-      ≡⟨ cong (_∨l fst χ' [ n , α  suc ]) (sym (funExt⁻ χ'∘D≡d (α zero))) 
-
-       fst χ' (D (α zero)) ∨l fst χ' [ n , α  suc ]
-
-      ≡⟨ sym (χ' .snd .pres∨l _ _) 
-
-       fst χ' (D (α zero) ∨z [ n , α  suc ])
-
-      ≡⟨ cong  β  fst χ' [ suc n , β ]) (funExt  { zero  refl ; (suc i)  refl })) 
-
-       fst χ' [ suc n , α ] 
-
-
- -- the map induced by applying the universal property to the Zariski lattice
- -- itself is the identity hom
- ZLUniversalPropCorollary : ZLHasUniversalProp ZariskiLattice D isSupportD .fst .fst
-                           idDistLatticeHom ZariskiLattice
- ZLUniversalPropCorollary = cong fst
-                              (ZLHasUniversalProp ZariskiLattice D isSupportD .snd
-                                 (idDistLatticeHom ZariskiLattice , refl))
-
- -- and another corollary
- module _ where
-  open Join ZariskiLattice
-  ⋁D≡ : {n : } (α : FinVec R n)   (D  α)  [ n , α ]
-  ⋁D≡ _ = funExt⁻ (cong fst ZLUniversalPropCorollary) _
-
--- the lattice morphism induced by a ring morphism
-module _ {A B : CommRing } (φ : CommRingHom A B) where
-
- open ZarLat
- open ZarLatUniversalProp
- open IsSupport
- open CommRingStr ⦃...⦄
- open DistLatticeStr ⦃...⦄
- open IsRingHom
- private
-   instance
-     _ = A .snd
-     _ = B .snd
-     _ = (ZariskiLattice A) .snd
-     _ = (ZariskiLattice B) .snd
-
- Dcomp : A .fst  ZL B
- Dcomp = D B  fst φ
-
- isSupportDcomp : IsSupport A (ZariskiLattice B) Dcomp
- isSupportDcomp = presSupportPrecomp φ (ZariskiLattice B) (D B) (isSupportD B)
-
- inducedZarLatHom : DistLatticeHom (ZariskiLattice A) (ZariskiLattice B)
- inducedZarLatHom =
-   ZLHasUniversalProp A (ZariskiLattice B) Dcomp isSupportDcomp .fst .fst
-
- inducedZarLatHomComm : inducedZarLatHom .fst  D A  Dcomp
- inducedZarLatHomComm =
-   ZLHasUniversalProp A (ZariskiLattice B) Dcomp isSupportDcomp .fst .snd
-
--- functoriality
-module _ (A : CommRing ) where
-  open ZarLat
-  open ZarLatUniversalProp
-
-  inducedZarLatHomId : inducedZarLatHom (idCommRingHom A)
-                      idDistLatticeHom (ZariskiLattice A)
-  inducedZarLatHomId =
-    cong fst
-      (ZLHasUniversalProp A (ZariskiLattice A) (Dcomp (idCommRingHom A))
-                                               (isSupportDcomp (idCommRingHom A)) .snd
-        (idDistLatticeHom (ZariskiLattice A) , refl))
-
-module _ {A B C : CommRing } (φ : CommRingHom A B) (ψ : CommRingHom B C) where
-  open ZarLat
-  open ZarLatUniversalProp
-
-  inducedZarLatHomSeq : inducedZarLatHom (ψ ∘cr φ)
-                       inducedZarLatHom ψ ∘dl inducedZarLatHom φ
-  inducedZarLatHomSeq =
-    cong fst
-      (ZLHasUniversalProp A (ZariskiLattice C) (Dcomp (ψ ∘cr φ))
-                                               (isSupportDcomp (ψ ∘cr φ)) .snd
-        (inducedZarLatHom ψ ∘dl inducedZarLatHom φ , funExt  _  ∨lRid _)))
-    where open DistLatticeStr (ZariskiLattice C .snd)
-
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.Everything.html b/Cubical.AlgebraicGeometry.Everything.html new file mode 100644 index 0000000000..20c00c889d --- /dev/null +++ b/Cubical.AlgebraicGeometry.Everything.html @@ -0,0 +1,14 @@ + +Cubical.AlgebraicGeometry.Everything
{-# OPTIONS --safe #-}
+module Cubical.AlgebraicGeometry.Everything where
+
+import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base
+import Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen
+import Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme
+import Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme
+import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+import Cubical.AlgebraicGeometry.ZariskiLattice.Properties
+import Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf
+import Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback
+import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base.html b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base.html new file mode 100644 index 0000000000..ed761e5e96 --- /dev/null +++ b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base.html @@ -0,0 +1,247 @@ + +Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base
{-
+
+  A ℤ-functor is just a functor from rings to sets.
+
+  NOTE: we consider the functor category [ Ring ℓ , Set ℓ ] for some universe level ℓ
+        and not [ Ring ℓ , Set (ℓ+1) ] as is done in
+        "Introduction to Algebraic Geometry and Algebraic Groups"
+        by Demazure & Gabriel!
+
+  The category of ℤ-functors contains the category of (qcqs-) schemes
+  as a full subcategory and satisfies a "universal property"
+  similar to the one of schemes:
+
+    There is a coadjunction 𝓞 ⊣ᵢ Sp
+    (relative to the inclusion i : CommRing ℓ → CommRing (ℓ+1))
+    between the "global sections functor" 𝓞
+    and the fully-faithful embedding of affines Sp,
+    whose counit is a natural isomorphism
+
+-}
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Powerset
+open import Cubical.Foundations.HLevels
+
+open import Cubical.Functions.FunExtEquiv
+
+open import Cubical.Data.Sigma
+open import Cubical.Data.Nat using ()
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.CommRing
+
+open import Cubical.Categories.Category renaming (isIso to isIsoC)
+open import Cubical.Categories.Functor
+open import Cubical.Categories.Instances.Sets
+open import Cubical.Categories.Instances.CommRings
+open import Cubical.Categories.Instances.Functors
+open import Cubical.Categories.NaturalTransformation
+open import Cubical.Categories.Yoneda
+open import Cubical.Categories.Site.Sheaf
+open import Cubical.Categories.Site.Instances.ZariskiCommRing
+
+open import Cubical.HITs.PropositionalTruncation as PT
+
+
+open Category hiding (_∘_)
+
+
+module _ { : Level} where
+
+  open Functor
+  open NatTrans
+  open CommRingStr ⦃...⦄
+  open IsRingHom
+
+
+  -- using the naming conventions of Demazure & Gabriel
+  ℤFunctor = Functor (CommRingsCategory { = }) (SET )
+  ℤFUNCTOR = FUNCTOR (CommRingsCategory { = }) (SET )
+
+  -- Yoneda in the notation of Demazure & Gabriel,
+  -- uses that double op is original category definitionally
+  Sp : Functor (CommRingsCategory { = } ^op) ℤFUNCTOR
+  Sp = YO {C = (CommRingsCategory { = } ^op)}
+
+  isAffine : (X : ℤFunctor)  Type (ℓ-suc )
+  isAffine X = ∃[ A  CommRing  ] NatIso (Sp .F-ob A) X
+  -- TODO: 𝔸¹ ≅ Sp ℤ[x] and 𝔾ₘ ≅ Sp ℤ[x,x⁻¹] ≅ D(x) ↪ 𝔸¹ as first examples of affine schemes
+
+  -- a ℤ-functor that is a sheaf wrt the Zariski coverage is called local
+  isLocal : ℤFunctor  Type (ℓ-suc )
+  isLocal X = isSheaf zariskiCoverage X
+
+  -- the forgetful functor
+  -- aka the affine line
+  -- (aka the representable of ℤ[x])
+  𝔸¹ : ℤFunctor
+  𝔸¹ = ForgetfulCommRing→Set
+
+  -- the global sections functor
+  𝓞 : Functor ℤFUNCTOR (CommRingsCategory { = ℓ-suc } ^op)
+  fst (F-ob 𝓞 X) = X  𝔸¹
+
+  -- ring struncture induced by internal ring object 𝔸¹
+  N-ob (CommRingStr.0r (snd (F-ob 𝓞 X))) A _ = 0r
+    where instance _ = A .snd
+  N-hom (CommRingStr.0r (snd (F-ob 𝓞 X))) φ = funExt λ _  sym (φ .snd .pres0)
+
+  N-ob (CommRingStr.1r (snd (F-ob 𝓞 X))) A _ = 1r
+    where instance _ = A .snd
+  N-hom (CommRingStr.1r (snd (F-ob 𝓞 X))) φ = funExt λ _  sym (φ .snd .pres1)
+
+  N-ob ((snd (F-ob 𝓞 X) CommRingStr.+ α) β) A x = α .N-ob A x + β .N-ob A x
+    where instance _ = A .snd
+  N-hom ((snd (F-ob 𝓞 X) CommRingStr.+ α) β) {x = A} {y = B} φ = funExt path
+    where
+    instance
+      _ = A .snd
+      _ = B .snd
+    path :  x  α .N-ob B (X .F-hom φ x) + β .N-ob B (X .F-hom φ x)
+                φ .fst (α .N-ob A x + β .N-ob A x)
+    path x = α .N-ob B (X .F-hom φ x) + β .N-ob B (X .F-hom φ x)
+           ≡⟨ cong₂ _+_ (funExt⁻ (α .N-hom φ) x) (funExt⁻ (β .N-hom φ) x) 
+             φ .fst (α .N-ob A x) + φ .fst (β .N-ob A x)
+           ≡⟨ sym (φ .snd .pres+ _ _) 
+             φ .fst (α .N-ob A x + β .N-ob A x) 
+
+  N-ob ((snd (F-ob 𝓞 X) CommRingStr.· α) β) A x = α .N-ob A x · β .N-ob A x
+    where instance _ = A .snd
+  N-hom ((snd (F-ob 𝓞 X) CommRingStr.· α) β) {x = A} {y = B} φ = funExt path
+    where
+    instance
+      _ = A .snd
+      _ = B .snd
+    path :  x  α .N-ob B (X .F-hom φ x) · β .N-ob B (X .F-hom φ x)
+                φ .fst (α .N-ob A x · β .N-ob A x)
+    path x = α .N-ob B (X .F-hom φ x) · β .N-ob B (X .F-hom φ x)
+           ≡⟨ cong₂ _·_ (funExt⁻ (α .N-hom φ) x) (funExt⁻ (β .N-hom φ) x) 
+             φ .fst (α .N-ob A x) · φ .fst (β .N-ob A x)
+           ≡⟨ sym (φ .snd .pres· _ _) 
+             φ .fst (α .N-ob A x · β .N-ob A x) 
+
+  N-ob ((CommRingStr.- snd (F-ob 𝓞 X)) α) A x = - α .N-ob A x
+    where instance _ = A .snd
+  N-hom ((CommRingStr.- snd (F-ob 𝓞 X)) α) {x = A} {y = B} φ = funExt path
+    where
+    instance
+      _ = A .snd
+      _ = B .snd
+    path :  x  - α .N-ob B (X .F-hom φ x)  φ .fst (- α .N-ob A x)
+    path x = - α .N-ob B (X .F-hom φ x) ≡⟨ cong -_ (funExt⁻ (α .N-hom φ) x) 
+             - φ .fst (α .N-ob A x)     ≡⟨ sym (φ .snd .pres- _) 
+             φ .fst (- α .N-ob A x)     
+
+  CommRingStr.isCommRing (snd (F-ob 𝓞 X)) = makeIsCommRing
+    isSetNatTrans
+     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+Assoc _ _ _))
+     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+IdR _))
+     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+InvR _))
+     _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+Comm _ _))
+     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·Assoc _ _ _))
+     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·IdR _))
+     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·DistR+ _ _ _))
+     _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·Comm _ _))
+
+  -- action on natural transformations
+  fst (F-hom 𝓞 α) = α ●ᵛ_
+  pres0 (snd (F-hom 𝓞 α)) = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres1 (snd (F-hom 𝓞 α)) = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres+ (snd (F-hom 𝓞 α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres· (snd (F-hom 𝓞 α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres- (snd (F-hom 𝓞 α)) _ = makeNatTransPath (funExt₂ λ _ _  refl)
+
+  -- functoriality of 𝓞
+  F-id 𝓞 = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
+  F-seq 𝓞 _ _ = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
+
+
+
+-- There is a coadjunction 𝓞 ⊣ᵢ Sp
+-- (relative to the inclusion i : CommRing ℓ → CommRing (ℓ+1))
+-- between the "global sections functor" 𝓞
+-- and the fully-faithful embedding of affines Sp,
+-- whose counit is a natural isomorphism
+module AdjBij { : Level} where
+
+  open Functor
+  open NatTrans
+  open Iso
+  open IsRingHom
+
+  private module _ {A : CommRing } {X : ℤFunctor {}} where
+    _♭ : CommRingHom A (𝓞 .F-ob X)  X  Sp .F-ob A
+    fst (N-ob (φ ) B x) a = φ .fst a .N-ob B x
+
+    pres0 (snd (N-ob (φ ) B x)) = cong  y  y .N-ob B x) (φ .snd .pres0)
+    pres1 (snd (N-ob (φ ) B x)) = cong  y  y .N-ob B x) (φ .snd .pres1)
+    pres+ (snd (N-ob (φ ) B x)) _ _ = cong  y  y .N-ob B x) (φ .snd .pres+ _ _)
+    pres· (snd (N-ob (φ ) B x)) _ _ = cong  y  y .N-ob B x) (φ .snd .pres· _ _)
+    pres- (snd (N-ob (φ ) B x)) _ = cong  y  y .N-ob B x) (φ .snd .pres- _)
+
+    N-hom (φ ) ψ = funExt  x  RingHom≡ (funExt λ a  funExt⁻ (φ .fst a .N-hom ψ) x))
+
+
+    -- the other direction is just precomposition modulo Yoneda
+    _♯ : X  Sp .F-ob A  CommRingHom A (𝓞 .F-ob X)
+    fst (α ) a = α ●ᵛ yonedaᴾ 𝔸¹ A .inv a
+
+    pres0 (snd (α )) = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres0)
+    pres1 (snd (α )) = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres1)
+    pres+ (snd (α )) _ _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres+ _ _)
+    pres· (snd (α )) _ _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres· _ _)
+    pres- (snd (α )) _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres- _)
+
+
+    -- the two maps are inverse to each other
+    ♭♯Id :  (α  : X  Sp .F-ob A)  ((α ) )  α
+    ♭♯Id _ = makeNatTransPath (funExt₂ λ _ _  RingHom≡ (funExt  _  refl)))
+
+    ♯♭Id :  (φ : CommRingHom A (𝓞 .F-ob X))  ((φ ) )  φ
+    ♯♭Id _ = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
+
+
+  -- we get a relative adjunction 𝓞 ⊣ᵢ Sp
+  -- with respect to the inclusion i : CommRing ℓ → CommRing (ℓ+1)
+  𝓞⊣SpIso : {A : CommRing } {X : ℤFunctor {}}
+           Iso (CommRingHom A (𝓞 .F-ob X)) (X  Sp .F-ob A)
+  fun 𝓞⊣SpIso = _♭
+  inv 𝓞⊣SpIso = _♯
+  rightInv 𝓞⊣SpIso = ♭♯Id
+  leftInv 𝓞⊣SpIso = ♯♭Id
+
+  𝓞⊣SpNatℤFunctor : {A : CommRing } {X Y : ℤFunctor {}} (α : X  Sp .F-ob A) (β : Y  X)
+                   (β ●ᵛ α)   (𝓞 .F-hom β) ∘cr (α )
+  𝓞⊣SpNatℤFunctor _ _ = RingHom≡ (funExt  _  makeNatTransPath (funExt₂  _ _  refl))))
+
+  𝓞⊣SpNatCommRing : {X : ℤFunctor {}} {A B : CommRing }
+                    (φ : CommRingHom A (𝓞 .F-ob X)) (ψ : CommRingHom B A)
+                   (φ ∘cr ψ)   (φ ) ●ᵛ Sp .F-hom ψ
+  𝓞⊣SpNatCommRing _ _ = makeNatTransPath (funExt₂ λ _ _  RingHom≡ (funExt  _  refl)))
+
+  -- the counit is an equivalence
+  private
+    ε : (A : CommRing )  CommRingHom A ((𝓞 ∘F Sp) .F-ob A)
+    ε A = (idTrans (Sp .F-ob A)) 
+
+  𝓞⊣SpCounitEquiv : (A : CommRing )  CommRingEquiv A ((𝓞 ∘F Sp) .F-ob A)
+  fst (𝓞⊣SpCounitEquiv A) = isoToEquiv theIso
+    where
+    theIso : Iso (A .fst) ((𝓞 ∘F Sp) .F-ob A .fst)
+    fun theIso = ε A .fst
+    inv theIso = yonedaᴾ 𝔸¹ A .fun
+    rightInv theIso α = ℤFUNCTOR .⋆IdL _  yonedaᴾ 𝔸¹ A .leftInv α
+    leftInv theIso a = path -- I get yellow otherwise
+      where
+      path : yonedaᴾ 𝔸¹ A .fun ((idTrans (Sp .F-ob A)) ●ᵛ yonedaᴾ 𝔸¹ A .inv a)  a
+      path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _)  yonedaᴾ 𝔸¹ A .rightInv a
+  snd (𝓞⊣SpCounitEquiv A) = ε A .snd
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen.html b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen.html new file mode 100644 index 0000000000..27055df59a --- /dev/null +++ b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen.html @@ -0,0 +1,384 @@ + +Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen
{-
+
+   The definition of compact open subfunctors of a ℤ-functor X:
+
+     U ↪ Sp(A) is compact open if it is given by a f.g. ideal of A,
+     i.e. if ∃ f₁, ... ,fₙ : A s.t. for all rings B:
+                U(B) = { φ : Hom(A,B) | ⟨ φf₁ , ... , φfₙ ⟩ = B }
+
+     U ↪ X is compact open, if pulling back along any A-valued point
+     Sp(A) → X gives a compact open of Sp(A).
+
+     By observing that compact open subfunctors of affine schemes
+     are in 1-1 correspondence with radicals of f.g. ideals,
+     we get that compact open subfunctors are classified by the
+     ℤ-functor that sends a ring to its Zariski lattice.
+
+-}
+
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Powerset
+open import Cubical.Foundations.HLevels
+
+
+open import Cubical.Functions.FunExtEquiv
+
+open import Cubical.Data.Sigma
+open import Cubical.Data.Nat using ()
+
+open import Cubical.Data.FinData
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.Localisation
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.BigOps
+
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+open import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Properties
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base
+
+open import Cubical.Categories.Category renaming (isIso to isIsoC)
+open import Cubical.Categories.Functor
+open import Cubical.Categories.Instances.CommRings
+open import Cubical.Categories.Instances.DistLattice
+open import Cubical.Categories.Instances.DistLattices
+open import Cubical.Categories.Site.Coverage
+open import Cubical.Categories.Site.Sheaf
+open import Cubical.Categories.Site.Instances.ZariskiCommRing
+open import Cubical.Categories.NaturalTransformation
+open import Cubical.Categories.Yoneda
+
+open import Cubical.HITs.PropositionalTruncation as PT
+open import Cubical.HITs.SetQuotients as SQ
+
+open import Cubical.Relation.Binary.Order.Poset
+
+
+module _ { : Level} where
+
+  open Iso
+  open Functor
+  open NatTrans
+  open NatIso
+  open DistLatticeStr ⦃...⦄
+  open CommRingStr ⦃...⦄
+  open IsRingHom
+  open IsLatticeHom
+  open ZarLat
+  open ZarLatUniversalProp
+
+  -- the Zariski lattice functor classifying compact open subobjects
+  ZarLatFun : ℤFunctor { = }
+  F-ob ZarLatFun A = ZL A , SQ.squash/
+  F-hom ZarLatFun φ = inducedZarLatHom φ .fst
+  F-id ZarLatFun {A} = cong fst (inducedZarLatHomId A)
+  F-seq ZarLatFun φ ψ = cong fst (inducedZarLatHomSeq φ ψ)
+
+  -- this is a separated presheaf
+  -- (TODO: prove this a sheaf)
+  isSeparatedZarLatFun : isSeparated zariskiCoverage ZarLatFun
+  isSeparatedZarLatFun A (unimodvec n f 1∈⟨f₁,⋯,fₙ⟩) u w uRest≡wRest =
+    u                         ≡⟨ sym (∧lLid _) 
+    1l ∧l u                  ≡⟨ congL _∧l_ D1≡⋁Dfᵢ 
+    ( (D A  f)) ∧l u       ≡⟨ ⋁Meetldist _ _ 
+      i  D A (f i) ∧l u) ≡⟨ ⋁Ext Dfᵢ∧u≡Dfᵢ∧w 
+      i  D A (f i) ∧l w) ≡⟨ sym (⋁Meetldist _ _) 
+    ( (D A  f)) ∧l w       ≡⟨ congL _∧l_ (sym D1≡⋁Dfᵢ) 
+    1l ∧l w                  ≡⟨ ∧lLid _ 
+    w 
+    where
+    open Join (ZariskiLattice A)
+    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (ZariskiLattice A)))
+         using (IndPoset)
+    open LatticeTheory (DistLattice→Lattice (ZariskiLattice A))
+    open PosetStr (IndPoset .snd)
+    open IsSupport (isSupportD A)
+    open RadicalIdeal A
+    instance
+      _ = A .snd
+      _ = ZariskiLattice A .snd
+
+    D1≡⋁Dfᵢ : 1l   (D A  f)
+    D1≡⋁Dfᵢ = is-antisym _ _
+                (supportRadicalIneq f 1r (∈→∈√ _ _ 1∈⟨f₁,⋯,fₙ⟩))
+                  (1lRightAnnihilates∨l _)
+
+    Dfᵢ∧u≡Dfᵢ∧w :  i  D A (f i) ∧l u  D A (f i) ∧l w
+    Dfᵢ∧u≡Dfᵢ∧w i =
+        D A (f i) ∧l u
+      ≡⟨ sym (cong fst (funExt⁻ (cong fst toLocToDown≡ToDown) u)) 
+        locToDownHom .fst (inducedZarLatHom /1AsCommRingHom .fst u) .fst
+      ≡⟨ cong  x  locToDownHom .fst x .fst) (uRest≡wRest i) 
+        locToDownHom .fst (inducedZarLatHom /1AsCommRingHom .fst w) .fst
+      ≡⟨ cong fst (funExt⁻ (cong fst toLocToDown≡ToDown) w) 
+        D A (f i) ∧l w 
+      where
+      open InvertingElementsBase.UniversalProp A (f i)
+      open LocDownSetIso A (f i)
+
+  CompactOpen : ℤFunctor  Type (ℓ-suc )
+  CompactOpen X = X  ZarLatFun
+
+  -- the induced subfunctor
+  ⟦_⟧ᶜᵒ : {X : ℤFunctor} (U : CompactOpen X)  ℤFunctor
+  F-ob (⟦_⟧ᶜᵒ {X = X} U) A = (Σ[ x  X .F-ob A .fst  ] U .N-ob A x  D A 1r)
+                                , isSetΣSndProp (X .F-ob A .snd) λ _  squash/ _ _
+   where instance _ = snd A
+  F-hom (⟦_⟧ᶜᵒ {X = X} U) {x = A} {y = B} φ (x , Ux≡D1) = (X .F-hom φ x) , path
+    where
+    instance
+      _ = A .snd
+      _ = B .snd
+    open IsLatticeHom
+    path : U .N-ob B (X .F-hom φ x)  D B 1r
+    path = U .N-ob B (X .F-hom φ x)         ≡⟨ funExt⁻ (U .N-hom φ) x 
+           ZarLatFun .F-hom φ (U .N-ob A x) ≡⟨ cong (ZarLatFun .F-hom φ) Ux≡D1 
+           ZarLatFun .F-hom φ (D A 1r)      ≡⟨ inducedZarLatHom φ .snd .pres1 
+           D B 1r 
+  F-id (⟦_⟧ᶜᵒ {X = X} U) = funExt  x  Σ≡Prop  _  squash/ _ _)
+                                     (funExt⁻ (X .F-id) (x .fst)))
+  F-seq (⟦_⟧ᶜᵒ {X = X} U) φ ψ = funExt  x  Σ≡Prop  _  squash/ _ _)
+                                          (funExt⁻ (X .F-seq φ ψ) (x .fst)))
+
+
+  isAffineCompactOpen : {X : ℤFunctor} (U : CompactOpen X)  Type (ℓ-suc )
+  isAffineCompactOpen U = isAffine  U ⟧ᶜᵒ
+
+
+  -- the (big) dist. lattice of compact opens
+  CompOpenDistLattice : Functor ℤFUNCTOR (DistLatticesCategory { = ℓ-suc } ^op)
+  fst (F-ob CompOpenDistLattice X) = CompactOpen X
+
+  -- lattice structure induce by internal lattice object ZarLatFun
+  N-ob (DistLatticeStr.0l (snd (F-ob CompOpenDistLattice X))) A _ = 0l
+    where instance _ = ZariskiLattice A .snd
+  N-hom (DistLatticeStr.0l (snd (F-ob CompOpenDistLattice X))) _ = funExt λ _  refl
+
+  N-ob (DistLatticeStr.1l (snd (F-ob CompOpenDistLattice X))) A _ = 1l
+    where instance _ = ZariskiLattice A .snd
+  N-hom (DistLatticeStr.1l (snd (F-ob CompOpenDistLattice X))) {x = A} {y = B} φ = funExt λ _  path
+    where
+    instance
+      _ = A .snd
+      _ = B .snd
+      _ = ZariskiLattice B .snd
+    path : D B 1r  D B (φ .fst 1r) ∨l 0l
+    path = cong (D B) (sym (φ .snd .pres1))  sym (∨lRid _)
+
+  N-ob ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∨l U) V) A x = U .N-ob A x ∨l V .N-ob A x
+    where instance _ = ZariskiLattice A .snd
+  N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∨l U) V)  {x = A} {y = B} φ = funExt path
+    where
+    instance
+      _ = ZariskiLattice A .snd
+      _ = ZariskiLattice B .snd
+    path :  x  U .N-ob B (X .F-hom φ x) ∨l V .N-ob B (X .F-hom φ x)
+                ZarLatFun .F-hom φ (U .N-ob A x ∨l V .N-ob A x)
+    path x = U .N-ob B (X .F-hom φ x) ∨l V .N-ob B (X .F-hom φ x)
+           ≡⟨ cong₂ _∨l_ (funExt⁻ (U .N-hom φ) x) (funExt⁻ (V .N-hom φ) x) 
+             ZarLatFun .F-hom φ (U .N-ob A x) ∨l ZarLatFun .F-hom φ (V .N-ob A x)
+           ≡⟨ sym (inducedZarLatHom φ .snd .pres∨l _ _) 
+             ZarLatFun .F-hom φ (U .N-ob A x ∨l V .N-ob A x) 
+
+  N-ob ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∧l U) V) A x = U .N-ob A x ∧l V .N-ob A x
+    where instance _ = ZariskiLattice A .snd
+  N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∧l U) V)  {x = A} {y = B} φ = funExt path
+    where
+    instance
+      _ = ZariskiLattice A .snd
+      _ = ZariskiLattice B .snd
+    path :  x  U .N-ob B (X .F-hom φ x) ∧l V .N-ob B (X .F-hom φ x)
+                ZarLatFun .F-hom φ (U .N-ob A x ∧l V .N-ob A x)
+    path x = U .N-ob B (X .F-hom φ x) ∧l V .N-ob B (X .F-hom φ x)
+           ≡⟨ cong₂ _∧l_ (funExt⁻ (U .N-hom φ) x) (funExt⁻ (V .N-hom φ) x) 
+             ZarLatFun .F-hom φ (U .N-ob A x) ∧l ZarLatFun .F-hom φ (V .N-ob A x)
+           ≡⟨ sym (inducedZarLatHom φ .snd .pres∧l _ _) 
+             ZarLatFun .F-hom φ (U .N-ob A x ∧l V .N-ob A x) 
+
+  DistLatticeStr.isDistLattice (snd (F-ob CompOpenDistLattice X)) = makeIsDistLattice∧lOver∨l
+    isSetNatTrans
+     _ _ _  makeNatTransPath (funExt₂
+                  A _  ZariskiLattice A .snd .DistLatticeStr.∨lAssoc _ _ _)))
+     _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∨lRid _)))
+     _ _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∨lComm _ _)))
+     _ _ _  makeNatTransPath (funExt₂
+                  A _  ZariskiLattice A .snd .DistLatticeStr.∧lAssoc _ _ _)))
+     _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∧lRid _)))
+     _ _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∧lComm _ _)))
+     _ _  makeNatTransPath (funExt₂ -- don't know why ∧lAbsorb∨l doesn't work
+                A _  ZariskiLattice A .snd .DistLatticeStr.absorb _ _ .snd)))
+     _ _ _  makeNatTransPath (funExt₂ -- same here
+                  A _  ZariskiLattice A .snd .DistLatticeStr.∧l-dist-∨l _ _ _ .fst)))
+
+  -- (contravariant) action on morphisms
+  fst (F-hom CompOpenDistLattice α) = α ●ᵛ_
+  pres0 (snd (F-hom CompOpenDistLattice α)) = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres1 (snd (F-hom CompOpenDistLattice α)) = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres∨l (snd (F-hom CompOpenDistLattice α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
+  pres∧l (snd (F-hom CompOpenDistLattice α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
+
+  -- functoriality
+  F-id CompOpenDistLattice = LatticeHom≡f _ _
+                               (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
+  F-seq CompOpenDistLattice _ _ = LatticeHom≡f _ _
+                                    (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
+
+
+  -- useful lemmas
+  module _ (X : ℤFunctor) where
+    open isIsoC
+    private instance _ = (CompOpenDistLattice .F-ob X) .snd
+
+    compOpenTopNatIso : NatIso X  1l ⟧ᶜᵒ
+    N-ob (trans compOpenTopNatIso) _ φ = φ , refl
+    N-hom (trans compOpenTopNatIso) _ = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
+    inv (nIso compOpenTopNatIso B) = fst
+    sec (nIso compOpenTopNatIso B) = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
+    ret (nIso compOpenTopNatIso B) = funExt λ _  refl
+
+
+  module _ (X : ℤFunctor) where
+    open isIsoC
+    open Join (CompOpenDistLattice .F-ob X)
+    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
+    open PosetStr (IndPoset .snd) hiding (_≤_)
+    open LatticeTheory ⦃...⦄
+    private instance _ = (CompOpenDistLattice .F-ob X) .snd
+
+    compOpenGlobalIncl : (U : CompactOpen X)   U ⟧ᶜᵒ  X
+    N-ob (compOpenGlobalIncl U) A = fst
+    N-hom (compOpenGlobalIncl U) φ = refl
+
+    compOpenIncl : {U V : CompactOpen X}  V  U   V ⟧ᶜᵒ   U ⟧ᶜᵒ
+    N-ob (compOpenIncl {U = U} {V = V} V≤U) A (x , Vx≡D1) = x , path
+      where
+      instance
+        _ = A .snd
+        _ = ZariskiLattice A .snd
+        _ = DistLattice→Lattice (ZariskiLattice A)
+      path : U .N-ob A x  D A 1r
+      path = U .N-ob A x                ≡⟨ funExt⁻ (funExt⁻ (cong N-ob (sym V≤U)) A) x 
+             V .N-ob A x ∨l U .N-ob A x ≡⟨ cong (_∨l U .N-ob A x) Vx≡D1 
+             D A 1r ∨l U .N-ob A x      ≡⟨ 1lLeftAnnihilates∨l _ 
+             D A 1r 
+    N-hom (compOpenIncl V≤U) φ = funExt λ x  Σ≡Prop  _  squash/ _ _) refl
+
+    -- this is essentially U∧_
+    compOpenDownHom : (U : CompactOpen X)
+                     DistLatticeHom (CompOpenDistLattice .F-ob X)
+                                     (CompOpenDistLattice .F-ob  U ⟧ᶜᵒ)
+    compOpenDownHom U = CompOpenDistLattice .F-hom (compOpenGlobalIncl U)
+
+    module _ {U V : CompactOpen X} (V≤U : V  U) where
+      -- We need this separate definition to avoid termination checker issues,
+      -- but we don't understand why.
+      private
+        compOpenDownHomFun : (A : CommRing )
+                             V ⟧ᶜᵒ .F-ob A .fst
+                             compOpenDownHom U .fst V ⟧ᶜᵒ .F-ob A .fst
+        compOpenDownHomFun A v = (compOpenIncl V≤U  A ) v , snd v
+
+      compOpenDownHomNatIso : NatIso  V ⟧ᶜᵒ  compOpenDownHom U .fst V ⟧ᶜᵒ
+      N-ob (trans compOpenDownHomNatIso) = compOpenDownHomFun
+      N-hom (trans compOpenDownHomNatIso) _ =
+        funExt λ _  Σ≡Prop  _  squash/ _ _) (Σ≡Prop  _  squash/ _ _) refl)
+      inv (nIso compOpenDownHomNatIso A) ((x , Ux≡D1) , Vx≡D1) = x , Vx≡D1
+      sec (nIso compOpenDownHomNatIso A) =
+        funExt λ _  Σ≡Prop  _  squash/ _ _) (Σ≡Prop  _  squash/ _ _) refl)
+      ret (nIso compOpenDownHomNatIso A) = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
+
+    compOpenInclId :  {U : CompactOpen X}  compOpenIncl (is-refl U)  idTrans  U ⟧ᶜᵒ
+    compOpenInclId = makeNatTransPath (funExt₂  _ _  Σ≡Prop  _  squash/ _ _) refl))
+
+    compOpenInclSeq :  {U V W : CompactOpen X} (U≤V : U  V) (V≤W : V  W)
+                     compOpenIncl (is-trans _ _ _ U≤V V≤W)
+                     compOpenIncl U≤V ●ᵛ compOpenIncl V≤W
+    compOpenInclSeq _ _ = makeNatTransPath
+                            (funExt₂  _ _  Σ≡Prop  _  squash/ _ _) refl))
+
+
+    -- the structure sheaf
+    private COᵒᵖ = (DistLatticeCategory (CompOpenDistLattice .F-ob X)) ^op
+
+    strDLSh : Functor COᵒᵖ (CommRingsCategory { = ℓ-suc })
+    F-ob strDLSh  U = 𝓞 .F-ob  U ⟧ᶜᵒ
+    F-hom strDLSh U≥V = 𝓞 .F-hom (compOpenIncl U≥V)
+    F-id strDLSh = cong (𝓞 .F-hom) compOpenInclId  𝓞 .F-id
+    F-seq strDLSh _ _ = cong (𝓞 .F-hom) (compOpenInclSeq _ _)  𝓞 .F-seq _ _
+
+
+  -- important lemma
+  -- Compact opens of Zariski sheaves are sheaves
+  presLocalCompactOpen : (X : ℤFunctor) (U : CompactOpen X)  isLocal X  isLocal  U ⟧ᶜᵒ
+  presLocalCompactOpen X U isLocalX R um@(unimodvec _ f _) = isoToIsEquiv isoU
+    where
+    open Coverage zariskiCoverage
+    open InvertingElementsBase R
+    instance _ = R .snd
+
+    fᵢCoverR = covers R .snd um
+
+    isoX : Iso (X .F-ob R .fst) (CompatibleFamily X fᵢCoverR)
+    isoX = equivToIso (elementToCompatibleFamily _ _ , isLocalX R um)
+
+    compatibleFamIncl : (CompatibleFamily  U ⟧ᶜᵒ fᵢCoverR)  (CompatibleFamily X fᵢCoverR)
+    compatibleFamIncl fam = (fst  fst fam)
+                          , λ i j B φ ψ φψComm  cong fst (fam .snd i j B φ ψ φψComm)
+
+    compatibleFamIncl≡ :  (y : Σ[ x  X .F-ob R .fst  ] U .N-ob R x  D R 1r)
+                        compatibleFamIncl (elementToCompatibleFamily  U ⟧ᶜᵒ fᵢCoverR y)
+                        elementToCompatibleFamily X fᵢCoverR (y .fst)
+    compatibleFamIncl≡ y = CompatibleFamily≡ _ _ _ _ λ _  refl
+
+    isoU : Iso (Σ[ x  X .F-ob R .fst  ] U .N-ob R x  D R 1r)
+               (CompatibleFamily  U ⟧ᶜᵒ fᵢCoverR)
+    fun isoU = elementToCompatibleFamily _ _
+    fst (inv isoU fam) = isoX .inv (compatibleFamIncl fam)
+    snd (inv isoU fam) = -- U (x) ≡ D(1)
+                         -- knowing that U(x/1)¸≡ D(1) in R[1/fᵢ]
+      let x = isoX .inv (compatibleFamIncl fam) in
+      isSeparatedZarLatFun R um (U .N-ob R x) (D R 1r)
+        λ i  let open UniversalProp (f i)
+                  instance _ = R[1/ (f i) ]AsCommRing .snd in
+
+                inducedZarLatHom /1AsCommRingHom .fst (U .N-ob R x)
+
+              ≡⟨ funExt⁻ (sym (U .N-hom /1AsCommRingHom)) x 
+
+                U .N-ob R[1/ (f i) ]AsCommRing (X .F-hom /1AsCommRingHom x)
+
+              ≡⟨ cong (U .N-ob R[1/ f i ]AsCommRing)
+                      (funExt⁻ (cong fst (isoX .rightInv (compatibleFamIncl fam))) i) 
+
+                U .N-ob R[1/ (f i) ]AsCommRing (fam .fst i .fst)
+
+              ≡⟨ fam .fst i .snd 
+
+                D R[1/ (f i) ]AsCommRing 1r
+
+              ≡⟨ sym (inducedZarLatHom /1AsCommRingHom .snd .pres1) 
+
+                inducedZarLatHom /1AsCommRingHom .fst (D R 1r) 
+
+    rightInv isoU fam =
+      Σ≡Prop  _  isPropIsCompatibleFamily _ _ _)
+        (funExt λ i  Σ≡Prop  _  squash/ _ _)
+                        (funExt⁻ (cong fst
+                          (isoX .rightInv (compatibleFamIncl fam))) i))
+    leftInv isoU y = Σ≡Prop  _  squash/ _ _)
+                            (cong (isoX .inv) (compatibleFamIncl≡ y)
+                               isoX .leftInv (y .fst))
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme.html b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme.html new file mode 100644 index 0000000000..3e79a66995 --- /dev/null +++ b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme.html @@ -0,0 +1,203 @@ + +Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme
{-
+
+  Compact open subfunctors of qcqs-schemes are qcqs-schemes (TODO!!!)
+  The proof proceeds by
+    1. Defining standard/basic compact opens of affines and proving that they are affine
+    2. Proving that arbitrary compact opens of affines are qcqs-schemes
+
+-}
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Powerset
+open import Cubical.Foundations.HLevels
+
+
+open import Cubical.Functions.FunExtEquiv
+
+open import Cubical.Data.Sigma
+open import Cubical.Data.Nat using ()
+
+open import Cubical.Data.FinData
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.Localisation
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.BigOps
+
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+open import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Properties
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme
+
+open import Cubical.Categories.Category renaming (isIso to isIsoC)
+open import Cubical.Categories.Functor
+
+open import Cubical.Categories.Site.Instances.ZariskiCommRing
+open import Cubical.Categories.NaturalTransformation
+open import Cubical.Categories.Yoneda
+
+
+open import Cubical.HITs.PropositionalTruncation as PT
+open import Cubical.HITs.SetQuotients as SQ
+
+open import Cubical.Relation.Binary.Order.Poset
+
+
+-- standard affine opens
+module StandardOpens { : Level} (R : CommRing ) (f : R .fst) where
+
+  open Iso
+  open Functor
+  open NatTrans
+  open NatIso
+  open isIsoC
+  open DistLatticeStr ⦃...⦄
+  open CommRingStr ⦃...⦄
+  open IsRingHom
+  open RingHoms
+  open IsLatticeHom
+  open ZarLat
+
+  open InvertingElementsBase R
+  open UniversalProp f
+
+  private module ZL = ZarLatUniversalProp
+
+  private
+    instance
+      _ = R .snd
+
+  D : CompactOpen (Sp  R )
+  D = yonedaᴾ ZarLatFun R .inv (ZL.D R f)
+
+  SpR[1/f]≅⟦Df⟧ : NatIso (Sp .F-ob R[1/ f ]AsCommRing)  D ⟧ᶜᵒ
+  N-ob (trans SpR[1/f]≅⟦Df⟧) B φ = (φ ∘r /1AsCommRingHom) , ∨lRid _  path
+    where
+    open CommRingHomTheory φ
+    open IsSupport (ZL.isSupportD B)
+    instance
+      _ = B .snd
+      _ = ZariskiLattice B .snd
+
+    isUnitφ[f/1] : φ .fst (f /1)  B ˣ
+    isUnitφ[f/1] = RingHomRespInv (f /1)  S/1⊆S⁻¹Rˣ f  1 , sym (·IdR f) ∣₁ 
+
+    path : ZL.D B (φ .fst (f /1))  1l
+    path = supportUnit _ isUnitφ[f/1]
+
+  N-hom (trans SpR[1/f]≅⟦Df⟧) _ = funExt λ _  Σ≡Prop  _  squash/ _ _) (RingHom≡ refl)
+
+  inv (nIso SpR[1/f]≅⟦Df⟧ B) (φ , Dφf≡D1) = invElemUniversalProp B φ isUnitφf .fst .fst
+    where
+    instance _ = ZariskiLattice B .snd
+    isUnitφf : φ .fst f  B ˣ
+    isUnitφf = unitLemmaZarLat B (φ $r f) (sym (∨lRid _)  Dφf≡D1)
+
+  sec (nIso SpR[1/f]≅⟦Df⟧ B) =
+    funExt λ _  Σ≡Prop  _  squash/ _ _) (RingHom≡ (invElemUniversalProp _ _ _ .fst .snd))
+  ret (nIso SpR[1/f]≅⟦Df⟧ B) =
+    funExt λ φ  cong fst (invElemUniversalProp B (φ ∘r /1AsCommRingHom) _ .snd (φ , refl))
+
+  isAffineD : isAffineCompactOpen D
+  isAffineD =  R[1/ f ]AsCommRing , SpR[1/f]≅⟦Df⟧ ∣₁
+
+
+-- compact opens of affine schemes are qcqs-schemes
+module _ { : Level} (R : CommRing ) (W : CompactOpen (Sp  R )) where
+
+  open StandardOpens
+
+  open Iso
+  open Functor
+  open NatTrans
+  open NatIso
+  open isIsoC
+  open DistLatticeStr ⦃...⦄
+  open CommRingStr ⦃...⦄
+  open PosetStr ⦃...⦄
+  open IsRingHom
+  open RingHoms
+  open IsLatticeHom
+  open ZarLat
+
+  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob (Sp .F-ob R)))) using (IndPoset; ind≤bigOp)
+  open InvertingElementsBase R
+  open Join
+  open JoinMap
+  open AffineCover
+  private module ZL = ZarLatUniversalProp
+
+  private
+    instance
+      _ = R .snd
+      _ = ZariskiLattice R .snd
+      _ = CompOpenDistLattice .F-ob (Sp .F-ob R) .snd
+      _ = CompOpenDistLattice .F-ob  W ⟧ᶜᵒ .snd
+      _ = IndPoset .snd
+
+    w : ZL R
+    w = yonedaᴾ ZarLatFun R .fun W
+
+    -- yoneda is a lattice homomorphsim
+    isHomYoneda : IsLatticeHom (DistLattice→Lattice (ZariskiLattice R) .snd)
+                               (yonedaᴾ ZarLatFun R .inv)
+                               (DistLattice→Lattice (CompOpenDistLattice  Sp  R  ) .snd)
+    pres0 isHomYoneda = makeNatTransPath (funExt₂  _ _  refl))
+    pres1 isHomYoneda =
+      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres1))
+    pres∨l isHomYoneda u v =
+      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres∨l u v))
+    pres∧l isHomYoneda u v =
+      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres∧l u v))
+
+    module _ {n : }
+             (f : FinVec (fst R) n)
+             (⋁Df≡W :  (CompOpenDistLattice  Sp  R  ) (D R  f)  W) where
+
+      Df≤W :  i  D R (f i)  W
+      Df≤W i = subst (D R (f i) ≤_) ⋁Df≡W (ind≤bigOp (D R  f) i)
+
+      toAffineCover : AffineCover  W ⟧ᶜᵒ
+      AffineCover.n toAffineCover = n
+      U toAffineCover i = compOpenDownHom (Sp  R ) W .fst (D R (f i))
+      covers toAffineCover = sym (pres⋁ (compOpenDownHom (Sp  R ) W) (D R  f))
+                            cong (compOpenDownHom (Sp  R ) W .fst) ⋁Df≡W
+                            makeNatTransPath (funExt₂  _  snd))
+      isAffineU toAffineCover i =
+         _ , seqNatIso (SpR[1/f]≅⟦Df⟧ R (f i)) (compOpenDownHomNatIso _ (Df≤W i)) ∣₁
+
+  module _ {n : }
+           (f : FinVec (fst R) n)
+           (⋁Df≡w :  (ZariskiLattice R) (ZL.D R  f)  w) where
+
+    private
+      ⋁Df≡W :  (CompOpenDistLattice  Sp  R  ) (D R  f)  W
+      ⋁Df≡W = sym (pres⋁ (_ , isHomYoneda) (ZL.D R  f))
+             cong (yonedaᴾ ZarLatFun R .inv) ⋁Df≡w
+             yonedaᴾ ZarLatFun R .leftInv W
+
+    makeAffineCoverCompOpenOfAffine : AffineCover  W ⟧ᶜᵒ
+    makeAffineCoverCompOpenOfAffine = toAffineCover f ⋁Df≡W
+
+  hasAffineCoverCompOpenOfAffine : hasAffineCover  W ⟧ᶜᵒ
+  hasAffineCoverCompOpenOfAffine = PT.map truncHelper ([]surjective w)
+    where
+    truncHelper : Σ[ n,f  Σ  (FinVec (fst R)) ] [ n,f ]  w  AffineCover  W ⟧ᶜᵒ
+    truncHelper ((n , f) , [n,f]≡w) = makeAffineCoverCompOpenOfAffine f (ZL.⋁D≡ R f  [n,f]≡w)
+
+  isQcQsSchemeCompOpenOfAffine : isQcQsScheme  W ⟧ᶜᵒ
+  fst isQcQsSchemeCompOpenOfAffine = presLocalCompactOpen _ _ (isSubcanonicalZariskiCoverage R)
+  snd isQcQsSchemeCompOpenOfAffine = hasAffineCoverCompOpenOfAffine
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme.html b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme.html new file mode 100644 index 0000000000..d20839c76c --- /dev/null +++ b/Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme.html @@ -0,0 +1,84 @@ + +Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme
{-
+
+   A qcqs-scheme is a ℤ-functor that is local (a Zariski-sheaf)
+   and has an affine cover, where the notion of cover is given
+   by the lattice structure of compact open subfunctors
+
+-}
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme where
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Powerset
+open import Cubical.Foundations.HLevels
+
+
+open import Cubical.Functions.FunExtEquiv
+
+open import Cubical.Data.Sigma
+open import Cubical.Data.Nat using ()
+
+open import Cubical.Data.FinData
+
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.BigOps
+
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen
+
+open import Cubical.Categories.Category renaming (isIso to isIsoC)
+open import Cubical.Categories.Functor
+open import Cubical.Categories.Site.Instances.ZariskiCommRing
+
+open import Cubical.HITs.PropositionalTruncation as PT
+
+
+module _ { : Level} (X : ℤFunctor { = }) where
+  open Functor
+  open DistLatticeStr ⦃...⦄
+  open Join (CompOpenDistLattice .F-ob X)
+  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
+  private instance _ = (CompOpenDistLattice .F-ob X) .snd
+
+
+  record AffineCover : Type (ℓ-suc ) where
+    field
+      n : 
+      U : FinVec (CompactOpen X) n
+      covers :  U  1l -- TODO: equivalent to X ≡ ⟦ ⋁ U ⟧ᶜᵒ
+      isAffineU :  i  isAffineCompactOpen (U i)
+
+  hasAffineCover : Type (ℓ-suc )
+  hasAffineCover =  AffineCover ∥₁
+
+
+module _ { : Level} where
+  -- definition of quasi-compact, quasi-separated schemes
+  isQcQsScheme : ℤFunctor  Type (ℓ-suc )
+  isQcQsScheme X = isLocal X × hasAffineCover X
+
+  -- affine schemes are qcqs-schemes
+  module _ (A : CommRing ) where
+    open AffineCover
+    open DistLatticeStr ⦃...⦄
+    private instance _ = (CompOpenDistLattice  Sp  A  ) .snd
+
+    -- the canonical one element affine cover of a representable
+    singlAffineCover : AffineCover (Sp  A )
+    n singlAffineCover = 1
+    U singlAffineCover zero = 1l
+    covers singlAffineCover = ∨lRid _
+    isAffineU singlAffineCover zero =  A , compOpenTopNatIso (Sp  A ) ∣₁
+
+    isQcQsSchemeAffine : isQcQsScheme (Sp  A )
+    fst isQcQsSchemeAffine = isSubcanonicalZariskiCoverage A
+    snd isQcQsSchemeAffine =  singlAffineCover ∣₁
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.ZariskiLattice.Base.html b/Cubical.AlgebraicGeometry.ZariskiLattice.Base.html new file mode 100644 index 0000000000..9a24b34c97 --- /dev/null +++ b/Cubical.AlgebraicGeometry.ZariskiLattice.Base.html @@ -0,0 +1,221 @@ + +Cubical.AlgebraicGeometry.ZariskiLattice.Base
{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.ZariskiLattice.Base where
+
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Univalence
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Transport
+
+import Cubical.Data.Empty as 
+open import Cubical.Data.Bool
+open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
+                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
+                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
+                                      ; ·-identityʳ to ·ℕ-rid)
+open import Cubical.Data.Sigma.Base
+open import Cubical.Data.Sigma.Properties
+open import Cubical.Data.FinData
+open import Cubical.Data.Unit
+open import Cubical.Relation.Nullary
+open import Cubical.Relation.Binary
+open import Cubical.Relation.Binary.Order.Poset
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.Ring.Properties
+open import Cubical.Algebra.Ring.BigOps
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.BinomialThm
+open import Cubical.Algebra.CommRing.Ideal
+open import Cubical.Algebra.CommRing.Ideal.Sum
+open import Cubical.Algebra.CommRing.FGIdeal
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.Matrix
+
+open import Cubical.HITs.SetQuotients as SQ
+
+open Iso
+open BinaryRelation
+open isEquivRel
+
+private
+  variable
+     ℓ' : Level
+
+
+module ZarLat (R' : CommRing ) where
+ open CommRingStr (snd R')
+ open RingTheory (CommRing→Ring R')
+ open Sum (CommRing→Ring R')
+ open CommRingTheory R'
+ open Exponentiation R'
+ open BinomialThm R'
+ open CommIdeal R'
+ open RadicalIdeal R'
+ open isCommIdeal
+ open ProdFin R'
+ open IdealSum R'
+
+ private
+  R = fst R'
+  A = Σ[ n   ] (FinVec R n)
+  ⟨_⟩ : {n : }  FinVec R n  CommIdeal
+   V  =  V ⟩[ R' ]
+
+ -- This is small!
+ _≼_ : A  A  Type 
+ (_ , α)  (_ , β) =  i  α i    β 
+
+ private
+  isRefl≼ :  {a}  a  a
+  isRefl≼ i = ∈→∈√ _ _ (indInIdeal _ _ i)
+
+  isTrans≼ :  {a b c : A}  a  b  b  c  a  c
+  isTrans≼ a≼b b≼c i = (√FGIdealCharRImpl _ _ b≼c) _ (a≼b i)
+
+ _∼_ :  A  A  Type  -- \sim
+ α  β = (α  β) × (β  α)
+
+ ∼PropValued : isPropValued (_∼_)
+ ∼PropValued (_ , α) (_ , β) = isProp× (isPropΠ  i    β  .fst (α i) .snd))
+                                       (isPropΠ  i    α  .fst (β i) .snd))
+
+ ∼EquivRel : isEquivRel (_∼_)
+ reflexive ∼EquivRel _ = isRefl≼ , isRefl≼
+ symmetric ∼EquivRel _ _ = Σ-swap-Iso .fun
+ transitive ∼EquivRel _ _ _ a∼b b∼c = isTrans≼ (fst a∼b) (fst b∼c) , isTrans≼ (snd b∼c) (snd a∼b)
+
+ -- lives in the same universe as R
+ ZL : Type 
+ ZL = A / (_∼_)
+
+ --  need something big in our proofs though:
+ _∼≡_ : A  A  Type (ℓ-suc )
+ (_ , α) ∼≡ (_ , β) =   α     β 
+
+ ≡→∼ :  {a b : A}  a ∼≡ b  a  b
+ ≡→∼ r = √FGIdealCharLImpl _  _   x h  subst  p  x  p) r h)
+       , √FGIdealCharLImpl _  _   x h  subst  p  x  p) (sym r) h)
+
+ ∼→≡ :  {a b : A}  a  b  a ∼≡ b
+ ∼→≡ r = CommIdeal≡Char (√FGIdealCharRImpl _  _  (fst r))
+                        (√FGIdealCharRImpl _  _  (snd r))
+
+ ∼≃≡ :  {a b : A}  (a  b)  (a ∼≡ b)
+ ∼≃≡ = propBiimpl→Equiv (∼PropValued _ _) (isSetCommIdeal _ _) ∼→≡ ≡→∼
+
+ 0z : ZL
+ 0z = [ 0 ,  ()) ]
+
+ 1z : ZL
+ 1z = [ 1 , (replicateFinVec 1 1r) ]
+
+ _∨z_ : ZL  ZL  ZL
+ _∨z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel)
+                           (_ , α) (_ , β)  (_ , α ++Fin β))
+                           (_ , α) (_ , β)  ≡→∼ (cong 
+                             (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α))))
+    λ (_ , α) (_ , β) (_ , γ) α∼β  ≡→∼ (--need to show α∨γ ∼ β∨γ
+        α ++Fin γ       ≡⟨ cong  (FGIdealAddLemma _ α γ) 
+       ( α  +i  γ )    ≡⟨ sym (√+LContr _ _) 
+       (  α  +i  γ ) ≡⟨ cong  I   (I +i  γ )) (∼→≡ α∼β) 
+       (  β  +i  γ ) ≡⟨ √+LContr _ _ 
+       ( β  +i  γ )    ≡⟨ cong  (sym (FGIdealAddLemma _ β γ)) 
+        β ++Fin γ  )
+
+ _∧z_ : ZL  ZL  ZL
+ _∧z_ = setQuotSymmBinOp (reflexive ∼EquivRel) (transitive ∼EquivRel)
+                           (_ , α) (_ , β)  (_ , α ··Fin β))
+                           (_ , α) (_ , β)  ≡→∼ (cong 
+                             (FGIdealMultLemma _ α β ∙∙ ·iComm _ _ ∙∙ sym (FGIdealMultLemma _ β α))))
+    λ (_ , α) (_ , β) (_ , γ) α∼β  ≡→∼ (--need to show α∧γ ∼ β∧γ
+        α ··Fin γ        ≡⟨ cong  (FGIdealMultLemma _ α γ) 
+       ( α  ·i  γ )    ≡⟨ sym (√·LContr _ _) 
+       (  α  ·i  γ ) ≡⟨ cong  I   (I ·i  γ )) (∼→≡ α∼β) 
+       (  β  ·i  γ ) ≡⟨ √·LContr _ _ 
+       ( β  ·i  γ )    ≡⟨ cong  (sym (FGIdealMultLemma _ β γ)) 
+        β ··Fin γ  )
+
+ -- join axioms
+ ∨zAssoc :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∨z (𝔟 ∨z 𝔠)  (𝔞 ∨z 𝔟) ∨z 𝔠
+ ∨zAssoc = SQ.elimProp3  _ _ _  squash/ _ _)
+          λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼ (cong  (IdealAddAssoc _ _ _ _)))
+
+ ∨zComm :  (𝔞 𝔟 : ZL)  𝔞 ∨z 𝔟  𝔟 ∨z 𝔞
+ ∨zComm = SQ.elimProp2  _ _  squash/ _ _)
+        λ (_ , α) (_ , β)  eq/ _ _
+          (≡→∼ (cong  (FGIdealAddLemma _ α β ∙∙ +iComm _ _ ∙∙ sym (FGIdealAddLemma _ β α))))
+
+ ∨zLid :  (𝔞 : ZL)  0z ∨z 𝔞  𝔞
+ ∨zLid = SQ.elimProp  _  squash/ _ _) λ _  eq/ _ _ (reflexive ∼EquivRel _)
+
+ ∨zRid :  (𝔞 : ZL)  𝔞 ∨z 0z  𝔞
+ ∨zRid _ = ∨zComm _ _  ∨zLid _
+
+
+ -- -- meet axioms
+ ∧zAssoc :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∧z (𝔟 ∧z 𝔠)  (𝔞 ∧z 𝔟) ∧z 𝔠
+ ∧zAssoc = SQ.elimProp3  _ _ _  squash/ _ _)
+    λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼
+      (  α ··Fin (β ··Fin γ)      ≡⟨ cong  (FGIdealMultLemma _ _ _) 
+        ( α  ·i  β ··Fin γ )    ≡⟨ cong  x   ( α  ·i x)) (FGIdealMultLemma _ _ _) 
+        ( α  ·i ( β  ·i  γ )) ≡⟨ cong  (·iAssoc _ _ _) 
+        (( α  ·i  β ) ·i  γ ) ≡⟨ cong  x   (x ·i  γ )) (sym (FGIdealMultLemma _ _ _)) 
+        ( α ··Fin β  ·i  γ )    ≡⟨ cong  (sym (FGIdealMultLemma _ _ _)) 
+         (α ··Fin β) ··Fin γ      ))
+
+ ∧zComm :  (𝔞 𝔟 : ZL)  𝔞 ∧z 𝔟  𝔟 ∧z 𝔞
+ ∧zComm = SQ.elimProp2  _ _  squash/ _ _)
+        λ (_ , α) (_ , β)  eq/ _ _ (≡→∼
+          (cong  (FGIdealMultLemma _ α β ∙∙ ·iComm _ _ ∙∙ sym (FGIdealMultLemma _ β α))))
+
+ ∧zRid :  (𝔞 : ZL)  𝔞 ∧z 1z  𝔞
+ ∧zRid = SQ.elimProp  _  squash/ _ _)
+   λ (_ , α)  eq/ _ _ (≡→∼ (cong 
+     ( α ··Fin (replicateFinVec 1 1r)  ≡⟨ FGIdealMultLemma _ _ _ 
+       α  ·i  (replicateFinVec 1 1r)  ≡⟨ cong ( α  ·i_) (contains1Is1 _ (indInIdeal _ _ zero)) 
+       α  ·i 1Ideal                     ≡⟨ ·iRid _ 
+       α  )))
+
+
+ -- absorption and distributivity
+ ∧zAbsorb∨z :  (𝔞 𝔟 : ZL)  𝔞 ∧z (𝔞 ∨z 𝔟)  𝔞
+ ∧zAbsorb∨z = SQ.elimProp2  _ _  squash/ _ _)
+            λ (_ , α) (_ , β)  eq/ _ _ (≡→∼
+              (  α ··Fin (α ++Fin β)      ≡⟨ cong  (FGIdealMultLemma _ α (α ++Fin β)) 
+                ( α  ·i  α ++Fin β )    ≡⟨ cong  x   ( α  ·i x)) (FGIdealAddLemma _ α β) 
+                ( α  ·i ( α  +i  β )) ≡⟨ √·Absorb+ _ _ 
+                 α  ))
+
+ ∧zLDist∨z :  (𝔞 𝔟 𝔠 : ZL)  𝔞 ∧z (𝔟 ∨z 𝔠)  (𝔞 ∧z 𝔟) ∨z (𝔞 ∧z 𝔠)
+ ∧zLDist∨z = SQ.elimProp3  _ _ _  squash/ _ _)
+   λ (_ , α) (_ , β) (_ , γ)  eq/ _ _ (≡→∼
+     (  α ··Fin (β ++Fin γ)             ≡⟨ cong  (FGIdealMultLemma _ _ _) 
+       ( α  ·i  β ++Fin γ )           ≡⟨ cong  x   ( α  ·i x)) (FGIdealAddLemma _ _ _) 
+       ( α  ·i ( β  +i  γ ))        ≡⟨ cong  (·iRdist+i _ _ _) 
+      -- L/R-dist are swapped
+      -- in Lattices vs Rings
+       ( α  ·i  β  +i  α  ·i  γ ) ≡⟨ cong₂  x y   (x +i y))
+                                                     (sym (FGIdealMultLemma _ _ _))
+                                                     (sym (FGIdealMultLemma _ _ _)) 
+       ( α ··Fin β  +i  α ··Fin γ )   ≡⟨ cong  (sym (FGIdealAddLemma _ _ _)) 
+        (α ··Fin β) ++Fin (α ··Fin γ)   ))
+
+
+ ZariskiLattice : DistLattice 
+ fst ZariskiLattice = ZL
+ DistLatticeStr.0l (snd ZariskiLattice) = 0z
+ DistLatticeStr.1l (snd ZariskiLattice) = 1z
+ DistLatticeStr._∨l_ (snd ZariskiLattice) = _∨z_
+ DistLatticeStr._∧l_ (snd ZariskiLattice) = _∧z_
+ DistLatticeStr.isDistLattice (snd ZariskiLattice) =
+   makeIsDistLattice∧lOver∨l squash/ ∨zAssoc ∨zRid ∨zComm
+                                       ∧zAssoc ∧zRid ∧zComm ∧zAbsorb∨z ∧zLDist∨z
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.ZariskiLattice.Properties.html b/Cubical.AlgebraicGeometry.ZariskiLattice.Properties.html new file mode 100644 index 0000000000..431e0096f5 --- /dev/null +++ b/Cubical.AlgebraicGeometry.ZariskiLattice.Properties.html @@ -0,0 +1,209 @@ + +Cubical.AlgebraicGeometry.ZariskiLattice.Properties
{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.ZariskiLattice.Properties where
+
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Powerset using ()
+                                         renaming (_∈_ to _∈ₚ_ ; ∈-isProp to ∈ₚ-isProp)
+
+open import Cubical.Data.Nat using ()
+open import Cubical.Data.Sigma.Properties
+open import Cubical.Data.FinData
+open import Cubical.Relation.Binary.Order.Poset
+
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.Localisation
+open import Cubical.Algebra.CommRing.Ideal
+open import Cubical.Algebra.CommRing.FGIdeal
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Tactics.CommRingSolver
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.Downset
+
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+open import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+
+open import Cubical.HITs.SetQuotients as SQ
+import Cubical.HITs.PropositionalTruncation as PT
+
+
+private variable  : Level
+
+module _ (R : CommRing ) where
+  open Iso
+  open CommRingStr ⦃...⦄
+  open PosetStr ⦃...⦄
+
+  open Exponentiation R
+  open CommIdeal R
+  open RadicalIdeal R
+
+  open ZarLat R
+  open ZarLatUniversalProp R
+
+  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
+       using (IndPoset)
+
+  private
+    instance
+      _ = R .snd
+      _ = IndPoset .snd
+
+    ⟨_⟩ : {n : }  FinVec (fst R) n  CommIdeal
+     V  =  V ⟩[ R ]
+
+  unitLemmaZarLat :  f  D f  D 1r  f ∈ₚ R ˣ
+  unitLemmaZarLat f Df≡D1 = containsOne→Unit  (1∈√→1∈ _ 1∈√⟨f⟩)
+    where
+    D1≤Df : D 1r  D f
+    D1≤Df = subst (_≤ D f) Df≡D1 (is-refl _)
+
+    1∈√⟨f⟩ : 1r    replicateFinVec 1 f 
+    1∈√⟨f⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun D1≤Df .fst zero
+
+
+module LocDownSetIso (R : CommRing ) (f : R .fst) where
+  open CommRingStr ⦃...⦄
+  open DistLatticeStr ⦃...⦄
+  open PosetStr ⦃...⦄
+
+  open InvertingElementsBase R
+  open UniversalProp f
+
+  open ZarLat
+  open ZarLatUniversalProp
+  open IsSupport
+
+  open DistLatticeDownset (ZariskiLattice R)
+  open Order (DistLattice→Lattice (ZariskiLattice R))
+  open LatticeTheory (DistLattice→Lattice (ZariskiLattice R))
+  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (ZariskiLattice R)))
+       using () renaming (IndPoset to ZLRPoset)
+
+  open MeetSemilattice (Lattice→MeetSemilattice (DistLattice→Lattice (ZariskiLattice R)))
+       using (≤-∧LPres ; ∧≤RCancel)
+
+  private
+    instance
+      _ = R .snd
+      _ = ZariskiLattice R .snd
+      _ = ZLRPoset .snd
+
+    powerLemma :  fⁿ  fⁿ ∈ₚ [ f ⁿ|n≥0]  D R f ∧l D R fⁿ  D R f
+    powerLemma fⁿ = PT.rec (squash/ _ _)
+                      λ (n , fⁿ≡f^n)  cong  x  D R f ∧l D R x) fⁿ≡f^n
+                                          ≤j→≤m _ _ (supportExpIneq (isSupportD R) n f)
+
+    locEqPowerLemma :  r fⁿ  fⁿ ∈ₚ [ f ⁿ|n≥0]
+                     D R f ∧l D R (r · fⁿ)  D R f ∧l D R r
+    locEqPowerLemma r fⁿ fⁿIsPow =
+      D R f ∧l D R (r · fⁿ)      ≡⟨ cong (D R f ∧l_) (isSupportD R .·≡∧ _ _) 
+      D R f ∧l (D R r ∧l D R fⁿ) ≡⟨ ∧lAssoc (D R f) (D R r) (D R fⁿ) 
+      (D R f ∧l D R r) ∧l D R fⁿ ≡⟨ ∧l.commAssocr (D R f) (D R r) (D R fⁿ) 
+      (D R f ∧l D R fⁿ) ∧l D R r ≡⟨ cong (_∧l D R r) (powerLemma _ fⁿIsPow) 
+      D R f ∧l D R r 
+
+    locEqPowerLemma2 :  r fᵐ fⁿ  fᵐ ∈ₚ [ f ⁿ|n≥0]  fⁿ ∈ₚ [ f ⁿ|n≥0]
+                     D R f ∧l D R (fᵐ · r · fⁿ)  D R f ∧l D R r
+    locEqPowerLemma2 r fᵐ fⁿ fᵐIsPow fⁿIsPow =
+      D R f ∧l D R (fᵐ · r · fⁿ) ≡⟨  locEqPowerLemma (fᵐ · r) fⁿ fⁿIsPow 
+      D R f ∧l D R (fᵐ · r)      ≡⟨ cong (D R f ∧l_) (isSupportD R .·≡∧ _ _) 
+      D R f ∧l (D R fᵐ ∧l D R r) ≡⟨ ∧lAssoc (D R f) (D R fᵐ) (D R r) 
+      (D R f ∧l D R fᵐ) ∧l D R r ≡⟨ cong (_∧l D R r) (powerLemma _ fᵐIsPow) 
+      D R f ∧l D R r 
+
+
+  locDownSupp : R[1/ f ]   (D R f)
+  locDownSupp =
+    SQ.rec
+      (isSetΣSndProp squash/ λ x  is-prop-valued x _)
+        -- the actual map: r/fⁿ ↦ Dr∧Df
+         (r , _)  (D R f ∧l D R r) , ≤m→≤j _ _ (∧≤RCancel (D R f) (D R r)))
+          -- coherence
+          λ (r , fⁿ , fⁿIsPow) (r' , fᵐ , fᵐIsPow) ((fᵏ , fᵏIsPow) , fᵏrfᵐ≡fᵏr'fⁿ)
+             Σ≡Prop  x  is-prop-valued x _)
+              (sym (locEqPowerLemma2 r fᵏ fᵐ fᵏIsPow fᵐIsPow)
+              ∙∙ cong  x  D R f ∧l D R x) fᵏrfᵐ≡fᵏr'fⁿ
+              ∙∙ locEqPowerLemma2 r' fᵏ fⁿ fᵏIsPow fⁿIsPow)
+
+  isSupportLocDownSupp : IsSupport R[1/ f ]AsCommRing (↓ᴰᴸ (D R f)) locDownSupp
+  pres0 isSupportLocDownSupp =
+    Σ≡Prop  x  is-prop-valued x _)
+           (cong (D R f ∧l_) (isSupportD R .pres0)  0lRightAnnihilates∧l (D R f))
+  pres1 isSupportLocDownSupp = Σ≡Prop  x  is-prop-valued x _) (∧lRid (D R f))
+  ·≡∧ isSupportLocDownSupp =
+    SQ.elimProp2
+       _ _  DistLatticeStr.is-set (↓ᴰᴸ (D R f) .snd) _ _)
+        λ (r , _) (r' , _)  Σ≡Prop  x  is-prop-valued x _)
+                               (cong (D R f ∧l_) (isSupportD R .·≡∧ r r')
+                                  ∧lLdist∧l (D R f) (D R r) (D R r'))
+  +≤∨ isSupportLocDownSupp =
+    SQ.elimProp2
+       _ _  DistLatticeStr.is-set (↓ᴰᴸ (D R f) .snd) _ _)
+        λ (r , fⁿ , fⁿIsPow) (r' , fᵐ , fᵐIsPow)
+           Σ≡Prop  x  is-prop-valued x _)
+                   (subst ((D R f ∧l D R ((r · fᵐ) + (r' · fⁿ))) ≤_)
+                          (path r r' fⁿ fᵐ fⁿIsPow fᵐIsPow)
+                          (ineq r r' fⁿ fᵐ))
+    where
+    ineq :  r r' fⁿ fᵐ
+          (D R f ∧l D R (r · fᵐ + r' · fⁿ))  (D R f ∧l (D R (r · fᵐ) ∨l D R (r' · fⁿ)))
+    ineq r r' fⁿ fᵐ = ≤m→≤j _ _ (≤-∧LPres (D R (r · fᵐ + r' · fⁿ))
+                                          (D R (r · fᵐ) ∨l D R (r' · fⁿ))
+                                          (D R f)
+                                (≤j→≤m _ _ (isSupportD R .+≤∨ (r · fᵐ) (r' · fⁿ))))
+
+    path :  r r' fⁿ fᵐ  fⁿ ∈ₚ [ f ⁿ|n≥0]  fᵐ ∈ₚ [ f ⁿ|n≥0]
+          D R f ∧l (D R (r · fᵐ) ∨l D R (r' · fⁿ))
+          (D R f ∧l D R r) ∨l (D R f ∧l D R r')
+    path r r' fⁿ fᵐ fⁿIsPow fᵐIsPow =
+      ∧lLdist∨l (D R f) (D R (r · fᵐ)) (D R (r' · fⁿ))
+       cong₂ (_∨l_) (locEqPowerLemma r fᵐ fᵐIsPow) (locEqPowerLemma r' fⁿ fⁿIsPow)
+
+
+  -- one direction of the equivalence
+  locToDownHom : DistLatticeHom (ZariskiLattice R[1/ f ]AsCommRing) (↓ᴰᴸ (D R f))
+  locToDownHom = ZLHasUniversalProp _ _ _ isSupportLocDownSupp .fst .fst
+
+  toDownSupp : R .fst   (D R f)
+  toDownSupp = locDownSupp  _/1
+
+  isSupportToDownSupp : IsSupport R (↓ᴰᴸ (D R f)) toDownSupp
+  isSupportToDownSupp = presSupportPrecomp /1AsCommRingHom _ _ isSupportLocDownSupp
+
+  -- the map ZL R → ZL R[1/f] → ↓Df is just Df∧_
+  -- does not type check without lossy unification!!!
+  toLocToDown≡ToDown : locToDownHom ∘dl inducedZarLatHom /1AsCommRingHom
+                      toDownHom (D R f)
+  toLocToDown≡ToDown =
+    cong fst (isContr→isProp
+      (ZLHasUniversalProp R (↓ᴰᴸ (D R f)) toDownSupp isSupportToDownSupp)
+        (locToDownHom ∘dl (inducedZarLatHom /1AsCommRingHom) , toLocToDownComm)
+        (toDownHom (D R f) , toDownComm))
+    where
+    toDownComm : toDownHom (D R f) .fst  (D R)  toDownSupp
+    toDownComm = funExt λ r  Σ≡Prop  x  is-prop-valued x _) refl
+
+    toLocToDownComm : locToDownHom .fst  inducedZarLatHom /1AsCommRingHom .fst  D R
+                     toDownSupp
+    toLocToDownComm =
+        locToDownHom .fst  (inducedZarLatHom /1AsCommRingHom) .fst  D R
+
+      ≡⟨ cong (locToDownHom .fst ∘_) (inducedZarLatHomComm /1AsCommRingHom) 
+
+        locToDownHom .fst  D R[1/ f ]AsCommRing  _/1
+
+      ≡⟨ ∘-assoc (locToDownHom .fst) (D R[1/ f ]AsCommRing) _/1 
+
+        (locToDownHom .fst  D R[1/ f ]AsCommRing)  _/1
+
+      ≡⟨ cong (_∘ _/1) (ZLHasUniversalProp _ _ _ isSupportLocDownSupp .fst .snd) 
+
+        locDownSupp  _/1 
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf.html b/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf.html new file mode 100644 index 0000000000..3eaf50234a --- /dev/null +++ b/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf.html @@ -0,0 +1,411 @@ + +Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf
{-
+
+   This module defines the basic opens of the Zariski lattice and proves that they're a basis of the lattice.
+   It also contains the construction of the structure presheaf and a proof of the sheaf property on basic opens,
+   using the theory developed in the module PreSheafFromUniversalProp and its toSheaf.lemma.
+   Note that the structure sheaf is a functor into R-algebras and not just commutative rings.
+
+-}
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf where
+
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Univalence
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Transport
+open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence)
+                                         renaming ( _∈_ to _∈ₚ_ ; subst-∈ to subst-∈ₚ
+                                                  ; ∈-isProp to ∈ₚ-isProp)
+
+import Cubical.Data.Empty as 
+open import Cubical.Data.Bool hiding (_≤_)
+open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
+                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
+                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
+                                      ; ·-identityʳ to ·ℕ-rid)
+open import Cubical.Data.Sigma.Base
+open import Cubical.Data.Sigma.Properties
+open import Cubical.Data.FinData
+open import Cubical.Data.Unit
+open import Cubical.Relation.Nullary
+open import Cubical.Relation.Binary
+open import Cubical.Relation.Binary.Order.Poset
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.Ring.Properties
+open import Cubical.Algebra.Ring.BigOps
+open import Cubical.Algebra.Algebra
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.BinomialThm
+open import Cubical.Algebra.CommRing.Ideal
+open import Cubical.Algebra.CommRing.FGIdeal
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Algebra.CommRing.Localisation
+open import Cubical.Algebra.CommRing.Instances.Unit
+open import Cubical.Algebra.CommAlgebra.Base
+open import Cubical.Algebra.CommAlgebra.Properties
+open import Cubical.Algebra.CommAlgebra.Localisation
+open import Cubical.Tactics.CommRingSolver
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.Basis
+open import Cubical.Algebra.DistLattice.BigOps
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+open import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+
+open import Cubical.Categories.Category.Base hiding (_[_,_])
+open import Cubical.Categories.Functor
+open import Cubical.Categories.NaturalTransformation
+open import Cubical.Categories.Limits.Limits
+open import Cubical.Categories.Limits.Terminal
+open import Cubical.Categories.Limits.RightKan
+
+open import Cubical.Categories.Instances.CommRings
+open import Cubical.Categories.Instances.CommAlgebras
+open import Cubical.Categories.Instances.DistLattice
+open import Cubical.Categories.Instances.Semilattice
+
+open import Cubical.Categories.DistLatticeSheaf.Diagram
+open import Cubical.Categories.DistLatticeSheaf.Base
+open import Cubical.Categories.DistLatticeSheaf.Extension
+
+open import Cubical.HITs.SetQuotients as SQ
+open import Cubical.HITs.PropositionalTruncation as PT
+
+open Iso
+open BinaryRelation
+open isEquivRel
+
+
+module _ { : Level} (R' : CommRing ) where
+ open CommRingStr ⦃...⦄
+ open RingTheory (CommRing→Ring R')
+ open CommIdeal R'
+ open isCommIdeal
+
+ open ZarLat R'
+ open ZarLatUniversalProp R'
+ open IsSupport
+
+ open Join ZariskiLattice
+ open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
+ open IsBasis
+
+ private
+  R = fst R'
+  instance
+   _ = snd R'
+  ⟨_⟩ₛ : R  CommIdeal -- s is for singleton
+   f ⟩ₛ =  replicateFinVec 1 f ⟩[ R' ]
+
+ BasicOpens :  ZL
+ BasicOpens 𝔞 = (∃[ f  R ] (D f  𝔞)) , isPropPropTrunc
+
+ BO : Type 
+ BO = Σ[ 𝔞  ZL ] (𝔞 ∈ₚ BasicOpens)
+
+ basicOpensAreBasis : IsBasis ZariskiLattice BasicOpens
+ contains1 basicOpensAreBasis =  1r , isSupportD .pres1 ∣₁
+ ∧lClosed basicOpensAreBasis 𝔞 𝔟 = map2
+            λ (f , Df≡𝔞) (g , Dg≡𝔟)  (f · g) , isSupportD .·≡∧ f g  cong₂ (_∧z_) Df≡𝔞 Dg≡𝔟
+ ⋁Basis basicOpensAreBasis = elimProp  _  isPropPropTrunc) Σhelper
+  where
+  Σhelper : (a : Σ[ n   ] FinVec R n)
+           ∃[ n   ] Σ[ α  FinVec ZL n ] (∀ i  α i ∈ₚ BasicOpens) × ( α  [ a ])
+  Σhelper (n , α) =  n , (D  α) ,  i   α i , refl ∣₁) , ⋁D≡ α ∣₁
+
+ -- important fact that D(f)≤D(g) → isContr (R-Hom R[1/f] R[1/g])
+ module _ where
+   open InvertingElementsBase R'
+
+   contrHoms : (f g : R)
+              D f  D g
+              isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra)
+   contrHoms f g Df≤Dg = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra
+     λ s s∈[gⁿ|n≥0]  subst-∈ₚ (R[1/ f ]AsCommRing ˣ)
+       (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere
+         (RadicalLemma.toUnit R' f g f∈√⟨g⟩ s s∈[gⁿ|n≥0])
+    where
+    open AlgLoc R' [ g ⁿ|n≥0] (powersFormMultClosedSubset g)
+         renaming (S⁻¹RHasAlgUniversalProp to R[1/g]HasAlgUniversalProp)
+    open S⁻¹RUniversalProp R' [ f ⁿ|n≥0] (powersFormMultClosedSubset f) using (_/1)
+    open RadicalIdeal R'
+
+    private
+     instance
+      _ = snd R[1/ f ]AsCommRing
+
+    f∈√⟨g⟩ : f    g ⟩ₛ
+    f∈√⟨g⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun Df≤Dg .fst zero
+
+
+ -- The structure presheaf on BO
+ ZariskiCat = DistLatticeCategory ZariskiLattice
+
+ BOCat : Category  
+ BOCat = ΣPropCat ZariskiCat BasicOpens
+
+ private
+  P : ZL  Type _
+  P 𝔞 = Σ[ f  R ] (D f  𝔞) -- the untruncated defining property
+
+  𝓕 : Σ ZL P  CommAlgebra R' _
+  𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f]
+
+  uniqueHom :  (x y : Σ ZL P)  (fst x)  (fst y)  isContr (CommAlgebraHom (𝓕 y) (𝓕 x))
+  uniqueHom (𝔞 , f , p) (𝔟 , g , q) 𝔞≤𝔟 = contrHoms f g Df≤Dg
+    where
+    Df≤Dg : D f  D g
+    Df≤Dg = subst2 _≤_ (sym p) (sym q) 𝔞≤𝔟
+
+
+
+ open PreSheafFromUniversalProp ZariskiCat P 𝓕 uniqueHom
+ 𝓞ᴮ : Functor (BOCat ^op) CommRingsCategory
+ 𝓞ᴮ = funcComp (ForgetfulCommAlgebra→CommRing R') universalPShf
+
+ -- The extension
+ open Functor
+ open PreSheafExtension ZariskiLattice CommRingsCategory LimitsCommRingsCategory BasicOpens
+ 𝓞 : Functor (ZariskiCat ^op) CommRingsCategory
+ 𝓞 = DLRan 𝓞ᴮ
+
+ toBasisPath :  f  𝓞 .F-ob (D f)  𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)
+ toBasisPath f = cong  F  F .F-ob (D f ,  f , refl ∣₁))
+                      (NatIsoToPath isUnivalentCommRingsCategory (DLRanNatIso 𝓞ᴮ))
+
+
+ open InvertingElementsBase R'
+ private
+   Forgetful = ForgetfulCommAlgebra→CommRing R' {ℓ' = }
+
+   𝓞ᴮOb≡ :  f  𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)  R[1/ f ]AsCommRing
+   𝓞ᴮOb≡ f = 𝓞ᴮ .F-ob (D f ,  f , refl ∣₁)     ≡⟨ refl 
+     -- all of this should hold by refl -----------------------------------------------------------
+     -- but somehow Agda takes forever to type-check if you don't use -----------------------------
+     -- the lemma funcCompOb≡ (which is just refl itself) or if you leave out ---------------------
+     -- any of the intermediate refl steps --------------------------------------------------------
+       (funcComp (ForgetfulCommAlgebra→CommRing R') universalPShf) .F-ob (D f ,  f , refl ∣₁)
+     ≡⟨ funcCompOb≡ Forgetful universalPShf _ 
+       Forgetful .F-ob R[1/ f ]AsCommAlgebra
+     ≡⟨ refl 
+     ----------------------------------------------------------------------------------------------
+     CommAlgebra→CommRing R[1/ f ]AsCommAlgebra ≡⟨ invElCommAlgebra→CommRingPath f 
+     R[1/ f ]AsCommRing                         
+
+ baseSections :  f  𝓞 .F-ob (D f)  R[1/ f ]AsCommRing
+ baseSections f = toBasisPath f  𝓞ᴮOb≡ f
+
+ globalSection : 𝓞 .F-ob (D 1r)  R'
+ globalSection = baseSections 1r   invertingUnitsPath _ _ (Units.RˣContainsOne _)
+
+
+ open SheafOnBasis ZariskiLattice (CommRingsCategory { = }) BasicOpens basicOpensAreBasis
+ open DistLatticeStr ⦃...⦄
+ private instance _ = snd ZariskiLattice
+
+ isSheaf𝓞ᴮ : isDLBasisSheaf 𝓞ᴮ
+ isSheaf𝓞ᴮ {n = n} α = curriedHelper (fst  α) (snd  α)
+  where
+  curriedHelper : (𝔞 : FinVec ZL n) (𝔞∈BO :  i  𝔞 i ∈ₚ BasicOpens)
+                  (⋁𝔞∈BO :  𝔞 ∈ₚ BasicOpens)
+                 isLimCone _ _ (F-cone 𝓞ᴮ
+                                (condCone.B⋁Cone  i  𝔞 i , 𝔞∈BO i) ⋁𝔞∈BO))
+  curriedHelper 𝔞 = PT.elimFin  _  isPropΠ  _  isPropIsLimCone _ _ _))
+                     λ x  PT.elim  _  isPropIsLimCone _ _ _) (Σhelper x)
+    where
+    Σhelper : (x :  i  Σ[ f  R ] D f  𝔞 i)
+              (y : Σ[ g  R ] D g   𝔞)
+             isLimCone _ _ (F-cone 𝓞ᴮ
+                            (condCone.B⋁Cone  i  𝔞 i ,  x i ∣₁)  y ∣₁))
+    Σhelper x y = toSheaf.toLimCone theSheafCone doubleLocAlgCone
+                                    algPaths isLimConeDoubleLocAlgCone
+      where
+      f = fst  x
+      h = fst y
+      Df≡𝔞 = snd  x
+      Dh≡⋁𝔞 = snd y
+
+      open condCone  i  𝔞 i ,  f i , Df≡𝔞 i ∣₁)
+      theSheafCone = B⋁Cone  h , Dh≡⋁𝔞 ∣₁
+
+      DHelper : D h  [ n , f ] --⋁ (D ∘ f)
+      DHelper = Dh≡⋁𝔞  ⋁Ext  i  sym (Df≡𝔞 i))  ⋁D≡ f
+
+      open Exponentiation R'
+      open RadicalIdeal R'
+      open DoubleLoc R' h
+      open isMultClosedSubset (powersFormMultClosedSubset h)
+      open S⁻¹RUniversalProp R' [ h ⁿ|n≥0] (powersFormMultClosedSubset h)
+      open CommIdeal R[1/ h ]AsCommRing using ()
+                                        renaming (CommIdeal to CommIdealₕ ; _∈_ to _∈ₕ_)
+
+      instance
+       _ = snd R[1/ h ]AsCommRing
+
+      -- crucial facts about radical ideals
+      h∈√⟨f⟩ : h    f ⟩[ R' ]
+      h∈√⟨f⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun DHelper .fst zero
+
+      f∈√⟨h⟩ :  i  f i    h ⟩ₛ
+      f∈√⟨h⟩ i = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun
+                   (sym DHelper) .fst i
+
+      ff∈√⟨h⟩ :  i j  f i · f j    h ⟩ₛ
+      ff∈√⟨h⟩ i j =   h ⟩ₛ .snd .·Closed (f i) (f∈√⟨h⟩ j)
+
+      f/1 : FinVec (R[1/ h ]) n
+      f/1 i = (f i) /1
+
+      1∈⟨f/1⟩ : 1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
+      1∈⟨f/1⟩ = fromFact h∈√⟨f⟩
+       where
+       fromFact : h    f ⟩[ R' ]  1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
+       fromFact = PT.rec isPropPropTrunc (uncurry helper1)
+        where
+        helper1 : (m : )  h ^ m   f ⟩[ R' ]  1r ∈ₕ  f/1 ⟩[ R[1/ h ]AsCommRing ]
+        helper1 m = PT.map helper2
+         where
+         helper2 : Σ[ α  FinVec R n ]
+                     h ^ m  linearCombination R' α f
+                  Σ[ β  FinVec R[1/ h ] n ]
+                     1r  linearCombination R[1/ h ]AsCommRing β f/1
+         helper2 (α , hᵐ≡∑αf) = β , path
+          where
+          open Units R[1/ h ]AsCommRing
+          open Sum (CommRing→Ring R[1/ h ]AsCommRing)
+          open IsRingHom (snd /1AsCommRingHom)
+          open SumMap _ _ /1AsCommRingHom
+          instance
+           h⁻ᵐ : (h ^ m) /1 ∈ₚ (R[1/ h ]AsCommRing ˣ)
+           h⁻ᵐ = [ 1r , h ^ m ,  m , refl ∣₁ ]
+               , eq/ _ _ ((1r , containsOne) , solve! R')
+
+          β : FinVec R[1/ h ] n
+          β i = ((h ^ m) /1) ⁻¹ · α i /1
+
+          /1Path : (h ^ m) /1    i  α i /1 · f i /1)
+          /1Path = (h ^ m) /1
+                 ≡⟨ cong (_/1) hᵐ≡∑αf 
+                   (linearCombination R' α f) /1
+                 ≡⟨ ∑Map  i  α i · f i) 
+                     i  (α i · f i) /1)
+                 ≡⟨ ∑Ext  i  pres· (α i) (f i)) 
+                     i  α i /1 · f i /1) 
+
+          path : 1r    i   β i · f/1 i)
+          path = 1r
+               ≡⟨ sym (·-linv ((h ^ m) /1)) 
+                 ((h ^ m) /1) ⁻¹ · (h ^ m) /1
+               ≡⟨ cong (((h ^ m) /1) ⁻¹ ·_) /1Path 
+                 ((h ^ m) /1) ⁻¹ ·   i  α i /1 · f i /1)
+               ≡⟨ ∑Mulrdist (((h ^ m) /1) ⁻¹)  i  α i /1 · f i /1) 
+                   i   ((h ^ m) /1) ⁻¹ · (α i /1 · f i /1))
+               ≡⟨ ∑Ext  i  ·Assoc (((h ^ m) /1) ⁻¹) (α i /1) (f i /1)) 
+                   i   β i · f/1 i) 
+
+
+      -- Putting everything together:
+      -- First, the diagram and limiting cone we get from our lemma
+      -- in Cubical.Algebra.Localisation.Limit with R=R[1/h]
+      --      ⟨ f₁/1 , ... , fₙ/1 ⟩ = R[1/h]
+      --   ⇒  R[1/h] = lim { R[1/h][1/fᵢ] → R[1/h][1/fᵢfⱼ] ← R[1/h][1/fⱼ] }
+      doubleLocDiag = locDiagram R[1/ h ]AsCommRing f/1
+      doubleLocCone = locCone R[1/ h ]AsCommRing f/1
+      isLimConeDoubleLocCone : isLimCone _ _ doubleLocCone
+      isLimConeDoubleLocCone = isLimConeLocCone R[1/ h ]AsCommRing f/1 1∈⟨f/1⟩
+
+      -- this gives a limiting cone in R-algebras via _/1/1 : R → R[1/h][1/fᵢ]
+      -- note that the pair case looks more complicated as
+      -- R[1/h][(fᵢfⱼ)/1/1] =/= R[1/h][(fᵢ/1 · fⱼ/1)/1]
+      -- definitionally
+      open Cone
+      open IsRingHom
+
+      module D i = DoubleLoc R' h (f i)
+
+      /1/1Cone : Cone doubleLocDiag R'
+      coneOut /1/1Cone (sing i) = D./1/1AsCommRingHom i
+      fst (coneOut /1/1Cone (pair i j i<j)) r =
+          [ [ r , 1r ,  0 , refl ∣₁ ] , 1r ,  0 , refl ∣₁ ]
+      pres0 (snd (coneOut /1/1Cone (pair i j i<j))) = refl
+      pres1 (snd (coneOut /1/1Cone (pair i j i<j))) = refl
+      pres+ (snd (coneOut /1/1Cone (pair i j i<j))) x y =
+        cong [_] (≡-× (cong [_] (≡-×
+                      (cong₂ _+_ (solve! R') (solve! R'))
+                      (Σ≡Prop  _  isPropPropTrunc) (solve! R'))))
+                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
+      pres· (snd (coneOut /1/1Cone (pair i j i<j))) x y =
+        cong [_] (≡-× (cong [_] (≡-× refl
+                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r)))))
+                      (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
+      pres- (snd (coneOut /1/1Cone (pair i j i<j))) _ = refl
+      coneOutCommutes /1/1Cone idAr = idCompCommRingHom _
+      coneOutCommutes /1/1Cone singPairL = RingHom≡ (funExt
+         x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
+        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
+        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
+      coneOutCommutes /1/1Cone singPairR = RingHom≡ (funExt
+         x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
+        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
+        (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
+
+      open LimitFromCommRing R' R[1/ h ]AsCommRing (DLShfDiag n )
+                             doubleLocDiag doubleLocCone /1/1Cone
+
+      -- get the desired cone in algebras:
+      isConeMor/1 : isConeMor /1/1Cone doubleLocCone /1AsCommRingHom
+      isConeMor/1 = isConeMorSingLemma /1/1Cone doubleLocCone
+                       _  RingHom≡ (funExt  _  refl)))
+
+      doubleLocAlgCone = algCone /1AsCommRingHom isConeMor/1
+      isLimConeDoubleLocAlgCone : isLimCone _ _ doubleLocAlgCone
+      isLimConeDoubleLocAlgCone = reflectsLimits /1AsCommRingHom isConeMor/1
+                                                 isLimConeDoubleLocCone
+
+      -- we only give the paths on objects
+      -- R[1/h][1/fᵢ] ≡ [1/fᵢ]
+      -- R[1/h][1/fᵢfⱼ] ≡ R[1/fᵢfⱼ]
+      algPaths :  v  F-ob algDiag v  F-ob (funcComp universalPShf BDiag) v
+      algPaths (sing i) = doubleLocCancel (f∈√⟨h⟩ i)
+        where
+        open DoubleAlgLoc R' h (f i)
+      algPaths (pair i j i<j) = path  doubleLocCancel (ff∈√⟨h⟩ i j)
+        where
+        open DoubleAlgLoc R' h (f i · f j)
+        open CommAlgChar R'
+
+        -- the naive def.
+        R[1/h][1/fᵢfⱼ]AsCommRingReg = InvertingElementsBase.R[1/_]AsCommRing
+                                        R[1/ h ]AsCommRing ((f i · f j) /1)
+
+        path : toCommAlg ( F-ob doubleLocDiag (pair i j i<j)
+                         , coneOut /1/1Cone (pair i j i<j))
+              toCommAlg (R[1/h][1/fᵢfⱼ]AsCommRingReg , /1/1AsCommRingHom (f i · f j))
+        path =  cong toCommAlg (ΣPathP (p , q))
+          where
+          eqInR[1/h] : (f i /1) · (f j /1)  (f i · f j) /1
+          eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· (f i) (f j))
+
+          p : F-ob doubleLocDiag (pair i j i<j)  R[1/h][1/fᵢfⱼ]AsCommRingReg
+          p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i)
+
+          q : PathP  i  CommRingHom R' (p i)) (coneOut /1/1Cone (pair i j i<j))
+                                                 (/1/1AsCommRingHom (f i · f j))
+          q = toPathP (RingHom≡ (funExt (
+                λ r  cong [_] (≡-× (cong [_] (≡-× (transportRefl _  transportRefl r)
+                    (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))
+                    (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))))
+
+
+ -- our main result
+ isSheaf𝓞 : isDLSheaf _ _ 𝓞
+ isSheaf𝓞 = isDLSheafDLRan _ _ isSheaf𝓞ᴮ
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback.html b/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback.html new file mode 100644 index 0000000000..01fe92504f --- /dev/null +++ b/Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback.html @@ -0,0 +1,443 @@ + +Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback
{-
+
+   This module defines the basic opens of the Zariski lattice and proves that
+   they're a basis of the lattice. It also contains the construction of the
+   structure presheaf and a proof of the sheaf property on basic opens,
+   using the theory developed in the module PreSheafFromUniversalProp and its toSheaf.lemma.
+   Note that the structure sheaf is a functor into R-algebras and not just commutative rings.
+
+-}
+
+{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheafPullback where
+
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Univalence
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Transport
+open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence)
+                                         renaming (_∈_ to _∈ₚ_ ; subst-∈ to subst-∈ₚ)
+
+import Cubical.Data.Empty as 
+open import Cubical.Data.Bool hiding (_≤_)
+open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
+                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
+                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
+                                      ; ·-identityʳ to ·ℕ-rid)
+open import Cubical.Data.Sigma.Base
+open import Cubical.Data.Sigma.Properties
+open import Cubical.Data.FinData
+open import Cubical.Data.Unit
+open import Cubical.Relation.Nullary
+open import Cubical.Relation.Binary
+open import Cubical.Relation.Binary.Order.Poset
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.Ring.Properties
+open import Cubical.Algebra.Ring.BigOps
+open import Cubical.Algebra.Algebra
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.BinomialThm
+open import Cubical.Algebra.CommRing.Ideal
+open import Cubical.Algebra.CommRing.FGIdeal
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Algebra.CommRing.Localisation.Base
+open import Cubical.Algebra.CommRing.Localisation.UniversalProperty
+open import Cubical.Algebra.CommRing.Localisation.InvertingElements
+open import Cubical.Algebra.CommRing.Localisation.PullbackSquare
+open import Cubical.Algebra.CommAlgebra.Base
+open import Cubical.Algebra.CommAlgebra.Properties
+open import Cubical.Algebra.CommAlgebra.Localisation
+open import Cubical.Algebra.CommAlgebra.Instances.Unit
+open import Cubical.Tactics.CommRingSolver
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.Basis
+open import Cubical.Algebra.DistLattice.BigOps
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+open import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
+
+open import Cubical.Categories.Category.Base hiding (_[_,_])
+open import Cubical.Categories.Functor
+open import Cubical.Categories.Limits.Terminal
+open import Cubical.Categories.Limits.Pullback
+open import Cubical.Categories.Instances.CommAlgebras
+open import Cubical.Categories.Instances.DistLattice
+open import Cubical.Categories.Instances.Semilattice
+open import Cubical.Categories.DistLatticeSheaf.Base
+
+open import Cubical.HITs.SetQuotients as SQ
+open import Cubical.HITs.PropositionalTruncation as PT
+
+open Iso
+open BinaryRelation
+open isEquivRel
+
+private
+  variable
+     ℓ' : Level
+
+
+
+module _ (R' : CommRing ) where
+ open CommRingStr ⦃...⦄
+ open RingTheory (CommRing→Ring R')
+ open CommIdeal R'
+ open isCommIdeal
+
+ open ZarLat R'
+ open ZarLatUniversalProp R'
+ open IsSupport
+
+ open Join ZariskiLattice
+ open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice ZariskiLattice))
+ open IsBasis
+
+ private
+  R = fst R'
+  instance
+   _ = snd R'
+  ⟨_⟩ : R  CommIdeal
+   f  =  replicateFinVec 1 f ⟩[ R' ]
+  ⟨_⟩ₚ : R × R  CommIdeal -- p is for pair
+   f , g ⟩ₚ =  replicateFinVec 1 f ++Fin replicateFinVec 1 g ⟩[ R' ]
+
+
+ BasicOpens :  ZL
+ BasicOpens 𝔞 = (∃[ f  R ] (D f  𝔞)) , isPropPropTrunc
+
+ BO : Type 
+ BO = Σ[ 𝔞  ZL ] (𝔞 ∈ₚ BasicOpens)
+
+ basicOpensAreBasis : IsBasis ZariskiLattice BasicOpens
+ contains1 basicOpensAreBasis =  1r , isSupportD .pres1 ∣₁
+ ∧lClosed basicOpensAreBasis 𝔞 𝔟 = map2
+            λ (f , Df≡𝔞) (g , Dg≡𝔟)  (f · g) , isSupportD .·≡∧ f g  cong₂ (_∧z_) Df≡𝔞 Dg≡𝔟
+ ⋁Basis basicOpensAreBasis = elimProp  _  isPropPropTrunc) Σhelper
+  where
+  Σhelper : (a : Σ[ n   ] FinVec R n)
+           ∃[ n   ] Σ[ α  FinVec ZL n ] (∀ i  α i ∈ₚ BasicOpens) × ( α  [ a ])
+  Σhelper (n , α) =  n , (D  α) ,  i   α i , refl ∣₁) , path ∣₁
+   where
+   path :  (D  α)  [ n , α ]
+   path = funExt⁻ (cong fst ZLUniversalPropCorollary) _
+
+
+ -- The structure presheaf on BO
+ ZariskiCat = DistLatticeCategory ZariskiLattice
+
+ BOCat : Category  
+ BOCat = ΣPropCat ZariskiCat BasicOpens
+
+ private
+  P : ZL  Type _
+  P 𝔞 = Σ[ f  R ] (D f  𝔞) -- the untruncated defining property
+
+  𝓕 : Σ ZL P  CommAlgebra R' _
+  𝓕 (_ , f , _) = R[1/ f ]AsCommAlgebra -- D(f) ↦ R[1/f]
+
+  uniqueHom :  (x y : Σ ZL P)  (fst x)  (fst y)  isContr (CommAlgebraHom (𝓕 y) (𝓕 x))
+  uniqueHom (𝔞 , f , p) (𝔟 , g , q) = contrHoms 𝔞 𝔟 f g p q
+   where
+   open InvertingElementsBase R'
+
+   contrHoms : (𝔞 𝔟 : ZL) (f g : R) (p : D f  𝔞) (q : D g  𝔟)
+              𝔞  𝔟  isContr (CommAlgebraHom R[1/ g ]AsCommAlgebra R[1/ f ]AsCommAlgebra)
+   contrHoms 𝔞 𝔟 f g p q 𝔞≤𝔟 = R[1/g]HasAlgUniversalProp R[1/ f ]AsCommAlgebra
+     λ s s∈[gⁿ|n≥0]  subst-∈ₚ (R[1/ f ]AsCommRing ˣ)
+       (sym (·IdR (s /1))) --can't apply the lemma directly as we get mult with 1 somewhere
+         (RadicalLemma.toUnit R' f g f∈√⟨g⟩ s s∈[gⁿ|n≥0])
+    where
+    open AlgLoc R' [ g ⁿ|n≥0] (powersFormMultClosedSubset g)
+         renaming (S⁻¹RHasAlgUniversalProp to R[1/g]HasAlgUniversalProp)
+    open S⁻¹RUniversalProp R' [ f ⁿ|n≥0] (powersFormMultClosedSubset f) using (_/1)
+    open RadicalIdeal R'
+
+    private
+     instance
+      _ = snd R[1/ f ]AsCommRing
+
+    Df≤Dg : D f  D g
+    Df≤Dg = subst2 _≤_ (sym p) (sym q) 𝔞≤𝔟
+
+    f∈√⟨g⟩ : f    g 
+    f∈√⟨g⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun Df≤Dg .fst zero
+
+
+ open PreSheafFromUniversalProp ZariskiCat P 𝓕 uniqueHom
+ BasisStructurePShf : Functor (BOCat ^op) (CommAlgebrasCategory R')
+ BasisStructurePShf = universalPShf
+
+
+ -- now prove the sheaf properties
+ open SheafOnBasis ZariskiLattice (CommAlgebrasCategory R' {ℓ' = })
+                   BasicOpens basicOpensAreBasis
+
+ -- only proof for weak notion of sheaf on a basis
+ isSheafBasisStructurePShf : isDLBasisSheafPullback BasisStructurePShf
+ fst isSheafBasisStructurePShf 0∈BO = subst (isTerminal (CommAlgebrasCategory R'))
+                                        (sym R[1/0]≡0  λ i  F-ob (0z , canonical0∈BO≡0∈BO i))
+                                          (TerminalCommAlgebra R' .snd)
+   where
+   open Functor ⦃...⦄
+   instance
+    _ = BasisStructurePShf
+
+   canonical0∈BO : 0z ∈ₚ BasicOpens
+   canonical0∈BO =  0r , isSupportD .pres0 ∣₁
+
+   canonical0∈BO≡0∈BO : canonical0∈BO  0∈BO
+   canonical0∈BO≡0∈BO = BasicOpens 0z .snd _ _
+
+   R[1/0]≡0 : R[1/ 0r ]AsCommAlgebra  UnitCommAlgebra R'
+   R[1/0]≡0 = uaCommAlgebra (e , eIsRHom)
+    where
+    open InvertingElementsBase R' using (isContrR[1/0])
+    open IsAlgebraHom
+
+    e : R[1/ 0r ]AsCommAlgebra .fst  UnitCommAlgebra R' .fst
+    e = isContr→Equiv isContrR[1/0] isContrUnit*
+
+    eIsRHom : IsCommAlgebraEquiv (R[1/ 0r ]AsCommAlgebra .snd) e (UnitCommAlgebra R' .snd)
+    pres0 eIsRHom = refl
+    pres1 eIsRHom = refl
+    pres+ eIsRHom _ _ = refl
+    pres· eIsRHom _ _ = refl
+    pres- eIsRHom _ = refl
+    pres⋆ eIsRHom _ _ = refl
+
+ snd isSheafBasisStructurePShf (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO = curriedHelper 𝔞 𝔟 𝔞∈BO 𝔟∈BO 𝔞∨𝔟∈BO
+  where
+  open condSquare
+  {-
+     here:
+     BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf =
+
+     𝓞 (𝔞∨𝔟) → 𝓞 (𝔞)
+
+       ↓         ↓
+
+     𝓞 (𝔟)  →  𝓞 (𝔞∧𝔟)
+
+  -}
+  curriedHelper : (𝔞 𝔟 : ZL) (𝔞∈BO : 𝔞 ∈ₚ BasicOpens) (𝔟∈BO : 𝔟 ∈ₚ BasicOpens)
+                  (𝔞∨𝔟∈BO : 𝔞 ∨z 𝔟 ∈ₚ BasicOpens)
+                 isPullback (CommAlgebrasCategory R') _ _ _
+                             (BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf)
+  curriedHelper 𝔞 𝔟 = elim3  𝔞∈BO 𝔟∈BO 𝔞∨𝔟∈BO  isPropIsPullback _ _ _ _
+                            (BFsq (𝔞 , 𝔞∈BO) (𝔟 , 𝔟∈BO) 𝔞∨𝔟∈BO BasisStructurePShf))
+                            Σhelper
+   where
+   -- write everything explicitly so things can type-check
+   thePShfCospan : (a : Σ[ f  R ] D f  𝔞) (b : Σ[ g  R ] D g  𝔟)
+                  Cospan (CommAlgebrasCategory R')
+   Cospan.l (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob (𝔟 ,  g , Dg≡𝔟 ∣₁)
+   Cospan.m (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob
+            (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)
+   Cospan.r (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-ob (𝔞 ,  f , Df≡𝔞 ∣₁)
+   Cospan.s₁ (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-hom
+             {x = (𝔟 ,  g , Dg≡𝔟 ∣₁)}
+             {y = (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)}
+             (hom-∧₂  ZariskiLattice (CommAlgebrasCategory R' {ℓ' = }) 𝔞 𝔟)
+   Cospan.s₂ (thePShfCospan (f , Df≡𝔞) (g , Dg≡𝔟)) = BasisStructurePShf .Functor.F-hom
+             {x = (𝔞 ,  f , Df≡𝔞 ∣₁)}
+             {y = (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)}
+             (hom-∧₁  ZariskiLattice (CommAlgebrasCategory R' {ℓ' = }) 𝔞 𝔟)
+
+   Σhelper : (a : Σ[ f  R ] D f  𝔞) (b : Σ[ g  R ] D g  𝔟) (c : Σ[ h  R ] D h  𝔞 ∨z 𝔟)
+            isPullback (CommAlgebrasCategory R') (thePShfCospan a b) _ _
+                        (BFsq (𝔞 ,  a ∣₁) (𝔟 ,  b ∣₁)  c ∣₁ BasisStructurePShf)
+   Σhelper (f , Df≡𝔞) (g , Dg≡𝔟) (h , Dh≡𝔞∨𝔟) = toSheafPB.lemma
+           (𝔞 ∨z 𝔟 ,  h , Dh≡𝔞∨𝔟 ∣₁)
+           (𝔞 ,  f , Df≡𝔞 ∣₁)
+           (𝔟 ,  g , Dg≡𝔟 ∣₁)
+           (𝔞 ∧z 𝔟 , basicOpensAreBasis .∧lClosed 𝔞 𝔟  f , Df≡𝔞 ∣₁  g , Dg≡𝔟 ∣₁)
+           (Bsq (𝔞 ,  f , Df≡𝔞 ∣₁) (𝔟 ,  g , Dg≡𝔟 ∣₁)  h , Dh≡𝔞∨𝔟 ∣₁)
+           theAlgebraCospan theAlgebraPullback refl gPath fPath fgPath
+    where
+    open Exponentiation R'
+    open RadicalIdeal R'
+    open InvertingElementsBase R'
+    open DoubleLoc R' h
+    open S⁻¹RUniversalProp R' [ h ⁿ|n≥0] (powersFormMultClosedSubset h)
+    open CommIdeal R[1/ h ]AsCommRing using () renaming (CommIdeal to CommIdealₕ ; _∈_ to _∈ₕ_)
+
+    instance
+     _ = snd R[1/ h ]AsCommRing
+
+    ⟨_⟩ₕ : R[1/ h ] × R[1/ h ]  CommIdealₕ
+     x , y ⟩ₕ =  replicateFinVec 1 x ++Fin replicateFinVec 1 y ⟩[ R[1/ h ]AsCommRing ]
+
+    -- the crucial algebraic fact:
+    DHelper : D h  D f ∨z D g
+    DHelper = Dh≡𝔞∨𝔟  cong₂ (_∨z_) (sym Df≡𝔞) (sym Dg≡𝔟)
+
+    f∈√⟨h⟩ : f    h 
+    f∈√⟨h⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun (sym DHelper) .fst zero
+
+    g∈√⟨h⟩ : g    h 
+    g∈√⟨h⟩ = isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun (sym DHelper) .fst one
+
+    fg∈√⟨h⟩ : (f · g)    h 
+    fg∈√⟨h⟩ =   h  .snd .·Closed f g∈√⟨h⟩
+
+    1∈fgIdeal : 1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
+    1∈fgIdeal = helper1 (isEquivRel→effectiveIso ∼PropValued ∼EquivRel _ _ .fun DHelper .fst zero)
+     where
+     helper1 : h    f , g ⟩ₚ
+              1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
+     helper1 = PT.rec isPropPropTrunc (uncurry helper2)
+      where
+      helper2 : (n : )
+               h ^ n   f , g ⟩ₚ
+               1r ∈ₕ  (f /1) , (g /1) ⟩ₕ
+      helper2 n = map helper3
+       where
+       helper3 : Σ[ α  FinVec R 2 ]
+                  h ^ n  linearCombination R' α  { zero  f ; (suc zero)  g })
+                Σ[ β  FinVec R[1/ h ] 2 ]
+                  1r  linearCombination R[1/ h ]AsCommRing β
+                                         λ { zero  f /1 ; (suc zero)  g /1 }
+       helper3 (α , p) = β , path
+        where
+        β : FinVec R[1/ h ] 2
+        β zero = [ α zero , h ^ n ,  n , refl ∣₁ ]
+        β (suc zero) = [ α (suc zero) , h ^ n ,  n , refl ∣₁ ]
+
+        path : 1r  linearCombination R[1/ h ]AsCommRing β
+                                      λ { zero  f /1 ; (suc zero)  g /1 }
+        path = eq/ _ _ ((1r ,  0 , refl ∣₁) , bigPath)
+              cong (β zero · (f /1) +_) (sym (+IdR (β (suc zero) · (g /1))))
+         where
+         bigPath : 1r · 1r · ((h ^ n · 1r) · (h ^ n · 1r))
+                  1r · (α zero · f · (h ^ n · 1r) + α (suc zero) · g · (h ^ n · 1r)) · 1r
+         bigPath = solve! R'  cong (h ^ n ·_) p  solve! R'
+
+    {-
+
+      We get the following pullback square in CommRings
+
+        R[1/h]   →    R[1/h][1/f]
+              ⌟
+        ↓             ↓
+
+        R[1/h][1/g] → R[1/h][1/fg]
+
+      this lifts to a pullback in R-Algebras using PullbackFromCommRing
+      as all for rings have canonical morphisms coming from R
+      and all the triangles commute.
+
+      Then using toSheaf.lemma we get the desired square
+
+        R[1/h]  →  R[1/f]
+              ⌟
+        ↓          ↓
+
+        R[1/g]  →  R[1/fg]
+
+      by only providing paths between the corresponding vertices of the square.
+      These paths are constructed using S⁻¹RAlgCharEquiv, which gives
+      an equivalent characterization of the universal property of localization
+      that can be found in e.g. Cor 3.2 of Atiyah-MacDonald
+
+    -}
+
+    theRingCospan = fgCospan R[1/ h ]AsCommRing (f /1) (g /1)
+    theRingPullback = fgPullback R[1/ h ]AsCommRing (f /1) (g /1) 1∈fgIdeal
+
+    R[1/h][1/f] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing (f /1)
+    R[1/h][1/f]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (f /1)
+    R[1/h][1/g] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing (g /1)
+    R[1/h][1/g]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (g /1)
+    R[1/h][1/fg] = InvertingElementsBase.R[1/_] R[1/ h ]AsCommRing ((f /1) · (g /1))
+    R[1/h][1/fg]AsCommRing = InvertingElementsBase.R[1/_]AsCommRing
+                               R[1/ h ]AsCommRing ((f /1) · (g /1))
+
+    open IsRingHom
+    /1/1AsCommRingHomFG : CommRingHom R' R[1/h][1/fg]AsCommRing
+    fst /1/1AsCommRingHomFG r = [ [ r , 1r ,  0 , refl ∣₁ ] , 1r ,  0 , refl ∣₁ ]
+    pres0 (snd /1/1AsCommRingHomFG) = refl
+    pres1 (snd /1/1AsCommRingHomFG) = refl
+    pres+ (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-×
+                                         (cong₂ _+_ (solve! R') (solve! R'))
+                                         (Σ≡Prop  _  isPropPropTrunc) (solve! R'))))
+                                         (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
+    pres· (snd /1/1AsCommRingHomFG) x y = cong [_] (≡-× (cong [_] (≡-× refl
+                                            (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r)))))
+                                            (Σ≡Prop  _  isPropPropTrunc) (sym (·IdR 1r))))
+    pres- (snd /1/1AsCommRingHomFG) x = refl
+
+    open Cospan
+    open Pullback
+    open RingHoms
+    isRHomR[1/h]→R[1/h][1/f] : theRingPullback .pbPr₂ ∘r /1AsCommRingHom  /1/1AsCommRingHom f
+    isRHomR[1/h]→R[1/h][1/f] = RingHom≡ (funExt  x  refl))
+
+    isRHomR[1/h]→R[1/h][1/g] : theRingPullback .pbPr₁ ∘r /1AsCommRingHom  /1/1AsCommRingHom g
+    isRHomR[1/h]→R[1/h][1/g] = RingHom≡ (funExt  x  refl))
+
+    isRHomR[1/h][1/f]→R[1/h][1/fg] : theRingCospan .s₂ ∘r /1/1AsCommRingHom f  /1/1AsCommRingHomFG
+    isRHomR[1/h][1/f]→R[1/h][1/fg] = RingHom≡ (funExt
+       x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
+          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
+          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
+
+    isRHomR[1/h][1/g]→R[1/h][1/fg] : theRingCospan .s₁ ∘r /1/1AsCommRingHom g  /1/1AsCommRingHomFG
+    isRHomR[1/h][1/g]→R[1/h][1/fg] = RingHom≡ (funExt
+       x  cong [_] (≡-× (cong [_] (≡-× (cong (x ·_) (transportRefl 1r)  ·IdR x)
+          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r))))
+          (Σ≡Prop  _  isPropPropTrunc) (cong (1r ·_) (transportRefl 1r)  ·IdR 1r)))))
+
+
+    open PullbackFromCommRing R' theRingCospan theRingPullback
+         /1AsCommRingHom (/1/1AsCommRingHom f) (/1/1AsCommRingHom g) /1/1AsCommRingHomFG
+    theAlgebraCospan = algCospan isRHomR[1/h]→R[1/h][1/f]
+                                 isRHomR[1/h]→R[1/h][1/g]
+                                 isRHomR[1/h][1/f]→R[1/h][1/fg]
+                                 isRHomR[1/h][1/g]→R[1/h][1/fg]
+    theAlgebraPullback = algPullback isRHomR[1/h]→R[1/h][1/f]
+                                     isRHomR[1/h]→R[1/h][1/g]
+                                     isRHomR[1/h][1/f]→R[1/h][1/fg]
+                                     isRHomR[1/h][1/g]→R[1/h][1/fg]
+
+    --and the three remaining paths
+    fPath : theAlgebraCospan .r  R[1/ f ]AsCommAlgebra
+    fPath = doubleLocCancel f∈√⟨h⟩
+     where
+     open DoubleAlgLoc R' h f
+
+    gPath : theAlgebraCospan .l  R[1/ g ]AsCommAlgebra
+    gPath = doubleLocCancel g∈√⟨h⟩
+     where
+     open DoubleAlgLoc R' h g
+
+    fgPath : theAlgebraCospan .m  R[1/ (f · g) ]AsCommAlgebra
+    fgPath = path  doubleLocCancel fg∈√⟨h⟩
+     where
+     open DoubleAlgLoc R' h (f · g)
+     open CommAlgChar R'
+
+     R[1/h][1/fg]AsCommRing' = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing ((f · g) /1)
+
+     path : toCommAlg (R[1/h][1/fg]AsCommRing , /1/1AsCommRingHomFG)
+           toCommAlg (R[1/h][1/fg]AsCommRing' , /1/1AsCommRingHom (f · g))
+     path = cong toCommAlg (ΣPathP (p , q))
+      where
+      eqInR[1/h] : (f /1) · (g /1)  (f · g) /1
+      eqInR[1/h] = sym (/1AsCommRingHom .snd .pres· f g)
+
+      p : R[1/h][1/fg]AsCommRing  R[1/h][1/fg]AsCommRing'
+      p i = InvertingElementsBase.R[1/_]AsCommRing R[1/ h ]AsCommRing (eqInR[1/h] i)
+
+      q : PathP  i  CommRingHom R' (p i)) /1/1AsCommRingHomFG (/1/1AsCommRingHom (f · g))
+      q = toPathP (RingHom≡ (funExt (
+            λ x  cong [_] (≡-× (cong [_] (≡-× (transportRefl _  transportRefl x)
+                (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))
+                (Σ≡Prop  _  isPropPropTrunc) (transportRefl 1r))))))
+
\ No newline at end of file diff --git a/Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty.html b/Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty.html new file mode 100644 index 0000000000..9de04eed73 --- /dev/null +++ b/Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty.html @@ -0,0 +1,409 @@ + +Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty
{-# OPTIONS --safe --lossy-unification #-}
+module Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty where
+
+
+open import Cubical.Foundations.Prelude
+open import Cubical.Foundations.Function
+open import Cubical.Foundations.Equiv
+open import Cubical.Foundations.Isomorphism
+open import Cubical.Foundations.Univalence
+open import Cubical.Foundations.HLevels
+open import Cubical.Foundations.Transport
+open import Cubical.Foundations.Powerset using ( ; ⊆-refl-consequence) renaming (_∈_ to _∈ₚ_)
+
+import Cubical.Data.Empty as 
+open import Cubical.Data.Bool hiding (_≤_)
+open import Cubical.Data.Nat renaming ( _+_ to _+ℕ_ ; _·_ to _·ℕ_ ; _^_ to _^ℕ_
+                                      ; +-comm to +ℕ-comm ; +-assoc to +ℕ-assoc
+                                      ; ·-assoc to ·ℕ-assoc ; ·-comm to ·ℕ-comm
+                                      ; ·-identityʳ to ·ℕ-rid)
+open import Cubical.Data.Sigma.Base
+open import Cubical.Data.Sigma.Properties
+open import Cubical.Data.FinData
+open import Cubical.Data.Unit
+open import Cubical.Relation.Nullary
+open import Cubical.Relation.Binary
+open import Cubical.Relation.Binary.Order.Poset
+
+open import Cubical.Algebra.Ring
+open import Cubical.Algebra.Ring.Properties
+open import Cubical.Algebra.Ring.BigOps
+open import Cubical.Algebra.CommRing
+open import Cubical.Algebra.CommRing.BinomialThm
+open import Cubical.Algebra.CommRing.Ideal
+open import Cubical.Algebra.CommRing.FGIdeal
+open import Cubical.Algebra.CommRing.RadicalIdeal
+open import Cubical.Algebra.Semilattice
+open import Cubical.Algebra.Lattice
+open import Cubical.Algebra.DistLattice
+open import Cubical.Algebra.DistLattice.Basis
+open import Cubical.Algebra.DistLattice.BigOps
+open import Cubical.Algebra.Matrix
+
+open import Cubical.AlgebraicGeometry.ZariskiLattice.Base
+
+open import Cubical.HITs.SetQuotients as SQ
+open import Cubical.HITs.PropositionalTruncation as PT
+
+private
+  variable
+     ℓ' : Level
+
+
+module _ (R' : CommRing ) (L' : DistLattice ℓ') where
+
+ open CommRingStr (R' .snd)
+ open RingTheory (CommRing→Ring R')
+ open Sum (CommRing→Ring R')
+ open CommRingTheory R'
+ open Exponentiation R'
+ open Units R'
+
+ open DistLatticeStr (L' .snd) renaming (is-set to isSetL)
+ open Join L'
+ open LatticeTheory (DistLattice→Lattice L')
+ open Order (DistLattice→Lattice L')
+ open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L'))
+ open PosetReasoning IndPoset
+ open PosetStr (IndPoset .snd) hiding (_≤_)
+ private
+  R = fst R'
+  L = fst L'
+
+ record IsSupport (d : R  L) : Type (ℓ-max  ℓ') where
+  constructor issupport
+
+  field
+   pres0 : d 0r  0l
+   pres1 : d 1r  1l
+   ·≡∧ :  x y  d (x · y)  d x ∧l d y
+   +≤∨ :  x y  d (x + y)  d x ∨l d y
+
+  ∑≤⋁ : {n : } (U : FinVec R n)  d ( U)   λ i  d (U i)
+  ∑≤⋁ {n = zero} U = ∨lRid _  pres0
+  ∑≤⋁ {n = suc n} U = d ( U)                        ≤⟨ ∨lIdem _ 
+                       d (U zero  +  (U  suc))     ≤⟨ +≤∨ _ _ 
+                       d (U zero) ∨l d ( (U  suc)) ≤⟨ ≤-∨LPres _ _ _ (∑≤⋁ (U  suc)) 
+                       d (U zero) ∨l  (d  U  suc) ≤⟨ ∨lIdem _ 
+                        (d  U) 
+
+  d·LCancel :  x y  d (x · y)  d y
+  d·LCancel x y = subst  a  a  d y) (sym (·≡∧ x y)) (∧≤LCancelJoin _ _)
+
+  d·RCancel :  x y  d (x · y)  d x
+  d·RCancel x y = subst  a  a  d x) (sym (·≡∧ x y)) (∧≤RCancelJoin _ _)
+
+  linearCombination≤LCancel : {n : } (α β : FinVec R n)
+                             d (linearCombination R' α β)   (d  β)
+  linearCombination≤LCancel α β = is-trans _ _ _ (∑≤⋁  i  α i · β i))
+                                                 (≤-⋁Ext _ _ λ i  d·LCancel (α i) (β i))
+
+  supportUnit :  x  x ∈ₚ   d x  1l
+  supportUnit x (x⁻¹ , xx⁻¹≡1) = is-antisym _ _ (1lRightAnnihilates∨l _)
+                                               (subst (_≤ d x) (cong d xx⁻¹≡1  pres1) (d·RCancel _ _))
+
+  supportIdem :  (n : ) (x : R)  d (x ^ (suc n))  d x
+  supportIdem zero x = ·≡∧ _ _ ∙∙ cong (d x ∧l_) pres1 ∙∙ ∧lRid _
+  supportIdem (suc n) x = ·≡∧ _ _ ∙∙ cong (d x ∧l_) (supportIdem n x) ∙∙ ∧lIdem _
+
+  supportExpIneq :  (n : ) (x : R)  d x  d (x ^ n)
+  supportExpIneq zero x = cong (d x ∨l_) pres1 ∙∙ 1lRightAnnihilates∨l _ ∙∙ sym pres1
+  supportExpIneq (suc n) x = subst  y  d x  y) (sym (supportIdem _ x)) (∨lIdem _)
+
+  -- the crucial lemma about support maps
+  open CommIdeal R'
+  open RadicalIdeal R'
+  open isCommIdeal
+  private
+   ⟨_⟩ : {n : }  FinVec R n  CommIdeal
+    V  =  V ⟩[ R' ]
+
+  supportRadicalIneq :  {n : } (α : FinVec R n) (x : R)
+                     x    α   d x   (d  α)
+  supportRadicalIneq α x = PT.elim  _  isSetL _ _)
+         (uncurry  n  (PT.elim  _  isSetL _ _) (uncurry (curriedHelper n)))))
+   where
+   curriedHelper : (n : ) (β : FinVec R _)
+                  x ^ n  linearCombination R' β α  d x   (d  α)
+   curriedHelper n β xⁿ≡∑βα = d x ≤⟨ supportExpIneq n x 
+                              d (x ^ n)
+     ≤⟨ subst  y  y   (d  α)) (sym (cong d xⁿ≡∑βα)) (linearCombination≤LCancel β α) 
+                               (d  α) 
+
+-- precomposition with a ring hom
+module _ {A B : CommRing } (φ : CommRingHom A B)
+         (L : DistLattice ) (d : B .fst  L .fst) where
+  open IsSupport
+  open CommRingStr ⦃...⦄
+  open DistLatticeStr ⦃...⦄
+  open IsRingHom
+  private
+    instance
+      _ = L .snd
+      _ = A .snd
+      _ = B .snd
+
+  presSupportPrecomp : IsSupport B L d  IsSupport A L (d  fst φ)
+  pres0 (presSupportPrecomp dIsSupport) = cong d (φ .snd .pres0)  dIsSupport .pres0
+  pres1 (presSupportPrecomp dIsSupport) = cong d (φ .snd .pres1)  dIsSupport .pres1
+  ·≡∧ (presSupportPrecomp dIsSupport) x y = cong d (φ .snd .pres· x y)
+                     dIsSupport .·≡∧ (φ .fst x) (φ .fst y)
+  +≤∨ (presSupportPrecomp dIsSupport) x y =
+    let open JoinSemilattice
+              (Lattice→JoinSemilattice (DistLattice→Lattice L))
+    in subst  z  z  (d (φ .fst x)) ∨l (d (φ .fst y)))
+             (sym (cong d (φ .snd .pres+ x y)))
+             (dIsSupport .+≤∨ (φ .fst x) (φ .fst y))
+
+
+
+module ZarLatUniversalProp (R' : CommRing ) where
+ open CommRingStr (snd R')
+ open RingTheory (CommRing→Ring R')
+ open Sum (CommRing→Ring R')
+ open CommRingTheory R'
+ open Exponentiation R'
+ open BinomialThm R'
+ open CommIdeal R'
+ open RadicalIdeal R'
+ open isCommIdeal
+ open ProdFin R'
+
+ open ZarLat R'
+ open IsSupport
+
+ private
+  R = fst R'
+  ⟨_⟩ : {n : }  FinVec R n  CommIdeal
+   V  =  V ⟩[ R' ]
+
+
+ D : R  ZL
+ D x = [ 1 , replicateFinVec 1 x ] -- λ x → √⟨x⟩
+
+ isSupportD : IsSupport R' ZariskiLattice D
+ pres0 isSupportD = eq/ _ _ (≡→∼ (cong  (0FGIdeal _  sym (emptyFGIdeal _ _))))
+ pres1 isSupportD = refl
+ ·≡∧ isSupportD x y = cong {B = λ _  ZL}  U  [ 1 , U ]) (Length1··Fin x y)
+ +≤∨ isSupportD x y = eq/ _ _ (≡→∼ (cong  (CommIdeal≡Char
+                                           (inclOfFGIdeal _ 3Vec  2Vec  3Vec⊆2Vec)
+                                           (inclOfFGIdeal _ 2Vec  3Vec  2Vec⊆3Vec))))
+  where
+  2Vec = replicateFinVec 1 x ++Fin replicateFinVec 1 y
+  3Vec = replicateFinVec 1 (x + y) ++Fin (replicateFinVec 1 x ++Fin replicateFinVec 1 y)
+
+  3Vec⊆2Vec :  (i : Fin 3)  3Vec i   2Vec 
+  3Vec⊆2Vec zero =  2Vec  .snd .+Closed (indInIdeal _ _ zero) (indInIdeal _ _ (suc zero))
+  3Vec⊆2Vec (suc zero) = indInIdeal _ _ zero
+  3Vec⊆2Vec (suc (suc zero)) = indInIdeal _ _ (suc zero)
+
+  2Vec⊆3Vec :  (i : Fin 2)  2Vec i   3Vec 
+  2Vec⊆3Vec zero = indInIdeal _ _ (suc zero)
+  2Vec⊆3Vec (suc zero) = indInIdeal _ _ (suc (suc zero))
+
+
+ -- defintion of the universal property
+ hasZarLatUniversalProp : (L : DistLattice ℓ') (D : R  fst L)
+                         IsSupport R' L D
+                         Type _
+ hasZarLatUniversalProp {ℓ' = ℓ'} L D _ =  (L' : DistLattice ℓ') (d : R  fst L')
+                                        IsSupport R' L' d
+                                        ∃![ χ  DistLatticeHom L L' ] (fst χ)  D  d
+
+ isPropZarLatUniversalProp : (L : DistLattice ℓ') (D : R  fst L) (isSupportD : IsSupport R' L D)
+                          isProp (hasZarLatUniversalProp L D isSupportD)
+ isPropZarLatUniversalProp L D isSupportD = isPropΠ3  _ _ _  isPropIsContr)
+
+ ZLHasUniversalProp : hasZarLatUniversalProp ZariskiLattice D isSupportD
+ ZLHasUniversalProp L' d isSupportd = (χ , funExt χcomp) , χunique
+  where
+  open DistLatticeStr (snd L') renaming (is-set to isSetL)
+  open LatticeTheory (DistLattice→Lattice L')
+  open Join L'
+  open IsLatticeHom
+  L = fst L'
+
+  χ : DistLatticeHom ZariskiLattice L'
+  fst χ = SQ.rec isSetL  (_ , α)   (d  α))
+                         λ (_ , α) (_ , β)  curriedHelper α β
+   where
+   curriedHelper : {n m : } (α : FinVec R n) (β : FinVec R m)
+                  (n , α)  (m , β)   (d  α)   (d  β)
+   curriedHelper α β α∼β = is-antisym _ _ ineq1 ineq2
+    where
+    open Order (DistLattice→Lattice L')
+    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice L'))
+    open PosetReasoning IndPoset
+    open PosetStr (IndPoset .snd) hiding (_≤_)
+
+    incl1 :   α     β 
+    incl1 = ⊆-refl-consequence _ _ (cong fst (∼→≡ α∼β)) .fst
+
+    ineq1 :  (d  α)   (d  β)
+    ineq1 = ⋁IsMax (d  α) ( (d  β))
+            λ i  supportRadicalIneq isSupportd β (α i) (√FGIdealCharLImpl α  β  incl1 i)
+
+    incl2 :   β     α 
+    incl2 = ⊆-refl-consequence _ _ (cong fst (∼→≡ α∼β)) .snd
+
+    ineq2 :  (d  β)   (d  α)
+    ineq2 = ⋁IsMax (d  β) ( (d  α))
+            λ i  supportRadicalIneq isSupportd α (β i) (√FGIdealCharLImpl β  α  incl2 i)
+
+
+  pres0 (snd χ) = refl
+  pres1 (snd χ) = ∨lRid _  isSupportd .pres1
+  pres∨l (snd χ) = elimProp2  _ _  isSetL _ _) (uncurry  n α  uncurry (curriedHelper n α)))
+   where
+   curriedHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
+                   (d  (α ++Fin β))   (d  α) ∨l  (d  β)
+   curriedHelper zero α _ β = sym (∨lLid _)
+   curriedHelper (suc n) α _ β =
+                    (d  (α ++Fin β)) ≡⟨ refl 
+                   d (α zero) ∨l  (d  ((α  suc) ++Fin β))
+
+                  ≡⟨ cong (d (α zero) ∨l_) (curriedHelper _ (α  suc) _ β) 
+
+                   d (α zero) ∨l ( (d  α  suc) ∨l  (d  β))
+                  ≡⟨ ∨lAssoc _ _ _ 
+
+                    (d  α) ∨l  (d  β) 
+
+  pres∧l (snd χ) = elimProp2  _ _  isSetL _ _) (uncurry  n α  uncurry (curriedHelper n α)))
+   where
+   -- have to repeat this one here so the termination checker won't complain
+   oldHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
+               (d  (α ++Fin β))   (d  α) ∨l  (d  β)
+   oldHelper zero α _ β = sym (∨lLid _)
+   oldHelper (suc n) α _ β = cong (d (α zero) ∨l_) (oldHelper _ (α  suc) _ β)  ∨lAssoc _ _ _
+
+   curriedHelper : (n : ) (α : FinVec R n) (m : ) (β : FinVec R m)
+                   (d  (α ··Fin β))   (d  α) ∧l  (d  β)
+   curriedHelper zero α _ β = sym (0lLeftAnnihilates∧l _)
+   curriedHelper (suc n) α _ β =
+       (d  (α ··Fin β)) ≡⟨ refl 
+       (d  ((λ j  α zero · β j) ++Fin ((α  suc) ··Fin β)))
+
+     ≡⟨ oldHelper _  j  α zero · β j) _ ((α  suc) ··Fin β) 
+
+       (d   j  α zero · β j)) ∨l  (d  ((α  suc) ··Fin β))
+
+     ≡⟨ cong (_∨l  (d  ((α  suc) ··Fin β))) (⋁Ext  j  isSupportd .·≡∧ (α zero) (β j))) 
+
+        j  d (α zero) ∧l d (β j)) ∨l  (d  ((α  suc) ··Fin β))
+
+     ≡⟨ cong (_∨l  (d  ((α  suc) ··Fin β))) (sym (⋁Meetrdist _ _)) 
+
+      (d (α zero) ∧l  (d  β)) ∨l  (d  ((α  suc) ··Fin β))
+
+     ≡⟨ cong ((d (α zero) ∧l  (d  β)) ∨l_) (curriedHelper _ (α  suc) _ β) 
+
+      (d (α zero) ∧l  (d  β)) ∨l ( (d  α  suc) ∧l  (d  β))
+
+     ≡⟨ sym (∧lRdist∨l _ _ _) 
+
+       (d  α) ∧l  (d  β) 
+
+
+  χcomp :  (f : R)  χ .fst (D f)  d f
+  χcomp f = ∨lRid (d f)
+
+  χunique : (y : Σ[ χ'  DistLatticeHom ZariskiLattice L' ] fst χ'  D  d)
+           (χ , funExt χcomp)  y
+  χunique (χ' , χ'∘D≡d) = Σ≡Prop  _  isSetΠ  _  isSetL) _ _) (LatticeHom≡f _ _
+                                 (funExt (elimProp  _  isSetL _ _) (uncurry uniqHelper))))
+   where
+   uniqHelper : (n : ) (α : FinVec R n)  fst χ [ n , α ]  fst χ' [ n , α ]
+   uniqHelper zero _ = sym (cong  α  fst χ' [ 0 , α ]) (funExt  ()))  χ' .snd .pres0)
+   uniqHelper (suc n) α =
+        (d  α) ≡⟨ refl 
+       d (α zero) ∨l  (d  α  suc)
+
+      ≡⟨ cong (d (α zero) ∨l_) (uniqHelper n (α  suc))  -- the inductive step
+
+       d (α zero) ∨l fst χ' [ n , α  suc ]
+
+      ≡⟨ cong (_∨l fst χ' [ n , α  suc ]) (sym (funExt⁻ χ'∘D≡d (α zero))) 
+
+       fst χ' (D (α zero)) ∨l fst χ' [ n , α  suc ]
+
+      ≡⟨ sym (χ' .snd .pres∨l _ _) 
+
+       fst χ' (D (α zero) ∨z [ n , α  suc ])
+
+      ≡⟨ cong  β  fst χ' [ suc n , β ]) (funExt  { zero  refl ; (suc i)  refl })) 
+
+       fst χ' [ suc n , α ] 
+
+
+ -- the map induced by applying the universal property to the Zariski lattice
+ -- itself is the identity hom
+ ZLUniversalPropCorollary : ZLHasUniversalProp ZariskiLattice D isSupportD .fst .fst
+                           idDistLatticeHom ZariskiLattice
+ ZLUniversalPropCorollary = cong fst
+                              (ZLHasUniversalProp ZariskiLattice D isSupportD .snd
+                                 (idDistLatticeHom ZariskiLattice , refl))
+
+ -- and another corollary
+ module _ where
+  open Join ZariskiLattice
+  ⋁D≡ : {n : } (α : FinVec R n)   (D  α)  [ n , α ]
+  ⋁D≡ _ = funExt⁻ (cong fst ZLUniversalPropCorollary) _
+
+-- the lattice morphism induced by a ring morphism
+module _ {A B : CommRing } (φ : CommRingHom A B) where
+
+ open ZarLat
+ open ZarLatUniversalProp
+ open IsSupport
+ open CommRingStr ⦃...⦄
+ open DistLatticeStr ⦃...⦄
+ open IsRingHom
+ private
+   instance
+     _ = A .snd
+     _ = B .snd
+     _ = (ZariskiLattice A) .snd
+     _ = (ZariskiLattice B) .snd
+
+ Dcomp : A .fst  ZL B
+ Dcomp = D B  fst φ
+
+ isSupportDcomp : IsSupport A (ZariskiLattice B) Dcomp
+ isSupportDcomp = presSupportPrecomp φ (ZariskiLattice B) (D B) (isSupportD B)
+
+ inducedZarLatHom : DistLatticeHom (ZariskiLattice A) (ZariskiLattice B)
+ inducedZarLatHom =
+   ZLHasUniversalProp A (ZariskiLattice B) Dcomp isSupportDcomp .fst .fst
+
+ inducedZarLatHomComm : inducedZarLatHom .fst  D A  Dcomp
+ inducedZarLatHomComm =
+   ZLHasUniversalProp A (ZariskiLattice B) Dcomp isSupportDcomp .fst .snd
+
+-- functoriality
+module _ (A : CommRing ) where
+  open ZarLat
+  open ZarLatUniversalProp
+
+  inducedZarLatHomId : inducedZarLatHom (idCommRingHom A)
+                      idDistLatticeHom (ZariskiLattice A)
+  inducedZarLatHomId =
+    cong fst
+      (ZLHasUniversalProp A (ZariskiLattice A) (Dcomp (idCommRingHom A))
+                                               (isSupportDcomp (idCommRingHom A)) .snd
+        (idDistLatticeHom (ZariskiLattice A) , refl))
+
+module _ {A B C : CommRing } (φ : CommRingHom A B) (ψ : CommRingHom B C) where
+  open ZarLat
+  open ZarLatUniversalProp
+
+  inducedZarLatHomSeq : inducedZarLatHom (ψ ∘cr φ)
+                       inducedZarLatHom ψ ∘dl inducedZarLatHom φ
+  inducedZarLatHomSeq =
+    cong fst
+      (ZLHasUniversalProp A (ZariskiLattice C) (Dcomp (ψ ∘cr φ))
+                                               (isSupportDcomp (ψ ∘cr φ)) .snd
+        (inducedZarLatHom ψ ∘dl inducedZarLatHom φ , funExt  _  ∨lRid _)))
+    where open DistLatticeStr (ZariskiLattice C .snd)
+
\ No newline at end of file diff --git a/Cubical.Categories.Instances.ZFunctors.html b/Cubical.Categories.Instances.ZFunctors.html index c180825b89..64fd0422c4 100644 --- a/Cubical.Categories.Instances.ZFunctors.html +++ b/Cubical.Categories.Instances.ZFunctors.html @@ -1,797 +1,26 @@ -Cubical.Categories.Instances.ZFunctors
{-
+Cubical.Categories.Instances.ZFunctors
{-# OPTIONS --safe #-}
+module Cubical.Categories.Instances.ZFunctors where
 
-   The impredicative way to define functorial qcqs-schemes (over Spec(ℤ))
+{-
 
--}
-{-# OPTIONS --safe --lossy-unification #-}
-module Cubical.Categories.Instances.ZFunctors where
-
-open import Cubical.Foundations.Prelude
-open import Cubical.Foundations.Equiv
-open import Cubical.Foundations.Isomorphism
-open import Cubical.Foundations.Function
-open import Cubical.Foundations.Powerset
-open import Cubical.Foundations.HLevels
-
-
-open import Cubical.Functions.FunExtEquiv
-
-open import Cubical.Data.Sigma
-open import Cubical.Data.Nat using ()
-
-open import Cubical.Data.FinData
-
-open import Cubical.Algebra.Ring
-open import Cubical.Algebra.CommRing
-open import Cubical.Algebra.CommRing.Localisation
-open import Cubical.Algebra.CommRing.RadicalIdeal
-open import Cubical.Algebra.Semilattice
-open import Cubical.Algebra.Lattice
-open import Cubical.Algebra.DistLattice
-open import Cubical.Algebra.DistLattice.BigOps
-open import Cubical.Algebra.ZariskiLattice.Base
-open import Cubical.Algebra.ZariskiLattice.UniversalProperty
-open import Cubical.Algebra.ZariskiLattice.Properties
-
-open import Cubical.Categories.Category renaming (isIso to isIsoC)
-open import Cubical.Categories.Functor
-open import Cubical.Categories.Instances.Sets
-open import Cubical.Categories.Instances.CommRings
-open import Cubical.Categories.Instances.DistLattice
-open import Cubical.Categories.Instances.DistLattices
-open import Cubical.Categories.Instances.Functors
-open import Cubical.Categories.Site.Cover
-open import Cubical.Categories.Site.Coverage
-open import Cubical.Categories.Site.Sheaf
-open import Cubical.Categories.Site.Instances.ZariskiCommRing
-open import Cubical.Categories.NaturalTransformation
-open import Cubical.Categories.Yoneda
-
-
-open import Cubical.HITs.PropositionalTruncation as PT
-open import Cubical.HITs.SetQuotients as SQ
-
-open import Cubical.Relation.Binary.Order.Poset
-
-open Category hiding (_∘_) renaming (_⋆_ to _⋆c_)
-
-private
- variable
-   ℓ' ℓ'' : Level
-
-
-module _ { : Level} where
-
-  open Functor
-  open NatTrans
-  open CommRingStr ⦃...⦄
-  open IsRingHom
-
-  -- using the naming conventions of Demazure & Gabriel
-  ℤFunctor = Functor (CommRingsCategory { = }) (SET )
-  ℤFUNCTOR = FUNCTOR (CommRingsCategory { = }) (SET )
-
-  -- Yoneda in the notation of Demazure & Gabriel,
-  -- uses that double op is original category definitionally
-  Sp : Functor (CommRingsCategory { = } ^op) ℤFUNCTOR
-  Sp = YO {C = (CommRingsCategory { = } ^op)}
-
-  -- the forgetful functor
-  -- aka the affine line
-  -- (aka the representable of ℤ[x])
-  𝔸¹ : ℤFunctor
-  𝔸¹ = ForgetfulCommRing→Set
-
-  -- the global sections functor
-  𝓞 : Functor ℤFUNCTOR (CommRingsCategory { = ℓ-suc } ^op)
-  fst (F-ob 𝓞 X) = X  𝔸¹
-
-  -- ring struncture induced by internal ring object 𝔸¹
-  N-ob (CommRingStr.0r (snd (F-ob 𝓞 X))) A _ = 0r
-    where instance _ = A .snd
-  N-hom (CommRingStr.0r (snd (F-ob 𝓞 X))) φ = funExt λ _  sym (φ .snd .pres0)
-
-  N-ob (CommRingStr.1r (snd (F-ob 𝓞 X))) A _ = 1r
-    where instance _ = A .snd
-  N-hom (CommRingStr.1r (snd (F-ob 𝓞 X))) φ = funExt λ _  sym (φ .snd .pres1)
-
-  N-ob ((snd (F-ob 𝓞 X) CommRingStr.+ α) β) A x = α .N-ob A x + β .N-ob A x
-    where instance _ = A .snd
-  N-hom ((snd (F-ob 𝓞 X) CommRingStr.+ α) β) {x = A} {y = B} φ = funExt path
-    where
-    instance
-      _ = A .snd
-      _ = B .snd
-    path :  x  α .N-ob B (X .F-hom φ x) + β .N-ob B (X .F-hom φ x)
-                φ .fst (α .N-ob A x + β .N-ob A x)
-    path x = α .N-ob B (X .F-hom φ x) + β .N-ob B (X .F-hom φ x)
-           ≡⟨ cong₂ _+_ (funExt⁻ (α .N-hom φ) x) (funExt⁻ (β .N-hom φ) x) 
-             φ .fst (α .N-ob A x) + φ .fst (β .N-ob A x)
-           ≡⟨ sym (φ .snd .pres+ _ _) 
-             φ .fst (α .N-ob A x + β .N-ob A x) 
-
-  N-ob ((snd (F-ob 𝓞 X) CommRingStr.· α) β) A x = α .N-ob A x · β .N-ob A x
-    where instance _ = A .snd
-  N-hom ((snd (F-ob 𝓞 X) CommRingStr.· α) β) {x = A} {y = B} φ = funExt path
-    where
-    instance
-      _ = A .snd
-      _ = B .snd
-    path :  x  α .N-ob B (X .F-hom φ x) · β .N-ob B (X .F-hom φ x)
-                φ .fst (α .N-ob A x · β .N-ob A x)
-    path x = α .N-ob B (X .F-hom φ x) · β .N-ob B (X .F-hom φ x)
-           ≡⟨ cong₂ _·_ (funExt⁻ (α .N-hom φ) x) (funExt⁻ (β .N-hom φ) x) 
-             φ .fst (α .N-ob A x) · φ .fst (β .N-ob A x)
-           ≡⟨ sym (φ .snd .pres· _ _) 
-             φ .fst (α .N-ob A x · β .N-ob A x) 
-
-  N-ob ((CommRingStr.- snd (F-ob 𝓞 X)) α) A x = - α .N-ob A x
-    where instance _ = A .snd
-  N-hom ((CommRingStr.- snd (F-ob 𝓞 X)) α) {x = A} {y = B} φ = funExt path
-    where
-    instance
-      _ = A .snd
-      _ = B .snd
-    path :  x  - α .N-ob B (X .F-hom φ x)  φ .fst (- α .N-ob A x)
-    path x = - α .N-ob B (X .F-hom φ x) ≡⟨ cong -_ (funExt⁻ (α .N-hom φ) x) 
-             - φ .fst (α .N-ob A x)     ≡⟨ sym (φ .snd .pres- _) 
-             φ .fst (- α .N-ob A x)     
-
-  CommRingStr.isCommRing (snd (F-ob 𝓞 X)) = makeIsCommRing
-    isSetNatTrans
-     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+Assoc _ _ _))
-     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+IdR _))
-     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+InvR _))
-     _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.+Comm _ _))
-     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·Assoc _ _ _))
-     _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·IdR _))
-     _ _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·DistR+ _ _ _))
-     _ _  makeNatTransPath (funExt₂ λ A _  A .snd .CommRingStr.·Comm _ _))
-
-  -- action on natural transformations
-  fst (F-hom 𝓞 α) = α ●ᵛ_
-  pres0 (snd (F-hom 𝓞 α)) = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres1 (snd (F-hom 𝓞 α)) = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres+ (snd (F-hom 𝓞 α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres· (snd (F-hom 𝓞 α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres- (snd (F-hom 𝓞 α)) _ = makeNatTransPath (funExt₂ λ _ _  refl)
-
-  -- functoriality of 𝓞
-  F-id 𝓞 = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
-  F-seq 𝓞 _ _ = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
-
-
-
--- There is an adjunction 𝓞 ⊣ᵢ Sp
--- (relative to the inclusion i : CommRing ℓ → CommRing (ℓ+1))
--- between the "global sections functor" 𝓞
--- and the fully-faithful embedding of affines Sp,
--- whose counit is a natural isomorphism
-module AdjBij where
-
-  open Functor
-  open NatTrans
-  open Iso
-  open IsRingHom
-
-  private module _ {A : CommRing } {X : ℤFunctor {}} where
-    _♭ : CommRingHom A (𝓞 .F-ob X)  X  Sp .F-ob A
-    fst (N-ob (φ ) B x) a = φ .fst a .N-ob B x
-
-    pres0 (snd (N-ob (φ ) B x)) = cong  y  y .N-ob B x) (φ .snd .pres0)
-    pres1 (snd (N-ob (φ ) B x)) = cong  y  y .N-ob B x) (φ .snd .pres1)
-    pres+ (snd (N-ob (φ ) B x)) _ _ = cong  y  y .N-ob B x) (φ .snd .pres+ _ _)
-    pres· (snd (N-ob (φ ) B x)) _ _ = cong  y  y .N-ob B x) (φ .snd .pres· _ _)
-    pres- (snd (N-ob (φ ) B x)) _ = cong  y  y .N-ob B x) (φ .snd .pres- _)
-
-    N-hom (φ ) ψ = funExt  x  RingHom≡ (funExt λ a  funExt⁻ (φ .fst a .N-hom ψ) x))
-
-
-    -- the other direction is just precomposition modulo Yoneda
-    _♯ : X  Sp .F-ob A  CommRingHom A (𝓞 .F-ob X)
-    fst (α ) a = α ●ᵛ yonedaᴾ 𝔸¹ A .inv a
-
-    pres0 (snd (α )) = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres0)
-    pres1 (snd (α )) = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres1)
-    pres+ (snd (α )) _ _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres+ _ _)
-    pres· (snd (α )) _ _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres· _ _)
-    pres- (snd (α )) _ = makeNatTransPath (funExt₂ λ B x  α .N-ob B x .snd .pres- _)
-
-
-    -- the two maps are inverse to each other
-    ♭♯Id :  (α  : X  Sp .F-ob A)  ((α ) )  α
-    ♭♯Id _ = makeNatTransPath (funExt₂ λ _ _  RingHom≡ (funExt  _  refl)))
-
-    ♯♭Id :  (φ : CommRingHom A (𝓞 .F-ob X))  ((φ ) )  φ
-    ♯♭Id _ = RingHom≡ (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
-
-
-  -- we get a relative adjunction 𝓞 ⊣ᵢ Sp
-  -- with respect to the inclusion i : CommRing ℓ → CommRing (ℓ+1)
-  𝓞⊣SpIso : {A : CommRing } {X : ℤFunctor {}}
-           Iso (CommRingHom A (𝓞 .F-ob X)) (X  Sp .F-ob A)
-  fun 𝓞⊣SpIso = _♭
-  inv 𝓞⊣SpIso = _♯
-  rightInv 𝓞⊣SpIso = ♭♯Id
-  leftInv 𝓞⊣SpIso = ♯♭Id
-
-  𝓞⊣SpNatℤFunctor : {A : CommRing } {X Y : ℤFunctor {}} (α : X  Sp .F-ob A) (β : Y  X)
-                   (β ●ᵛ α)   (𝓞 .F-hom β) ∘cr (α )
-  𝓞⊣SpNatℤFunctor _ _ = RingHom≡ (funExt  _  makeNatTransPath (funExt₂  _ _  refl))))
-
-  𝓞⊣SpNatCommRing : {X : ℤFunctor {}} {A B : CommRing }
-                    (φ : CommRingHom A (𝓞 .F-ob X)) (ψ : CommRingHom B A)
-                   (φ ∘cr ψ)   (φ ) ●ᵛ Sp .F-hom ψ
-  𝓞⊣SpNatCommRing _ _ = makeNatTransPath (funExt₂ λ _ _  RingHom≡ (funExt  _  refl)))
-
-  -- the counit is an equivalence
-  private
-    ε : (A : CommRing )  CommRingHom A ((𝓞 ∘F Sp) .F-ob A)
-    ε A = (idTrans (Sp .F-ob A)) 
-
-  𝓞⊣SpCounitEquiv : (A : CommRing )  CommRingEquiv A ((𝓞 ∘F Sp) .F-ob A)
-  fst (𝓞⊣SpCounitEquiv A) = isoToEquiv theIso
-    where
-    theIso : Iso (A .fst) ((𝓞 ∘F Sp) .F-ob A .fst)
-    fun theIso = ε A .fst
-    inv theIso = yonedaᴾ 𝔸¹ A .fun
-    rightInv theIso α = ℤFUNCTOR .⋆IdL _  yonedaᴾ 𝔸¹ A .leftInv α
-    leftInv theIso a = path -- I get yellow otherwise
-      where
-      path : yonedaᴾ 𝔸¹ A .fun ((idTrans (Sp .F-ob A)) ●ᵛ yonedaᴾ 𝔸¹ A .inv a)  a
-      path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _)  yonedaᴾ 𝔸¹ A .rightInv a
-  snd (𝓞⊣SpCounitEquiv A) = ε A .snd
-
-
--- Affine schemes
-module _ { : Level} where
-  open Functor
-
-  isAffine : (X : ℤFunctor)  Type (ℓ-suc )
-  isAffine X = ∃[ A  CommRing  ] NatIso (Sp .F-ob A) X
-
-  -- TODO: 𝔸¹ ≅ Sp ℤ[x] and 𝔾ₘ ≅ Sp ℤ[x,x⁻¹] ≅ D(x) ↪ 𝔸¹ as first examples of affine schemes
-
-
--- The unit is an equivalence iff the ℤ-functor is affine.
--- Unfortunately, we can't give a natural transformation
--- X ⇒ Sp (𝓞 X), because the latter ℤ-functor lives in a higher universe.
--- We can however give terms that look just like the unit,
--- giving us an alternative def. of affine ℤ-functors
-private module AffineDefs { : Level} where
-  open Functor
-  open NatTrans
-  open Iso
-  open IsRingHom
-  η : (X : ℤFunctor) (A : CommRing )  X .F-ob A .fst  CommRingHom (𝓞 .F-ob X) A
-  fst (η X A x) α = α .N-ob A x
-  pres0 (snd (η X A x)) = refl
-  pres1 (snd (η X A x)) = refl
-  pres+ (snd (η X A x)) _ _ = refl
-  pres· (snd (η X A x)) _ _ = refl
-  pres- (snd (η X A x)) _ = refl
-
-  -- this is basically a natural transformation
-  ηObHom : (X : ℤFunctor) {A B : CommRing } (φ : CommRingHom A B)
-            η X B  (X .F-hom φ)  (φ ∘cr_)  η X A
-  ηObHom X φ = funExt  x  RingHom≡ (funExt λ α  funExt⁻ (α .N-hom φ) x))
-
-  -- can only state equality on object part, but that would be enough
-  ηHom : {X Y : ℤFunctor} (α : X  Y) (A : CommRing ) (x : X .F-ob A .fst)
-          η Y A (α .N-ob A x)  η X A x ∘cr 𝓞 .F-hom α
-  ηHom _ _ _ = RingHom≡ refl
-
-  isAffine' : (X : ℤFunctor)  Type (ℓ-suc )
-  isAffine' X =  (A : CommRing )  isEquiv (η X A)
-  -- TODO: isAffine → isAffine'
-
-
--- compact opens and affine covers
-module _ { : Level} where
-
-  open Iso
-  open Functor
-  open NatTrans
-  open NatIso
-  open DistLatticeStr ⦃...⦄
-  open CommRingStr ⦃...⦄
-  open IsRingHom
-  open IsLatticeHom
-  open ZarLat
-  open ZarLatUniversalProp
-
-  -- the Zariski lattice functor classifying compact open subobjects
-  ZarLatFun : ℤFunctor { = }
-  F-ob ZarLatFun A = ZL A , SQ.squash/
-  F-hom ZarLatFun φ = inducedZarLatHom φ .fst
-  F-id ZarLatFun {A} = cong fst (inducedZarLatHomId A)
-  F-seq ZarLatFun φ ψ = cong fst (inducedZarLatHomSeq φ ψ)
-
-  -- this is a separated presheaf
-  -- (TODO: prove this a sheaf)
-  isSeparatedZarLatFun : isSeparated zariskiCoverage ZarLatFun
-  isSeparatedZarLatFun A (unimodvec n f 1∈⟨f₁,⋯,fₙ⟩) u w uRest≡wRest =
-    u                         ≡⟨ sym (∧lLid _) 
-    1l ∧l u                  ≡⟨ congL _∧l_ D1≡⋁Dfᵢ 
-    ( (D A  f)) ∧l u       ≡⟨ ⋁Meetldist _ _ 
-      i  D A (f i) ∧l u) ≡⟨ ⋁Ext Dfᵢ∧u≡Dfᵢ∧w 
-      i  D A (f i) ∧l w) ≡⟨ sym (⋁Meetldist _ _) 
-    ( (D A  f)) ∧l w       ≡⟨ congL _∧l_ (sym D1≡⋁Dfᵢ) 
-    1l ∧l w                  ≡⟨ ∧lLid _ 
-    w 
-    where
-    open Join (ZariskiLattice A)
-    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (ZariskiLattice A)))
-         using (IndPoset)
-    open LatticeTheory (DistLattice→Lattice (ZariskiLattice A))
-    open PosetStr (IndPoset .snd)
-    open IsSupport (isSupportD A)
-    open RadicalIdeal A
-    instance
-      _ = A .snd
-      _ = ZariskiLattice A .snd
-
-    D1≡⋁Dfᵢ : 1l   (D A  f)
-    D1≡⋁Dfᵢ = is-antisym _ _
-                (supportRadicalIneq f 1r (∈→∈√ _ _ 1∈⟨f₁,⋯,fₙ⟩))
-                  (1lRightAnnihilates∨l _)
-
-    Dfᵢ∧u≡Dfᵢ∧w :  i  D A (f i) ∧l u  D A (f i) ∧l w
-    Dfᵢ∧u≡Dfᵢ∧w i =
-        D A (f i) ∧l u
-      ≡⟨ sym (cong fst (funExt⁻ (cong fst toLocToDown≡ToDown) u)) 
-        locToDownHom .fst (inducedZarLatHom /1AsCommRingHom .fst u) .fst
-      ≡⟨ cong  x  locToDownHom .fst x .fst) (uRest≡wRest i) 
-        locToDownHom .fst (inducedZarLatHom /1AsCommRingHom .fst w) .fst
-      ≡⟨ cong fst (funExt⁻ (cong fst toLocToDown≡ToDown) w) 
-        D A (f i) ∧l w 
-      where
-      open InvertingElementsBase.UniversalProp A (f i)
-      open LocDownSetIso A (f i)
-
-  CompactOpen : ℤFunctor  Type (ℓ-suc )
-  CompactOpen X = X  ZarLatFun
-
-  -- the induced subfunctor
-  ⟦_⟧ᶜᵒ : {X : ℤFunctor} (U : CompactOpen X)  ℤFunctor
-  F-ob (⟦_⟧ᶜᵒ {X = X} U) A = (Σ[ x  X .F-ob A .fst  ] U .N-ob A x  D A 1r)
-                                , isSetΣSndProp (X .F-ob A .snd) λ _  squash/ _ _
-   where instance _ = snd A
-  F-hom (⟦_⟧ᶜᵒ {X = X} U) {x = A} {y = B} φ (x , Ux≡D1) = (X .F-hom φ x) , path
-    where
-    instance
-      _ = A .snd
-      _ = B .snd
-    open IsLatticeHom
-    path : U .N-ob B (X .F-hom φ x)  D B 1r
-    path = U .N-ob B (X .F-hom φ x)         ≡⟨ funExt⁻ (U .N-hom φ) x 
-           ZarLatFun .F-hom φ (U .N-ob A x) ≡⟨ cong (ZarLatFun .F-hom φ) Ux≡D1 
-           ZarLatFun .F-hom φ (D A 1r)      ≡⟨ inducedZarLatHom φ .snd .pres1 
-           D B 1r 
-  F-id (⟦_⟧ᶜᵒ {X = X} U) = funExt  x  Σ≡Prop  _  squash/ _ _)
-                                     (funExt⁻ (X .F-id) (x .fst)))
-  F-seq (⟦_⟧ᶜᵒ {X = X} U) φ ψ = funExt  x  Σ≡Prop  _  squash/ _ _)
-                                          (funExt⁻ (X .F-seq φ ψ) (x .fst)))
-
-
-  isAffineCompactOpen : {X : ℤFunctor} (U : CompactOpen X)  Type (ℓ-suc )
-  isAffineCompactOpen U = isAffine  U ⟧ᶜᵒ
-
-  -- TODO: define basic opens D(f) ↪ Sp A and prove ⟦ D(f) ⟧ᶜᵒ ≅ Sp A[1/f]
-
-  -- the (big) dist. lattice of compact opens
-  CompOpenDistLattice : Functor ℤFUNCTOR (DistLatticesCategory { = ℓ-suc } ^op)
-  fst (F-ob CompOpenDistLattice X) = CompactOpen X
-
-  -- lattice structure induce by internal lattice object ZarLatFun
-  N-ob (DistLatticeStr.0l (snd (F-ob CompOpenDistLattice X))) A _ = 0l
-    where instance _ = ZariskiLattice A .snd
-  N-hom (DistLatticeStr.0l (snd (F-ob CompOpenDistLattice X))) _ = funExt λ _  refl
-
-  N-ob (DistLatticeStr.1l (snd (F-ob CompOpenDistLattice X))) A _ = 1l
-    where instance _ = ZariskiLattice A .snd
-  N-hom (DistLatticeStr.1l (snd (F-ob CompOpenDistLattice X))) {x = A} {y = B} φ = funExt λ _  path
-    where
-    instance
-      _ = A .snd
-      _ = B .snd
-      _ = ZariskiLattice B .snd
-    path : D B 1r  D B (φ .fst 1r) ∨l 0l
-    path = cong (D B) (sym (φ .snd .pres1))  sym (∨lRid _)
-
-  N-ob ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∨l U) V) A x = U .N-ob A x ∨l V .N-ob A x
-    where instance _ = ZariskiLattice A .snd
-  N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∨l U) V)  {x = A} {y = B} φ = funExt path
-    where
-    instance
-      _ = ZariskiLattice A .snd
-      _ = ZariskiLattice B .snd
-    path :  x  U .N-ob B (X .F-hom φ x) ∨l V .N-ob B (X .F-hom φ x)
-                ZarLatFun .F-hom φ (U .N-ob A x ∨l V .N-ob A x)
-    path x = U .N-ob B (X .F-hom φ x) ∨l V .N-ob B (X .F-hom φ x)
-           ≡⟨ cong₂ _∨l_ (funExt⁻ (U .N-hom φ) x) (funExt⁻ (V .N-hom φ) x) 
-             ZarLatFun .F-hom φ (U .N-ob A x) ∨l ZarLatFun .F-hom φ (V .N-ob A x)
-           ≡⟨ sym (inducedZarLatHom φ .snd .pres∨l _ _) 
-             ZarLatFun .F-hom φ (U .N-ob A x ∨l V .N-ob A x) 
+  The category of ℤ-functors is the category of functors from rings to sets.
+  It contains the category of schemes as a full subcategory and is thus of
+  special interest to algebraic geometers. The basic notions needed to
+  develop algebraic geometry using ℤ-functors can be found in:
 
-  N-ob ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∧l U) V) A x = U .N-ob A x ∧l V .N-ob A x
-    where instance _ = ZariskiLattice A .snd
-  N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∧l U) V)  {x = A} {y = B} φ = funExt path
-    where
-    instance
-      _ = ZariskiLattice A .snd
-      _ = ZariskiLattice B .snd
-    path :  x  U .N-ob B (X .F-hom φ x) ∧l V .N-ob B (X .F-hom φ x)
-                ZarLatFun .F-hom φ (U .N-ob A x ∧l V .N-ob A x)
-    path x = U .N-ob B (X .F-hom φ x) ∧l V .N-ob B (X .F-hom φ x)
-           ≡⟨ cong₂ _∧l_ (funExt⁻ (U .N-hom φ) x) (funExt⁻ (V .N-hom φ) x) 
-             ZarLatFun .F-hom φ (U .N-ob A x) ∧l ZarLatFun .F-hom φ (V .N-ob A x)
-           ≡⟨ sym (inducedZarLatHom φ .snd .pres∧l _ _) 
-             ZarLatFun .F-hom φ (U .N-ob A x ∧l V .N-ob A x) 
-
-  DistLatticeStr.isDistLattice (snd (F-ob CompOpenDistLattice X)) = makeIsDistLattice∧lOver∨l
-    isSetNatTrans
-     _ _ _  makeNatTransPath (funExt₂
-                  A _  ZariskiLattice A .snd .DistLatticeStr.∨lAssoc _ _ _)))
-     _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∨lRid _)))
-     _ _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∨lComm _ _)))
-     _ _ _  makeNatTransPath (funExt₂
-                  A _  ZariskiLattice A .snd .DistLatticeStr.∧lAssoc _ _ _)))
-     _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∧lRid _)))
-     _ _  makeNatTransPath (funExt₂  A _  ZariskiLattice A .snd .DistLatticeStr.∧lComm _ _)))
-     _ _  makeNatTransPath (funExt₂ -- don't know why ∧lAbsorb∨l doesn't work
-                A _  ZariskiLattice A .snd .DistLatticeStr.absorb _ _ .snd)))
-     _ _ _  makeNatTransPath (funExt₂ -- same here
-                  A _  ZariskiLattice A .snd .DistLatticeStr.∧l-dist-∨l _ _ _ .fst)))
-
-  -- (contravariant) action on morphisms
-  fst (F-hom CompOpenDistLattice α) = α ●ᵛ_
-  pres0 (snd (F-hom CompOpenDistLattice α)) = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres1 (snd (F-hom CompOpenDistLattice α)) = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres∨l (snd (F-hom CompOpenDistLattice α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
-  pres∧l (snd (F-hom CompOpenDistLattice α)) _ _ = makeNatTransPath (funExt₂ λ _ _  refl)
-
-  -- functoriality
-  F-id CompOpenDistLattice = LatticeHom≡f _ _
-                               (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
-  F-seq CompOpenDistLattice _ _ = LatticeHom≡f _ _
-                                    (funExt λ _  makeNatTransPath (funExt₂ λ _ _  refl))
-
-
-  module _ (X : ℤFunctor) where
-    open isIsoC
-    private instance _ = (CompOpenDistLattice .F-ob X) .snd
-
-    compOpenTopNatIso : NatIso X  1l ⟧ᶜᵒ
-    N-ob (trans compOpenTopNatIso) _ φ = φ , refl
-    N-hom (trans compOpenTopNatIso) _ = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
-    inv (nIso compOpenTopNatIso B) = fst
-    sec (nIso compOpenTopNatIso B) = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
-    ret (nIso compOpenTopNatIso B) = funExt λ _  refl
-
-
-  module _ (X : ℤFunctor) where
-    open isIsoC
-    open Join (CompOpenDistLattice .F-ob X)
-    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
-    open PosetStr (IndPoset .snd) hiding (_≤_)
-    open LatticeTheory ⦃...⦄
-    private instance _ = (CompOpenDistLattice .F-ob X) .snd
-
-    compOpenGlobalIncl : (U : CompactOpen X)   U ⟧ᶜᵒ  X
-    N-ob (compOpenGlobalIncl U) A = fst
-    N-hom (compOpenGlobalIncl U) φ = refl
-
-    compOpenIncl : {U V : CompactOpen X}  V  U   V ⟧ᶜᵒ   U ⟧ᶜᵒ
-    N-ob (compOpenIncl {U = U} {V = V} V≤U) A (x , Vx≡D1) = x , path
-      where
-      instance
-        _ = A .snd
-        _ = ZariskiLattice A .snd
-        _ = DistLattice→Lattice (ZariskiLattice A)
-      path : U .N-ob A x  D A 1r
-      path = U .N-ob A x                ≡⟨ funExt⁻ (funExt⁻ (cong N-ob (sym V≤U)) A) x 
-             V .N-ob A x ∨l U .N-ob A x ≡⟨ cong (_∨l U .N-ob A x) Vx≡D1 
-             D A 1r ∨l U .N-ob A x      ≡⟨ 1lLeftAnnihilates∨l _ 
-             D A 1r 
-    N-hom (compOpenIncl V≤U) φ = funExt λ x  Σ≡Prop  _  squash/ _ _) refl
-
-    -- this is essentially U∧_
-    compOpenDownHom : (U : CompactOpen X)
-                     DistLatticeHom (CompOpenDistLattice .F-ob X)
-                                     (CompOpenDistLattice .F-ob  U ⟧ᶜᵒ)
-    compOpenDownHom U = CompOpenDistLattice .F-hom (compOpenGlobalIncl U)
-
-    module _ {U V : CompactOpen X} (V≤U : V  U) where
-      -- We need this separate definition to avoid termination checker issues,
-      -- but we don't understand why.
-      private
-        compOpenDownHomFun : (A : CommRing )
-                             V ⟧ᶜᵒ .F-ob A .fst
-                             compOpenDownHom U .fst V ⟧ᶜᵒ .F-ob A .fst
-        compOpenDownHomFun A v = (compOpenIncl V≤U  A ) v , snd v
-
-      compOpenDownHomNatIso : NatIso  V ⟧ᶜᵒ  compOpenDownHom U .fst V ⟧ᶜᵒ
-      N-ob (trans compOpenDownHomNatIso) = compOpenDownHomFun
-      N-hom (trans compOpenDownHomNatIso) _ =
-        funExt λ _  Σ≡Prop  _  squash/ _ _) (Σ≡Prop  _  squash/ _ _) refl)
-      inv (nIso compOpenDownHomNatIso A) ((x , Ux≡D1) , Vx≡D1) = x , Vx≡D1
-      sec (nIso compOpenDownHomNatIso A) =
-        funExt λ _  Σ≡Prop  _  squash/ _ _) (Σ≡Prop  _  squash/ _ _) refl)
-      ret (nIso compOpenDownHomNatIso A) = funExt λ _  Σ≡Prop  _  squash/ _ _) refl
-
-    compOpenInclId :  {U : CompactOpen X}  compOpenIncl (is-refl U)  idTrans  U ⟧ᶜᵒ
-    compOpenInclId = makeNatTransPath (funExt₂  _ _  Σ≡Prop  _  squash/ _ _) refl))
-
-    compOpenInclSeq :  {U V W : CompactOpen X} (U≤V : U  V) (V≤W : V  W)
-                     compOpenIncl (is-trans _ _ _ U≤V V≤W)
-                     compOpenIncl U≤V ●ᵛ compOpenIncl V≤W
-    compOpenInclSeq _ _ = makeNatTransPath
-                            (funExt₂  _ _  Σ≡Prop  _  squash/ _ _) refl))
-
-
-    -- the structure sheaf
-    private COᵒᵖ = (DistLatticeCategory (CompOpenDistLattice .F-ob X)) ^op
-
-    strDLSh : Functor COᵒᵖ (CommRingsCategory { = ℓ-suc })
-    F-ob strDLSh  U = 𝓞 .F-ob  U ⟧ᶜᵒ
-    F-hom strDLSh U≥V = 𝓞 .F-hom (compOpenIncl U≥V)
-    F-id strDLSh = cong (𝓞 .F-hom) compOpenInclId  𝓞 .F-id
-    F-seq strDLSh _ _ = cong (𝓞 .F-hom) (compOpenInclSeq _ _)  𝓞 .F-seq _ _
-
-
-  -- def. affine cover and locality for definition of qcqs-scheme
-  module _ (X : ℤFunctor) where
-    open isIsoC
-    open Join (CompOpenDistLattice .F-ob X)
-    open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
-    open PosetStr (IndPoset .snd) hiding (_≤_)
-    open LatticeTheory ⦃...⦄
-    private instance _ = (CompOpenDistLattice .F-ob X) .snd
-
-    record AffineCover : Type (ℓ-suc ) where
-      field
-        n : 
-        U : FinVec (CompactOpen X) n
-        covers :  U  1l -- TODO: equivalent to X ≡ ⟦ ⋁ U ⟧ᶜᵒ
-        isAffineU :  i  isAffineCompactOpen (U i)
-
-    hasAffineCover : Type (ℓ-suc )
-    hasAffineCover =  AffineCover ∥₁
-
-  -- qcqs-schemes as Zariski sheaves (local ℤ-functors) with an affine cover in the sense above
-  isLocal : ℤFunctor  Type (ℓ-suc )
-  isLocal X = isSheaf zariskiCoverage X
-
-  -- Compact opens of Zariski sheaves are sheaves
-  presLocalCompactOpen : (X : ℤFunctor) (U : CompactOpen X)  isLocal X  isLocal  U ⟧ᶜᵒ
-  presLocalCompactOpen X U isLocalX R um@(unimodvec _ f _) = isoToIsEquiv isoU
-    where
-    open Coverage zariskiCoverage
-    open InvertingElementsBase R
-    instance _ = R .snd
-
-    fᵢCoverR = covers R .snd um
-
-    isoX : Iso (X .F-ob R .fst) (CompatibleFamily X fᵢCoverR)
-    isoX = equivToIso (elementToCompatibleFamily _ _ , isLocalX R um)
-
-    compatibleFamIncl : (CompatibleFamily  U ⟧ᶜᵒ fᵢCoverR)  (CompatibleFamily X fᵢCoverR)
-    compatibleFamIncl fam = (fst  fst fam)
-                          , λ i j B φ ψ φψComm  cong fst (fam .snd i j B φ ψ φψComm)
-
-    compatibleFamIncl≡ :  (y : Σ[ x  X .F-ob R .fst  ] U .N-ob R x  D R 1r)
-                        compatibleFamIncl (elementToCompatibleFamily  U ⟧ᶜᵒ fᵢCoverR y)
-                        elementToCompatibleFamily X fᵢCoverR (y .fst)
-    compatibleFamIncl≡ y = CompatibleFamily≡ _ _ _ _ λ _  refl
-
-    isoU : Iso (Σ[ x  X .F-ob R .fst  ] U .N-ob R x  D R 1r)
-               (CompatibleFamily  U ⟧ᶜᵒ fᵢCoverR)
-    fun isoU = elementToCompatibleFamily _ _
-    fst (inv isoU fam) = isoX .inv (compatibleFamIncl fam)
-    snd (inv isoU fam) = -- U (x) ≡ D(1)
-                         -- knowing that U(x/1)¸≡ D(1) in R[1/fᵢ]
-      let x = isoX .inv (compatibleFamIncl fam) in
-      isSeparatedZarLatFun R um (U .N-ob R x) (D R 1r)
-        λ i  let open UniversalProp (f i)
-                  instance _ = R[1/ (f i) ]AsCommRing .snd in
-
-                inducedZarLatHom /1AsCommRingHom .fst (U .N-ob R x)
-
-              ≡⟨ funExt⁻ (sym (U .N-hom /1AsCommRingHom)) x 
-
-                U .N-ob R[1/ (f i) ]AsCommRing (X .F-hom /1AsCommRingHom x)
-
-              ≡⟨ cong (U .N-ob R[1/ f i ]AsCommRing)
-                      (funExt⁻ (cong fst (isoX .rightInv (compatibleFamIncl fam))) i) 
-
-                U .N-ob R[1/ (f i) ]AsCommRing (fam .fst i .fst)
-
-              ≡⟨ fam .fst i .snd 
-
-                D R[1/ (f i) ]AsCommRing 1r
-
-              ≡⟨ sym (inducedZarLatHom /1AsCommRingHom .snd .pres1) 
-
-                inducedZarLatHom /1AsCommRingHom .fst (D R 1r) 
-
-    rightInv isoU fam =
-      Σ≡Prop  _  isPropIsCompatibleFamily _ _ _)
-        (funExt λ i  Σ≡Prop  _  squash/ _ _)
-                        (funExt⁻ (cong fst
-                          (isoX .rightInv (compatibleFamIncl fam))) i))
-    leftInv isoU y = Σ≡Prop  _  squash/ _ _)
-                            (cong (isoX .inv) (compatibleFamIncl≡ y)
-                               isoX .leftInv (y .fst))
-
-
-  -- definition of quasi-compact, quasi-separated schemes
-  isQcQsScheme : ℤFunctor  Type (ℓ-suc )
-  isQcQsScheme X = isLocal X × hasAffineCover X
-
-
-  -- affine schemes are qcqs-schemes
-  module _ (A : CommRing ) where
-    open AffineCover
-    private instance _ = (CompOpenDistLattice  Sp  A  ) .snd
-
-    -- the canonical one element affine cover of a representable
-    singlAffineCover : AffineCover (Sp .F-ob A)
-    n singlAffineCover = 1
-    U singlAffineCover zero = 1l
-    covers singlAffineCover = ∨lRid _
-    isAffineU singlAffineCover zero =  A , compOpenTopNatIso (Sp  A ) ∣₁
-
-    isQcQsSchemeAffine : isQcQsScheme (Sp .F-ob A)
-    fst isQcQsSchemeAffine = isSubcanonicalZariskiCoverage A
-    snd isQcQsSchemeAffine =  singlAffineCover ∣₁
-
-
--- standard affine opens
--- TODO: separate file?
-module StandardOpens { : Level} (R : CommRing ) (f : R .fst) where
-
-  open Iso
-  open Functor
-  open NatTrans
-  open NatIso
-  open isIsoC
-  open DistLatticeStr ⦃...⦄
-  open CommRingStr ⦃...⦄
-  open IsRingHom
-  open RingHoms
-  open IsLatticeHom
-  open ZarLat
-
-  open InvertingElementsBase R
-  open UniversalProp f
-
-  private module ZL = ZarLatUniversalProp
-
-  private
-    instance
-      _ = R .snd
-
-  D : CompactOpen (Sp  R )
-  D = yonedaᴾ ZarLatFun R .inv (ZL.D R f)
-
-  SpR[1/f]≅⟦Df⟧ : NatIso (Sp .F-ob R[1/ f ]AsCommRing)  D ⟧ᶜᵒ
-  N-ob (trans SpR[1/f]≅⟦Df⟧) B φ = (φ ∘r /1AsCommRingHom) , ∨lRid _  path
-    where
-    open CommRingHomTheory φ
-    open IsSupport (ZL.isSupportD B)
-    instance
-      _ = B .snd
-      _ = ZariskiLattice B .snd
-
-    isUnitφ[f/1] : φ .fst (f /1)  B ˣ
-    isUnitφ[f/1] = RingHomRespInv (f /1)  S/1⊆S⁻¹Rˣ f  1 , sym (·IdR f) ∣₁ 
-
-    path : ZL.D B (φ .fst (f /1))  1l
-    path = supportUnit _ isUnitφ[f/1]
-
-  N-hom (trans SpR[1/f]≅⟦Df⟧) _ = funExt λ _  Σ≡Prop  _  squash/ _ _) (RingHom≡ refl)
-
-  inv (nIso SpR[1/f]≅⟦Df⟧ B) (φ , Dφf≡D1) = invElemUniversalProp B φ isUnitφf .fst .fst
-    where
-    instance _ = ZariskiLattice B .snd
-    isUnitφf : φ .fst f  B ˣ
-    isUnitφf = unitLemmaZarLat B (φ $r f) (sym (∨lRid _)  Dφf≡D1)
-
-  sec (nIso SpR[1/f]≅⟦Df⟧ B) =
-    funExt λ _  Σ≡Prop  _  squash/ _ _) (RingHom≡ (invElemUniversalProp _ _ _ .fst .snd))
-  ret (nIso SpR[1/f]≅⟦Df⟧ B) =
-    funExt λ φ  cong fst (invElemUniversalProp B (φ ∘r /1AsCommRingHom) _ .snd (φ , refl))
-
-  isAffineD : isAffineCompactOpen D
-  isAffineD =  R[1/ f ]AsCommRing , SpR[1/f]≅⟦Df⟧ ∣₁
-
-
--- compact opens of affine schemes are qcqs-schemes
-module _ { : Level} (R : CommRing ) (W : CompactOpen (Sp  R )) where
-
-  open StandardOpens
-
-  open Iso
-  open Functor
-  open NatTrans
-  open NatIso
-  open isIsoC
-  open DistLatticeStr ⦃...⦄
-  open CommRingStr ⦃...⦄
-  open PosetStr ⦃...⦄
-  open IsRingHom
-  open RingHoms
-  open IsLatticeHom
-  open ZarLat
-
-  open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob (Sp .F-ob R)))) using (IndPoset; ind≤bigOp)
-  open InvertingElementsBase R
-  open Join
-  open JoinMap
-  open AffineCover
-  private module ZL = ZarLatUniversalProp
-
-  private
-    instance
-      _ = R .snd
-      _ = ZariskiLattice R .snd
-      _ = CompOpenDistLattice .F-ob (Sp .F-ob R) .snd
-      _ = CompOpenDistLattice .F-ob  W ⟧ᶜᵒ .snd
-      _ = IndPoset .snd
-
-    w : ZL R
-    w = yonedaᴾ ZarLatFun R .fun W
-
-    -- yoneda is a lattice homomorphsim
-    isHomYoneda : IsLatticeHom (DistLattice→Lattice (ZariskiLattice R) .snd)
-                               (yonedaᴾ ZarLatFun R .inv)
-                               (DistLattice→Lattice (CompOpenDistLattice  Sp  R  ) .snd)
-    pres0 isHomYoneda = makeNatTransPath (funExt₂  _ _  refl))
-    pres1 isHomYoneda =
-      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres1))
-    pres∨l isHomYoneda u v =
-      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres∨l u v))
-    pres∧l isHomYoneda u v =
-      makeNatTransPath (funExt₂  _ φ  inducedZarLatHom φ .snd .pres∧l u v))
-
-    module _ {n : }
-             (f : FinVec (fst R) n)
-             (⋁Df≡W :  (CompOpenDistLattice  Sp  R  ) (D R  f)  W) where
-
-      Df≤W :  i  D R (f i)  W
-      Df≤W i = subst (D R (f i) ≤_) ⋁Df≡W (ind≤bigOp (D R  f) i)
-
-      toAffineCover : AffineCover  W ⟧ᶜᵒ
-      AffineCover.n toAffineCover = n
-      U toAffineCover i = compOpenDownHom (Sp  R ) W .fst (D R (f i))
-      covers toAffineCover = sym (pres⋁ (compOpenDownHom (Sp  R ) W) (D R  f))
-                            cong (compOpenDownHom (Sp  R ) W .fst) ⋁Df≡W
-                            makeNatTransPath (funExt₂  _  snd))
-      isAffineU toAffineCover i =
-         _ , seqNatIso (SpR[1/f]≅⟦Df⟧ R (f i)) (compOpenDownHomNatIso _ (Df≤W i)) ∣₁
+-}
 
-  module _ {n : }
-           (f : FinVec (fst R) n)
-           (⋁Df≡w :  (ZariskiLattice R) (ZL.D R  f)  w) where
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base public
 
-    private
-      ⋁Df≡W :  (CompOpenDistLattice  Sp  R  ) (D R  f)  W
-      ⋁Df≡W = sym (pres⋁ (_ , isHomYoneda) (ZL.D R  f))
-             cong (yonedaᴾ ZarLatFun R .inv) ⋁Df≡w
-             yonedaᴾ ZarLatFun R .leftInv W
+{-
 
-    makeAffineCoverCompOpenOfAffine : AffineCover  W ⟧ᶜᵒ
-    makeAffineCoverCompOpenOfAffine = toAffineCover f ⋁Df≡W
+  In Cubical Agda we can define the full subcategory of qcqs-schemes.
+  This is done in:
 
-  hasAffineCoverCompOpenOfAffine : hasAffineCover  W ⟧ᶜᵒ
-  hasAffineCoverCompOpenOfAffine = PT.map truncHelper ([]surjective w)
-    where
-    truncHelper : Σ[ n,f  Σ  (FinVec (fst R)) ] [ n,f ]  w  AffineCover  W ⟧ᶜᵒ
-    truncHelper ((n , f) , [n,f]≡w) = makeAffineCoverCompOpenOfAffine f (ZL.⋁D≡ R f  [n,f]≡w)
+-}
 
-  isQcQsSchemeCompOpenOfAffine : isQcQsScheme  W ⟧ᶜᵒ
-  fst isQcQsSchemeCompOpenOfAffine = presLocalCompactOpen _ _ (isSubcanonicalZariskiCoverage R)
-  snd isQcQsSchemeCompOpenOfAffine = hasAffineCoverCompOpenOfAffine
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme
+open import Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme
 
\ No newline at end of file diff --git a/Cubical.Papers.AffineSchemes.html b/Cubical.Papers.AffineSchemes.html index 7506349e2c..24b74412a5 100644 --- a/Cubical.Papers.AffineSchemes.html +++ b/Cubical.Papers.AffineSchemes.html @@ -25,221 +25,221 @@ -- 2: Background -- 2.2: Cubical Agda -import Cubical.Foundations.Prelude as Prelude -import Cubical.Foundations.HLevels as HLevels -import Cubical.Foundations.Univalence as Univalence -import Cubical.Data.Sigma as Sigma -import Cubical.HITs.PropositionalTruncation as PT -import Cubical.Algebra.DistLattice.Basis as DistLatticeBasis -import Cubical.HITs.SetQuotients as SQ +import Cubical.Foundations.Prelude as Prelude +import Cubical.Foundations.HLevels as HLevels +import Cubical.Foundations.Univalence as Univalence +import Cubical.Data.Sigma as Sigma +import Cubical.HITs.PropositionalTruncation as PT +import Cubical.Algebra.DistLattice.Basis as DistLatticeBasis +import Cubical.HITs.SetQuotients as SQ --- 3: Commutative Algebra --- 3.1: Localization -import Cubical.Algebra.CommRing.Localisation.Base as L -module Localization = L.Loc +-- 3: Commutative Algebra +-- 3.1: Localization +import Cubical.Algebra.CommRing.Localisation.Base as L +module Localization = L.Loc -import Cubical.Algebra.CommRing.Localisation.UniversalProperty as LocalizationUnivProp -import Cubical.Algebra.CommRing.Localisation.InvertingElements as LocalizationInvEl -import Cubical.Algebra.CommAlgebra as R-Algs -import Cubical.Algebra.CommAlgebra.Localisation as LocalizationR-Alg +import Cubical.Algebra.CommRing.Localisation.UniversalProperty as LocalizationUnivProp +import Cubical.Algebra.CommRing.Localisation.InvertingElements as LocalizationInvEl +import Cubical.Algebra.CommAlgebra as R-Algs +import Cubical.Algebra.CommAlgebra.Localisation as LocalizationR-Alg --- 3.2: The Zariski Lattice -import Cubical.Data.FinData.Base as FiniteTypes -import Cubical.Algebra.Matrix as Matrices -import Cubical.Algebra.CommRing.FGIdeal as FinGenIdeals +-- 3.2: The Zariski Lattice +import Cubical.Data.FinData.Base as FiniteTypes +import Cubical.Algebra.Matrix as Matrices +import Cubical.Algebra.CommRing.FGIdeal as FinGenIdeals -import Cubical.Algebra.ZariskiLattice.Base as ZLB -module ZariskiLatDef = ZLB.ZarLat +import Cubical.AlgebraicGeometry.ZariskiLattice.Base as ZLB +module ZariskiLatDef = ZLB.ZarLat -import Cubical.Algebra.ZariskiLattice.UniversalProperty as ZLUP -module ZariskiLatUnivProp = ZLUP.ZarLatUniversalProp +import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty as ZLUP +module ZariskiLatUnivProp = ZLUP.ZarLatUniversalProp --- 4: Category Theory --- background theory not explicitly mentioned -import Cubical.Categories.Category.Base as CatTheory -import Cubical.Categories.Limits as GeneralLimits -import Cubical.Categories.Limits.RightKan as GeneralKanExtension +-- 4: Category Theory +-- background theory not explicitly mentioned +import Cubical.Categories.Category.Base as CatTheory +import Cubical.Categories.Limits as GeneralLimits +import Cubical.Categories.Limits.RightKan as GeneralKanExtension -import Cubical.Categories.DistLatticeSheaf.Diagram as SheafDiagShapes -import Cubical.Categories.DistLatticeSheaf.Base as Sheaves +import Cubical.Categories.DistLatticeSheaf.Diagram as SheafDiagShapes +import Cubical.Categories.DistLatticeSheaf.Base as Sheaves -import Cubical.Categories.DistLatticeSheaf.Extension as E -module SheafExtension = E.PreSheafExtension +import Cubical.Categories.DistLatticeSheaf.Extension as E +module SheafExtension = E.PreSheafExtension --- 5: The Structure Sheaf -import Cubical.Categories.Instances.CommAlgebras as R-AlgConstructions -import Cubical.Algebra.CommRing.Localisation.Limit as LocalizationLimit -import Cubical.Algebra.ZariskiLattice.StructureSheaf as StructureSheaf +-- 5: The Structure Sheaf +import Cubical.Categories.Instances.CommAlgebras as R-AlgConstructions +import Cubical.Algebra.CommRing.Localisation.Limit as LocalizationLimit +import Cubical.AlgebraicGeometry.ZariskiLattice.StructureSheaf as StructureSheaf ----------- 2: Background ---------- ----------- 2.2: A brief introduction to Cubical Agda ---------- +---------- 2: Background ---------- +---------- 2.2: A brief introduction to Cubical Agda ---------- --- path type in Cubical Agda -open Prelude using (_≡_ ; PathP) +-- path type in Cubical Agda +open Prelude using (_≡_ ; PathP) --- univalence and the cubical SIP -open Univalence using (ua) -import Cubical.Foundations.SIP -open R-Algs renaming (uaCommAlgebra to sip) +-- univalence and the cubical SIP +open Univalence using (ua) +import Cubical.Foundations.SIP +open R-Algs renaming (uaCommAlgebra to sip) --- the first three h-levels -open Prelude using (isContr ; isProp ; isSet) -open HLevels using (hProp) +-- the first three h-levels +open Prelude using (isContr ; isProp ; isSet) +open HLevels using (hProp) --- propositional truncation; In the agda/cubical library the indexing of --- truncations is shifted by +2 and start at 0 instead of -2, hence --- propositional truncation is ∥_∥₁. -open PT renaming (∥_∥₁ to ∥_∥) +-- propositional truncation; In the agda/cubical library the indexing of +-- truncations is shifted by +2 and start at 0 instead of -2, hence +-- propositional truncation is ∥_∥₁. +open PT renaming (∥_∥₁ to ∥_∥) --- ∃ notation in Cubical Agda -open Sigma using (∃-syntax) +-- ∃ notation in Cubical Agda +open Sigma using (∃-syntax) --- example of a basis of a distributive lattice -open DistLatticeBasis using (IsBasis) +-- example of a basis of a distributive lattice +open DistLatticeBasis using (IsBasis) --- Set quotients -open SQ using (_/_) +-- Set quotients +open SQ using (_/_) ----------- 3: Commutative Algebra ---------- ----------- 3.1: Localization ---------- +---------- 3: Commutative Algebra ---------- +---------- 3.1: Localization ---------- --- definition of localization -open Localization using (_≈_ ; S⁻¹R ; S⁻¹RAsCommRing) +-- definition of localization +open Localization using (_≈_ ; S⁻¹R ; S⁻¹RAsCommRing) --- Remark 1 -open SQ using (truncRelEquiv) +-- Remark 1 +open SQ using (truncRelEquiv) --- canonical homomorphism -open LocalizationUnivProp.S⁻¹RUniversalProp using (_/1) +-- canonical homomorphism +open LocalizationUnivProp.S⁻¹RUniversalProp using (_/1) --- universal property -open LocalizationUnivProp.S⁻¹RUniversalProp using (S⁻¹RHasUniversalProp) +-- universal property +open LocalizationUnivProp.S⁻¹RUniversalProp using (S⁻¹RHasUniversalProp) --- R-algebras as pairs -open R-Algs.CommAlgChar +-- R-algebras as pairs +open R-Algs.CommAlgChar --- universal property for localizations as R-algebras -open LocalizationR-Alg.AlgLoc using (S⁻¹RHasAlgUniversalProp) +-- universal property for localizations as R-algebras +open LocalizationR-Alg.AlgLoc using (S⁻¹RHasAlgUniversalProp) --- Lemma 2 -open LocalizationUnivProp using (S⁻¹RChar) -open LocalizationR-Alg.AlgLoc using (S⁻¹RAlgCharEquiv) +-- Lemma 2 +open LocalizationUnivProp using (S⁻¹RChar) +open LocalizationR-Alg.AlgLoc using (S⁻¹RAlgCharEquiv) --- localization away from element -open LocalizationInvEl.InvertingElementsBase using ([_ⁿ|n≥0] ; R[1/_] ; R[1/_]AsCommRing) +-- localization away from element +open LocalizationInvEl.InvertingElementsBase using ([_ⁿ|n≥0] ; R[1/_] ; R[1/_]AsCommRing) --- Lemma 3 --- 1. -open LocalizationInvEl.DoubleLoc using (R[1/fg]≡R[1/f][1/g]) -open LocalizationR-Alg.DoubleAlgLoc using (R[1/fg]≡R[1/f][1/g]) --- 2. -open LocalizationInvEl using (invertingUnitsPath) --- 3. -open LocalizationR-Alg.AlgLocTwoSubsets using (isContrS₁⁻¹R≡S₂⁻¹R) +-- Lemma 3 +-- 1. +open LocalizationInvEl.DoubleLoc using (R[1/fg]≡R[1/f][1/g]) +open LocalizationR-Alg.DoubleAlgLoc using (R[1/fg]≡R[1/f][1/g]) +-- 2. +open LocalizationInvEl using (invertingUnitsPath) +-- 3. +open LocalizationR-Alg.AlgLocTwoSubsets using (isContrS₁⁻¹R≡S₂⁻¹R) ----------- 3.2: Zariski Lattice ---------- +---------- 3.2: Zariski Lattice ---------- --- Zariski lattice as set-quotient and --- equivalence of quotienting relations -open ZariskiLatDef using (_∼_ ; ZL) renaming (_∼≡_ to _≋_) -open ZariskiLatDef using (≡→∼ ; ∼→≡) +-- Zariski lattice as set-quotient and +-- equivalence of quotienting relations +open ZariskiLatDef using (_∼_ ; ZL) renaming (_∼≡_ to _≋_) +open ZariskiLatDef using (≡→∼ ; ∼→≡) --- _++_ and relation to ideal addition -open FiniteTypes renaming (_++Fin_ to _++_) -open FinGenIdeals using (FGIdealAddLemma) +-- _++_ and relation to ideal addition +open FiniteTypes renaming (_++Fin_ to _++_) +open FinGenIdeals using (FGIdealAddLemma) --- _··_ and relation to ideal multiplication -open Matrices.ProdFin renaming (_··Fin_ to _··_) -open FinGenIdeals using (FGIdealMultLemma) +-- _··_ and relation to ideal multiplication +open Matrices.ProdFin renaming (_··Fin_ to _··_) +open FinGenIdeals using (FGIdealMultLemma) --- lattice structure and laws -open ZariskiLatDef using (ZariskiLattice) +-- lattice structure and laws +open ZariskiLatDef using (ZariskiLattice) --- support map D and universal property -open ZariskiLatUnivProp using (D ; isSupportD) -open ZariskiLatUnivProp using (ZLHasUniversalProp) +-- support map D and universal property +open ZariskiLatUnivProp using (D ; isSupportD) +open ZariskiLatUnivProp using (ZLHasUniversalProp) --- D(g) ≤ D(f) ⇔ isContr (R-Hom R[1/f] R[1/g]) -open StructureSheaf using (contrHoms) +-- D(g) ≤ D(f) ⇔ isContr (R-Hom R[1/f] R[1/g]) +open StructureSheaf using (contrHoms) --- basic opens -open StructureSheaf using (BasicOpens ; BO) +-- basic opens +open StructureSheaf using (BasicOpens ; BO) --- basic opens form basis -open ZariskiLatUnivProp using (ZLUniversalPropCorollary ; ⋁D≡) -open StructureSheaf using (basicOpensAreBasis) +-- basic opens form basis +open ZariskiLatUnivProp using (ZLUniversalPropCorollary ; ⋁D≡) +open StructureSheaf using (basicOpensAreBasis) ----------- 4: Category Theory ---------- +---------- 4: Category Theory ---------- --- Σ-subcategories -open CatTheory using (ΣPropCat) +-- Σ-subcategories +open CatTheory using (ΣPropCat) --- Kan-extension for distributive lattices -open SheafExtension using (DLRan ; DLRanNatIso) +-- Kan-extension for distributive lattices +open SheafExtension using (DLRan ; DLRanNatIso) --- Definition 4 -open SheafDiagShapes using (DLShfDiagOb ; DLShfDiagHom ; DLShfDiag) +-- Definition 4 +open SheafDiagShapes using (DLShfDiagOb ; DLShfDiagHom ; DLShfDiag) --- Remark 5 -open SheafDiagShapes.DLShfDiagHomPath using (isSetDLShfDiagHom) +-- Remark 5 +open SheafDiagShapes.DLShfDiagHomPath using (isSetDLShfDiagHom) --- diagram associated to a vector -open SheafDiagShapes using (FinVec→Diag) +-- diagram associated to a vector +open SheafDiagShapes using (FinVec→Diag) --- Definition 6 -open Sheaves using (isDLSheaf) +-- Definition 6 +open Sheaves using (isDLSheaf) --- Definition 7 -open Sheaves.SheafOnBasis using (isDLBasisSheaf) +-- Definition 7 +open Sheaves.SheafOnBasis using (isDLBasisSheaf) --- Lemma 8 -open Sheaves using (isDLSheafPullback) -open Sheaves.EquivalenceOfDefs using (L→P ; P→L) +-- Lemma 8 +open Sheaves using (isDLSheafPullback) +open Sheaves.EquivalenceOfDefs using (L→P ; P→L) --- Lemma 9 -open SheafExtension using (coverLemma) +-- Lemma 9 +open SheafExtension using (coverLemma) --- Theorem 10 -open SheafExtension using (isDLSheafDLRan) +-- Theorem 10 +open SheafExtension using (isDLSheafDLRan) ----------- 5: The Structure Sheaf ---------- +---------- 5: The Structure Sheaf ---------- --- Lemma 11 -open R-Algs using (recPT→CommAlgebra) +-- Lemma 11 +open R-Algs using (recPT→CommAlgebra) --- Lemma 12 -open R-AlgConstructions.PreSheafFromUniversalProp renaming (universalPShf to 𝓟ᵤ) +-- Lemma 12 +open R-AlgConstructions.PreSheafFromUniversalProp renaming (universalPShf to 𝓟ᵤ) --- definition of structure sheaf -open StructureSheaf using ( 𝓞ᴮ ; 𝓞 ) +-- definition of structure sheaf +open StructureSheaf using ( 𝓞ᴮ ; 𝓞 ) --- Proposition 13 -open StructureSheaf using (baseSections) +-- Proposition 13 +open StructureSheaf using (baseSections) --- Corollary 14 -open StructureSheaf using (globalSection) +-- Corollary 14 +open StructureSheaf using (globalSection) --- Lemma 15 -open LocalizationLimit using (isLimConeLocCone) +-- Lemma 15 +open LocalizationLimit using (isLimConeLocCone) --- Theorem 16 -open StructureSheaf using (isSheaf𝓞ᴮ) +-- Theorem 16 +open StructureSheaf using (isSheaf𝓞ᴮ) --- Corollary 17 -open StructureSheaf using (isSheaf𝓞) +-- Corollary 17 +open StructureSheaf using (isSheaf𝓞)
\ No newline at end of file diff --git a/Cubical.Papers.FunctorialQcQsSchemes.html b/Cubical.Papers.FunctorialQcQsSchemes.html index c152c26bbb..28b8b05dac 100644 --- a/Cubical.Papers.FunctorialQcQsSchemes.html +++ b/Cubical.Papers.FunctorialQcQsSchemes.html @@ -22,178 +22,178 @@ -- 2: Background -- 2.1: Univalent type theory in Cubical Agda -import Cubical.Foundations.Prelude as Prelude -import Cubical.Foundations.HLevels as HLevels -import Cubical.Foundations.Univalence as Univalence -import Cubical.Data.Sigma as Sigma -import Cubical.HITs.PropositionalTruncation as PT -import Cubical.HITs.SetQuotients as SQ +import Cubical.Foundations.Prelude as Prelude +import Cubical.Foundations.HLevels as HLevels +import Cubical.Foundations.Univalence as Univalence +import Cubical.Data.Sigma as Sigma +import Cubical.HITs.PropositionalTruncation as PT +import Cubical.HITs.SetQuotients as SQ --- 2.2: Localizations and the Zariski lattice -import Cubical.Algebra.CommRing.Localisation.InvertingElements as LocalizationInvEl -module LocalizationInvElBase = LocalizationInvEl.InvertingElementsBase -module LocalizationInvElUniversalProp = LocalizationInvElBase.UniversalProp +-- 2.2: Localizations and the Zariski lattice +import Cubical.Algebra.CommRing.Localisation.InvertingElements as LocalizationInvEl +module LocalizationInvElBase = LocalizationInvEl.InvertingElementsBase +module LocalizationInvElUniversalProp = LocalizationInvElBase.UniversalProp -import Cubical.Algebra.ZariskiLattice.Base as ZLB -module ZariskiLatDef = ZLB.ZarLat +import Cubical.AlgebraicGeometry.ZariskiLattice.Base as ZLB +module ZariskiLatDef = ZLB.ZarLat -import Cubical.Algebra.ZariskiLattice.UniversalProperty as ZLUP -module ZariskiLatUnivProp = ZLUP.ZarLatUniversalProp +import Cubical.AlgebraicGeometry.ZariskiLattice.UniversalProperty as ZLUP +module ZariskiLatUnivProp = ZLUP.ZarLatUniversalProp -module Localization&Radicals = LocalizationInvEl.RadicalLemma -import Cubical.Algebra.ZariskiLattice.Properties as ZLP +module Localization&Radicals = LocalizationInvEl.RadicalLemma +import Cubical.AlgebraicGeometry.ZariskiLattice.Properties as ZLP --- 3: ℤ-functors -import Cubical.Categories.Instances.ZFunctors as ZFun -module RelativeAdjunction = ZFun.AdjBij +-- 3: ℤ-functors +import Cubical.AlgebraicGeometry.Functorial.ZFunctors.Base as ZFun +module RelativeAdjunction = ZFun.AdjBij --- 4: Local ℤ-functors -import Cubical.Categories.Site.Cover as Cover -import Cubical.Categories.Site.Coverage as Coverage -import Cubical.Categories.Site.Sheaf as Sheaf +-- 4: Local ℤ-functors +import Cubical.Categories.Site.Cover as Cover +import Cubical.Categories.Site.Coverage as Coverage +import Cubical.Categories.Site.Sheaf as Sheaf -import Cubical.Categories.Site.Instances.ZariskiCommRing as ZariskiCoverage -module ZarCovSubcanonical = ZariskiCoverage.SubcanonicalLemmas -import Cubical.Algebra.CommRing.Localisation.Limit as LocalizationLimit +import Cubical.Categories.Site.Instances.ZariskiCommRing as ZariskiCoverage +module ZarCovSubcanonical = ZariskiCoverage.SubcanonicalLemmas +import Cubical.Algebra.CommRing.Localisation.Limit as LocalizationLimit --- !!! note: the ZFunctors file is supposed to be broken up into smaller files !!! --- 5: Compact opens and qcqs-schemes --- import Cubical.Categories.Instances.ZFunctors as ZFun +-- 5: Compact opens and qcqs-schemes +import Cubical.AlgebraicGeometry.Functorial.ZFunctors.CompactOpen as CO +import Cubical.AlgebraicGeometry.Functorial.ZFunctors.QcQsScheme as QcQsSchemes --- 6: Open subschemes --- import Cubical.Categories.Instances.ZFunctors as ZFun -module StandardOpen = ZFun.StandardOpens +-- 6: Open subschemes +import Cubical.AlgebraicGeometry.Functorial.ZFunctors.OpenSubscheme as OSubscheme +module StandardOpen = OSubscheme.StandardOpens ----------- 2: Background ---------- ----------- 2.2: Univalent type theory Cubical Agda ---------- +---------- 2: Background ---------- +---------- 2.2: Univalent type theory Cubical Agda ---------- --- path type in Cubical Agda -open Prelude using (_≡_) +-- path type in Cubical Agda +open Prelude using (_≡_) --- the first two h-levels -open Prelude using (isProp ; isSet) -open HLevels using (hProp) +-- the first two h-levels +open Prelude using (isProp ; isSet) +open HLevels using (hProp) --- univalence and the cubical SIP -open Univalence using (ua) -import Cubical.Foundations.SIP +-- univalence and the cubical SIP +open Univalence using (ua) +import Cubical.Foundations.SIP --- set-quotients -open SQ using (_/_) +-- set-quotients +open SQ using (_/_) --- propositional truncation -open PT renaming (∥_∥₁ to ∥_∥) +-- propositional truncation +open PT renaming (∥_∥₁ to ∥_∥) --- ∃ notation in Cubical Agda -open Sigma using (∃-syntax) +-- ∃ notation in Cubical Agda +open Sigma using (∃-syntax) ----------- 2.2: Localizations and the Zariski lattice ---------- +---------- 2.2: Localizations and the Zariski lattice ---------- --- localization away from element -open LocalizationInvElBase using (R[1/_] ; R[1/_]AsCommRing) -open LocalizationInvElUniversalProp using (_/1 ; invElemUniversalProp) +-- localization away from element +open LocalizationInvElBase using (R[1/_] ; R[1/_]AsCommRing) +open LocalizationInvElUniversalProp using (_/1 ; invElemUniversalProp) --- Zariski lattice -open ZariskiLatDef using (ZariskiLattice ; _∼≡_) +-- Zariski lattice +open ZariskiLatDef using (ZariskiLattice ; _∼≡_) --- supports -open ZLUP.IsSupport +-- supports +open ZLUP.IsSupport --- support map D and universal property -open ZariskiLatUnivProp using (D ; isSupportD) -open ZariskiLatUnivProp using (ZLHasUniversalProp ; ⋁D≡) +-- support map D and universal property +open ZariskiLatUnivProp using (D ; isSupportD) +open ZariskiLatUnivProp using (ZLHasUniversalProp ; ⋁D≡) --- facts about Zariski lattice and localization -open Localization&Radicals using (toUnit) -open ZLP using (unitLemmaZarLat) +-- facts about Zariski lattice and localization +open Localization&Radicals using (toUnit) +open ZLP using (unitLemmaZarLat) ------------ 3: ℤ-functors ---------- +----------- 3: ℤ-functors ---------- --- Definition 1 -open ZFun using (ℤFunctor ; Sp ; 𝔸¹ ; isAffine) +-- Definition 1 +open ZFun using (ℤFunctor ; Sp ; 𝔸¹ ; isAffine) --- Definition 3 -open ZFun using (𝓞) +-- Definition 3 +open ZFun using (𝓞) --- Proposition 4 -open RelativeAdjunction - using (𝓞⊣SpIso ; 𝓞⊣SpNatℤFunctor ; 𝓞⊣SpNatCommRing ; 𝓞⊣SpCounitEquiv) +-- Proposition 4 +open RelativeAdjunction + using (𝓞⊣SpIso ; 𝓞⊣SpNatℤFunctor ; 𝓞⊣SpNatCommRing ; 𝓞⊣SpCounitEquiv) ----------- 4: Local ℤ-functors ---------- +---------- 4: Local ℤ-functors ---------- --- Definition 6 -open Cover using (Cover) -open Coverage using (Coverage) +-- Definition 6 +open Cover using (Cover) +open Coverage using (Coverage) --- Definition 7 -open Sheaf using (isCompatibleFamily ; CompatibleFamily) +-- Definition 7 +open Sheaf using (isCompatibleFamily ; CompatibleFamily) --- the induced map σ -open Sheaf renaming (elementToCompatibleFamily to σ) +-- the induced map σ +open Sheaf renaming (elementToCompatibleFamily to σ) --- Definition 8 -open Sheaf using (isSheaf ; hasAmalgamationPropertyForCover) +-- Definition 8 +open Sheaf using (isSheaf ; hasAmalgamationPropertyForCover) --- Definition 9 -open Sheaf using (isSubcanonical) +-- Definition 9 +open Sheaf using (isSubcanonical) --- Definition 10 & Lemma 11 -open ZariskiCoverage using (UniModVec ; pullbackUniModVec ; zariskiCoverage) -open ZFun using (isLocal) +-- Definition 10 & Lemma 11 +open ZariskiCoverage using (UniModVec ; pullbackUniModVec ; zariskiCoverage) +open ZFun using (isLocal) ---Theorem 12 -open LocalizationLimit using (equalizerLemma) -open ZarCovSubcanonical using (applyEqualizerLemma) -open ZariskiCoverage using (isSubcanonicalZariskiCoverage) +--Theorem 12 +open LocalizationLimit using (equalizerLemma) +open ZarCovSubcanonical using (applyEqualizerLemma) +open ZariskiCoverage using (isSubcanonicalZariskiCoverage) ----------- 4: Compact opens and qcqs-schemes ---------- +---------- 4: Compact opens and qcqs-schemes ---------- --- Definition 13 -open ZFun renaming (ZarLatFun to 𝓛) +-- Definition 13 +open CO renaming (ZarLatFun to 𝓛) --- Definition 14 -open ZFun using (CompactOpen ; ⟦_⟧ᶜᵒ) +-- Definition 14 +open CO using (CompactOpen ; ⟦_⟧ᶜᵒ) --- Definition 15 -open ZFun using (CompOpenDistLattice) +-- Definition 15 +open CO using (CompOpenDistLattice) --- Definition 16 -open ZFun using (isQcQsScheme) +-- Definition 16 +open QcQsSchemes using (isQcQsScheme) --- Proposition 17 -open ZFun using (singlAffineCover ; isQcQsSchemeAffine) +-- Proposition 17 +open QcQsSchemes using (singlAffineCover ; isQcQsSchemeAffine) --- Remark 18 -open ZFun using (AffineCover ; hasAffineCover) +-- Remark 18 +open QcQsSchemes using (AffineCover ; hasAffineCover) ------------ 5: Open subschemes ---------- +----------- 5: Open subschemes ---------- --- Lemma 20 -open ZFun using (isSeparatedZarLatFun) +-- Lemma 20 +open CO using (isSeparatedZarLatFun) --- Lemma 21 -open ZFun using (presLocalCompactOpen) +-- Lemma 21 +open CO using (presLocalCompactOpen) --- Definition 22 -open StandardOpen using (D) +-- Definition 22 +open StandardOpen using (D) --- Proposition 23 -open StandardOpen using (SpR[1/f]≅⟦Df⟧ ; isAffineD) +-- Proposition 23 +open StandardOpen using (SpR[1/f]≅⟦Df⟧ ; isAffineD) --- Theorem 24 -open ZFun using (isQcQsSchemeCompOpenOfAffine) +-- Theorem 24 +open OSubscheme using (isQcQsSchemeCompOpenOfAffine) \ No newline at end of file diff --git a/Cubical.README.html b/Cubical.README.html index 87201341fc..beff6bd8b6 100644 --- a/Cubical.README.html +++ b/Cubical.README.html @@ -69,18 +69,21 @@ -- Algebra library (in development) import Cubical.Algebra.Everything --- Various talks -import Cubical.Talks.Everything +-- Algebraic geometry +import Cubical.AlgebraicGeometry.Everything --- Reflection -import Cubical.Reflection.Everything +-- Various talks +import Cubical.Talks.Everything --- Displayed univalent graphs -import Cubical.Displayed.Everything +-- Reflection +import Cubical.Reflection.Everything --- Various axioms and consequences -import Cubical.Axiom.Everything +-- Displayed univalent graphs +import Cubical.Displayed.Everything --- Automatic proving, solvers -import Cubical.Tactics.Everything +-- Various axioms and consequences +import Cubical.Axiom.Everything + +-- Automatic proving, solvers +import Cubical.Tactics.Everything \ No newline at end of file