Skip to content

Commit 9f93f03

Browse files
authored
Merge branch 'agda:master' into centres-bis
2 parents d0ea58e + 320220b commit 9f93f03

File tree

3 files changed

+74
-8
lines changed

3 files changed

+74
-8
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ Deprecated names
5353
interchange ↦ medial
5454
```
5555

56+
* In `Algebra.Properties.Monoid`:
57+
```agda
58+
ε-comm ↦ ε-central
59+
```
60+
5661
* In `Data.Fin.Properties`:
5762
```agda
5863
¬∀⟶∃¬-smallest ↦ ¬∀⇒∃¬-smallest
@@ -109,6 +114,10 @@ New modules
109114
Data.List.NonEmpty.Membership.Setoid
110115
```
111116

117+
* `Relation.Binary.Morphism.Construct.On`: given a relation `_∼_` on `B`,
118+
and a function `f : A → B`, construct the canonical `IsRelMonomorphism`
119+
between `_∼_ on f` and `_∼_`, witnessed by `f` itself.
120+
112121
Additions to existing modules
113122
-----------------------------
114123

src/Algebra/Properties/Monoid.agda

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

1010
open import Algebra.Bundles using (Monoid)
11-
open import Function using (_∘_)
1211

1312
module Algebra.Properties.Monoid {o ℓ} (M : Monoid o ℓ) where
1413

14+
open import Function using (_∘_)
15+
1516
open Monoid M
16-
using (Carrier; _∙_; _≈_; setoid; isMagma; semigroup; ε; sym; identityˡ
17-
; identityʳ ; ∙-cong; refl; assoc; ∙-congˡ; ∙-congʳ; trans)
17+
using (Carrier; _∙_; ε; _≈_; refl; sym; trans; setoid
18+
; ∙-cong; ∙-congˡ; ∙-congʳ; isMagma
19+
; assoc; semigroup; identity; identityˡ; identityʳ)
20+
21+
open import Algebra.Consequences.Setoid setoid using (identity⇒central)
22+
open import Algebra.Definitions _≈_ using (Central)
1823
open import Relation.Binary.Reasoning.Setoid setoid
1924

25+
private
26+
variable
27+
a b c d : Carrier
28+
29+
------------------------------------------------------------------------
30+
-- Re-export `Semigroup` properties
31+
2032
open import Algebra.Properties.Semigroup semigroup public
2133

22-
private
23-
variable
24-
a b c d : Carrier
34+
------------------------------------------------------------------------
35+
-- Properties of identity
2536

2637
ε-unique : a ( b b ∙ a ≈ b) a ≈ ε
2738
ε-unique a b∙a≈b = trans (sym (identityˡ a)) (b∙a≈b ε)
2839

29-
ε-comm : a a ∙ ε ≈ ε ∙ a
30-
ε-comm a = trans (identityʳ a) (sym (identityˡ a))
40+
ε-central : Central _∙_ ε
41+
ε-central = identity⇒central {_∙_ = _∙_} identity
3142

3243
module _ (a≈ε : a ≈ ε) where
3344
elimʳ : b b ∙ a ≈ b
@@ -65,3 +76,17 @@ module _ (inv : a ∙ c ≈ ε) where
6576
insertᶜ : b d b ∙ d ≈ (b ∙ a) ∙ (c ∙ d)
6677
insertᶜ = λ b d sym (cancelᶜ b d)
6778

79+
80+
------------------------------------------------------------------------
81+
-- DEPRECATED NAMES
82+
------------------------------------------------------------------------
83+
-- Please use the new names as continuing support for the old names is
84+
-- not guaranteed.
85+
86+
-- Version 2.4
87+
88+
ε-comm = ε-central
89+
{-# WARNING_ON_USAGE ε-comm
90+
"Warning: ε-comm was deprecated in v2.4.
91+
Please use ε-central instead."
92+
#-}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Construct monomorphism from a relation and a function via `_on_`
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
9+
open import Relation.Binary.Core using (Rel)
10+
11+
module Relation.Binary.Morphism.Construct.On
12+
{a b ℓ} {A : Set a} {B : Set b} (_∼_ : Rel B ℓ) (f : A B)
13+
where
14+
15+
open import Function.Base using (id; _on_)
16+
open import Relation.Binary.Morphism.Structures
17+
using (IsRelHomomorphism; IsRelMonomorphism)
18+
19+
------------------------------------------------------------------------
20+
-- Definition
21+
22+
_≈_ : Rel A _
23+
_≈_ = _∼_ on f
24+
25+
isRelHomomorphism : IsRelHomomorphism _≈_ _∼_ f
26+
isRelHomomorphism = record { cong = id }
27+
28+
isRelMonomorphism : IsRelMonomorphism _≈_ _∼_ f
29+
isRelMonomorphism = record
30+
{ isHomomorphism = isRelHomomorphism
31+
; injective = id
32+
}

0 commit comments

Comments
 (0)