Skip to content

Commit 397ab08

Browse files
authored
Add sum-↭ (#2498)
1 parent 77bb2dc commit 397ab08

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,9 @@ New modules
111111

112112
* `Data.List.Relation.Binary.Disjoint.Propositional.Properties`:
113113
Propositional counterpart to `Data.List.Relation.Binary.Disjoint.Setoid.Properties`
114+
```agda
115+
sum-↭ : sum Preserves _↭_ ⟶ _≡_
116+
```
114117

115118
* `Data.List.Relation.Binary.Permutation.Propositional.Properties.WithK`
116119

src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,15 @@ module _ {ℓ} {R : Rel A ℓ} (R? : Decidable R) where
372372
x ∷ xs ++ y ∷ ys ∎
373373
where open PermutationReasoning
374374

375+
------------------------------------------------------------------------
376+
-- sum
377+
378+
sum-↭ : sum Preserves _↭_ ⟶ _≡_
379+
sum-↭ p = foldr-commMonoid ℕ-+-0.isCommutativeMonoid (↭⇒↭ₛ p)
380+
where
381+
module ℕ-+-0 = CommutativeMonoid ℕ.+-0-commutativeMonoid
382+
open Permutation ℕ-+-0.setoid
383+
375384
------------------------------------------------------------------------
376385
-- product
377386

0 commit comments

Comments
 (0)