Skip to content

Commit 732d438

Browse files
authored
Add small lemma relating ∷ʳ and ++ (#1713)
1 parent 592b094 commit 732d438

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1029,6 +1029,7 @@ Other minor changes
10291029
* Add new proofs in `Data.List.Properties`:
10301030
```agda
10311031
∈⇒∣product : n ∈ ns → n ∣ product ns
1032+
∷ʳ-++ : xs ∷ʳ a ++ ys ≡ xs ++ a ∷ ys
10321033
```
10331034

10341035
* Added new definitions and proofs to `Data.Nat.Primality`:

notes/style-guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ line of code, indented by two spaces.
261261
* Instead, private blocks should only be used to prevent temporary terms and
262262
records that are defined for convenience from being exported by the module.
263263

264-
* The mutual block is considered obselete. Please use the standard approach
264+
* The mutual block is considered obsolete. Please use the standard approach
265265
of placing the type signatures of the mutually recursive functions before
266266
their definitions.
267267

src/Data/List/Properties.agda

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,8 @@ module _ {x y : A} where
993993
∷ʳ-injectiveʳ : (xs ys : List A) xs ∷ʳ x ≡ ys ∷ʳ y x ≡ y
994994
∷ʳ-injectiveʳ xs ys eq = proj₂ (∷ʳ-injective xs ys eq)
995995

996+
∷ʳ-++ : (xs : List A) (a : A) (ys : List A) xs ∷ʳ a ++ ys ≡ xs ++ a ∷ ys
997+
∷ʳ-++ xs a ys = ++-assoc xs [ a ] ys
996998

997999
------------------------------------------------------------------------
9981000
-- DEPRECATED

0 commit comments

Comments
 (0)