Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Towards schemes of finite presentation without size issues #1080

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7d4cdfa
use improved ringsolver
mzeuner Aug 23, 2021
e4d5d8d
delete one more line
mzeuner Aug 23, 2021
302c25a
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Aug 26, 2021
5fe247f
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Nov 2, 2021
3f2e7f8
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Nov 22, 2021
c29f845
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Dec 9, 2021
d83b855
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Dec 15, 2021
63c770b
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Dec 16, 2021
2ed6538
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Dec 17, 2021
c35bc4d
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Jan 4, 2022
808e042
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Jan 7, 2022
18d797c
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Jan 10, 2022
591c1b7
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Jan 25, 2022
0e1bd40
Merge branch 'master' of https://github.com/agda/cubical
mzeuner Jan 27, 2022
0b8f3c0
Merge branch 'master' of github.com:agda/cubical
mzeuner Mar 14, 2022
4a91d86
Merge branch 'master' of github.com:agda/cubical
mzeuner Apr 6, 2022
30cfe2f
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Apr 6, 2022
4e7f178
Merge branch 'master' of github.com:agda/cubical
mzeuner May 12, 2022
3e07b19
Merge branch 'master' of github.com:agda/cubical
mzeuner Aug 9, 2022
d5135d5
Merge branch 'master' of github.com:agda/cubical
mzeuner Aug 11, 2022
1014c10
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Aug 11, 2022
559f835
Merge branch 'master' of github.com:agda/cubical
mzeuner Sep 6, 2022
9b4166d
Merge branch 'master' of github.com:agda/cubical
mzeuner Nov 23, 2022
52d87b5
Merge branch 'master' of github.com:agda/cubical
mzeuner Dec 15, 2022
25b3b35
Merge branch 'master' of github.com:agda/cubical
mzeuner Feb 6, 2023
f0ab030
Merge branch 'master' of github.com:agda/cubical
mzeuner Feb 23, 2023
bcb3fa9
Merge branch 'master' of github.com:agda/cubical
mzeuner Feb 23, 2023
1624210
Merge branch 'master' of github.com:agda/cubical
mzeuner Feb 28, 2023
e11bb18
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Mar 6, 2023
5263ae5
Merge branch 'master' of github.com:agda/cubical
mzeuner May 2, 2023
8632bf4
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Jun 26, 2023
e23b691
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Jun 29, 2023
ce9d598
Merge branch 'master' of github.com:agda/cubical
mzeuner Jul 27, 2023
8629581
Merge branch 'master' of github.com:agda/cubical
mzeuner Oct 10, 2023
09fc8f4
Merge branch 'master' of github.com:mzeuner/cubical
mzeuner Oct 10, 2023
a595f75
Merge branch 'master' of github.com:agda/cubical
mzeuner Nov 8, 2023
c5b27fe
copy old file
mzeuner Nov 8, 2023
8ae6bf7
everything small now
mzeuner Nov 16, 2023
3a9ecc9
functor over base ring
mzeuner Nov 17, 2023
5175261
fix levels
mzeuner Nov 20, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cubical/Categories/Instances/CommRings.agda
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{-# OPTIONS --safe #-}
{-# OPTIONS --safe --lossy-unification #-}
module Cubical.Categories.Instances.CommRings where

open import Cubical.Foundations.Prelude
Expand Down
334 changes: 334 additions & 0 deletions Cubical/Categories/Instances/FPAlgebrasSmall.agda
Original file line number Diff line number Diff line change
@@ -0,0 +1,334 @@
{-# OPTIONS --safe --lossy-unification #-}
module Cubical.Categories.Instances.FPAlgebrasSmall 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.Foundations.Structure

open import Cubical.Functions.FunExtEquiv

open import Cubical.Data.Unit
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.Algebra
open import Cubical.Algebra.CommAlgebra
open import Cubical.Algebra.CommAlgebra.FPAlgebra
open import Cubical.Algebra.CommAlgebra.FPAlgebra.Instances
open import Cubical.Algebra.CommAlgebra.Instances.Unit
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.Categories.Category
open import Cubical.Categories.Functor
open import Cubical.Categories.Instances.Sets
open import Cubical.Categories.Instances.CommRings
open import Cubical.Categories.Instances.CommAlgebras
open import Cubical.Categories.Instances.DistLattices
open import Cubical.Categories.Instances.Functors
open import Cubical.Categories.NaturalTransformation
open import Cubical.Categories.Presheaf.Base
open import Cubical.Categories.Yoneda

open import Cubical.Relation.Binary.Order.Poset

open import Cubical.HITs.PropositionalTruncation as PT
open import Cubical.HITs.SetQuotients as SQ


private
variable
ℓ ℓ' ℓ'' : Level


module _ (R : CommRing ℓ) where

open Iso
open Category hiding (_∘_) renaming (_⋆_ to _⋆c_)
open Functor
open NatTrans
open DistLatticeStr ⦃...⦄
open CommRingStr ⦃...⦄
open IsRingHom
open CommAlgebraHoms
open IsLatticeHom
open ZarLat
open ZarLatUniversalProp


-- type living in the same universe as the base ring R
record SmallFPAlgebra : Type ℓ where
field
n : ℕ
m : ℕ
relations : FinVec ⟨ Polynomials {R = R} n ⟩ m

open SmallFPAlgebra
private
indFPAlg : SmallFPAlgebra → CommAlgebra R ℓ
indFPAlg A = FPAlgebra (A .n) (A .relations)

FPAlgebrasSmallCategory : Category ℓ ℓ
ob FPAlgebrasSmallCategory = SmallFPAlgebra
Hom[_,_] FPAlgebrasSmallCategory A B =
CommAlgebraHom (indFPAlg A) (indFPAlg B)
id FPAlgebrasSmallCategory = idCommAlgebraHom _
_⋆c_ FPAlgebrasSmallCategory = compCommAlgebraHom _ _ _
⋆IdL FPAlgebrasSmallCategory = compIdCommAlgebraHom
⋆IdR FPAlgebrasSmallCategory = idCompCommAlgebraHom
⋆Assoc FPAlgebrasSmallCategory = compAssocCommAlgebraHom
isSetHom FPAlgebrasSmallCategory = isSetAlgebraHom _ _


-- the name of this module will be justified once we have defined
-- Zariski sheaves on small f.p. algebras
module SchemesOfFinitePresentation where

-- "parsimonious" presheaf categories
fpAlgFunctor = Functor FPAlgebrasSmallCategory (SET ℓ)
fpAlgFUNCTOR = FUNCTOR FPAlgebrasSmallCategory (SET ℓ)

-- yoneda in the notation of Demazure-Gabriel
-- uses η-equality of Categories
Sp : Functor (FPAlgebrasSmallCategory ^op) fpAlgFUNCTOR
Sp = YO {C = (FPAlgebrasSmallCategory ^op)}

-- the Zariski lattice (classifying compact open subobjects)
private forget = ForgetfulCommAlgebra→CommRing R

𝓛 : fpAlgFunctor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be defined by just composing the functor forget with the Z-functor version of 𝓛.

F-ob 𝓛 A = ZL (forget .F-ob (indFPAlg A)) , SQ.squash/
F-hom 𝓛 φ = inducedZarLatHom (forget .F-hom φ) .fst
F-id 𝓛 = cong (λ x → inducedZarLatHom x .fst) (forget .F-id)
∙ cong fst (inducedZarLatHomId _)
F-seq 𝓛 _ _ = cong (λ x → inducedZarLatHom x .fst) (forget .F-seq _ _)
∙ cong fst (inducedZarLatHomSeq _ _)

CompactOpen : fpAlgFunctor → Type ℓ
CompactOpen X = X ⇒ 𝓛

isAffine : fpAlgFunctor → Type ℓ
isAffine X = ∃[ A ∈ SmallFPAlgebra ] (Sp .F-ob A) ≅ᶜ X

-- the induced subfunctor
⟦_⟧ᶜᵒ : {X : fpAlgFunctor} (U : CompactOpen X) → fpAlgFunctor
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this should be defined by just taking the pullback of U and the "top element inclusion" of the lattice?

F-ob (⟦_⟧ᶜᵒ {X = X} U) A = (Σ[ x ∈ X .F-ob A .fst ] U .N-ob A x ≡ D _ 1r)
, isSetΣSndProp (X .F-ob A .snd) λ _ → squash/ _ _
where instance _ = snd (forget .F-ob (indFPAlg A))
F-hom (⟦_⟧ᶜᵒ {X = X} U) {x = A} {y = B} φ (x , Ux≡D1) = (X .F-hom φ x) , path
where
instance
_ = (forget .F-ob (indFPAlg A)) .snd
_ = (forget .F-ob (indFPAlg B)) .snd
open IsLatticeHom
path : U .N-ob B (X .F-hom φ x) ≡ D _ 1r
path = U .N-ob B (X .F-hom φ x) ≡⟨ funExt⁻ (U .N-hom φ) x ⟩
𝓛 .F-hom φ (U .N-ob A x) ≡⟨ cong (𝓛 .F-hom φ) Ux≡D1 ⟩
𝓛 .F-hom φ (D _ 1r) ≡⟨ inducedZarLatHom (forget .F-hom φ) .snd .pres1 ⟩
D _ 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 : fpAlgFunctor} (U : CompactOpen X) → Type ℓ
isAffineCompactOpen U = isAffine ⟦ U ⟧ᶜᵒ

-- the dist. lattice of compact opens
CompOpenDistLattice : Functor fpAlgFUNCTOR (DistLatticesCategory {ℓ} ^op)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Homework" question for us: Can this be unified with the very similar construction of the "global sections functor" that maps X to X ⇒ 𝔸¹?

fst (F-ob CompOpenDistLattice X) = CompactOpen X

-- lattice structure induce by internal lattice object 𝓛
N-ob (DistLatticeStr.0l (snd (F-ob CompOpenDistLattice X))) A _ = 0l
where instance _ = ZariskiLattice (forget .F-ob (indFPAlg 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 (forget .F-ob (indFPAlg A)) .snd
N-hom (DistLatticeStr.1l (snd (F-ob CompOpenDistLattice X))) {x = A} {y = B} φ = funExt λ _ → path
where
instance
_ = (forget .F-ob (indFPAlg A)) .snd
_ = (forget .F-ob (indFPAlg B)) .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg B)) .snd
path : D _ 1r ≡ D _ (φ .fst 1r) ∨l 0l
path = cong (D (forget .F-ob (indFPAlg B))) (sym (forget .F-hom φ .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 (forget .F-ob (indFPAlg A)) .snd
N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∨l U) V) {x = A} {y = B} φ =
funExt path
where
instance
_ = ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg B)) .snd
path : ∀ x → U .N-ob B (X .F-hom φ x) ∨l V .N-ob B (X .F-hom φ x)
≡ 𝓛 .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) ⟩
𝓛 .F-hom φ (U .N-ob A x) ∨l 𝓛 .F-hom φ (V .N-ob A x)
≡⟨ sym (inducedZarLatHom (forget .F-hom φ) .snd .pres∨l _ _) ⟩
𝓛 .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 (forget .F-ob (indFPAlg A)) .snd
N-hom ((snd (F-ob CompOpenDistLattice X) DistLatticeStr.∧l U) V) {x = A} {y = B} φ =
funExt path
where
instance
_ = ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg B)) .snd
path : ∀ x → U .N-ob B (X .F-hom φ x) ∧l V .N-ob B (X .F-hom φ x)
≡ 𝓛 .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) ⟩
𝓛 .F-hom φ (U .N-ob A x) ∧l 𝓛 .F-hom φ (V .N-ob A x)
≡⟨ sym (inducedZarLatHom (forget .F-hom φ) .snd .pres∧l _ _) ⟩
𝓛 .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 (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∨lAssoc _ _ _)))
(λ _ → makeNatTransPath (funExt₂
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∨lRid _)))
(λ _ _ → makeNatTransPath (funExt₂
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∨lComm _ _)))
(λ _ _ _ → makeNatTransPath (funExt₂
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∧lAssoc _ _ _)))
(λ _ → makeNatTransPath (funExt₂
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∧lRid _)))
(λ _ _ → makeNatTransPath (funExt₂
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.∧lComm _ _)))
(λ _ _ → makeNatTransPath (funExt₂ -- don't know why ∧lAbsorb∨l doesn't work
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
.DistLatticeStr.absorb _ _ .snd)))
(λ _ _ _ → makeNatTransPath (funExt₂ -- same here
(λ A _ → ZariskiLattice (forget .F-ob (indFPAlg 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))

-- the above is actually a functor into dist. lattices over 𝓛 R
open import Cubical.Categories.Constructions.Slice
(DistLatticesCategory {ℓ} ^op) (ZariskiLattice R)
renaming (SliceCat to DistLatticeᵒᵖ/𝓛R)
open SliceOb
open SliceHom
open IsZarMap
private
d : (X : fpAlgFunctor) → fst R → CompactOpen X
N-ob (d X r) A _ = D _ (r ⋆ 1a)
where open CommAlgebraStr (indFPAlg A .snd)
N-hom (d X r) {A} {B} φ = funExt (λ _ → sym path)
where
open IsAlgebraHom
open CommAlgebraStr ⦃...⦄ using (_⋆_ ; 1a)
instance
_ = indFPAlg A .snd
_ = indFPAlg B .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg B)) .snd
path : D _ (φ .fst (r ⋆ 1a)) ∨l 0l ≡ D _ (r ⋆ 1a)
path = D _ (φ .fst (r ⋆ 1a)) ∨l 0l ≡⟨ ∨lRid _ ⟩
D _ (φ .fst (r ⋆ 1a)) ≡⟨ cong (D _) (φ .snd .pres⋆ _ _) ⟩
D _ (r ⋆ φ .fst 1a) ≡⟨ cong (λ x → D _ (r ⋆ x)) (φ .snd .pres1) ⟩
D _ (r ⋆ 1a) ∎

dIsZarMap : ∀ (X : fpAlgFunctor) → IsZarMap R (F-ob CompOpenDistLattice X) (d X)
pres0 (dIsZarMap X) = makeNatTransPath (funExt₂ (λ A _ →
let open AlgebraTheory (CommRing→Ring R) (CommAlgebra→Algebra (indFPAlg A))
in cong (D _) (⋆AnnihilL _) ∙ isZarMapD _ .pres0))
pres1 (dIsZarMap X) = makeNatTransPath (funExt₂ (λ A _ →
cong (D _) (CommAlgebraStr.⋆IdL (indFPAlg A .snd) _) ∙ isZarMapD _ .pres1))
·≡∧ (dIsZarMap X) r s = makeNatTransPath (funExt₂ (λ A _ →
let open AlgebraTheory (CommRing→Ring R) (CommAlgebra→Algebra (indFPAlg A))
open CommAlgebraStr ⦃...⦄ using (_⋆_ ; 1a) renaming (_·_ to _·a_ ; ·IdL to ·aIdL)
instance _ = indFPAlg A .snd
_ = R .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
in D _((r · s) ⋆ 1a) ≡⟨ cong (λ x → D _ ((r · s) ⋆ x)) (sym (·aIdL 1a)) ⟩
D _((r · s) ⋆ (1a ·a 1a)) ≡⟨ cong (D _) (⋆Dist· _ _ _ _) ⟩
D _((r ⋆ 1a) ·a (s ⋆ 1a)) ≡⟨ isZarMapD _ .·≡∧ _ _ ⟩
D _(r ⋆ 1a) ∧l D _ (s ⋆ 1a) ∎))
+≤∨ (dIsZarMap X) r s = makeNatTransPath (funExt₂ (λ A _ →
let open CommAlgebraStr ⦃...⦄ using (_⋆_ ; 1a ; ⋆DistL+)
open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice
(ZariskiLattice (forget .F-ob (indFPAlg A)))))
instance _ = indFPAlg A .snd
_ = ZariskiLattice (forget .F-ob (indFPAlg A)) .snd
in subst (_≤ D _(r ⋆ 1a) ∨l D _ (s ⋆ 1a)) (cong (D _) (sym (⋆DistL+ _ _ _)))
(isZarMapD _ .+≤∨ _ _)))


