-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* fixes #2408 * 'better' names? * added `CHANGELOG` entry
- Loading branch information
1 parent
b39dcc5
commit a162b5c
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
------------------------------------------------------------------------ | ||
-- The Agda standard library | ||
-- | ||
-- Some derivable properties | ||
------------------------------------------------------------------------ | ||
|
||
{-# OPTIONS --cubical-compatible --safe #-} | ||
|
||
open import Algebra.Bundles using (IdempotentCommutativeMonoid) | ||
|
||
module Algebra.Properties.IdempotentCommutativeMonoid | ||
{c ℓ} (M : IdempotentCommutativeMonoid c ℓ) where | ||
|
||
open IdempotentCommutativeMonoid M | ||
|
||
open import Algebra.Consequences.Setoid setoid | ||
using (comm∧distrˡ⇒distrʳ; comm∧distrˡ⇒distr) | ||
open import Algebra.Definitions _≈_ | ||
using (_DistributesOverˡ_; _DistributesOverʳ_; _DistributesOver_) | ||
open import Algebra.Properties.CommutativeSemigroup commutativeSemigroup | ||
using (interchange) | ||
open import Relation.Binary.Reasoning.Setoid setoid | ||
|
||
|
||
------------------------------------------------------------------------ | ||
-- Distributivity | ||
|
||
∙-distrˡ-∙ : _∙_ DistributesOverˡ _∙_ | ||
∙-distrˡ-∙ a b c = begin | ||
a ∙ (b ∙ c) ≈⟨ ∙-congʳ (idem a) ⟨ | ||
(a ∙ a) ∙ (b ∙ c) ≈⟨ interchange _ _ _ _ ⟩ | ||
(a ∙ b) ∙ (a ∙ c) ∎ | ||
|
||
∙-distrʳ-∙ : _∙_ DistributesOverʳ _∙_ | ||
∙-distrʳ-∙ = comm∧distrˡ⇒distrʳ ∙-cong comm ∙-distrˡ-∙ | ||
|
||
∙-distr-∙ : _∙_ DistributesOver _∙_ | ||
∙-distr-∙ = comm∧distrˡ⇒distr ∙-cong comm ∙-distrˡ-∙ |