File tree Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Expand file tree Collapse file tree 4 files changed +48
-0
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ Other minor additions
44
44
``` agda
45
45
RawNearSemiring c ℓ : Set (suc (c ⊔ ℓ))
46
46
RawLattice c ℓ : Set (suc (c ⊔ ℓ))
47
+ CancellativeCommutativeSemiring c ℓ : Set (suc (c ⊔ ℓ))
47
48
```
48
49
49
50
* Added new records to ` Algebra.Morphism.Structures ` :
@@ -59,4 +60,16 @@ Other minor additions
59
60
IsLatticeIsomorphism (⟦_⟧ : A → B) : Set (a ⊔ b ⊔ ℓ₁ ⊔ ℓ₂)
60
61
```
61
62
63
+ * Added new definitions to ` Algebra.Definitions ` :
64
+ ``` agda
65
+ AlmostLeftCancellative e _•_ = ∀ {x} y z → ¬ x ≈ e → (x • y) ≈ (x • z) → y ≈ z
66
+ AlmostRightCancellative e _•_ = ∀ {x} y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z
67
+ AlmostCancellative e _•_ = AlmostLeftCancellative e _•_ × AlmostRightCancellative e _•_
68
+ ```
69
+
70
+ * Added new record to ` Algebra.Structures ` :
71
+ ``` agda
72
+ IsCancellativeCommutativeSemiring (+ * : Op₂ A) (0# 1# : A) : Set (a ⊔ ℓ)
73
+ ```
74
+
62
75
* Add version to library name
Original file line number Diff line number Diff line change @@ -670,6 +670,22 @@ record CommutativeSemiring c ℓ : Set (suc (c ⊔ ℓ)) where
670
670
}
671
671
672
672
673
+ record CancellativeCommutativeSemiring c ℓ : Set (suc (c ⊔ ℓ)) where
674
+ infixl 7 _*_
675
+ infixl 6 _+_
676
+ infix 4 _≈_
677
+ field
678
+ Carrier : Set c
679
+ _≈_ : Rel Carrier ℓ
680
+ _+_ : Op₂ Carrier
681
+ _*_ : Op₂ Carrier
682
+ 0# : Carrier
683
+ 1# : Carrier
684
+ isCancellativeCommutativeSemiring : IsCancellativeCommutativeSemiring _≈_ _+_ _*_ 0# 1#
685
+
686
+ open IsCancellativeCommutativeSemiring isCancellativeCommutativeSemiring public
687
+
688
+
673
689
------------------------------------------------------------------------
674
690
-- Bundles with 2 binary operations, 1 unary operation & 2 elements
675
691
------------------------------------------------------------------------
Original file line number Diff line number Diff line change 10
10
{-# OPTIONS --without-K --safe #-}
11
11
12
12
open import Relation.Binary.Core
13
+ open import Relation.Nullary using (¬_)
13
14
14
15
module Algebra.Definitions
15
16
{a ℓ} {A : Set a} -- The underlying set
@@ -118,5 +119,14 @@ RightCancellative _•_ = ∀ {x} y z → (y • x) ≈ (z • x) → y ≈ z
118
119
Cancellative : Op₂ A → Set _
119
120
Cancellative _•_ = (LeftCancellative _•_) × (RightCancellative _•_)
120
121
122
+ AlmostLeftCancellative : A → Op₂ A → Set _
123
+ AlmostLeftCancellative e _•_ = ∀ {x} y z → ¬ x ≈ e → (x • y) ≈ (x • z) → y ≈ z
124
+
125
+ AlmostRightCancellative : A → Op₂ A → Set _
126
+ AlmostRightCancellative e _•_ = ∀ {x} y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z
127
+
128
+ AlmostCancellative : A → Op₂ A → Set _
129
+ AlmostCancellative e _•_ = AlmostLeftCancellative e _•_ × AlmostRightCancellative e _•_
130
+
121
131
Interchangable : Op₂ A → Op₂ A → Set _
122
132
Interchangable _∘_ _∙_ = ∀ w x y z → ((w ∙ x) ∘ (y ∙ z)) ≈ ((w ∘ y) ∙ (x ∘ z))
Original file line number Diff line number Diff line change @@ -425,6 +425,15 @@ record IsCommutativeSemiring (+ * : Op₂ A) (0# 1# : A) : Set (a ⊔ ℓ) where
425
425
}
426
426
427
427
428
+ record IsCancellativeCommutativeSemiring (+ * : Op₂ A) (0# 1# : A) : Set (a ⊔ ℓ) where
429
+ field
430
+ isCommutativeSemiring : IsCommutativeSemiring + * 0# 1#
431
+ *-cancelˡ-nonZero : AlmostLeftCancellative 0# *
432
+
433
+ open IsCommutativeSemiring isCommutativeSemiring public
434
+
435
+
436
+
428
437
------------------------------------------------------------------------
429
438
-- Structures with 2 binary operations, 1 unary operation & 2 elements
430
439
------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments