Skip to content

Commit fbf8920

Browse files
committed
rebase
1 parent 8eb8a69 commit fbf8920

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed

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

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,17 @@
77

88
{-# OPTIONS --cubical-compatible --safe #-}
99

10-
open import Algebra using (Monoid)
10+
open import Algebra.Bundles using (Monoid)
11+
open import Algebra.Structures using (IsMagma)
1112

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

1415
open Monoid M
16+
using (Carrier; _∙_; _≈_; setoid; isMagma; semigroup; ε; sym; identityˡ; identityʳ
17+
; ∙-cong; refl; assoc)
1518
open import Relation.Binary.Reasoning.Setoid setoid
16-
open import Algebra.Reasoning.Semigroup semigroup public
19+
open import Algebra.Properties.Semigroup.Reasoning semigroup public
20+
open IsMagma isMagma using (∙-congˡ; ∙-congʳ)
1721

1822
module Identity {a : Carrier } where
1923
id-unique : ( b b ∙ a ≈ b) a ≈ ε
@@ -36,13 +40,13 @@ open Identity public
3640
module IntroElim {a b : Carrier} (a≈ε : a ≈ ε) where
3741
elimʳ : b ∙ a ≈ b
3842
elimʳ = begin
39-
b ∙ a ≈⟨ ∙-cong refl a≈ε ⟩
43+
b ∙ a ≈⟨ ∙-congˡ a≈ε ⟩
4044
b ∙ ε ≈⟨ identityʳ b ⟩
4145
b ∎
4246

4347
elimˡ : a ∙ b ≈ b
4448
elimˡ = begin
45-
a ∙ b ≈⟨ ∙-cong a≈ε refl
49+
a ∙ b ≈⟨ ∙-congʳ a≈ε ⟩
4650
ε ∙ b ≈⟨ identityˡ b ⟩
4751
b ∎
4852

@@ -54,8 +58,8 @@ module IntroElim {a b : Carrier} (a≈ε : a ≈ ε) where
5458

5559
introcenter : c b ∙ c ≈ b ∙ (a ∙ c)
5660
introcenter c = begin
57-
b ∙ c ≈⟨ sym (∙-cong refl (identityˡ c)) ⟩
58-
b ∙ (ε ∙ c) ≈⟨ sym (∙-cong refl (∙-cong a≈ε refl)) ⟩
61+
b ∙ c ≈⟨ ∙-congˡ (identityˡ c)
62+
b ∙ (ε ∙ c) ≈⟨ ∙-congˡ (∙-congʳ a≈ε) ⟨
5963
b ∙ (a ∙ c) ∎
6064

6165
open IntroElim public
@@ -65,15 +69,15 @@ module Cancellers {a b c : Carrier} (inv : a ∙ c ≈ ε) where
6569
cancelʳ : (b ∙ a) ∙ c ≈ b
6670
cancelʳ = begin
6771
(b ∙ a) ∙ c ≈⟨ assoc b a c ⟩
68-
b ∙ (a ∙ c) ≈⟨ ∙-cong refl inv ⟩
72+
b ∙ (a ∙ c) ≈⟨ ∙-congˡ inv ⟩
6973
b ∙ ε ≈⟨ identityʳ b ⟩
7074
b ∎
7175

7276

7377
cancelˡ : a ∙ (c ∙ b) ≈ b
7478
cancelˡ = begin
75-
a ∙ (c ∙ b) ≈⟨ sym (assoc a c b) ⟩
76-
(a ∙ c) ∙ b ≈⟨ ∙-cong inv refl
79+
a ∙ (c ∙ b) ≈⟨ assoc a c b
80+
(a ∙ c) ∙ b ≈⟨ ∙-congʳ inv ⟩
7781
ε ∙ b ≈⟨ identityˡ b ⟩
7882
b ∎
7983

@@ -85,8 +89,8 @@ module Cancellers {a b c : Carrier} (inv : a ∙ c ≈ ε) where
8589

8690
cancelInner : {g} (b ∙ a) ∙ (c ∙ g) ≈ b ∙ g
8791
cancelInner {g = g} = begin
88-
(b ∙ a) ∙ (c ∙ g) ≈⟨ sym (assoc (b ∙ a) c g) ⟩
89-
((b ∙ a) ∙ c) ∙ g ≈⟨ ∙-cong cancelʳ refl
92+
(b ∙ a) ∙ (c ∙ g) ≈⟨ assoc (b ∙ a) c g
93+
((b ∙ a) ∙ c) ∙ g ≈⟨ ∙-congʳ cancelʳ ⟩
9094
b ∙ g ∎
9195

9296
insertInner : {g} b ∙ g ≈ (b ∙ a) ∙ (c ∙ g)

0 commit comments

Comments
 (0)