| 1 |
------------------------------------------------------------------------ |
| 2 |
-- The Agda standard library |
| 3 |
-- |
| 4 |
-- Bundles for local algebraic structures |
| 5 |
------------------------------------------------------------------------ |
| 6 |
|
| 7 |
{-# OPTIONS --cubical-compatible --safe #-} |
| 8 |
|
| 9 |
module Algebra.Apartness.Bundles where |
| 10 |
|
| 11 |
open import Level using (_⊔_; suc) |
| 12 |
open import Relation.Binary.Core using (Rel) |
| 13 |
open import Relation.Binary.Bundles using (ApartnessRelation) |
| 14 |
open import Algebra.Core using (Op₁; Op₂) |
| 15 |
open import Algebra.Bundles using (CommutativeRing) |
| 16 |
open import Algebra.Apartness.Structures using (IsHeytingCommutativeRing; IsHeytingField) |
| 17 |
|
| 18 |
record HeytingCommutativeRing c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where |
| 19 |
infix 8 -_ |
| 20 |
infixl 7 _*_ |
| 21 |
infixl 6 _+_ |
| 22 |
infix 4 _≈_ _#_ |
| 23 |
field |
| 24 |
Carrier : Set c |
| 25 |
_≈_ : Rel Carrier ℓ₁ |
| 26 |
_#_ : Rel Carrier ℓ₂ |
| 27 |
_+_ : Op₂ Carrier |
| 28 |
_*_ : Op₂ Carrier |
| 29 |
-_ : Op₁ Carrier |
| 30 |
0# : Carrier |
| 31 |
1# : Carrier |
| 32 |
isHeytingCommutativeRing : IsHeytingCommutativeRing _≈_ _#_ _+_ _*_ -_ 0# 1# |
| 33 |
|
| 34 |
open IsHeytingCommutativeRing isHeytingCommutativeRing public |
| 35 |
|
| 36 |
commutativeRing : CommutativeRing c ℓ₁ |
| 37 |
commutativeRing = record { isCommutativeRing = isCommutativeRing } |
| 38 |
|
| 39 |
apartnessRelation : ApartnessRelation c ℓ₁ ℓ₂ |
| 40 |
apartnessRelation = record { isApartnessRelation = isApartnessRelation } |
| 41 |
|
| 42 |
|
| 43 |
record HeytingField c ℓ₁ ℓ₂ : Set (suc (c ⊔ ℓ₁ ⊔ ℓ₂)) where |
| 44 |
infix 8 -_ |
| 45 |
infixl 7 _*_ |
| 46 |
infixl 6 _+_ |
| 47 |
infix 4 _≈_ _#_ |
| 48 |
field |
| 49 |
Carrier : Set c |
| 50 |
_≈_ : Rel Carrier ℓ₁ |
| 51 |
_#_ : Rel Carrier ℓ₂ |
| 52 |
_+_ : Op₂ Carrier |
| 53 |
_*_ : Op₂ Carrier |
| 54 |
-_ : Op₁ Carrier |
| 55 |
0# : Carrier |
| 56 |
1# : Carrier |
| 57 |
isHeytingField : IsHeytingField _≈_ _#_ _+_ _*_ -_ 0# 1# |
| 58 |
|
| 59 |
open IsHeytingField isHeytingField public |
| 60 |
|
| 61 |
heytingCommutativeRing : HeytingCommutativeRing c ℓ₁ ℓ₂ |
| 62 |
heytingCommutativeRing = record { isHeytingCommutativeRing = isHeytingCommutativeRing } |
| 63 |
|
| 64 |
apartnessRelation : ApartnessRelation c ℓ₁ ℓ₂ |
| 65 |
apartnessRelation = record { isApartnessRelation = isApartnessRelation } |