uniqueHom𝓛R→CompOpen : (X : fpAlgFunctor)
→ ∃![ χ ∈ DistLatticeHom (ZariskiLattice R)
(F-ob CompOpenDistLattice X) ]
χ .fst ∘ D R ≡ d X
uniqueHom𝓛R→CompOpen X = ZLHasUniversalProp R (F-ob CompOpenDistLattice X)
(d X) (dIsZarMap X)

CompOpenDistLatticeOver : Functor fpAlgFUNCTOR DistLatticeᵒᵖ/𝓛R
S-ob (F-ob CompOpenDistLatticeOver X) = CompOpenDistLattice .F-ob X

-- the induced morphism 𝓛 R → CompactOpen X
S-arr (F-ob CompOpenDistLatticeOver X) = uniqueHom𝓛R→CompOpen X .fst .fst
S-hom (F-hom CompOpenDistLatticeOver α) = CompOpenDistLattice .F-hom α
S-comm (F-hom CompOpenDistLatticeOver {X} {Y} α) =
sym (cong fst (uniqueHom𝓛R→CompOpen X .snd (χ' , χ'Path)))
where
χ' = CompOpenDistLattice .F-hom α ∘dl uniqueHom𝓛R→CompOpen Y .fst .fst
χ'Path : χ' .fst ∘ D R ≡ d X
χ'Path = cong (CompOpenDistLattice .F-hom α .fst ∘_)
(uniqueHom𝓛R→CompOpen Y .fst .snd)
∙ funExt (λ r → makeNatTransPath (funExt₂ (λ _ _ → refl)))
F-id CompOpenDistLatticeOver = SliceHom-≡-intro' (CompOpenDistLattice .F-id)
F-seq CompOpenDistLatticeOver _ _ = SliceHom-≡-intro' (CompOpenDistLattice .F-seq _ _)


