Skip to content

Commit 21a8e37

Browse files
committed
port ZFunctors to no-eta-equality
1 parent d547302 commit 21a8e37

File tree

1 file changed

+17
-13
lines changed
  • Cubical/AlgebraicGeometry/Functorial/ZFunctors

1 file changed

+17
-13
lines changed

Cubical/AlgebraicGeometry/Functorial/ZFunctors/Base.agda

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ open import Cubical.Categories.Instances.Sets
4343
open import Cubical.Categories.Instances.CommRings
4444
open import Cubical.Categories.Instances.Functors
4545
open import Cubical.Categories.NaturalTransformation
46+
open import Cubical.Categories.Presheaf
4647
open import Cubical.Categories.Yoneda
4748
open import Cubical.Categories.Site.Sheaf
4849
open import Cubical.Categories.Site.Instances.ZariskiCommRing
@@ -60,29 +61,32 @@ module _ {ℓ : Level} where
6061
open CommRingStr ⦃...⦄
6162
open IsCommRingHom
6263

64+
Aff : Category (ℓ-suc ℓ) ℓ
65+
Aff = CommRingsCategory {ℓ = ℓ} ^op
6366

6467
-- using the naming conventions of Demazure & Gabriel
65-
ℤFunctor = Functor (CommRingsCategory {ℓ = ℓ}) (SET ℓ)
66-
ℤFUNCTOR = FUNCTOR (CommRingsCategory {ℓ = ℓ}) (SET ℓ)
68+
ℤFunctor = Presheaf Aff ℓ
69+
ℤFUNCTOR = PresheafCategory Aff ℓ
6770

6871
-- Yoneda in the notation of Demazure & Gabriel,
6972
-- uses that double op is original category definitionally
70-
Sp : Functor (CommRingsCategory {ℓ = ℓ} ^op) ℤFUNCTOR
71-
Sp = YO*
73+
Sp : Functor Aff ℤFUNCTOR
74+
Sp = YO
7275

76+
-- TODO: should probably just be hasUniversalElement
7377
isAffine : (X : ℤFunctor) Type (ℓ-suc ℓ)
7478
isAffine X = ∃[ A ∈ CommRing ℓ ] NatIso (Sp .F-ob A) X
7579
-- TODO: 𝔸¹ ≅ Sp ℤ[x] and 𝔾ₘ ≅ Sp ℤ[x,x⁻¹] ≅ D(x) ↪ 𝔸¹ as first examples of affine schemes
7680

7781
-- a ℤ-functor that is a sheaf wrt the Zariski coverage is called local
7882
isLocal : ℤFunctor Type (ℓ-suc ℓ)
79-
isLocal X = isSheaf zariskiCoverage (X ∘F fromOpOp)
83+
isLocal X = isSheaf zariskiCoverage X
8084

8185
-- the forgetful functor
8286
-- aka the affine line
8387
-- (aka the representable of ℤ[x])
8488
𝔸¹ : ℤFunctor
85-
𝔸¹ = ForgetfulCommRing→Set
89+
𝔸¹ = ForgetfulCommRing→Set ∘F fromOpOp
8690

8791
-- the global sections functor
8892
𝓞 : Functor ℤFUNCTOR (CommRingsCategory {ℓ = ℓ-suc ℓ} ^op)
@@ -191,7 +195,7 @@ module AdjBij {ℓ : Level} where
191195

192196
-- the other direction is just precomposition modulo Yoneda
193197
_♯ : X ⇒ Sp .F-ob A CommRingHom A (𝓞 .F-ob X)
194-
fst (α ♯) a = α ●ᵛ {!yoneda 𝔸¹ A .inv a!} -- α ●ᵛ yonedaᴾ 𝔸¹ A .inv a
198+
fst (α ♯) a = α ●ᵛ yonedaᴾ 𝔸¹ A .inv a
195199

196200
pres0 (snd (α ♯)) = makeNatTransPath (funExt₂ λ B x α .N-ob B x .snd .pres0)
197201
pres1 (snd (α ♯)) = makeNatTransPath (funExt₂ λ B x α .N-ob B x .snd .pres1)
@@ -236,10 +240,10 @@ module AdjBij {ℓ : Level} where
236240
where
237241
theIso : Iso (A .fst) ((𝓞 ∘F Sp) .F-ob A .fst)
238242
fun theIso = ε A .fst
239-
inv theIso = {!!} -- yonedaᴾ 𝔸¹ A .fun
240-
rightInv theIso α = {!!} -- ℤFUNCTOR .⋆IdL _ ∙ yonedaᴾ 𝔸¹ A .leftInv α
241-
leftInv theIso a = {!!} -- path -- I get yellow otherwise
242-
-- where
243-
-- path : yonedaᴾ 𝔸¹ A .fun ((idTrans (Sp .F-ob A)) ●ᵛ yonedaᴾ 𝔸¹ A .inv a) ≡ a
244-
-- path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _) ∙ yonedaᴾ 𝔸¹ A .rightInv a
243+
inv theIso = yonedaᴾ 𝔸¹ A .fun
244+
rightInv theIso α = ℤFUNCTOR .⋆IdL _ ∙ yonedaᴾ 𝔸¹ A .leftInv α
245+
leftInv theIso a = path
246+
where
247+
path : yonedaᴾ 𝔸¹ A .fun ((idTrans (Sp .F-ob A)) ●ᵛ yonedaᴾ 𝔸¹ A .inv a) ≡ a
248+
path = cong (yonedaᴾ 𝔸¹ A .fun) (ℤFUNCTOR .⋆IdL _) ∙ yonedaᴾ 𝔸¹ A .rightInv a
245249
snd (𝓞⊣SpCounitEquiv A) = ε A .snd

0 commit comments

Comments
 (0)