Skip to content

Commit 64d12ad

Browse files
committed
update
1 parent 4b38e08 commit 64d12ad

File tree

2 files changed

+35
-23
lines changed

2 files changed

+35
-23
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,13 @@ Deprecated names
159159
New modules
160160
-----------
161161

162+
<<<<<<< HEAD
162163
* `Algebra.Module.Properties.{Bimodule|LeftModule|RightModule}`.
163164

164165
* `Algebra.Morphism.Construct.DirectProduct`.
166+
=======
167+
* `Algebra.Properties.Monoid` adding consequences for identity for monoids
168+
>>>>>>> bbf664506 (update)
165169
166170
* `Data.List.Base.{and|or|any|all}` have been lifted out into `Data.Bool.ListAction`.
167171

@@ -173,6 +177,7 @@ New modules
173177

174178
* `Data.List.Sort.InsertionSort.{agda|Base|Properties}` defines insertion sort and proves properties of insertion sort such as Sorted and Permutation properties.
175179

180+
<<<<<<< HEAD
176181
* `Data.List.Sort.MergenSort.{agda|Base|Properties}` is a refactor of the previous `Data.List.Sort.MergenSort`.
177182

178183
* `Data.Sign.Show` to show a sign.
@@ -205,6 +210,13 @@ Additions to existing modules
205210
∙-congʳ : RightCongruent _≈_ _∙_
206211
```
207212

213+
=======
214+
Additions to existing modules
215+
-----------------------------
216+
217+
* In `Algebra.Properties.Semigroup` adding consequences for associativity for semigroups
218+
219+
>>>>>>> bbf664506 (update)
208220
* In `Algebra.Construct.Pointwise`:
209221
```agda
210222
isNearSemiring : IsNearSemiring _≈_ _+_ _*_ 0# →

src/Algebra/Properties/Monoid/Reasoning.agda renamed to src/Algebra/Properties/Monoid.agda

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
{-# OPTIONS --cubical-compatible --safe #-}
99

1010
open import Algebra.Bundles using (Monoid)
11+
open import Function using (_∘_)
1112

12-
module Algebra.Properties.Monoid.Reasoning {o ℓ} (M : Monoid o ℓ) where
13+
module Algebra.Properties.Monoid {o ℓ} (M : Monoid o ℓ) where
1314

1415
open Monoid M
1516
using (Carrier; _∙_; _≈_; setoid; isMagma; semigroup; ε; sym; identityˡ
@@ -22,33 +23,32 @@ private
2223
variable
2324
a b c d : Carrier
2425

25-
module _ where
26-
id-unique : a ( b b ∙ a ≈ b) a ≈ ε
27-
id-unique a b∙a≈b = trans (sym (identityˡ a)) (b∙a≈b ε)
26+
id-unique : a ( b b ∙ a ≈ b) a ≈ ε
27+
id-unique a b∙a≈b = trans (sym (identityˡ a)) (b∙a≈b ε)
2828

29-
id-comm : a a ∙ ε ≈ ε ∙ a
30-
id-comm a = trans (identityʳ a) (sym (identityˡ a))
29+
id-comm : a a ∙ ε ≈ ε ∙ a
30+
id-comm a = trans (identityʳ a) (sym (identityˡ a))
3131

32-
id-comm-sym : a ε ∙ a ≈ a ∙ ε
33-
id-comm-sym a = sym (id-comm a)
32+
id-comm-sym : a ε ∙ a ≈ a ∙ ε
33+
id-comm-sym = sym id-comm
3434

35-
module _ {a b : Carrier} (a≈ε : a ≈ ε) where
36-
elimʳ : b b ∙ a ≈ b
37-
elimʳ b = trans (∙-congˡ a≈ε) (identityʳ b)
35+
module _ (a≈ε : a ≈ ε) where
36+
elimʳ : b b ∙ a ≈ b
37+
elimʳ = trans (∙-congˡ a≈ε) ∘ identityʳ
3838

39-
elimˡ : b a ∙ b ≈ b
40-
elimˡ b = trans (∙-congʳ a≈ε) (identityˡ b)
39+
elimˡ : b a ∙ b ≈ b
40+
elimˡ = trans (∙-congʳ a≈ε) ∘ identityˡ
4141

42-
introʳ : b b ≈ b ∙ a
43-
introʳ b = sym (elimʳ b)
42+
introʳ : b b ≈ b ∙ a
43+
introʳ = sym ∘ elimʳ
4444

45-
introˡ : b b ≈ a ∙ b
46-
introˡ b = sym (elimˡ b)
45+
introˡ : b b ≈ a ∙ b
46+
introˡ = sym ∘ elimˡ
4747

48-
introcenter : c b ∙ c ≈ b ∙ (a ∙ c)
49-
introcenter c = trans (∙-congˡ (sym (identityˡ c))) (∙-congˡ (∙-congʳ (sym a≈ε)))
48+
introcenter : c b ∙ c ≈ b ∙ (a ∙ c)
49+
introcenter c = trans (∙-congˡ (sym (identityˡ c))) (∙-congˡ (∙-congʳ (sym a≈ε)))
5050

51-
module _ {a c : Carrier} (inv : a ∙ c ≈ ε) where
51+
module _ (inv : a ∙ c ≈ ε) where
5252

5353
cancelʳ : b (b ∙ a) ∙ c ≈ b
5454
cancelʳ b = trans (assoc b a c) (trans (∙-congˡ inv) (identityʳ b))
@@ -57,14 +57,14 @@ module _ {a c : Carrier} (inv : a ∙ c ≈ ε) where
5757
cancelˡ b = trans (sym (assoc a c b)) (trans (∙-congʳ inv) (identityˡ b))
5858

5959
insertˡ : b b ≈ a ∙ (c ∙ b)
60-
insertˡ b = sym (cancelˡ b)
60+
insertˡ = sym ∘ cancelˡ
6161

6262
insertʳ : b b ≈ (b ∙ a) ∙ c
63-
insertʳ b = sym (cancelʳ b)
63+
insertʳ = sym ∘ cancelʳ
6464

6565
cancelInner : b d (b ∙ a) ∙ (c ∙ d) ≈ b ∙ d
6666
cancelInner b d = trans (uv≈w⇒xu∙vy≈x∙wy inv b d) (∙-congˡ (identityˡ d))
6767

6868
insertInner : b d b ∙ d ≈ (b ∙ a) ∙ (c ∙ d)
69-
insertInner b d = sym (cancelInner b d)
69+
insertInner = λ b d sym (cancelInner b d)
7070

0 commit comments

Comments
 (0)