-
Notifications
You must be signed in to change notification settings - Fork 1
/
beginnings.agda
46 lines (37 loc) · 1.38 KB
/
beginnings.agda
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
open import Algebra
open import Agda.Primitive
open import Data.Product
open import Data.Sum
open import Relation.Nullary
open import Algebra.Morphism
CRing : Set (lsuc lzero)
CRing = CommutativeRing lzero lzero
record Alg (Base : CRing) : Set (lsuc lzero) where
field
Carrier : CRing
ι : CommutativeRing.Carrier Base → CommutativeRing.Carrier Carrier
isHomo : IsRingMorphism (CommutativeRing.ring Base) (CommutativeRing.ring Carrier) ι
∥_∥ : {A : CRing} → Alg A → Set
∥ R ∥ = CommutativeRing.Carrier (Alg.Carrier R)
alg : (A : CRing) → Alg A
alg A = record
{ Carrier = A
; ι = λ x → x
; isHomo = {!!}
}
IsInvertible : {A : CRing} → (x : ∥ alg A ∥) → Set
IsInvertible {A} x = ∃ (λ y → x * y ≈ 1#)
where
open CommutativeRing A
IsLocalRing : (A : CRing) → Set
IsLocalRing A = ¬(1# ≈ 0#) × ((x y : ∥ alg A ∥) → IsInvertible {A} (x + y) → (IsInvertible {A} x) ⊎ (IsInvertible {A} y))
where
open CommutativeRing A
record Spec {A : CRing} (R : Alg A) : Set where
field
point : ∥ R ∥ → ∥ alg A ∥
isHomo : IsRingMorphism (CommutativeRing.ring (Alg.Carrier R)) (CommutativeRing.ring A) point
canonicalMorphism : {A : CRing} → (R : Alg A) → ∥ R ∥ → (Spec R → ∥ alg A ∥)
canonicalMorphism R x p = Spec.point p x
IsQuasicoherentRing : (A : CRing) → Set
IsQuasicoherentRing A = {!!}