Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new Bool action on a RawMonoid plus properties #2450

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
response to review comments on draft
jamesmckinna committed Aug 16, 2024
commit 7d4d3a0db19ae1c5faeb30ae946edbfbe050577b
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -36,6 +36,6 @@ Additions to existing modules
* Properties of the Boolean action on a RawMonoid:
```agda
∧-homo-true : true ∧ x ≈ x
-assocˡ : b ∧ (b′ ∧ x) ≈ (b Bool.∧ b′) ∧ x
∧∙-≗∧+ : b ∧′ x ∙ y ≈ (b ∧ x) + y
-assocˡ : b ∧ (b′ ∧ x) ≈ (b Bool.∧ b′) ∧ x
b∧x∙y≈b∧x+y : b ∧′ x ∙ y ≈ (b ∧ x) + y
```
14 changes: 7 additions & 7 deletions src/Algebra/Properties/Monoid/Mult.agda
Original file line number Diff line number Diff line change
@@ -80,15 +80,15 @@ open import Algebra.Definitions.RawMonoid rawMonoid public
n × x + (m ℕ.* n) × x ≈⟨ ×-homo-+ x n (m ℕ.* n) ⟨
(suc m ℕ.* n) × x ∎

-- _∧_ is homomorphic with respect to _Bool∧_.
-- _∧_ is homomorphic with respect to Bool._∧_.

∧-homo-true : ∀ x → true ∧ x ≈ x
∧-homo-true x = refl
∧-homo-true _ = refl

∧-assocˡ : ∀ b b′ x → b ∧ (b′ ∧ x) ≈ (b Bool.∧ b′) ∧ x
∧-assocˡ false b x = refl
∧-assocˡ true b x = refl
∧-assocˡ false _ _ = refl
∧-assocˡ true _ _ = refl

∧∙-≗∧+ : ∀ b x y → b ∧′ x ∙ y ≈ (b ∧ x) + y
∧∙-≗∧+ true x y = refl
∧∙-≗∧+ false x y = sym (+-identityˡ y)
b∧x∙y≈b∧x+y : ∀ b x y → b ∧′ x ∙ y ≈ (b ∧ x) + y
b∧x∙y≈b∧x+y true _ _ = refl
b∧x∙y≈b∧x+y false _ y = sym (+-identityˡ y)