Skip to content

Commit bbf6645

Browse files
committed
update
1 parent 1c788a0 commit bbf6645

File tree

2 files changed

+22
-18
lines changed

2 files changed

+22
-18
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ Deprecated names
113113
New modules
114114
-----------
115115

116+
* `Algebra.Properties.Monoid` adding consequences for identity for monoids
117+
116118
* `Data.List.Base.{and|or|any|all}` have been lifted out into `Data.Bool.ListAction`.
117119

118120
* `Data.List.Base.{sum|product}` and their properties have been lifted out into `Data.Nat.ListAction` and `Data.Nat.ListAction.Properties`.
@@ -123,9 +125,11 @@ New modules
123125

124126
* `Data.Sign.Show` to show a sign
125127

126-
* `Algebra.Properties.Semigroup` adding consequences for associatvity for semigroups
128+
Additions to existing modules
127129
-----------------------------
128130

131+
* In `Algebra.Properties.Semigroup` adding consequences for associativity for semigroups
132+
129133
* In `Algebra.Construct.Pointwise`:
130134
```agda
131135
isNearSemiring : IsNearSemiring _≈_ _+_ _*_ 0# →

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

Lines changed: 17 additions & 17 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
35+
module _ (a≈ε : a ≈ ε) where
3636
elimʳ : b b ∙ a ≈ b
37-
elimʳ b = trans (∙-congˡ a≈ε) (identityʳ b)
37+
elimʳ = trans (∙-congˡ a≈ε) ∘ identityʳ
3838

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

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

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

4848
introcenter : c b ∙ c ≈ b ∙ (a ∙ c)
4949
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)