module _ (X : fpAlgFunctor) where
open Join (CompOpenDistLattice .F-ob X)
private instance _ = (CompOpenDistLattice .F-ob X) .snd

record AffineCover : Type ℓ where
field
n : ℕ
U : FinVec (CompactOpen X) n
covers : ⋁ U ≡ 1l -- TODO: equivalent to X ≡ ⟦ ⋁ U ⟧ᶜᵒ
isAffineU : ∀ i → isAffineCompactOpen (U i)

hasAffineCover : Type ℓ
hasAffineCover = ∥ AffineCover ∥₁
-- TODO: A fp-alg-functor is a scheme of finite presentation (over R)
-- if it is a Zariski sheaf and has an affine cover
2 changes: 1 addition & 1 deletion Cubical/Categories/Instances/ZFunctors.agda
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ module _ {ℓ : Level} where
open Join (CompOpenDistLattice .F-ob X)
open JoinSemilattice (Lattice→JoinSemilattice (DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
open PosetStr (IndPoset .snd) hiding (_≤_)
open LatticeTheory ⦃...⦄ -- ((DistLattice→Lattice (CompOpenDistLattice .F-ob X)))
open LatticeTheory ⦃...⦄
private instance _ = (CompOpenDistLattice .F-ob X) .snd

record AffineCover : Type (ℓ-suc ℓ) where
Expand Down
4 changes: 2 additions & 2 deletions Cubical/Categories/NaturalTransformation/Base.agda
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} where
-- naturality condition
N-hom : N-hom-Type F G N-ob

record NatIso (F G : Functor C D): Type (ℓ-max (ℓ-max ℓC ℓC') (ℓ-max ℓD ℓD')) where
record NatIso (F G : Functor C D): Type (ℓ-max (ℓ-max ℓC ℓC') ℓD') where
field
trans : NatTrans F G
open NatTrans trans
Expand Down Expand Up @@ -77,7 +77,7 @@ module _ {C : Category ℓC ℓC'} {D : Category ℓD ℓD'} where

infix 9 _≅ᶜ_
-- c superscript to indicate that this is in the context of categories
_≅ᶜ_ : Functor C D → Functor C D → Type (ℓ-max (ℓ-max ℓC ℓC') (ℓ-max ℓD ℓD'))
_≅ᶜ_ : Functor C D → Functor C D → Type (ℓ-max (ℓ-max ℓC ℓC') ℓD')
_≅ᶜ_ = NatIso

-- component of a natural transformation
Expand Down
4 changes: 2 additions & 2 deletions Cubical/Categories/Presheaf/Representable.agda
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ open isIsoC
-- | Lifts don't appear in practice because we usually use universal
-- | elements instead
module _ {ℓo}{ℓh}{ℓp} (C : Category ℓo ℓh) (P : Presheaf C ℓp) where
Representation : Type (ℓ-max (ℓ-max ℓo (ℓ-suc ℓh)) (ℓ-suc ℓp))
Representation : Type (ℓ-max (ℓ-max ℓo ℓh) ℓp)
Representation =
Σ[ A ∈ C .ob ] PshIso C (C [-, A ]) P

Representable : Type (ℓ-max (ℓ-max ℓo (ℓ-suc ℓh)) (ℓ-suc ℓp))
Representable : Type (ℓ-max (ℓ-max ℓo ℓh) ℓp)
Representable = ∥ Representation ∥₁

Elements = ∫ᴾ_ {C = C} P
Expand Down