Skip to content

Commit a162b5c

Browse files
authored
fixes #2408 (#2422)
* fixes #2408 * 'better' names? * added `CHANGELOG` entry
1 parent b39dcc5 commit a162b5c

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

Diff for: CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,10 @@ Deprecated names
2424
New modules
2525
-----------
2626

27+
* Properties of `IdempotentCommutativeMonoid`s refactored out from `Algebra.Solver.IdempotentCommutativeMonoid`:
28+
```agda
29+
Algebra.Properties.IdempotentCommutativeMonoid
30+
```
31+
2732
Additions to existing modules
2833
-----------------------------
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
------------------------------------------------------------------------
2+
-- The Agda standard library
3+
--
4+
-- Some derivable properties
5+
------------------------------------------------------------------------
6+
7+
{-# OPTIONS --cubical-compatible --safe #-}
8+
9+
open import Algebra.Bundles using (IdempotentCommutativeMonoid)
10+
11+
module Algebra.Properties.IdempotentCommutativeMonoid
12+
{c ℓ} (M : IdempotentCommutativeMonoid c ℓ) where
13+
14+
open IdempotentCommutativeMonoid M
15+
16+
open import Algebra.Consequences.Setoid setoid
17+
using (comm∧distrˡ⇒distrʳ; comm∧distrˡ⇒distr)
18+
open import Algebra.Definitions _≈_
19+
using (_DistributesOverˡ_; _DistributesOverʳ_; _DistributesOver_)
20+
open import Algebra.Properties.CommutativeSemigroup commutativeSemigroup
21+
using (interchange)
22+
open import Relation.Binary.Reasoning.Setoid setoid
23+
24+
25+
------------------------------------------------------------------------
26+
-- Distributivity
27+
28+
∙-distrˡ-∙ : _∙_ DistributesOverˡ _∙_
29+
∙-distrˡ-∙ a b c = begin
30+
a ∙ (b ∙ c) ≈⟨ ∙-congʳ (idem a) ⟨
31+
(a ∙ a) ∙ (b ∙ c) ≈⟨ interchange _ _ _ _ ⟩
32+
(a ∙ b) ∙ (a ∙ c) ∎
33+
34+
∙-distrʳ-∙ : _∙_ DistributesOverʳ _∙_
35+
∙-distrʳ-∙ = comm∧distrˡ⇒distrʳ ∙-cong comm ∙-distrˡ-∙
36+
37+
∙-distr-∙ : _∙_ DistributesOver _∙_
38+
∙-distr-∙ = comm∧distrˡ⇒distr ∙-cong comm ∙-distrˡ-∙

0 commit comments

Comments
 (0)