-
Notifications
You must be signed in to change notification settings - Fork 0
/
Instances.agda
40 lines (36 loc) · 1.18 KB
/
Instances.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
module Instances where
open import Semiring
open import Data.Unit
open import Relation.Nullary.Decidable
open import Relation.Binary.PropositionalEquality
singleton : Semiring
singleton = record
{ grade = ⊤
; 1R = tt
; 0R = tt
; _+R_ = λ x x₁ → tt
; _*R_ = λ x x₁ → tt
; _≤_ = λ x x₁ → ⊤
; _≤d_ = λ r s → yes tt
; leftUnit+ = refl
; rightUnit+ = refl
; comm+ = refl
; leftUnit* = refl
; rightUnit* = refl
; leftAbsorb = refl
; rightAbsorb = refl
; assoc* = refl
; assoc+ = refl
; distrib1 = refl
; distrib2 = refl
; monotone* = λ x x₁ → tt
; monotone+ = λ x x₁ → tt
; reflexive≤ = tt
; transitive≤ = λ x x₁ → tt
}
singletonNI : NonInterferingSemiring {{singleton}}
singletonNI = record
{ oneIsBottom = tt
; zeroIsTop = tt
; antisymmetry = λ x x₁ → refl
; idem* = refl }