From 9a5ec9fc4b51dc4514f5f15db7fc72c90422f13e Mon Sep 17 00:00:00 2001 From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com> Date: Sun, 8 Sep 2024 15:23:24 +0100 Subject: [PATCH] Add two lemmas to `Data.List.Membership.Setoid.Properties` (#2465) * fixes first part of issue #2463; second part creates dependency cycle * refactor to break dependency cycle * renamed in line with review suggestions * fix bug --- CHANGELOG.md | 11 +++ .../List/Membership/Setoid/Properties.agda | 16 ++++ .../List/Relation/Unary/All/Properties.agda | 65 +------------ .../Relation/Unary/All/Properties/Core.agda | 96 +++++++++++++++++++ 4 files changed, 128 insertions(+), 60 deletions(-) create mode 100644 src/Data/List/Relation/Unary/All/Properties/Core.agda diff --git a/CHANGELOG.md b/CHANGELOG.md index 8125735a2b..62f9b4b8e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -93,6 +93,11 @@ New modules NB Imports of the existing proof procedures `solve` and `prove` etc. should still be via the top-level interfaces in `Algebra.Solver.*Monoid`. +* Refactored out from `Data.List.Relation.Unary.All.Properties` in order to break a dependency cycle with `Data.List.Membership.Setoid.Properties`: + ```agda + Data.List.Relation.Unary.All.Properties.Core + ``` + Additions to existing modules ----------------------------- @@ -113,6 +118,12 @@ Additions to existing modules Env = Vec Carrier ``` +* In `Data.List.Membership.Setoid.Properties`: + ```agda + Any-∈-swap : Any (_∈ ys) xs → Any (_∈ xs) ys + All-∉-swap : All (_∉ ys) xs → All (_∉ xs) ys + ``` + * In `Data.List.Properties`: ```agda product≢0 : All NonZero ns → NonZero (product ns) diff --git a/src/Data/List/Membership/Setoid/Properties.agda b/src/Data/List/Membership/Setoid/Properties.agda index 48303dec37..76bbd8beaf 100644 --- a/src/Data/List/Membership/Setoid/Properties.agda +++ b/src/Data/List/Membership/Setoid/Properties.agda @@ -17,6 +17,7 @@ import Data.List.Membership.Setoid as Membership import Data.List.Relation.Binary.Equality.Setoid as Equality open import Data.List.Relation.Unary.All as All using (All) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) +import Data.List.Relation.Unary.All.Properties.Core as All import Data.List.Relation.Unary.Any.Properties as Any import Data.List.Relation.Unary.Unique.Setoid as Unique open import Data.Nat.Base using (suc; z