Skip to content

Commit 1a9d334

Browse files
authored
parity is a Semiring homomorphism (#1894)
1 parent 8d1d29d commit 1a9d334

14 files changed

+161
-568
lines changed

CHANGELOG.md

+11-14
Original file line numberDiff line numberDiff line change
@@ -594,15 +594,6 @@ Non-backwards compatible changes
594594
This is needed because `MonadState S M` does not pack a `Monad M` instance anymore
595595
and so we cannot define `modify f` as `get >>= λ s → put (f s)`.
596596

597-
* `MonadWriter 𝕎 M` is defined similarly:
598-
```agda
599-
writer : W × A → M A
600-
listen : M A → M (W × A)
601-
pass : M ((W → W) × A) → M A
602-
```
603-
with `tell` defined as a derived notion.
604-
Note that `𝕎` is a `RawMonoid`, not a `Set` and `W` is the carrier of the monoid.
605-
606597
* New modules:
607598
```
608599
Data.List.Effectful.Transformer
@@ -625,11 +616,6 @@ Non-backwards compatible changes
625616
Effect.Monad.State.Instances
626617
Effect.Monad.State.Transformer
627618
Effect.Monad.State.Transformer.Base
628-
Effect.Monad.Writer
629-
Effect.Monad.Writer.Indexed
630-
Effect.Monad.Writer.Instances
631-
Effect.Monad.Writer.Transformer
632-
Effect.Monad.Writer.Transformer.Base
633619
IO.Effectful
634620
IO.Instances
635621
```
@@ -2008,6 +1994,17 @@ Other minor changes
20081994
pattern `suc x = con (quote ℕ.suc) (x ⟨∷⟩ [])
20091995
```
20101996

1997+
* Added new proofs in `Data.Parity.Properties`:
1998+
```agda
1999+
suc-homo-⁻¹ : (parity (suc n)) ⁻¹ ≡ parity n
2000+
+-homo-+ : parity (m ℕ.+ n) ≡ parity m ℙ.+ parity n
2001+
*-homo-* : parity (m ℕ.* n) ≡ parity m ℙ.* parity n
2002+
parity-isMagmaHomomorphism : IsMagmaHomomorphism ℕ.+-rawMagma ℙ.+-rawMagma parity
2003+
parity-isMonoidHomomorphism : IsMonoidHomomorphism ℕ.+-0-rawMonoid ℙ.+-0-rawMonoid parity
2004+
parity-isNearSemiringHomomorphism : IsNearSemiringHomomorphism ℕ.+-*-rawNearSemiring ℙ.+-*-rawNearSemiring parity
2005+
parity-isSemiringHomomorphism : IsSemiringHomomorphism ℕ.+-*-rawSemiring ℙ.+-*-rawSemiring parity
2006+
```
2007+
20112008
* Added new rounding functions in `Data.Rational.Base`:
20122009
```agda
20132010
floor ceiling truncate round ⌊_⌋ ⌈_⌉ [_] : ℚ → ℤ

0 commit comments

Comments
 (0)