From c63c9dc59bb7a918f9a6ffb41a12866ee34d7010 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 13 Feb 2023 12:45:03 +0000 Subject: [PATCH 001/316] key combinatorial lemma for binomial theorem --- CHANGELOG.md | 15 +++ src/Data/Nat/Combinatorics.agda | 124 +++++++++++++++++- src/Data/Nat/Combinatorics/Specification.agda | 4 + src/Data/Nat/Properties.agda | 14 +- 4 files changed, 154 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index edb69c4b8f..0edbc0d2ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2069,11 +2069,14 @@ Other minor changes <-step : m < n → m < 1 + n m<1+n⇒mn⇒nPk≡0; [n∸k]!k!∣n!) + using (nPk≡n!/[n∸k]!; k>n⇒nPk≡0; [n∸k]!k!∣n!; k![n∸k]!∣n!) nPn≡n! : ∀ n → n P n ≡ n ! nPn≡n! n = begin-equality @@ -46,6 +48,15 @@ nPn≡n! n = begin-equality where instance _ = (n ∸ n) !≢0 +nP1≡n : ∀ n → n P 1 ≡ n +nP1≡n zero = k>n⇒nPk≡0 (zn, in which case 1+k>1+n>n -} +... | tri> _ _ k>n = begin-equality + n C k + n C (suc k) ≡⟨ cong (_+ (n C (suc k))) (k>n⇒nCk≡0 k>n) ⟩ + 0 + n C (suc k) ≡⟨⟩ + n C (suc k) ≡⟨ k>n⇒nCk≡0 (mn) ⟩ + 0 ≡˘⟨ k>n⇒nCk≡0 (sn) ⟩ + suc n C suc k ∎ +{- case k≡n, in which case 1+k≡1+n>n -} +... | tri≈ _ k≡n _ rewrite k≡n = begin-equality + n C n + n C (suc n) ≡⟨ cong (n C n +_) (k>n⇒nCk≡0 (n<1+n n)) ⟩ + n C n + 0 ≡⟨ +-identityʳ (n C n) ⟩ + n C n ≡⟨ nCn≡1 n ⟩ + 1 ≡˘⟨ nCn≡1 (suc n) ⟩ + suc n C suc n ∎ +{- case kn⇒m∸n≢0 k Date: Mon, 13 Feb 2023 12:46:55 +0000 Subject: [PATCH 002/316] fix whitespace --- src/Data/Nat/Combinatorics.agda | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/Data/Nat/Combinatorics.agda b/src/Data/Nat/Combinatorics.agda index f14af0deb9..c1f5183094 100644 --- a/src/Data/Nat/Combinatorics.agda +++ b/src/Data/Nat/Combinatorics.agda @@ -50,7 +50,7 @@ nPn≡n! n = begin-equality nP1≡n : ∀ n → n P 1 ≡ n nP1≡n zero = k>n⇒nPk≡0 (z Date: Mon, 13 Feb 2023 12:53:58 +0000 Subject: [PATCH 003/316] typo: dropped comment character --- src/Data/Nat/Properties.agda | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 652b20615c..85bf21ceda 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1,4 +1,4 @@ ------------------------------------------------------------------------ +------------------------------------------------------------------------ -- The Agda standard library -- -- A bunch of properties about natural number operations From 9c2da6b1fbf54bd19342ab56e88487bc6442e5cd Mon Sep 17 00:00:00 2001 From: James McKinna Date: Tue, 14 Feb 2023 09:45:45 +0000 Subject: [PATCH 004/316] cosmetics --- src/Data/Nat/Combinatorics.agda | 34 +++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/src/Data/Nat/Combinatorics.agda b/src/Data/Nat/Combinatorics.agda index c1f5183094..4e6331965d 100644 --- a/src/Data/Nat/Combinatorics.agda +++ b/src/Data/Nat/Combinatorics.agda @@ -50,12 +50,12 @@ nPn≡n! n = begin-equality nP1≡n : ∀ n → n P 1 ≡ n nP1≡n zero = k>n⇒nPk≡0 (z Date: Tue, 14 Feb 2023 09:53:20 +0000 Subject: [PATCH 005/316] =?UTF-8?q?removed,=20and=20remoed=20need=20for=20?= =?UTF-8?q?`1\!=E2=89=A11`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 - src/Data/Nat/Combinatorics.agda | 5 ++--- src/Data/Nat/Properties.agda | 3 --- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0edbc0d2ef..231d10fe7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2076,7 +2076,6 @@ Other minor changes <⇒<′ : m < n → m <′ n <′⇒< : m <′ n → m < n - 1!≡1 : 1 ! ≡ 1 1≤n! : 1 ≤ n ! _!≢0 : NonZero (n !) _!*_!≢0 : NonZero (m ! * n !) diff --git a/src/Data/Nat/Combinatorics.agda b/src/Data/Nat/Combinatorics.agda index 4e6331965d..68fceabd0c 100644 --- a/src/Data/Nat/Combinatorics.agda +++ b/src/Data/Nat/Combinatorics.agda @@ -101,9 +101,8 @@ nC1≡n : ∀ n → n C 1 ≡ n nC1≡n zero = refl nC1≡n n@(suc n-1) = begin-equality n C 1 ≡⟨ nCk≡nPk/k! (s≤s (z≤n {n-1})) ⟩ - (n P 1) / 1 ! ≡⟨ /-congˡ {o = 1 !} (nP1≡n n) ⟩ - n / 1 ! ≡⟨ /-congʳ {m = n} 1!≡1 ⟩ - n / 1 ≡⟨ n/1≡n n ⟩ + (n P 1) / 1 ! ≡⟨ n/1≡n (n P 1) ⟩ + n P 1 ≡⟨ nP1≡n n ⟩ n ∎ diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 85bf21ceda..05318b224a 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1927,9 +1927,6 @@ n≡⌈n+n/2⌉ (suc n′@(suc n)) = ------------------------------------------------------------------------ -- Properties of _! -1!≡1 : 1 ! ≡ 1 -1!≡1 = *-identityˡ 1 - 1≤n! : ∀ n → 1 ≤ n ! 1≤n! zero = ≤-refl 1≤n! (suc n) = *-mono-≤ (m≤m+n 1 n) (1≤n! n) From b89e8be825757850fad0a80b98a2456d658be72b Mon Sep 17 00:00:00 2001 From: James McKinna Date: Thu, 23 Feb 2023 16:12:48 +0000 Subject: [PATCH 006/316] moved lemma --- CHANGELOG.md | 6 +----- src/Data/Nat/Combinatorics.agda | 5 ++++- src/Data/Nat/Combinatorics/Specification.agda | 3 --- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 231d10fe7b..95d40d1bff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2116,16 +2116,12 @@ Other minor changes * Added new proofs in `Data.Nat.Combinatorics`: ```agda + k![n∸k]!∣n! : k ≤ n → k ! * (n ∸ k) ! ∣ n ! nP1≡n : n P 1 ≡ n nC1≡n : n C 1 ≡ n nCk+nC[k+1]≡[n+1]C[k+1] : n C k + n C (suc k) ≡ suc n C suc k ``` -* Added new proofs in `Data.Nat.Combinatorics.Specification`: - ```agda - k![n∸k]!∣n! : k ≤ n → k ! * (n ∸ k) ! ∣ n ! - ``` - * Added new proofs in `Data.Nat.DivMod`: ```agda m%n≤n : .{{_ : NonZero n}} → m % n ≤ n diff --git a/src/Data/Nat/Combinatorics.agda b/src/Data/Nat/Combinatorics.agda index 68fceabd0c..31c1346e9d 100644 --- a/src/Data/Nat/Combinatorics.agda +++ b/src/Data/Nat/Combinatorics.agda @@ -36,7 +36,7 @@ open Base public -- Properties of _P_ open Specification public - using (nPk≡n!/[n∸k]!; k>n⇒nPk≡0; [n∸k]!k!∣n!; k![n∸k]!∣n!) + using (nPk≡n!/[n∸k]!; k>n⇒nPk≡0; [n∸k]!k!∣n!) nPn≡n! : ∀ n → n P n ≡ n ! nPn≡n! n = begin-equality @@ -109,6 +109,9 @@ nC1≡n n@(suc n-1) = begin-equality ------------------------------------------------------------------------ -- Arithmetic of (n C k) +k![n∸k]!∣n! : ∀ {n k} → k ≤ n → k ! * (n ∸ k) ! ∣ n ! +k![n∸k]!∣n! {n} {k} k≤n = subst (_∣ n !) (*-comm ((n ∸ k) !) (k !)) ([n∸k]!k!∣n! k≤n) + nCk+nC[k+1]≡[n+1]C[k+1] : ∀ n k → n C k + n C (suc k) ≡ suc n C suc k nCk+nC[k+1]≡[n+1]C[k+1] n k with <-cmp k n {- case k>n, in which case 1+k>1+n>n -} diff --git a/src/Data/Nat/Combinatorics/Specification.agda b/src/Data/Nat/Combinatorics/Specification.agda index 90d7551499..e655484b60 100644 --- a/src/Data/Nat/Combinatorics/Specification.agda +++ b/src/Data/Nat/Combinatorics/Specification.agda @@ -98,9 +98,6 @@ k!∣nP′k n@{suc n-1} k@{suc k-1} k≤n@(s≤s k-1≤n-1) with k-1 ≟ n-1 (subst (k ! ∣_) (nP′k≡n!/[n∸k]! k≤n) (k!∣nP′k k≤n)) where instance _ = (n ∸ k) !≢0 -k![n∸k]!∣n! : ∀ {n k} → k ≤ n → k ! * (n ∸ k) ! ∣ n ! -k![n∸k]!∣n! {n} {k} k≤n = subst (_∣ n !) (*-comm ((n ∸ k) !) (k !)) ([n∸k]!k!∣n! k≤n) - ------------------------------------------------------------------------ -- Properties of _P_ From 2c62e4f67f0a55dd4c6cfd6b188005cef35eebaf Mon Sep 17 00:00:00 2001 From: James McKinna Date: Thu, 23 Feb 2023 17:20:07 +0000 Subject: [PATCH 007/316] fixed merge commit; lifted out lemmas; tweaked --- CHANGELOG.md | 6 +- src/Data/Nat/Combinatorics.agda | 82 ++++++++++++------- src/Data/Nat/Combinatorics/Specification.agda | 1 - src/Data/Nat/Properties.agda | 9 +- 4 files changed, 55 insertions(+), 43 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 95d40d1bff..5fc1854115 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2069,8 +2069,6 @@ Other minor changes <-step : m < n → m < 1 + n m<1+n⇒mn⇒nPk≡0 (zn⇒m∸n≢0 k Date: Wed, 1 Mar 2023 17:37:47 +0900 Subject: [PATCH 008/316] Update workflow version --- .github/workflows/ci-ubuntu.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-ubuntu.yml b/.github/workflows/ci-ubuntu.yml index 2b08c7d6e6..85e9fe1365 100644 --- a/.github/workflows/ci-ubuntu.yml +++ b/.github/workflows/ci-ubuntu.yml @@ -74,7 +74,7 @@ jobs: if [[ '${{ github.ref }}' == 'refs/heads/master' \ || '${{ github.base_ref }}' == 'master' ]]; then # Pick Agda version for master - echo "AGDA_COMMIT=tags/v2.6.2" >> $GITHUB_ENV; + echo "AGDA_COMMIT=tags/v2.6.3" >> $GITHUB_ENV; echo "AGDA_HTML_DIR=html" >> $GITHUB_ENV elif [[ '${{ github.ref }}' == 'refs/heads/experimental' \ || '${{ github.base_ref }}' == 'experimental' ]]; then From f34ffc50157bf49bb20dd5b6b8d73033b7a46720 Mon Sep 17 00:00:00 2001 From: MatthewDaggitt Date: Thu, 2 Mar 2023 15:07:00 +0900 Subject: [PATCH 009/316] Fix missing annotations in Data.Fin.Properties --- src/Data/Fin/Properties.agda | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Data/Fin/Properties.agda b/src/Data/Fin/Properties.agda index 2f6e36eabd..9089102b29 100644 --- a/src/Data/Fin/Properties.agda +++ b/src/Data/Fin/Properties.agda @@ -5,6 +5,7 @@ -- properties (or other properties not available in Data.Fin) ------------------------------------------------------------------------ +{-# OPTIONS --cubical-compatible --safe #-} {-# OPTIONS --warn=noUserWarning #-} -- for deprecated _≺_ (issue #1726) module Data.Fin.Properties where From c07ea1aaa0322d628dce2d5f572739446ac5043e Mon Sep 17 00:00:00 2001 From: MatthewDaggitt Date: Fri, 17 Mar 2023 13:47:02 +0900 Subject: [PATCH 010/316] Fixed failing reflection test --- tests/reflection/assumption/Main.agda | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/reflection/assumption/Main.agda b/tests/reflection/assumption/Main.agda index d7f30d3118..cf0d21b514 100644 --- a/tests/reflection/assumption/Main.agda +++ b/tests/reflection/assumption/Main.agda @@ -7,6 +7,7 @@ open import Data.Bool.Base using (if_then_else_) open import Data.List.Base using (List; []; _∷_; concatMap; map) open import Data.Maybe.Base using (Maybe; nothing; just) open import Data.Nat.Base using (ℕ; suc) +open import Data.Product.Base using (_×_; _,_) open import Level using (Level) open import Data.Unit.Base using (⊤) open import Function.Base using (case_of_; _$_) @@ -39,11 +40,11 @@ private -- before being compared to the type of the most local variable. The goal -- indeed lives below that variable's binding site! -searchEntry : ℕ → Type → List Type → Maybe ℕ +searchEntry : ℕ → Type → List (String × Arg Type) → Maybe ℕ searchEntry n ty [] = nothing -searchEntry n ty (e ∷ es) = do +searchEntry n ty ((_ , e) ∷ es) = do ty ← strengthen ty - if does (ty ≟ e) + if does (ty ≟ unArg e) then just n else searchEntry (suc n) ty es @@ -54,8 +55,8 @@ macro goal ← inferType hole debugPrint "" 10 (strErr "Context : " - ∷ concatMap (λ where (arg info ty) → strErr "\n " ∷ termErr ty ∷ []) asss) - let res = searchEntry 0 goal (map unArg asss) + ∷ concatMap (λ where (_ , arg info ty) → strErr "\n " ∷ termErr ty ∷ []) asss) + let res = searchEntry 0 goal asss case res of λ where nothing → typeError (strErr "Couldn't find an assumption of type: " ∷ termErr goal ∷ []) (just idx) → unify hole (var idx []) From 95700b8b54f554f0d4f4969972c26fabb92ff90d Mon Sep 17 00:00:00 2001 From: Harrison Grodin Date: Mon, 20 Mar 2023 13:45:10 -0400 Subject: [PATCH 011/316] Add monotonicity laws for `Nat._^_` --- src/Data/Nat/Properties.agda | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 0426d94d14..b177412e00 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1046,6 +1046,24 @@ m^n≡1⇒n≡0∨m≡1 m (suc n) eq = inj₂ (m*n≡1⇒m≡1 m (m ^ n) eq) m^n≢0 : ∀ m n .{{_ : NonZero m}} → NonZero (m ^ n) m^n≢0 m n = ≢-nonZero (≢-nonZero⁻¹ m ∘′ m^n≡0⇒m≡0 m n) +^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ +^-monoˡ-≤ zero m≤o = s≤s z≤n +^-monoˡ-≤ (suc n) {m} {o} m≤o = *-mono-≤ m≤o (^-monoˡ-≤ n m≤o) + +^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ +^-monoʳ-≤ m {n} {o} z≤n = n≢0⇒n>0 (≢-nonZero⁻¹ (m ^ o) {{m^n≢0 m o}}) +^-monoʳ-≤ m (s≤s n≤o) = *-monoʳ-≤ m (^-monoʳ-≤ m n≤o) + +^-monoˡ-< : ∀ n .{{_ : NonZero n}} → (_^ n) Preserves _<_ ⟶ _<_ +^-monoˡ-< (suc zero) m0 (≢-nonZero⁻¹ (m ^ o) {{(m^n≢0 m o {{>-nonZero (<-trans z-nonZero (<-trans z0 : ∀ (n : ℕ) → 2 ^ n > 0 2^n>0 zero = z0 (suc n) = ≤-trans (2^n>0 n) (m≤m+n (2 ^ n) ((2 ^ n) + zero)) From db22021a214dfe4afadb5c1e3036d8c15c13cb48 Mon Sep 17 00:00:00 2001 From: Harrison Grodin Date: Mon, 20 Mar 2023 13:48:04 -0400 Subject: [PATCH 012/316] Update CHANGELOG --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5fc1854115..a43a87b867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2083,6 +2083,11 @@ Other minor changes n≤1⇒n≡0∨n≡1 : n ≤ 1 → n ≡ 0 ⊎ n ≡ 1 + ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ + ^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ + ^-monoˡ-< : ∀ n .{{_ : NonZero n}} → (_^ n) Preserves _<_ ⟶ _<_ + ^-monoʳ-< : ∀ m → 1 < m → (m ^_) Preserves _<_ ⟶ _<_ + 2^n>0 : 2 ^ n > 0 n≡⌊n+n/2⌋ : n ≡ ⌊ n + n /2⌋ From a8bb3074f5a8d7f87a3acdd888fb2ae054c43f67 Mon Sep 17 00:00:00 2001 From: Harrison Grodin Date: Thu, 23 Mar 2023 22:38:57 -0400 Subject: [PATCH 013/316] Improve style --- src/Data/Nat/Properties.agda | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index b177412e00..10f523e966 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1048,7 +1048,7 @@ m^n≢0 m n = ≢-nonZero (≢-nonZero⁻¹ m ∘′ m^n≡0⇒m≡0 m n) ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ ^-monoˡ-≤ zero m≤o = s≤s z≤n -^-monoˡ-≤ (suc n) {m} {o} m≤o = *-mono-≤ m≤o (^-monoˡ-≤ n m≤o) +^-monoˡ-≤ (suc n) m≤o = *-mono-≤ m≤o (^-monoˡ-≤ n m≤o) ^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ ^-monoʳ-≤ m {n} {o} z≤n = n≢0⇒n>0 (≢-nonZero⁻¹ (m ^ o) {{m^n≢0 m o}}) @@ -1056,12 +1056,12 @@ m^n≢0 m n = ≢-nonZero (≢-nonZero⁻¹ m ∘′ m^n≡0⇒m≡0 m n) ^-monoˡ-< : ∀ n .{{_ : NonZero n}} → (_^ n) Preserves _<_ ⟶ _<_ ^-monoˡ-< (suc zero) m0 (≢-nonZero⁻¹ (m ^ o) {{(m^n≢0 m o {{>-nonZero (<-trans z-nonZero (<-trans z0 : ∀ (n : ℕ) → 2 ^ n > 0 From 3b0669e3d1168f8a7177178432a28c3181730226 Mon Sep 17 00:00:00 2001 From: Harrison Grodin Date: Mon, 27 Mar 2023 15:44:09 -0400 Subject: [PATCH 014/316] =?UTF-8?q?Clean=20up=20`^-mono=CA=B3-<`=20and=20`?= =?UTF-8?q?2^n>0`=20by=20adding=20`m^n>0`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com> --- CHANGELOG.md | 5 +++-- src/Data/Nat/Properties.agda | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a43a87b867..5ec865051b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2083,13 +2083,14 @@ Other minor changes n≤1⇒n≡0∨n≡1 : n ≤ 1 → n ≡ 0 ⊎ n ≡ 1 + m^n>0 : ∀ m .{{_ : NonZero m}} n → m ^ n > 0 + 2^n>0 : 2 ^ n > 0 + ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ ^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ ^-monoˡ-< : ∀ n .{{_ : NonZero n}} → (_^ n) Preserves _<_ ⟶ _<_ ^-monoʳ-< : ∀ m → 1 < m → (m ^_) Preserves _<_ ⟶ _<_ - 2^n>0 : 2 ^ n > 0 - n≡⌊n+n/2⌋ : n ≡ ⌊ n + n /2⌋ n≡⌈n+n/2⌉ : n ≡ ⌈ n + n /2⌉ diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 10f523e966..3ddb4b2f71 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1046,27 +1046,27 @@ m^n≡1⇒n≡0∨m≡1 m (suc n) eq = inj₂ (m*n≡1⇒m≡1 m (m ^ n) eq) m^n≢0 : ∀ m n .{{_ : NonZero m}} → NonZero (m ^ n) m^n≢0 m n = ≢-nonZero (≢-nonZero⁻¹ m ∘′ m^n≡0⇒m≡0 m n) +m^n>0 : ∀ m .{{_ : NonZero m}} n → m ^ n > 0 +m^n>0 m n = >-nonZero⁻¹ (m ^ n) {{m^n≢0 m n}} + +2^n>0 : ∀ (n : ℕ) → 2 ^ n > 0 +2^n>0 = m^n>0 2 + ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ ^-monoˡ-≤ zero m≤o = s≤s z≤n ^-monoˡ-≤ (suc n) m≤o = *-mono-≤ m≤o (^-monoˡ-≤ n m≤o) ^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ -^-monoʳ-≤ m {n} {o} z≤n = n≢0⇒n>0 (≢-nonZero⁻¹ (m ^ o) {{m^n≢0 m o}}) +^-monoʳ-≤ m {_} {o} z≤n = n≢0⇒n>0 (≢-nonZero⁻¹ (m ^ o) {{m^n≢0 m o}}) ^-monoʳ-≤ m (s≤s n≤o) = *-monoʳ-≤ m (^-monoʳ-≤ m n≤o) ^-monoˡ-< : ∀ n .{{_ : NonZero n}} → (_^ n) Preserves _<_ ⟶ _<_ -^-monoˡ-< (suc zero) m0 (≢-nonZero⁻¹ (m ^ o) {{(m^n≢0 m o {{>-nonZero (<-trans z-nonZero (<-trans z0 : ∀ (n : ℕ) → 2 ^ n > 0 -2^n>0 zero = z0 (suc n) = ≤-trans (2^n>0 n) (m≤m+n (2 ^ n) ((2 ^ n) + zero)) +^-monoʳ-< m@(suc _) 10 m o) +^-monoʳ-< m@(suc _) 1 Date: Mon, 27 Mar 2023 15:48:40 -0400 Subject: [PATCH 015/316] Remove `2^n>0` --- CHANGELOG.md | 1 - src/Data/Nat/Logarithm/Core.agda | 4 ++-- src/Data/Nat/Properties.agda | 3 --- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5ec865051b..75fc5f1393 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2084,7 +2084,6 @@ Other minor changes n≤1⇒n≡0∨n≡1 : n ≤ 1 → n ≡ 0 ⊎ n ≡ 1 m^n>0 : ∀ m .{{_ : NonZero m}} n → m ^ n > 0 - 2^n>0 : 2 ^ n > 0 ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ ^-monoʳ-≤ : ∀ m .{{_ : NonZero m}} → (m ^_) Preserves _≤_ ⟶ _≤_ diff --git a/src/Data/Nat/Logarithm/Core.agda b/src/Data/Nat/Logarithm/Core.agda index 63385c89c1..08321f5a0a 100644 --- a/src/Data/Nat/Logarithm/Core.agda +++ b/src/Data/Nat/Logarithm/Core.agda @@ -72,7 +72,7 @@ open import Data.Unit ⌊log2⌋2^n≡n : ∀ n {acc} → ⌊log2⌋ (2 ^ n) acc ≡ n ⌊log2⌋2^n≡n zero = refl ⌊log2⌋2^n≡n (suc n) = begin - ⌊log2⌋ ((2 ^ n) + ((2 ^ n) + zero)) _ ≡⟨ ⌊log2⌋2*b≡1+⌊log2⌋b (2 ^ n) {{>-nonZero (2^n>0 n)}} ⟩ + ⌊log2⌋ ((2 ^ n) + ((2 ^ n) + zero)) _ ≡⟨ ⌊log2⌋2*b≡1+⌊log2⌋b (2 ^ n) {{m^n≢0 2 n}} ⟩ 1 + ⌊log2⌋ (2 ^ n) (<-wellFounded _) ≡⟨ cong suc (⌊log2⌋2^n≡n n) ⟩ suc n ∎ where open ≡-Reasoning @@ -116,7 +116,7 @@ open import Data.Unit ⌈log2⌉2^n≡n : ∀ n {acc} → ⌈log2⌉ (2 ^ n) acc ≡ n ⌈log2⌉2^n≡n zero = refl ⌈log2⌉2^n≡n (suc n) = begin - ⌈log2⌉ ((2 ^ n) + ((2 ^ n) + zero)) _ ≡⟨ ⌈log2⌉2*n≡1+⌈log2⌉n (2 ^ n) {{>-nonZero (2^n>0 n)}} ⟩ + ⌈log2⌉ ((2 ^ n) + ((2 ^ n) + zero)) _ ≡⟨ ⌈log2⌉2*n≡1+⌈log2⌉n (2 ^ n) {{m^n≢0 2 n}} ⟩ 1 + ⌈log2⌉ (2 ^ n) (<-wellFounded _) ≡⟨ cong suc (⌈log2⌉2^n≡n n) ⟩ suc n ∎ where open ≡-Reasoning diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 3ddb4b2f71..3d38c77d07 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1049,9 +1049,6 @@ m^n≢0 m n = ≢-nonZero (≢-nonZero⁻¹ m ∘′ m^n≡0⇒m≡0 m n) m^n>0 : ∀ m .{{_ : NonZero m}} n → m ^ n > 0 m^n>0 m n = >-nonZero⁻¹ (m ^ n) {{m^n≢0 m n}} -2^n>0 : ∀ (n : ℕ) → 2 ^ n > 0 -2^n>0 = m^n>0 2 - ^-monoˡ-≤ : ∀ n → (_^ n) Preserves _≤_ ⟶ _≤_ ^-monoˡ-≤ zero m≤o = s≤s z≤n ^-monoˡ-≤ (suc n) m≤o = *-mono-≤ m≤o (^-monoˡ-≤ n m≤o) From b814e054e0f86365a37857852b96a6f0a83f1d8f Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Fri, 14 Apr 2023 16:30:46 +0200 Subject: [PATCH 016/316] =?UTF-8?q?Move=20suc=E2=89=A20=20slightly=20and?= =?UTF-8?q?=20add=20suc-injective=20to=20Data.Nat.Binary.Properties?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 4 ++++ src/Data/Nat/Binary/Properties.agda | 17 ++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75fc5f1393..8d3612bcbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2040,6 +2040,10 @@ Other minor changes +-*-rawSemiring : RawSemiring 0ℓ 0ℓ ``` +* Added a new proof to `Data.Nat.Binary.Properties`: + ```agda + suc-injective : Injective _≡_ _≡_ suc + ``` * Added new definitions and proofs to `Data.Nat.Primality`: ```agda diff --git a/src/Data/Nat/Binary/Properties.agda b/src/Data/Nat/Binary/Properties.agda index 5cf86313c3..3ea094ec00 100644 --- a/src/Data/Nat/Binary/Properties.agda +++ b/src/Data/Nat/Binary/Properties.agda @@ -1309,6 +1309,18 @@ double-suc x = begin -- Properties of suc ------------------------------------------------------------------------ +suc≢0 : suc x ≢ zero +suc≢0 {zero} () +suc≢0 {2[1+ _ ]} () +suc≢0 {1+[2 _ ]} () + +suc-injective : Injective _≡_ _≡_ suc +suc-injective {zero} {zero} p = refl +suc-injective {zero} {2[1+ y ]} p = contradiction 1+[2 p ]-injective (suc≢0 ∘ sym) +suc-injective {2[1+ x ]} {zero} p = contradiction 1+[2 p ]-injective suc≢0 +suc-injective {2[1+ x ]} {2[1+ y ]} p = cong 2[1+_] (suc-injective 1+[2 p ]-injective) +suc-injective {1+[2 x ]} {1+[2 y ]} refl = refl + 2[1+_]-double-suc : 2[1+_] ≗ double ∘ suc 2[1+_]-double-suc zero = refl 2[1+_]-double-suc 2[1+ x ] = cong 2[1+_] (2[1+_]-double-suc x) @@ -1325,11 +1337,6 @@ double-suc x = begin suc (double 1+[2 x ]) ∎ where open ≡-Reasoning; 2x = double x -suc≢0 : suc x ≢ zero -suc≢0 {zero} () -suc≢0 {2[1+ _ ]} () -suc≢0 {1+[2 _ ]} () - x+suc[y]≡suc[x]+y : ∀ x y → x + suc y ≡ suc x + y x+suc[y]≡suc[x]+y x y = begin x + suc y ≡⟨ +-comm x _ ⟩ From c9b38bf9a9ee9a5f689ada1e608a0b099bdca10d Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Fri, 14 Apr 2023 16:38:37 +0200 Subject: [PATCH 017/316] Add conical properties for and and or --- CHANGELOG.md | 6 ++++++ src/Data/Bool/Properties.agda | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d3612bcbf..c3a824b156 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1835,6 +1835,12 @@ Other minor changes * Added new proofs in `Data.Bool.Properties`: ```agda <-wellFounded : WellFounded _<_ + ∨-conicalˡ : LeftConical false _∨_ + ∨-conicalʳ : RightConical false _∨_ + ∨-conical : Conical false _∨_ + ∧-conicalˡ : LeftConical true _∧_ + ∧-conicalʳ : RightConical true _∧_ + ∧-conical : Conical true _∧_ ``` * Added new functions in `Data.Fin.Base`: diff --git a/src/Data/Bool/Properties.agda b/src/Data/Bool/Properties.agda index beb99befd8..fe232885eb 100644 --- a/src/Data/Bool/Properties.agda +++ b/src/Data/Bool/Properties.agda @@ -273,6 +273,15 @@ true Date: Mon, 17 Apr 2023 14:36:02 +0100 Subject: [PATCH 018/316] Revert "Fix two whitespace violations (#1922)" This reverts commit efc0230019937a694c87db0e3b49e45cc56a238d. --- CHANGELOG/v1.7.2.md | 2 +- src/Data/List/Membership/Setoid/Properties.agda | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG/v1.7.2.md b/CHANGELOG/v1.7.2.md index 8ddea63b4d..0183ec654f 100644 --- a/CHANGELOG/v1.7.2.md +++ b/CHANGELOG/v1.7.2.md @@ -5,5 +5,5 @@ The library has been tested using Agda 2.6.3. * In accordance with changes to the flags in Agda 2.6.3, all modules that previously used the `--without-K` flag now use the `--cubical-compatible` flag instead. - + * Updated the code using `primFloatToWord64` - the library API has remained unchanged. diff --git a/src/Data/List/Membership/Setoid/Properties.agda b/src/Data/List/Membership/Setoid/Properties.agda index 919bf19ba6..df260f2a17 100644 --- a/src/Data/List/Membership/Setoid/Properties.agda +++ b/src/Data/List/Membership/Setoid/Properties.agda @@ -122,7 +122,7 @@ module _ (S : Setoid c ℓ) where length (mapWith∈ xs f) ≡ length xs length-mapWith∈ [] = P.refl length-mapWith∈ (x ∷ xs) = P.cong suc (length-mapWith∈ xs) - + mapWith∈-id : ∀ xs → mapWith∈ xs (λ {x} _ → x) ≡ xs mapWith∈-id [] = P.refl mapWith∈-id (x ∷ xs) = P.cong (x ∷_) (mapWith∈-id xs) From 01d338e5a5fb3d6b9a91d839df36eb4b2bb98a65 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 14:40:09 +0100 Subject: [PATCH 019/316] Revert "punchOut preserves ordering (#1913)" This reverts commit 692b6fa0a5b667b8117efa5d4ab278d680a7c79f. --- CHANGELOG.md | 5 ----- src/Data/Fin/Properties.agda | 26 -------------------------- 2 files changed, 31 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a824b156..e9138f2585 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1899,11 +1899,6 @@ Other minor changes ℕ-ℕ≡toℕ‿ℕ- : n ℕ-ℕ i ≡ toℕ (n ℕ- i) - punchIn-mono-≤ : ∀ i (j k : Fin n) → j ≤ k → punchIn i j ≤ punchIn i k - punchIn-cancel-≤ : ∀ i (j k : Fin n) → punchIn i j ≤ punchIn i k → j ≤ k - punchOut-mono-≤ : (i≢j : i ≢ j) (i≢k : i ≢ k) → j ≤ k → punchOut i≢j ≤ punchOut i≢k - punchOut-cancel-≤ : (i≢j : i ≢ j) (i≢k : i ≢ k) → punchOut i≢j ≤ punchOut i≢k → j ≤ k - lower₁-injective : lower₁ i n≢i ≡ lower₁ j n≢j → i ≡ j pinch-injective : suc i ≢ j → suc i ≢ k → pinch i j ≡ pinch i k → j ≡ k diff --git a/src/Data/Fin/Properties.agda b/src/Data/Fin/Properties.agda index 9089102b29..232a44a7bb 100644 --- a/src/Data/Fin/Properties.agda +++ b/src/Data/Fin/Properties.agda @@ -802,16 +802,6 @@ punchIn-injective (suc i) (suc j) (suc k) ↑j+1≡↑k+1 = punchInᵢ≢i : ∀ i (j : Fin n) → punchIn i j ≢ i punchInᵢ≢i (suc i) (suc j) = punchInᵢ≢i i j ∘ suc-injective -punchIn-mono-≤ : ∀ i (j k : Fin n) → j ≤ k → punchIn i j ≤ punchIn i k -punchIn-mono-≤ zero _ _ j≤k = s≤s j≤k -punchIn-mono-≤ (suc _) zero _ z≤n = z≤n -punchIn-mono-≤ (suc i) (suc j) (suc k) (s≤s j≤k) = s≤s (punchIn-mono-≤ i j k j≤k) - -punchIn-cancel-≤ : ∀ i (j k : Fin n) → punchIn i j ≤ punchIn i k → j ≤ k -punchIn-cancel-≤ zero _ _ (s≤s j≤k) = j≤k -punchIn-cancel-≤ (suc _) zero _ z≤n = z≤n -punchIn-cancel-≤ (suc i) (suc j) (suc k) (s≤s ↑j≤↑k) = s≤s (punchIn-cancel-≤ i j k ↑j≤↑k) - ------------------------------------------------------------------------ -- punchOut ------------------------------------------------------------------------ @@ -845,22 +835,6 @@ punchOut-injective {suc n} {suc i} {zero} {zero} _ _ _ = refl punchOut-injective {suc n} {suc i} {suc j} {suc k} i≢j i≢k pⱼ≡pₖ = cong suc (punchOut-injective (i≢j ∘ cong suc) (i≢k ∘ cong suc) (suc-injective pⱼ≡pₖ)) -punchOut-mono-≤ : ∀ {i j k : Fin (suc n)} (i≢j : i ≢ j) (i≢k : i ≢ k) → - j ≤ k → punchOut i≢j ≤ punchOut i≢k -punchOut-mono-≤ {_ } {zero } {zero } {_ } 0≢0 _ z≤n = contradiction refl 0≢0 -punchOut-mono-≤ {_ } {zero } {suc _} {suc _} _ _ (s≤s j≤k) = j≤k -punchOut-mono-≤ {suc _} {suc _} {zero } {_ } _ _ z≤n = z≤n -punchOut-mono-≤ {suc _} {suc _} {suc _} {suc _} i≢j i≢k (s≤s j≤k) = s≤s (punchOut-mono-≤ (i≢j ∘ cong suc) (i≢k ∘ cong suc) j≤k) - -punchOut-cancel-≤ : ∀ {i j k : Fin (suc n)} (i≢j : i ≢ j) (i≢k : i ≢ k) → - punchOut i≢j ≤ punchOut i≢k → j ≤ k -punchOut-cancel-≤ {_ } {zero } {zero } {_ } 0≢0 _ _ = contradiction refl 0≢0 -punchOut-cancel-≤ {_ } {zero } {suc _} {zero } _ 0≢0 _ = contradiction refl 0≢0 -punchOut-cancel-≤ {suc _} {zero } {suc _} {suc _} _ _ pⱼ≤pₖ = s≤s pⱼ≤pₖ -punchOut-cancel-≤ {_ } {suc _} {zero } {_ } _ _ _ = z≤n -punchOut-cancel-≤ {suc _} {suc _} {suc _} {zero } _ _ () -punchOut-cancel-≤ {suc _} {suc _} {suc _} {suc _} i≢j i≢k (s≤s pⱼ≤pₖ) = s≤s (punchOut-cancel-≤ (i≢j ∘ cong suc) (i≢k ∘ cong suc) pⱼ≤pₖ) - punchIn-punchOut : ∀ {i j : Fin (suc n)} (i≢j : i ≢ j) → punchIn i (punchOut i≢j) ≡ j punchIn-punchOut {_} {zero} {zero} 0≢0 = contradiction refl 0≢0 From 6aea1751cbbbe3b6103116e6fcaf8652b2262264 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 14:44:40 +0100 Subject: [PATCH 020/316] Revert "opposite of a `Ring` [clean version of pr #1900] (#1910)" This reverts commit 7772dee7f74e35d398ac960a60633787ed716c4f. --- CHANGELOG.md | 35 ---- src/Algebra/Construct/Flip/Op.agda | 269 +++++------------------------ 2 files changed, 39 insertions(+), 265 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e9138f2585..fe243a6110 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1664,41 +1664,6 @@ Other minor changes moufangLoop : MoufangLoop a ℓ₁ → MoufangLoop b ℓ₂ → MoufangLoop (a ⊔ b) (ℓ₁ ⊔ ℓ₂) ``` -* Added new functions and proofs to `Algebra.Construct.Flip.Op`: - ```agda - zero : Zero ≈ ε ∙ → Zero ≈ ε (flip ∙) - distributes : (≈ DistributesOver ∙) + → (≈ DistributesOver (flip ∙)) + - isSemiringWithoutAnnihilatingZero : IsSemiringWithoutAnnihilatingZero + * 0# 1# → - IsSemiringWithoutAnnihilatingZero + (flip *) 0# 1# - isSemiring : IsSemiring + * 0# 1# → IsSemiring + (flip *) 0# 1# - isCommutativeSemiring : IsCommutativeSemiring + * 0# 1# → - IsCommutativeSemiring + (flip *) 0# 1# - isCancellativeCommutativeSemiring : IsCancellativeCommutativeSemiring + * 0# 1# → - IsCancellativeCommutativeSemiring + (flip *) 0# 1# - isIdempotentSemiring : IsIdempotentSemiring + * 0# 1# → - IsIdempotentSemiring + (flip *) 0# 1# - isQuasiring : IsQuasiring + * 0# 1# → IsQuasiring + (flip *) 0# 1# - isRingWithoutOne : IsRingWithoutOne + * - 0# → IsRingWithoutOne + (flip *) - 0# - isNonAssociativeRing : IsNonAssociativeRing + * - 0# 1# → - IsNonAssociativeRing + (flip *) - 0# 1# - isRing : IsRing ≈ + * - 0# 1# → IsRing ≈ + (flip *) - 0# 1# - isNearring : IsNearring + * 0# 1# - → IsNearring + (flip *) 0# 1# - - isCommutativeRing : IsCommutativeRing + * - 0# 1# → - IsCommutativeRing + (flip *) - 0# 1# - semiringWithoutAnnihilatingZero : SemiringWithoutAnnihilatingZero a ℓ → - SemiringWithoutAnnihilatingZero a ℓ - commutativeSemiring : CommutativeSemiring a ℓ → CommutativeSemiring a ℓ - cancellativeCommutativeSemiring : CancellativeCommutativeSemiring a ℓ → - CancellativeCommutativeSemiring a ℓ - idempotentSemiring : IdempotentSemiring a ℓ → IdempotentSemiring a ℓ - quasiring : Quasiring a ℓ → Quasiring a ℓ - ringWithoutOne : RingWithoutOne a ℓ → RingWithoutOne a ℓ - nonAssociativeRing : NonAssociativeRing a ℓ → NonAssociativeRing a ℓ - nearring : Nearring a ℓ → Nearring a ℓ - ring : Ring a ℓ → Ring a ℓ - commutativeRing : CommutativeRing a ℓ → CommutativeRing a ℓ - ``` - * Added new definition to `Algebra.Definitions`: ```agda SelfInverse : Op₁ A → Set _ diff --git a/src/Algebra/Construct/Flip/Op.agda b/src/Algebra/Construct/Flip/Op.agda index f5d86e7714..74ae5730bc 100644 --- a/src/Algebra/Construct/Flip/Op.agda +++ b/src/Algebra/Construct/Flip/Op.agda @@ -9,11 +9,7 @@ module Algebra.Construct.Flip.Op where -open import Algebra.Core -open import Algebra.Bundles -import Algebra.Definitions as Def -import Algebra.Structures as Str -import Algebra.Consequences.Setoid as Consequences +open import Algebra import Data.Product as Prod import Data.Sum as Sum open import Function.Base using (flip) @@ -37,272 +33,136 @@ preserves₂ : (∼ ≈ ≋ : Rel A ℓ) → ∙ Preserves₂ ∼ ⟶ ≈ ⟶ ≋ → (flip ∙) Preserves₂ ≈ ⟶ ∼ ⟶ ≋ preserves₂ _ _ _ pres = flip pres -module ∙-Properties (≈ : Rel A ℓ) (∙ : Op₂ A) where +module _ (≈ : Rel A ℓ) (∙ : Op₂ A) where - open Def ≈ - - associative : Symmetric ≈ → Associative ∙ → Associative (flip ∙) + associative : Symmetric ≈ → Associative ≈ ∙ → Associative ≈ (flip ∙) associative sym assoc x y z = sym (assoc z y x) - identity : Identity ε ∙ → Identity ε (flip ∙) + identity : Identity ≈ ε ∙ → Identity ≈ ε (flip ∙) identity id = Prod.swap id - commutative : Commutative ∙ → Commutative (flip ∙) + commutative : Commutative ≈ ∙ → Commutative ≈ (flip ∙) commutative comm = flip comm - selective : Selective ∙ → Selective (flip ∙) + selective : Selective ≈ ∙ → Selective ≈ (flip ∙) selective sel x y = Sum.swap (sel y x) - idempotent : Idempotent ∙ → Idempotent (flip ∙) + idempotent : Idempotent ≈ ∙ → Idempotent ≈ (flip ∙) idempotent idem = idem - inverse : Inverse ε ⁻¹ ∙ → Inverse ε ⁻¹ (flip ∙) + inverse : Inverse ≈ ε ⁻¹ ∙ → Inverse ≈ ε ⁻¹ (flip ∙) inverse inv = Prod.swap inv - zero : Zero ε ∙ → Zero ε (flip ∙) - zero zer = Prod.swap zer - -module *-Properties (≈ : Rel A ℓ) (* + : Op₂ A) where - - open Def ≈ - - distributes : * DistributesOver + → (flip *) DistributesOver + - distributes distrib = Prod.swap distrib - ------------------------------------------------------------------------ -- Structures module _ {≈ : Rel A ℓ} {∙ : Op₂ A} where - open Def ≈ - open Str ≈ - open ∙-Properties ≈ ∙ - - isMagma : IsMagma ∙ → IsMagma (flip ∙) + isMagma : IsMagma ≈ ∙ → IsMagma ≈ (flip ∙) isMagma m = record { isEquivalence = isEquivalence ; ∙-cong = preserves₂ ≈ ≈ ≈ ∙-cong } where open IsMagma m - isSelectiveMagma : IsSelectiveMagma ∙ → IsSelectiveMagma (flip ∙) + isSelectiveMagma : IsSelectiveMagma ≈ ∙ → IsSelectiveMagma ≈ (flip ∙) isSelectiveMagma m = record { isMagma = isMagma m.isMagma - ; sel = selective m.sel + ; sel = selective ≈ ∙ m.sel } where module m = IsSelectiveMagma m - isCommutativeMagma : IsCommutativeMagma ∙ → IsCommutativeMagma (flip ∙) + isCommutativeMagma : IsCommutativeMagma ≈ ∙ → IsCommutativeMagma ≈ (flip ∙) isCommutativeMagma m = record { isMagma = isMagma m.isMagma - ; comm = commutative m.comm + ; comm = commutative ≈ ∙ m.comm } where module m = IsCommutativeMagma m - isSemigroup : IsSemigroup ∙ → IsSemigroup (flip ∙) + isSemigroup : IsSemigroup ≈ ∙ → IsSemigroup ≈ (flip ∙) isSemigroup s = record { isMagma = isMagma s.isMagma - ; assoc = associative s.sym s.assoc + ; assoc = associative ≈ ∙ s.sym s.assoc } where module s = IsSemigroup s - isBand : IsBand ∙ → IsBand (flip ∙) + isBand : IsBand ≈ ∙ → IsBand ≈ (flip ∙) isBand b = record { isSemigroup = isSemigroup b.isSemigroup ; idem = b.idem } where module b = IsBand b - isCommutativeSemigroup : IsCommutativeSemigroup ∙ → - IsCommutativeSemigroup (flip ∙) + isCommutativeSemigroup : IsCommutativeSemigroup ≈ ∙ → + IsCommutativeSemigroup ≈ (flip ∙) isCommutativeSemigroup s = record { isSemigroup = isSemigroup s.isSemigroup - ; comm = commutative s.comm + ; comm = commutative ≈ ∙ s.comm } where module s = IsCommutativeSemigroup s - isUnitalMagma : IsUnitalMagma ∙ ε → IsUnitalMagma (flip ∙) ε + isUnitalMagma : IsUnitalMagma ≈ ∙ ε → IsUnitalMagma ≈ (flip ∙) ε isUnitalMagma m = record { isMagma = isMagma m.isMagma - ; identity = identity m.identity + ; identity = identity ≈ ∙ m.identity } where module m = IsUnitalMagma m - isMonoid : IsMonoid ∙ ε → IsMonoid (flip ∙) ε + isMonoid : IsMonoid ≈ ∙ ε → IsMonoid ≈ (flip ∙) ε isMonoid m = record { isSemigroup = isSemigroup m.isSemigroup - ; identity = identity m.identity + ; identity = identity ≈ ∙ m.identity } where module m = IsMonoid m - isCommutativeMonoid : IsCommutativeMonoid ∙ ε → - IsCommutativeMonoid (flip ∙) ε + isCommutativeMonoid : IsCommutativeMonoid ≈ ∙ ε → + IsCommutativeMonoid ≈ (flip ∙) ε isCommutativeMonoid m = record { isMonoid = isMonoid m.isMonoid - ; comm = commutative m.comm + ; comm = commutative ≈ ∙ m.comm } where module m = IsCommutativeMonoid m - isIdempotentCommutativeMonoid : IsIdempotentCommutativeMonoid ∙ ε → - IsIdempotentCommutativeMonoid (flip ∙) ε + isIdempotentCommutativeMonoid : IsIdempotentCommutativeMonoid ≈ ∙ ε → + IsIdempotentCommutativeMonoid ≈ (flip ∙) ε isIdempotentCommutativeMonoid m = record { isCommutativeMonoid = isCommutativeMonoid m.isCommutativeMonoid - ; idem = idempotent m.idem + ; idem = idempotent ≈ ∙ m.idem } where module m = IsIdempotentCommutativeMonoid m - isInvertibleMagma : IsInvertibleMagma ∙ ε ⁻¹ → - IsInvertibleMagma (flip ∙) ε ⁻¹ + isInvertibleMagma : IsInvertibleMagma ≈ ∙ ε ⁻¹ → + IsInvertibleMagma ≈ (flip ∙) ε ⁻¹ isInvertibleMagma m = record { isMagma = isMagma m.isMagma - ; inverse = inverse m.inverse + ; inverse = inverse ≈ ∙ m.inverse ; ⁻¹-cong = m.⁻¹-cong } where module m = IsInvertibleMagma m - isInvertibleUnitalMagma : IsInvertibleUnitalMagma ∙ ε ⁻¹ → - IsInvertibleUnitalMagma (flip ∙) ε ⁻¹ + isInvertibleUnitalMagma : IsInvertibleUnitalMagma ≈ ∙ ε ⁻¹ → + IsInvertibleUnitalMagma ≈ (flip ∙) ε ⁻¹ isInvertibleUnitalMagma m = record { isInvertibleMagma = isInvertibleMagma m.isInvertibleMagma - ; identity = identity m.identity + ; identity = identity ≈ ∙ m.identity } where module m = IsInvertibleUnitalMagma m - isGroup : IsGroup ∙ ε ⁻¹ → IsGroup (flip ∙) ε ⁻¹ + isGroup : IsGroup ≈ ∙ ε ⁻¹ → IsGroup ≈ (flip ∙) ε ⁻¹ isGroup g = record { isMonoid = isMonoid g.isMonoid - ; inverse = inverse g.inverse + ; inverse = inverse ≈ ∙ g.inverse ; ⁻¹-cong = g.⁻¹-cong } where module g = IsGroup g - isAbelianGroup : IsAbelianGroup ∙ ε ⁻¹ → IsAbelianGroup (flip ∙) ε ⁻¹ + isAbelianGroup : IsAbelianGroup ≈ ∙ ε ⁻¹ → IsAbelianGroup ≈ (flip ∙) ε ⁻¹ isAbelianGroup g = record { isGroup = isGroup g.isGroup - ; comm = commutative g.comm + ; comm = commutative ≈ ∙ g.comm } where module g = IsAbelianGroup g -module _ {≈ : Rel A ℓ} {+ * : Op₂ A} {0# 1# : A} where - - open Str ≈ - open ∙-Properties ≈ * - open *-Properties ≈ * + - - isSemiringWithoutAnnihilatingZero : IsSemiringWithoutAnnihilatingZero + * 0# 1# → - IsSemiringWithoutAnnihilatingZero + (flip *) 0# 1# - isSemiringWithoutAnnihilatingZero r = record - { +-isCommutativeMonoid = r.+-isCommutativeMonoid - ; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong - ; *-assoc = associative r.sym r.*-assoc - ; *-identity = identity r.*-identity - ; distrib = distributes r.distrib - } - where module r = IsSemiringWithoutAnnihilatingZero r - - isSemiring : IsSemiring + * 0# 1# → IsSemiring + (flip *) 0# 1# - isSemiring r = record - { isSemiringWithoutAnnihilatingZero = isSemiringWithoutAnnihilatingZero r.isSemiringWithoutAnnihilatingZero - ; zero = zero r.zero - } - where module r = IsSemiring r - - isCommutativeSemiring : IsCommutativeSemiring + * 0# 1# → - IsCommutativeSemiring + (flip *) 0# 1# - isCommutativeSemiring r = record - { isSemiring = isSemiring r.isSemiring - ; *-comm = commutative r.*-comm - } - where module r = IsCommutativeSemiring r - - isCancellativeCommutativeSemiring : IsCancellativeCommutativeSemiring + * 0# 1# → - IsCancellativeCommutativeSemiring + (flip *) 0# 1# - isCancellativeCommutativeSemiring r = record - { isCommutativeSemiring = isCommutativeSemiring r.isCommutativeSemiring - ; *-cancelˡ-nonZero = Consequences.comm+almostCancelˡ⇒almostCancelʳ r.setoid r.*-comm r.*-cancelˡ-nonZero - } - where module r = IsCancellativeCommutativeSemiring r - - isIdempotentSemiring : IsIdempotentSemiring + * 0# 1# → - IsIdempotentSemiring + (flip *) 0# 1# - isIdempotentSemiring r = record - { isSemiring = isSemiring r.isSemiring - ; +-idem = r.+-idem - } - where module r = IsIdempotentSemiring r - - isQuasiring : IsQuasiring + * 0# 1# → IsQuasiring + (flip *) 0# 1# - isQuasiring r = record - { +-isMonoid = r.+-isMonoid - ; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong - ; *-assoc = associative r.sym r.*-assoc - ; *-identity = identity r.*-identity - ; distrib = distributes r.distrib - ; zero = zero r.zero - } - where module r = IsQuasiring r - -module _ {≈ : Rel A ℓ} {+ * : Op₂ A} { - : Op₁ A} {0# : A} where - - open Str ≈ - open ∙-Properties ≈ * - open *-Properties ≈ * + - - isRingWithoutOne : IsRingWithoutOne + * - 0# → IsRingWithoutOne + (flip *) - 0# - isRingWithoutOne r = record - { +-isAbelianGroup = r.+-isAbelianGroup - ; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong - ; *-assoc = associative r.sym r.*-assoc - ; distrib = distributes r.distrib - ; zero = zero r.zero - } - where module r = IsRingWithoutOne r - -module _ {≈ : Rel A ℓ} {+ * : Op₂ A} { - : Op₁ A} {0# 1# : A} where - - open Str ≈ - open ∙-Properties ≈ * - open *-Properties ≈ * + - - isNonAssociativeRing : IsNonAssociativeRing + * - 0# 1# → - IsNonAssociativeRing + (flip *) - 0# 1# - isNonAssociativeRing r = record - { +-isAbelianGroup = r.+-isAbelianGroup - ; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong - ; identity = identity r.identity - ; distrib = distributes r.distrib - ; zero = zero r.zero - } - where module r = IsNonAssociativeRing r - - isNearring : IsNearring + * 0# 1# - → IsNearring + (flip *) 0# 1# - - isNearring r = record - { isQuasiring = isQuasiring r.isQuasiring - ; +-inverse = r.+-inverse - ; ⁻¹-cong = r.⁻¹-cong - } - where module r = IsNearring r - - isRing : IsRing + * - 0# 1# → IsRing + (flip *) - 0# 1# - isRing r = record - { +-isAbelianGroup = r.+-isAbelianGroup - ; *-cong = preserves₂ ≈ ≈ ≈ r.*-cong - ; *-assoc = associative r.sym r.*-assoc - ; *-identity = identity r.*-identity - ; distrib = distributes r.distrib - ; zero = zero r.zero - } - where module r = IsRing r - - isCommutativeRing : IsCommutativeRing + * - 0# 1# → - IsCommutativeRing + (flip *) - 0# 1# - isCommutativeRing r = record - { isRing = isRing r.isRing - ; *-comm = commutative r.*-comm - } - where module r = IsCommutativeRing r - - ------------------------------------------------------------------------ -- Bundles @@ -379,54 +239,3 @@ group g = record { isGroup = isGroup g.isGroup } abelianGroup : AbelianGroup a ℓ → AbelianGroup a ℓ abelianGroup g = record { isAbelianGroup = isAbelianGroup g.isAbelianGroup } where module g = AbelianGroup g - -semiringWithoutAnnihilatingZero : SemiringWithoutAnnihilatingZero a ℓ → - SemiringWithoutAnnihilatingZero a ℓ -semiringWithoutAnnihilatingZero r = record - { isSemiringWithoutAnnihilatingZero = isSemiringWithoutAnnihilatingZero r.isSemiringWithoutAnnihilatingZero } - where module r = SemiringWithoutAnnihilatingZero r - -semiring : Semiring a ℓ → Semiring a ℓ -semiring r = record { isSemiring = isSemiring r.isSemiring } - where module r = Semiring r - -commutativeSemiring : CommutativeSemiring a ℓ → CommutativeSemiring a ℓ -commutativeSemiring r = record - { isCommutativeSemiring = isCommutativeSemiring r.isCommutativeSemiring } - where module r = CommutativeSemiring r - -cancellativeCommutativeSemiring : CancellativeCommutativeSemiring a ℓ → - CancellativeCommutativeSemiring a ℓ -cancellativeCommutativeSemiring r = record - { isCancellativeCommutativeSemiring = isCancellativeCommutativeSemiring r.isCancellativeCommutativeSemiring } - where module r = CancellativeCommutativeSemiring r - -idempotentSemiring : IdempotentSemiring a ℓ → IdempotentSemiring a ℓ -idempotentSemiring r = record - { isIdempotentSemiring = isIdempotentSemiring r.isIdempotentSemiring } - where module r = IdempotentSemiring r - -quasiring : Quasiring a ℓ → Quasiring a ℓ -quasiring r = record { isQuasiring = isQuasiring r.isQuasiring } - where module r = Quasiring r - -ringWithoutOne : RingWithoutOne a ℓ → RingWithoutOne a ℓ -ringWithoutOne r = record { isRingWithoutOne = isRingWithoutOne r.isRingWithoutOne } - where module r = RingWithoutOne r - -nonAssociativeRing : NonAssociativeRing a ℓ → NonAssociativeRing a ℓ -nonAssociativeRing r = record - { isNonAssociativeRing = isNonAssociativeRing r.isNonAssociativeRing } - where module r = NonAssociativeRing r - -nearring : Nearring a ℓ → Nearring a ℓ -nearring r = record { isNearring = isNearring r.isNearring } - where module r = Nearring r - -ring : Ring a ℓ → Ring a ℓ -ring r = record { isRing = isRing r.isRing } - where module r = Ring r - -commutativeRing : CommutativeRing a ℓ → CommutativeRing a ℓ -commutativeRing r = record { isCommutativeRing = isCommutativeRing r.isCommutativeRing } - where module r = CommutativeRing r From 2f1ff01f6738cd67015fb524c9fad04aa1e383a3 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 14:45:31 +0100 Subject: [PATCH 021/316] Revert "Wellfounded proof for sum relations (#1920)" This reverts commit da073f1719cd14b36d0568544219310a998d267c. --- CHANGELOG.md | 9 --------- src/Data/Sum/Relation/Binary/LeftOrder.agda | 15 --------------- src/Data/Sum/Relation/Binary/Pointwise.agda | 14 -------------- 3 files changed, 38 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fe243a6110..76ca38cd42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2291,15 +2291,6 @@ Other minor changes map f (map g h) ∘ assocʳ ≗ assocʳ ∘ map (map f g) h ``` -* Adden new proof in `Data.Sum.Relation.Binary.LeftOrder` : - ``` - ⊎-<-wellFounded : WellFounded ∼₁ → WellFounded ∼₂ → WellFounded (∼₁ ⊎-< ∼₂) - ``` -* Adden new proof in `Data.Sum.Relation.Binary.Pointwise` : - ``` - ⊎-wellFounded : WellFounded ∼₁ → WellFounded ∼₂ → WellFounded (Pointwise ∼₁ ∼₂) - ``` - * Made `Map` public in `Data.Tree.AVL.IndexedMap` * Added new definitions in `Data.Vec.Base`: diff --git a/src/Data/Sum/Relation/Binary/LeftOrder.agda b/src/Data/Sum/Relation/Binary/LeftOrder.agda index a5d0327af2..063ba49bb7 100644 --- a/src/Data/Sum/Relation/Binary/LeftOrder.agda +++ b/src/Data/Sum/Relation/Binary/LeftOrder.agda @@ -14,7 +14,6 @@ open import Data.Sum.Relation.Binary.Pointwise as PW open import Data.Product open import Data.Empty open import Function -open import Induction.WellFounded open import Level open import Relation.Nullary import Relation.Nullary.Decidable as Dec @@ -79,20 +78,6 @@ module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} ⊎-<-decidable dec₁ dec₂ (inj₂ x) (inj₁ y) = no λ() ⊎-<-decidable dec₁ dec₂ (inj₂ x) (inj₂ y) = Dec.map′ ₂∼₂ drop-inj₂ (dec₂ x y) - ⊎-<-wellFounded : WellFounded ∼₁ → WellFounded ∼₂ → WellFounded (∼₁ ⊎-< ∼₂) - ⊎-<-wellFounded wf₁ wf₂ x = acc (⊎-<-acc x) - where - ⊎-<-acc₁ : ∀ {x} → Acc ∼₁ x → WfRec (∼₁ ⊎-< ∼₂) (Acc (∼₁ ⊎-< ∼₂)) (inj₁ x) - ⊎-<-acc₁ (acc rec) (inj₁ y) (₁∼₁ x∼₁y) = acc (⊎-<-acc₁ (rec y x∼₁y)) - - ⊎-<-acc₂ : ∀ {x} → Acc ∼₂ x → WfRec (∼₁ ⊎-< ∼₂) (Acc (∼₁ ⊎-< ∼₂)) (inj₂ x) - ⊎-<-acc₂ (acc rec) (inj₁ y) ₁∼₂ = acc (⊎-<-acc₁ (wf₁ y)) - ⊎-<-acc₂ (acc rec) (inj₂ y) (₂∼₂ x∼₂y) = acc (⊎-<-acc₂ (rec y x∼₂y)) - - ⊎-<-acc : ∀ x → WfRec (∼₁ ⊎-< ∼₂) (Acc (∼₁ ⊎-< ∼₂)) x - ⊎-<-acc (inj₁ x) = ⊎-<-acc₁ (wf₁ x) - ⊎-<-acc (inj₂ x) = ⊎-<-acc₂ (wf₂ x) - module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} {ℓ₁ ℓ₂} {∼₁ : Rel A₁ ℓ₁} {≈₁ : Rel A₁ ℓ₂} {ℓ₃ ℓ₄} {∼₂ : Rel A₂ ℓ₃} {≈₂ : Rel A₂ ℓ₄} diff --git a/src/Data/Sum/Relation/Binary/Pointwise.agda b/src/Data/Sum/Relation/Binary/Pointwise.agda index ac196828c6..d5ec85b943 100644 --- a/src/Data/Sum/Relation/Binary/Pointwise.agda +++ b/src/Data/Sum/Relation/Binary/Pointwise.agda @@ -11,7 +11,6 @@ module Data.Sum.Relation.Binary.Pointwise where open import Data.Product using (_,_) open import Data.Sum.Base as Sum open import Data.Sum.Properties -open import Induction.WellFounded open import Level using (_⊔_) open import Function.Base using (_∘_; id) open import Function.Inverse using (Inverse) @@ -75,19 +74,6 @@ module _ {a₁ a₂ ℓ₁ ℓ₂} {A₁ : Set a₁} {A₂ : Set a₂} ⊎-decidable _≟₁_ _≟₂_ (inj₂ x) (inj₁ y) = no λ() ⊎-decidable _≟₁_ _≟₂_ (inj₂ x) (inj₂ y) = Dec.map′ inj₂ drop-inj₂ (x ≟₂ y) - ⊎-wellFounded : WellFounded ∼₁ → WellFounded ∼₂ → WellFounded (Pointwise ∼₁ ∼₂) - ⊎-wellFounded wf₁ wf₂ x = acc (⊎-acc x) - where - ⊎-acc₁ : ∀ {x} → Acc ∼₁ x → WfRec (Pointwise ∼₁ ∼₂) (Acc (Pointwise ∼₁ ∼₂)) (inj₁ x) - ⊎-acc₁ (acc rec) (inj₁ y) (inj₁ x∼₁y) = acc (⊎-acc₁ (rec y x∼₁y)) - - ⊎-acc₂ : ∀ {x} → Acc ∼₂ x → WfRec (Pointwise ∼₁ ∼₂) (Acc (Pointwise ∼₁ ∼₂)) (inj₂ x) - ⊎-acc₂ (acc rec) (inj₂ y) (inj₂ x∼₂y) = acc (⊎-acc₂ (rec y x∼₂y)) - ⊎-acc : ∀ x → WfRec (Pointwise ∼₁ ∼₂) (Acc (Pointwise ∼₁ ∼₂)) x - - ⊎-acc (inj₁ x) = ⊎-acc₁ (wf₁ x) - ⊎-acc (inj₂ x) = ⊎-acc₂ (wf₂ x) - module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} {ℓ₁ ℓ₂} {∼₁ : Rel A₁ ℓ₁} {≈₁ : Rel A₁ ℓ₂} {ℓ₃ ℓ₄} {∼₂ : Rel A₂ ℓ₃} {≈₂ : Rel A₂ ℓ₄} where From 3f7c5ebc3e4f0737e6aeae896c080c57d3b45f68 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 15:00:25 +0100 Subject: [PATCH 022/316] Revert "moved lemma" This reverts commit 9e7e36cc26a805fa4638a92bcdb883dd8c3a63a8. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ca38cd42..2f03afa471 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2097,6 +2097,11 @@ Other minor changes nCk+nC[k+1]≡[n+1]C[k+1] : n C k + n C (suc k) ≡ suc n C suc k ``` +* Added new proofs in `Data.Nat.Combinatorics.Specification`: + ```agda + k![n∸k]!∣n! : k ≤ n → k ! * (n ∸ k) ! ∣ n ! + ``` + * Added new proofs in `Data.Nat.DivMod`: ```agda m%n≤n : .{{_ : NonZero n}} → m % n ≤ n From f839326ac7745e3858c77229927b878f41682b26 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 15:01:24 +0100 Subject: [PATCH 023/316] hopefully fixed now --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f03afa471..76ca38cd42 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2097,11 +2097,6 @@ Other minor changes nCk+nC[k+1]≡[n+1]C[k+1] : n C k + n C (suc k) ≡ suc n C suc k ``` -* Added new proofs in `Data.Nat.Combinatorics.Specification`: - ```agda - k![n∸k]!∣n! : k ≤ n → k ! * (n ∸ k) ! ∣ n ! - ``` - * Added new proofs in `Data.Nat.DivMod`: ```agda m%n≤n : .{{_ : NonZero n}} → m % n ≤ n From 2231b25a8887c060d4181f9624e9fda99650589e Mon Sep 17 00:00:00 2001 From: James McKinna Date: Mon, 17 Apr 2023 15:21:48 +0100 Subject: [PATCH 024/316] recommitted the whitespace change; tree should be clean now? --- CHANGELOG/v1.7.2.md | 2 +- src/Data/List/Membership/Setoid/Properties.agda | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG/v1.7.2.md b/CHANGELOG/v1.7.2.md index 0183ec654f..8ddea63b4d 100644 --- a/CHANGELOG/v1.7.2.md +++ b/CHANGELOG/v1.7.2.md @@ -5,5 +5,5 @@ The library has been tested using Agda 2.6.3. * In accordance with changes to the flags in Agda 2.6.3, all modules that previously used the `--without-K` flag now use the `--cubical-compatible` flag instead. - + * Updated the code using `primFloatToWord64` - the library API has remained unchanged. diff --git a/src/Data/List/Membership/Setoid/Properties.agda b/src/Data/List/Membership/Setoid/Properties.agda index df260f2a17..919bf19ba6 100644 --- a/src/Data/List/Membership/Setoid/Properties.agda +++ b/src/Data/List/Membership/Setoid/Properties.agda @@ -122,7 +122,7 @@ module _ (S : Setoid c ℓ) where length (mapWith∈ xs f) ≡ length xs length-mapWith∈ [] = P.refl length-mapWith∈ (x ∷ xs) = P.cong suc (length-mapWith∈ xs) - + mapWith∈-id : ∀ xs → mapWith∈ xs (λ {x} _ → x) ≡ xs mapWith∈-id [] = P.refl mapWith∈-id (x ∷ xs) = P.cong (x ∷_) (mapWith∈-id xs) From 4f52e121163b6a285f6362174ca492cc52908d6e Mon Sep 17 00:00:00 2001 From: James McKinna Date: Tue, 18 Apr 2023 15:46:36 +0100 Subject: [PATCH 025/316] removed redundant use of `with` --- src/Algebra/Consequences/Base.agda | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/Algebra/Consequences/Base.agda b/src/Algebra/Consequences/Base.agda index 1a3e105604..446a82d868 100644 --- a/src/Algebra/Consequences/Base.agda +++ b/src/Algebra/Consequences/Base.agda @@ -19,9 +19,7 @@ open import Relation.Binary.Definitions using (Reflexive) module _ {ℓ} {_•_ : Op₂ A} (_≈_ : Rel A ℓ) where sel⇒idem : Selective _≈_ _•_ → Idempotent _≈_ _•_ - sel⇒idem sel x with sel x x - ... | inj₁ x•x≈x = x•x≈x - ... | inj₂ x•x≈x = x•x≈x + sel⇒idem sel x = reduce (sel x x) module _ {ℓ} {f : Op₁ A} (_≈_ : Rel A ℓ) where From 5d056c1f02e41426bdb7ae41a4aa08397bc82eb6 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Thu, 20 Apr 2023 17:46:55 +0100 Subject: [PATCH 026/316] some additional simplifications --- src/Data/List/Properties.agda | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index e9ddbe6387..7592e39478 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -497,8 +497,8 @@ module _ {P : Pred A p} {f : A → A → A} where foldr-forcesᵇ : (∀ x y → P (f x y) → P x × P y) → ∀ e xs → P (foldr f e xs) → All P xs foldr-forcesᵇ _ _ [] _ = [] - foldr-forcesᵇ forces _ (x ∷ xs) Pfold with forces _ _ Pfold - ... | (px , pfxs) = px ∷ foldr-forcesᵇ forces _ xs pfxs + foldr-forcesᵇ forces _ (x ∷ xs) Pfold = + let px , pfxs = forces _ _ Pfold in px ∷ foldr-forcesᵇ forces _ xs pfxs foldr-preservesᵇ : (∀ {x y} → P x → P y → P (f x y)) → ∀ {e xs} → P e → All P xs → P (foldr f e xs) @@ -627,11 +627,10 @@ scanr-defn : ∀ (f : A → B → B) (e : B) → scanr f e ≗ map (foldr f e) ∘ tails scanr-defn f e [] = refl scanr-defn f e (x ∷ []) = refl -scanr-defn f e (x ∷ y ∷ xs) - with scanr f e (y ∷ xs) | scanr-defn f e (y ∷ xs) -... | [] | () -... | z ∷ zs | eq with ∷-injective eq -... | z≡fy⦇f⦈xs , _ = cong₂ (λ z → f x z ∷_) z≡fy⦇f⦈xs eq +scanr-defn f e (x ∷ y∷xs@(_ ∷ _)) + with eq ← scanr-defn f e y∷xs + with z ∷ zs ← scanr f e y∷xs + = let z≡fy⦇f⦈xs , _ = ∷-injective eq in cong₂ (λ z → f x z ∷_) z≡fy⦇f⦈xs eq ------------------------------------------------------------------------ -- scanl @@ -778,8 +777,7 @@ take++drop (suc n) (x ∷ xs) = cong (x ∷_) (take++drop n xs) splitAt-defn : ∀ n → splitAt {A = A} n ≗ < take n , drop n > splitAt-defn zero xs = refl splitAt-defn (suc n) [] = refl -splitAt-defn (suc n) (x ∷ xs) with splitAt n xs | splitAt-defn n xs -... | (ys , zs) | ih = cong (Prod.map (x ∷_) id) ih +splitAt-defn (suc n) (x ∷ xs) = cong (Prod.map (x ∷_) id) (splitAt-defn n xs) ------------------------------------------------------------------------ -- takeWhile, dropWhile, and span @@ -912,9 +910,9 @@ module _ {P : Pred A p} (P? : Decidable P) where length-partition : ∀ xs → (let (ys , zs) = partition P? xs) → length ys ≤ length xs × length zs ≤ length xs length-partition [] = z≤n , z≤n - length-partition (x ∷ xs) with does (P? x) | length-partition xs - ... | true | rec = Prod.map s≤s m≤n⇒m≤1+n rec - ... | false | rec = Prod.map m≤n⇒m≤1+n s≤s rec + length-partition (x ∷ xs) with does (P? x) + ... | true = Prod.map s≤s m≤n⇒m≤1+n (length-partition xs) + ... | false = Prod.map m≤n⇒m≤1+n s≤s (length-partition xs) ------------------------------------------------------------------------ -- _ʳ++_ From 719a50f9dc0646a584cbcf4396f3996877e9671a Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sat, 22 Apr 2023 14:15:27 +0100 Subject: [PATCH 027/316] half of the adjunction --- src/Data/Nat/Properties.agda | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 3d38c77d07..b5f5f45738 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1473,9 +1473,21 @@ pred[m∸n]≡m∸[1+n] (suc m) zero = refl pred[m∸n]≡m∸[1+n] zero (suc n) = refl pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n +------------------------------------------------------------------------ +-- Properties of _∸_ and suc + +m≤n⇒[1+m]m∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) +m≤n⇒[1+m]m∸n≡1+[m∸n] z≤n = refl +m≤n⇒[1+m]m∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]m∸n≡1+[m∸n] le = refl + ------------------------------------------------------------------------ -- Properties of _∸_ and _≤_/_<_ +m+n≤p⇒m≤p∸n : ∀ m n p → m + n ≤ p → m ≤ p ∸ n +m+n≤p⇒m≤p∸n zero n p le = z≤n +m+n≤p⇒m≤p∸n (suc m) n (suc p) (s≤s le) + rewrite m≤n⇒[1+m]m∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) + m∸n≤m : ∀ m n → m ∸ n ≤ m m∸n≤m n zero = ≤-refl m∸n≤m zero (suc n) = ≤-refl From 80ac1bca7cc27084c7a93857c870042859e6ba42 Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sat, 22 Apr 2023 17:50:00 +0100 Subject: [PATCH 028/316] other half of the adjunction; NB side condition --- src/Data/Nat/Base.agda | 2 +- src/Data/Nat/Properties.agda | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/Data/Nat/Base.agda b/src/Data/Nat/Base.agda index 1e2db666b8..3c10279aab 100644 --- a/src/Data/Nat/Base.agda +++ b/src/Data/Nat/Base.agda @@ -123,7 +123,7 @@ instance -- Arithmetic open import Agda.Builtin.Nat public - using (_+_; _*_) renaming (_-_ to _∸_) + using (_+_; _*_) renaming (_-_ to _∸_) open import Agda.Builtin.Nat using (div-helper; mod-helper) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index b5f5f45738..347dc69c7f 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1474,11 +1474,15 @@ pred[m∸n]≡m∸[1+n] zero (suc n) = refl pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n ------------------------------------------------------------------------ --- Properties of _∸_ and suc +-- Properties of _∸_ and zero, suc -m≤n⇒[1+m]m∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) -m≤n⇒[1+m]m∸n≡1+[m∸n] z≤n = refl -m≤n⇒[1+m]m∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]m∸n≡1+[m∸n] le = refl +0∸n≡n : ∀ n → 0 ∸ n ≡ 0 +0∸n≡n zero = refl +0∸n≡n (suc _) = refl + +m≤n⇒[1+m]∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) +m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl +m≤n⇒[1+m]∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] le = refl ------------------------------------------------------------------------ -- Properties of _∸_ and _≤_/_<_ @@ -1486,7 +1490,11 @@ m≤n⇒[1+m]m∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]m∸n≡1+[m∸n] m+n≤p⇒m≤p∸n : ∀ m n p → m + n ≤ p → m ≤ p ∸ n m+n≤p⇒m≤p∸n zero n p le = z≤n m+n≤p⇒m≤p∸n (suc m) n (suc p) (s≤s le) - rewrite m≤n⇒[1+m]m∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) + rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) + +m≤p∸n⇒m+n≤p : ∀ m {n p} (n≤p : n ≤ p) → m ≤ p ∸ n → m + n ≤ p +m≤p∸n⇒m+n≤p m z≤n le rewrite +-identityʳ m = le +m≤p∸n⇒m+n≤p m {suc n} (s≤s n≤p) le rewrite +-suc m n = s≤s (m≤p∸n⇒m+n≤p m n≤p le) m∸n≤m : ∀ m n → m ∸ n ≤ m m∸n≤m n zero = ≤-refl From e73e5f77ca99598fff916cb75e552a1db1878b04 Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sun, 23 Apr 2023 10:00:16 +0100 Subject: [PATCH 029/316] `CHANGELOG` --- CHANGELOG.md | 4 ++++ src/Data/Nat/Properties.agda | 15 ++++----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 76ca38cd42..44c565b327 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2044,6 +2044,10 @@ Other minor changes <⇒<′ : m < n → m <′ n <′⇒< : m <′ n → m < n + m≤n⇒[1+m]∸n≡1+[m∸n] : m ≤ n → suc n ∸ m ≡ suc (n ∸ m) + m+n≤p⇒m≤p∸n : m + n ≤ p → m ≤ p ∸ n + m≤p∸n⇒m+n≤p : n ≤ p → m ≤ p ∸ n → m + n ≤ p + 1≤n! : 1 ≤ n ! _!≢0 : NonZero (n !) _!*_!≢0 : NonZero (m ! * n !) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 347dc69c7f..47d8ab04ab 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1464,6 +1464,10 @@ n∸n≡0 : ∀ n → n ∸ n ≡ 0 n∸n≡0 zero = refl n∸n≡0 (suc n) = n∸n≡0 n +m≤n⇒[1+m]∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) +m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl +m≤n⇒[1+m]∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] le = refl + ------------------------------------------------------------------------ -- Properties of _∸_ and pred @@ -1473,17 +1477,6 @@ pred[m∸n]≡m∸[1+n] (suc m) zero = refl pred[m∸n]≡m∸[1+n] zero (suc n) = refl pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n ------------------------------------------------------------------------- --- Properties of _∸_ and zero, suc - -0∸n≡n : ∀ n → 0 ∸ n ≡ 0 -0∸n≡n zero = refl -0∸n≡n (suc _) = refl - -m≤n⇒[1+m]∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) -m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl -m≤n⇒[1+m]∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] le = refl - ------------------------------------------------------------------------ -- Properties of _∸_ and _≤_/_<_ From b182f63e81e6cfbe70dc5e34145d259c446a5d24 Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sun, 23 Apr 2023 19:24:22 +0100 Subject: [PATCH 030/316] irrefutable `with` bindings for recursive calls/inductive hypotheses --- src/Data/List/Properties.agda | 52 +++++++++++++++++------------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index 7592e39478..d4008fce07 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -130,15 +130,15 @@ module _ (f : A → Maybe B) where mapMaybe-concatMap : mapMaybe f ≗ concatMap (fromMaybe ∘ f) mapMaybe-concatMap [] = refl - mapMaybe-concatMap (x ∷ xs) with f x - ... | just y = cong (y ∷_) (mapMaybe-concatMap xs) - ... | nothing = mapMaybe-concatMap xs + mapMaybe-concatMap (x ∷ xs) with ih ← mapMaybe-concatMap xs | f x + ... | just y = cong (y ∷_) ih + ... | nothing = ih length-mapMaybe : ∀ xs → length (mapMaybe f xs) ≤ length xs length-mapMaybe [] = z≤n - length-mapMaybe (x ∷ xs) with f x - ... | just y = s≤s (length-mapMaybe xs) - ... | nothing = m≤n⇒m≤1+n (length-mapMaybe xs) + length-mapMaybe (x ∷ xs) with ih ← length-mapMaybe xs | f x + ... | just y = s≤s ih + ... | nothing = m≤n⇒m≤1+n ih ------------------------------------------------------------------------ -- _++_ @@ -803,9 +803,9 @@ module _ {P : Pred A p} (P? : Decidable P) where length-filter : ∀ xs → length (filter P? xs) ≤ length xs length-filter [] = z≤n - length-filter (x ∷ xs) with does (P? x) - ... | false = m≤n⇒m≤1+n (length-filter xs) - ... | true = s≤s (length-filter xs) + length-filter (x ∷ xs) with ih ← length-filter xs | does (P? x) + ... | false = m≤n⇒m≤1+n ih + ... | true = s≤s ih filter-all : ∀ {xs} → All P xs → filter P? xs ≡ xs filter-all {[]} [] = refl @@ -817,9 +817,9 @@ module _ {P : Pred A p} (P? : Decidable P) where filter-notAll (x ∷ xs) (here ¬px) with P? x ... | false because _ = s≤s (length-filter xs) ... | yes px = contradiction px ¬px - filter-notAll (x ∷ xs) (there any) with does (P? x) - ... | false = m≤n⇒m≤1+n (filter-notAll xs any) - ... | true = s≤s (filter-notAll xs any) + filter-notAll (x ∷ xs) (there any) with ih ← filter-notAll xs any | does (P? x) + ... | false = m≤n⇒m≤1+n ih + ... | true = s≤s ih filter-some : ∀ {xs} → Any P xs → 0 < length (filter P? xs) filter-some {x ∷ xs} (here px) with P? x @@ -860,9 +860,9 @@ module _ {P : Pred A p} (P? : Decidable P) where filter-++ : ∀ xs ys → filter P? (xs ++ ys) ≡ filter P? xs ++ filter P? ys filter-++ [] ys = refl - filter-++ (x ∷ xs) ys with does (P? x) - ... | true = cong (x ∷_) (filter-++ xs ys) - ... | false = filter-++ xs ys + filter-++ (x ∷ xs) ys with ih ← filter-++ xs ys | does (P? x) + ... | true = cong (x ∷_) ih + ... | false = ih ------------------------------------------------------------------------ -- derun and deduplicate @@ -872,9 +872,9 @@ module _ {R : Rel A p} (R? : B.Decidable R) where length-derun : ∀ xs → length (derun R? xs) ≤ length xs length-derun [] = ≤-refl length-derun (x ∷ []) = ≤-refl - length-derun (x ∷ y ∷ xs) with does (R? x y) | length-derun (y ∷ xs) - ... | true | r = m≤n⇒m≤1+n r - ... | false | r = s≤s r + length-derun (x ∷ y ∷ xs) with ih ← length-derun (y ∷ xs) | does (R? x y) + ... | true = m≤n⇒m≤1+n ih + ... | false = s≤s ih length-deduplicate : ∀ xs → length (deduplicate R? xs) ≤ length xs length-deduplicate [] = z≤n @@ -903,16 +903,16 @@ module _ {P : Pred A p} (P? : Decidable P) where partition-defn : partition P? ≗ < filter P? , filter (∁? P?) > partition-defn [] = refl - partition-defn (x ∷ xs) with does (P? x) - ... | true = cong (Prod.map (x ∷_) id) (partition-defn xs) - ... | false = cong (Prod.map id (x ∷_)) (partition-defn xs) + partition-defn (x ∷ xs) with ih ← partition-defn xs | does (P? x) + ... | true = cong (Prod.map (x ∷_) id) ih + ... | false = cong (Prod.map id (x ∷_)) ih length-partition : ∀ xs → (let (ys , zs) = partition P? xs) → length ys ≤ length xs × length zs ≤ length xs length-partition [] = z≤n , z≤n - length-partition (x ∷ xs) with does (P? x) - ... | true = Prod.map s≤s m≤n⇒m≤1+n (length-partition xs) - ... | false = Prod.map m≤n⇒m≤1+n s≤s (length-partition xs) + length-partition (x ∷ xs) with ih ← length-partition xs | does (P? x) + ... | true = Prod.map s≤s m≤n⇒m≤1+n ih + ... | false = Prod.map m≤n⇒m≤1+n s≤s ih ------------------------------------------------------------------------ -- _ʳ++_ @@ -1061,8 +1061,8 @@ module _ {x y : A} where ∷ʳ-injective : ∀ xs ys → xs ∷ʳ x ≡ ys ∷ʳ y → xs ≡ ys × x ≡ y ∷ʳ-injective [] [] refl = (refl , refl) - ∷ʳ-injective (x ∷ xs) (y ∷ ys) eq with ∷-injective eq - ... | refl , eq′ = Prod.map (cong (x ∷_)) id (∷ʳ-injective xs ys eq′) + ∷ʳ-injective (x ∷ xs) (y ∷ ys) eq with refl , eq′ ← ∷-injective eq + = Prod.map (cong (x ∷_)) id (∷ʳ-injective xs ys eq′) ∷ʳ-injective [] (_ ∷ _ ∷ _) () ∷ʳ-injective (_ ∷ _ ∷ _) [] () From 160e8420f3029a4d224e651cc098f00b998276f9 Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sun, 23 Apr 2023 19:58:19 +0100 Subject: [PATCH 031/316] fix whitespace --- src/Data/Nat/Base.agda | 2 +- src/Data/Nat/Properties.agda | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Nat/Base.agda b/src/Data/Nat/Base.agda index 3c10279aab..1e2db666b8 100644 --- a/src/Data/Nat/Base.agda +++ b/src/Data/Nat/Base.agda @@ -123,7 +123,7 @@ instance -- Arithmetic open import Agda.Builtin.Nat public - using (_+_; _*_) renaming (_-_ to _∸_) + using (_+_; _*_) renaming (_-_ to _∸_) open import Agda.Builtin.Nat using (div-helper; mod-helper) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 47d8ab04ab..e6d1c24a74 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1481,7 +1481,7 @@ pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n -- Properties of _∸_ and _≤_/_<_ m+n≤p⇒m≤p∸n : ∀ m n p → m + n ≤ p → m ≤ p ∸ n -m+n≤p⇒m≤p∸n zero n p le = z≤n +m+n≤p⇒m≤p∸n zero n p le = z≤n m+n≤p⇒m≤p∸n (suc m) n (suc p) (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) From c7b6031f27fcbd3928e6a010a7325f5559da5023 Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Sun, 23 Apr 2023 20:00:36 +0100 Subject: [PATCH 032/316] more whitespace fixes --- src/Data/Nat/Properties.agda | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index e6d1c24a74..a164931e7c 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1465,7 +1465,7 @@ n∸n≡0 zero = refl n∸n≡0 (suc n) = n∸n≡0 n m≤n⇒[1+m]∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) -m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl +m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl m≤n⇒[1+m]∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] le = refl ------------------------------------------------------------------------ @@ -1481,7 +1481,7 @@ pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n -- Properties of _∸_ and _≤_/_<_ m+n≤p⇒m≤p∸n : ∀ m n p → m + n ≤ p → m ≤ p ∸ n -m+n≤p⇒m≤p∸n zero n p le = z≤n +m+n≤p⇒m≤p∸n zero n p le = z≤n m+n≤p⇒m≤p∸n (suc m) n (suc p) (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) From c05de5721a12fa40aab11af25531d6decb2afcef Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Mon, 24 Apr 2023 08:18:10 +0100 Subject: [PATCH 033/316] corrected `p` -> `o` --- src/Data/Nat/Properties.agda | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index a164931e7c..93c8712eb5 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1480,14 +1480,14 @@ pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n ------------------------------------------------------------------------ -- Properties of _∸_ and _≤_/_<_ -m+n≤p⇒m≤p∸n : ∀ m n p → m + n ≤ p → m ≤ p ∸ n -m+n≤p⇒m≤p∸n zero n p le = z≤n -m+n≤p⇒m≤p∸n (suc m) n (suc p) (s≤s le) - rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤p⇒m≤p∸n m n p le) - -m≤p∸n⇒m+n≤p : ∀ m {n p} (n≤p : n ≤ p) → m ≤ p ∸ n → m + n ≤ p -m≤p∸n⇒m+n≤p m z≤n le rewrite +-identityʳ m = le -m≤p∸n⇒m+n≤p m {suc n} (s≤s n≤p) le rewrite +-suc m n = s≤s (m≤p∸n⇒m+n≤p m n≤p le) +m+n≤o⇒m≤o∸n : ∀ m n o → m + n ≤ o → m ≤ o ∸ n +m+n≤o⇒m≤o∸n zero n o le = z≤n +m+n≤o⇒m≤o∸n (suc m) n (suc o) (s≤s le) + rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤o⇒m≤o∸n m n o le) + +m≤o∸n⇒m+n≤o : ∀ m {n o} (n≤o : n ≤ o) → m ≤ o ∸ n → m + n ≤ o +m≤o∸n⇒m+n≤o m z≤n le rewrite +-identityʳ m = le +m≤o∸n⇒m+n≤o m {suc n} (s≤s n≤o) le rewrite +-suc m n = s≤s (m≤o∸n⇒m+n≤o m n≤o le) m∸n≤m : ∀ m n → m ∸ n ≤ m m∸n≤m n zero = ≤-refl From 4dbf96dca7cf0d1645cd78e6a5ae69a5b562da0b Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Mon, 24 Apr 2023 11:08:49 +0100 Subject: [PATCH 034/316] removed redudant additional lemma; relocated adjointness proofs --- src/Data/Nat/Properties.agda | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 93c8712eb5..6ff1b1f38b 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1464,10 +1464,6 @@ n∸n≡0 : ∀ n → n ∸ n ≡ 0 n∸n≡0 zero = refl n∸n≡0 (suc n) = n∸n≡0 n -m≤n⇒[1+m]∸n≡1+[m∸n] : ∀ {m n} → m ≤ n → suc n ∸ m ≡ suc (n ∸ m) -m≤n⇒[1+m]∸n≡1+[m∸n] z≤n = refl -m≤n⇒[1+m]∸n≡1+[m∸n] (s≤s le) rewrite m≤n⇒[1+m]∸n≡1+[m∸n] le = refl - ------------------------------------------------------------------------ -- Properties of _∸_ and pred @@ -1480,15 +1476,6 @@ pred[m∸n]≡m∸[1+n] (suc m) (suc n) = pred[m∸n]≡m∸[1+n] m n ------------------------------------------------------------------------ -- Properties of _∸_ and _≤_/_<_ -m+n≤o⇒m≤o∸n : ∀ m n o → m + n ≤ o → m ≤ o ∸ n -m+n≤o⇒m≤o∸n zero n o le = z≤n -m+n≤o⇒m≤o∸n (suc m) n (suc o) (s≤s le) - rewrite m≤n⇒[1+m]∸n≡1+[m∸n] (m+n≤o⇒n≤o m le) = s≤s (m+n≤o⇒m≤o∸n m n o le) - -m≤o∸n⇒m+n≤o : ∀ m {n o} (n≤o : n ≤ o) → m ≤ o ∸ n → m + n ≤ o -m≤o∸n⇒m+n≤o m z≤n le rewrite +-identityʳ m = le -m≤o∸n⇒m+n≤o m {suc n} (s≤s n≤o) le rewrite +-suc m n = s≤s (m≤o∸n⇒m+n≤o m n≤o le) - m∸n≤m : ∀ m n → m ∸ n ≤ m m∸n≤m n zero = ≤-refl m∸n≤m zero (suc n) = ≤-refl @@ -1586,6 +1573,15 @@ m≤n⇒n∸m≤n (s≤s m≤n) = m≤n⇒m≤1+n (m≤n⇒n∸m≤n m≤n) (m + n) ∸ o ≡⟨ +-∸-assoc m o≤n ⟩ m + (n ∸ o) ∎ +m+n≤o⇒m≤o∸n : ∀ m n o → m + n ≤ o → m ≤ o ∸ n +m+n≤o⇒m≤o∸n zero n o le = z≤n +m+n≤o⇒m≤o∸n (suc m) n (suc o) (s≤s le) + rewrite +-∸-assoc 1 (m+n≤o⇒n≤o m le) = s≤s (m+n≤o⇒m≤o∸n m n o le) + +m≤o∸n⇒m+n≤o : ∀ m {n o} (n≤o : n ≤ o) → m ≤ o ∸ n → m + n ≤ o +m≤o∸n⇒m+n≤o m z≤n le rewrite +-identityʳ m = le +m≤o∸n⇒m+n≤o m {suc n} (s≤s n≤o) le rewrite +-suc m n = s≤s (m≤o∸n⇒m+n≤o m n≤o le) + m≤n+m∸n : ∀ m n → m ≤ n + (m ∸ n) m≤n+m∸n zero n = z≤n m≤n+m∸n (suc m) zero = ≤-refl From e5f41787eded77233365ff79bcabff1dcbe64fdf Mon Sep 17 00:00:00 2001 From: jamesmckinna Date: Mon, 24 Apr 2023 11:22:21 +0100 Subject: [PATCH 035/316] `CHANGELOG` --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44c565b327..957ea761d7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2044,7 +2044,6 @@ Other minor changes <⇒<′ : m < n → m <′ n <′⇒< : m <′ n → m < n - m≤n⇒[1+m]∸n≡1+[m∸n] : m ≤ n → suc n ∸ m ≡ suc (n ∸ m) m+n≤p⇒m≤p∸n : m + n ≤ p → m ≤ p ∸ n m≤p∸n⇒m+n≤p : n ≤ p → m ≤ p ∸ n → m + n ≤ p From 1c510d4d085d06ddf733ad5c807541ae508ffeb9 Mon Sep 17 00:00:00 2001 From: MatthewDaggitt Date: Fri, 28 Apr 2023 16:20:29 +0900 Subject: [PATCH 036/316] Add citation file to repo --- CITATION.cff | 8 ++++++++ notes/release-guide.txt | 16 +++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) create mode 100644 CITATION.cff diff --git a/CITATION.cff b/CITATION.cff new file mode 100644 index 0000000000..37d6ffec0e --- /dev/null +++ b/CITATION.cff @@ -0,0 +1,8 @@ +cff-version: 1.2.0 +message: "If you use this software, please cite it as below." +authors: +- name: "The Agda Community" +title: "Agda Standard Library" +version: 1.7.2 +date-released: 2023-2-1 +url: "https://github.com/agda/agda-stdlib" \ No newline at end of file diff --git a/notes/release-guide.txt b/notes/release-guide.txt index 56fb2458cc..2f3f9d862f 100644 --- a/notes/release-guide.txt +++ b/notes/release-guide.txt @@ -5,15 +5,13 @@ procedure should be followed: * Update `README.agda` by replacing 'development version' by 'version X.Y' in the title. -* Update `README.md` - -* Update `agda-stdlib-utils.cabal` version to `X.Y`. - -* Update the version in standard-library.agda-lib to `X.Y` - -* Update `notes/installation-guide.txt` - -* Update `CHANGELOG.md`. +* Update the version to `X.Y` in: + - `agda-stdlib-utils.cabal` + - `standard-library.agda-lib` + - `CITATION.cff` + - `CHANGELOG.md` + - `README.md` + - `notes/installation-guide.txt` * Update the copyright year range in the LICENSE file, if necessary. From 6338d2a6398a364e16dbbd3692e3de03421fb93d Mon Sep 17 00:00:00 2001 From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com> Date: Tue, 2 May 2023 13:24:47 +0100 Subject: [PATCH 037/316] Restore deleted `*.Categorical.*` as deprecated modules (#1946) * restored `Categorical` modules towards deprecation * updated `CHANGELOG` * updated `GenerateEverything` --- CHANGELOG.md | 40 ++++++++++++++++++- GenerateEverything.hs | 5 +++ src/Codata/Sized/Colist/Categorical.agda | 17 ++++++++ src/Codata/Sized/Covec/Categorical.agda | 17 ++++++++ src/Codata/Sized/Delay/Categorical.agda | 17 ++++++++ src/Codata/Sized/Stream/Categorical.agda | 17 ++++++++ src/Data/List/Categorical.agda | 17 ++++++++ src/Data/List/Categorical/Transformer.agda | 17 ++++++++ src/Data/List/NonEmpty/Categorical.agda | 17 ++++++++ .../NonEmpty/Categorical/Transformer.agda | 17 ++++++++ src/Data/Maybe/Categorical.agda | 17 ++++++++ src/Data/Maybe/Categorical/Transformer.agda | 17 ++++++++ src/Data/Product/Categorical/Examples.agda | 17 ++++++++ src/Data/Product/Categorical/Left.agda | 17 ++++++++ src/Data/Product/Categorical/Left/Base.agda | 17 ++++++++ src/Data/Product/Categorical/Right.agda | 17 ++++++++ src/Data/Product/Categorical/Right/Base.agda | 17 ++++++++ src/Data/Sum/Categorical/Examples.agda | 17 ++++++++ src/Data/Sum/Categorical/Left.agda | 17 ++++++++ .../Sum/Categorical/Left/Transformer.agda | 17 ++++++++ src/Data/Sum/Categorical/Right.agda | 17 ++++++++ .../Sum/Categorical/Right/Transformer.agda | 17 ++++++++ src/Data/These/Categorical/Left.agda | 17 ++++++++ src/Data/These/Categorical/Left/Base.agda | 17 ++++++++ src/Data/These/Categorical/Right.agda | 17 ++++++++ src/Data/These/Categorical/Right/Base.agda | 17 ++++++++ src/Data/Vec/Categorical.agda | 17 ++++++++ src/Data/Vec/Categorical/Transformer.agda | 17 ++++++++ src/Data/Vec/Recursive/Categorical.agda | 17 ++++++++ src/Function/Identity/Categorical.agda | 17 ++++++++ src/IO/Categorical.agda | 17 ++++++++ src/Reflection/TCM/Categorical.agda | 17 ++++++++ 32 files changed, 553 insertions(+), 2 deletions(-) create mode 100644 src/Codata/Sized/Colist/Categorical.agda create mode 100644 src/Codata/Sized/Covec/Categorical.agda create mode 100644 src/Codata/Sized/Delay/Categorical.agda create mode 100644 src/Codata/Sized/Stream/Categorical.agda create mode 100644 src/Data/List/Categorical.agda create mode 100644 src/Data/List/Categorical/Transformer.agda create mode 100644 src/Data/List/NonEmpty/Categorical.agda create mode 100644 src/Data/List/NonEmpty/Categorical/Transformer.agda create mode 100644 src/Data/Maybe/Categorical.agda create mode 100644 src/Data/Maybe/Categorical/Transformer.agda create mode 100644 src/Data/Product/Categorical/Examples.agda create mode 100644 src/Data/Product/Categorical/Left.agda create mode 100644 src/Data/Product/Categorical/Left/Base.agda create mode 100644 src/Data/Product/Categorical/Right.agda create mode 100644 src/Data/Product/Categorical/Right/Base.agda create mode 100644 src/Data/Sum/Categorical/Examples.agda create mode 100644 src/Data/Sum/Categorical/Left.agda create mode 100644 src/Data/Sum/Categorical/Left/Transformer.agda create mode 100644 src/Data/Sum/Categorical/Right.agda create mode 100644 src/Data/Sum/Categorical/Right/Transformer.agda create mode 100644 src/Data/These/Categorical/Left.agda create mode 100644 src/Data/These/Categorical/Left/Base.agda create mode 100644 src/Data/These/Categorical/Right.agda create mode 100644 src/Data/These/Categorical/Right/Base.agda create mode 100644 src/Data/Vec/Categorical.agda create mode 100644 src/Data/Vec/Categorical/Transformer.agda create mode 100644 src/Data/Vec/Recursive/Categorical.agda create mode 100644 src/Function/Identity/Categorical.agda create mode 100644 src/IO/Categorical.agda create mode 100644 src/Reflection/TCM/Categorical.agda diff --git a/CHANGELOG.md b/CHANGELOG.md index 957ea761d7..2abb4c3c57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,8 +88,7 @@ Non-backwards compatible changes such as `Monad`, `Applicative`, `Functor`, etc, under `Category.*`, as this obstructs the importing of the `agda-categories` development into the Standard Library, and moreover needlessly restricts the applicability of categorical concepts to this - (highly specific) mode of use. Correspondingly, modules grouped under `*.Categorical.*` - which exploited these structures for effectful programming have been renamed `*.Effectful`. + (highly specific) mode of use. Correspondingly, client modules grouped under `*.Categorical.*` which exploit such structure for effectful programming have been renamed `*.Effectful`, with the originals being deprecated. ### Improvements to pretty printing and regexes @@ -871,6 +870,43 @@ Deprecated modules Algebra.Morphism.LatticeMonomorphism ↦ Algebra.Lattice.Morphism.LatticeMonomorphism ``` +### Moving `*.Catgeorical.*` files + +* As discussed above the following files have been moved: + ```agda + Codata.Sized.Colist.Categorical ↦ Codata.Sized.Colist.Effectful + Codata.Sized.Covec.Categorical ↦ Codata.Sized.Covec.Effectful + Codata.Sized.Delay.Categorical ↦ Codata.Sized.Delay.Effectful + Codata.Sized.Stream.Categorical ↦ Codata.Sized.Stream.Effectful + Data.List.Categorical ↦ Data.List.Effectful + Data.List.Categorical.Transformer ↦ Data.List.Effectful.Transformer + Data.List.NonEmpty.Categorical ↦ Data.List.NonEmpty.Effectful + Data.List.NonEmpty.Categorical.Transformer ↦ Data.List.NonEmpty.Effectful.Transformer + Data.Maybe.Categorical ↦ Data.Maybe.Effectful + Data.Maybe.Categorical.Transformer ↦ Data.Maybe.Effectful.Transformer + Data.Product.Categorical.Examples ↦ Data.Product.Effectful.Examples + Data.Product.Categorical.Left ↦ Data.Product.Effectful.Left + Data.Product.Categorical.Left.Base ↦ Data.Product.Effectful.Left.Base + Data.Product.Categorical.Right ↦ Data.Product.Effectful.Right + Data.Product.Categorical.Right.Base ↦ Data.Product.Effectful.Right.Base + Data.Sum.Categorical.Examples ↦ Data.Sum.Effectful.Examples + Data.Sum.Categorical.Left ↦ Data.Sum.Effectful.Left + Data.Sum.Categorical.Left.Transformer ↦ Data.Sum.Effectful.Left.Transformer + Data.Sum.Categorical.Right ↦ Data.Sum.Effectful.Right + Data.Sum.Categorical.Right.Transformer ↦ Data.Sum.Effectful.Right.Transformer + Data.These.Categorical.Examples ↦ Data.These.Effectful.Examples + Data.These.Categorical.Left ↦ Data.These.Effectful.Left + Data.These.Categorical.Left.Base ↦ Data.These.Effectful.Left.Base + Data.These.Categorical.Right ↦ Data.These.Effectful.Right + Data.These.Categorical.Right.Base ↦ Data.These.Effectful.Right.Base + Data.Vec.Categorical ↦ Data.Vec.Effectful + Data.Vec.Categorical.Transformer ↦ Data.Vec.Effectful.Transformer + Data.Vec.Recursive.Categorical ↦ Data.Vec.Recursive.Effectful + Function.Identity.Categorical ↦ Function.Identity.Effectful + IO.Categorical ↦ IO.Effectful + Reflection.TCM.Categorical ↦ Reflection.TCM.Effectful + ``` + ### Moving `Relation.Binary.Properties.XLattice` files * The following files have been moved: diff --git a/GenerateEverything.hs b/GenerateEverything.hs index d513da0ab8..ee49679f3a 100644 --- a/GenerateEverything.hs +++ b/GenerateEverything.hs @@ -53,6 +53,7 @@ unsafeModules = map modToFile , "Foreign.Haskell.Pair" , "IO" , "IO.Base" + , "IO.Categorical" , "IO.Infinite" , "IO.Instances" , "IO.Effectful" @@ -121,6 +122,7 @@ sizedTypesModules = map modToFile , "Codata.Sized.Cofin.Literals" , "Codata.Sized.Colist" , "Codata.Sized.Colist.Bisimilarity" + , "Codata.Sized.Colist.Categorical" , "Codata.Sized.Colist.Effectful" , "Codata.Sized.Colist.Properties" , "Codata.Sized.Conat" @@ -129,6 +131,7 @@ sizedTypesModules = map modToFile , "Codata.Sized.Conat.Properties" , "Codata.Sized.Covec" , "Codata.Sized.Covec.Bisimilarity" + , "Codata.Sized.Covec.Categorical" , "Codata.Sized.Covec.Effectful" , "Codata.Sized.Covec.Instances" , "Codata.Sized.Covec.Properties" @@ -136,6 +139,7 @@ sizedTypesModules = map modToFile , "Codata.Sized.Cowriter.Bisimilarity" , "Codata.Sized.Delay" , "Codata.Sized.Delay.Bisimilarity" + , "Codata.Sized.Delay.Categorical" , "Codata.Sized.Delay.Effectful" , "Codata.Sized.Delay.Properties" , "Codata.Sized.M" @@ -143,6 +147,7 @@ sizedTypesModules = map modToFile , "Codata.Sized.M.Properties" , "Codata.Sized.Stream" , "Codata.Sized.Stream.Bisimilarity" + , "Codata.Sized.Stream.Categorical" , "Codata.Sized.Stream.Effectful" , "Codata.Sized.Stream.Instances" , "Codata.Sized.Stream.Properties" diff --git a/src/Codata/Sized/Colist/Categorical.agda b/src/Codata/Sized/Colist/Categorical.agda new file mode 100644 index 0000000000..6cee36ca22 --- /dev/null +++ b/src/Codata/Sized/Colist/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Codata.Sized.Colist.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --sized-types #-} + +module Codata.Sized.Colist.Categorical where + +open import Codata.Sized.Colist.Effectful public + +{-# WARNING_ON_IMPORT +"Codata.Sized.Colist.Categorical was deprecated in v2.0. +Use Codata.Sized.Colist.Effectful instead." +#-} diff --git a/src/Codata/Sized/Covec/Categorical.agda b/src/Codata/Sized/Covec/Categorical.agda new file mode 100644 index 0000000000..0da702ff2c --- /dev/null +++ b/src/Codata/Sized/Covec/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Codata.Sized.Covec.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --sized-types #-} + +module Codata.Sized.Covec.Categorical where + +open import Codata.Sized.Covec.Effectful public + +{-# WARNING_ON_IMPORT +"Codata.Sized.Covec.Categorical was deprecated in v2.0. +Use Codata.Sized.Covec.Effectful instead." +#-} diff --git a/src/Codata/Sized/Delay/Categorical.agda b/src/Codata/Sized/Delay/Categorical.agda new file mode 100644 index 0000000000..2aa88bb896 --- /dev/null +++ b/src/Codata/Sized/Delay/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Codata.Sized.Delay.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --sized-types #-} + +module Codata.Sized.Delay.Categorical where + +open import Codata.Sized.Delay.Effectful public + +{-# WARNING_ON_IMPORT +"Codata.Sized.Delay.Categorical was deprecated in v2.0. +Use Codata.Sized.Delay.Effectful instead." +#-} diff --git a/src/Codata/Sized/Stream/Categorical.agda b/src/Codata/Sized/Stream/Categorical.agda new file mode 100644 index 0000000000..597d7b7bfc --- /dev/null +++ b/src/Codata/Sized/Stream/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Codata.Sized.Stream.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --sized-types #-} + +module Codata.Sized.Stream.Categorical where + +open import Codata.Sized.Stream.Effectful public + +{-# WARNING_ON_IMPORT +"Codata.Sized.Stream.Categorical was deprecated in v2.0. +Use Codata.Sized.Stream.Effectful instead." +#-} diff --git a/src/Data/List/Categorical.agda b/src/Data/List/Categorical.agda new file mode 100644 index 0000000000..dc3391f1c4 --- /dev/null +++ b/src/Data/List/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.List.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.List.Categorical where + +open import Data.List.Effectful public + +{-# WARNING_ON_IMPORT +"Data.List.Categorical was deprecated in v2.0. +Use Data.List.Effectful instead." +#-} diff --git a/src/Data/List/Categorical/Transformer.agda b/src/Data/List/Categorical/Transformer.agda new file mode 100644 index 0000000000..75b83f14f3 --- /dev/null +++ b/src/Data/List/Categorical/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.List.Effectful.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.List.Categorical.Transformer where + +open import Data.List.Effectful.Transformer public + +{-# WARNING_ON_IMPORT +"Data.List.Categorical.Transformer was deprecated in v2.0. +Use Data.List.Effectful.Transformer instead." +#-} diff --git a/src/Data/List/NonEmpty/Categorical.agda b/src/Data/List/NonEmpty/Categorical.agda new file mode 100644 index 0000000000..442c1a0df1 --- /dev/null +++ b/src/Data/List/NonEmpty/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.List.NonEmpty.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.List.NonEmpty.Categorical where + +open import Data.List.NonEmpty.Effectful public + +{-# WARNING_ON_IMPORT +"Data.List.NonEmpty.Categorical was deprecated in v2.0. +Use Data.List.NonEmpty.Effectful instead." +#-} diff --git a/src/Data/List/NonEmpty/Categorical/Transformer.agda b/src/Data/List/NonEmpty/Categorical/Transformer.agda new file mode 100644 index 0000000000..7842b65054 --- /dev/null +++ b/src/Data/List/NonEmpty/Categorical/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.List.NonEmpty.Effectful.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.List.NonEmpty.Categorical.Transformer where + +open import Data.List.NonEmpty.Effectful.Transformer public + +{-# WARNING_ON_IMPORT +"Data.List.NonEmpty.Categorical.Transformer was deprecated in v2.0. +Use Data.List.NonEmpty.Effectful.Transformer instead." +#-} diff --git a/src/Data/Maybe/Categorical.agda b/src/Data/Maybe/Categorical.agda new file mode 100644 index 0000000000..e6ec7a7a2c --- /dev/null +++ b/src/Data/Maybe/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Maybe.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Maybe.Categorical where + +open import Data.Maybe.Effectful public + +{-# WARNING_ON_IMPORT +"Data.Maybe.Categorical was deprecated in v2.0. +Use Data.Maybe.Effectful instead." +#-} diff --git a/src/Data/Maybe/Categorical/Transformer.agda b/src/Data/Maybe/Categorical/Transformer.agda new file mode 100644 index 0000000000..aca111a00a --- /dev/null +++ b/src/Data/Maybe/Categorical/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Maybe.Effectful.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Maybe.Categorical.Transformer where + +open import Data.Maybe.Effectful.Transformer public + +{-# WARNING_ON_IMPORT +"Data.Maybe.Categorical.Transformer was deprecated in v2.0. +Use Data.Maybe.Effectful.Transformer instead." +#-} diff --git a/src/Data/Product/Categorical/Examples.agda b/src/Data/Product/Categorical/Examples.agda new file mode 100644 index 0000000000..e832d67b19 --- /dev/null +++ b/src/Data/Product/Categorical/Examples.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Product.Categorical.Examples` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Product.Categorical.Examples where + +open import Data.Product.Effectful.Examples public + +{-# WARNING_ON_IMPORT +"Data.Product.Categorical.Examples was deprecated in v2.0. +Use Data.Product.Effectful.Examples instead." +#-} diff --git a/src/Data/Product/Categorical/Left.agda b/src/Data/Product/Categorical/Left.agda new file mode 100644 index 0000000000..de68a8575e --- /dev/null +++ b/src/Data/Product/Categorical/Left.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Product.Categorical.Left` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Product.Categorical.Left where + +open import Data.Product.Effectful.Left public + +{-# WARNING_ON_IMPORT +"Data.Product.Categorical.Left was deprecated in v2.0. +Use Data.Product.Effectful.Left instead." +#-} diff --git a/src/Data/Product/Categorical/Left/Base.agda b/src/Data/Product/Categorical/Left/Base.agda new file mode 100644 index 0000000000..ffa7fed34c --- /dev/null +++ b/src/Data/Product/Categorical/Left/Base.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Product.Categorical.Left.Base` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Product.Categorical.Left.Base where + +open import Data.Product.Effectful.Left.Base public + +{-# WARNING_ON_IMPORT +"Data.Product.Categorical.Left.Base was deprecated in v2.0. +Use Data.Product.Effectful.Left.Base instead." +#-} diff --git a/src/Data/Product/Categorical/Right.agda b/src/Data/Product/Categorical/Right.agda new file mode 100644 index 0000000000..bdd34822e3 --- /dev/null +++ b/src/Data/Product/Categorical/Right.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Product.Categorical.Right` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Product.Categorical.Right where + +open import Data.Product.Effectful.Right public + +{-# WARNING_ON_IMPORT +"Data.Product.Categorical.Right was deprecated in v2.0. +Use Data.Product.Effectful.Right instead." +#-} diff --git a/src/Data/Product/Categorical/Right/Base.agda b/src/Data/Product/Categorical/Right/Base.agda new file mode 100644 index 0000000000..556009642a --- /dev/null +++ b/src/Data/Product/Categorical/Right/Base.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Product.Categorical.Right.Base` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Product.Categorical.Right.Base where + +open import Data.Product.Effectful.Right.Base public + +{-# WARNING_ON_IMPORT +"Data.Product.Categorical.Right.Base was deprecated in v2.0. +Use Data.Product.Effectful.Right.Base instead." +#-} diff --git a/src/Data/Sum/Categorical/Examples.agda b/src/Data/Sum/Categorical/Examples.agda new file mode 100644 index 0000000000..5a74842598 --- /dev/null +++ b/src/Data/Sum/Categorical/Examples.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Sum.Categorical.Examples` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Sum.Categorical.Examples where + +open import Data.Sum.Effectful.Examples public + +{-# WARNING_ON_IMPORT +"Data.Sum.Categorical.Examples was deprecated in v2.0. +Use Data.Sum.Effectful.Examples instead." +#-} diff --git a/src/Data/Sum/Categorical/Left.agda b/src/Data/Sum/Categorical/Left.agda new file mode 100644 index 0000000000..b1a26c995d --- /dev/null +++ b/src/Data/Sum/Categorical/Left.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Sum.Categorical.Left` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Sum.Categorical.Left where + +open import Data.Sum.Effectful.Left public + +{-# WARNING_ON_IMPORT +"Data.Sum.Categorical.Left was deprecated in v2.0. +Use Data.Sum.Effectful.Left instead." +#-} diff --git a/src/Data/Sum/Categorical/Left/Transformer.agda b/src/Data/Sum/Categorical/Left/Transformer.agda new file mode 100644 index 0000000000..de39522246 --- /dev/null +++ b/src/Data/Sum/Categorical/Left/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Sum.Categorical.Left.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Sum.Categorical.Left.Transformer where + +open import Data.Sum.Effectful.Left.Transformer public + +{-# WARNING_ON_IMPORT +"Data.Sum.Categorical.Left.Transformer was deprecated in v2.0. +Use Data.Sum.Effectful.Left.Transformer instead." +#-} diff --git a/src/Data/Sum/Categorical/Right.agda b/src/Data/Sum/Categorical/Right.agda new file mode 100644 index 0000000000..724d6a5b3a --- /dev/null +++ b/src/Data/Sum/Categorical/Right.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Sum.Categorical.Right` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Sum.Categorical.Right where + +open import Data.Sum.Effectful.Right public + +{-# WARNING_ON_IMPORT +"Data.Sum.Categorical.Right was deprecated in v2.0. +Use Data.Sum.Effectful.Right instead." +#-} diff --git a/src/Data/Sum/Categorical/Right/Transformer.agda b/src/Data/Sum/Categorical/Right/Transformer.agda new file mode 100644 index 0000000000..52fbb16f11 --- /dev/null +++ b/src/Data/Sum/Categorical/Right/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Sum.Categorical.Right.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Sum.Categorical.Right.Transformer where + +open import Data.Sum.Effectful.Right.Transformer public + +{-# WARNING_ON_IMPORT +"Data.Sum.Categorical.Right.Transformer was deprecated in v2.0. +Use Data.Sum.Effectful.Right.Transformer instead." +#-} diff --git a/src/Data/These/Categorical/Left.agda b/src/Data/These/Categorical/Left.agda new file mode 100644 index 0000000000..73576b3bd0 --- /dev/null +++ b/src/Data/These/Categorical/Left.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.These.Categorical.Left` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.These.Categorical.Left where + +open import Data.These.Effectful.Left public + +{-# WARNING_ON_IMPORT +"Data.These.Categorical.Left was deprecated in v2.0. +Use Data.These.Effectful.Left instead." +#-} diff --git a/src/Data/These/Categorical/Left/Base.agda b/src/Data/These/Categorical/Left/Base.agda new file mode 100644 index 0000000000..7c7e3add7d --- /dev/null +++ b/src/Data/These/Categorical/Left/Base.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.These.Categorical.Left.Base` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.These.Categorical.Left.Base where + +open import Data.These.Effectful.Left.Base public + +{-# WARNING_ON_IMPORT +"Data.These.Categorical.Left.Base was deprecated in v2.0. +Use Data.These.Effectful.Left.Base instead." +#-} diff --git a/src/Data/These/Categorical/Right.agda b/src/Data/These/Categorical/Right.agda new file mode 100644 index 0000000000..2e42e8d4a8 --- /dev/null +++ b/src/Data/These/Categorical/Right.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.These.Categorical.Right` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.These.Categorical.Right where + +open import Data.These.Effectful.Right public + +{-# WARNING_ON_IMPORT +"Data.These.Categorical.Right was deprecated in v2.0. +Use Data.These.Effectful.Right instead." +#-} diff --git a/src/Data/These/Categorical/Right/Base.agda b/src/Data/These/Categorical/Right/Base.agda new file mode 100644 index 0000000000..05acbcf139 --- /dev/null +++ b/src/Data/These/Categorical/Right/Base.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.These.Categorical.Right.Base` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.These.Categorical.Right.Base where + +open import Data.These.Effectful.Right.Base public + +{-# WARNING_ON_IMPORT +"Data.These.Categorical.Right.Base was deprecated in v2.0. +Use Data.These.Effectful.Right.Base instead." +#-} diff --git a/src/Data/Vec/Categorical.agda b/src/Data/Vec/Categorical.agda new file mode 100644 index 0000000000..aaad325cac --- /dev/null +++ b/src/Data/Vec/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Vec.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Vec.Categorical where + +open import Data.Vec.Effectful public + +{-# WARNING_ON_IMPORT +"Data.Vec.Categorical was deprecated in v2.0. +Use Data.Vec.Effectful instead." +#-} diff --git a/src/Data/Vec/Categorical/Transformer.agda b/src/Data/Vec/Categorical/Transformer.agda new file mode 100644 index 0000000000..9d90b030f7 --- /dev/null +++ b/src/Data/Vec/Categorical/Transformer.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Vec.Effectful.Transformer` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Vec.Categorical.Transformer where + +open import Data.Vec.Effectful.Transformer public + +{-# WARNING_ON_IMPORT +"Data.Vec.Categorical.Transformer was deprecated in v2.0. +Use Data.Vec.Effectful.Transformer instead." +#-} diff --git a/src/Data/Vec/Recursive/Categorical.agda b/src/Data/Vec/Recursive/Categorical.agda new file mode 100644 index 0000000000..1dba5fd7b0 --- /dev/null +++ b/src/Data/Vec/Recursive/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Data.Vec.Recursive.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Data.Vec.Recursive.Categorical where + +open import Data.Vec.Recursive.Effectful public + +{-# WARNING_ON_IMPORT +"Data.Vec.Recursive.Categorical was deprecated in v2.0. +Use Data.Vec.Recursive.Effectful instead." +#-} diff --git a/src/Function/Identity/Categorical.agda b/src/Function/Identity/Categorical.agda new file mode 100644 index 0000000000..7fbdec019e --- /dev/null +++ b/src/Function/Identity/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Function.Identity.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Function.Identity.Categorical where + +open import Function.Identity.Effectful public + +{-# WARNING_ON_IMPORT +"Function.Identity.Categorical was deprecated in v2.0. +Use Function.Identity.Effectful instead." +#-} diff --git a/src/IO/Categorical.agda b/src/IO/Categorical.agda new file mode 100644 index 0000000000..9e264a5283 --- /dev/null +++ b/src/IO/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `IO.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --guardedness #-} + +module IO.Categorical where + +open import IO.Effectful public + +{-# WARNING_ON_IMPORT +"IO.Categorical was deprecated in v2.0. +Use IO.Effectful instead." +#-} diff --git a/src/Reflection/TCM/Categorical.agda b/src/Reflection/TCM/Categorical.agda new file mode 100644 index 0000000000..f1c5d76319 --- /dev/null +++ b/src/Reflection/TCM/Categorical.agda @@ -0,0 +1,17 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- This module is DEPRECATED. Please use +-- `Reflection.TCM.Effectful` instead. +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Reflection.TCM.Categorical where + +open import Reflection.TCM.Effectful public + +{-# WARNING_ON_IMPORT +"Reflection.TCM.Categorical was deprecated in v2.0. +Use Reflection.TCM.Effectful instead." +#-} From 96e4d8fb85ed189a3037f2d23568b53164b8ff45 Mon Sep 17 00:00:00 2001 From: James McKinna Date: Tue, 2 May 2023 15:30:07 +0100 Subject: [PATCH 038/316] cosmetic: two whitespace violations --- src/Data/List/Properties.agda | 2 +- src/Data/Nat/Combinatorics.agda | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index d4008fce07..d18d8562ce 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -872,7 +872,7 @@ module _ {R : Rel A p} (R? : B.Decidable R) where length-derun : ∀ xs → length (derun R? xs) ≤ length xs length-derun [] = ≤-refl length-derun (x ∷ []) = ≤-refl - length-derun (x ∷ y ∷ xs) with ih ← length-derun (y ∷ xs) | does (R? x y) + length-derun (x ∷ y ∷ xs) with ih ← length-derun (y ∷ xs) | does (R? x y) ... | true = m≤n⇒m≤1+n ih ... | false = s≤s ih diff --git a/src/Data/Nat/Combinatorics.agda b/src/Data/Nat/Combinatorics.agda index 6db600699c..850cd01857 100644 --- a/src/Data/Nat/Combinatorics.agda +++ b/src/Data/Nat/Combinatorics.agda @@ -12,7 +12,7 @@ open import Data.Nat.Base open import Data.Nat.DivMod open import Data.Nat.Divisibility open import Data.Nat.Properties -open import Relation.Binary.Definitions +open import Relation.Binary.Definitions open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong; subst) @@ -118,7 +118,7 @@ module _ {n k} (k Date: Fri, 5 May 2023 11:51:09 +0900 Subject: [PATCH 039/316] Fix date format --- CITATION.cff | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CITATION.cff b/CITATION.cff index 37d6ffec0e..416e595b98 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,5 +4,5 @@ authors: - name: "The Agda Community" title: "Agda Standard Library" version: 1.7.2 -date-released: 2023-2-1 +date-released: 2023-02-01 url: "https://github.com/agda/agda-stdlib" \ No newline at end of file From 9c5112b609307f062d971f4e41f0704eecfe5266 Mon Sep 17 00:00:00 2001 From: Guilherme Silva Date: Sat, 6 May 2023 02:53:16 -0300 Subject: [PATCH 040/316] Added reverse permutation --- CHANGELOG.md | 5 +++++ .../Binary/Permutation/Propositional/Properties.agda | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2abb4c3c57..0e9cd648ab 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3037,3 +3037,8 @@ This is a full list of proofs that have changed form to use irrelevant instance ```agda <-weakInduction-startingFrom : P i → (∀ j → P (inject₁ j) → P (suc j)) → ∀ {j} → j ≥ i → P j ``` + +* Added new function to `Data.List.Relation.Binary.Permutation.Propositional.Properties` + ```agda + ↭-reverse : (xs : List A) → reverse xs ↭ xs + ``` diff --git a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda index c9a8048592..700fc277ff 100644 --- a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda @@ -324,6 +324,18 @@ drop-∷ = drop-mid [] [] ++↭ʳ++ [] ys = ↭-refl ++↭ʳ++ (x ∷ xs) ys = ↭-trans (↭-sym (shift x xs ys)) (++↭ʳ++ xs (x ∷ ys)) +------------------------------------------------------------------------ +-- reverse + +↭-reverse : (xs : List A) → reverse xs ↭ xs +↭-reverse [] = ↭-refl +↭-reverse (x ∷ xs) = begin + reverse (x ∷ xs) ≡⟨ Lₚ.unfold-reverse x xs ⟩ + reverse xs ∷ʳ x ↭˘⟨ ∷↭∷ʳ x (reverse xs) ⟩ + x ∷ reverse xs ↭⟨ prep x (↭-reverse xs) ⟩ + x ∷ xs ∎ + where open PermutationReasoning + ------------------------------------------------------------------------ -- merge From 14567c002c15a8154af0ee892f87286dfe48c0f0 Mon Sep 17 00:00:00 2001 From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com> Date: Mon, 15 May 2023 03:09:34 +0200 Subject: [PATCH 041/316] Deprecate `inspect` (#1930) --- CHANGELOG.md | 14 +++++- README.agda | 16 +++--- README/Inspect.agda | 7 ++- src/Codata/Sized/Colist/Properties.agda | 6 +-- src/Data/Fin/Properties.agda | 20 ++++++-- src/Data/List/Properties.agda | 6 +-- .../Permutation/Propositional/Properties.agda | 2 +- .../Binary/Permutation/Setoid/Properties.agda | 2 +- .../List/Relation/Unary/Any/Properties.agda | 8 +-- src/Data/Rational/Properties.agda | 24 ++++----- .../Vec/Relation/Unary/Any/Properties.agda | 10 ++-- .../Binary/PropositionalEquality.agda | 49 ++++++++++++------- 12 files changed, 99 insertions(+), 65 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0e9cd648ab..52b2a6762d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,7 @@ Version 2.0-dev =============== -The library has been tested using Agda 2.6.2. +The library has been tested using Agda 2.6.3. Highlights ---------- @@ -1334,6 +1334,15 @@ Deprecated names * This fixes the fact we had picked the wrong name originally. The erased modality corresponds to @0 whereas the irrelevance one corresponds to `.`. +### Deprecated `Relation.Binary.PropositionalEquality.inspect` + in favour of `with ... in ...` syntax (issue #1580; PRs #1630, #1930) + +* In `Relation.Binary.PropositionalEquality` + both the record type `Reveal_·_is_` + and its principal mode of use, `inspect`, + have been deprecated in favour of the new `with ... in ...` syntax. + See the documentation of [with-abstraction equality](https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality) + New modules ----------- @@ -1891,6 +1900,9 @@ Other minor changes toℕ-cancel-≤ : toℕ i ℕ.≤ toℕ j → i ≤ j toℕ-cancel-< : toℕ i ℕ.< toℕ j → i < j + splitAt⁻¹-↑ˡ : splitAt m {n} i ≡ inj₁ j → j ↑ˡ n ≡ i + splitAt⁻¹-↑ʳ : splitAt m {n} i ≡ inj₂ j → m ↑ʳ j ≡ i + toℕ-combine : toℕ (combine i j) ≡ k ℕ.* toℕ i ℕ.+ toℕ j combine-injectiveˡ : combine i j ≡ combine k l → i ≡ k combine-injectiveʳ : combine i j ≡ combine k l → j ≡ l diff --git a/README.agda b/README.agda index 2d87cb56d2..6fee0aeffa 100644 --- a/README.agda +++ b/README.agda @@ -12,13 +12,14 @@ module README where -- Liang-Ting Chen, Dominique Devriese, Dan Doel, Érdi Gergő, -- Zack Grannan, Helmut Grohne, Simon Foster, Liyang Hu, Jason Hu, -- Patrik Jansson, Alan Jeffrey, Wen Kokke, Evgeny Kotelnikov, --- Sergei Meshveliani, Eric Mertens, Darin Morrison, Guilhem Moulin, --- Shin-Cheng Mu, Ulf Norell, Noriyuki Ohkawa, Nicolas Pouillard, --- Andrés Sicard-Ramírez, Lex van der Stoep, Sandro Stucki, Milo Turner, --- Noam Zeilberger and other anonymous contributors. +-- James McKinna, Sergei Meshveliani, Eric Mertens, Darin Morrison, +-- Guilhem Moulin, Shin-Cheng Mu, Ulf Norell, Noriyuki Ohkawa, +-- Nicolas Pouillard, Andrés Sicard-Ramírez, Lex van der Stoep, +-- Sandro Stucki, Milo Turner, Noam Zeilberger +-- and other anonymous contributors. ------------------------------------------------------------------------ --- This version of the library has been tested using Agda 2.6.2. +-- This version of the library has been tested using Agda 2.6.3. -- The library comes with a .agda-lib file, for use with the library -- management system. @@ -236,11 +237,6 @@ import README.Debug.Trace import README.Nary --- Explaining the inspect idiom: use case, equivalent handwritten --- auxiliary definitions, and implementation details. - -import README.Inspect - -- Explaining how to use the automatic solvers import README.Tactic.MonoidSolver diff --git a/README/Inspect.agda b/README/Inspect.agda index e10877c44c..cff492d008 100644 --- a/README/Inspect.agda +++ b/README/Inspect.agda @@ -1,14 +1,17 @@ ------------------------------------------------------------------------ -- The Agda standard library -- --- Explaining how to use the inspect idiom and elaborating on the way --- it is implemented in the standard library. +-- This module is DEPRECATED. ------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} module README.Inspect where +{-# WARNING_ON_IMPORT +"README.Inspect was deprecated in v2.0." +#-} + open import Data.Nat.Base open import Data.Nat.Properties open import Data.Product diff --git a/src/Codata/Sized/Colist/Properties.agda b/src/Codata/Sized/Colist/Properties.agda index 3de56a756a..dea697b088 100644 --- a/src/Codata/Sized/Colist/Properties.agda +++ b/src/Codata/Sized/Colist/Properties.agda @@ -144,10 +144,10 @@ module _ (cons : C → B → C) (alg : A → Maybe (A × B)) where scanl-unfold : ∀ nil a → i ⊢ scanl cons nil (unfold alg a) ≈ nil ∷ (λ where .force → unfold alg′ (a , nil)) - scanl-unfold nil a with alg a | Eq.inspect alg a - ... | nothing | [ eq ] = Eq.refl ∷ λ { .force → + scanl-unfold nil a with alg a in eq + ... | nothing = Eq.refl ∷ λ { .force → sym (fromEq (unfold-nothing (Maybeₚ.map-nothing eq))) } - ... | just (a′ , b) | [ eq ] = Eq.refl ∷ λ { .force → begin + ... | just (a′ , b) = Eq.refl ∷ λ { .force → begin scanl cons (cons nil b) (unfold alg a′) ≈⟨ scanl-unfold (cons nil b) a′ ⟩ (cons nil b ∷ _) diff --git a/src/Data/Fin/Properties.agda b/src/Data/Fin/Properties.agda index 232a44a7bb..d7a963f9fd 100644 --- a/src/Data/Fin/Properties.agda +++ b/src/Data/Fin/Properties.agda @@ -562,10 +562,20 @@ splitAt-↑ˡ : ∀ m i n → splitAt m (i ↑ˡ n) ≡ inj₁ i splitAt-↑ˡ (suc m) zero n = refl splitAt-↑ˡ (suc m) (suc i) n rewrite splitAt-↑ˡ m i n = refl +splitAt⁻¹-↑ˡ : ∀ {m} {n} {i} {j} → splitAt m {n} i ≡ inj₁ j → j ↑ˡ n ≡ i +splitAt⁻¹-↑ˡ {suc m} {n} {0F} {.0F} refl = refl +splitAt⁻¹-↑ˡ {suc m} {n} {suc i} {j} eq with splitAt m i in splitAt[m][i]≡inj₁[j] +... | inj₁ k with refl ← eq = cong suc (splitAt⁻¹-↑ˡ {i = i} {j = k} splitAt[m][i]≡inj₁[j]) + splitAt-↑ʳ : ∀ m n i → splitAt m (m ↑ʳ i) ≡ inj₂ {B = Fin n} i splitAt-↑ʳ zero n i = refl splitAt-↑ʳ (suc m) n i rewrite splitAt-↑ʳ m n i = refl +splitAt⁻¹-↑ʳ : ∀ {m} {n} {i} {j} → splitAt m {n} i ≡ inj₂ j → m ↑ʳ j ≡ i +splitAt⁻¹-↑ʳ {zero} {n} {i} {j} refl = refl +splitAt⁻¹-↑ʳ {suc m} {n} {suc i} {j} eq with splitAt m i in splitAt[m][i]≡inj₂[k] +... | inj₂ k with refl ← eq = cong suc (splitAt⁻¹-↑ʳ {i = i} {j = k} splitAt[m][i]≡inj₂[k]) + splitAt-join : ∀ m n i → splitAt m (join m n i) ≡ i splitAt-join m n (inj₁ x) = splitAt-↑ˡ m x n splitAt-join m n (inj₂ y) = splitAt-↑ʳ m n y @@ -612,13 +622,13 @@ remQuot-combine {suc n} {k} (suc i) j rewrite splitAt-↑ʳ k (n ℕ.* k) (com cong (Data.Product.map₁ suc) (remQuot-combine i j) combine-remQuot : ∀ {n} k (i : Fin (n ℕ.* k)) → uncurry combine (remQuot {n} k i) ≡ i -combine-remQuot {suc n} k i with splitAt k i | P.inspect (splitAt k) i -... | inj₁ j | P.[ eq ] = begin +combine-remQuot {suc n} k i with splitAt k i in eq +... | inj₁ j = begin join k (n ℕ.* k) (inj₁ j) ≡˘⟨ cong (join k (n ℕ.* k)) eq ⟩ join k (n ℕ.* k) (splitAt k i) ≡⟨ join-splitAt k (n ℕ.* k) i ⟩ i ∎ where open ≡-Reasoning -... | inj₂ j | P.[ eq ] = begin +... | inj₂ j = begin k ↑ʳ (uncurry combine (remQuot {n} k j)) ≡⟨ cong (k ↑ʳ_) (combine-remQuot {n} k j) ⟩ join k (n ℕ.* k) (inj₂ j) ≡˘⟨ cong (join k (n ℕ.* k)) eq ⟩ join k (n ℕ.* k) (splitAt k i) ≡⟨ join-splitAt k (n ℕ.* k) i ⟩ @@ -679,8 +689,8 @@ combine-injective i j k l cᵢⱼ≡cₖₗ = combine-injectiveʳ i j k l cᵢⱼ≡cₖₗ combine-surjective : ∀ (i : Fin (m ℕ.* n)) → ∃₂ λ j k → combine j k ≡ i -combine-surjective {m} {n} i with remQuot {m} n i | P.inspect (remQuot {m} n) i -... | j , k | P.[ eq ] = j , k , (begin +combine-surjective {m} {n} i with remQuot {m} n i in eq +... | j , k = j , k , (begin combine j k ≡˘⟨ uncurry (cong₂ combine) (,-injective eq) ⟩ uncurry combine (remQuot {m} n i) ≡⟨ combine-remQuot {m} n i ⟩ i ∎) diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index d18d8562ce..312ef2e7a8 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -854,9 +854,9 @@ module _ {P : Pred A p} (P? : Decidable P) where filter-idem : filter P? ∘ filter P? ≗ filter P? filter-idem [] = refl - filter-idem (x ∷ xs) with does (P? x) | inspect does (P? x) - ... | false | _ = filter-idem xs - ... | true | P.[ eq ] rewrite eq = cong (x ∷_) (filter-idem xs) + filter-idem (x ∷ xs) with does (P? x) in eq + ... | false = filter-idem xs + ... | true rewrite eq = cong (x ∷_) (filter-idem xs) filter-++ : ∀ xs ys → filter P? (xs ++ ys) ≡ filter P? xs ++ filter P? ys filter-++ [] ys = refl diff --git a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda index 700fc277ff..f5a87cb067 100644 --- a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda @@ -29,7 +29,7 @@ open import Level using (Level) open import Relation.Unary using (Pred) open import Relation.Binary open import Relation.Binary.PropositionalEquality as ≡ - using (_≡_ ; refl ; cong; cong₂; _≢_; inspect) + using (_≡_ ; refl ; cong; cong₂; _≢_) open import Relation.Nullary open PermutationReasoning diff --git a/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda index 79ccfaadef..3483323844 100644 --- a/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda @@ -37,7 +37,7 @@ open import Level using (Level; _⊔_) open import Relation.Unary using (Pred; Decidable) open import Relation.Binary.Properties.Setoid S using (≉-resp₂) open import Relation.Binary.PropositionalEquality as ≡ - using (_≡_ ; refl; sym; cong; cong₂; subst; _≢_; inspect) + using (_≡_ ; refl; sym; cong; cong₂; subst; _≢_) open import Relation.Nullary.Decidable using (yes; no; does) open import Relation.Nullary.Negation using (contradiction) diff --git a/src/Data/List/Relation/Unary/Any/Properties.agda b/src/Data/List/Relation/Unary/Any/Properties.agda index abfc8f93f8..6ac93bc05e 100644 --- a/src/Data/List/Relation/Unary/Any/Properties.agda +++ b/src/Data/List/Relation/Unary/Any/Properties.agda @@ -42,7 +42,7 @@ open import Function.Related as Related using (Kind; Related; SK-sym) open import Level using (Level) open import Relation.Binary as B hiding (_⇔_) open import Relation.Binary.PropositionalEquality as P - using (_≡_; refl; inspect) + using (_≡_; refl) open import Relation.Unary as U using (Pred; _⟨×⟩_; _⟨→⟩_) renaming (_⊆_ to _⋐_) open import Relation.Nullary using (¬_; _because_; does; ofʸ; ofⁿ; yes; no) @@ -172,9 +172,9 @@ any⁺ p (there {x = x} pxs) with p x ... | false = any⁺ p pxs any⁻ : ∀ (p : A → Bool) xs → T (any p xs) → Any (T ∘ p) xs -any⁻ p (x ∷ xs) px∷xs with p x | inspect p x -... | true | P.[ eq ] = here (Equivalence.from T-≡ ⟨$⟩ eq) -... | false | _ = there (any⁻ p xs px∷xs) +any⁻ p (x ∷ xs) px∷xs with p x in eq +... | true = here (Equivalence.from T-≡ ⟨$⟩ eq) +... | false = there (any⁻ p xs px∷xs) any⇔ : ∀ {p : A → Bool} → Any (T ∘ p) xs ⇔ T (any p xs) any⇔ = equivalence (any⁺ _) (any⁻ _ _) diff --git a/src/Data/Rational/Properties.agda b/src/Data/Rational/Properties.agda index b9d18fab34..f564ffe835 100644 --- a/src/Data/Rational/Properties.agda +++ b/src/Data/Rational/Properties.agda @@ -1304,24 +1304,24 @@ neg-distribʳ-* = +-*-Monomorphism.neg-distribʳ-* ℚᵘ.+-0-isGroup ℚᵘ.*-i ------------------------------------------------------------------------ p≤q⇒p⊔q≡q : p ≤ q → p ⊔ q ≡ q -p≤q⇒p⊔q≡q {p@record{}} {q@record{}} p≤q with p ≤ᵇ q | inspect (p ≤ᵇ_) q -... | true | _ = refl -... | false | [ p≰q ] = contradiction (≤⇒≤ᵇ p≤q) (subst (¬_ ∘ T) (sym p≰q) λ()) +p≤q⇒p⊔q≡q {p@record{}} {q@record{}} p≤q with p ≤ᵇ q in p≰q +... | true = refl +... | false = contradiction (≤⇒≤ᵇ p≤q) (subst (¬_ ∘ T) (sym p≰q) λ()) p≥q⇒p⊔q≡p : p ≥ q → p ⊔ q ≡ p -p≥q⇒p⊔q≡p {p@record{}} {q@record{}} p≥q with p ≤ᵇ q | inspect (p ≤ᵇ_) q -... | true | [ p≤q ] = ≤-antisym p≥q (≤ᵇ⇒≤ (subst T (sym p≤q) _)) -... | false | [ p≤q ] = refl +p≥q⇒p⊔q≡p {p@record{}} {q@record{}} p≥q with p ≤ᵇ q in p≤q +... | true = ≤-antisym p≥q (≤ᵇ⇒≤ (subst T (sym p≤q) _)) +... | false = refl p≤q⇒p⊓q≡p : p ≤ q → p ⊓ q ≡ p -p≤q⇒p⊓q≡p {p@record{}} {q@record{}} p≤q with p ≤ᵇ q | inspect (p ≤ᵇ_) q -... | true | _ = refl -... | false | [ p≰q ] = contradiction (≤⇒≤ᵇ p≤q) (subst (¬_ ∘ T) (sym p≰q) λ()) +p≤q⇒p⊓q≡p {p@record{}} {q@record{}} p≤q with p ≤ᵇ q in p≰q +... | true = refl +... | false = contradiction (≤⇒≤ᵇ p≤q) (subst (¬_ ∘ T) (sym p≰q) λ()) p≥q⇒p⊓q≡q : p ≥ q → p ⊓ q ≡ q -p≥q⇒p⊓q≡q {p@record{}} {q@record{}} p≥q with p ≤ᵇ q | inspect (p ≤ᵇ_) q -... | true | [ p≤q ] = ≤-antisym (≤ᵇ⇒≤ (subst T (sym p≤q) _)) p≥q -... | false | [ p≤q ] = refl +p≥q⇒p⊓q≡q {p@record{}} {q@record{}} p≥q with p ≤ᵇ q in p≤q +... | true = ≤-antisym (≤ᵇ⇒≤ (subst T (sym p≤q) _)) p≥q +... | false = refl ⊓-operator : MinOperator ≤-totalPreorder ⊓-operator = record diff --git a/src/Data/Vec/Relation/Unary/Any/Properties.agda b/src/Data/Vec/Relation/Unary/Any/Properties.agda index 060f917782..5b3eab5fa1 100644 --- a/src/Data/Vec/Relation/Unary/Any/Properties.agda +++ b/src/Data/Vec/Relation/Unary/Any/Properties.agda @@ -333,12 +333,12 @@ module _ {P : Pred A p} where concat⁺∘concat⁻ : ∀ {n m} (xss : Vec (Vec A n) m) (p : Any P (concat xss)) → concat⁺ (concat⁻ xss p) ≡ p - concat⁺∘concat⁻ (xs ∷ xss) p with ++⁻ xs p | P.inspect (++⁻ xs) p - ... | inj₁ pxs | P.[ p=inj₁ ] - = P.trans (P.cong [ ++⁺ˡ , ++⁺ʳ xs ]′ (P.sym p=inj₁)) + concat⁺∘concat⁻ (xs ∷ xss) p with ++⁻ xs p in eq + ... | inj₁ pxs + = P.trans (P.cong [ ++⁺ˡ , ++⁺ʳ xs ]′ (P.sym eq)) $ ++⁺∘++⁻ xs p - ... | inj₂ pxss | P.[ p=inj₂ ] rewrite concat⁺∘concat⁻ xss pxss - = P.trans (P.cong [ ++⁺ˡ , ++⁺ʳ xs ]′ (P.sym p=inj₂)) + ... | inj₂ pxss rewrite concat⁺∘concat⁻ xss pxss + = P.trans (P.cong [ ++⁺ˡ , ++⁺ʳ xs ]′ (P.sym eq)) $ ++⁺∘++⁻ xs p concat⁻∘concat⁺ : ∀ {n m} {xss : Vec (Vec A n) m} (p : Any (Any P) xss) → diff --git a/src/Relation/Binary/PropositionalEquality.agda b/src/Relation/Binary/PropositionalEquality.agda index c9e2d102fd..4764635449 100644 --- a/src/Relation/Binary/PropositionalEquality.agda +++ b/src/Relation/Binary/PropositionalEquality.agda @@ -60,24 +60,6 @@ _≗_ {A = A} {B = B} = Setoid._≈_ (A →-setoid B) (A → Setoid.Carrier B) → setoid A ⟶ B →-to-⟶ = :→-to-Π ------------------------------------------------------------------------- --- Inspect - --- Inspect can be used when you want to pattern match on the result r --- of some expression e, and you also need to "remember" that r ≡ e. - --- See README.Inspect for an explanation of how/why to use this. - -record Reveal_·_is_ {A : Set a} {B : A → Set b} - (f : (x : A) → B x) (x : A) (y : B x) : - Set (a ⊔ b) where - constructor [_] - field eq : f x ≡ y - -inspect : ∀ {A : Set a} {B : A → Set b} - (f : (x : A) → B x) (x : A) → Reveal f · x is f x -inspect f x = [ refl ] - ------------------------------------------------------------------------ -- Propositionality @@ -120,3 +102,34 @@ module _ (_≟_ : DecidableEquality A) {x y : A} where ≢-≟-identity : (x≢y : x ≢ y) → x ≟ y ≡ no x≢y ≢-≟-identity = dec-no (x ≟ y) + + + + +------------------------------------------------------------------------ +-- DEPRECATED NAMES +------------------------------------------------------------------------ +-- Please use the new names as continuing support for the old names is +-- not guaranteed. + +-- Version 2.0 + +record Reveal_·_is_ {A : Set a} {B : A → Set b} + (f : (x : A) → B x) (x : A) (y : B x) : + Set (a ⊔ b) where + constructor [_] + field eq : f x ≡ y + +inspect : ∀ {A : Set a} {B : A → Set b} + (f : (x : A) → B x) (x : A) → Reveal f · x is f x +inspect f x = [ refl ] + +{-# WARNING_ON_USAGE Reveal_·_is_ +"Warning: Reveal_·_is_ was deprecated in v2.0. +Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality instead." +#-} +{-# WARNING_ON_USAGE inspect +"Warning: inspect was deprecated in v2.0. +Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality instead." +#-} + From 24a1b4891c82e38addd66fd273cc15e4ba423a8d Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Mon, 15 May 2023 19:07:04 +0200 Subject: [PATCH 042/316] Bump GHC to 9.6 for agda-stdlib-utils --- .github/haskell-ci.patch | 4 +-- .github/workflows/haskell-ci.yml | 45 ++++++++++++++++++++------------ agda-stdlib-utils.cabal | 7 ++--- 3 files changed, 35 insertions(+), 21 deletions(-) diff --git a/.github/haskell-ci.patch b/.github/haskell-ci.patch index cffc543501..c451df30df 100644 --- a/.github/haskell-ci.patch +++ b/.github/haskell-ci.patch @@ -8,7 +8,7 @@ + - .github/workflows/haskell-ci.yml + - agda-stdlib-utils.cabal + - cabal.haskell-ci -+ - *.hs ++ - "*.hs" pull_request: branches: - master @@ -17,7 +17,7 @@ + - .github/workflows/haskell-ci.yml + - agda-stdlib-utils.cabal + - cabal.haskell-ci -+ - *.hs ++ - "*.hs" jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 2fd1064fae..0aa1080f44 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.15.20230217 +# version: 0.16.1 # -# REGENDATA ("0.15.20230217",["github","--no-cabal-check","agda-stdlib-utils.cabal"]) +# REGENDATA ("0.16.1",["github","--no-cabal-check","agda-stdlib-utils.cabal"]) # name: Haskell-CI on: @@ -18,10 +18,20 @@ on: branches: - master - experimental + paths: + - .github/workflows/haskell-ci.yml + - agda-stdlib-utils.cabal + - cabal.haskell-ci + - "*.hs" pull_request: branches: - master - experimental + paths: + - .github/workflows/haskell-ci.yml + - agda-stdlib-utils.cabal + - cabal.haskell-ci + - "*.hs" jobs: linux: name: Haskell-CI - Linux - ${{ matrix.compiler }} @@ -34,14 +44,19 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.4.4 + - compiler: ghc-9.6.1 compilerKind: ghc - compilerVersion: 9.4.4 + compilerVersion: 9.6.1 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.6 + - compiler: ghc-9.4.5 compilerKind: ghc - compilerVersion: 9.2.6 + compilerVersion: 9.4.5 + setup-method: ghcup + allow-failure: false + - compiler: ghc-9.2.7 + compilerKind: ghc + compilerVersion: 9.2.7 setup-method: ghcup allow-failure: false - compiler: ghc-9.0.2 @@ -72,20 +87,18 @@ jobs: apt-get install -y --no-install-recommends gnupg ca-certificates dirmngr curl git software-properties-common libtinfo5 if [ "${{ matrix.setup-method }}" = ghcup ]; then mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; "$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) - "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) else apt-add-repository -y 'ppa:hvr/ghc' apt-get update apt-get install -y "$HCNAME" mkdir -p "$HOME/.ghcup/bin" - curl -sL https://downloads.haskell.org/ghcup/0.1.18.0/x86_64-linux-ghcup-0.1.18.0 > "$HOME/.ghcup/bin/ghcup" + curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" chmod a+x "$HOME/.ghcup/bin/ghcup" - "$HOME/.ghcup/bin/ghcup" config add-release-channel https://raw.githubusercontent.com/haskell/ghcup-metadata/master/ghcup-prereleases-0.0.7.yaml; - "$HOME/.ghcup/bin/ghcup" install cabal 3.9.0.0 || (cat "$HOME"/.ghcup/logs/*.* && false) + "$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) fi env: HCKIND: ${{ matrix.compilerKind }} @@ -103,13 +116,13 @@ jobs: echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HOME/.ghcup/bin/$HCKIND-pkg-$HCVER" >> "$GITHUB_ENV" echo "HADDOCK=$HOME/.ghcup/bin/haddock-$HCVER" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" else HC=$HCDIR/bin/$HCKIND echo "HC=$HC" >> "$GITHUB_ENV" echo "HCPKG=$HCDIR/bin/$HCKIND-pkg" >> "$GITHUB_ENV" echo "HADDOCK=$HCDIR/bin/haddock" >> "$GITHUB_ENV" - echo "CABAL=$HOME/.ghcup/bin/cabal-3.9.0.0 -vnormal+nowrap" >> "$GITHUB_ENV" + echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" fi HCNUMVER=$(${HC} --numeric-version|perl -ne '/^(\d+)\.(\d+)\.(\d+)(\.(\d+))?$/; print(10000 * $1 + 100 * $2 + ($3 == 0 ? $5 != 1 : $3))') @@ -161,8 +174,8 @@ jobs: - name: install cabal-plan run: | mkdir -p $HOME/.cabal/bin - curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.6.2.0/cabal-plan-0.6.2.0-x86_64-linux.xz > cabal-plan.xz - echo 'de73600b1836d3f55e32d80385acc055fd97f60eaa0ab68a755302685f5d81bc cabal-plan.xz' | sha256sum -c - + curl -sL https://github.com/haskell-hvr/cabal-plan/releases/download/v0.7.3.0/cabal-plan-0.7.3.0-x86_64-linux.xz > cabal-plan.xz + echo 'f62ccb2971567a5f638f2005ad3173dba14693a45154c1508645c52289714cb2 cabal-plan.xz' | sha256sum -c - xz -d < cabal-plan.xz > $HOME/.cabal/bin/cabal-plan rm -f cabal-plan.xz chmod a+x $HOME/.cabal/bin/cabal-plan diff --git a/agda-stdlib-utils.cabal b/agda-stdlib-utils.cabal index 880494db15..7d93147747 100644 --- a/agda-stdlib-utils.cabal +++ b/agda-stdlib-utils.cabal @@ -6,8 +6,9 @@ description: Helper programs for setting up the Agda standard library. license: MIT tested-with: - GHC == 9.4.4 - GHC == 9.2.6 + GHC == 9.6.1 + GHC == 9.4.5 + GHC == 9.2.7 GHC == 9.0.2 GHC == 8.10.7 GHC == 8.8.4 @@ -21,7 +22,7 @@ common common-build-parameters PatternSynonyms build-depends: - base >= 4.12.0.0 && < 4.18 + base >= 4.12.0.0 && < 4.19 , filemanip >= 0.3.6.2 && < 0.4 executable GenerateEverything From 0fec2c6c051694d40c5cbe7eab056818984ddf3d Mon Sep 17 00:00:00 2001 From: Guilherme Silva Date: Sat, 10 Jun 2023 08:14:38 +0000 Subject: [PATCH 043/316] Add apartness reasoning (#1973) --- CHANGELOG.md | 12 ++ .../Binary/Reasoning/Base/Apartness.agda | 106 ++++++++++++++++++ 2 files changed, 118 insertions(+) create mode 100644 src/Relation/Binary/Reasoning/Base/Apartness.agda diff --git a/CHANGELOG.md b/CHANGELOG.md index 52b2a6762d..62e7f38907 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3054,3 +3054,15 @@ This is a full list of proofs that have changed form to use irrelevant instance ```agda ↭-reverse : (xs : List A) → reverse xs ↭ xs ``` + +* Added new file `Relation.Binary.Reasoning.Base.Apartness` + +This is how to use it: + ```agda + _ : a # d + _ = begin-apartness + a ≈⟨ a≈b ⟩ + b #⟨ b#c ⟩ + c ≈⟨ c≈d ⟩ + d ∎ + ``` diff --git a/src/Relation/Binary/Reasoning/Base/Apartness.agda b/src/Relation/Binary/Reasoning/Base/Apartness.agda new file mode 100644 index 0000000000..7a52568664 --- /dev/null +++ b/src/Relation/Binary/Reasoning/Base/Apartness.agda @@ -0,0 +1,106 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- The basic code for equational reasoning with three relations: +-- equality and apartness +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +open import Relation.Binary + +module Relation.Binary.Reasoning.Base.Apartness {a ℓ₁ ℓ₂} {A : Set a} + {_≈_ : Rel A ℓ₁} {_#_ : Rel A ℓ₂} + (≈-equiv : IsEquivalence _≈_) + (#-trans : Transitive _#_) (#-sym : Symmetric _#_) + (#-≈-trans : Trans _#_ _≈_ _#_) (≈-#-trans : Trans _≈_ _#_ _#_) + where + +open import Level using (Level; _⊔_) +open import Relation.Binary.PropositionalEquality.Core + using (_≡_; refl; sym) +open import Relation.Nullary.Decidable using (Dec; yes; no) +open import Relation.Nullary.Decidable using (True; toWitness) + +open IsEquivalence ≈-equiv + renaming + ( refl to ≈-refl + ; sym to ≈-sym + ; trans to ≈-trans + ) + +infix 4 _IsRelatedTo_ + +data _IsRelatedTo_ (x y : A) : Set (a ⊔ ℓ₁ ⊔ ℓ₂) where + nothing : x IsRelatedTo y + apartness : (x#y : x # y) → x IsRelatedTo y + equals : (x≈y : x ≈ y) → x IsRelatedTo y + +data IsApartness {x y} : x IsRelatedTo y → Set (a ⊔ ℓ₁ ⊔ ℓ₂) where + isApartness : ∀ x#y → IsApartness (apartness x#y) + +IsApartness? : ∀ {x y} (x#y : x IsRelatedTo y) → Dec (IsApartness x#y) +IsApartness? nothing = no λ() +IsApartness? (apartness x#y) = yes (isApartness x#y) +IsApartness? (equals x≈y) = no (λ ()) + +extractApartness : ∀ {x y} {x#y : x IsRelatedTo y} → IsApartness x#y → x # y +extractApartness (isApartness x#y) = x#y + +data IsEquality {x y} : x IsRelatedTo y → Set (a ⊔ ℓ₁ ⊔ ℓ₂) where + isEquality : ∀ x≈y → IsEquality (equals x≈y) + +IsEquality? : ∀ {x y} (x≲y : x IsRelatedTo y) → Dec (IsEquality x≲y) +IsEquality? nothing = no λ() +IsEquality? (apartness _) = no λ() +IsEquality? (equals x≈y) = yes (isEquality x≈y) + +extractEquality : ∀ {x y} {x≲y : x IsRelatedTo y} → IsEquality x≲y → x ≈ y +extractEquality (isEquality x≈y) = x≈y + +infix 1 begin-apartness_ begin-equality_ +infixr 2 step-≈ step-≈˘ step-≡ step-≡˘ step-# step-#˘ _≡⟨⟩_ +infix 3 _∎ + +begin-apartness_ : ∀ {x y} (r : x IsRelatedTo y) → {s : True (IsApartness? r)} → x # y +begin-apartness_ _ {s} = extractApartness (toWitness s) + +begin-equality_ : ∀ {x y} (r : x IsRelatedTo y) → {s : True (IsEquality? r)} → x ≈ y +begin-equality_ _ {s} = extractEquality (toWitness s) + +step-# : ∀ (x : A) {y z} → y IsRelatedTo z → x # y → x IsRelatedTo z +step-# x nothing _ = nothing +step-# x (apartness y#z) x#y = nothing +step-# x (equals y≈z) x#y = apartness (#-≈-trans x#y y≈z) + +step-#˘ : ∀ (x : A) {y z} → y IsRelatedTo z → y # x → x IsRelatedTo z +step-#˘ x y-z y#x = step-# x y-z (#-sym y#x) + +step-≈ : ∀ (x : A) {y z} → y IsRelatedTo z → x ≈ y → x IsRelatedTo z +step-≈ x nothing x≈y = nothing +step-≈ x (apartness y#z) x≈y = apartness (≈-#-trans x≈y y#z) +step-≈ x (equals y≈z) x≈y = equals (≈-trans x≈y y≈z) + +step-≈˘ : ∀ x {y z} → y IsRelatedTo z → y ≈ x → x IsRelatedTo z +step-≈˘ x y∼z x≈y = step-≈ x y∼z (≈-sym x≈y) + +step-≡ : ∀ (x : A) {y z} → y IsRelatedTo z → x ≡ y → x IsRelatedTo z +step-≡ x nothing _ = nothing +step-≡ x (apartness x#y) refl = apartness x#y +step-≡ x (equals x≈y) refl = equals x≈y + +step-≡˘ : ∀ x {y z} → y IsRelatedTo z → y ≡ x → x IsRelatedTo z +step-≡˘ x y∼z x≡y = step-≡ x y∼z (sym x≡y) + +_≡⟨⟩_ : ∀ (x : A) {y} → x IsRelatedTo y → x IsRelatedTo y +x ≡⟨⟩ x-y = x-y + +_∎ : ∀ x → x IsRelatedTo x +x ∎ = equals ≈-refl + +syntax step-# x y∼z x#y = x #⟨ x#y ⟩ y∼z +syntax step-#˘ x y∼z x#y = x #˘⟨ x#y ⟩ y∼z +syntax step-≈ x y∼z x≈y = x ≈⟨ x≈y ⟩ y∼z +syntax step-≈˘ x y∼z y≈x = x ≈˘⟨ y≈x ⟩ y∼z +syntax step-≡ x y∼z x≡y = x ≡⟨ x≡y ⟩ y∼z +syntax step-≡˘ x y∼z y≡x = x ≡˘⟨ y≡x ⟩ y∼z From fb29b2f063bb6ae6db967af4b514487a99aa1324 Mon Sep 17 00:00:00 2001 From: jamesmckinna <31931406+jamesmckinna@users.noreply.github.com> Date: Sat, 10 Jun 2023 09:23:33 +0100 Subject: [PATCH 044/316] Addd middle four exchange law (#1953) --- CHANGELOG.md | 24 +++++++++++++++ src/Algebra/Consequences/Propositional.agda | 24 ++++++++++++++- src/Algebra/Consequences/Setoid.agda | 34 +++++++++++++++++++++ src/Algebra/Definitions.agda | 4 +++ 4 files changed, 85 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 62e7f38907..d5ba31beaf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1646,8 +1646,30 @@ Other minor changes Involutive _≈_ f ``` +* Added new proofs to `Algebra.Consequences.Propositional`: + ```agda + comm+assoc⇒middleFour : Commutative _•_ → + Associative _•_ → + _•_ MiddleFourExchange _•_ + identity+middleFour⇒assoc : Identity e _•_ → + _•_ MiddleFourExchange _•_ → + Associative _•_ + identity+middleFour⇒comm : Identity e _+_ → + _•_ MiddleFourExchange _+_ → + Commutative _•_ + ``` + * Added new proofs to `Algebra.Consequences.Setoid`: ```agda + comm+assoc⇒middleFour : Congruent₂ _•_ → Commutative _•_ → Associative _•_ → + _•_ MiddleFourExchange _•_ + identity+middleFour⇒assoc : Congruent₂ _•_ → Identity e _•_ → + _•_ MiddleFourExchange _•_ → + Associative _•_ + identity+middleFour⇒comm : Congruent₂ _•_ → Identity e _+_ → + _•_ MiddleFourExchange _+_ → + Commutative _•_ + involutive⇒surjective : Involutive f → Surjective f selfInverse⇒involutive : SelfInverse f → Involutive f selfInverse⇒congruent : SelfInverse f → Congruent f @@ -1711,6 +1733,8 @@ Other minor changes * Added new definition to `Algebra.Definitions`: ```agda + _MiddleFourExchange_ : Op₂ A → Op₂ A → Set _ + SelfInverse : Op₁ A → Set _ LeftDividesˡ : Op₂ A → Op₂ A → Set _ diff --git a/src/Algebra/Consequences/Propositional.agda b/src/Algebra/Consequences/Propositional.agda index 05278fea34..7c3030f4a6 100644 --- a/src/Algebra/Consequences/Propositional.agda +++ b/src/Algebra/Consequences/Propositional.agda @@ -24,7 +24,10 @@ import Algebra.Consequences.Setoid (setoid A) as Base open Base public hiding - ( assoc+distribʳ+idʳ+invʳ⇒zeˡ + ( comm+assoc⇒middleFour + ; identity+middleFour⇒assoc + ; identity+middleFour⇒comm + ; assoc+distribʳ+idʳ+invʳ⇒zeˡ ; assoc+distribˡ+idʳ+invʳ⇒zeʳ ; assoc+id+invʳ⇒invˡ-unique ; assoc+id+invˡ⇒invʳ-unique @@ -90,6 +93,25 @@ module _ {_•_ : Op₂ A} where sel⇒idem : Selective _•_ → Idempotent _•_ sel⇒idem = Base.sel⇒idem _≡_ +------------------------------------------------------------------------ +-- Middle-Four Exchange + +module _ {_•_ : Op₂ A} where + + comm+assoc⇒middleFour : Commutative _•_ → Associative _•_ → + _•_ MiddleFourExchange _•_ + comm+assoc⇒middleFour = Base.comm+assoc⇒middleFour (cong₂ _•_) + + identity+middleFour⇒assoc : {e : A} → Identity e _•_ → + _•_ MiddleFourExchange _•_ → + Associative _•_ + identity+middleFour⇒assoc = Base.identity+middleFour⇒assoc (cong₂ _•_) + + identity+middleFour⇒comm : {_+_ : Op₂ A} {e : A} → Identity e _+_ → + _•_ MiddleFourExchange _+_ → + Commutative _•_ + identity+middleFour⇒comm = Base.identity+middleFour⇒comm (cong₂ _•_) + ------------------------------------------------------------------------ -- Without Loss of Generality diff --git a/src/Algebra/Consequences/Setoid.agda b/src/Algebra/Consequences/Setoid.agda index c51a6ee8b1..77badd1b90 100644 --- a/src/Algebra/Consequences/Setoid.agda +++ b/src/Algebra/Consequences/Setoid.agda @@ -29,6 +29,40 @@ open import Relation.Unary using (Pred) open import Algebra.Consequences.Base public +------------------------------------------------------------------------ +-- MiddleFourExchange + +module _ {_•_ : Op₂ A} (cong : Congruent₂ _•_) where + + comm+assoc⇒middleFour : Commutative _•_ → Associative _•_ → + _•_ MiddleFourExchange _•_ + comm+assoc⇒middleFour comm assoc w x y z = begin + (w • x) • (y • z) ≈⟨ assoc w x (y • z) ⟩ + w • (x • (y • z)) ≈⟨ cong refl (sym (assoc x y z)) ⟩ + w • ((x • y) • z) ≈⟨ cong refl (cong (comm x y) refl) ⟩ + w • ((y • x) • z) ≈⟨ cong refl (assoc y x z) ⟩ + w • (y • (x • z)) ≈⟨ sym (assoc w y (x • z)) ⟩ + (w • y) • (x • z) ∎ + + identity+middleFour⇒assoc : {e : A} → Identity e _•_ → + _•_ MiddleFourExchange _•_ → + Associative _•_ + identity+middleFour⇒assoc {e} (identityˡ , identityʳ) middleFour x y z = begin + (x • y) • z ≈⟨ cong refl (sym (identityˡ z)) ⟩ + (x • y) • (e • z) ≈⟨ middleFour x y e z ⟩ + (x • e) • (y • z) ≈⟨ cong (identityʳ x) refl ⟩ + x • (y • z) ∎ + + identity+middleFour⇒comm : {_+_ : Op₂ A} {e : A} → Identity e _+_ → + _•_ MiddleFourExchange _+_ → + Commutative _•_ + identity+middleFour⇒comm {_+_} {e} (identityˡ , identityʳ) middleFour x y + = begin + x • y ≈⟨ sym (cong (identityˡ x) (identityʳ y)) ⟩ + (e + x) • (y + e) ≈⟨ middleFour e x y e ⟩ + (e + y) • (x + e) ≈⟨ cong (identityˡ y) (identityʳ x) ⟩ + y • x ∎ + ------------------------------------------------------------------------ -- Involutive/SelfInverse functions diff --git a/src/Algebra/Definitions.agda b/src/Algebra/Definitions.agda index e9e082e7e1..c0820fafb7 100644 --- a/src/Algebra/Definitions.agda +++ b/src/Algebra/Definitions.agda @@ -108,6 +108,10 @@ _*_ DistributesOverʳ _+_ = _DistributesOver_ : Op₂ A → Op₂ A → Set _ * DistributesOver + = (* DistributesOverˡ +) × (* DistributesOverʳ +) +_MiddleFourExchange_ : Op₂ A → Op₂ A → Set _ +_*_ MiddleFourExchange _+_ = + ∀ w x y z → ((w + x) * (y + z)) ≈ ((w + y) * (x + z)) + _IdempotentOn_ : Op₂ A → A → Set _ _∙_ IdempotentOn x = (x ∙ x) ≈ x From fd20e62fe88a424c65639698d9cf19e0a5d84413 Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Wed, 14 Jun 2023 20:41:30 -0400 Subject: [PATCH 045/316] Add take-[] and drop-[] to `Data.List.Properties` --- CHANGELOG.md | 6 ++++++ src/Data/List/Properties.agda | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d5ba31beaf..8d64ba03c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2784,6 +2784,12 @@ Other minor changes foldr-map : foldr f x (map g xs) ≡ foldr (g -⟨ f ∣) x xs foldl-map : foldl f x (map g xs) ≡ foldl (∣ f ⟩- g) x xs ``` + + * Added new lemmas in `Data.List.Propreties`: + ``` + take-[] : ∀ m → take m [] ≡ [] + drop-[] : ∀ m → drop m [] ≡ [] + ``` NonZero/Positive/Negative changes --------------------------------- diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index 312ef2e7a8..58d5b39680 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -758,6 +758,11 @@ length-take zero xs = refl length-take (suc n) [] = refl length-take (suc n) (x ∷ xs) = cong suc (length-take n xs) +-- Taking from an empty list does nothing. +take-[] : ∀ m → take {A = A} m [] ≡ [] +take-[] zero = refl +take-[] (suc m) = refl + ------------------------------------------------------------------------ -- drop @@ -766,6 +771,12 @@ length-drop zero xs = refl length-drop (suc n) [] = refl length-drop (suc n) (x ∷ xs) = length-drop n xs +-- Dropping from an empty list does nothing. +drop-[] : ∀ m → drop {A = A} m [] ≡ [] +drop-[] zero = refl +drop-[] (suc m) = refl + + take++drop : ∀ n (xs : List A) → take n xs ++ drop n xs ≡ xs take++drop zero xs = refl take++drop (suc n) [] = refl From d3e8a84d6191b30a516dc4f9b35dcd613bed9451 Mon Sep 17 00:00:00 2001 From: Guilherme Silva Date: Thu, 15 Jun 2023 00:48:17 +0000 Subject: [PATCH 046/316] =?UTF-8?q?Added=20cong=20and=20map=20to=20vec=20?= =?UTF-8?q?=E2=89=8B=20equality=20(#1956)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 10 ++++++++++ src/Data/Vec/Relation/Binary/Equality/Setoid.agda | 7 +++++++ src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda | 10 ++++++++++ 3 files changed, 27 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8d64ba03c3..a2e132acff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3080,6 +3080,16 @@ This is a full list of proofs that have changed form to use irrelevant instance <-weakInduction-startingFrom : P i → (∀ j → P (inject₁ j) → P (suc j)) → ∀ {j} → j ≥ i → P j ``` +* Added new function to `Data.Vec.Relation.Binary.Pointwise.Inductive` + ```agda + cong-[_]≔ : Pointwise _∼_ xs ys → Pointwise _∼_ (xs [ i ]≔ p) (ys [ i ]≔ p) + ``` + +* Added new function to `Data.Vec.Relation.Binary.Equality.Setoid` + ```agda + map-[]≔ : map f (xs [ i ]≔ p) ≋ map f xs [ i ]≔ f p + ``` + * Added new function to `Data.List.Relation.Binary.Permutation.Propositional.Properties` ```agda ↭-reverse : (xs : List A) → reverse xs ↭ xs diff --git a/src/Data/Vec/Relation/Binary/Equality/Setoid.agda b/src/Data/Vec/Relation/Binary/Equality/Setoid.agda index 86ed09b93d..116b104829 100644 --- a/src/Data/Vec/Relation/Binary/Equality/Setoid.agda +++ b/src/Data/Vec/Relation/Binary/Equality/Setoid.agda @@ -12,6 +12,7 @@ module Data.Vec.Relation.Binary.Equality.Setoid {a ℓ} (S : Setoid a ℓ) where open import Data.Nat.Base using (ℕ; zero; suc; _+_) +open import Data.Fin using (zero; suc) open import Data.Vec.Base open import Data.Vec.Relation.Binary.Pointwise.Inductive as PW using (Pointwise) @@ -79,6 +80,12 @@ map-++ : ∀ {b m n} {B : Set b} map-++ f [] = ≋-refl map-++ f (x ∷ xs) = refl ∷ map-++ f xs +map-[]≔ : ∀ {b n} {B : Set b} + (f : B → A) (xs : Vec B n) i p → + map f (xs [ i ]≔ p) ≋ map f xs [ i ]≔ f p +map-[]≔ f (x ∷ xs) zero p = refl ∷ ≋-refl +map-[]≔ f (x ∷ xs) (suc i) p = refl ∷ map-[]≔ f xs i p + ------------------------------------------------------------------------ -- concat diff --git a/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda b/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda index 54a85d7115..e435e2681b 100644 --- a/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda +++ b/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda @@ -217,6 +217,16 @@ module _ {_∼_ : REL A B ℓ} where tabulate⁻ (f₀∼g₀ ∷ _) zero = f₀∼g₀ tabulate⁻ (_ ∷ f∼g) (suc i) = tabulate⁻ f∼g i +------------------------------------------------------------------------ +-- cong + +module _ {_∼_ : Rel A ℓ} (refl : Reflexive _∼_) where + cong-[_]≔ : ∀ {n} i p {xs} {ys} → + Pointwise _∼_ {n} xs ys → + Pointwise _∼_ (xs [ i ]≔ p) (ys [ i ]≔ p) + cong-[ zero ]≔ p (_ ∷ eqn) = refl ∷ eqn + cong-[ suc i ]≔ p (x∼y ∷ eqn) = x∼y ∷ cong-[ i ]≔ p eqn + ------------------------------------------------------------------------ -- Degenerate pointwise relations From 0376427c9a0605d0c6de64819922c475b51439ec Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Sun, 18 Jun 2023 21:25:51 -0400 Subject: [PATCH 047/316] Fixities for `Data` and `Codata` (#1985) --- CHANGELOG.md | 29 +++++++++++++++++++ src/Algebra/Definitions.agda | 2 +- src/Codata/Sized/Conat.agda | 4 ++- src/Data/List/Kleene/Base.agda | 4 +++ src/Data/List/Membership/Propositional.agda | 2 ++ src/Data/List/Reflection.agda | 2 ++ .../Binary/Equality/DecPropositional.agda | 2 ++ .../Relation/Binary/Prefix/Heterogeneous.agda | 2 ++ .../Relation/Binary/Suffix/Heterogeneous.agda | 2 ++ src/Data/List/Relation/Ternary/Appending.agda | 2 ++ .../Ternary/Appending/Propositional.agda | 2 ++ src/Data/List/Relation/Unary/Any.agda | 2 ++ src/Data/Parity/Base.agda | 2 ++ .../Function/NonDependent/Propositional.agda | 4 +++ .../Product/Function/NonDependent/Setoid.agda | 6 ++++ src/Data/Sum/Function/Propositional.agda | 4 +++ src/Data/Sum/Function/Setoid.agda | 5 ++++ src/Data/Vec/Membership/Setoid.agda | 2 ++ src/Data/Vec/Reflection.agda | 2 ++ 19 files changed, 78 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a2e132acff..2dd7726462 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -29,6 +29,35 @@ Highlights Bug-fixes --------- +* The following operators were missing a fixity declaration, which has now + been fixed - + ``` + infix 4 _ℕ<_ _ℕ≤infinity _ℕ≤_ (Codata.Sized.Conat) + infix 6 _ℕ+_ _+ℕ_ (Codata.Sized.Conat) + infixl 4 _+ _* (Data.List.Kleene.Base) + infixr 4 _++++_ _+++*_ _*+++_ _*++*_ (Data.List.Kleene.Base) + infix 4 _[_]* _[_]+ (Data.List.Kleene.Base) + infix 4 _≢∈_ (Data.List.Membership.Propositional) + infixr 5 _`∷_ (Data.List.Reflection) + infix 4 _≡?_ (Data.List.Relation.Binary.Equality.DecPropositional) + infixr 5 _++ᵖ_ (Data.List.Relation.Binary.Prefix.Heterogeneous) + infixr 5 _++ˢ_ (Data.List.Relation.Binary.Suffix.Heterogeneous) + infixr 5 _++_ _++[] (Data.List.Relation.Ternary.Appending.Propositional) + infixr 5 _∷=_ (Data.List.Relation.Unary.Any) + infixr 5 _++_ (Data.List.Ternary.Appending) + infixr 2 _×-⇔_ _×-↣_ _×-↞_ _×-↠_ _×-↔_ _×-cong_ (Data.Product.Function.NonDependent.Propositional) + infixr 2 _×-⟶_ (Data.Product.Function.NonDependent.Setoid) + infixr 2 _×-equivalence_ _×-injection_ _×-left-inverse_ (Data.Product.Function.NonDependent.Setoid) + infixr 2 _×-surjection_ _×-inverse_ (Data.Product.Function.NonDependent.Setoid) + infixr 1 _⊎-⇔_ _⊎-↣_ _⊎-↞_ _⊎-↠_ _⊎-↔_ _⊎-cong_ (Data.Sum.Function.Propositional) + infixr 1 _⊎-⟶_ (Data.Sum.Function.Setoid) + infixr 1 _⊎-equivalence_ _⊎-injection_ _⊎-left-inverse_ (Data.Sum.Function.Setoid) + infixr 1 _⊎-surjection_ _⊎-inverse_ (Data.Sum.Function.Setoid) + infix 8 _⁻¹ (Data.Parity.Base) + infixr 5 _`∷_ (Data.Vec.Reflection) + infixr 5 _∷=_ (Data.Vec.Membership.Setoid) + ``` + * In `System.Exit`, the `ExitFailure` constructor is now carrying an integer rather than a natural. The previous binding was incorrectly assuming that all exit codes where non-negative. diff --git a/src/Algebra/Definitions.agda b/src/Algebra/Definitions.agda index c0820fafb7..e64fc4f30b 100644 --- a/src/Algebra/Definitions.agda +++ b/src/Algebra/Definitions.agda @@ -109,7 +109,7 @@ _DistributesOver_ : Op₂ A → Op₂ A → Set _ * DistributesOver + = (* DistributesOverˡ +) × (* DistributesOverʳ +) _MiddleFourExchange_ : Op₂ A → Op₂ A → Set _ -_*_ MiddleFourExchange _+_ = +_*_ MiddleFourExchange _+_ = ∀ w x y z → ((w + x) * (y + z)) ≈ ((w + y) * (x + z)) _IdempotentOn_ : Op₂ A → A → Set _ diff --git a/src/Codata/Sized/Conat.agda b/src/Codata/Sized/Conat.agda index 8711e26199..d57e3e56e7 100644 --- a/src/Codata/Sized/Conat.agda +++ b/src/Codata/Sized/Conat.agda @@ -35,7 +35,7 @@ pred : ∀ {i} {j : Size< i} → Conat i → Conat j pred zero = zero pred (suc n) = n .force -infixl 6 _∸_ _+_ +infixl 6 _∸_ _+_ _ℕ+_ _+ℕ_ infixl 7 _*_ _∸_ : Conat ∞ → ℕ → Conat ∞ @@ -91,6 +91,8 @@ toℕ (suc n) = suc (toℕ n) ------------------------------------------------------------------------ -- Order wrt to Nat +infix 4 _ℕ<_ _ℕ≤infinity _ℕ≤_ + data _ℕ≤_ : ℕ → Conat ∞ → Set where zℕ≤n : ∀ {n} → zero ℕ≤ n sℕ≤s : ∀ {k n} → k ℕ≤ n .force → suc k ℕ≤ suc n diff --git a/src/Data/List/Kleene/Base.agda b/src/Data/List/Kleene/Base.agda index 906af96ea1..c8476318b7 100644 --- a/src/Data/List/Kleene/Base.agda +++ b/src/Data/List/Kleene/Base.agda @@ -40,6 +40,7 @@ private -- simplify certain proofs. infixr 5 _&_ ∹_ +infixl 4 _+ _* record _+ {a} (A : Set a) : Set a data _* {a} (A : Set a) : Set a @@ -101,6 +102,7 @@ module _ (f : B → A → B) where -- Concatenation module Concat where + infixr 4 _++++_ _+++*_ _*+++_ _*++*_ _++++_ : A + → A + → A + _+++*_ : A + → A * → A + _*+++_ : A * → A + → A + @@ -270,6 +272,8 @@ module _ (f : A → Maybe B → B) where ------------------------------------------------------------------------ -- Indexing +infix 4 _[_]* _[_]+ + _[_]* : A * → ℕ → Maybe A _[_]+ : A + → ℕ → Maybe A diff --git a/src/Data/List/Membership/Propositional.agda b/src/Data/List/Membership/Propositional.agda index 84ce10c8ba..4a74db3d04 100644 --- a/src/Data/List/Membership/Propositional.agda +++ b/src/Data/List/Membership/Propositional.agda @@ -22,6 +22,8 @@ open SetoidMembership (setoid A) public hiding (lose) ------------------------------------------------------------------------ -- Different members +infix 4 _≢∈_ + _≢∈_ : ∀ {x y : A} {xs} → x ∈ xs → y ∈ xs → Set _ _≢∈_ x∈xs y∈xs = ∀ x≡y → subst (_∈ _) x≡y x∈xs ≢ y∈xs diff --git a/src/Data/List/Reflection.agda b/src/Data/List/Reflection.agda index 20063430c4..3d4ab919a1 100644 --- a/src/Data/List/Reflection.agda +++ b/src/Data/List/Reflection.agda @@ -24,6 +24,8 @@ open import Reflection.AST.Argument `[] : Term `[] = con (quote List.[]) (2 ⋯⟅∷⟆ []) +infixr 5 _`∷_ + _`∷_ : Term → Term → Term x `∷ xs = con (quote List._∷_) (2 ⋯⟅∷⟆ x ⟨∷⟩ xs ⟨∷⟩ []) diff --git a/src/Data/List/Relation/Binary/Equality/DecPropositional.agda b/src/Data/List/Relation/Binary/Equality/DecPropositional.agda index 6410ef418c..1697020ed3 100644 --- a/src/Data/List/Relation/Binary/Equality/DecPropositional.agda +++ b/src/Data/List/Relation/Binary/Equality/DecPropositional.agda @@ -32,5 +32,7 @@ open DecSetoidEq (decSetoid _≟_) public ------------------------------------------------------------------------ -- Additional proofs +infix 4 _≡?_ + _≡?_ : Decidable (_≡_ {A = List A}) _≡?_ = ≡-dec _≟_ diff --git a/src/Data/List/Relation/Binary/Prefix/Heterogeneous.agda b/src/Data/List/Relation/Binary/Prefix/Heterogeneous.agda index 648663fc95..bf107dfcc3 100644 --- a/src/Data/List/Relation/Binary/Prefix/Heterogeneous.agda +++ b/src/Data/List/Relation/Binary/Prefix/Heterogeneous.agda @@ -45,6 +45,8 @@ module _ {a b r s} {A : Set a} {B : Set b} {R : REL A B r} {S : REL A B s} where module _ {a b r} {A : Set a} {B : Set b} {R : REL A B r} where + infixr 5 _++ᵖ_ + _++ᵖ_ : ∀ {as bs} → Prefix R as bs → ∀ suf → Prefix R as (bs List.++ suf) [] ++ᵖ suf = [] (r ∷ rs) ++ᵖ suf = r ∷ (rs ++ᵖ suf) diff --git a/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda b/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda index 1d84c07b50..984b857c59 100644 --- a/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda +++ b/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda @@ -31,6 +31,8 @@ module _ {a b r} {A : Set a} {B : Set b} {R : REL A B r} where tail (here (_ ∷ rs)) = there (here rs) tail (there x) = there (tail x) + infixr 5 _++ˢ_ + _++ˢ_ : ∀ pre {as bs} → Suffix R as bs → Suffix R as (pre List.++ bs) [] ++ˢ rs = rs (x ∷ xs) ++ˢ rs = there (xs ++ˢ rs) diff --git a/src/Data/List/Relation/Ternary/Appending.agda b/src/Data/List/Relation/Ternary/Appending.agda index 025364f122..75e50d15af 100644 --- a/src/Data/List/Relation/Ternary/Appending.agda +++ b/src/Data/List/Relation/Ternary/Appending.agda @@ -38,6 +38,8 @@ module _ (L : REL A C l) (R : REL B C r) where ------------------------------------------------------------------------ -- Functions manipulating Appending +infixr 5 _++_ + _++_ : ∀ {cs₁ cs₂ : List C} → Pointwise L as cs₁ → Pointwise R bs cs₂ → Appending L R as bs (cs₁ List.++ cs₂) [] ++ rs = []++ rs diff --git a/src/Data/List/Relation/Ternary/Appending/Propositional.agda b/src/Data/List/Relation/Ternary/Appending/Propositional.agda index 46cb27f75e..6149e2a236 100644 --- a/src/Data/List/Relation/Ternary/Appending/Propositional.agda +++ b/src/Data/List/Relation/Ternary/Appending/Propositional.agda @@ -32,6 +32,8 @@ open General public ------------------------------------------------------------------------ -- Definition +infixr 5 _++_ _++[] + _++_ : (as bs : List A) → Appending as bs (as List.++ bs) as ++ bs = Pw.≡⇒Pointwise-≡ refl General.++ Pw.≡⇒Pointwise-≡ refl diff --git a/src/Data/List/Relation/Unary/Any.agda b/src/Data/List/Relation/Unary/Any.agda index 58bdc3a5fa..19af845152 100644 --- a/src/Data/List/Relation/Unary/Any.agda +++ b/src/Data/List/Relation/Unary/Any.agda @@ -62,6 +62,8 @@ index (there pxs) = suc (index pxs) lookup : {P : Pred A p} → Any P xs → A lookup {xs = xs} p = List.lookup xs (index p) +infixr 5 _∷=_ + _∷=_ : {P : Pred A p} → Any P xs → A → List A _∷=_ {xs = xs} x∈xs v = xs List.[ index x∈xs ]∷= v diff --git a/src/Data/Parity/Base.agda b/src/Data/Parity/Base.agda index 6f9e85f9a0..0ac22a9c7a 100644 --- a/src/Data/Parity/Base.agda +++ b/src/Data/Parity/Base.agda @@ -26,6 +26,8 @@ data Parity : Set where -- The opposite parity. +infix 8 _⁻¹ + _⁻¹ : Parity → Parity 1ℙ ⁻¹ = 0ℙ 0ℙ ⁻¹ = 1ℙ diff --git a/src/Data/Product/Function/NonDependent/Propositional.agda b/src/Data/Product/Function/NonDependent/Propositional.agda index f5b4973184..e686cbad6e 100644 --- a/src/Data/Product/Function/NonDependent/Propositional.agda +++ b/src/Data/Product/Function/NonDependent/Propositional.agda @@ -27,6 +27,8 @@ open import Function.Surjection as Surj using (_↠_; module Surjection) module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where + infixr 2 _×-⇔_ _×-↣_ _×-↞_ _×-↠_ _×-↔_ + _×-⇔_ : A ⇔ B → C ⇔ D → (A × C) ⇔ (B × D) _×-⇔_ A⇔B C⇔D = Inverse.equivalence Pointwise-≡↔≡ ⟨∘⟩ @@ -64,6 +66,8 @@ module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where + infixr 2 _×-cong_ + _×-cong_ : ∀ {k} → A ∼[ k ] B → C ∼[ k ] D → (A × C) ∼[ k ] (B × D) _×-cong_ {implication} = λ f g → map f g _×-cong_ {reverse-implication} = λ f g → lam (map (app-← f) (app-← g)) diff --git a/src/Data/Product/Function/NonDependent/Setoid.agda b/src/Data/Product/Function/NonDependent/Setoid.agda index 830e25864b..eb1a369710 100644 --- a/src/Data/Product/Function/NonDependent/Setoid.agda +++ b/src/Data/Product/Function/NonDependent/Setoid.agda @@ -33,6 +33,8 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 2 _×-⟶_ + _×-⟶_ : (A ⟶ B) → (C ⟶ D) → (A ×ₛ C) ⟶ (B ×ₛ D) _×-⟶_ f g = record { _⟨$⟩_ = fg @@ -76,6 +78,8 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 2 _×-equivalence_ _×-injection_ _×-left-inverse_ + _×-equivalence_ : Equivalence A B → Equivalence C D → Equivalence (A ×ₛ C) (B ×ₛ D) _×-equivalence_ A⇔B C⇔D = record @@ -110,6 +114,8 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 2 _×-surjection_ _×-inverse_ + _×-surjection_ : Surjection A B → Surjection C D → Surjection (A ×ₛ C) (B ×ₛ D) A↠B ×-surjection C↠D = record diff --git a/src/Data/Sum/Function/Propositional.agda b/src/Data/Sum/Function/Propositional.agda index e754ee2356..a22aa64c4a 100644 --- a/src/Data/Sum/Function/Propositional.agda +++ b/src/Data/Sum/Function/Propositional.agda @@ -24,6 +24,8 @@ open import Function.Surjection as Surj using (_↠_; module Surjection) module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where + infixr 1 _⊎-⇔_ _⊎-↣_ _⊎-↞_ _⊎-↠_ _⊎-↔_ + _⊎-⇔_ : A ⇔ B → C ⇔ D → (A ⊎ C) ⇔ (B ⊎ D) _⊎-⇔_ A⇔B C⇔D = Inverse.equivalence (Pointwise-≡↔≡ B D) ⟨∘⟩ @@ -61,6 +63,8 @@ module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where module _ {a b c d} {A : Set a} {B : Set b} {C : Set c} {D : Set d} where + infixr 1 _⊎-cong_ + _⊎-cong_ : ∀ {k} → A ∼[ k ] B → C ∼[ k ] D → (A ⊎ C) ∼[ k ] (B ⊎ D) _⊎-cong_ {implication} = map _⊎-cong_ {reverse-implication} = λ f g → lam (map (app-← f) (app-← g)) diff --git a/src/Data/Sum/Function/Setoid.agda b/src/Data/Sum/Function/Setoid.agda index e024dc0939..277d5feb98 100644 --- a/src/Data/Sum/Function/Setoid.agda +++ b/src/Data/Sum/Function/Setoid.agda @@ -32,6 +32,8 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 1 _⊎-⟶_ + _⊎-⟶_ : (A ⟶ B) → (C ⟶ D) → (A ⊎ₛ C) ⟶ (B ⊎ₛ D) _⊎-⟶_ f g = record { _⟨$⟩_ = fg @@ -77,6 +79,8 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 1 _⊎-equivalence_ _⊎-injection_ _⊎-left-inverse_ + _⊎-equivalence_ : Equivalence A B → Equivalence C D → Equivalence (A ⊎ₛ C) (B ⊎ₛ D) A⇔B ⊎-equivalence C⇔D = record @@ -119,6 +123,7 @@ module _ {a₁ a₂ b₁ b₂ c₁ c₂ d₁ d₂} {C : Setoid c₁ c₂} {D : Setoid d₁ d₂} where + infixr 1 _⊎-surjection_ _⊎-inverse_ _⊎-surjection_ : Surjection A B → Surjection C D → Surjection (A ⊎ₛ C) (B ⊎ₛ D) A↠B ⊎-surjection C↠D = record diff --git a/src/Data/Vec/Membership/Setoid.agda b/src/Data/Vec/Membership/Setoid.agda index 42b4b6ffd0..1151aecf6f 100644 --- a/src/Data/Vec/Membership/Setoid.agda +++ b/src/Data/Vec/Membership/Setoid.agda @@ -39,6 +39,8 @@ mapWith∈ : ∀ {b} {B : Set b} {n} mapWith∈ [] f = [] mapWith∈ (x ∷ xs) f = f (here refl) ∷ mapWith∈ xs (f ∘ there) +infixr 5 _∷=_ + _∷=_ : ∀ {n} {xs : Vec A n} {x} → x ∈ xs → A → Vec A n _∷=_ {xs = xs} x∈xs v = xs Vec.[ index x∈xs ]≔ v diff --git a/src/Data/Vec/Reflection.agda b/src/Data/Vec/Reflection.agda index 91d5579c94..8b0fa7799f 100644 --- a/src/Data/Vec/Reflection.agda +++ b/src/Data/Vec/Reflection.agda @@ -25,6 +25,8 @@ open import Reflection.AST.Argument `[] : Term `[] = con (quote []) (2 ⋯⟅∷⟆ List.[]) +infixr 5 _`∷_ + _`∷_ : Term → Term → Term _`∷_ x xs = con (quote _∷_) (3 ⋯⟅∷⟆ x ⟨∷⟩ xs ⟨∷⟩ List.[]) From 662374e3777a850d1a87f0fadb5a98d8645e807c Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Sun, 18 Jun 2023 21:28:56 -0400 Subject: [PATCH 048/316] Get rid of redundant dependencies in `System.Console.ANSI` (#1994) --- src/Data/Nat/Show.agda | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Data/Nat/Show.agda b/src/Data/Nat/Show.agda index 454bc95b76..9f0fdf2bb5 100644 --- a/src/Data/Nat/Show.agda +++ b/src/Data/Nat/Show.agda @@ -17,7 +17,7 @@ open import Data.Maybe.Base as Maybe using (Maybe; nothing; _<∣>_; when) import Data.Maybe.Effectful as Maybe open import Data.Nat open import Data.Product using (proj₁) -open import Data.String as String using (String) +open import Data.String.Base using (toList; fromList; String) open import Function.Base open import Relation.Nullary.Decidable using (True) @@ -28,7 +28,7 @@ readMaybe : ∀ base {base≤16 : True (base ≤? 16)} → String → Maybe ℕ readMaybe _ "" = nothing readMaybe base = Maybe.map convert ∘′ TraversableA.mapA Maybe.applicative readDigit - ∘′ String.toList + ∘′ toList where @@ -62,7 +62,7 @@ toDecimalChars : ℕ → List Char toDecimalChars = List.map toDigitChar ∘′ toNatDigits 10 show : ℕ → String -show = String.fromList ∘ toDecimalChars +show = fromList ∘ toDecimalChars -- Arbitrary base betwen 2 & 16. -- Warning: when compiled the time complexity of `showInBase b n` is @@ -81,5 +81,5 @@ showInBase : (base : ℕ) {base≥2 : True (2 ≤? base)} {base≤16 : True (base ≤? 16)} → ℕ → String -showInBase base {base≥2} {base≤16} = String.fromList +showInBase base {base≥2} {base≤16} = fromList ∘ charsInBase base {base≥2} {base≤16} From d9476c4d746325ca56ba921165471f7fba74c680 Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Sun, 18 Jun 2023 21:33:04 -0400 Subject: [PATCH 049/316] Move location of `take-[]` and `drop-[]` in CHANGELOG.md (#1991) --- CHANGELOG.md | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2dd7726462..628862540d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2082,6 +2082,9 @@ Other minor changes length-isMagmaHomomorphism : (A : Set a) → IsMagmaHomomorphism (++-rawMagma A) +-rawMagma length length-isMonoidHomomorphism : (A : Set a) → IsMonoidHomomorphism (++-[]-rawMonoid A) +-0-rawMonoid length + + take-[] : ∀ m → take m [] ≡ [] + drop-[] : ∀ m → drop m [] ≡ [] ``` * Added new patterns and definitions to `Data.Nat.Base`: @@ -2813,12 +2816,6 @@ Other minor changes foldr-map : foldr f x (map g xs) ≡ foldr (g -⟨ f ∣) x xs foldl-map : foldl f x (map g xs) ≡ foldl (∣ f ⟩- g) x xs ``` - - * Added new lemmas in `Data.List.Propreties`: - ``` - take-[] : ∀ m → take m [] ≡ [] - drop-[] : ∀ m → drop m [] ≡ [] - ``` NonZero/Positive/Negative changes --------------------------------- From be4a71dfcc4d18f99e6b3f91811329ee084ba322 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Mon, 19 Jun 2023 10:10:41 -0400 Subject: [PATCH 050/316] =?UTF-8?q?Migrate=20`=5F=E2=86=94=CC=87=5F`=20to?= =?UTF-8?q?=20the=20new=20Function=20hierarchy=20+=20more=20arrows=20for?= =?UTF-8?q?=20indexed=20sets=20(#1982)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 6 ++++ src/Function/Indexed/Bundles.agda | 50 +++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 src/Function/Indexed/Bundles.agda diff --git a/CHANGELOG.md b/CHANGELOG.md index 628862540d..ad581d93fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1624,6 +1624,12 @@ New modules ``` Algebra.Properties.KleeneAlgebra ``` + +* Relations on indexed sets + ``` + Function.Indexed.Bundles + ``` + Other minor changes ------------------- diff --git a/src/Function/Indexed/Bundles.agda b/src/Function/Indexed/Bundles.agda new file mode 100644 index 0000000000..033cabd426 --- /dev/null +++ b/src/Function/Indexed/Bundles.agda @@ -0,0 +1,50 @@ +------------------------------------------------------------------------ +-- The Agda standard library +-- +-- Operations on Relations for Indexed sets +------------------------------------------------------------------------ + +{-# OPTIONS --cubical-compatible --safe #-} + +module Function.Indexed.Bundles where + +open import Relation.Unary using (Pred) +open import Function.Bundles using (_⟶_; _↣_; _↠_; _⤖_; _⇔_; _↩_; _↪_; _↩↪_; _↔_) +open import Relation.Binary hiding (_⇔_) +open import Level using (Level) + +private + variable + a b ℓ₁ ℓ₂ : Level + +------------------------------------------------------------------------ +-- Bundles specialised for lifting relations to indexed sets +------------------------------------------------------------------------ + +infix 3 _⟶ᵢ_ _↣ᵢ_ _↠ᵢ_ _⤖ᵢ_ _⇔ᵢ_ _↩ᵢ_ _↪ᵢ_ _↩↪ᵢ_ _↔ᵢ_ +_⟶ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ⟶ᵢ B = ∀ {i} → A i ⟶ B i + +_↣ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↣ᵢ B = ∀ {i} → A i ↣ B i + +_↠ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↠ᵢ B = ∀ {i} → A i ↠ B i + +_⤖ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ⤖ᵢ B = ∀ {i} → A i ⤖ B i + +_⇔ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ⇔ᵢ B = ∀ {i} → A i ⇔ B i + +_↩ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↩ᵢ B = ∀ {i} → A i ↩ B i + +_↪ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↪ᵢ B = ∀ {i} → A i ↪ B i + +_↩↪ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↩↪ᵢ B = ∀ {i} → A i ↩↪ B i + +_↔ᵢ_ : ∀ {i} {I : Set i} → Pred I a → Pred I b → Set _ +A ↔ᵢ B = ∀ {i} → A i ↔ B i From 41bcad30f76a7ea43939ec6c904e380d776414f9 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Mon, 19 Jun 2023 10:11:09 -0400 Subject: [PATCH 051/316] Fixities for `Function`, `Data`, and `Reflection` (#1987) --- CHANGELOG.md | 22 ++++++++++++++++++- .../Relation/Binary/Equality/Setoid.agda | 2 ++ src/Data/Vec/N-ary.agda | 2 ++ src/Function/Endomorphism/Propositional.agda | 2 ++ src/Function/Endomorphism/Setoid.agda | 2 ++ src/Function/HalfAdjointEquivalence.agda | 2 ++ src/Function/Metric/Bundles.agda | 7 ++++++ src/Function/Metric/Nat/Bundles.agda | 6 +++++ src/Function/Related.agda | 2 ++ src/Reflection/AST/Argument/Information.agda | 2 ++ src/Reflection/AST/Argument/Modality.agda | 2 ++ src/Reflection/AST/Argument/Quantity.agda | 2 ++ src/Reflection/AST/Argument/Relevance.agda | 2 ++ src/Reflection/AST/Argument/Visibility.agda | 2 ++ src/Reflection/AST/Definition.agda | 2 ++ src/Reflection/AST/Literal.agda | 2 ++ src/Reflection/AST/Meta.agda | 3 ++- src/Reflection/AST/Name.agda | 4 ++-- src/Reflection/AST/Term.agda | 2 +- 19 files changed, 65 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ad581d93fa..e33d919313 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,7 +31,27 @@ Bug-fixes * The following operators were missing a fixity declaration, which has now been fixed - - ``` + ``` + infix -1 _$ⁿ_ (Data.Vec.N-ary) + infix 4 _≋_ (Data.Vec.Functional.Relation.Binary.Equality.Setoid) + infix 4 _≟_ (Reflection.AST.Definition) + infix 4 _≡ᵇ_ (Reflection.AST.Literal) + infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Meta) + infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Name) + infix 4 _≟-Telescope_ (Reflection.AST.Term) + infix 4 _≟_ (Reflection.AST.Argument.Information) + infix 4 _≟_ (Reflection.AST.Argument.Modality) + infix 4 _≟_ (Reflection.AST.Argument.Quantity) + infix 4 _≟_ (Reflection.AST.Argument.Relevance) + infix 4 _≟_ (Reflection.AST.Argument.Visibility) + infixr 8 _^_ (Function.Endomorphism.Propositional) + infixr 8 _^_ (Function.Endomorphism.Setoid) + infix 4 _≃_ (Function.HalfAdjointEquivalence) + infix 4 _≈_ _≈ᵢ_ _≤_ (Function.Metric.Bundles) + infixl 6 _∙_ (Function.Metric.Bundles) + infix 4 _≈_ (Function.Metric.Nat.Bundles) + infix 3 _←_ _↢_ (Function.Related) + infix 4 _ℕ<_ _ℕ≤infinity _ℕ≤_ (Codata.Sized.Conat) infix 6 _ℕ+_ _+ℕ_ (Codata.Sized.Conat) infixl 4 _+ _* (Data.List.Kleene.Base) diff --git a/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda b/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda index 932ac19c95..8b29e710f8 100644 --- a/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda +++ b/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda @@ -24,6 +24,8 @@ open Setoid S renaming (Carrier to A) -- Definition ------------------------------------------------------------------------ +infix 4 _≋_ + _≋_ : ∀ {n} → Vector A n → Vector A n → Set ℓ _≋_ = Pointwise _≈_ diff --git a/src/Data/Vec/N-ary.agda b/src/Data/Vec/N-ary.agda index 02b6e704ba..7e10c5567c 100644 --- a/src/Data/Vec/N-ary.agda +++ b/src/Data/Vec/N-ary.agda @@ -45,6 +45,8 @@ curryⁿ : ∀ {n} → (Vec A n → B) → N-ary n A B curryⁿ {n = zero} f = f [] curryⁿ {n = suc n} f = λ x → curryⁿ (f ∘ _∷_ x) +infix -1 _$ⁿ_ + _$ⁿ_ : ∀ {n} → N-ary n A B → (Vec A n → B) f $ⁿ [] = f f $ⁿ (x ∷ xs) = f x $ⁿ xs diff --git a/src/Function/Endomorphism/Propositional.agda b/src/Function/Endomorphism/Propositional.agda index 32a5522318..8a78f69496 100644 --- a/src/Function/Endomorphism/Propositional.agda +++ b/src/Function/Endomorphism/Propositional.agda @@ -43,6 +43,8 @@ toSetoidEndo f = record ------------------------------------------------------------------------ -- N-th composition +infixr 8 _^_ + _^_ : Endo → ℕ → Endo f ^ zero = id f ^ suc n = f ∘′ (f ^ n) diff --git a/src/Function/Endomorphism/Setoid.agda b/src/Function/Endomorphism/Setoid.agda index 9c3d18e7f4..b02976db88 100644 --- a/src/Function/Endomorphism/Setoid.agda +++ b/src/Function/Endomorphism/Setoid.agda @@ -35,6 +35,8 @@ private Endo : Set _ Endo = S ⟶ S +infixr 8 _^_ + _^_ : Endo → ℕ → Endo f ^ zero = id f ^ suc n = f ∘ (f ^ n) diff --git a/src/Function/HalfAdjointEquivalence.agda b/src/Function/HalfAdjointEquivalence.agda index f600dfe759..59b11d5f69 100644 --- a/src/Function/HalfAdjointEquivalence.agda +++ b/src/Function/HalfAdjointEquivalence.agda @@ -16,6 +16,8 @@ open import Relation.Binary.PropositionalEquality -- Half adjoint equivalences (see the HoTT book). +infix 4 _≃_ + record _≃_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where field to : A → B diff --git a/src/Function/Metric/Bundles.agda b/src/Function/Metric/Bundles.agda index 7acf81de13..ad3a29c333 100644 --- a/src/Function/Metric/Bundles.agda +++ b/src/Function/Metric/Bundles.agda @@ -22,6 +22,7 @@ open import Function.Metric.Core record ProtoMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) : Set (suc (a ⊔ i ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where + infix 4 _≈_ _≈ᵢ_ _≤_ field Carrier : Set a Image : Set i @@ -39,6 +40,7 @@ record ProtoMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) record PreMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) : Set (suc (a ⊔ i ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where + infix 4 _≈_ _≈ᵢ_ _≤_ field Carrier : Set a Image : Set i @@ -61,6 +63,8 @@ record PreMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) record QuasiSemiMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) : Set (suc (a ⊔ i ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where + + infix 4 _≈_ _≈ᵢ_ _≤_ field Carrier : Set a Image : Set i @@ -86,6 +90,7 @@ record QuasiSemiMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) record SemiMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) : Set (suc (a ⊔ i ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where + infix 4 _≈_ _≈ᵢ_ _≤_ field Carrier : Set a Image : Set i @@ -120,6 +125,8 @@ record SemiMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) record GeneralMetric (a i ℓ₁ ℓ₂ ℓ₃ : Level) : Set (suc (a ⊔ i ⊔ ℓ₁ ⊔ ℓ₂ ⊔ ℓ₃)) where + infix 4 _≈_ _≈ᵢ_ _≤_ + infixl 6 _∙_ field Carrier : Set a Image : Set i diff --git a/src/Function/Metric/Nat/Bundles.agda b/src/Function/Metric/Nat/Bundles.agda index 3e406d7611..e0983246eb 100644 --- a/src/Function/Metric/Nat/Bundles.agda +++ b/src/Function/Metric/Nat/Bundles.agda @@ -28,6 +28,7 @@ open import Function.Metric.Bundles as Base -- Proto-metric record ProtoMetric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ @@ -40,6 +41,7 @@ record ProtoMetric a ℓ : Set (suc (a ⊔ ℓ)) where -- PreMetric record PreMetric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ @@ -57,6 +59,7 @@ record PreMetric a ℓ : Set (suc (a ⊔ ℓ)) where -- QuasiSemiMetric record QuasiSemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ @@ -77,6 +80,7 @@ record QuasiSemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where -- SemiMetric record SemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ @@ -97,6 +101,7 @@ record SemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where -- Metrics record Metric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ @@ -117,6 +122,7 @@ record Metric a ℓ : Set (suc (a ⊔ ℓ)) where -- UltraMetrics record UltraMetric a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ diff --git a/src/Function/Related.agda b/src/Function/Related.agda index 0746b3c14a..fa114d077c 100644 --- a/src/Function/Related.agda +++ b/src/Function/Related.agda @@ -53,6 +53,8 @@ open R public using -- (which implies that Agda can deduce the universe code from an -- expression matching any of the right-hand sides). +infix 3 _←_ _↢_ + record _←_ {a b} (A : Set a) (B : Set b) : Set (a ⊔ b) where constructor lam field app-← : B → A diff --git a/src/Reflection/AST/Argument/Information.agda b/src/Reflection/AST/Argument/Information.agda index 3e97598d46..fe09976fb9 100644 --- a/src/Reflection/AST/Argument/Information.agda +++ b/src/Reflection/AST/Argument/Information.agda @@ -48,6 +48,8 @@ arg-info-injective₂ refl = refl arg-info-injective : arg-info v m ≡ arg-info v′ m′ → v ≡ v′ × m ≡ m′ arg-info-injective = < arg-info-injective₁ , arg-info-injective₂ > +infix 4 _≟_ + _≟_ : DecidableEquality ArgInfo arg-info v m ≟ arg-info v′ m′ = map′ diff --git a/src/Reflection/AST/Argument/Modality.agda b/src/Reflection/AST/Argument/Modality.agda index 1e39783349..95f15b2264 100644 --- a/src/Reflection/AST/Argument/Modality.agda +++ b/src/Reflection/AST/Argument/Modality.agda @@ -48,6 +48,8 @@ modality-injective₂ refl = refl modality-injective : modality r q ≡ modality r′ q′ → r ≡ r′ × q ≡ q′ modality-injective = < modality-injective₁ , modality-injective₂ > +infix 4 _≟_ + _≟_ : DecidableEquality Modality modality r q ≟ modality r′ q′ = map′ diff --git a/src/Reflection/AST/Argument/Quantity.agda b/src/Reflection/AST/Argument/Quantity.agda index 3942a667a1..0c53a521c1 100644 --- a/src/Reflection/AST/Argument/Quantity.agda +++ b/src/Reflection/AST/Argument/Quantity.agda @@ -21,6 +21,8 @@ open Quantity public ------------------------------------------------------------------------ -- Decidable equality +infix 4 _≟_ + _≟_ : DecidableEquality Quantity quantity-ω ≟ quantity-ω = yes refl quantity-0 ≟ quantity-0 = yes refl diff --git a/src/Reflection/AST/Argument/Relevance.agda b/src/Reflection/AST/Argument/Relevance.agda index 1ec1606453..6cdce1d96f 100644 --- a/src/Reflection/AST/Argument/Relevance.agda +++ b/src/Reflection/AST/Argument/Relevance.agda @@ -21,6 +21,8 @@ open Relevance public ------------------------------------------------------------------------ -- Decidable equality +infix 4 _≟_ + _≟_ : DecidableEquality Relevance relevant ≟ relevant = yes refl irrelevant ≟ irrelevant = yes refl diff --git a/src/Reflection/AST/Argument/Visibility.agda b/src/Reflection/AST/Argument/Visibility.agda index 93654a018c..4f94b24fe3 100644 --- a/src/Reflection/AST/Argument/Visibility.agda +++ b/src/Reflection/AST/Argument/Visibility.agda @@ -21,6 +21,8 @@ open Visibility public ------------------------------------------------------------------------ -- Decidable equality +infix 4 _≟_ + _≟_ : DecidableEquality Visibility visible ≟ visible = yes refl hidden ≟ hidden = yes refl diff --git a/src/Reflection/AST/Definition.agda b/src/Reflection/AST/Definition.agda index 7cb403fb49..5b6dace7cd 100644 --- a/src/Reflection/AST/Definition.agda +++ b/src/Reflection/AST/Definition.agda @@ -59,6 +59,8 @@ record′-injective = < record′-injective₁ , record′-injective₂ > constructor′-injective : ∀ {c c′} → constructor′ c ≡ constructor′ c′ → c ≡ c′ constructor′-injective refl = refl +infix 4 _≟_ + _≟_ : DecidableEquality Definition function cs ≟ function cs′ = map′ (cong function) function-injective (cs Term.≟-Clauses cs′) diff --git a/src/Reflection/AST/Literal.agda b/src/Reflection/AST/Literal.agda index 280ba13010..33ceed9ca5 100644 --- a/src/Reflection/AST/Literal.agda +++ b/src/Reflection/AST/Literal.agda @@ -104,5 +104,7 @@ meta x ≟ string x₁ = no (λ ()) meta x ≟ name x₁ = no (λ ()) meta x ≟ meta x₁ = map′ (cong meta) meta-injective (x Meta.≟ x₁) +infix 4 _≡ᵇ_ + _≡ᵇ_ : Literal → Literal → Bool l ≡ᵇ l′ = isYes (l ≟ l′) diff --git a/src/Reflection/AST/Meta.agda b/src/Reflection/AST/Meta.agda index b5db1fad1a..59ca4ae4db 100644 --- a/src/Reflection/AST/Meta.agda +++ b/src/Reflection/AST/Meta.agda @@ -23,12 +23,13 @@ open import Agda.Builtin.Reflection.Properties public -- Equality of metas is decidable. +infix 4 _≈?_ _≟_ _≈_ + _≈_ : Rel Meta _ _≈_ = _≡_ on toℕ _≈?_ : Decidable _≈_ _≈?_ = On.decidable toℕ _≡_ ℕₚ._≟_ -infix 4 _≟_ _≟_ : DecidableEquality Meta m ≟ n = map′ (toℕ-injective _ _) (cong toℕ) (m ≈? n) diff --git a/src/Reflection/AST/Name.agda b/src/Reflection/AST/Name.agda index 50c6ee7878..203521330c 100644 --- a/src/Reflection/AST/Name.agda +++ b/src/Reflection/AST/Name.agda @@ -37,11 +37,11 @@ Names = List Name -- Decidable equality for names ---------------------------------------------------------------------- +infix 4 _≈?_ _≟_ _≈_ + _≈_ : Rel Name _ _≈_ = _≡_ on toWords -infix 4 _≈?_ _≟_ - _≈?_ : Decidable _≈_ _≈?_ = decidable toWords _≡_ (Prodₚ.≡-dec Wₚ._≟_ Wₚ._≟_) diff --git a/src/Reflection/AST/Term.agda b/src/Reflection/AST/Term.agda index fb0f5bde61..183f839015 100644 --- a/src/Reflection/AST/Term.agda +++ b/src/Reflection/AST/Term.agda @@ -128,7 +128,7 @@ absurd-clause-injective = < absurd-clause-injective₁ , absurd-clause-injective infix 4 _≟-AbsTerm_ _≟-AbsType_ _≟-ArgTerm_ _≟-ArgType_ _≟-Args_ _≟-Clause_ _≟-Clauses_ _≟_ - _≟-Sort_ _≟-Pattern_ _≟-Patterns_ + _≟-Sort_ _≟-Pattern_ _≟-Patterns_ _≟-Telescope_ _≟-AbsTerm_ : DecidableEquality (Abs Term) _≟-AbsType_ : DecidableEquality (Abs Type) From 8dd8c59c6c33809b8b3fb26b44d0a2ca339c7f91 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Mon, 19 Jun 2023 22:29:36 -0400 Subject: [PATCH 052/316] More fixities for `Data` and `Codata` (#1989) --- CHANGELOG.md | 119 +++++++++++------- src/Codata/Guarded/Stream.agda | 4 + .../Stream/Relation/Binary/Pointwise.agda | 4 + src/Codata/Musical/Colist.agda | 2 + src/Codata/Musical/Colist/Bisimilarity.agda | 2 + .../Musical/Colist/Relation/Unary/All.agda | 2 + src/Codata/Musical/Conat.agda | 2 + src/Codata/Sized/Colist.agda | 2 + src/Codata/Sized/Colist/Bisimilarity.agda | 2 + src/Codata/Sized/Conat/Properties.agda | 2 + src/Codata/Sized/Covec.agda | 2 + src/Codata/Sized/Covec/Bisimilarity.agda | 1 + src/Codata/Sized/Cowriter.agda | 4 + src/Codata/Sized/Cowriter/Bisimilarity.agda | 2 + src/Codata/Sized/Stream.agda | 2 + src/Codata/Sized/Stream/Bisimilarity.agda | 2 + src/Data/Container/Core.agda | 2 + src/Data/Container/FreeMonad.agda | 3 + src/Data/Container/Indexed.agda | 4 + src/Data/Float/Base.agda | 2 + src/Data/Nat/Base.agda | 6 +- src/Data/Nat/Properties.agda | 2 + .../Rational/Unnormalised/Properties.agda | 2 + .../AVL/Map/Membership/Propositional.agda | 2 + src/Induction/WellFounded.agda | 1 + 25 files changed, 131 insertions(+), 47 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e33d919313..13f0b0f20f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,51 +31,80 @@ Bug-fixes * The following operators were missing a fixity declaration, which has now been fixed - - ``` - infix -1 _$ⁿ_ (Data.Vec.N-ary) - infix 4 _≋_ (Data.Vec.Functional.Relation.Binary.Equality.Setoid) - infix 4 _≟_ (Reflection.AST.Definition) - infix 4 _≡ᵇ_ (Reflection.AST.Literal) - infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Meta) - infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Name) - infix 4 _≟-Telescope_ (Reflection.AST.Term) - infix 4 _≟_ (Reflection.AST.Argument.Information) - infix 4 _≟_ (Reflection.AST.Argument.Modality) - infix 4 _≟_ (Reflection.AST.Argument.Quantity) - infix 4 _≟_ (Reflection.AST.Argument.Relevance) - infix 4 _≟_ (Reflection.AST.Argument.Visibility) - infixr 8 _^_ (Function.Endomorphism.Propositional) - infixr 8 _^_ (Function.Endomorphism.Setoid) - infix 4 _≃_ (Function.HalfAdjointEquivalence) - infix 4 _≈_ _≈ᵢ_ _≤_ (Function.Metric.Bundles) - infixl 6 _∙_ (Function.Metric.Bundles) - infix 4 _≈_ (Function.Metric.Nat.Bundles) - infix 3 _←_ _↢_ (Function.Related) - - infix 4 _ℕ<_ _ℕ≤infinity _ℕ≤_ (Codata.Sized.Conat) - infix 6 _ℕ+_ _+ℕ_ (Codata.Sized.Conat) - infixl 4 _+ _* (Data.List.Kleene.Base) - infixr 4 _++++_ _+++*_ _*+++_ _*++*_ (Data.List.Kleene.Base) - infix 4 _[_]* _[_]+ (Data.List.Kleene.Base) - infix 4 _≢∈_ (Data.List.Membership.Propositional) - infixr 5 _`∷_ (Data.List.Reflection) - infix 4 _≡?_ (Data.List.Relation.Binary.Equality.DecPropositional) - infixr 5 _++ᵖ_ (Data.List.Relation.Binary.Prefix.Heterogeneous) - infixr 5 _++ˢ_ (Data.List.Relation.Binary.Suffix.Heterogeneous) - infixr 5 _++_ _++[] (Data.List.Relation.Ternary.Appending.Propositional) - infixr 5 _∷=_ (Data.List.Relation.Unary.Any) - infixr 5 _++_ (Data.List.Ternary.Appending) - infixr 2 _×-⇔_ _×-↣_ _×-↞_ _×-↠_ _×-↔_ _×-cong_ (Data.Product.Function.NonDependent.Propositional) - infixr 2 _×-⟶_ (Data.Product.Function.NonDependent.Setoid) - infixr 2 _×-equivalence_ _×-injection_ _×-left-inverse_ (Data.Product.Function.NonDependent.Setoid) - infixr 2 _×-surjection_ _×-inverse_ (Data.Product.Function.NonDependent.Setoid) - infixr 1 _⊎-⇔_ _⊎-↣_ _⊎-↞_ _⊎-↠_ _⊎-↔_ _⊎-cong_ (Data.Sum.Function.Propositional) - infixr 1 _⊎-⟶_ (Data.Sum.Function.Setoid) - infixr 1 _⊎-equivalence_ _⊎-injection_ _⊎-left-inverse_ (Data.Sum.Function.Setoid) - infixr 1 _⊎-surjection_ _⊎-inverse_ (Data.Sum.Function.Setoid) - infix 8 _⁻¹ (Data.Parity.Base) - infixr 5 _`∷_ (Data.Vec.Reflection) - infixr 5 _∷=_ (Data.Vec.Membership.Setoid) + ``` + infixr 5 _∷_ (Codata.Guarded.Stream) + infix 4 _[_] (Codata.Guarded.Stream) + infixr 5 _∷_ (Codata.Guarded.Stream.Relation.Binary.Pointwise) + infix 4 _≈∞_ (Codata.Guarded.Stream.Relation.Binary.Pointwise) + infixr 5 _∷_ (Codata.Musical.Colist) + infix 4 _≈_ (Codata.Musical.Conat) + infixr 5 _∷_ (Codata.Musical.Colist.Bisimilarity) + infixr 5 _∷_ (Codata.Musical.Colist.Relation.Unary.All) + infixr 5 _∷_ (Codata.Sized.Colist) + infixr 5 _∷_ (Codata.Sized.Covec) + infixr 5 _∷_ (Codata.Sized.Cowriter) + infixl 1 _>>=_ (Codata.Sized.Cowriter) + infixr 5 _∷_ (Codata.Sized.Stream) + infixr 5 _∷_ (Codata.Sized.Colist.Bisimilarity) + infix 4 _ℕ≤?_ (Codata.Sized.Conat.Properties) + infixr 5 _∷_ (Codata.Sized.Covec.Bisimilarity) + infixr 5 _∷_ (Codata.Sized.Cowriter.Bisimilarity) + infixr 5 _∷_ (Codata.Sized.Stream.Bisimilarity) + infixr 8 _⇒_ _⊸_ (Data.Container.Core) + infixr -1 _<$>_ _<*>_ (Data.Container.FreeMonad) + infixl 1 _>>=_ (Data.Container.FreeMonad) + infix 5 _▷_ (Data.Container.Indexed) + infix 4 _≈_ (Data.Float.Base) + infixl 7 _⊓′_ (Data.Nat.Base) + infixl 6 _⊔′_ (Data.Nat.Base) + infixr 8 _^_ (Data.Nat.Base) + infix 4 _!≢0 _!*_!≢0 (Data.Nat.Properties) + infix 4 _≃?_ (Data.Rational.Unnormalised.Properties) + infix 4 _≈ₖᵥ_ (Data.Tree.AVL.Map.Membership.Propositional) + infix 4 _<_ (Induction.WellFounded) + infix -1 _$ⁿ_ (Data.Vec.N-ary) + infix 4 _≋_ (Data.Vec.Functional.Relation.Binary.Equality.Setoid) + infix 4 _≟_ (Reflection.AST.Definition) + infix 4 _≡ᵇ_ (Reflection.AST.Literal) + infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Meta) + infix 4 _≈?_ _≟_ _≈_ (Reflection.AST.Name) + infix 4 _≟-Telescope_ (Reflection.AST.Term) + infix 4 _≟_ (Reflection.AST.Argument.Information) + infix 4 _≟_ (Reflection.AST.Argument.Modality) + infix 4 _≟_ (Reflection.AST.Argument.Quantity) + infix 4 _≟_ (Reflection.AST.Argument.Relevance) + infix 4 _≟_ (Reflection.AST.Argument.Visibility) + infixr 8 _^_ (Function.Endomorphism.Propositional) + infixr 8 _^_ (Function.Endomorphism.Setoid) + infix 4 _≃_ (Function.HalfAdjointEquivalence) + infix 4 _≈_ _≈ᵢ_ _≤_ (Function.Metric.Bundles) + infixl 6 _∙_ (Function.Metric.Bundles) + infix 4 _≈_ (Function.Metric.Nat.Bundles) + infix 3 _←_ _↢_ (Function.Related) + infix 4 _ℕ<_ _ℕ≤infinity _ℕ≤_ (Codata.Sized.Conat) + infix 6 _ℕ+_ _+ℕ_ (Codata.Sized.Conat) + infixl 4 _+ _* (Data.List.Kleene.Base) + infixr 4 _++++_ _+++*_ _*+++_ _*++*_ (Data.List.Kleene.Base) + infix 4 _[_]* _[_]+ (Data.List.Kleene.Base) + infix 4 _≢∈_ (Data.List.Membership.Propositional) + infixr 5 _`∷_ (Data.List.Reflection) + infix 4 _≡?_ (Data.List.Relation.Binary.Equality.DecPropositional) + infixr 5 _++ᵖ_ (Data.List.Relation.Binary.Prefix.Heterogeneous) + infixr 5 _++ˢ_ (Data.List.Relation.Binary.Suffix.Heterogeneous) + infixr 5 _++_ _++[] (Data.List.Relation.Ternary.Appending.Propositional) + infixr 5 _∷=_ (Data.List.Relation.Unary.Any) + infixr 5 _++_ (Data.List.Ternary.Appending) + infixr 2 _×-⇔_ _×-↣_ _×-↞_ _×-↠_ _×-↔_ _×-cong_ (Data.Product.Function.NonDependent.Propositional) + infixr 2 _×-⟶_ (Data.Product.Function.NonDependent.Setoid) + infixr 2 _×-equivalence_ _×-injection_ _×-left-inverse_ (Data.Product.Function.NonDependent.Setoid) + infixr 2 _×-surjection_ _×-inverse_ (Data.Product.Function.NonDependent.Setoid) + infixr 1 _⊎-⇔_ _⊎-↣_ _⊎-↞_ _⊎-↠_ _⊎-↔_ _⊎-cong_ (Data.Sum.Function.Propositional) + infixr 1 _⊎-⟶_ (Data.Sum.Function.Setoid) + infixr 1 _⊎-equivalence_ _⊎-injection_ _⊎-left-inverse_ (Data.Sum.Function.Setoid) + infixr 1 _⊎-surjection_ _⊎-inverse_ (Data.Sum.Function.Setoid) + infix 8 _⁻¹ (Data.Parity.Base) + infixr 5 _`∷_ (Data.Vec.Reflection) + infixr 5 _∷=_ (Data.Vec.Membership.Setoid) ``` * In `System.Exit`, the `ExitFailure` constructor is now carrying an integer diff --git a/src/Codata/Guarded/Stream.agda b/src/Codata/Guarded/Stream.agda index 88c5c5fec5..6024525cb4 100644 --- a/src/Codata/Guarded/Stream.agda +++ b/src/Codata/Guarded/Stream.agda @@ -28,6 +28,8 @@ private ------------------------------------------------------------------------ -- Type +infixr 5 _∷_ + record Stream (A : Set a) : Set a where coinductive constructor _∷_ @@ -69,6 +71,8 @@ lookup : Stream A → ℕ → A lookup xs zero = head xs lookup xs (suc n) = lookup (tail xs) n +infix 4 _[_] + _[_] : Stream A → ℕ → A _[_] = lookup diff --git a/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda b/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda index 8f829297a0..c2d44f8145 100644 --- a/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda +++ b/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda @@ -25,6 +25,8 @@ private ------------------------------------------------------------------------ -- Bisimilarity +infixr 5 _∷_ + record Pointwise (_∼_ : REL A B ℓ) (as : Stream A) (bs : Stream B) : Set ℓ where coinductive constructor _∷_ @@ -191,4 +193,6 @@ module pw-Reasoning (S : Setoid a ℓ) where module ≈-Reasoning {a} {A : Set a} where open pw-Reasoning (P.setoid A) public + + infix 4 _≈∞_ _≈∞_ = `Pointwise∞ diff --git a/src/Codata/Musical/Colist.agda b/src/Codata/Musical/Colist.agda index c218a7f023..2ec01be70f 100644 --- a/src/Codata/Musical/Colist.agda +++ b/src/Codata/Musical/Colist.agda @@ -215,6 +215,8 @@ data Finite {A : Set a} : Colist A → Set a where [] : Finite [] _∷_ : ∀ x {xs} (fin : Finite (♭ xs)) → Finite (x ∷ xs) +infixr 5 _∷_ + module Finite-injective where ∷-injective : ∀ {x : A} {xs p q} → (Finite (x ∷ xs) ∋ x ∷ p) ≡ x ∷ q → p ≡ q diff --git a/src/Codata/Musical/Colist/Bisimilarity.agda b/src/Codata/Musical/Colist/Bisimilarity.agda index 8bcf5e5169..64a0c37d9c 100644 --- a/src/Codata/Musical/Colist/Bisimilarity.agda +++ b/src/Codata/Musical/Colist/Bisimilarity.agda @@ -27,6 +27,8 @@ data _≈_ {A : Set a} : Rel (Colist A) a where [] : [] ≈ [] _∷_ : ∀ x {xs ys} (xs≈ : ∞ (♭ xs ≈ ♭ ys)) → x ∷ xs ≈ x ∷ ys +infixr 5 _∷_ + -- The equality relation forms a setoid. setoid : Set a → Setoid _ _ diff --git a/src/Codata/Musical/Colist/Relation/Unary/All.agda b/src/Codata/Musical/Colist/Relation/Unary/All.agda index df997252c3..ce937dc2b6 100644 --- a/src/Codata/Musical/Colist/Relation/Unary/All.agda +++ b/src/Codata/Musical/Colist/Relation/Unary/All.agda @@ -23,3 +23,5 @@ private data All {A : Set a} (P : Pred A p) : Pred (Colist A) (a ⊔ p) where [] : All P [] _∷_ : ∀ {x xs} (px : P x) (pxs : ∞ (All P (♭ xs))) → All P (x ∷ xs) + +infixr 5 _∷_ diff --git a/src/Codata/Musical/Conat.agda b/src/Codata/Musical/Conat.agda index 2d598fd75c..f8c1490a40 100644 --- a/src/Codata/Musical/Conat.agda +++ b/src/Codata/Musical/Conat.agda @@ -34,6 +34,8 @@ fromℕ-injective {suc m} {suc n} eq = P.cong suc (fromℕ-injective (P.cong pre ------------------------------------------------------------------------ -- Equality +infix 4 _≈_ + data _≈_ : Coℕ → Coℕ → Set where zero : zero ≈ zero suc : ∀ {m n} (m≈n : ∞ (♭ m ≈ ♭ n)) → suc m ≈ suc n diff --git a/src/Codata/Sized/Colist.agda b/src/Codata/Sized/Colist.agda index c090565c33..4f916fbc68 100644 --- a/src/Codata/Sized/Colist.agda +++ b/src/Codata/Sized/Colist.agda @@ -42,6 +42,8 @@ data Colist (A : Set a) (i : Size) : Set a where [] : Colist A i _∷_ : A → Thunk (Colist A) i → Colist A i +infixr 5 _∷_ + ------------------------------------------------------------------------ -- Relationship to Cowriter. diff --git a/src/Codata/Sized/Colist/Bisimilarity.agda b/src/Codata/Sized/Colist/Bisimilarity.agda index 9e626a5315..0a9f76306b 100644 --- a/src/Codata/Sized/Colist/Bisimilarity.agda +++ b/src/Codata/Sized/Colist/Bisimilarity.agda @@ -32,6 +32,8 @@ data Bisim {A : Set a} {B : Set b} (R : REL A B r) (i : Size) : _∷_ : ∀ {x y xs ys} → R x y → Thunk^R (Bisim R) i xs ys → Bisim R i (x ∷ xs) (y ∷ ys) +infixr 5 _∷_ + module _ {R : Rel A r} where reflexive : Reflexive R → Reflexive (Bisim R i) diff --git a/src/Codata/Sized/Conat/Properties.agda b/src/Codata/Sized/Conat/Properties.agda index b2649fb38a..43d5662a9a 100644 --- a/src/Codata/Sized/Conat/Properties.agda +++ b/src/Codata/Sized/Conat/Properties.agda @@ -29,6 +29,8 @@ private sℕ≤s⁻¹ : ∀ {m n} → suc m ℕ≤ suc n → m ℕ≤ n .force sℕ≤s⁻¹ (sℕ≤s p) = p +infix 4 _ℕ≤?_ + _ℕ≤?_ : Decidable _ℕ≤_ zero ℕ≤? n = yes zℕ≤n suc m ℕ≤? zero = no (λ ()) diff --git a/src/Codata/Sized/Covec.agda b/src/Codata/Sized/Covec.agda index 85b7a9e63e..01e01f2df0 100644 --- a/src/Codata/Sized/Covec.agda +++ b/src/Codata/Sized/Covec.agda @@ -29,6 +29,8 @@ data Covec (A : Set a) (i : Size) : Conat ∞ → Set a where [] : Covec A i zero _∷_ : ∀ {n} → A → Thunk (λ i → Covec A i (n .force)) i → Covec A i (suc n) +infixr 5 _∷_ + head : ∀ {n i} → Covec A i (suc n) → A head (x ∷ _) = x diff --git a/src/Codata/Sized/Covec/Bisimilarity.agda b/src/Codata/Sized/Covec/Bisimilarity.agda index 3047816b44..cbe55ecbf7 100644 --- a/src/Codata/Sized/Covec/Bisimilarity.agda +++ b/src/Codata/Sized/Covec/Bisimilarity.agda @@ -22,6 +22,7 @@ data Bisim {a b r} {A : Set a} {B : Set b} (R : A → B → Set r) (i : Size) : _∷_ : ∀ {x y m n xs ys} → R x y → Thunk^R (λ i → Bisim R i (m .force) (n .force)) i xs ys → Bisim R i (suc m) (suc n) (x ∷ xs) (y ∷ ys) +infixr 5 _∷_ module _ {a r} {A : Set a} {R : A → A → Set r} where diff --git a/src/Codata/Sized/Cowriter.agda b/src/Codata/Sized/Cowriter.agda index 409fbe1f71..2a6ef961ec 100644 --- a/src/Codata/Sized/Cowriter.agda +++ b/src/Codata/Sized/Cowriter.agda @@ -39,6 +39,8 @@ data Cowriter (W : Set w) (A : Set a) (i : Size) : Set (a L.⊔ w) where [_] : A → Cowriter W A i _∷_ : W → Thunk (Cowriter W A) i → Cowriter W A i +infixr 5 _∷_ + ------------------------------------------------------------------------ -- Relationship to Delay. @@ -101,6 +103,8 @@ ap : ∀ {i} → Cowriter W (A → X) i → Cowriter W A i → Cowriter W X i ap [ f ] ca = map₂ f ca ap (w ∷ cf) ca = w ∷ λ where .force → ap (cf .force) ca +infixl 1 _>>=_ + _>>=_ : ∀ {i} → Cowriter W A i → (A → Cowriter W X i) → Cowriter W X i [ a ] >>= f = f a (w ∷ ca) >>= f = w ∷ λ where .force → ca .force >>= f diff --git a/src/Codata/Sized/Cowriter/Bisimilarity.agda b/src/Codata/Sized/Cowriter/Bisimilarity.agda index 823b7897ae..846101b538 100644 --- a/src/Codata/Sized/Cowriter/Bisimilarity.agda +++ b/src/Codata/Sized/Cowriter/Bisimilarity.agda @@ -33,6 +33,8 @@ data Bisim {V : Set v} {W : Set w} {A : Set a} {B : Set b} _∷_ : ∀ {x y xs ys} → R x y → Thunk^R (Bisim R S) i xs ys → Bisim R S i (x ∷ xs) (y ∷ ys) +infixr 5 _∷_ + module _ {R : Rel W r} {S : Rel A s} (refl^R : Reflexive R) (refl^S : Reflexive S) where diff --git a/src/Codata/Sized/Stream.agda b/src/Codata/Sized/Stream.agda index 53e42aa87d..85cd886b5f 100644 --- a/src/Codata/Sized/Stream.agda +++ b/src/Codata/Sized/Stream.agda @@ -34,6 +34,8 @@ private data Stream (A : Set a) (i : Size) : Set a where _∷_ : A → Thunk (Stream A) i → Stream A i +infixr 5 _∷_ + ------------------------------------------------------------------------ -- Creating streams diff --git a/src/Codata/Sized/Stream/Bisimilarity.agda b/src/Codata/Sized/Stream/Bisimilarity.agda index 1675ec016a..737e73c306 100644 --- a/src/Codata/Sized/Stream/Bisimilarity.agda +++ b/src/Codata/Sized/Stream/Bisimilarity.agda @@ -30,6 +30,8 @@ data Bisim {A : Set a} {B : Set b} (R : REL A B r) i : _∷_ : ∀ {x y xs ys} → R x y → Thunk^R (Bisim R) i xs ys → Bisim R i (x ∷ xs) (y ∷ ys) +infixr 5 _∷_ + module _ {R : Rel A r} where reflexive : Reflexive R → Reflexive (Bisim R i) diff --git a/src/Data/Container/Core.agda b/src/Data/Container/Core.agda index 9d07031d20..22b26955d8 100644 --- a/src/Data/Container/Core.agda +++ b/src/Data/Container/Core.agda @@ -38,6 +38,8 @@ map f = Prod.map₂ (f ∘_) -- Representation of container morphisms. +infixr 8 _⇒_ _⊸_ + record _⇒_ {s₁ s₂ p₁ p₂} (C₁ : Container s₁ p₁) (C₂ : Container s₂ p₂) : Set (s₁ ⊔ s₂ ⊔ p₁ ⊔ p₂) where constructor _▷_ diff --git a/src/Data/Container/FreeMonad.agda b/src/Data/Container/FreeMonad.agda index d1853782c9..1d206a4b87 100644 --- a/src/Data/Container/FreeMonad.agda +++ b/src/Data/Container/FreeMonad.agda @@ -103,6 +103,9 @@ module _ {P : Set ℓ} foldr : C ⋆ X → P foldr = induction (Function.const P) algP (algI ∘ -,_ ∘ □.proof) +infixr -1 _<$>_ _<*>_ +infixl 1 _>>=_ + _<$>_ : (X → Y) → C ⋆ X → C ⋆ Y f <$> t = foldr (pure ∘ f) impure t diff --git a/src/Data/Container/Indexed.agda b/src/Data/Container/Indexed.agda index 752f55c2a7..a5b17d2aab 100644 --- a/src/Data/Container/Indexed.agda +++ b/src/Data/Container/Indexed.agda @@ -31,6 +31,8 @@ open Container public -- Abbreviation for the commonly used level one version of indexed -- containers. +infix 5 _▷_ + _▷_ : Set → Set → Set₁ I ▷ O = Container I O zero zero @@ -103,6 +105,8 @@ module _ {i₁ i₂ o₁ o₂} module _ {i o c r} {I : Set i} {O : Set o} where + infixr 8 _⇒_ _⊸_ _⇒C_ + _⇒_ : B.Rel (Container I O c r) _ C₁ ⇒ C₂ = C₁ ⇒[ ⟨id⟩ / ⟨id⟩ ] C₂ diff --git a/src/Data/Float/Base.agda b/src/Data/Float/Base.agda index edc8b4943f..d09a5a811b 100644 --- a/src/Data/Float/Base.agda +++ b/src/Data/Float/Base.agda @@ -65,5 +65,7 @@ open import Agda.Builtin.Float public ; primFloatATanh to atanh ) +infix 4 _≈_ + _≈_ : Rel Float _ _≈_ = _≡_ on Maybe.map Word.toℕ ∘ toWord diff --git a/src/Data/Nat/Base.agda b/src/Data/Nat/Base.agda index 1e2db666b8..4920e7751e 100644 --- a/src/Data/Nat/Base.agda +++ b/src/Data/Nat/Base.agda @@ -132,8 +132,8 @@ pred : ℕ → ℕ pred n = n ∸ 1 infix 8 _! -infixl 7 _⊓_ _/_ _%_ -infixl 6 _+⋎_ _⊔_ +infixl 7 _⊓_ _⊓′_ _/_ _%_ +infixl 6 _+⋎_ _⊔_ _⊔′_ -- Argument-swapping addition. Used by Data.Vec._⋎_. @@ -192,6 +192,8 @@ parity (suc (suc n)) = parity n -- Naïve exponentiation +infixr 8 _^_ + _^_ : ℕ → ℕ → ℕ x ^ zero = 1 x ^ suc n = x * x ^ n diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 6ff1b1f38b..27725b98ad 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -1948,6 +1948,8 @@ n≡⌈n+n/2⌉ (suc n′@(suc n)) = 1≤n! zero = ≤-refl 1≤n! (suc n) = *-mono-≤ (m≤m+n 1 n) (1≤n! n) +infix 4 _!≢0 _!*_!≢0 + _!≢0 : ∀ n → NonZero (n !) n !≢0 = >-nonZero (1≤n! n) diff --git a/src/Data/Rational/Unnormalised/Properties.agda b/src/Data/Rational/Unnormalised/Properties.agda index d1eb0fe609..6f0d490412 100644 --- a/src/Data/Rational/Unnormalised/Properties.agda +++ b/src/Data/Rational/Unnormalised/Properties.agda @@ -91,6 +91,8 @@ drop-*≡* (*≡* eq) = eq ↥ z ℤ.* ↧ x ℤ.* ↧ y ∎)) where open ≡-Reasoning +infix 4 _≃?_ + _≃?_ : Decidable _≃_ p ≃? q = Dec.map′ *≡* drop-*≡* (↥ p ℤ.* ↧ q ℤ.≟ ↥ q ℤ.* ↧ p) diff --git a/src/Data/Tree/AVL/Map/Membership/Propositional.agda b/src/Data/Tree/AVL/Map/Membership/Propositional.agda index a353ddf4ad..7e5d297025 100644 --- a/src/Data/Tree/AVL/Map/Membership/Propositional.agda +++ b/src/Data/Tree/AVL/Map/Membership/Propositional.agda @@ -49,6 +49,8 @@ private x x′ y y′ : V kx : Key × V +infix 4 _≈ₖᵥ_ + _≈ₖᵥ_ : Rel (Key × V) _ _≈ₖᵥ_ = _≈_ ×ᴿ _≡_ diff --git a/src/Induction/WellFounded.agda b/src/Induction/WellFounded.agda index 5c88529d27..d580452f0f 100644 --- a/src/Induction/WellFounded.agda +++ b/src/Induction/WellFounded.agda @@ -184,6 +184,7 @@ module Lexicographic {A : Set a} {B : A → Set b} (RelA : Rel A ℓ₁) (RelB : ∀ x → Rel (B x) ℓ₂) where + infix 4 _<_ data _<_ : Rel (Σ A B) (a ⊔ b ⊔ ℓ₁ ⊔ ℓ₂) where left : ∀ {x₁ y₁ x₂ y₂} (x₁ Date: Mon, 19 Jun 2023 22:30:14 -0400 Subject: [PATCH 053/316] Rename `Relation.Binary.Construct.(Flip/Converse)` (#1979) --- CHANGELOG.md | 8 + src/Algebra/Construct/NaturalChoice/Base.agda | 2 +- src/Algebra/Construct/NaturalChoice/Max.agda | 2 +- .../Construct/NaturalChoice/MaxOp.agda | 2 +- src/Data/Fin/Induction.agda | 8 +- src/Relation/Binary/Construct/Converse.agda | 192 +---------------- src/Relation/Binary/Construct/Flip.Agda | 17 ++ .../Binary/Construct/Flip/EqAndOrd.agda | 195 ++++++++++++++++++ .../Construct/{Flip.agda => Flip/Ord.agda} | 6 +- .../Binary/Properties/DecTotalOrder.agda | 4 +- src/Relation/Binary/Properties/Preorder.agda | 6 +- .../Binary/Properties/StrictPartialOrder.agda | 4 +- .../Binary/Properties/TotalOrder.agda | 4 +- 13 files changed, 246 insertions(+), 204 deletions(-) create mode 100644 src/Relation/Binary/Construct/Flip.Agda create mode 100644 src/Relation/Binary/Construct/Flip/EqAndOrd.agda rename src/Relation/Binary/Construct/{Flip.agda => Flip/Ord.agda} (97%) diff --git a/CHANGELOG.md b/CHANGELOG.md index 13f0b0f20f..bb45ab0a49 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -918,6 +918,14 @@ Major improvements Deprecated modules ------------------ +### Moving `Relation.Binary.Construct.(Converse/Flip)` + +* The following files have been moved: + ```agda + Relation.Binary.Construct.Converse ↦ Relation.Binary.Construct.Flip.EqAndOrd + Relation.Binary.Construct.Flip ↦ Relation.Binary.Construct.Flip.Ord + ``` + ### Deprecation of old function hierarchy * The module `Function.Related` has been deprecated in favour of `Function.Related.Propositional` diff --git a/src/Algebra/Construct/NaturalChoice/Base.agda b/src/Algebra/Construct/NaturalChoice/Base.agda index 901f7a5413..3ebd9b924f 100644 --- a/src/Algebra/Construct/NaturalChoice/Base.agda +++ b/src/Algebra/Construct/NaturalChoice/Base.agda @@ -11,7 +11,7 @@ open import Algebra.Core open import Level as L hiding (_⊔_) open import Function.Base using (flip) open import Relation.Binary -open import Relation.Binary.Construct.Converse using () +open import Relation.Binary.Construct.Flip.EqAndOrd using () renaming (totalPreorder to flipOrder) import Relation.Binary.Properties.TotalOrder as TotalOrderProperties diff --git a/src/Algebra/Construct/NaturalChoice/Max.agda b/src/Algebra/Construct/NaturalChoice/Max.agda index 592b887f6b..212a52602f 100644 --- a/src/Algebra/Construct/NaturalChoice/Max.agda +++ b/src/Algebra/Construct/NaturalChoice/Max.agda @@ -14,7 +14,7 @@ module Algebra.Construct.NaturalChoice.Max open import Algebra.Core open import Algebra.Definitions open import Algebra.Construct.NaturalChoice.Base -open import Relation.Binary.Construct.Converse using () +open import Relation.Binary.Construct.Flip.EqAndOrd using () renaming (totalOrder to flip) open TotalOrder totalOrder renaming (Carrier to A) diff --git a/src/Algebra/Construct/NaturalChoice/MaxOp.agda b/src/Algebra/Construct/NaturalChoice/MaxOp.agda index 28accb65b3..d6c7de61ba 100644 --- a/src/Algebra/Construct/NaturalChoice/MaxOp.agda +++ b/src/Algebra/Construct/NaturalChoice/MaxOp.agda @@ -12,7 +12,7 @@ open import Algebra.Construct.NaturalChoice.Base import Algebra.Construct.NaturalChoice.MinOp as MinOp open import Function.Base using (flip) open import Relation.Binary -open import Relation.Binary.Construct.Converse using () +open import Relation.Binary.Construct.Flip.EqAndOrd using () renaming (totalPreorder to flipOrder) module Algebra.Construct.NaturalChoice.MaxOp diff --git a/src/Data/Fin/Induction.agda b/src/Data/Fin/Induction.agda index acd098be75..3c9bf54546 100644 --- a/src/Data/Fin/Induction.agda +++ b/src/Data/Fin/Induction.agda @@ -23,8 +23,8 @@ open import Induction.WellFounded as WF open import Level using (Level) open import Relation.Binary using (Rel; Decidable; IsPartialOrder; IsStrictPartialOrder; StrictPartialOrder) -import Relation.Binary.Construct.Converse as Converse -import Relation.Binary.Construct.Flip as Flip +import Relation.Binary.Construct.Flip.EqAndOrd as EqAndOrd +import Relation.Binary.Construct.Flip.Ord as Ord import Relation.Binary.Construct.NonStrictToStrict as ToStrict import Relation.Binary.Construct.On as On open import Relation.Binary.Definitions using (Tri; tri<; tri≈; tri>) @@ -123,7 +123,7 @@ module _ {_≈_ : Rel (Fin n) ℓ} where pigeon : (xs : Vec (Fin n) n) → Linked (flip _⊏_) (i ∷ xs) → WellFounded _⊏_ pigeon xs i∷xs↑ = let (i₁ , i₂ , i₁ y≮x x≉y x x≮y x≉y y y≮x x≉y x x≮y x≉y y-strictPartialOrder : StrictPartialOrder s₁ s₂ s₃ ->-strictPartialOrder = Converse.strictPartialOrder SPO +>-strictPartialOrder = EqAndOrd.strictPartialOrder SPO open StrictPartialOrder >-strictPartialOrder public using () diff --git a/src/Relation/Binary/Properties/TotalOrder.agda b/src/Relation/Binary/Properties/TotalOrder.agda index 58964e71a3..da4f316892 100644 --- a/src/Relation/Binary/Properties/TotalOrder.agda +++ b/src/Relation/Binary/Properties/TotalOrder.agda @@ -15,7 +15,7 @@ open TotalOrder T open import Data.Product using (proj₁) open import Data.Sum.Base using (inj₁; inj₂) -import Relation.Binary.Construct.Converse as Converse +import Relation.Binary.Construct.Flip.EqAndOrd as EqAndOrd import Relation.Binary.Construct.NonStrictToStrict _≈_ _≤_ as ToStrict import Relation.Binary.Properties.Poset poset as PosetProperties open import Relation.Binary.Consequences @@ -51,7 +51,7 @@ open PosetProperties public ) ≥-isTotalOrder : IsTotalOrder _≈_ _≥_ -≥-isTotalOrder = Converse.isTotalOrder isTotalOrder +≥-isTotalOrder = EqAndOrd.isTotalOrder isTotalOrder ≥-totalOrder : TotalOrder _ _ _ ≥-totalOrder = record From 16dfcda6fc75e0ad16927fccc9d83d0b33f31093 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 20 Jun 2023 04:46:12 +0200 Subject: [PATCH 054/316] New property merge-is-superlist (#1950) --- CHANGELOG.md | 61 +++++++++++-------- .../Binary/Sublist/Setoid/Properties.agda | 29 ++++++++- .../Unary/Sorted/TotalOrder/Properties.agda | 30 ++++++--- 3 files changed, 84 insertions(+), 36 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bb45ab0a49..25bc7bd058 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -606,7 +606,7 @@ Non-backwards compatible changes * It was very difficult to use the `Relation.Nullary` modules, as `Relation.Nullary` contained the basic definitions of negation, decidability etc., and the operations and proofs were smeared over `Relation.Nullary.(Negation/Product/Sum/Implication etc.)`. - + * In order to fix this: - the definition of `Dec` and `recompute` have been moved to `Relation.Nullary.Decidable.Core` - the definition of `Reflects` has been moved to `Relation.Nullary.Reflects` @@ -623,11 +623,11 @@ Non-backwards compatible changes have been deprecated and their contents moved to `Relation.Nullary.(Negation/Reflects/Decidable)` however all their contents is re-exported by `Relation.Nullary` which is the easiest way to access it now. - + * In order to facilitate this reorganisation the following breaking moves have occured: - `¬?` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Decidable.Core` - `¬-reflects` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Reflects`. - - `decidable-stable`, `excluded-middle` and `¬-drop-Dec` have been moved from `Relation.Nullary.Negation` + - `decidable-stable`, `excluded-middle` and `¬-drop-Dec` have been moved from `Relation.Nullary.Negation` to `Relation.Nullary.Decidable`. - `fromDec` and `toDec` have been mvoed from `Data.Sum.Base` to `Data.Sum`. @@ -773,7 +773,7 @@ Non-backwards compatible changes ``` NB. It is not possible to rename or deprecate `syntax` declarations, so Agda will only issue a "Could not parse the application `begin ...` when scope checking" - warning if the old combinators are used. + warning if the old combinators are used. * The types of the proofs `pos⇒1/pos`/`1/pos⇒pos` and `neg⇒1/neg`/`1/neg⇒neg` in `Data.Rational(.Unnormalised).Properties` have been switched, as the previous @@ -1073,7 +1073,7 @@ Deprecated names * In `Data.Fin.Induction`: ``` - ≺-Rec + ≺-Rec ≺-wellFounded ≺-recBuilder ≺-rec @@ -1082,7 +1082,7 @@ Deprecated names As with Issue #1726 above: the deprecation of relation `_≺_` means that these definitions associated with wf-recursion are deprecated in favour of their `_<_` counterparts. But it's not quite sensible to say that these definiton should be *renamed* to *anything*, - least of all those counterparts... the type confusion would be intolerable. + least of all those counterparts... the type confusion would be intolerable. * In `Data.Fin.Properties`: ``` @@ -1163,14 +1163,14 @@ Deprecated names ^-semigroup-morphism ↦ ^-isMagmaHomomorphism ^-monoid-morphism ↦ ^-isMonoidHomomorphism - + pos-distrib-* ↦ pos-* pos-+-commute ↦ pos-+ abs-*-commute ↦ abs-* - + +-isAbelianGroup ↦ +-0-isAbelianGroup ``` - + * In `Data.List.Properties`: ```agda map-id₂ ↦ map-id-local @@ -1661,7 +1661,7 @@ New modules ``` Algebra.Properties.Quasigroup ``` - + * Properties of MiddleBolLoop ``` Algebra.Properties.MiddleBolLoop @@ -1828,7 +1828,7 @@ Other minor changes _MiddleFourExchange_ : Op₂ A → Op₂ A → Set _ SelfInverse : Op₁ A → Set _ - + LeftDividesˡ : Op₂ A → Op₂ A → Set _ LeftDividesʳ : Op₂ A → Op₂ A → Set _ RightDividesˡ : Op₂ A → Op₂ A → Set _ @@ -1864,7 +1864,7 @@ Other minor changes _^ᵗ_ : A → ℕ → A ``` -* `Algebra.Properties.Magma.Divisibility` now re-exports operations +* `Algebra.Properties.Magma.Divisibility` now re-exports operations `_∣ˡ_`, `_∤ˡ_`, `_∣ʳ_`, `_∤ʳ_` from `Algebra.Definitions.Magma`. * Added new proofs to `Algebra.Properties.CommutativeSemigroup`: @@ -2046,7 +2046,7 @@ Other minor changes * Added new functions in `Data.Integer.Base`: ``` _^_ : ℤ → ℕ → ℤ - + +-0-rawGroup : Rawgroup 0ℓ 0ℓ *-rawMagma : RawMagma 0ℓ 0ℓ @@ -2164,7 +2164,7 @@ Other minor changes _! : ℕ → ℕ parity : ℕ → Parity - + +-rawMagma : RawMagma 0ℓ 0ℓ +-0-rawMonoid : RawMonoid 0ℓ 0ℓ *-rawMagma : RawMagma 0ℓ 0ℓ @@ -2409,10 +2409,10 @@ Other minor changes * Added new proof to `Data.Product.Relation.Binary.Lex.Strict` ```agda ×-respectsʳ : Transitive _≈₁_ → - _<₁_ Respectsʳ _≈₁_ → _<₂_ Respectsʳ _≈₂_ → _<ₗₑₓ_ Respectsʳ _≋_ + _<₁_ Respectsʳ _≈₁_ → _<₂_ Respectsʳ _≈₂_ → _<ₗₑₓ_ Respectsʳ _≋_ ×-respectsˡ : Symmetric _≈₁_ → Transitive _≈₁_ → - _<₁_ Respectsˡ _≈₁_ → _<₂_ Respectsˡ _≈₂_ → _<ₗₑₓ_ Respectsˡ _≋_ - ×-wellFounded' : Symmetric _≈₁_ → Transitive _≈₁_ → _<₁_ Respectsʳ _≈₁_ → + _<₁_ Respectsˡ _≈₁_ → _<₂_ Respectsˡ _≈₂_ → _<ₗₑₓ_ Respectsˡ _≋_ + ×-wellFounded' : Symmetric _≈₁_ → Transitive _≈₁_ → _<₁_ Respectsʳ _≈₁_ → WellFounded _<₁_ → WellFounded _<₂_ → WellFounded _<ₗₑₓ_ ``` @@ -2565,7 +2565,7 @@ Other minor changes ∀ {m n} → _Respectsˡ_ (_<_ {m} {n}) _≋_ <-respectsʳ : IsPartialEquivalence _≈_ → _≺_ Respectsʳ _≈_ → ∀ {m n} → _Respectsʳ_ (_<_ {m} {n}) _≋_ - <-wellFounded : Symmetric _≈_ → Transitive _≈_ → _≺_ Respectsʳ _≈_ → WellFounded _≺_ → + <-wellFounded : Symmetric _≈_ → Transitive _≈_ → _≺_ Respectsʳ _≈_ → WellFounded _≺_ → ∀ {n} → WellFounded (_<_ {n}) ``` @@ -3184,14 +3184,21 @@ This is a full list of proofs that have changed form to use irrelevant instance ↭-reverse : (xs : List A) → reverse xs ↭ xs ``` -* Added new file `Relation.Binary.Reasoning.Base.Apartness` - -This is how to use it: +* Added new proofs to `Data.List.Relation.Binary.Sublist.Setoid.Properties` + and `Data.List.Relation.Unary.Sorted.TotalOrder.Properties`. ```agda - _ : a # d - _ = begin-apartness - a ≈⟨ a≈b ⟩ - b #⟨ b#c ⟩ - c ≈⟨ c≈d ⟩ - d ∎ + ⊆-mergeˡ : ∀ xs ys → xs ⊆ merge _≤?_ xs ys + ⊆-mergeʳ : ∀ xs ys → ys ⊆ merge _≤?_ xs ys ``` + +* Added new file `Relation.Binary.Reasoning.Base.Apartness` + + This is how to use it: + ```agda + _ : a # d + _ = begin-apartness + a ≈⟨ a≈b ⟩ + b #⟨ b#c ⟩ + c ≈⟨ c≈d ⟩ + d ∎ + ``` diff --git a/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda b/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda index dd7638bc5f..5600339c7b 100644 --- a/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda +++ b/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Setoid; _⇒_; _Preserves_⟶_) +open import Relation.Binary using (Rel; Setoid; _⇒_; _Preserves_⟶_) module Data.List.Relation.Binary.Sublist.Setoid.Properties {c ℓ} (S : Setoid c ℓ) where @@ -20,10 +20,12 @@ open import Data.Product using (∃; _,_; proj₂) open import Function.Base open import Function.Bundles using (_⇔_; _⤖_) open import Level +open import Relation.Binary using () renaming (Decidable to Decidable₂) open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.Structures using (IsDecTotalOrder) open import Relation.Unary using (Pred; Decidable; Irrelevant) open import Relation.Nullary.Negation using (¬_) -open import Relation.Nullary.Decidable using (¬?) +open import Relation.Nullary.Decidable using (¬?; yes; no) import Data.List.Relation.Binary.Equality.Setoid as SetoidEquality import Data.List.Relation.Binary.Sublist.Setoid as SetoidSublist @@ -203,6 +205,29 @@ module _ {as bs : List A} where reverse⁻ : reverse as ⊆ reverse bs → as ⊆ bs reverse⁻ = HeteroProperties.reverse⁻ +------------------------------------------------------------------------ +-- merge + +module _ {ℓ′} {_≤_ : Rel A ℓ′} (_≤?_ : Decidable₂ _≤_) where + + ⊆-mergeˡ : ∀ xs ys → xs ⊆ merge _≤?_ xs ys + ⊆-mergeˡ [] ys = minimum ys + ⊆-mergeˡ (x ∷ xs) [] = ⊆-refl + ⊆-mergeˡ (x ∷ xs) (y ∷ ys) + with x ≤? y | ⊆-mergeˡ xs (y ∷ ys) + | ⊆-mergeˡ (x ∷ xs) ys + ... | yes x≤y | rec | _ = ≈-refl ∷ rec + ... | no x≰y | _ | rec = y ∷ʳ rec + + ⊆-mergeʳ : ∀ xs ys → ys ⊆ merge _≤?_ xs ys + ⊆-mergeʳ [] ys = ⊆-refl + ⊆-mergeʳ (x ∷ xs) [] = minimum (merge _≤?_ (x ∷ xs) []) + ⊆-mergeʳ (x ∷ xs) (y ∷ ys) + with x ≤? y | ⊆-mergeʳ xs (y ∷ ys) + | ⊆-mergeʳ (x ∷ xs) ys + ... | yes x≤y | rec | _ = x ∷ʳ rec + ... | no x≰y | _ | rec = ≈-refl ∷ rec + ------------------------------------------------------------------------ -- Inversion lemmas ------------------------------------------------------------------------ diff --git a/src/Data/List/Relation/Unary/Sorted/TotalOrder/Properties.agda b/src/Data/List/Relation/Unary/Sorted/TotalOrder/Properties.agda index 69654ef242..89582d2f88 100644 --- a/src/Data/List/Relation/Unary/Sorted/TotalOrder/Properties.agda +++ b/src/Data/List/Relation/Unary/Sorted/TotalOrder/Properties.agda @@ -14,15 +14,20 @@ open import Data.List.Relation.Unary.AllPairs using (AllPairs) open import Data.List.Relation.Unary.Linked as Linked using (Linked; []; [-]; _∷_; _∷′_; head′; tail) import Data.List.Relation.Unary.Linked.Properties as Linked +import Data.List.Relation.Binary.Sublist.Setoid as Sublist +import Data.List.Relation.Binary.Sublist.Setoid.Properties as SublistProperties open import Data.List.Relation.Unary.Sorted.TotalOrder hiding (head) + open import Data.Maybe.Base using (just; nothing) open import Data.Maybe.Relation.Binary.Connected using (Connected; just) open import Data.Nat.Base using (ℕ; zero; suc; _<_) + open import Level using (Level) open import Relation.Binary hiding (Decidable) import Relation.Binary.Properties.TotalOrder as TotalOrderProperties open import Relation.Unary using (Pred; Decidable) open import Relation.Nullary.Decidable using (yes; no) + private variable a b p ℓ₁ ℓ₂ ℓ₃ ℓ₄ : Level @@ -101,7 +106,7 @@ module _ (O : TotalOrder a ℓ₁ ℓ₂) where -- merge module _ (DO : DecTotalOrder a ℓ₁ ℓ₂) where - open DecTotalOrder DO renaming (totalOrder to O) + open DecTotalOrder DO using (_≤_; _≤?_) renaming (totalOrder to O) open TotalOrderProperties O using (≰⇒≥) private @@ -109,22 +114,33 @@ module _ (DO : DecTotalOrder a ℓ₁ ℓ₂) where Connected _≤_ (just v) (head xs) → Connected _≤_ (just v) (head ys) → Connected _≤_ (just v) (head (merge _≤?_ xs ys)) - merge-con {xs = []} {[]} cxs cys = cys - merge-con {xs = []} {y ∷ ys} cxs cys = cys + merge-con {xs = []} cxs cys = cys merge-con {xs = x ∷ xs} {[]} cxs cys = cxs merge-con {xs = x ∷ xs} {y ∷ ys} cxs cys with x ≤? y ... | yes x≤y = cxs ... | no x≰y = cys merge⁺ : ∀ {xs ys} → Sorted O xs → Sorted O ys → Sorted O (merge _≤?_ xs ys) - merge⁺ {[]} {[]} rxs rys = [] - merge⁺ {[]} {x ∷ ys} rxs rys = rys + merge⁺ {[]} rxs rys = rys merge⁺ {x ∷ xs} {[]} rxs rys = rxs - merge⁺ {x ∷ xs} {y ∷ ys} rxs rys with x ≤? y | - merge⁺ (Linked.tail rxs) rys | merge⁺ rxs (Linked.tail rys) + merge⁺ {x ∷ xs} {y ∷ ys} rxs rys + with x ≤? y | merge⁺ (Linked.tail rxs) rys + | merge⁺ rxs (Linked.tail rys) ... | yes x≤y | rec | _ = merge-con (head′ rxs) (just x≤y) ∷′ rec ... | no x≰y | _ | rec = merge-con (just (≰⇒≥ x≰y)) (head′ rys) ∷′ rec + -- Reexport ⊆-mergeˡʳ + + S = Preorder.Eq.setoid (DecTotalOrder.preorder DO) + open Sublist S using (_⊆_) + module SP = SublistProperties S + + ⊆-mergeˡ : ∀ xs ys → xs ⊆ merge _≤?_ xs ys + ⊆-mergeˡ = SP.⊆-mergeˡ _≤?_ + + ⊆-mergeʳ : ∀ xs ys → ys ⊆ merge _≤?_ xs ys + ⊆-mergeʳ = SP.⊆-mergeʳ _≤?_ + ------------------------------------------------------------------------ -- filter From 99651670763f11a90ea66706d9ce60b096305a36 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 20 Jun 2023 08:58:17 +0200 Subject: [PATCH 055/316] Rename Flip.Agda to Flip.agda (re #1979) --- src/Relation/Binary/Construct/{Flip.Agda => Flip.agda} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/Relation/Binary/Construct/{Flip.Agda => Flip.agda} (100%) diff --git a/src/Relation/Binary/Construct/Flip.Agda b/src/Relation/Binary/Construct/Flip.agda similarity index 100% rename from src/Relation/Binary/Construct/Flip.Agda rename to src/Relation/Binary/Construct/Flip.agda From 6b3c7ac58b84f703ae2f5bd140cdbd6a290d8b96 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 20 Jun 2023 09:10:24 +0200 Subject: [PATCH 056/316] Bump Haskell-CI to GHCs 9.6.2 and 9.2.8 --- .github/workflows/haskell-ci.yml | 12 ++++++------ agda-stdlib-utils.cabal | 4 ++-- stack-9.0.2.yaml | 6 +----- stack-9.2.8.yaml | 6 ++++++ 4 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 stack-9.2.8.yaml diff --git a/.github/workflows/haskell-ci.yml b/.github/workflows/haskell-ci.yml index 0aa1080f44..f491e32dc6 100644 --- a/.github/workflows/haskell-ci.yml +++ b/.github/workflows/haskell-ci.yml @@ -8,9 +8,9 @@ # # For more information, see https://github.com/haskell-CI/haskell-ci # -# version: 0.16.1 +# version: 0.16.4 # -# REGENDATA ("0.16.1",["github","--no-cabal-check","agda-stdlib-utils.cabal"]) +# REGENDATA ("0.16.4",["github","--no-cabal-check","agda-stdlib-utils.cabal"]) # name: Haskell-CI on: @@ -44,9 +44,9 @@ jobs: strategy: matrix: include: - - compiler: ghc-9.6.1 + - compiler: ghc-9.6.2 compilerKind: ghc - compilerVersion: 9.6.1 + compilerVersion: 9.6.2 setup-method: ghcup allow-failure: false - compiler: ghc-9.4.5 @@ -54,9 +54,9 @@ jobs: compilerVersion: 9.4.5 setup-method: ghcup allow-failure: false - - compiler: ghc-9.2.7 + - compiler: ghc-9.2.8 compilerKind: ghc - compilerVersion: 9.2.7 + compilerVersion: 9.2.8 setup-method: ghcup allow-failure: false - compiler: ghc-9.0.2 diff --git a/agda-stdlib-utils.cabal b/agda-stdlib-utils.cabal index 7d93147747..5ca3bd7055 100644 --- a/agda-stdlib-utils.cabal +++ b/agda-stdlib-utils.cabal @@ -6,9 +6,9 @@ description: Helper programs for setting up the Agda standard library. license: MIT tested-with: - GHC == 9.6.1 + GHC == 9.6.2 GHC == 9.4.5 - GHC == 9.2.7 + GHC == 9.2.8 GHC == 9.0.2 GHC == 8.10.7 GHC == 8.8.4 diff --git a/stack-9.0.2.yaml b/stack-9.0.2.yaml index 76871b383c..22f6eadaf6 100644 --- a/stack-9.0.2.yaml +++ b/stack-9.0.2.yaml @@ -1,10 +1,6 @@ -resolver: nightly-2022-01-27 +resolver: lts-19.33 compiler: ghc-9.0.2 compiler-check: match-exact -# extra-deps: -# - filemanip-0.3.6.3 -# - unix-compat-0.5.2 - packages: - '.' diff --git a/stack-9.2.8.yaml b/stack-9.2.8.yaml new file mode 100644 index 0000000000..3df1c335fb --- /dev/null +++ b/stack-9.2.8.yaml @@ -0,0 +1,6 @@ +resolver: lts-20.26 +compiler: ghc-9.2.8 +compiler-check: match-exact + +packages: +- '.' From 38079f484bd1a70f0295d806f360473dca181d1b Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Fri, 23 Jun 2023 09:01:25 +0200 Subject: [PATCH 057/316] stack.yaml files for GHCs 9.4.5 and 9.6.2 --- stack-9.4.5.yaml | 6 ++++++ stack-9.6.2.yaml | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 stack-9.4.5.yaml create mode 100644 stack-9.6.2.yaml diff --git a/stack-9.4.5.yaml b/stack-9.4.5.yaml new file mode 100644 index 0000000000..67331480d1 --- /dev/null +++ b/stack-9.4.5.yaml @@ -0,0 +1,6 @@ +resolver: lts-21.0 +compiler: ghc-9.4.5 +compiler-check: match-exact + +packages: +- '.' diff --git a/stack-9.6.2.yaml b/stack-9.6.2.yaml new file mode 100644 index 0000000000..59f58a5299 --- /dev/null +++ b/stack-9.6.2.yaml @@ -0,0 +1,6 @@ +resolver: nightly-2023-06-23 +compiler: ghc-9.6.2 +compiler-check: match-exact + +packages: +- '.' From e06c1627e35fe8fc8c42fdd20bfc622d773db9b3 Mon Sep 17 00:00:00 2001 From: "G. Allais" Date: Tue, 27 Jun 2023 09:03:50 +0100 Subject: [PATCH 058/316] [ re #1993 ] Simplifying the dependency graph (#1995) --- src/Algebra/Consequences/Setoid.agda | 2 +- src/Algebra/Construct/LexProduct/Base.agda | 4 ++-- .../Construct/NaturalChoice/MinMaxOp.agda | 2 +- .../Construct/NaturalChoice/MinOp.agda | 2 +- src/Algebra/Definitions.agda | 10 ++++----- src/Algebra/Definitions/RawMagma.agda | 2 +- .../Lattice/Properties/BooleanAlgebra.agda | 4 ++-- src/Algebra/Lattice/Properties/Lattice.agda | 2 +- .../Lattice/Properties/Semilattice.agda | 7 ++---- src/Algebra/Lattice/Structures.agda | 2 +- .../Properties/CommutativeSemigroup.agda | 2 +- src/Algebra/Properties/Group.agda | 4 ++-- src/Algebra/Properties/Ring.agda | 1 - src/Algebra/Properties/Semigroup.agda | 2 +- src/Algebra/Structures.agda | 2 +- src/Algebra/Structures/Biased.agda | 2 +- src/Codata/Sized/Cowriter.agda | 4 ++-- src/Codata/Sized/Stream.agda | 6 ++--- src/Data/Bool/Properties.agda | 10 ++++----- src/Data/Digit.agda | 15 ++++++------- src/Data/Fin/Base.agda | 2 +- src/Data/Fin/Properties.agda | 9 ++++---- src/Data/List/Base.agda | 2 +- src/Data/List/Fresh.agda | 2 +- src/Data/List/Fresh/NonEmpty.agda | 6 ++--- src/Data/List/Kleene/Base.agda | 11 +++++----- src/Data/List/Membership/Setoid.agda | 2 +- src/Data/List/NonEmpty/Base.agda | 2 +- src/Data/List/Properties.agda | 3 ++- src/Data/List/Relation/Binary/Lex/Core.agda | 2 +- .../List/Relation/Binary/Pointwise/Base.agda | 4 ++-- src/Data/List/Relation/Unary/All.agda | 6 ++--- src/Data/List/Relation/Unary/Any.agda | 2 +- src/Data/Maybe/Base.agda | 2 +- src/Data/Nat/DivMod/Core.agda | 2 +- src/Data/Nat/Divisibility.agda | 10 ++++----- src/Data/Nat/Induction.agda | 3 +-- src/Data/Nat/Properties.agda | 4 ++-- src/Data/Nat/Show.agda | 8 +++---- src/Data/Product.agda | 16 +------------- src/Data/Product/Algebra.agda | 4 ++-- src/Data/Product/Base.agda | 22 ++++++++++++++++++- src/Data/Product/Effectful/Left.agda | 2 +- src/Data/Product/Effectful/Left/Base.agda | 2 +- src/Data/Product/Effectful/Right.agda | 2 +- src/Data/Product/Effectful/Right/Base.agda | 2 +- src/Data/Product/Nary/NonDependent.agda | 8 +++---- src/Data/Product/Properties.agda | 5 +++-- src/Data/Product/Relation/Unary/All.agda | 6 ++--- src/Data/String/Base.agda | 13 +++++------ src/Data/String/Unsafe.agda | 2 +- src/Data/Sum/Algebra.agda | 2 +- src/Data/Unit/Polymorphic/Properties.agda | 2 +- src/Data/Vec/Base.agda | 4 ++-- src/Data/Vec/Bounded/Base.agda | 11 +++++----- src/Data/Vec/Functional.agda | 4 ++-- src/Data/Vec/N-ary.agda | 11 +++++----- src/Data/Vec/Recursive.agda | 12 +++++----- src/Data/W.agda | 4 ++-- src/Effect/Applicative.agda | 2 +- src/Effect/Monad/State/Transformer/Base.agda | 2 +- src/Effect/Monad/Writer/Transformer/Base.agda | 2 +- src/Function/Bundles.agda | 2 +- src/Function/Consequences.agda | 7 +++--- src/Function/Construct/Composition.agda | 4 ++-- src/Function/Construct/Identity.agda | 4 ++-- src/Function/Construct/Symmetry.agda | 2 +- src/Function/Definitions.agda | 5 ++--- src/Function/Definitions/Core1.agda | 2 +- src/Function/Definitions/Core2.agda | 4 ++-- src/Function/Equality.agda | 2 +- src/Function/Metric/Definitions.agda | 2 +- src/Function/Nary/NonDependent/Base.agda | 2 +- src/Function/Properties/Inverse.agda | 2 +- src/Function/Structures.agda | 3 +-- src/Induction/WellFounded.agda | 11 +++++----- src/Relation/Binary/Consequences.agda | 2 +- .../Binary/Construct/Flip/EqAndOrd.agda | 2 +- .../Binary/Construct/NaturalOrder/Left.agda | 2 +- .../Binary/Construct/NaturalOrder/Right.agda | 2 +- src/Relation/Binary/Core.agda | 2 +- src/Relation/Binary/Definitions.agda | 2 +- src/Relation/Binary/Lattice/Definitions.agda | 6 ++--- src/Relation/Binary/Lattice/Structures.agda | 2 +- src/Relation/Binary/Morphism/Structures.agda | 6 ++--- src/Relation/Binary/Properties/Preorder.agda | 4 ++-- src/Relation/Binary/Properties/Setoid.agda | 5 ++--- .../Binary/Properties/TotalOrder.agda | 4 +--- .../Binary/PropositionalEquality.agda | 6 ++--- .../Binary/PropositionalEquality/Core.agda | 2 +- .../PropositionalEquality/Properties.agda | 2 +- .../Binary/Reasoning/Base/Double.agda | 6 ++--- .../Binary/Reasoning/Base/Triple.agda | 6 ++--- src/Relation/Binary/Reflection.agda | 12 +++++----- src/Relation/Binary/Structures.agda | 2 +- src/Relation/Nullary/Decidable.agda | 2 +- src/Relation/Nullary/Decidable/Core.agda | 2 +- src/Relation/Nullary/Negation.agda | 17 +++++++------- src/Relation/Unary.agda | 10 ++++----- src/Relation/Unary/Closure/Base.agda | 2 +- src/Relation/Unary/Properties.agda | 4 ++-- src/Tactic/RingSolver.agda | 2 +- .../RingSolver/Core/Polynomial/Base.agda | 6 ++--- src/Text/Pretty.agda | 10 ++++----- src/Text/Pretty/Core.agda | 2 +- src/Text/Printf.agda | 13 ++--------- src/Text/Regex/Base.agda | 7 ++---- 107 files changed, 243 insertions(+), 268 deletions(-) diff --git a/src/Algebra/Consequences/Setoid.agda b/src/Algebra/Consequences/Setoid.agda index 77badd1b90..07b75806c2 100644 --- a/src/Algebra/Consequences/Setoid.agda +++ b/src/Algebra/Consequences/Setoid.agda @@ -15,7 +15,7 @@ open Setoid S renaming (Carrier to A) open import Algebra.Core open import Algebra.Definitions _≈_ open import Data.Sum.Base using (inj₁; inj₂) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_$_) import Function.Definitions as FunDefs import Relation.Binary.Consequences as Bin diff --git a/src/Algebra/Construct/LexProduct/Base.agda b/src/Algebra/Construct/LexProduct/Base.agda index 6076d1afc3..85686fd20c 100644 --- a/src/Algebra/Construct/LexProduct/Base.agda +++ b/src/Algebra/Construct/LexProduct/Base.agda @@ -8,10 +8,10 @@ open import Algebra.Core using (Op₂) open import Data.Bool.Base using (true; false) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Relation.Binary.Core using (Rel) open import Relation.Binary.Definitions using (Decidable) -open import Relation.Nullary.Decidable using (does; yes; no) +open import Relation.Nullary.Decidable.Core using (does; yes; no) module Algebra.Construct.LexProduct.Base {a b ℓ} {A : Set a} {B : Set b} diff --git a/src/Algebra/Construct/NaturalChoice/MinMaxOp.agda b/src/Algebra/Construct/NaturalChoice/MinMaxOp.agda index 4b7d0e20e8..a0b7a945f2 100644 --- a/src/Algebra/Construct/NaturalChoice/MinMaxOp.agda +++ b/src/Algebra/Construct/NaturalChoice/MinMaxOp.agda @@ -11,7 +11,7 @@ open import Algebra.Core open import Algebra.Bundles open import Algebra.Construct.NaturalChoice.Base open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id; _∘_; flip) open import Relation.Binary open import Relation.Binary.Consequences diff --git a/src/Algebra/Construct/NaturalChoice/MinOp.agda b/src/Algebra/Construct/NaturalChoice/MinOp.agda index 37ed331c7e..563e1662f1 100644 --- a/src/Algebra/Construct/NaturalChoice/MinOp.agda +++ b/src/Algebra/Construct/NaturalChoice/MinOp.agda @@ -11,7 +11,7 @@ open import Algebra.Core open import Algebra.Bundles open import Algebra.Construct.NaturalChoice.Base open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id; _∘_) open import Relation.Binary open import Relation.Binary.Consequences diff --git a/src/Algebra/Definitions.agda b/src/Algebra/Definitions.agda index e64fc4f30b..ae0566a4bf 100644 --- a/src/Algebra/Definitions.agda +++ b/src/Algebra/Definitions.agda @@ -15,17 +15,17 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary.Core -open import Relation.Nullary.Negation using (¬_) +open import Relation.Binary.Core using (Rel; _Preserves_⟶_; _Preserves₂_⟶_⟶_) +open import Relation.Nullary.Negation.Core using (¬_) module Algebra.Definitions {a ℓ} {A : Set a} -- The underlying set (_≈_ : Rel A ℓ) -- The underlying equality where -open import Algebra.Core -open import Data.Product -open import Data.Sum.Base +open import Algebra.Core using (Op₁; Op₂) +open import Data.Product.Base using (_×_; ∃-syntax) +open import Data.Sum.Base using (_⊎_) ------------------------------------------------------------------------ -- Properties of operations diff --git a/src/Algebra/Definitions/RawMagma.agda b/src/Algebra/Definitions/RawMagma.agda index 5189e02fb8..dc96fedc76 100644 --- a/src/Algebra/Definitions/RawMagma.agda +++ b/src/Algebra/Definitions/RawMagma.agda @@ -11,7 +11,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra.Bundles using (RawMagma) -open import Data.Product using (_×_; ∃) +open import Data.Product.Base using (_×_; ∃) open import Level using (_⊔_) open import Relation.Binary.Core open import Relation.Nullary.Negation using (¬_) diff --git a/src/Algebra/Lattice/Properties/BooleanAlgebra.agda b/src/Algebra/Lattice/Properties/BooleanAlgebra.agda index 85295c9366..cf90b022b9 100644 --- a/src/Algebra/Lattice/Properties/BooleanAlgebra.agda +++ b/src/Algebra/Lattice/Properties/BooleanAlgebra.agda @@ -23,9 +23,9 @@ open import Algebra.Bundles open import Algebra.Lattice.Structures _≈_ open import Relation.Binary.Reasoning.Setoid setoid open import Relation.Binary -open import Function.Base +open import Function.Base using (id; _$_; _⟨_⟩_) open import Function.Bundles using (_⇔_; module Equivalence) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) ------------------------------------------------------------------------ -- Export properties from distributive lattices diff --git a/src/Algebra/Lattice/Properties/Lattice.agda b/src/Algebra/Lattice/Properties/Lattice.agda index 747541e49c..b5908f57b1 100644 --- a/src/Algebra/Lattice/Properties/Lattice.agda +++ b/src/Algebra/Lattice/Properties/Lattice.agda @@ -11,7 +11,7 @@ import Algebra.Lattice.Properties.Semilattice as SemilatticeProperties open import Relation.Binary import Relation.Binary.Lattice as R open import Function.Base -open import Data.Product using (_,_; swap) +open import Data.Product.Base using (_,_; swap) module Algebra.Lattice.Properties.Lattice {l₁ l₂} (L : Lattice l₁ l₂) where diff --git a/src/Algebra/Lattice/Properties/Semilattice.agda b/src/Algebra/Lattice/Properties/Semilattice.agda index 4b8fc114fc..38554aedfa 100644 --- a/src/Algebra/Lattice/Properties/Semilattice.agda +++ b/src/Algebra/Lattice/Properties/Semilattice.agda @@ -6,11 +6,8 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Algebra.Lattice -open import Algebra.Structures -open import Function -open import Data.Product -open import Relation.Binary +open import Algebra.Lattice.Bundles using (Semilattice) +open import Relation.Binary.Bundles using (Poset) import Relation.Binary.Lattice as B import Relation.Binary.Properties.Poset as PosetProperties diff --git a/src/Algebra/Lattice/Structures.agda b/src/Algebra/Lattice/Structures.agda index 8e80c4a87b..b02787eee0 100644 --- a/src/Algebra/Lattice/Structures.agda +++ b/src/Algebra/Lattice/Structures.agda @@ -14,7 +14,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra.Core -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Level using (_⊔_) open import Relation.Binary using (Rel; Setoid; IsEquivalence) diff --git a/src/Algebra/Properties/CommutativeSemigroup.agda b/src/Algebra/Properties/CommutativeSemigroup.agda index 25d1ac0152..e09253ece7 100644 --- a/src/Algebra/Properties/CommutativeSemigroup.agda +++ b/src/Algebra/Properties/CommutativeSemigroup.agda @@ -16,7 +16,7 @@ open CommutativeSemigroup CS open import Algebra.Definitions _≈_ open import Relation.Binary.Reasoning.Setoid setoid -open import Data.Product +open import Data.Product.Base using (_,_) ------------------------------------------------------------------------------ -- Re-export the contents of semigroup diff --git a/src/Algebra/Properties/Group.agda b/src/Algebra/Properties/Group.agda index 469245b11c..7cdf88c9fe 100644 --- a/src/Algebra/Properties/Group.agda +++ b/src/Algebra/Properties/Group.agda @@ -13,8 +13,8 @@ module Algebra.Properties.Group {g₁ g₂} (G : Group g₁ g₂) where open Group G open import Algebra.Definitions _≈_ open import Relation.Binary.Reasoning.Setoid setoid -open import Function -open import Data.Product +open import Function.Base using (_$_; _⟨_⟩_) +open import Data.Product.Base using (_,_; proj₂) ε⁻¹≈ε : ε ⁻¹ ≈ ε ε⁻¹≈ε = begin diff --git a/src/Algebra/Properties/Ring.agda b/src/Algebra/Properties/Ring.agda index e310202a37..22dabbac29 100644 --- a/src/Algebra/Properties/Ring.agda +++ b/src/Algebra/Properties/Ring.agda @@ -16,7 +16,6 @@ import Algebra.Properties.AbelianGroup as AbelianGroupProperties open import Function.Base using (_$_) open import Relation.Binary.Reasoning.Setoid setoid open import Algebra.Definitions _≈_ -open import Data.Product ------------------------------------------------------------------------ -- Export properties of abelian groups diff --git a/src/Algebra/Properties/Semigroup.agda b/src/Algebra/Properties/Semigroup.agda index 4147b612e2..22aab4e66e 100644 --- a/src/Algebra/Properties/Semigroup.agda +++ b/src/Algebra/Properties/Semigroup.agda @@ -12,7 +12,7 @@ module Algebra.Properties.Semigroup {a ℓ} (S : Semigroup a ℓ) where open Semigroup S open import Algebra.Definitions _≈_ -open import Data.Product +open import Data.Product.Base using (_,_) x∙yz≈xy∙z : ∀ x y z → x ∙ (y ∙ z) ≈ (x ∙ y) ∙ z x∙yz≈xy∙z x y z = sym (assoc x y z) diff --git a/src/Algebra/Structures.agda b/src/Algebra/Structures.agda index 0a904276db..eb9d49b2c9 100644 --- a/src/Algebra/Structures.agda +++ b/src/Algebra/Structures.agda @@ -22,7 +22,7 @@ module Algebra.Structures open import Algebra.Core open import Algebra.Definitions _≈_ import Algebra.Consequences.Setoid as Consequences -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Level using (_⊔_) ------------------------------------------------------------------------ diff --git a/src/Algebra/Structures/Biased.agda b/src/Algebra/Structures/Biased.agda index c03e1236eb..0aa549c66c 100644 --- a/src/Algebra/Structures/Biased.agda +++ b/src/Algebra/Structures/Biased.agda @@ -9,7 +9,7 @@ open import Algebra.Core open import Algebra.Consequences.Setoid -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Level using (_⊔_) open import Relation.Binary using (Rel; Setoid; IsEquivalence) diff --git a/src/Codata/Sized/Cowriter.agda b/src/Codata/Sized/Cowriter.agda index 2a6ef961ec..7206c83c86 100644 --- a/src/Codata/Sized/Cowriter.agda +++ b/src/Codata/Sized/Cowriter.agda @@ -16,9 +16,9 @@ open import Codata.Sized.Delay using (Delay; later; now) open import Codata.Sized.Stream as Stream using (Stream; _∷_) open import Data.Unit.Base open import Data.List.Base using (List; []; _∷_) -open import Data.List.NonEmpty using (List⁺; _∷_) +open import Data.List.NonEmpty.Base using (List⁺; _∷_) open import Data.Nat.Base as Nat using (ℕ; zero; suc) -open import Data.Product as Prod using (_×_; _,_) +open import Data.Product.Base as Prod using (_×_; _,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Data.Vec.Base using (Vec; []; _∷_) open import Data.Vec.Bounded.Base as Vec≤ using (Vec≤; _,_) diff --git a/src/Codata/Sized/Stream.agda b/src/Codata/Sized/Stream.agda index 85cd886b5f..4b7d6bd37d 100644 --- a/src/Codata/Sized/Stream.agda +++ b/src/Codata/Sized/Stream.agda @@ -15,10 +15,10 @@ open import Data.Nat.Base open import Data.List.Base using (List; []; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_; _∷⁺_) open import Data.Vec.Base using (Vec; []; _∷_) -open import Data.Product as P hiding (map) -open import Function.Base +open import Data.Product.Base as P using (Σ; _×_; _,_; <_,_>; proj₁; proj₂) +open import Function.Base using (id; _∘_) open import Level using (Level) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) private variable diff --git a/src/Data/Bool/Properties.agda b/src/Data/Bool/Properties.agda index fe232885eb..ef963f6511 100644 --- a/src/Data/Bool/Properties.agda +++ b/src/Data/Bool/Properties.agda @@ -13,9 +13,9 @@ open import Algebra.Lattice.Bundles import Algebra.Lattice.Properties.BooleanAlgebra as BooleanAlgebraProperties open import Data.Bool.Base open import Data.Empty -open import Data.Product -open import Data.Sum.Base -open import Function.Base +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) +open import Function.Base using (_⟨_⟩_; const; id) open import Function.Equality using (_⟨$⟩_) open import Function.Equivalence using (_⇔_; equivalence; module Equivalence) @@ -23,8 +23,8 @@ open import Induction.WellFounded using (WellFounded; Acc; acc) open import Level using (Level; 0ℓ) open import Relation.Binary hiding (_⇔_) open import Relation.Binary.PropositionalEquality hiding ([_]) -open import Relation.Nullary using (ofʸ; ofⁿ; does; proof; yes; no) -open import Relation.Nullary.Decidable using (True) +open import Relation.Nullary.Reflects using (ofʸ; ofⁿ) +open import Relation.Nullary.Decidable.Core using (True; does; proof; yes; no) import Relation.Unary as U open import Algebra.Definitions {A = Bool} _≡_ diff --git a/src/Data/Digit.agda b/src/Data/Digit.agda index 9c47fd544b..7e7c1c7555 100644 --- a/src/Data/Digit.agda +++ b/src/Data/Digit.agda @@ -9,21 +9,20 @@ module Data.Digit where open import Data.Nat.Base -open import Data.Nat.Properties -open import Data.Nat.Solver +open import Data.Nat.Properties using (_≤?_; _) +open import Data.Product.Base as Prod + using (∃; ∃₂; _×_; _,_; map; proj₁; proj₂; uncurry; <_,_>) open import Data.Product.Properties using (,-injective) open import Data.Product.Algebra using (×-cong) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]; [_,_]′) @@ -619,7 +621,7 @@ splitAt-≥ (suc m) (suc i) (s≤s i≥m) = cong (Sum.map suc id) (splitAt-≥ m remQuot-combine : ∀ {n k} (i : Fin n) j → remQuot k (combine i j) ≡ (i , j) remQuot-combine {suc n} {k} zero j rewrite splitAt-↑ˡ k j (n ℕ.* k) = refl remQuot-combine {suc n} {k} (suc i) j rewrite splitAt-↑ʳ k (n ℕ.* k) (combine i j) = - cong (Data.Product.map₁ suc) (remQuot-combine i j) + cong (Prod.map₁ suc) (remQuot-combine i j) combine-remQuot : ∀ {n} k (i : Fin (n ℕ.* k)) → uncurry combine (remQuot {n} k i) ≡ i combine-remQuot {suc n} k i with splitAt k i in eq @@ -1158,4 +1160,3 @@ Please use <⇒<′ instead." "Warning: <′⇒≺ was deprecated in v2.0. Please use <′⇒< instead." #-} - diff --git a/src/Data/List/Base.agda b/src/Data/List/Base.agda index 48a5840bf4..2b25ece003 100644 --- a/src/Data/List/Base.agda +++ b/src/Data/List/Base.agda @@ -17,7 +17,7 @@ open import Data.Bool.Base as Bool open import Data.Fin.Base using (Fin; zero; suc) open import Data.Maybe.Base as Maybe using (Maybe; nothing; just; maybe′) open import Data.Nat.Base as ℕ using (ℕ; zero; suc; _+_; _*_ ; _≤_ ; s≤s) -open import Data.Product as Prod using (_×_; _,_; map₁; map₂′) +open import Data.Product.Base as Prod using (_×_; _,_; map₁; map₂′) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Data.These.Base as These using (These; this; that; these) open import Function.Base using (id; _∘_ ; _∘′_; _∘₂_; const; flip) diff --git a/src/Data/List/Fresh.agda b/src/Data/List/Fresh.agda index 8665267dd5..72c372003a 100644 --- a/src/Data/List/Fresh.agda +++ b/src/Data/List/Fresh.agda @@ -16,7 +16,7 @@ module Data.List.Fresh where open import Level using (Level; _⊔_) open import Data.Bool.Base using (true; false) open import Data.Unit.Polymorphic.Base using (⊤) -open import Data.Product using (∃; _×_; _,_; -,_; proj₁; proj₂) +open import Data.Product.Base using (∃; _×_; _,_; -,_; proj₁; proj₂) open import Data.List.Relation.Unary.All using (All; []; _∷_) open import Data.List.Relation.Unary.AllPairs using (AllPairs; []; _∷_) open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) diff --git a/src/Data/List/Fresh/NonEmpty.agda b/src/Data/List/Fresh/NonEmpty.agda index 1ed72bd9d4..e4b55cb11b 100644 --- a/src/Data/List/Fresh/NonEmpty.agda +++ b/src/Data/List/Fresh/NonEmpty.agda @@ -11,9 +11,9 @@ module Data.List.Fresh.NonEmpty where open import Level using (Level; _⊔_) open import Data.List.Fresh as List# using (List#; []; cons; fresh) open import Data.Maybe.Base using (Maybe; nothing; just) -open import Data.Nat using (ℕ; suc) -open import Data.Product using (_×_; _,_) -open import Relation.Binary as B using (Rel) +open import Data.Nat.Base using (ℕ; suc) +open import Data.Product.Base using (_×_; _,_) +open import Relation.Binary.Core using (Rel) private variable diff --git a/src/Data/List/Kleene/Base.agda b/src/Data/List/Kleene/Base.agda index c8476318b7..8eb83ba864 100644 --- a/src/Data/List/Kleene/Base.agda +++ b/src/Data/List/Kleene/Base.agda @@ -8,11 +8,12 @@ module Data.List.Kleene.Base where -open import Data.Product as Product using (_×_; _,_; map₂; map₁; proj₁; proj₂) -open import Data.Nat as ℕ using (ℕ; suc; zero) -open import Data.Maybe as Maybe using (Maybe; just; nothing) -open import Data.Sum as Sum using (_⊎_; inj₁; inj₂) -open import Level as Level using (Level) +open import Data.Product.Base as Product + using (_×_; _,_; map₂; map₁; proj₁; proj₂) +open import Data.Nat.Base as ℕ using (ℕ; suc; zero) +open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) +open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) +open import Level using (Level) open import Algebra.Core using (Op₂) open import Function.Base diff --git a/src/Data/List/Membership/Setoid.agda b/src/Data/List/Membership/Setoid.agda index ca48b933d1..047620041d 100644 --- a/src/Data/List/Membership/Setoid.agda +++ b/src/Data/List/Membership/Setoid.agda @@ -14,7 +14,7 @@ open import Function.Base using (_∘_; id; flip) open import Data.List.Base as List using (List; []; _∷_; length; lookup) open import Data.List.Relation.Unary.Any using (Any; index; map; here; there) -open import Data.Product as Prod using (∃; _×_; _,_) +open import Data.Product.Base as Prod using (∃; _×_; _,_) open import Relation.Unary using (Pred) open import Relation.Nullary.Negation using (¬_) diff --git a/src/Data/List/NonEmpty/Base.agda b/src/Data/List/NonEmpty/Base.agda index 3cc83a3447..320cacd4b6 100644 --- a/src/Data/List/NonEmpty/Base.agda +++ b/src/Data/List/NonEmpty/Base.agda @@ -14,7 +14,7 @@ open import Data.Bool.Properties using (T?) open import Data.List.Base as List using (List; []; _∷_) open import Data.Maybe.Base using (Maybe ; nothing; just) open import Data.Nat.Base as ℕ -open import Data.Product as Prod using (∃; _×_; proj₁; proj₂; _,_; -,_) +open import Data.Product.Base as Prod using (∃; _×_; proj₁; proj₂; _,_; -,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Data.These.Base as These using (These; this; that; these) open import Data.Vec.Base as Vec using (Vec; []; _∷_) diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index 58d5b39680..9df56d4781 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -25,7 +25,8 @@ open import Data.Maybe.Base using (Maybe; just; nothing) open import Data.Nat.Base open import Data.Nat.Divisibility open import Data.Nat.Properties -open import Data.Product as Prod hiding (map; zip) +open import Data.Product.Base as Prod + using (_×_; _,_; uncurry; uncurry′; proj₁; proj₂; <_,_>) import Data.Product.Relation.Unary.All as Prod using (All) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Data.These.Base as These using (These; this; that; these) diff --git a/src/Data/List/Relation/Binary/Lex/Core.agda b/src/Data/List/Relation/Binary/Lex/Core.agda index 3c90bf3c9f..96549e013b 100644 --- a/src/Data/List/Relation/Binary/Lex/Core.agda +++ b/src/Data/List/Relation/Binary/Lex/Core.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Binary.Lex.Core where open import Data.Empty using (⊥; ⊥-elim) open import Data.Unit.Base using (⊤; tt) -open import Data.Product using (_×_; _,_; proj₁; proj₂; uncurry) +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂; uncurry) open import Data.List.Base using (List; []; _∷_) open import Function.Base using (_∘_; flip; id) open import Level using (Level; _⊔_) diff --git a/src/Data/List/Relation/Binary/Pointwise/Base.agda b/src/Data/List/Relation/Binary/Pointwise/Base.agda index 8e24dcd2dc..e547aea169 100644 --- a/src/Data/List/Relation/Binary/Pointwise/Base.agda +++ b/src/Data/List/Relation/Binary/Pointwise/Base.agda @@ -8,9 +8,9 @@ module Data.List.Relation.Binary.Pointwise.Base where -open import Data.Product using (_×_; <_,_>) +open import Data.Product.Base using (_×_; <_,_>) open import Data.List.Base using (List; []; _∷_) -open import Level +open import Level using (Level; _⊔_) open import Relation.Binary.Core using (REL; _⇒_) private diff --git a/src/Data/List/Relation/Unary/All.agda b/src/Data/List/Relation/Unary/All.agda index 674a8e33d5..090af7e6b6 100644 --- a/src/Data/List/Relation/Unary/All.agda +++ b/src/Data/List/Relation/Unary/All.agda @@ -15,11 +15,11 @@ open import Data.List.Base as List using (List; []; _∷_) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) open import Data.List.Membership.Propositional renaming (_∈_ to _∈ₚ_) import Data.List.Membership.Setoid as SetoidMembership -open import Data.Product as Prod +open import Data.Product.Base as Prod using (∃; -,_; _×_; _,_; proj₁; proj₂; uncurry) open import Data.Sum.Base as Sum using (inj₁; inj₂) -open import Function -open import Level +open import Function.Base using (_∘_; _∘′_; id; const) +open import Level using (Level; _⊔_) open import Relation.Nullary hiding (Irrelevant) import Relation.Nullary.Decidable as Dec open import Relation.Unary hiding (_∈_) diff --git a/src/Data/List/Relation/Unary/Any.agda b/src/Data/List/Relation/Unary/Any.agda index 19af845152..eb010e2a39 100644 --- a/src/Data/List/Relation/Unary/Any.agda +++ b/src/Data/List/Relation/Unary/Any.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Unary.Any where open import Data.Empty open import Data.Fin.Base using (Fin; zero; suc) open import Data.List.Base as List using (List; []; [_]; _∷_) -open import Data.Product as Prod using (∃; _,_) +open import Data.Product.Base as Prod using (∃; _,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Level using (Level; _⊔_) open import Relation.Nullary using (¬_; yes; no; _⊎-dec_) diff --git a/src/Data/Maybe/Base.agda b/src/Data/Maybe/Base.agda index 0cb8c473bf..b0ae001f46 100644 --- a/src/Data/Maybe/Base.agda +++ b/src/Data/Maybe/Base.agda @@ -14,7 +14,7 @@ open import Level open import Data.Bool.Base using (Bool; true; false; not) open import Data.Unit.Base using (⊤) open import Data.These.Base using (These; this; that; these) -open import Data.Product as Prod using (_×_; _,_) +open import Data.Product.Base as Prod using (_×_; _,_) open import Function.Base open import Relation.Nullary.Reflects open import Relation.Nullary.Decidable.Core diff --git a/src/Data/Nat/DivMod/Core.agda b/src/Data/Nat/DivMod/Core.agda index 02b1c917c6..fed1a1ae0d 100644 --- a/src/Data/Nat/DivMod/Core.agda +++ b/src/Data/Nat/DivMod/Core.agda @@ -14,7 +14,7 @@ open import Agda.Builtin.Nat using () open import Data.Nat.Base open import Data.Nat.Properties open import Data.Sum.Base using (_⊎_; inj₁; inj₂) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Decidable using (yes; no) open import Relation.Nullary.Negation using (contradiction) diff --git a/src/Data/Nat/Divisibility.agda b/src/Data/Nat/Divisibility.agda index 07a80bcdd9..c202d740ba 100644 --- a/src/Data/Nat/Divisibility.agda +++ b/src/Data/Nat/Divisibility.agda @@ -12,14 +12,12 @@ open import Algebra open import Data.Nat.Base open import Data.Nat.DivMod open import Data.Nat.Properties -open import Data.Product -open import Data.Unit using (tt) -open import Function.Base +open import Data.Unit.Base using (tt) +open import Function.Base using (_∘′_; _$_) open import Function.Bundles using (_⇔_; mk⇔) open import Level using (0ℓ) -open import Relation.Nullary.Decidable using (yes; no) -open import Relation.Nullary.Decidable as Dec using (False) -open import Relation.Nullary.Negation using (contradiction) +open import Relation.Nullary.Decidable as Dec using (False; yes; no) +open import Relation.Nullary.Negation.Core using (contradiction) open import Relation.Binary import Relation.Binary.Reasoning.Preorder as PreorderReasoning open import Relation.Binary.PropositionalEquality as PropEq diff --git a/src/Data/Nat/Induction.agda b/src/Data/Nat/Induction.agda index ea68692a51..209f9f60bb 100644 --- a/src/Data/Nat/Induction.agda +++ b/src/Data/Nat/Induction.agda @@ -10,9 +10,8 @@ module Data.Nat.Induction where open import Data.Nat.Base open import Data.Nat.Properties using (<⇒<′) -open import Data.Product +open import Data.Product.Base using (_×_; _,_) open import Data.Unit.Polymorphic.Base -open import Function.Base open import Induction open import Induction.WellFounded as WF open import Level using (Level) diff --git a/src/Data/Nat/Properties.agda b/src/Data/Nat/Properties.agda index 27725b98ad..ac8a4dcaa5 100644 --- a/src/Data/Nat/Properties.agda +++ b/src/Data/Nat/Properties.agda @@ -23,7 +23,7 @@ open import Data.Bool.Base using (Bool; false; true; T) open import Data.Bool.Properties using (T?) open import Data.Empty using (⊥) open import Data.Nat.Base -open import Data.Product using (∄; ∃; _×_; _,_) +open import Data.Product.Base using (∃; _×_; _,_) open import Data.Sum.Base as Sum open import Data.Unit using (tt) open import Function.Base @@ -2172,7 +2172,7 @@ module _ {p} {P : Pred ℕ p} (P? : U.Decidable P) where ... | _ | yes (n , n_; when) import Data.Maybe.Effectful as Maybe open import Data.Nat -open import Data.Product using (proj₁) -open import Data.String.Base using (toList; fromList; String) -open import Function.Base +open import Data.Product.Base using (proj₁) +open import Data.String.Base as String using (String; fromList; toList) +open import Function.Base using (_∘′_; _∘_) open import Relation.Nullary.Decidable using (True) ------------------------------------------------------------------------ @@ -62,7 +62,7 @@ toDecimalChars : ℕ → List Char toDecimalChars = List.map toDigitChar ∘′ toNatDigits 10 show : ℕ → String -show = fromList ∘ toDecimalChars +show = fromList ∘′ toDecimalChars -- Arbitrary base betwen 2 & 16. -- Warning: when compiled the time complexity of `showInBase b n` is diff --git a/src/Data/Product.agda b/src/Data/Product.agda index 08c0aa0c7f..02bf53a97b 100644 --- a/src/Data/Product.agda +++ b/src/Data/Product.agda @@ -23,18 +23,11 @@ private open import Data.Product.Base public ------------------------------------------------------------------------ --- Existential quantifiers - -∃ : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) -∃ = Σ _ +-- Negation of existential quantifier ∄ : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) ∄ P = ¬ ∃ P -∃₂ : ∀ {A : Set a} {B : A → Set b} - (C : (x : A) → B x → Set c) → Set (a ⊔ b ⊔ c) -∃₂ C = ∃ λ a → ∃ λ b → C a b - -- Unique existence (parametrised by an underlying equality). ∃! : {A : Set a} → (A → A → Set ℓ) → (A → Set b) → Set (a ⊔ b ⊔ ℓ) @@ -42,13 +35,6 @@ open import Data.Product.Base public -- Syntax -infix 2 ∃-syntax - -∃-syntax : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) -∃-syntax = ∃ - -syntax ∃-syntax (λ x → B) = ∃[ x ] B - infix 2 ∄-syntax ∄-syntax : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) diff --git a/src/Data/Product/Algebra.agda b/src/Data/Product/Algebra.agda index f11045d778..c64057dcc0 100644 --- a/src/Data/Product/Algebra.agda +++ b/src/Data/Product/Algebra.agda @@ -11,9 +11,9 @@ module Data.Product.Algebra where open import Algebra open import Data.Bool.Base using (true; false) open import Data.Empty.Polymorphic using (⊥; ⊥-elim) -open import Data.Product +open import Data.Product.Base open import Data.Product.Properties -open import Data.Sum as Sum using (_⊎_; inj₁; inj₂; [_,_]′) +open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]′) open import Data.Sum.Algebra open import Data.Unit.Polymorphic using (⊤; tt) open import Function.Base using (_∘′_) diff --git a/src/Data/Product/Base.agda b/src/Data/Product/Base.agda index 7ee638392c..02f7e52697 100644 --- a/src/Data/Product/Base.agda +++ b/src/Data/Product/Base.agda @@ -9,7 +9,7 @@ module Data.Product.Base where open import Function.Base -open import Level +open import Level using (Level; _⊔_) private variable @@ -31,6 +31,19 @@ open import Agda.Builtin.Sigma public module Σ = Agda.Builtin.Sigma.Σ renaming (fst to proj₁; snd to proj₂) +------------------------------------------------------------------------ +-- Existential quantifiers + +∃ : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) +∃ = Σ _ + +∃₂ : ∀ {A : Set a} {B : A → Set b} + (C : (x : A) → B x → Set c) → Set (a ⊔ b ⊔ c) +∃₂ C = ∃ λ a → ∃ λ b → C a b + +------------------------------------------------------------------------ +-- Syntaxes + -- The syntax declaration below is attached to Σ-syntax, to make it -- easy to import Σ without the special syntax. @@ -41,6 +54,13 @@ infix 2 Σ-syntax syntax Σ-syntax A (λ x → B) = Σ[ x ∈ A ] B +infix 2 ∃-syntax + +∃-syntax : ∀ {A : Set a} → (A → Set b) → Set (a ⊔ b) +∃-syntax = ∃ + +syntax ∃-syntax (λ x → B) = ∃[ x ] B + ------------------------------------------------------------------------ -- Definition of non-dependent products diff --git a/src/Data/Product/Effectful/Left.agda b/src/Data/Product/Effectful/Left.agda index 66362621ee..279555b9c9 100644 --- a/src/Data/Product/Effectful/Left.agda +++ b/src/Data/Product/Effectful/Left.agda @@ -18,7 +18,7 @@ open import Level module Data.Product.Effectful.Left {a e} (A : RawMonoid a e) (b : Level) where -open import Data.Product +open import Data.Product.Base import Data.Product.Effectful.Left.Base as Base open import Effect.Applicative using (RawApplicative) open import Effect.Monad using (RawMonad; RawMonadT; mkRawMonad) diff --git a/src/Data/Product/Effectful/Left/Base.agda b/src/Data/Product/Effectful/Left/Base.agda index d5b0b42c92..e3f7edef69 100644 --- a/src/Data/Product/Effectful/Left/Base.agda +++ b/src/Data/Product/Effectful/Left/Base.agda @@ -17,7 +17,7 @@ open import Level module Data.Product.Effectful.Left.Base {a} (A : Set a) (b : Level) where -open import Data.Product using (_×_; map₂; proj₁; proj₂; <_,_>) +open import Data.Product.Base using (_×_; map₂; proj₁; proj₂; <_,_>) open import Effect.Functor using (RawFunctor) open import Effect.Comonad using (RawComonad) diff --git a/src/Data/Product/Effectful/Right.agda b/src/Data/Product/Effectful/Right.agda index 640b4e908d..fd5cb9b423 100644 --- a/src/Data/Product/Effectful/Right.agda +++ b/src/Data/Product/Effectful/Right.agda @@ -18,7 +18,7 @@ open import Level module Data.Product.Effectful.Right (a : Level) {b e} (B : RawMonoid b e) where -open import Data.Product +open import Data.Product.Base import Data.Product.Effectful.Right.Base as Base open import Effect.Applicative using (RawApplicative) open import Effect.Monad using (RawMonad; RawMonadT; mkRawMonad) diff --git a/src/Data/Product/Effectful/Right/Base.agda b/src/Data/Product/Effectful/Right/Base.agda index 273185bf8e..556483f66f 100644 --- a/src/Data/Product/Effectful/Right/Base.agda +++ b/src/Data/Product/Effectful/Right/Base.agda @@ -17,7 +17,7 @@ open import Level module Data.Product.Effectful.Right.Base {b} (B : Set b) (a : Level) where -open import Data.Product using (_×_; map₁; proj₁; proj₂; <_,_>) +open import Data.Product.Base using (_×_; map₁; proj₁; proj₂; <_,_>) open import Effect.Functor using (RawFunctor) open import Effect.Comonad using (RawComonad) diff --git a/src/Data/Product/Nary/NonDependent.agda b/src/Data/Product/Nary/NonDependent.agda index 1d5678e00c..cb421f16b6 100644 --- a/src/Data/Product/Nary/NonDependent.agda +++ b/src/Data/Product/Nary/NonDependent.agda @@ -16,15 +16,15 @@ module Data.Product.Nary.NonDependent where open import Level as L using (Level; _⊔_; Lift; 0ℓ) open import Agda.Builtin.Unit -open import Data.Product as Prod +open import Data.Product.Base as Prod import Data.Product.Properties as Prodₚ open import Data.Sum.Base using (_⊎_) open import Data.Nat.Base using (ℕ; zero; suc; pred) open import Data.Fin.Base using (Fin; zero; suc) open import Function.Base using (const; _∘′_; _∘_) -open import Relation.Nullary.Decidable using (Dec; yes; no; _×-dec_) -open import Relation.Binary using (Rel) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂) +open import Relation.Nullary.Decidable.Core using (Dec; yes; no; _×-dec_) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) open import Function.Nary.NonDependent.Base diff --git a/src/Data/Product/Properties.agda b/src/Data/Product/Properties.agda index fa4909e955..1cc3c2383e 100644 --- a/src/Data/Product/Properties.agda +++ b/src/Data/Product/Properties.agda @@ -9,8 +9,9 @@ module Data.Product.Properties where open import Axiom.UniquenessOfIdentityProofs -open import Data.Product -open import Function +open import Data.Product.Base +open import Function.Base using (_∋_; _∘_; id) +open import Function.Bundles using (_↔_; mk↔′) open import Level using (Level) open import Relation.Binary using (DecidableEquality) open import Relation.Binary.PropositionalEquality diff --git a/src/Data/Product/Relation/Unary/All.agda b/src/Data/Product/Relation/Unary/All.agda index 8c1b67dc50..1257de57c2 100644 --- a/src/Data/Product/Relation/Unary/All.agda +++ b/src/Data/Product/Relation/Unary/All.agda @@ -8,10 +8,8 @@ module Data.Product.Relation.Unary.All where -open import Level -open import Data.Product -open import Function.Base -open import Relation.Unary +open import Level using (Level; _⊔_) +open import Data.Product.Base using (_×_; _,_) private variable diff --git a/src/Data/String/Base.agda b/src/Data/String/Base.agda index b3556026db..1a56376f59 100644 --- a/src/Data/String/Base.agda +++ b/src/Data/String/Base.agda @@ -8,7 +8,6 @@ module Data.String.Base where -open import Level using (zero) open import Data.Bool.Base using (Bool; true; false) open import Data.Char.Base as Char using (Char) open import Data.List.Base as List using (List; [_]; _∷_; []) @@ -17,13 +16,13 @@ open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise) open import Data.List.Relation.Binary.Lex.Core using (Lex-<; Lex-≤) open import Data.Maybe.Base as Maybe using (Maybe) open import Data.Nat.Base using (ℕ; _∸_; ⌊_/2⌋; ⌈_/2⌉) -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Function.Base using (_on_; _∘′_; _∘_) -open import Level using (Level) +open import Level using (Level; 0ℓ) open import Relation.Binary.Core using (Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Unary using (Pred; Decidable) -open import Relation.Nullary.Decidable using (does) +open import Relation.Nullary.Decidable.Core using (does) ------------------------------------------------------------------------ -- From Agda.Builtin: type and renamed primitives @@ -47,17 +46,17 @@ open String public using ( String ) -- Pointwise equality on Strings infix 4 _≈_ -_≈_ : Rel String zero +_≈_ : Rel String 0ℓ _≈_ = Pointwise _≡_ on toList -- Lexicographic ordering on Strings infix 4 _<_ -_<_ : Rel String zero +_<_ : Rel String 0ℓ _<_ = Lex-< _≡_ Char._<_ on toList infix 4 _≤_ -_≤_ : Rel String zero +_≤_ : Rel String 0ℓ _≤_ = Lex-≤ _≡_ Char._<_ on toList ------------------------------------------------------------------------ diff --git a/src/Data/String/Unsafe.agda b/src/Data/String/Unsafe.agda index 91a62a61d1..9c001365a3 100644 --- a/src/Data/String/Unsafe.agda +++ b/src/Data/String/Unsafe.agda @@ -12,7 +12,7 @@ import Data.List.Base as List import Data.List.Properties as Listₚ open import Data.Maybe.Base using (maybe′) open import Data.Nat.Base using (zero; suc; _+_) -open import Data.Product using (proj₂) +open import Data.Product.Base using (proj₂) open import Data.String.Base open import Function.Base using (_∘′_) diff --git a/src/Data/Sum/Algebra.agda b/src/Data/Sum/Algebra.agda index 717bc347c1..f69988942b 100644 --- a/src/Data/Sum/Algebra.agda +++ b/src/Data/Sum/Algebra.agda @@ -10,7 +10,7 @@ module Data.Sum.Algebra where open import Algebra open import Data.Empty.Polymorphic using (⊥) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base open import Data.Sum.Properties open import Data.Unit.Polymorphic using (⊤; tt) diff --git a/src/Data/Unit/Polymorphic/Properties.agda b/src/Data/Unit/Polymorphic/Properties.agda index 8513229ba1..dce385f19e 100644 --- a/src/Data/Unit/Polymorphic/Properties.agda +++ b/src/Data/Unit/Polymorphic/Properties.agda @@ -11,7 +11,7 @@ module Data.Unit.Polymorphic.Properties where open import Level open import Function.Bundles using (_↔_; mk↔) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base using (inj₁) open import Data.Unit.Base renaming (⊤ to ⊤*) open import Data.Unit.Polymorphic.Base using (⊤; tt) diff --git a/src/Data/Vec/Base.agda b/src/Data/Vec/Base.agda index 911766496a..9f6d86b792 100644 --- a/src/Data/Vec/Base.agda +++ b/src/Data/Vec/Base.agda @@ -12,12 +12,12 @@ open import Data.Bool.Base using (Bool; true; false; if_then_else_) open import Data.Nat.Base open import Data.Fin.Base using (Fin; zero; suc) open import Data.List.Base as List using (List) -open import Data.Product as Prod using (∃; ∃₂; _×_; _,_) +open import Data.Product.Base as Prod using (∃; ∃₂; _×_; _,_) open import Data.These.Base as These using (These; this; that; these) open import Function.Base using (const; _∘′_; id; _∘_) open import Level using (Level) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) -open import Relation.Nullary.Decidable using (does) +open import Relation.Nullary.Decidable.Core using (does) open import Relation.Unary using (Pred; Decidable) private diff --git a/src/Data/Vec/Bounded/Base.agda b/src/Data/Vec/Bounded/Base.agda index 9c874ec89e..17b33ef7be 100644 --- a/src/Data/Vec/Bounded/Base.agda +++ b/src/Data/Vec/Bounded/Base.agda @@ -8,7 +8,6 @@ module Data.Vec.Bounded.Base where -open import Level using (Level) open import Data.Nat.Base import Data.Nat.Properties as ℕₚ open import Data.List.Base as List using (List) @@ -16,13 +15,13 @@ open import Data.List.Extrema ℕₚ.≤-totalOrder open import Data.List.Relation.Unary.All as All using (All) import Data.List.Relation.Unary.All.Properties as Allₚ open import Data.List.Membership.Propositional using (mapWith∈) -open import Data.Product using (∃; _×_; _,_; proj₁; proj₂) +open import Data.Product.Base using (∃; _×_; _,_; proj₁; proj₂) open import Data.Vec.Base as Vec using (Vec) open import Data.These.Base as These using (These) -open import Function -open import Relation.Nullary -open import Relation.Unary -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Function.Base using (_∘_; id; _$_) +open import Level using (Level) +open import Relation.Nullary.Decidable.Core using (recompute) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) private variable diff --git a/src/Data/Vec/Functional.agda b/src/Data/Vec/Functional.agda index 26e8f32160..091886bef5 100644 --- a/src/Data/Vec/Functional.agda +++ b/src/Data/Vec/Functional.agda @@ -18,10 +18,10 @@ module Data.Vec.Functional where open import Data.Fin.Base open import Data.List.Base as L using (List) open import Data.Nat.Base as ℕ using (ℕ; zero; suc; NonZero; pred) -open import Data.Product using (Σ; ∃; _×_; _,_; proj₁; proj₂; uncurry) +open import Data.Product.Base using (Σ; ∃; _×_; _,_; proj₁; proj₂; uncurry) open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Vec.Base as V using (Vec) -open import Function.Base +open import Function.Base using (_∘_; const; flip; _ˢ_; id) open import Level using (Level) infixr 5 _∷_ _++_ diff --git a/src/Data/Vec/N-ary.agda b/src/Data/Vec/N-ary.agda index 7e10c5567c..197552d753 100644 --- a/src/Data/Vec/N-ary.agda +++ b/src/Data/Vec/N-ary.agda @@ -11,14 +11,13 @@ module Data.Vec.N-ary where open import Axiom.Extensionality.Propositional using (Extensionality) open import Function.Bundles using (_↔_; Inverse; mk↔′) open import Data.Nat.Base hiding (_⊔_) -open import Data.Product as Prod -open import Data.Vec.Base -open import Function.Base +open import Data.Product.Base as Prod using (∃; _,_) +open import Data.Vec.Base using (Vec; []; _∷_; head; tail) +open import Function.Base using (_∘_; id; flip; constᵣ) open import Function.Bundles using (_⇔_; mk⇔) open import Level using (Level; _⊔_) -open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality -open import Relation.Nullary.Decidable +open import Relation.Binary.Core using (REL) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) private variable diff --git a/src/Data/Vec/Recursive.agda b/src/Data/Vec/Recursive.agda index 765db00991..0ecc16f687 100644 --- a/src/Data/Vec/Recursive.agda +++ b/src/Data/Vec/Recursive.agda @@ -16,15 +16,12 @@ module Data.Vec.Recursive where -open import Level using (Level; lift) -open import Function.Bundles using (mk↔′) -open import Function.Properties.Inverse using (↔-isEquivalence; ↔-refl; ↔-sym; ↔-trans) open import Data.Nat.Base as Nat using (ℕ; zero; suc; NonZero; pred) open import Data.Nat.Properties using (+-comm; *-comm) open import Data.Empty.Polymorphic open import Data.Fin.Base as Fin using (Fin; zero; suc) open import Data.Fin.Properties using (1↔⊤; *↔×) -open import Data.Product as Prod using (_×_; _,_; proj₁; proj₂) +open import Data.Product.Base as Prod using (_×_; _,_; proj₁; proj₂) open import Data.Product.Algebra using (×-cong) open import Data.Sum.Base as Sum using (_⊎_) open import Data.Unit.Base using (tt) @@ -32,8 +29,11 @@ open import Data.Unit.Polymorphic.Base using (⊤) open import Data.Unit.Polymorphic.Properties using (⊤↔⊤*) open import Data.Vec.Base as Vec using (Vec; _∷_) open import Data.Vec.N-ary using (N-ary) -open import Function -open import Relation.Unary +open import Function.Base using (_∘′_; _∘_; id) +open import Function.Bundles using (_↔_; mk↔′; mk↔) +open import Function.Properties.Inverse using (↔-isEquivalence; ↔-refl; ↔-sym; ↔-trans) +open import Level using (Level; lift) +open import Relation.Unary using (IUniversal; Universal; _⇒_) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; sym; trans; cong; subst) open import Relation.Binary.Structures using (IsEquivalence) diff --git a/src/Data/W.agda b/src/Data/W.agda index 3f2b35909f..159c0883a5 100644 --- a/src/Data/W.agda +++ b/src/Data/W.agda @@ -8,9 +8,9 @@ module Data.W where -open import Level +open import Level using (Level; _⊔_) open import Function.Base using (_$_; _∘_; const) -open import Data.Product using (_,_; -,_; proj₂) +open import Data.Product.Base using (_,_; -,_; proj₂) open import Data.Container.Core using (Container; ⟦_⟧; Shape; Position; _⇒_; ⟪_⟫) open import Data.Container.Relation.Unary.All using (□; all) open import Relation.Nullary.Negation using (¬_) diff --git a/src/Effect/Applicative.agda b/src/Effect/Applicative.agda index 51f7d21368..729966752c 100644 --- a/src/Effect/Applicative.agda +++ b/src/Effect/Applicative.agda @@ -12,7 +12,7 @@ module Effect.Applicative where open import Data.Bool.Base using (Bool; true; false) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.Unit.Polymorphic.Base using (⊤) open import Effect.Choice using (RawChoice) diff --git a/src/Effect/Monad/State/Transformer/Base.agda b/src/Effect/Monad/State/Transformer/Base.agda index 0680a2207b..3b5d60fd6e 100644 --- a/src/Effect/Monad/State/Transformer/Base.agda +++ b/src/Effect/Monad/State/Transformer/Base.agda @@ -9,7 +9,7 @@ module Effect.Monad.State.Transformer.Base where -open import Data.Product using (_×_; proj₁; proj₂) +open import Data.Product.Base using (_×_; proj₁; proj₂) open import Data.Unit.Polymorphic.Base using (⊤) open import Function.Base using (_∘′_; const; id) open import Level using (Level; suc; _⊔_) diff --git a/src/Effect/Monad/Writer/Transformer/Base.agda b/src/Effect/Monad/Writer/Transformer/Base.agda index bf3c254fc3..4f910b101d 100644 --- a/src/Effect/Monad/Writer/Transformer/Base.agda +++ b/src/Effect/Monad/Writer/Transformer/Base.agda @@ -9,7 +9,7 @@ module Effect.Monad.Writer.Transformer.Base where open import Algebra using (RawMonoid) -open import Data.Product using (_×_; _,_; proj₁; proj₂) +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂) open import Data.Unit.Polymorphic using (⊤; tt) open import Function.Base using (id; _∘′_) open import Level using (Level; suc; _⊔_) diff --git a/src/Function/Bundles.agda b/src/Function/Bundles.agda index 6284182845..d113f14858 100644 --- a/src/Function/Bundles.agda +++ b/src/Function/Bundles.agda @@ -23,7 +23,7 @@ open import Function.Base using (_∘_) import Function.Definitions as FunctionDefinitions import Function.Structures as FunctionStructures open import Level using (Level; _⊔_; suc) -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Relation.Binary hiding (_⇔_) open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_) diff --git a/src/Function/Consequences.agda b/src/Function/Consequences.agda index 2b7603deea..e8c6a0f498 100644 --- a/src/Function/Consequences.agda +++ b/src/Function/Consequences.agda @@ -8,13 +8,12 @@ module Function.Consequences where -open import Data.Product +open import Data.Product.Base using (_,_) open import Function.Definitions -open import Level +open import Level using (Level) open import Relation.Binary import Relation.Binary.Reasoning.Setoid as SetoidReasoning -open import Relation.Nullary.Negation using (¬_) -open import Relation.Nullary.Negation.Core using (contraposition) +open import Relation.Nullary.Negation.Core using (¬_; contraposition) private variable diff --git a/src/Function/Construct/Composition.agda b/src/Function/Construct/Composition.agda index 242456d212..a18b4b87b1 100644 --- a/src/Function/Construct/Composition.agda +++ b/src/Function/Construct/Composition.agda @@ -8,10 +8,10 @@ module Function.Construct.Composition where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function open import Level using (Level) -open import Relation.Binary as B hiding (_⇔_; IsEquivalence) +open import Relation.Binary hiding (_⇔_; IsEquivalence) private variable diff --git a/src/Function/Construct/Identity.agda b/src/Function/Construct/Identity.agda index 1b69165dda..32660bee09 100644 --- a/src/Function/Construct/Identity.agda +++ b/src/Function/Construct/Identity.agda @@ -8,12 +8,12 @@ module Function.Construct.Identity where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Function.Bundles import Function.Definitions as Definitions import Function.Structures as Structures -open import Level +open import Level using (Level) open import Relation.Binary as B hiding (_⇔_; IsEquivalence) open import Relation.Binary.PropositionalEquality using (_≡_; setoid) diff --git a/src/Function/Construct/Symmetry.agda b/src/Function/Construct/Symmetry.agda index ea86704a57..86fa273c57 100644 --- a/src/Function/Construct/Symmetry.agda +++ b/src/Function/Construct/Symmetry.agda @@ -8,7 +8,7 @@ module Function.Construct.Symmetry where -open import Data.Product using (_,_; swap; proj₁; proj₂) +open import Data.Product.Base using (_,_; swap; proj₁; proj₂) open import Function open import Level using (Level) open import Relation.Binary hiding (_⇔_) diff --git a/src/Function/Definitions.agda b/src/Function/Definitions.agda index ac805d9472..bfeff3c05c 100644 --- a/src/Function/Definitions.agda +++ b/src/Function/Definitions.agda @@ -8,7 +8,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary +open import Relation.Binary.Core using (Rel) module Function.Definitions {a b ℓ₁ ℓ₂} {A : Set a} {B : Set b} @@ -16,10 +16,9 @@ module Function.Definitions (_≈₂_ : Rel B ℓ₂) -- Equality over the codomain where -open import Data.Product using (∃; _×_) +open import Data.Product.Base using (_×_) import Function.Definitions.Core1 as Core₁ import Function.Definitions.Core2 as Core₂ -open import Function.Base open import Level using (_⊔_) ------------------------------------------------------------------------ diff --git a/src/Function/Definitions/Core1.agda b/src/Function/Definitions/Core1.agda index c81e841af9..b11ca26fea 100644 --- a/src/Function/Definitions/Core1.agda +++ b/src/Function/Definitions/Core1.agda @@ -9,7 +9,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary +open import Relation.Binary.Core using (Rel) module Function.Definitions.Core1 {a b ℓ₁} {A : Set a} {B : Set b} (_≈₁_ : Rel A ℓ₁) diff --git a/src/Function/Definitions/Core2.agda b/src/Function/Definitions/Core2.agda index 313f331063..74973d8433 100644 --- a/src/Function/Definitions/Core2.agda +++ b/src/Function/Definitions/Core2.agda @@ -9,13 +9,13 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary +open import Relation.Binary.Core using (Rel) module Function.Definitions.Core2 {a b ℓ₂} {A : Set a} {B : Set b} (_≈₂_ : Rel B ℓ₂) where -open import Data.Product using (∃) +open import Data.Product.Base using (∃) open import Level using (Level; _⊔_) ------------------------------------------------------------------------ diff --git a/src/Function/Equality.agda b/src/Function/Equality.agda index 97bb752ceb..bb32bca8cd 100644 --- a/src/Function/Equality.agda +++ b/src/Function/Equality.agda @@ -14,7 +14,7 @@ module Function.Equality where import Function.Base as Fun -open import Level +open import Level using (Level; _⊔_) open import Relation.Binary using (Setoid) open import Relation.Binary.Indexed.Heterogeneous using (IndexedSetoid; _=[_]⇒_) diff --git a/src/Function/Metric/Definitions.agda b/src/Function/Metric/Definitions.agda index 6c6d471aef..f0be9cb724 100644 --- a/src/Function/Metric/Definitions.agda +++ b/src/Function/Metric/Definitions.agda @@ -11,7 +11,7 @@ module Function.Metric.Definitions where open import Algebra.Core using (Op₂) -open import Data.Product using (∃) +open import Data.Product.Base using (∃) open import Function.Metric.Core using (DistanceFunction) open import Level using (Level) open import Relation.Binary.Core using (Rel; _Preserves₂_⟶_⟶_) diff --git a/src/Function/Nary/NonDependent/Base.agda b/src/Function/Nary/NonDependent/Base.agda index 72e093b3a7..efb24aec57 100644 --- a/src/Function/Nary/NonDependent/Base.agda +++ b/src/Function/Nary/NonDependent/Base.agda @@ -16,7 +16,7 @@ module Function.Nary.NonDependent.Base where open import Level using (Level; 0ℓ; _⊔_) open import Data.Nat.Base using (ℕ; zero; suc) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.Unit.Polymorphic.Base open import Function.Base using (_∘′_; _$′_; const; flip) diff --git a/src/Function/Properties/Inverse.agda b/src/Function/Properties/Inverse.agda index 6310a8479f..508a8664be 100644 --- a/src/Function/Properties/Inverse.agda +++ b/src/Function/Properties/Inverse.agda @@ -10,7 +10,7 @@ module Function.Properties.Inverse where open import Axiom.Extensionality.Propositional using (Extensionality) -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Function.Bundles open import Level using (Level) open import Relation.Binary using (Setoid; IsEquivalence) diff --git a/src/Function/Structures.agda b/src/Function/Structures.agda index 31004c2db4..770dab600e 100644 --- a/src/Function/Structures.agda +++ b/src/Function/Structures.agda @@ -15,8 +15,7 @@ module Function.Structures {a b ℓ₁ ℓ₂} {B : Set b} (_≈₂_ : Rel B ℓ₂) -- Equality over the codomain where -open import Data.Product using (∃; _×_; _,_) -open import Function.Base +open import Data.Product.Base using (_,_) open import Function.Definitions open import Level using (_⊔_) diff --git a/src/Induction/WellFounded.agda b/src/Induction/WellFounded.agda index d580452f0f..c1e206a0af 100644 --- a/src/Induction/WellFounded.agda +++ b/src/Induction/WellFounded.agda @@ -6,15 +6,14 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary - module Induction.WellFounded where -open import Data.Product -open import Function +open import Data.Product.Base using (Σ; _,_; proj₁) +open import Function.Base using (_on_) open import Induction -open import Level -open import Relation.Binary.PropositionalEquality hiding (trans) +open import Level using (Level; _⊔_) +open import Relation.Binary +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Unary private diff --git a/src/Relation/Binary/Consequences.agda b/src/Relation/Binary/Consequences.agda index ff82600c03..cd560ec995 100644 --- a/src/Relation/Binary/Consequences.agda +++ b/src/Relation/Binary/Consequences.agda @@ -10,7 +10,7 @@ module Relation.Binary.Consequences where open import Data.Maybe.Base using (just; nothing; decToMaybe) open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]′) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Empty.Irrelevant using (⊥-elim) open import Function.Base using (_∘_; _∘₂_; _$_; flip) open import Level using (Level) diff --git a/src/Relation/Binary/Construct/Flip/EqAndOrd.agda b/src/Relation/Binary/Construct/Flip/EqAndOrd.agda index 1d3e9430d9..c3c4dc2a18 100644 --- a/src/Relation/Binary/Construct/Flip/EqAndOrd.agda +++ b/src/Relation/Binary/Construct/Flip/EqAndOrd.agda @@ -12,7 +12,7 @@ open import Relation.Binary module Relation.Binary.Construct.Flip.EqAndOrd where -open import Data.Product +open import Data.Product.Base using (_,_) open import Function.Base using (flip; _∘_) open import Level using (Level) diff --git a/src/Relation/Binary/Construct/NaturalOrder/Left.agda b/src/Relation/Binary/Construct/NaturalOrder/Left.agda index db1d0f5aff..e0ab59e9ca 100644 --- a/src/Relation/Binary/Construct/NaturalOrder/Left.agda +++ b/src/Relation/Binary/Construct/NaturalOrder/Left.agda @@ -8,7 +8,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra.Core -open import Data.Product using (_,_; _×_) +open import Data.Product.Base using (_,_; _×_) open import Data.Sum.Base using (inj₁; inj₂) open import Relation.Binary open import Relation.Nullary.Negation using (¬_) diff --git a/src/Relation/Binary/Construct/NaturalOrder/Right.agda b/src/Relation/Binary/Construct/NaturalOrder/Right.agda index 7c4a6ab119..5278f0b116 100644 --- a/src/Relation/Binary/Construct/NaturalOrder/Right.agda +++ b/src/Relation/Binary/Construct/NaturalOrder/Right.agda @@ -8,7 +8,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra.Core using (Op₂) -open import Data.Product using (_,_; _×_) +open import Data.Product.Base using (_,_; _×_) open import Data.Sum.Base using (inj₁; inj₂) open import Relation.Binary open import Relation.Nullary.Negation using (¬_) diff --git a/src/Relation/Binary/Core.agda b/src/Relation/Binary/Core.agda index d9c19173a1..079bf296cc 100644 --- a/src/Relation/Binary/Core.agda +++ b/src/Relation/Binary/Core.agda @@ -10,7 +10,7 @@ module Relation.Binary.Core where -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Function.Base using (_on_) open import Level using (Level; _⊔_; suc) diff --git a/src/Relation/Binary/Definitions.agda b/src/Relation/Binary/Definitions.agda index a44f2d058e..2ed315191b 100644 --- a/src/Relation/Binary/Definitions.agda +++ b/src/Relation/Binary/Definitions.agda @@ -13,7 +13,7 @@ module Relation.Binary.Definitions where open import Agda.Builtin.Equality using (_≡_) open import Data.Maybe.Base using (Maybe) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Data.Sum.Base using (_⊎_) open import Function.Base using (_on_; flip) open import Level diff --git a/src/Relation/Binary/Lattice/Definitions.agda b/src/Relation/Binary/Lattice/Definitions.agda index 61102f19f9..2cdc32a1c3 100644 --- a/src/Relation/Binary/Lattice/Definitions.agda +++ b/src/Relation/Binary/Lattice/Definitions.agda @@ -12,10 +12,10 @@ module Relation.Binary.Lattice.Definitions where open import Algebra.Core -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Function.Base using (flip) -open import Relation.Binary -open import Level +open import Relation.Binary.Core using (Rel) +open import Level using (Level) private variable diff --git a/src/Relation/Binary/Lattice/Structures.agda b/src/Relation/Binary/Lattice/Structures.agda index 10178af05d..07dbfad6a5 100644 --- a/src/Relation/Binary/Lattice/Structures.agda +++ b/src/Relation/Binary/Lattice/Structures.agda @@ -19,7 +19,7 @@ module Relation.Binary.Lattice.Structures open import Algebra.Core open import Algebra.Definitions -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Level using (suc; _⊔_) open import Relation.Binary.Lattice.Definitions diff --git a/src/Relation/Binary/Morphism/Structures.agda b/src/Relation/Binary/Morphism/Structures.agda index 39a333e1b7..86eceac6e4 100644 --- a/src/Relation/Binary/Morphism/Structures.agda +++ b/src/Relation/Binary/Morphism/Structures.agda @@ -6,15 +6,15 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary.Core +open import Relation.Binary.Core using (Rel) module Relation.Binary.Morphism.Structures {a b} {A : Set a} {B : Set b} where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Definitions -open import Level +open import Level using (Level; _⊔_) open import Relation.Binary.Morphism.Definitions A B private diff --git a/src/Relation/Binary/Properties/Preorder.agda b/src/Relation/Binary/Properties/Preorder.agda index 1a215b639c..e09bd0f3f1 100644 --- a/src/Relation/Binary/Properties/Preorder.agda +++ b/src/Relation/Binary/Properties/Preorder.agda @@ -11,8 +11,8 @@ open import Relation.Binary module Relation.Binary.Properties.Preorder {p₁ p₂ p₃} (P : Preorder p₁ p₂ p₃) where -open import Function.Base -open import Data.Product as Prod +open import Function.Base using (flip) +open import Data.Product.Base as Prod using (_×_; _,_; swap) import Relation.Binary.Construct.Flip.EqAndOrd as EqAndOrd open Preorder P diff --git a/src/Relation/Binary/Properties/Setoid.agda b/src/Relation/Binary/Properties/Setoid.agda index 137641d49b..cca28fb5ad 100644 --- a/src/Relation/Binary/Properties/Setoid.agda +++ b/src/Relation/Binary/Properties/Setoid.agda @@ -6,9 +6,9 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_∘_; id; _$_; flip) -open import Relation.Nullary.Negation using (¬_) +open import Relation.Nullary.Negation.Core using (¬_) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary @@ -16,7 +16,6 @@ module Relation.Binary.Properties.Setoid {a ℓ} (S : Setoid a ℓ) where open Setoid S - ------------------------------------------------------------------------------ -- Every setoid is a preorder and partial order with respect to propositional -- equality diff --git a/src/Relation/Binary/Properties/TotalOrder.agda b/src/Relation/Binary/Properties/TotalOrder.agda index da4f316892..18e7095985 100644 --- a/src/Relation/Binary/Properties/TotalOrder.agda +++ b/src/Relation/Binary/Properties/TotalOrder.agda @@ -13,14 +13,12 @@ module Relation.Binary.Properties.TotalOrder open TotalOrder T -open import Data.Product using (proj₁) +open import Data.Product.Base using (proj₁) open import Data.Sum.Base using (inj₁; inj₂) import Relation.Binary.Construct.Flip.EqAndOrd as EqAndOrd import Relation.Binary.Construct.NonStrictToStrict _≈_ _≤_ as ToStrict import Relation.Binary.Properties.Poset poset as PosetProperties open import Relation.Binary.Consequences -open import Relation.Nullary.Negation using (¬_) -open import Relation.Nullary.Negation using (contradiction) ------------------------------------------------------------------------ -- Total orders are almost decidable total orders diff --git a/src/Relation/Binary/PropositionalEquality.agda b/src/Relation/Binary/PropositionalEquality.agda index 4764635449..37c891312b 100644 --- a/src/Relation/Binary/PropositionalEquality.agda +++ b/src/Relation/Binary/PropositionalEquality.agda @@ -13,10 +13,9 @@ open import Axiom.UniquenessOfIdentityProofs open import Function.Base using (id; _∘_) open import Function.Equality using (Π; _⟶_; ≡-setoid) open import Level using (Level; _⊔_) -open import Data.Product using (∃) +open import Data.Product.Base using (∃) -open import Relation.Nullary.Decidable using (yes; no) -open import Relation.Nullary.Decidable +open import Relation.Nullary.Decidable using (yes; no; dec-yes-irr; dec-no) open import Relation.Binary open import Relation.Binary.Indexed.Heterogeneous using (IndexedSetoid) @@ -132,4 +131,3 @@ Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/ "Warning: inspect was deprecated in v2.0. Please use new `with ... in` syntax described at https://agda.readthedocs.io/en/v2.6.3/language/with-abstraction.html#with-abstraction-equality instead." #-} - diff --git a/src/Relation/Binary/PropositionalEquality/Core.agda b/src/Relation/Binary/PropositionalEquality/Core.agda index 83c406b8aa..c0c4030b83 100644 --- a/src/Relation/Binary/PropositionalEquality/Core.agda +++ b/src/Relation/Binary/PropositionalEquality/Core.agda @@ -11,7 +11,7 @@ module Relation.Binary.PropositionalEquality.Core where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_∘_) open import Level open import Relation.Binary.Core diff --git a/src/Relation/Binary/PropositionalEquality/Properties.agda b/src/Relation/Binary/PropositionalEquality/Properties.agda index 0953c68cbd..ad936254ff 100644 --- a/src/Relation/Binary/PropositionalEquality/Properties.agda +++ b/src/Relation/Binary/PropositionalEquality/Properties.agda @@ -13,7 +13,7 @@ module Relation.Binary.PropositionalEquality.Properties where open import Function.Base using (id; _∘_) -open import Level +open import Level using (Level) open import Relation.Binary import Relation.Binary.Properties.Setoid as Setoid open import Relation.Binary.PropositionalEquality.Core diff --git a/src/Relation/Binary/Reasoning/Base/Double.agda b/src/Relation/Binary/Reasoning/Base/Double.agda index f40a32bc9b..07761c5144 100644 --- a/src/Relation/Binary/Reasoning/Base/Double.agda +++ b/src/Relation/Binary/Reasoning/Base/Double.agda @@ -16,13 +16,13 @@ module Relation.Binary.Reasoning.Base.Double {a ℓ₁ ℓ₂} {A : Set a} {_≈_ : Rel A ℓ₁} {_∼_ : Rel A ℓ₂} (isPreorder : IsPreorder _≈_ _∼_) where -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Level using (Level; _⊔_; Lift; lift) open import Function.Base using (case_of_; id) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; sym) -open import Relation.Nullary.Decidable using (Dec; yes; no) -open import Relation.Nullary.Decidable using (True; toWitness) +open import Relation.Nullary.Decidable.Core + using (Dec; yes; no; True; toWitness) open IsPreorder isPreorder diff --git a/src/Relation/Binary/Reasoning/Base/Triple.agda b/src/Relation/Binary/Reasoning/Base/Triple.agda index 8e5ba6e159..c18aa9bf94 100644 --- a/src/Relation/Binary/Reasoning/Base/Triple.agda +++ b/src/Relation/Binary/Reasoning/Base/Triple.agda @@ -19,13 +19,13 @@ module Relation.Binary.Reasoning.Base.Triple {a ℓ₁ ℓ₂ ℓ₃} {A : Set a (<-≤-trans : Trans _<_ _≤_ _<_) (≤-<-trans : Trans _≤_ _<_ _<_) where -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Function.Base using (case_of_; id) open import Level using (Level; _⊔_; Lift; lift) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; sym) -open import Relation.Nullary.Decidable using (Dec; yes; no) -open import Relation.Nullary.Decidable using (True; toWitness) +open import Relation.Nullary.Decidable.Core + using (Dec; yes; no; True; toWitness) open IsPreorder isPreorder renaming diff --git a/src/Relation/Binary/Reflection.agda b/src/Relation/Binary/Reflection.agda index 8b682a0407..5a9ec838fb 100644 --- a/src/Relation/Binary/Reflection.agda +++ b/src/Relation/Binary/Reflection.agda @@ -7,12 +7,12 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Fin.Base -open import Data.Nat.Base -open import Data.Vec.Base as Vec -open import Function.Base +open import Data.Fin.Base using (Fin) +open import Data.Nat.Base using (ℕ) +open import Data.Vec.Base as Vec using (Vec; allFin) +open import Function.Base using (id; _⟨_⟩_) open import Function.Bundles using (module Equivalence) -open import Level +open import Level using (Level) open import Relation.Binary import Relation.Binary.PropositionalEquality as P @@ -41,7 +41,7 @@ module Relation.Binary.Reflection where open import Data.Vec.N-ary -open import Data.Product +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂) import Relation.Binary.Reasoning.Setoid as Eq open Setoid Sem diff --git a/src/Relation/Binary/Structures.agda b/src/Relation/Binary/Structures.agda index 058ca5135c..965e41691b 100644 --- a/src/Relation/Binary/Structures.agda +++ b/src/Relation/Binary/Structures.agda @@ -15,7 +15,7 @@ module Relation.Binary.Structures (_≈_ : Rel A ℓ) -- The underlying equality relation where -open import Data.Product using (proj₁; proj₂; _,_) +open import Data.Product.Base using (proj₁; proj₂; _,_) open import Level using (Level; _⊔_) open import Relation.Nullary.Negation.Core using (¬_) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) diff --git a/src/Relation/Nullary/Decidable.agda b/src/Relation/Nullary/Decidable.agda index a8970d9df5..b41a410391 100644 --- a/src/Relation/Nullary/Decidable.agda +++ b/src/Relation/Nullary/Decidable.agda @@ -11,7 +11,7 @@ module Relation.Nullary.Decidable where open import Level using (Level) open import Data.Bool.Base using (true; false; if_then_else_) open import Data.Empty using (⊥-elim) -open import Data.Product as Prod hiding (map) +open import Data.Product.Base as Prod hiding (map) open import Data.Sum.Base as Sum hiding (map) open import Function.Base open import Function.Bundles using diff --git a/src/Relation/Nullary/Decidable/Core.agda b/src/Relation/Nullary/Decidable/Core.agda index c8d92f9375..e06dc32239 100644 --- a/src/Relation/Nullary/Decidable/Core.agda +++ b/src/Relation/Nullary/Decidable/Core.agda @@ -16,7 +16,7 @@ open import Data.Bool.Base using (Bool; false; true; not; T; _∧_; _∨_) open import Data.Unit.Base using (⊤) open import Data.Empty using (⊥) open import Data.Empty.Irrelevant using (⊥-elim) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Data.Sum.Base using (_⊎_) open import Function.Base using (_∘_; const; _$_; flip) open import Relation.Nullary.Reflects diff --git a/src/Relation/Nullary/Negation.agda b/src/Relation/Nullary/Negation.agda index 6f663e73ac..5111db897f 100644 --- a/src/Relation/Nullary/Negation.agda +++ b/src/Relation/Nullary/Negation.agda @@ -8,16 +8,15 @@ module Relation.Nullary.Negation where -open import Effect.Monad +open import Effect.Monad using (RawMonad; mkRawMonad) open import Data.Bool.Base using (Bool; false; true; if_then_else_; not) -open import Data.Empty -open import Data.Product as Prod +open import Data.Empty using (⊥-elim) +open import Data.Product.Base as Prod using (_,_; Σ; Σ-syntax; ∃; curry; uncurry) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]) -open import Function.Base -open import Level -open import Relation.Nullary.Negation.Core -open import Relation.Nullary.Decidable.Core -open import Relation.Unary +open import Function.Base using (flip; _∘_; const; _∘′_) +open import Level using (Level) +open import Relation.Nullary.Decidable.Core using (Dec; yes; no; excluded-middle) +open import Relation.Unary using (Universal) private variable @@ -89,7 +88,7 @@ independence-of-premise : {R : Q → Set r} → independence-of-premise {P = P} q f = ¬¬-map helper excluded-middle where helper : Dec P → _ - helper (yes p) = Prod.map id const (f p) + helper (yes p) = Prod.map₂ const (f p) helper (no ¬p) = (q , ⊥-elim ∘′ ¬p) -- The independence of premise rule for binary sums. diff --git a/src/Relation/Unary.agda b/src/Relation/Unary.agda index 76c064836b..f6d7cb13b0 100644 --- a/src/Relation/Unary.agda +++ b/src/Relation/Unary.agda @@ -8,12 +8,12 @@ module Relation.Unary where -open import Data.Empty +open import Data.Empty using (⊥) open import Data.Unit.Base using (⊤) -open import Data.Product +open import Data.Product.Base using (_×_; _,_; Σ-syntax; ∃; uncurry; swap) open import Data.Sum.Base using (_⊎_; [_,_]) -open import Function.Base -open import Level +open import Function.Base using (_∘_; _|>_) +open import Level using (Level; _⊔_; 0ℓ; suc; Lift) open import Relation.Nullary.Decidable.Core using (Dec; True) open import Relation.Nullary.Negation.Core using (¬_) open import Relation.Binary.PropositionalEquality.Core using (_≡_) @@ -285,7 +285,7 @@ _⟨→⟩_ : Pred A ℓ₁ → Pred B ℓ₂ → Pred (A → B) _ -- Product. _⟨·⟩_ : (P : Pred A ℓ₁) (Q : Pred B ℓ₂) → - (P ⟨×⟩ (P ⟨→⟩ Q)) ⊆ Q ∘ uncurry (flip _$_) + (P ⟨×⟩ (P ⟨→⟩ Q)) ⊆ Q ∘ uncurry _|>_ (P ⟨·⟩ Q) (p , f) = f p -- Converse. diff --git a/src/Relation/Unary/Closure/Base.agda b/src/Relation/Unary/Closure/Base.agda index 5a210104b4..992e87df65 100644 --- a/src/Relation/Unary/Closure/Base.agda +++ b/src/Relation/Unary/Closure/Base.agda @@ -11,7 +11,7 @@ open import Relation.Binary module Relation.Unary.Closure.Base {a b} {A : Set a} (R : Rel A b) where open import Level -open import Data.Product using (Σ-syntax; _×_; _,_; -,_) +open import Data.Product.Base using (Σ-syntax; _×_; _,_; -,_) open import Function.Base using (flip) open import Relation.Unary using (Pred) diff --git a/src/Relation/Unary/Properties.agda b/src/Relation/Unary/Properties.agda index e0b059f0b4..f30a9e59b4 100644 --- a/src/Relation/Unary/Properties.agda +++ b/src/Relation/Unary/Properties.agda @@ -8,10 +8,10 @@ module Relation.Unary.Properties where -open import Data.Product as Product using (_×_; _,_; swap; proj₁; zip′) +open import Data.Product.Base as Product using (_×_; _,_; swap; proj₁; zip′) open import Data.Sum.Base using (inj₁; inj₂) open import Data.Unit.Base using (tt) -open import Level +open import Level using (Level) open import Relation.Binary.Core as Binary open import Relation.Binary.Definitions hiding (Decidable; Universal; Irrelevant) open import Relation.Binary.PropositionalEquality.Core using (refl) diff --git a/src/Tactic/RingSolver.agda b/src/Tactic/RingSolver.agda index 3ae3451e68..6441342e40 100644 --- a/src/Tactic/RingSolver.agda +++ b/src/Tactic/RingSolver.agda @@ -18,7 +18,7 @@ open import Data.Nat.Base using (ℕ; suc; zero; _<ᵇ_) open import Data.Bool.Base using (Bool; if_then_else_; true; false) open import Data.Unit.Base using (⊤) open import Data.String.Base as String using (String; _++_; parens) -open import Data.Product using (_,_; proj₁) +open import Data.Product.Base using (_,_; proj₁) open import Function.Base open import Relation.Nullary.Decidable diff --git a/src/Tactic/RingSolver/Core/Polynomial/Base.agda b/src/Tactic/RingSolver/Core/Polynomial/Base.agda index d762794b5e..6cfece2d45 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Base.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Base.agda @@ -50,15 +50,15 @@ module Tactic.RingSolver.Core.Polynomial.Base open RawCoeff coeffs -open import Data.Bool using (Bool; true; false; T) +open import Data.Bool.Base using (Bool; true; false; T) open import Data.Empty using (⊥) open import Data.Fin.Base as Fin using (Fin; zero; suc) open import Data.List.Kleene open import Data.Nat.Base as ℕ using (ℕ; suc; zero; _≤′_; compare; ≤′-refl; ≤′-step; _<′_) open import Data.Nat.Properties using (z≤′n; ≤′-trans) open import Data.Nat.Induction -open import Data.Product using (_×_; _,_; map₁; curry; uncurry) -open import Data.Unit using (⊤; tt) +open import Data.Product.Base using (_×_; _,_; map₁; curry; uncurry) +open import Data.Unit.Base using (⊤; tt) open import Function.Base open import Relation.Nullary using (¬_; Dec; yes; no) diff --git a/src/Text/Pretty.agda b/src/Text/Pretty.agda index 08c60701bf..0bdfe0cf2f 100644 --- a/src/Text/Pretty.agda +++ b/src/Text/Pretty.agda @@ -13,14 +13,14 @@ open import Data.Nat.Base using (ℕ) module Text.Pretty (width : ℕ) where import Level -open import Data.Char.Base using (Char) +open import Data.Char.Base using (Char) open import Data.List.Base using (List; _∷_; []; [_]; uncons; _++_; map; filter) open import Data.List.NonEmpty as List⁺ using (foldr₁) -open import Data.Maybe.Base using (maybe′) -open import Data.Product using (uncurry) -open import Data.String.Base using (String; fromList; replicate) -open import Function.Base +open import Data.Maybe.Base using (maybe′) +open import Data.Product.Base using (uncurry) +open import Data.String.Base using (String; fromList; replicate) +open import Function.Base using (_∘_; _∘′_; _$_) open import Effect.Monad using (RawMonad) import Data.List.Effectful as Cat diff --git a/src/Text/Pretty/Core.agda b/src/Text/Pretty/Core.agda index f546bc5962..a97db1dda2 100644 --- a/src/Text/Pretty/Core.agda +++ b/src/Text/Pretty/Core.agda @@ -17,7 +17,7 @@ open import Data.Irrelevant as Irrelevant using (Irrelevant) hiding (module Irre open import Data.List.Base as List using (List; []; _∷_) open import Data.Nat.Base using (ℕ; zero; suc; _+_; _⊔_; _≤_; z≤n) open import Data.Nat.Properties -open import Data.Product as Prod using (_×_; _,_; uncurry; proj₁; proj₂) +open import Data.Product.Base as Prod using (_×_; _,_; uncurry; proj₁; proj₂) import Data.Product.Relation.Unary.All as Allᴾ open import Data.Tree.Binary as Tree using (Tree; leaf; node; #nodes; mapₙ) diff --git a/src/Text/Printf.agda b/src/Text/Printf.agda index 7397f908f0..057b2718b8 100644 --- a/src/Text/Printf.agda +++ b/src/Text/Printf.agda @@ -8,17 +8,8 @@ module Text.Printf where -open import Level using (0ℓ; Lift) -open import Data.List.Base as List using (List; []; _∷_) -open import Data.Nat.Base using (ℕ) -open import Data.Product -open import Data.Product.Nary.NonDependent -open import Data.String.Base -open import Data.Sum.Base using (_⊎_; inj₁; inj₂) -open import Data.Unit using (⊤) -open import Function.Nary.NonDependent -open import Function -open import Function.Strict +open import Data.String.Base using (String; fromChar; concat) +open import Function.Base using (id) import Data.Char.Base as Cₛ import Data.Integer.Show as ℤₛ diff --git a/src/Text/Regex/Base.agda b/src/Text/Regex/Base.agda index 7fe7d56cbf..839bad4181 100644 --- a/src/Text/Regex/Base.agda +++ b/src/Text/Regex/Base.agda @@ -16,12 +16,9 @@ open import Data.Bool.Base using (Bool) open import Data.List.Base as L using (List; []; _∷_) open import Data.List.Relation.Unary.Any using (Any) open import Data.List.Relation.Unary.All using (All) -open import Data.Sum.Base using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base using (_⊎_) -open import Relation.Nullary.Negation using (¬_) -open import Relation.Nullary.Negation using (contradiction) -open import Relation.Unary using (Pred) -open import Relation.Binary.PropositionalEquality +open import Relation.Nullary.Negation.Core using (¬_) open Preorder P using (_≈_) renaming (Carrier to A; _∼_ to _≤_) open import Data.List.Relation.Ternary.Appending.Propositional {A = A} From 7b352f6f2ba446b12207a094f451375cb6e8b594 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Tue, 27 Jun 2023 04:08:30 -0400 Subject: [PATCH 059/316] Fixities for `Relation` and `Algebra` (#1992) --- CHANGELOG.md | 7 +++++++ src/Algebra/Solver/Ring.agda | 2 ++ src/Relation/Binary/Bundles.agda | 1 + src/Relation/Binary/Construct/Add/Infimum/Strict.agda | 2 ++ src/Relation/Binary/Construct/Add/Point/Equality.agda | 2 ++ src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda | 2 ++ src/Relation/Binary/Construct/Closure/Transitive.agda | 2 ++ src/Relation/Binary/Construct/Intersection.agda | 2 ++ 8 files changed, 20 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 25bc7bd058..c6f541483d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -105,6 +105,13 @@ Bug-fixes infix 8 _⁻¹ (Data.Parity.Base) infixr 5 _`∷_ (Data.Vec.Reflection) infixr 5 _∷=_ (Data.Vec.Membership.Setoid) + infix 4 _≟H_ _≟N_ (Algebra.Solver.Ring) + infix 4 _≈_ (Relation.Binary.Bundles) + infixl 6 _∩_ (Relation.Binary.Construct.Intersection) + infix 4 _<₋_ (Relation.Binary.Construct.Add.Infimum.Strict) + infix 4 _≈∙_ (Relation.Binary.Construct.Add.Point.Equality) + infix 4 _≤⁺_ _≤⊤⁺ (Relation.Binary.Construct.Add.Supremum.NonStrict) + infixr 5 _∷ʳ_ (Relation.Binary.Construct.Closure.Transitive) ``` * In `System.Exit`, the `ExitFailure` constructor is now carrying an integer diff --git a/src/Algebra/Solver/Ring.agda b/src/Algebra/Solver/Ring.agda index 669cbe8d25..a1ea98ead3 100644 --- a/src/Algebra/Solver/Ring.agda +++ b/src/Algebra/Solver/Ring.agda @@ -176,6 +176,8 @@ mutual -- Equality is weakly decidable. + infix 4 _≟H_ _≟N_ + _≟H_ : ∀ {n} → WeaklyDecidable (_≈H_ {n = n}) ∅ ≟H ∅ = just ∅ ∅ ≟H (_ *x+ _) = nothing diff --git a/src/Relation/Binary/Bundles.agda b/src/Relation/Binary/Bundles.agda index 498e1f95ef..5a0621629f 100644 --- a/src/Relation/Binary/Bundles.agda +++ b/src/Relation/Binary/Bundles.agda @@ -21,6 +21,7 @@ open import Relation.Binary.Structures ------------------------------------------------------------------------ record PartialSetoid a ℓ : Set (suc (a ⊔ ℓ)) where + infix 4 _≈_ field Carrier : Set a _≈_ : Rel Carrier ℓ diff --git a/src/Relation/Binary/Construct/Add/Infimum/Strict.agda b/src/Relation/Binary/Construct/Add/Infimum/Strict.agda index 06ac74899b..45463af482 100644 --- a/src/Relation/Binary/Construct/Add/Infimum/Strict.agda +++ b/src/Relation/Binary/Construct/Add/Infimum/Strict.agda @@ -28,6 +28,8 @@ import Relation.Nullary.Decidable as Dec ------------------------------------------------------------------------ -- Definition +infix 4 _<₋_ + data _<₋_ : Rel (A ₋) (a ⊔ ℓ) where ⊥₋<[_] : (l : A) → ⊥₋ <₋ [ l ] [_] : {k l : A} → k < l → [ k ] <₋ [ l ] diff --git a/src/Relation/Binary/Construct/Add/Point/Equality.agda b/src/Relation/Binary/Construct/Add/Point/Equality.agda index 2968754a9f..a0b01a3d2b 100644 --- a/src/Relation/Binary/Construct/Add/Point/Equality.agda +++ b/src/Relation/Binary/Construct/Add/Point/Equality.agda @@ -24,6 +24,8 @@ import Relation.Nullary.Decidable as Dec ------------------------------------------------------------------------ -- Definition +infix 4 _≈∙_ + data _≈∙_ : Rel (Pointed A) (a ⊔ ℓ) where ∙≈∙ : ∙ ≈∙ ∙ [_] : {k l : A} → k ≈ l → [ k ] ≈∙ [ l ] diff --git a/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda b/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda index 68346824a2..be30c7973c 100644 --- a/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda +++ b/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda @@ -26,6 +26,8 @@ import Relation.Binary.Construct.Add.Supremum.Equality as Equality ------------------------------------------------------------------------ -- Definition +infix 4 _≤⁺_ _≤⊤⁺ + data _≤⁺_ : Rel (A ⁺) (a ⊔ ℓ) where [_] : {k l : A} → k ≤ l → [ k ] ≤⁺ [ l ] _≤⊤⁺ : (k : A ⁺) → k ≤⁺ ⊤⁺ diff --git a/src/Relation/Binary/Construct/Closure/Transitive.agda b/src/Relation/Binary/Construct/Closure/Transitive.agda index 85ab19e3dc..1699dc0cb6 100644 --- a/src/Relation/Binary/Construct/Closure/Transitive.agda +++ b/src/Relation/Binary/Construct/Closure/Transitive.agda @@ -39,6 +39,8 @@ module _ {_∼_ : Rel A ℓ} where private _∼⁺_ = TransClosure _∼_ + infixr 5 _∷ʳ_ + _∷ʳ_ : ∀ {x y z} → (x∼⁺y : x ∼⁺ y) (y∼z : y ∼ z) → x ∼⁺ z [ x∼y ] ∷ʳ y∼z = x∼y ∷ [ y∼z ] (x∼y ∷ x∼⁺y) ∷ʳ y∼z = x∼y ∷ (x∼⁺y ∷ʳ y∼z) diff --git a/src/Relation/Binary/Construct/Intersection.agda b/src/Relation/Binary/Construct/Intersection.agda index f74dfb3de9..17845536ca 100644 --- a/src/Relation/Binary/Construct/Intersection.agda +++ b/src/Relation/Binary/Construct/Intersection.agda @@ -24,6 +24,8 @@ private ------------------------------------------------------------------------ -- Definition +infixl 6 _∩_ + _∩_ : REL A B ℓ₁ → REL A B ℓ₂ → REL A B (ℓ₁ ⊔ ℓ₂) L ∩ R = λ i j → L i j × R i j From 6bd4afb1c03a30bc1344b478467f09abe8d49203 Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Tue, 27 Jun 2023 04:11:31 -0400 Subject: [PATCH 060/316] Add new proof `take-all` to `Data.List.Properties` (#1983) --- CHANGELOG.md | 3 ++- src/Data/List/Properties.agda | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6f541483d..b7b0f3f225 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2152,7 +2152,8 @@ Other minor changes length-isMagmaHomomorphism : (A : Set a) → IsMagmaHomomorphism (++-rawMagma A) +-rawMagma length length-isMonoidHomomorphism : (A : Set a) → IsMonoidHomomorphism (++-[]-rawMonoid A) +-0-rawMonoid length - + + take-all : n ≥ length xs → take n xs ≡ xs take-[] : ∀ m → take m [] ≡ [] drop-[] : ∀ m → drop m [] ≡ [] ``` diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index 9df56d4781..08e78cd5a6 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -759,6 +759,12 @@ length-take zero xs = refl length-take (suc n) [] = refl length-take (suc n) (x ∷ xs) = cong suc (length-take n xs) +-- If you take at least as many elements from a list as it has, you get the whole list. +take-all :(n : ℕ) (xs : List A) → n ≥ length xs → take n xs ≡ xs +take-all zero [] _ = refl +take-all (suc _) [] _ = refl +take-all (suc n) (x ∷ xs) (s≤s pf) = cong (x ∷_) (take-all n xs pf) + -- Taking from an empty list does nothing. take-[] : ∀ m → take {A = A} m [] ≡ [] take-[] zero = refl From e10c5e2842db3581342dd15d8247ad9c3457118d Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Tue, 27 Jun 2023 22:24:28 -0400 Subject: [PATCH 061/316] New functions `take-drop-1` and `take-one-more` added to Data.List.Properties (#1984) --- CHANGELOG.md | 8 +++++++- src/Data/List/Properties.agda | 23 +++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7b0f3f225..6d692fdb4a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2152,8 +2152,14 @@ Other minor changes length-isMagmaHomomorphism : (A : Set a) → IsMagmaHomomorphism (++-rawMagma A) +-rawMagma length length-isMonoidHomomorphism : (A : Set a) → IsMonoidHomomorphism (++-[]-rawMonoid A) +-0-rawMonoid length + + take-suc : (o : Fin (length xs)) → let m = toℕ o in take (suc m) xs ≡ take m xs ∷ʳ lookup xs o + take-suc-tabulate : (f : Fin n → A) (o : Fin n) → let m = toℕ o in take (suc m) (tabulate f) ≡ take m (tabulate f) ∷ʳ f o + drop-take-suc : (o : Fin (length xs)) → let m = toℕ o in drop m (take (suc m) xs) ≡ [ lookup xs o ] + drop-take-suc-tabulate : (f : Fin n → A) (o : Fin n) → let m = toℕ o in drop m (take (suc m) (tabulate f)) ≡ [ f o ] take-all : n ≥ length xs → take n xs ≡ xs + take-[] : ∀ m → take m [] ≡ [] drop-[] : ∀ m → drop m [] ≡ [] ``` @@ -2887,7 +2893,7 @@ Other minor changes foldr-map : foldr f x (map g xs) ≡ foldr (g -⟨ f ∣) x xs foldl-map : foldl f x (map g xs) ≡ foldl (∣ f ⟩- g) x xs ``` - + NonZero/Positive/Negative changes --------------------------------- diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index 08e78cd5a6..c4cf722ec6 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -30,6 +30,7 @@ open import Data.Product.Base as Prod import Data.Product.Relation.Unary.All as Prod using (All) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Data.These.Base as These using (These; this; that; these) +open import Data.Fin.Properties using (toℕ-cast) open import Function open import Level using (Level) open import Relation.Binary as B using (DecidableEquality) @@ -759,6 +760,16 @@ length-take zero xs = refl length-take (suc n) [] = refl length-take (suc n) (x ∷ xs) = cong suc (length-take n xs) +take-suc : (xs : List A) (i : Fin (length xs)) → let m = toℕ i in + take (suc m) xs ≡ take m xs ∷ʳ lookup xs i +take-suc (x ∷ xs) zero = refl +take-suc (x ∷ xs) (suc i) = cong (x ∷_) (take-suc xs i) + +take-suc-tabulate : ∀ {n} (f : Fin n → A) (i : Fin n) → let m = toℕ i in + take (suc m) (tabulate f) ≡ take m (tabulate f) ∷ʳ f i +take-suc-tabulate f i rewrite sym (toℕ-cast (sym (length-tabulate f)) i) | sym (lookup-tabulate f i) + = take-suc (tabulate f) (cast _ i) + -- If you take at least as many elements from a list as it has, you get the whole list. take-all :(n : ℕ) (xs : List A) → n ≥ length xs → take n xs ≡ xs take-all zero [] _ = refl @@ -789,6 +800,16 @@ take++drop zero xs = refl take++drop (suc n) [] = refl take++drop (suc n) (x ∷ xs) = cong (x ∷_) (take++drop n xs) +drop-take-suc : (xs : List A) (i : Fin (length xs)) → let m = toℕ i in + drop m (take (suc m) xs) ≡ [ lookup xs i ] +drop-take-suc (x ∷ xs) zero = refl +drop-take-suc (x ∷ xs) (suc i) = drop-take-suc xs i + +drop-take-suc-tabulate : ∀ {n} (f : Fin n → A) (i : Fin n) → let m = toℕ i in + drop m (take (suc m) (tabulate f)) ≡ [ f i ] +drop-take-suc-tabulate f i rewrite sym (toℕ-cast (sym (length-tabulate f)) i) | sym (lookup-tabulate f i) + = drop-take-suc (tabulate f) (cast _ i) + ------------------------------------------------------------------------ -- splitAt @@ -1093,6 +1114,8 @@ module _ {x y : A} where ∷ʳ-++ : ∀ (xs : List A) (a : A) (ys : List A) → xs ∷ʳ a ++ ys ≡ xs ++ a ∷ ys ∷ʳ-++ xs a ys = ++-assoc xs [ a ] ys + + ------------------------------------------------------------------------ -- DEPRECATED ------------------------------------------------------------------------ From e4b8c0e16934b6276b385e29dff66fda18da2341 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Wed, 28 Jun 2023 01:01:24 -0400 Subject: [PATCH 062/316] Cut down `Function` imports (#2006) --- src/Algebra/Construct/NaturalChoice/Min.agda | 2 +- src/Algebra/Morphism.agda | 2 +- src/Algebra/Ordered/Structures.agda | 2 +- src/Algebra/Solver/Ring/AlmostCommutativeRing.agda | 2 +- src/Data/Container/Combinator.agda | 2 +- src/Data/Container/Combinator/Properties.agda | 2 +- src/Data/Container/Indexed/Combinator.agda | 2 +- src/Data/Container/Indexed/FreeMonad.agda | 2 +- src/Data/Container/Indexed/WithK.agda | 2 +- src/Data/Container/Morphism.agda | 2 +- src/Data/Container/Morphism/Properties.agda | 2 +- src/Data/Container/Properties.agda | 2 +- src/Data/Container/Relation/Unary/All.agda | 2 +- src/Data/Digit/Properties.agda | 2 +- src/Data/Fin/Permutation/Transposition/List.agda | 2 +- src/Data/Fin/Substitution/Lemmas.agda | 6 +++--- src/Data/Fin/Substitution/List.agda | 2 +- src/Data/Float/Properties.agda | 2 +- src/Data/List/Relation/Unary/Grouped/Properties.agda | 3 ++- src/Data/Nat/Binary/Subtraction.agda | 2 +- src/Data/Nat/DivMod.agda | 2 +- src/Data/Nat/Show/Properties.agda | 2 +- src/Data/Parity/Properties.agda | 3 ++- src/Data/Sign/Properties.agda | 3 ++- src/Data/Star/Environment.agda | 2 +- src/Data/Tree/AVL/Value.agda | 2 +- src/Data/Tree/Binary/Properties.agda | 2 +- src/Data/Trie/NonEmpty.agda | 2 +- src/Data/Vec/Effectful.agda | 2 +- src/Data/Vec/Relation/Binary/Lex/NonStrict.agda | 2 +- src/Data/Vec/Relation/Unary/AllPairs.agda | 2 +- src/Data/Vec/Relation/Unary/AllPairs/Properties.agda | 2 +- src/Function/Injection.agda | 2 +- src/Function/Metric/Nat/Bundles.agda | 2 +- src/Function/Metric/Nat/Structures.agda | 2 +- src/Function/Metric/Rational/Bundles.agda | 2 +- src/Function/Metric/Rational/Structures.agda | 2 +- src/Function/Reasoning.agda | 2 +- src/Reflection/AST/Meta.agda | 4 ++-- src/Reflection/AST/Name.agda | 8 ++++---- src/Reflection/AST/Traversal.agda | 12 ++++++------ src/Reflection/External.agda | 2 +- src/Relation/Binary/OrderMorphism.agda | 2 +- src/Relation/Unary/Algebra.agda | 2 +- src/Tactic/Cong.agda | 2 +- .../RingSolver/Core/AlmostCommutativeRing.agda | 2 +- tests/data/appending/Main.agda | 2 +- tests/data/colist/Main.agda | 2 +- 48 files changed, 62 insertions(+), 59 deletions(-) diff --git a/src/Algebra/Construct/NaturalChoice/Min.agda b/src/Algebra/Construct/NaturalChoice/Min.agda index 1184f4fe30..89bd2eefb8 100644 --- a/src/Algebra/Construct/NaturalChoice/Min.agda +++ b/src/Algebra/Construct/NaturalChoice/Min.agda @@ -11,7 +11,7 @@ open import Algebra.Bundles open import Algebra.Construct.NaturalChoice.Base open import Data.Sum using (inj₁; inj₂; [_,_]) open import Data.Product using (_,_) -open import Function using (id) +open import Function.Base using (id) open import Relation.Binary import Algebra.Construct.NaturalChoice.MinOp as MinOp diff --git a/src/Algebra/Morphism.agda b/src/Algebra/Morphism.agda index fbcb2b0d12..59a6f22e23 100644 --- a/src/Algebra/Morphism.agda +++ b/src/Algebra/Morphism.agda @@ -11,7 +11,7 @@ module Algebra.Morphism where import Algebra.Morphism.Definitions as MorphismDefinitions open import Algebra import Algebra.Properties.Group as GroupP -open import Function hiding (Morphism) +open import Function.Base open import Level open import Relation.Binary import Relation.Binary.Reasoning.Setoid as EqR diff --git a/src/Algebra/Ordered/Structures.agda b/src/Algebra/Ordered/Structures.agda index 1c46f007f7..ab211cc497 100644 --- a/src/Algebra/Ordered/Structures.agda +++ b/src/Algebra/Ordered/Structures.agda @@ -22,7 +22,7 @@ open import Algebra.Core open import Algebra.Definitions _≈_ open import Algebra.Structures _≈_ open import Data.Product using (proj₁; proj₂) -open import Function using (flip) +open import Function.Base using (flip) open import Level using (_⊔_) open import Relation.Binary.Definitions using (Transitive; Monotonic₁; Monotonic₂) open import Relation.Binary.Structures using (IsPreorder; IsPartialOrder) diff --git a/src/Algebra/Solver/Ring/AlmostCommutativeRing.agda b/src/Algebra/Solver/Ring/AlmostCommutativeRing.agda index 47cda5c4f9..2bcfe92901 100644 --- a/src/Algebra/Solver/Ring/AlmostCommutativeRing.agda +++ b/src/Algebra/Solver/Ring/AlmostCommutativeRing.agda @@ -14,7 +14,7 @@ open import Algebra.Structures open import Algebra.Definitions import Algebra.Morphism as Morphism import Algebra.Morphism.Definitions as MorphismDefinitions -open import Function hiding (Morphism) +open import Function.Base using (id) open import Level open import Relation.Binary diff --git a/src/Data/Container/Combinator.agda b/src/Data/Container/Combinator.agda index e70d3e5ef4..c68536427b 100644 --- a/src/Data/Container/Combinator.agda +++ b/src/Data/Container/Combinator.agda @@ -13,7 +13,7 @@ open import Data.Empty.Polymorphic using (⊥; ⊥-elim) open import Data.Product as P using (_,_; <_,_>; proj₁; proj₂; ∃) open import Data.Sum.Base as S using ([_,_]′) open import Data.Unit.Polymorphic.Base using (⊤) -import Function as F +import Function.Base as F open import Data.Container.Core open import Data.Container.Relation.Unary.Any diff --git a/src/Data/Container/Combinator/Properties.agda b/src/Data/Container/Combinator/Properties.agda index 5799b857f8..b93d6c7a7a 100644 --- a/src/Data/Container/Combinator/Properties.agda +++ b/src/Data/Container/Combinator/Properties.agda @@ -15,7 +15,7 @@ open import Data.Container.Relation.Unary.Any open import Data.Empty using (⊥-elim) open import Data.Product as Prod using (∃; _,_; proj₁; proj₂; <_,_>; uncurry; curry) open import Data.Sum.Base as S using (inj₁; inj₂; [_,_]′; [_,_]) -open import Function as F using (_∘′_) +open import Function.Base as F using (_∘′_) open import Function.Inverse as Inv using (_↔_; inverse; module Inverse) open import Level using (_⊔_; lower) open import Relation.Binary.PropositionalEquality as P using (_≡_; _≗_) diff --git a/src/Data/Container/Indexed/Combinator.agda b/src/Data/Container/Indexed/Combinator.agda index 78e5d213d2..bc99e83f96 100644 --- a/src/Data/Container/Indexed/Combinator.agda +++ b/src/Data/Container/Indexed/Combinator.agda @@ -15,7 +15,7 @@ open import Data.Unit.Polymorphic.Base using (⊤) open import Data.Product as Prod hiding (Σ) renaming (_×_ to _⟨×⟩_) open import Data.Sum renaming (_⊎_ to _⟨⊎⟩_) open import Data.Sum.Relation.Unary.All as All using (All) -open import Function as F hiding (id; const) renaming (_∘_ to _⟨∘⟩_) +open import Function.Base as F hiding (id; const) renaming (_∘_ to _⟨∘⟩_) open import Function.Inverse using (_↔̇_; inverse) open import Level open import Relation.Unary using (Pred; _⊆_; _∪_; _∩_; ⋃; ⋂) diff --git a/src/Data/Container/Indexed/FreeMonad.agda b/src/Data/Container/Indexed/FreeMonad.agda index 1f7d63428d..f2fe0d2aab 100644 --- a/src/Data/Container/Indexed/FreeMonad.agda +++ b/src/Data/Container/Indexed/FreeMonad.agda @@ -9,7 +9,7 @@ module Data.Container.Indexed.FreeMonad where open import Level -open import Function hiding (const) +open import Function.Base hiding (const) open import Effect.Monad.Predicate open import Data.Container.Indexed open import Data.Container.Indexed.Combinator hiding (id; _∘_) diff --git a/src/Data/Container/Indexed/WithK.agda b/src/Data/Container/Indexed/WithK.agda index 2e1a7b7426..565b14fcdd 100644 --- a/src/Data/Container/Indexed/WithK.agda +++ b/src/Data/Container/Indexed/WithK.agda @@ -16,7 +16,7 @@ module Data.Container.Indexed.WithK where open import Axiom.Extensionality.Heterogeneous using (Extensionality) open import Data.Container.Indexed hiding (module PlainMorphism) open import Data.Product as Prod hiding (map) -open import Function renaming (id to ⟨id⟩; _∘_ to _⟨∘⟩_) +open import Function.Base renaming (id to ⟨id⟩; _∘_ to _⟨∘⟩_) open import Level open import Relation.Unary using (Pred; _⊆_) open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) diff --git a/src/Data/Container/Morphism.agda b/src/Data/Container/Morphism.agda index 6494e5a3b8..0e26d48199 100644 --- a/src/Data/Container/Morphism.agda +++ b/src/Data/Container/Morphism.agda @@ -9,7 +9,7 @@ module Data.Container.Morphism where open import Data.Container.Core -import Function as F +import Function.Base as F module _ {s p} (C : Container s p) where diff --git a/src/Data/Container/Morphism/Properties.agda b/src/Data/Container/Morphism/Properties.agda index 16b3dd9333..0859cfe0be 100644 --- a/src/Data/Container/Morphism/Properties.agda +++ b/src/Data/Container/Morphism/Properties.agda @@ -9,7 +9,7 @@ module Data.Container.Morphism.Properties where open import Level using (_⊔_; suc) -open import Function as F using (_$_) +open import Function.Base as F using (_$_) open import Data.Product using (∃; proj₁; proj₂; _,_) open import Relation.Binary using (Setoid) open import Relation.Binary.PropositionalEquality as P using (_≡_; _≗_) diff --git a/src/Data/Container/Properties.agda b/src/Data/Container/Properties.agda index 193f7cf702..9ee24ad878 100644 --- a/src/Data/Container/Properties.agda +++ b/src/Data/Container/Properties.agda @@ -8,7 +8,7 @@ module Data.Container.Properties where -import Function as F +import Function.Base as F open import Relation.Binary open import Data.Container.Core diff --git a/src/Data/Container/Relation/Unary/All.agda b/src/Data/Container/Relation/Unary/All.agda index 2a6f858c87..65d593eea4 100644 --- a/src/Data/Container/Relation/Unary/All.agda +++ b/src/Data/Container/Relation/Unary/All.agda @@ -11,7 +11,7 @@ module Data.Container.Relation.Unary.All where open import Level using (_⊔_) open import Relation.Unary using (Pred; _⊆_) open import Data.Product as Prod using (_,_; proj₁; proj₂; ∃) -open import Function as F +open import Function.Base using (_∘′_; id) open import Data.Container.Core hiding (map) import Data.Container.Morphism as M diff --git a/src/Data/Digit/Properties.agda b/src/Data/Digit/Properties.agda index 0ba2cab34f..355467ec39 100644 --- a/src/Data/Digit/Properties.agda +++ b/src/Data/Digit/Properties.agda @@ -17,7 +17,7 @@ import Data.Vec.Relation.Unary.Unique.Propositional.Properties as Uniqueₚ open import Data.Vec.Relation.Unary.AllPairs using (allPairs?) open import Relation.Nullary.Decidable using (True; from-yes; ¬?) open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) -open import Function using (_∘_) +open import Function.Base using (_∘_) module Data.Digit.Properties where diff --git a/src/Data/Fin/Permutation/Transposition/List.agda b/src/Data/Fin/Permutation/Transposition/List.agda index 42505de541..4ed0583372 100644 --- a/src/Data/Fin/Permutation/Transposition/List.agda +++ b/src/Data/Fin/Permutation/Transposition/List.agda @@ -15,7 +15,7 @@ import Data.Fin.Permutation.Components as PC open import Data.List using (List; []; _∷_; map) open import Data.Nat.Base using (ℕ; suc; zero) open import Data.Product using (_×_; _,_) -open import Function using (_∘_) +open import Function.Base using (_∘_) open import Relation.Binary.PropositionalEquality using (_≡_; sym; cong; module ≡-Reasoning) open ≡-Reasoning diff --git a/src/Data/Fin/Substitution/Lemmas.agda b/src/Data/Fin/Substitution/Lemmas.agda index 018ed86f29..3747f21018 100644 --- a/src/Data/Fin/Substitution/Lemmas.agda +++ b/src/Data/Fin/Substitution/Lemmas.agda @@ -14,7 +14,7 @@ open import Data.Nat hiding (_⊔_; _/_) open import Data.Fin.Base using (Fin; zero; suc; lift) open import Data.Vec.Base import Data.Vec.Properties as VecProp -open import Function as Fun using (_∘_; _$_) +open import Function.Base as Fun using (_∘_; _$_; flip) open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; sym; cong; cong₂) open import Relation.Binary.Construct.Closure.ReflexiveTransitive @@ -222,7 +222,7 @@ record Lemmas₃ {ℓ} (T : Pred ℕ ℓ) : Set ℓ where ∀ k t → t /✶ ρs₁ ↑✶ k ≡ t /✶ ρs₂ ↑✶ k /✶-↑✶′ ρs₁ ρs₂ hyp = /✶-↑✶ ρs₁ ρs₂ (λ k x → begin var x /✶ ρs₁ ↑✶ k ≡⟨ sym (lookup-⨀ x (ρs₁ ↑✶ k)) ⟩ - lookup (⨀ (ρs₁ ↑✶ k)) x ≡⟨ cong (Fun.flip lookup x) (hyp k) ⟩ + lookup (⨀ (ρs₁ ↑✶ k)) x ≡⟨ cong (flip lookup x) (hyp k) ⟩ lookup (⨀ (ρs₂ ↑✶ k)) x ≡⟨ lookup-⨀ x (ρs₂ ↑✶ k) ⟩ var x /✶ ρs₂ ↑✶ k ∎) @@ -341,7 +341,7 @@ record Lemmas₄ {ℓ} (T : Pred ℕ ℓ) : Set ℓ where var (suc x) / ρ ↑ ≡ var x / ρ / wk suc-/-↑ {ρ = ρ} x = begin var (suc x) / ρ ↑ ≡⟨ var-/ ⟩ - lookup (map weaken ρ) x ≡⟨ cong (Fun.flip lookup x) (map-weaken {ρ = ρ}) ⟩ + lookup (map weaken ρ) x ≡⟨ cong (flip lookup x) (map-weaken {ρ = ρ}) ⟩ lookup (ρ ⊙ wk) x ≡⟨ lookup-⊙ x {ρ₁ = ρ} ⟩ lookup ρ x / wk ≡⟨ cong₂ _/_ (sym var-/) refl ⟩ var x / ρ / wk ∎ diff --git a/src/Data/Fin/Substitution/List.agda b/src/Data/Fin/Substitution/List.agda index 8927b3b21f..63a7e39279 100644 --- a/src/Data/Fin/Substitution/List.agda +++ b/src/Data/Fin/Substitution/List.agda @@ -17,7 +17,7 @@ module Data.Fin.Substitution.List {ℓ} {T : ℕ → Set ℓ} (lemmas₄ : Lemma open import Data.List.Base open import Data.List.Properties open import Data.Fin.Substitution -import Function as Fun +import Function.Base as Fun open import Relation.Binary.PropositionalEquality open ≡-Reasoning diff --git a/src/Data/Float/Properties.agda b/src/Data/Float/Properties.agda index b2b2fc2c9e..b2caebb616 100644 --- a/src/Data/Float/Properties.agda +++ b/src/Data/Float/Properties.agda @@ -15,7 +15,7 @@ import Data.Maybe.Properties as Mₚ import Data.Nat.Properties as Nₚ import Data.Word.Base as Word import Data.Word.Properties as Wₚ -open import Function using (_∘_) +open import Function.Base using (_∘_) open import Relation.Nullary.Decidable as RN using (map′) open import Relation.Binary import Relation.Binary.Construct.On as On diff --git a/src/Data/List/Relation/Unary/Grouped/Properties.agda b/src/Data/List/Relation/Unary/Grouped/Properties.agda index 189dba033c..a8a72e6cec 100644 --- a/src/Data/List/Relation/Unary/Grouped/Properties.agda +++ b/src/Data/List/Relation/Unary/Grouped/Properties.agda @@ -14,7 +14,8 @@ open import Data.List.Relation.Unary.All as All using (All; []; _∷_) import Data.List.Relation.Unary.All.Properties as All open import Data.List.Relation.Unary.AllPairs as AllPairs using (AllPairs; []; _∷_) open import Data.List.Relation.Unary.Grouped -open import Function using (_∘_; _⇔_; Equivalence) +open import Function.Base using (_∘_) +open import Function.Bundles using (module Equivalence; _⇔_) open import Relation.Binary as B using (REL; Rel) open import Relation.Unary as U using (Pred) open import Relation.Nullary using (¬_; does; yes; no) diff --git a/src/Data/Nat/Binary/Subtraction.agda b/src/Data/Nat/Binary/Subtraction.agda index 67eebc88f6..8b095b137f 100644 --- a/src/Data/Nat/Binary/Subtraction.agda +++ b/src/Data/Nat/Binary/Subtraction.agda @@ -19,7 +19,7 @@ import Data.Nat.Properties as ℕₚ open import Data.Product using (_×_; _,_; proj₁; proj₂; ∃) open import Data.Sum using (inj₁; inj₂) open import Data.Vec using ([]; _∷_) -open import Function using (_∘_; _$_) +open import Function.Base using (_∘_; _$_) open import Level using (0ℓ) open import Relation.Binary using (Tri; tri<; tri≈; tri>; _Preserves_⟶_; _Preserves₂_⟶_⟶_) diff --git a/src/Data/Nat/DivMod.agda b/src/Data/Nat/DivMod.agda index f2b2d8657e..b4c225d6a4 100644 --- a/src/Data/Nat/DivMod.agda +++ b/src/Data/Nat/DivMod.agda @@ -17,7 +17,7 @@ open import Data.Nat.DivMod.Core open import Data.Nat.Divisibility.Core open import Data.Nat.Induction open import Data.Nat.Properties -open import Function using (_$_) +open import Function.Base using (_$_) open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Decidable using (yes; no) open import Relation.Nullary.Decidable using (False; toWitnessFalse) diff --git a/src/Data/Nat/Show/Properties.agda b/src/Data/Nat/Show/Properties.agda index 739a00c2e4..87622b79bf 100644 --- a/src/Data/Nat/Show/Properties.agda +++ b/src/Data/Nat/Show/Properties.agda @@ -8,7 +8,7 @@ open import Data.Digit using (showDigit; toDigits) open import Data.Digit.Properties using (toDigits-injective; showDigit-injective) -open import Function using (_∘_) +open import Function.Base using (_∘_) import Data.List.Properties as Listₚ open import Data.Nat.Base using (ℕ) open import Data.Nat.Properties using (_≤?_) diff --git a/src/Data/Parity/Properties.agda b/src/Data/Parity/Properties.agda index ed25a7b2fe..b9fb8a5eb7 100644 --- a/src/Data/Parity/Properties.agda +++ b/src/Data/Parity/Properties.agda @@ -14,7 +14,8 @@ open import Data.Nat.Base as ℕ using (zero; suc; parity) open import Data.Parity.Base as ℙ using (Parity; 0ℙ; 1ℙ; _⁻¹; toSign; fromSign) open import Data.Product using (_,_) open import Data.Sign.Base as 𝕊 -open import Function hiding (Inverse) +open import Function.Base using (_$_; id) +open import Function.Definitions using (Injective; Surjective) open import Level using (0ℓ) open import Relation.Binary using (Decidable; DecidableEquality; Setoid; DecSetoid; IsDecEquivalence) diff --git a/src/Data/Sign/Properties.agda b/src/Data/Sign/Properties.agda index ccaa33f0d1..5ca9a36e95 100644 --- a/src/Data/Sign/Properties.agda +++ b/src/Data/Sign/Properties.agda @@ -12,7 +12,8 @@ open import Algebra.Bundles open import Data.Empty open import Data.Sign.Base open import Data.Product using (_,_) -open import Function hiding (Inverse) +open import Function.Base using (_$_; id) +open import Function.Definitions using (Injective) open import Level using (0ℓ) open import Relation.Binary using (Decidable; DecidableEquality; Setoid; DecSetoid; IsDecEquivalence) diff --git a/src/Data/Star/Environment.agda b/src/Data/Star/Environment.agda index 65fcbd4818..c7ccb18ef4 100644 --- a/src/Data/Star/Environment.agda +++ b/src/Data/Star/Environment.agda @@ -13,7 +13,7 @@ open import Data.Star.List open import Data.Star.Decoration open import Data.Star.Pointer as Pointer hiding (lookup) open import Data.Unit -open import Function hiding (_∋_) +open import Function.Base hiding (_∋_) open import Relation.Binary.PropositionalEquality open import Relation.Binary.Construct.Closure.ReflexiveTransitive diff --git a/src/Data/Tree/AVL/Value.agda b/src/Data/Tree/AVL/Value.agda index 91633bfb6d..4f8543b6ba 100644 --- a/src/Data/Tree/AVL/Value.agda +++ b/src/Data/Tree/AVL/Value.agda @@ -13,7 +13,7 @@ module Data.Tree.AVL.Value {a ℓ} (S : Setoid a ℓ) where open import Data.Product using (Σ; _,_) open import Level using (suc; _⊔_) -import Function as F +import Function.Base as F open Setoid S renaming (Carrier to Key) ----------------------------------------------------------------------- diff --git a/src/Data/Tree/Binary/Properties.agda b/src/Data/Tree/Binary/Properties.agda index c3dc189f8d..b523b1e6f1 100644 --- a/src/Data/Tree/Binary/Properties.agda +++ b/src/Data/Tree/Binary/Properties.agda @@ -8,7 +8,7 @@ module Data.Tree.Binary.Properties where -open import Function using (_∘_) +open import Function.Base using (_∘_) open import Function.Nary.NonDependent using (congₙ) open import Level using (Level) open import Data.Nat.Base using (suc; _+_) diff --git a/src/Data/Trie/NonEmpty.agda b/src/Data/Trie/NonEmpty.agda index 6de3c53313..118a0db1bd 100644 --- a/src/Data/Trie/NonEmpty.agda +++ b/src/Data/Trie/NonEmpty.agda @@ -18,7 +18,7 @@ open import Data.List.Base as List using (List; []; _∷_; _++_) open import Data.List.NonEmpty as List⁺ using (List⁺; [_]; concatMap) open import Data.Maybe.Base as Maybe using (Maybe; nothing; just; maybe′) hiding (module Maybe) open import Data.These as These using (These; this; that; these) -open import Function as F +open import Function.Base as F import Function.Identity.Effectful as Identity open import Relation.Unary using (_⇒_; IUniversal) diff --git a/src/Data/Vec/Effectful.agda b/src/Data/Vec/Effectful.agda index aa1f6dcba7..5d8e438537 100644 --- a/src/Data/Vec/Effectful.agda +++ b/src/Data/Vec/Effectful.agda @@ -16,7 +16,7 @@ open import Effect.Applicative as App using (RawApplicative) open import Effect.Functor as Fun using (RawFunctor) open import Effect.Monad using (RawMonad; RawMonadT; mkRawMonad) import Function.Identity.Effectful as Id -open import Function hiding (Morphism) +open import Function.Base open import Level using (Level) private diff --git a/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda b/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda index 409732dc0b..877d345045 100644 --- a/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda +++ b/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda @@ -19,7 +19,7 @@ open import Data.Vec using (Vec; []; _∷_) import Data.Vec.Relation.Binary.Lex.Strict as Strict open import Data.Vec.Relation.Binary.Pointwise.Inductive as Pointwise using (Pointwise; []; _∷_; head; tail) -open import Function using (id) +open import Function.Base using (id) open import Relation.Binary import Relation.Binary.Construct.NonStrictToStrict as Conv open import Relation.Binary.PropositionalEquality as P using (_≡_) diff --git a/src/Data/Vec/Relation/Unary/AllPairs.agda b/src/Data/Vec/Relation/Unary/AllPairs.agda index 7c3eabcb83..0fee880769 100644 --- a/src/Data/Vec/Relation/Unary/AllPairs.agda +++ b/src/Data/Vec/Relation/Unary/AllPairs.agda @@ -15,7 +15,7 @@ open import Data.Nat.Base using (suc) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.Vec.Relation.Unary.All as All using (All; []; _∷_) open import Data.Product as Prod using (_,_; _×_; uncurry; <_,_>) -open import Function using (id; _∘_) +open import Function.Base using (id; _∘_) open import Level using (_⊔_) open import Relation.Binary as B using (Rel; _⇒_) open import Relation.Binary.Construct.Intersection renaming (_∩_ to _∩ᵇ_) diff --git a/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda b/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda index 7876928cc7..339a884a3b 100644 --- a/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda +++ b/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda @@ -17,7 +17,7 @@ open import Data.Bool.Base using (true; false) open import Data.Fin.Base using (Fin) open import Data.Fin.Properties using (suc-injective) open import Data.Nat.Base using (zero; suc; _+_) -open import Function using (_∘_) +open import Function.Base using (_∘_) open import Level using (Level) open import Relation.Binary using (Rel) open import Relation.Binary.PropositionalEquality using (_≢_) diff --git a/src/Function/Injection.agda b/src/Function/Injection.agda index bfa03a1ff1..4f746c2beb 100644 --- a/src/Function/Injection.agda +++ b/src/Function/Injection.agda @@ -13,7 +13,7 @@ module Function.Injection where -open import Function as Fun using () renaming (_∘_ to _⟨∘⟩_) +open import Function.Base as Fun using () renaming (_∘_ to _⟨∘⟩_) open import Level open import Relation.Binary open import Function.Equality as F diff --git a/src/Function/Metric/Nat/Bundles.agda b/src/Function/Metric/Nat/Bundles.agda index e0983246eb..57ff945ee0 100644 --- a/src/Function/Metric/Nat/Bundles.agda +++ b/src/Function/Metric/Nat/Bundles.agda @@ -13,7 +13,7 @@ module Function.Metric.Nat.Bundles where open import Data.Nat.Base hiding (suc; _⊔_) -open import Function using (const) +open import Function.Base using (const) open import Level using (Level; suc; _⊔_) open import Relation.Binary.Core open import Relation.Binary.PropositionalEquality diff --git a/src/Function/Metric/Nat/Structures.agda b/src/Function/Metric/Nat/Structures.agda index d601cad35f..648e7a4adc 100644 --- a/src/Function/Metric/Nat/Structures.agda +++ b/src/Function/Metric/Nat/Structures.agda @@ -9,7 +9,7 @@ module Function.Metric.Nat.Structures where open import Data.Nat.Base hiding (suc) -open import Function using (const) +open import Function.Base using (const) open import Level using (Level; suc) open import Relation.Binary hiding (Symmetric) open import Relation.Binary.PropositionalEquality using (_≡_) diff --git a/src/Function/Metric/Rational/Bundles.agda b/src/Function/Metric/Rational/Bundles.agda index 89067d2718..8bbc9f85d3 100644 --- a/src/Function/Metric/Rational/Bundles.agda +++ b/src/Function/Metric/Rational/Bundles.agda @@ -11,7 +11,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Data.Rational.Base hiding (_⊔_) -open import Function using (const) +open import Function.Base using (const) open import Level using (Level; suc; _⊔_) open import Relation.Binary.Core open import Relation.Binary.PropositionalEquality diff --git a/src/Function/Metric/Rational/Structures.agda b/src/Function/Metric/Rational/Structures.agda index 44339d296b..824f90b912 100644 --- a/src/Function/Metric/Rational/Structures.agda +++ b/src/Function/Metric/Rational/Structures.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Data.Rational.Base -open import Function using (const) +open import Function.Base using (const) open import Level using (Level; suc) open import Relation.Binary hiding (Symmetric) open import Relation.Binary.PropositionalEquality using (_≡_) diff --git a/src/Function/Reasoning.agda b/src/Function/Reasoning.agda index 09747c0541..ea39d0b52e 100644 --- a/src/Function/Reasoning.agda +++ b/src/Function/Reasoning.agda @@ -19,4 +19,4 @@ infixl 0 ∋-syntax syntax ∋-syntax A a = a ∶ A -- Export pipeline functions -open import Function public using (_|>_; _|>′_) +open import Function.Base public using (_|>_; _|>′_) diff --git a/src/Reflection/AST/Meta.agda b/src/Reflection/AST/Meta.agda index 59ca4ae4db..93584f573c 100644 --- a/src/Reflection/AST/Meta.agda +++ b/src/Reflection/AST/Meta.agda @@ -8,8 +8,8 @@ module Reflection.AST.Meta where -import Data.Nat.Properties as ℕₚ using (_≟_) -open import Function using (_on_) +import Data.Nat.Properties as ℕₚ using (_≟_) +open import Function.Base using (_on_) open import Relation.Nullary.Decidable using (map′) open import Relation.Binary using (Rel; Decidable; DecidableEquality) import Relation.Binary.Construct.On as On diff --git a/src/Reflection/AST/Name.agda b/src/Reflection/AST/Name.agda index 203521330c..1baa63029f 100644 --- a/src/Reflection/AST/Name.agda +++ b/src/Reflection/AST/Name.agda @@ -8,10 +8,10 @@ module Reflection.AST.Name where -open import Data.List.Base using (List) -import Data.Product.Properties as Prodₚ using (≡-dec) -import Data.Word.Properties as Wₚ using (_≟_) -open import Function using (_on_) +open import Data.List.Base using (List) +import Data.Product.Properties as Prodₚ using (≡-dec) +import Data.Word.Properties as Wₚ using (_≟_) +open import Function.Base using (_on_) open import Relation.Nullary.Decidable using (map′) open import Relation.Binary using (Rel; Decidable; DecidableEquality) open import Relation.Binary.Construct.On using (decidable) diff --git a/src/Reflection/AST/Traversal.agda b/src/Reflection/AST/Traversal.agda index de28c8db2a..336935783e 100644 --- a/src/Reflection/AST/Traversal.agda +++ b/src/Reflection/AST/Traversal.agda @@ -11,12 +11,12 @@ open import Effect.Applicative using (RawApplicative) module Reflection.AST.Traversal {F : Set → Set} (AppF : RawApplicative F) where -open import Data.Nat using (ℕ; zero; suc; _+_) -open import Data.List using (List; []; _∷_; _++_; reverse; length) -open import Data.Product using (_×_; _,_) -open import Data.String using (String) -open import Function using (_∘_) -open import Reflection hiding (pure) +open import Data.Nat using (ℕ; zero; suc; _+_) +open import Data.List using (List; []; _∷_; _++_; reverse; length) +open import Data.Product using (_×_; _,_) +open import Data.String using (String) +open import Function.Base using (_∘_) +open import Reflection hiding (pure) open RawApplicative AppF diff --git a/src/Reflection/External.agda b/src/Reflection/External.agda index 3206ee2145..ba4e076426 100644 --- a/src/Reflection/External.agda +++ b/src/Reflection/External.agda @@ -16,7 +16,7 @@ open import Data.Product using (_×_; _,_) open import Data.String.Base as String using (String; _++_) open import Data.Sum using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Unit.Base using (⊤; tt) -open import Function using (case_of_; _$_; _∘_) +open import Function.Base using (case_of_; _$_; _∘_) open import Reflection hiding (name) -- Type aliases for the various strings. diff --git a/src/Relation/Binary/OrderMorphism.agda b/src/Relation/Binary/OrderMorphism.agda index 9e2cb84ba3..fbf3781c78 100644 --- a/src/Relation/Binary/OrderMorphism.agda +++ b/src/Relation/Binary/OrderMorphism.agda @@ -16,7 +16,7 @@ Use Relation.Binary.Reasoning.Morphism instead." open import Relation.Binary open Poset -import Function as F +import Function.Base as F open import Level record _⇒-Poset_ {p₁ p₂ p₃ p₄ p₅ p₆} diff --git a/src/Relation/Unary/Algebra.agda b/src/Relation/Unary/Algebra.agda index f302cf7272..2d121be0fa 100644 --- a/src/Relation/Unary/Algebra.agda +++ b/src/Relation/Unary/Algebra.agda @@ -17,7 +17,7 @@ open import Data.Empty.Polymorphic using (⊥-elim) open import Data.Product as Product using (_,_; proj₁; proj₂; <_,_>; curry; uncurry) open import Data.Sum as Sum using (inj₁; inj₂; [_,_]) open import Data.Unit.Polymorphic using (tt) -open import Function using (id; const; _∘_) +open import Function.Base using (id; const; _∘_) open import Level open import Relation.Unary hiding (∅; U) open import Relation.Unary.Polymorphic using (∅; U) diff --git a/src/Tactic/Cong.agda b/src/Tactic/Cong.agda index 5a545a4c77..25e21193be 100644 --- a/src/Tactic/Cong.agda +++ b/src/Tactic/Cong.agda @@ -24,7 +24,7 @@ module Tactic.Cong where -open import Function using (_$_) +open import Function.Base using (_$_) open import Data.Bool.Base using (true; false; if_then_else_; _∧_) open import Data.Char.Base as Char using (toℕ) diff --git a/src/Tactic/RingSolver/Core/AlmostCommutativeRing.agda b/src/Tactic/RingSolver/Core/AlmostCommutativeRing.agda index 84fe184f39..2817b21cf4 100644 --- a/src/Tactic/RingSolver/Core/AlmostCommutativeRing.agda +++ b/src/Tactic/RingSolver/Core/AlmostCommutativeRing.agda @@ -15,7 +15,7 @@ open import Algebra.Structures using (IsCommutativeSemiring) open import Algebra.Definitions open import Algebra.Bundles using (RawRing; CommutativeRing; CommutativeSemiring) import Algebra.Morphism as Morphism -open import Function hiding (Morphism) +open import Function.Base using (id) open import Level open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) diff --git a/tests/data/appending/Main.agda b/tests/data/appending/Main.agda index 93ece5eda0..b5fc0a48a6 100644 --- a/tests/data/appending/Main.agda +++ b/tests/data/appending/Main.agda @@ -7,7 +7,7 @@ open import Data.List using (replicate) open import Data.String using (toList; fromList) open import IO -open import Function using (_$_) +open import Function.Base using (_$_) open import TakeWhile diff --git a/tests/data/colist/Main.agda b/tests/data/colist/Main.agda index a50b5b85fe..d47585dd6e 100644 --- a/tests/data/colist/Main.agda +++ b/tests/data/colist/Main.agda @@ -11,7 +11,7 @@ import Data.Fin.Show as Fin open import Data.String.Base using (String; _++_; parens) open import Data.Unit.Polymorphic.Base using (⊤) open import Codata.Sized.Thunk -open import Function using (_$_; _∘_; id) +open import Function.Base using (_$_; _∘_; id) open import Relation.Nullary open import Codata.Musical.Notation From 5b8c2889a758da0057474f8ea146f105ddec456a Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 29 Jun 2023 23:28:24 -0400 Subject: [PATCH 063/316] Ignore `_build` correctly (#2010) --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 99f960e19f..1724ffd72e 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ .*.swp .#* \#* -./_build/* +_build .DS_Store .vscode/* dist From 9c05244c8d3042f36f5c1829634881a8f20959d2 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 29 Jun 2023 23:29:04 -0400 Subject: [PATCH 064/316] `Data.Product` imports to `Data.Product.Base` (#2003) --- README/Data/Container/FreeMonad.agda | 2 +- src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda | 2 +- src/Algebra/Construct/Add/Identity.agda | 2 +- src/Algebra/Construct/Flip/Op.agda | 2 +- src/Algebra/Construct/LexProduct/Inner.agda | 2 +- src/Algebra/Construct/LiftedChoice.agda | 2 +- src/Algebra/Construct/NaturalChoice/Min.agda | 2 +- src/Algebra/Construct/Subst/Equality.agda | 2 +- src/Algebra/Lattice/Morphism/Construct/Identity.agda | 2 +- src/Algebra/Lattice/Morphism/LatticeMonomorphism.agda | 2 +- src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda | 2 +- src/Algebra/Lattice/Structures/Biased.agda | 2 +- src/Algebra/Module/Morphism/Construct/Identity.agda | 2 +- src/Algebra/Module/Structures.agda | 2 +- src/Algebra/Morphism/Consequences.agda | 2 +- src/Algebra/Morphism/Construct/Identity.agda | 2 +- src/Algebra/Morphism/MonoidMonomorphism.agda | 2 +- src/Algebra/Ordered/Structures.agda | 2 +- src/Algebra/Properties/BooleanAlgebra.agda | 2 +- src/Algebra/Properties/CommutativeMagma/Divisibility.agda | 2 +- src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda | 2 +- src/Algebra/Properties/Lattice.agda | 2 +- src/Algebra/Properties/Monoid/Divisibility.agda | 2 +- src/Algebra/Properties/Semigroup/Divisibility.agda | 2 +- src/Algebra/Properties/Semiring/Divisibility.agda | 2 +- src/Algebra/Solver/CommutativeMonoid.agda | 2 +- src/Algebra/Solver/IdempotentCommutativeMonoid.agda | 2 +- src/Algebra/Solver/Ring/NaturalCoefficients.agda | 2 +- 28 files changed, 28 insertions(+), 28 deletions(-) diff --git a/README/Data/Container/FreeMonad.agda b/README/Data/Container/FreeMonad.agda index 7c4460609e..54f0935937 100644 --- a/README/Data/Container/FreeMonad.agda +++ b/README/Data/Container/FreeMonad.agda @@ -16,7 +16,7 @@ open import Data.Unit open import Data.Bool.Base using (Bool; true) open import Data.Nat open import Data.Sum using (inj₁; inj₂) -open import Data.Product renaming (_×_ to _⟨×⟩_) +open import Data.Product.Base renaming (_×_ to _⟨×⟩_) open import Data.Container using (Container; _▷_) open import Data.Container.Combinator open import Data.Container.FreeMonad as FreeMonad diff --git a/src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda b/src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda index 7ac5b3e58a..1f04cc2dd0 100644 --- a/src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda +++ b/src/Algebra/Apartness/Properties/HeytingCommutativeRing.agda @@ -11,7 +11,7 @@ open import Algebra.Apartness.Bundles using (HeytingCommutativeRing) module Algebra.Apartness.Properties.HeytingCommutativeRing {c ℓ₁ ℓ₂} (HCR : HeytingCommutativeRing c ℓ₁ ℓ₂) where -open import Data.Product using (_,_; proj₂) +open import Data.Product.Base using (_,_; proj₂) open import Algebra using (CommutativeRing; RightIdentity) open HeytingCommutativeRing HCR diff --git a/src/Algebra/Construct/Add/Identity.agda b/src/Algebra/Construct/Add/Identity.agda index 750c69523e..dc82a1c67b 100644 --- a/src/Algebra/Construct/Add/Identity.agda +++ b/src/Algebra/Construct/Add/Identity.agda @@ -14,7 +14,7 @@ open import Algebra.Core using (Op₂) open import Algebra.Definitions open import Algebra.Structures open import Relation.Binary.Construct.Add.Point.Equality renaming (_≈∙_ to lift≈) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Level using (Level; _⊔_) open import Relation.Binary.Core open import Relation.Binary.Definitions diff --git a/src/Algebra/Construct/Flip/Op.agda b/src/Algebra/Construct/Flip/Op.agda index 74ae5730bc..cc84ad59c9 100644 --- a/src/Algebra/Construct/Flip/Op.agda +++ b/src/Algebra/Construct/Flip/Op.agda @@ -10,7 +10,7 @@ module Algebra.Construct.Flip.Op where open import Algebra -import Data.Product as Prod +import Data.Product.Base as Prod import Data.Sum as Sum open import Function.Base using (flip) open import Level using (Level) diff --git a/src/Algebra/Construct/LexProduct/Inner.agda b/src/Algebra/Construct/LexProduct/Inner.agda index 718bde2610..d235c1b8fd 100644 --- a/src/Algebra/Construct/LexProduct/Inner.agda +++ b/src/Algebra/Construct/LexProduct/Inner.agda @@ -8,7 +8,7 @@ open import Algebra open import Data.Bool.Base using (false; true) -open import Data.Product using (_×_; _,_; swap; map; uncurry′) +open import Data.Product.Base using (_×_; _,_; swap; map; uncurry′) open import Function.Base using (_∘_) open import Level using (Level; _⊔_) open import Relation.Binary.Definitions using (Decidable) diff --git a/src/Algebra/Construct/LiftedChoice.agda b/src/Algebra/Construct/LiftedChoice.agda index 357d2e725a..83cf2110c3 100644 --- a/src/Algebra/Construct/LiftedChoice.agda +++ b/src/Algebra/Construct/LiftedChoice.agda @@ -14,7 +14,7 @@ open import Algebra.Consequences.Base open import Relation.Binary open import Relation.Nullary using (¬_; yes; no) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Level using (Level; _⊔_) open import Relation.Binary.PropositionalEquality as P using (_≡_) open import Relation.Unary using (Pred) diff --git a/src/Algebra/Construct/NaturalChoice/Min.agda b/src/Algebra/Construct/NaturalChoice/Min.agda index 89bd2eefb8..100dac2193 100644 --- a/src/Algebra/Construct/NaturalChoice/Min.agda +++ b/src/Algebra/Construct/NaturalChoice/Min.agda @@ -10,7 +10,7 @@ open import Algebra.Core open import Algebra.Bundles open import Algebra.Construct.NaturalChoice.Base open import Data.Sum using (inj₁; inj₂; [_,_]) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Relation.Binary import Algebra.Construct.NaturalChoice.MinOp as MinOp diff --git a/src/Algebra/Construct/Subst/Equality.agda b/src/Algebra/Construct/Subst/Equality.agda index 697a29cd73..636b1d8004 100644 --- a/src/Algebra/Construct/Subst/Equality.agda +++ b/src/Algebra/Construct/Subst/Equality.agda @@ -9,7 +9,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Product as Prod +open import Data.Product.Base as Prod open import Relation.Binary.Core module Algebra.Construct.Subst.Equality diff --git a/src/Algebra/Lattice/Morphism/Construct/Identity.agda b/src/Algebra/Lattice/Morphism/Construct/Identity.agda index 9b5993696f..8531643540 100644 --- a/src/Algebra/Lattice/Morphism/Construct/Identity.agda +++ b/src/Algebra/Lattice/Morphism/Construct/Identity.agda @@ -11,7 +11,7 @@ module Algebra.Lattice.Morphism.Construct.Identity where open import Algebra.Lattice.Bundles open import Algebra.Lattice.Morphism.Structures using ( module LatticeMorphisms ) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Level using (Level) open import Relation.Binary.Morphism.Construct.Identity using (isRelHomomorphism) diff --git a/src/Algebra/Lattice/Morphism/LatticeMonomorphism.agda b/src/Algebra/Lattice/Morphism/LatticeMonomorphism.agda index bfed8d01ec..c2c8301409 100644 --- a/src/Algebra/Lattice/Morphism/LatticeMonomorphism.agda +++ b/src/Algebra/Lattice/Morphism/LatticeMonomorphism.agda @@ -15,7 +15,7 @@ open import Algebra.Lattice.Morphism.Structures import Algebra.Consequences.Setoid as Consequences import Algebra.Morphism.MagmaMonomorphism as MagmaMonomorphisms import Algebra.Lattice.Properties.Lattice as LatticeProperties -open import Data.Product using (_,_; map) +open import Data.Product.Base using (_,_; map) open import Relation.Binary import Relation.Binary.Morphism.RelMonomorphism as RelMonomorphisms import Relation.Binary.Reasoning.Setoid as SetoidReasoning diff --git a/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda b/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda index 587a5dcc2c..9cdad57edc 100644 --- a/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda +++ b/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda @@ -18,7 +18,7 @@ open import Effect.Applicative as Applicative open import Effect.Monad open import Data.Fin.Base using (Fin) open import Data.Nat.Base -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Data.Vec.Base as Vec using (Vec) import Data.Vec.Effectful as VecCat import Function.Identity.Effectful as IdCat diff --git a/src/Algebra/Lattice/Structures/Biased.agda b/src/Algebra/Lattice/Structures/Biased.agda index 66a93df06d..fefe3bef67 100644 --- a/src/Algebra/Lattice/Structures/Biased.agda +++ b/src/Algebra/Lattice/Structures/Biased.agda @@ -14,7 +14,7 @@ open import Algebra.Core open import Algebra.Consequences.Setoid -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Level using (_⊔_) open import Relation.Binary using (Rel; Setoid; IsEquivalence) diff --git a/src/Algebra/Module/Morphism/Construct/Identity.agda b/src/Algebra/Module/Morphism/Construct/Identity.agda index f5e5d73b05..90f6940a16 100644 --- a/src/Algebra/Module/Morphism/Construct/Identity.agda +++ b/src/Algebra/Module/Morphism/Construct/Identity.agda @@ -21,7 +21,7 @@ open import Algebra.Module.Morphism.Structures ; module ModuleMorphisms ) open import Algebra.Morphism.Construct.Identity -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Level using (Level) diff --git a/src/Algebra/Module/Structures.agda b/src/Algebra/Module/Structures.agda index 20269f13a6..4a0e40c17c 100644 --- a/src/Algebra/Module/Structures.agda +++ b/src/Algebra/Module/Structures.agda @@ -16,7 +16,7 @@ open import Algebra.Module.Core import Algebra.Definitions as Defs open import Algebra.Module.Definitions open import Algebra.Structures -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Level using (Level; _⊔_) private diff --git a/src/Algebra/Morphism/Consequences.agda b/src/Algebra/Morphism/Consequences.agda index d5bc6a8076..ac7d6de2c5 100644 --- a/src/Algebra/Morphism/Consequences.agda +++ b/src/Algebra/Morphism/Consequences.agda @@ -10,7 +10,7 @@ module Algebra.Morphism.Consequences where open import Algebra using (Magma) open import Algebra.Morphism.Definitions -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id; _∘_) open import Function.Definitions import Relation.Binary.Reasoning.Setoid as EqR diff --git a/src/Algebra/Morphism/Construct/Identity.agda b/src/Algebra/Morphism/Construct/Identity.agda index 5ea2571de0..5529ec3c01 100644 --- a/src/Algebra/Morphism/Construct/Identity.agda +++ b/src/Algebra/Morphism/Construct/Identity.agda @@ -20,7 +20,7 @@ open import Algebra.Morphism.Structures ; module QuasigroupMorphisms ; module LoopMorphisms ) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Level using (Level) open import Relation.Binary.Morphism.Construct.Identity using (isRelHomomorphism) diff --git a/src/Algebra/Morphism/MonoidMonomorphism.agda b/src/Algebra/Morphism/MonoidMonomorphism.agda index 5f2d85d86a..4a512b2687 100644 --- a/src/Algebra/Morphism/MonoidMonomorphism.agda +++ b/src/Algebra/Morphism/MonoidMonomorphism.agda @@ -24,7 +24,7 @@ open RawMonoid M₂ renaming (Carrier to B; _≈_ to _≈₂_; _∙_ to _◦_; open import Algebra.Definitions open import Algebra.Structures -open import Data.Product using (map) +open import Data.Product.Base using (map) import Relation.Binary.Reasoning.Setoid as SetoidReasoning ------------------------------------------------------------------------ diff --git a/src/Algebra/Ordered/Structures.agda b/src/Algebra/Ordered/Structures.agda index ab211cc497..638d8783f0 100644 --- a/src/Algebra/Ordered/Structures.agda +++ b/src/Algebra/Ordered/Structures.agda @@ -21,7 +21,7 @@ module Algebra.Ordered.Structures open import Algebra.Core open import Algebra.Definitions _≈_ open import Algebra.Structures _≈_ -open import Data.Product using (proj₁; proj₂) +open import Data.Product.Base using (proj₁; proj₂) open import Function.Base using (flip) open import Level using (_⊔_) open import Relation.Binary.Definitions using (Transitive; Monotonic₁; Monotonic₂) diff --git a/src/Algebra/Properties/BooleanAlgebra.agda b/src/Algebra/Properties/BooleanAlgebra.agda index f53815b934..2e1f148701 100644 --- a/src/Algebra/Properties/BooleanAlgebra.agda +++ b/src/Algebra/Properties/BooleanAlgebra.agda @@ -30,7 +30,7 @@ open import Algebra.Structures _≈_ open import Relation.Binary open import Function.Equality using (_⟨$⟩_) open import Function.Equivalence using (_⇔_; module Equivalence) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) ------------------------------------------------------------------------ -- DEPRECATED NAMES diff --git a/src/Algebra/Properties/CommutativeMagma/Divisibility.agda b/src/Algebra/Properties/CommutativeMagma/Divisibility.agda index 14ad404a37..27f6ba56a5 100644 --- a/src/Algebra/Properties/CommutativeMagma/Divisibility.agda +++ b/src/Algebra/Properties/CommutativeMagma/Divisibility.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra using (CommutativeMagma) -open import Data.Product using (_×_; _,_; map) +open import Data.Product.Base using (_×_; _,_; map) module Algebra.Properties.CommutativeMagma.Divisibility {a ℓ} (CM : CommutativeMagma a ℓ) diff --git a/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda b/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda index c17510e530..66bec51115 100644 --- a/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda +++ b/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra using (CommutativeSemigroup) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) import Relation.Binary.Reasoning.Setoid as EqReasoning module Algebra.Properties.CommutativeSemigroup.Divisibility diff --git a/src/Algebra/Properties/Lattice.agda b/src/Algebra/Properties/Lattice.agda index 3e9e078f3f..ed5bfd00dc 100644 --- a/src/Algebra/Properties/Lattice.agda +++ b/src/Algebra/Properties/Lattice.agda @@ -11,7 +11,7 @@ open import Algebra.Lattice.Bundles open import Relation.Binary open import Function.Base open import Function.Bundles using (module Equivalence; _⇔_) -open import Data.Product using (_,_; swap) +open import Data.Product.Base using (_,_; swap) module Algebra.Properties.Lattice {l₁ l₂} (L : Lattice l₁ l₂) where diff --git a/src/Algebra/Properties/Monoid/Divisibility.agda b/src/Algebra/Properties/Monoid/Divisibility.agda index 5653312fd8..f2c8c1f20f 100644 --- a/src/Algebra/Properties/Monoid/Divisibility.agda +++ b/src/Algebra/Properties/Monoid/Divisibility.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra using (Monoid) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Relation.Binary module Algebra.Properties.Monoid.Divisibility diff --git a/src/Algebra/Properties/Semigroup/Divisibility.agda b/src/Algebra/Properties/Semigroup/Divisibility.agda index d7a6154a32..76eaaa6edf 100644 --- a/src/Algebra/Properties/Semigroup/Divisibility.agda +++ b/src/Algebra/Properties/Semigroup/Divisibility.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Algebra using (Semigroup) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Relation.Binary.Definitions using (Transitive) module Algebra.Properties.Semigroup.Divisibility diff --git a/src/Algebra/Properties/Semiring/Divisibility.agda b/src/Algebra/Properties/Semiring/Divisibility.agda index a1b2ff2e9b..54a352d782 100644 --- a/src/Algebra/Properties/Semiring/Divisibility.agda +++ b/src/Algebra/Properties/Semiring/Divisibility.agda @@ -8,7 +8,7 @@ open import Algebra using (Semiring) import Algebra.Properties.Monoid.Divisibility as MonoidDivisibility -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) module Algebra.Properties.Semiring.Divisibility diff --git a/src/Algebra/Solver/CommutativeMonoid.agda b/src/Algebra/Solver/CommutativeMonoid.agda index 69d1a67b0b..623beaeebd 100644 --- a/src/Algebra/Solver/CommutativeMonoid.agda +++ b/src/Algebra/Solver/CommutativeMonoid.agda @@ -17,7 +17,7 @@ open import Data.Maybe.Base as Maybe using (Maybe; decToMaybe; From-just; from-just) open import Data.Nat as ℕ using (ℕ; zero; suc; _+_) open import Data.Nat.GeneralisedArithmetic using (fold) -open import Data.Product using (_×_; uncurry) +open import Data.Product.Base using (_×_; uncurry) open import Data.Vec.Base using (Vec; []; _∷_; lookup; replicate) open import Function.Base using (_∘_) diff --git a/src/Algebra/Solver/IdempotentCommutativeMonoid.agda b/src/Algebra/Solver/IdempotentCommutativeMonoid.agda index a0704ba95b..fdba81a838 100644 --- a/src/Algebra/Solver/IdempotentCommutativeMonoid.agda +++ b/src/Algebra/Solver/IdempotentCommutativeMonoid.agda @@ -15,7 +15,7 @@ open import Data.Fin.Base using (Fin; zero; suc) open import Data.Maybe.Base as Maybe using (Maybe; decToMaybe; From-just; from-just) open import Data.Nat.Base as ℕ using (ℕ; zero; suc; _+_) -open import Data.Product using (_×_; uncurry) +open import Data.Product.Base using (_×_; uncurry) open import Data.Vec.Base using (Vec; []; _∷_; lookup; replicate) open import Function.Base using (_∘_) diff --git a/src/Algebra/Solver/Ring/NaturalCoefficients.agda b/src/Algebra/Solver/Ring/NaturalCoefficients.agda index 495e8cfa66..95af2b0a33 100644 --- a/src/Algebra/Solver/Ring/NaturalCoefficients.agda +++ b/src/Algebra/Solver/Ring/NaturalCoefficients.agda @@ -12,7 +12,7 @@ import Algebra.Properties.Semiring.Mult as SemiringMultiplication open import Data.Maybe.Base using (Maybe; just; nothing; map) open import Algebra.Solver.Ring.AlmostCommutativeRing open import Data.Nat.Base as ℕ -open import Data.Product using (module Σ) +open import Data.Product.Base using (module Σ) open import Function.Base using (id) open import Relation.Binary.PropositionalEquality using (_≡_) From c7f6db7fafb1179514be09c64f89e75863943757 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 29 Jun 2023 23:29:50 -0400 Subject: [PATCH 065/316] Simplify `Data.List` imports to `Data.List.Base` (#2007) --- README/Data/List/Relation/Binary/Pointwise.agda | 2 +- README/Data/List/Relation/Binary/Subset.agda | 2 +- README/Data/Tree/AVL.agda | 2 +- README/Data/Trie/NonDependent.agda | 2 +- README/Tactic/RingSolver.agda | 2 +- README/Text/Regex.agda | 2 +- src/Data/Fin/Permutation/Transposition/List.agda | 2 +- src/Data/List/Countdown.agda | 2 +- .../Binary/Sublist/Heterogeneous/Solver.agda | 2 +- .../List/Relation/Unary/AllPairs/Properties.agda | 2 +- src/Data/List/Relation/Unary/Grouped.agda | 2 +- src/Data/Tree/Binary/Zipper.agda | 2 +- src/Data/Vec/Functional/Properties.agda | 2 +- src/Data/Vec/Reflection.agda | 2 +- src/Reflection/AST/Show.agda | 2 +- src/Reflection/AST/Traversal.agda | 2 +- src/Tactic/MonoidSolver.agda | 10 +++++----- src/Tactic/RingSolver/Core/NatSet.agda | 6 +++--- .../Core/Polynomial/Homomorphism/Addition.agda | 2 +- .../Core/Polynomial/Homomorphism/Lemmas.agda | 2 +- .../RingSolver/Core/Polynomial/Semantics.agda | 10 +++++----- tests/data/appending/Main.agda | 2 +- tests/data/appending/TakeWhile.agda | 2 +- tests/data/list/Main.agda | 2 +- tests/data/trie/Main.agda | 16 ++++++++-------- 25 files changed, 42 insertions(+), 42 deletions(-) diff --git a/README/Data/List/Relation/Binary/Pointwise.agda b/README/Data/List/Relation/Binary/Pointwise.agda index 4932413ad4..da804f12c9 100644 --- a/README/Data/List/Relation/Binary/Pointwise.agda +++ b/README/Data/List/Relation/Binary/Pointwise.agda @@ -7,7 +7,7 @@ module README.Data.List.Relation.Binary.Pointwise where open import Data.Nat using (ℕ; _<_; s≤s; z≤n) -open import Data.List using (List; []; _∷_; length) +open import Data.List.Base using (List; []; _∷_; length) open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong; setoid) open import Relation.Nullary.Negation using (¬_) diff --git a/README/Data/List/Relation/Binary/Subset.agda b/README/Data/List/Relation/Binary/Subset.agda index 44ba3fa053..f6ef7690a1 100644 --- a/README/Data/List/Relation/Binary/Subset.agda +++ b/README/Data/List/Relation/Binary/Subset.agda @@ -4,7 +4,7 @@ -- Documentation for subset relations over `List`s ------------------------------------------------------------------------ -open import Data.List using (List; _∷_; []) +open import Data.List.Base using (List; _∷_; []) open import Data.List.Membership.Propositional.Properties using (∈-++⁺ˡ; ∈-insert) open import Data.List.Relation.Binary.Subset.Propositional using (_⊆_) diff --git a/README/Data/Tree/AVL.agda b/README/Data/Tree/AVL.agda index 1d14058ff8..7994afed41 100644 --- a/README/Data/Tree/AVL.agda +++ b/README/Data/Tree/AVL.agda @@ -60,7 +60,7 @@ t₃ = delete 2 t₂ -- Conversion of a list of key-value mappings to a tree. -open import Data.List using (_∷_; []) +open import Data.List.Base using (_∷_; []) t₄ : Tree t₄ = fromList ((2 , v₂) ∷ (1 , v₁) ∷ []) diff --git a/README/Data/Trie/NonDependent.agda b/README/Data/Trie/NonDependent.agda index 09825c30c3..2387a71242 100644 --- a/README/Data/Trie/NonDependent.agda +++ b/README/Data/Trie/NonDependent.agda @@ -53,7 +53,7 @@ open import Data.Unit open import Data.Bool open import Data.Char as Char import Data.Char.Properties as Char -open import Data.List as List using (List; []; _∷_) +open import Data.List.Base as List using (List; []; _∷_) open import Data.List.Fresh as List# using (List#; []; _∷#_) open import Data.Maybe as Maybe open import Data.Product as Prod diff --git a/README/Tactic/RingSolver.agda b/README/Tactic/RingSolver.agda index cc1db1ad21..fdbea87bbf 100644 --- a/README/Tactic/RingSolver.agda +++ b/README/Tactic/RingSolver.agda @@ -28,7 +28,7 @@ instance ------------------------------------------------------------------------------ -- Imports! -open import Data.List as List using (List; _∷_; []) +open import Data.List.Base as List using (List; _∷_; []) open import Function open import Relation.Binary.PropositionalEquality using (subst; cong; _≡_; module ≡-Reasoning) diff --git a/README/Text/Regex.agda b/README/Text/Regex.agda index 5b4ce805c0..17d3fe45f9 100644 --- a/README/Text/Regex.agda +++ b/README/Text/Regex.agda @@ -9,7 +9,7 @@ module README.Text.Regex where open import Data.Bool using (true; false) -open import Data.List using (_∷_; []) +open import Data.List.Base using (_∷_; []) open import Data.String open import Function.Base using () renaming (_$′_ to _$_) open import Relation.Nullary.Decidable using (yes) diff --git a/src/Data/Fin/Permutation/Transposition/List.agda b/src/Data/Fin/Permutation/Transposition/List.agda index 4ed0583372..07feee0020 100644 --- a/src/Data/Fin/Permutation/Transposition/List.agda +++ b/src/Data/Fin/Permutation/Transposition/List.agda @@ -12,7 +12,7 @@ open import Data.Fin.Base open import Data.Fin.Patterns using (0F) open import Data.Fin.Permutation as P hiding (lift₀) import Data.Fin.Permutation.Components as PC -open import Data.List using (List; []; _∷_; map) +open import Data.List.Base using (List; []; _∷_; map) open import Data.Nat.Base using (ℕ; suc; zero) open import Data.Product using (_×_; _,_) open import Function.Base using (_∘_) diff --git a/src/Data/List/Countdown.agda b/src/Data/List/Countdown.agda index 1ae0efc9b8..fde7439ebf 100644 --- a/src/Data/List/Countdown.agda +++ b/src/Data/List/Countdown.agda @@ -20,7 +20,7 @@ open import Function.Base open import Function.Bundles using (Injection; module Injection) open import Data.Bool.Base using (true; false) -open import Data.List hiding (lookup) +open import Data.List.Base hiding (lookup) open import Data.List.Relation.Unary.Any as Any using (here; there) open import Data.Nat.Base using (ℕ; zero; suc) open import Data.Product diff --git a/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Solver.agda b/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Solver.agda index 9066338e8a..2fe2447efb 100644 --- a/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Solver.agda +++ b/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Solver.agda @@ -24,7 +24,7 @@ open import Data.Maybe.Base as M open import Data.Nat.Base as Nat using (ℕ) open import Data.Product open import Data.Vec.Base as Vec using (Vec ; lookup) -open import Data.List hiding (lookup) +open import Data.List.Base hiding (lookup) open import Data.List.Properties open import Data.List.Relation.Binary.Sublist.Heterogeneous hiding (lookup) diff --git a/src/Data/List/Relation/Unary/AllPairs/Properties.agda b/src/Data/List/Relation/Unary/AllPairs/Properties.agda index 391fee8f8b..009ac3ce75 100644 --- a/src/Data/List/Relation/Unary/AllPairs/Properties.agda +++ b/src/Data/List/Relation/Unary/AllPairs/Properties.agda @@ -8,7 +8,7 @@ module Data.List.Relation.Unary.AllPairs.Properties where -open import Data.List hiding (any) +open import Data.List.Base hiding (any) open import Data.List.Relation.Unary.All as All using (All; []; _∷_) import Data.List.Relation.Unary.All.Properties as All open import Data.List.Relation.Unary.AllPairs as AllPairs using (AllPairs; []; _∷_) diff --git a/src/Data/List/Relation/Unary/Grouped.agda b/src/Data/List/Relation/Unary/Grouped.agda index eceb6a80d0..51f3f28a17 100644 --- a/src/Data/List/Relation/Unary/Grouped.agda +++ b/src/Data/List/Relation/Unary/Grouped.agda @@ -8,7 +8,7 @@ module Data.List.Relation.Unary.Grouped where -open import Data.List using (List; []; _∷_; map) +open import Data.List.Base using (List; []; _∷_; map) open import Data.List.Relation.Unary.All as All using (All; []; _∷_; all?) open import Data.Sum using (_⊎_; inj₁; inj₂) open import Data.Product using (_×_; _,_) diff --git a/src/Data/Tree/Binary/Zipper.agda b/src/Data/Tree/Binary/Zipper.agda index 76b2d9fd8e..0e5f4b8d05 100644 --- a/src/Data/Tree/Binary/Zipper.agda +++ b/src/Data/Tree/Binary/Zipper.agda @@ -10,7 +10,7 @@ module Data.Tree.Binary.Zipper where open import Level using (Level; _⊔_) open import Data.Tree.Binary as BT using (Tree; node; leaf) -open import Data.List as List using (List; []; _∷_; sum; _++_; [_]) +open import Data.List.Base as List using (List; []; _∷_; sum; _++_; [_]) open import Data.Maybe using (Maybe; nothing; just) open import Data.Nat.Base using (ℕ; suc; _+_) open import Function diff --git a/src/Data/Vec/Functional/Properties.agda b/src/Data/Vec/Functional/Properties.agda index 0d2d08da83..9c4486be47 100644 --- a/src/Data/Vec/Functional/Properties.agda +++ b/src/Data/Vec/Functional/Properties.agda @@ -13,7 +13,7 @@ open import Data.Fin.Base open import Data.Nat as ℕ import Data.Nat.Properties as ℕₚ open import Data.Product as Product using (_×_; _,_; proj₁; proj₂) -open import Data.List as L using (List) +open import Data.List.Base as L using (List) import Data.List.Properties as Lₚ open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Data.Vec as V using (Vec) diff --git a/src/Data/Vec/Reflection.agda b/src/Data/Vec/Reflection.agda index 8b0fa7799f..0ea6473ff2 100644 --- a/src/Data/Vec/Reflection.agda +++ b/src/Data/Vec/Reflection.agda @@ -8,7 +8,7 @@ module Data.Vec.Reflection where -import Data.List as List +import Data.List.Base as List open import Data.Vec.Base open import Reflection.AST.Term open import Reflection.AST.Argument diff --git a/src/Reflection/AST/Show.agda b/src/Reflection/AST/Show.agda index ffe97352f4..f0291cf447 100644 --- a/src/Reflection/AST/Show.agda +++ b/src/Reflection/AST/Show.agda @@ -13,7 +13,7 @@ module Reflection.AST.Show where import Data.Char as Char using (show) import Data.Float as Float using (show) -open import Data.List hiding (_++_; intersperse) +open import Data.List.Base hiding (_++_; intersperse) import Data.Nat.Show as ℕ using (show) open import Data.Product using (_×_; _,_) open import Data.String as String diff --git a/src/Reflection/AST/Traversal.agda b/src/Reflection/AST/Traversal.agda index 336935783e..c311567c7f 100644 --- a/src/Reflection/AST/Traversal.agda +++ b/src/Reflection/AST/Traversal.agda @@ -12,7 +12,7 @@ module Reflection.AST.Traversal {F : Set → Set} (AppF : RawApplicative F) where open import Data.Nat using (ℕ; zero; suc; _+_) -open import Data.List using (List; []; _∷_; _++_; reverse; length) +open import Data.List.Base using (List; []; _∷_; _++_; reverse; length) open import Data.Product using (_×_; _,_) open import Data.String using (String) open import Function.Base using (_∘_) diff --git a/src/Tactic/MonoidSolver.agda b/src/Tactic/MonoidSolver.agda index e34d770cde..fcf193244b 100644 --- a/src/Tactic/MonoidSolver.agda +++ b/src/Tactic/MonoidSolver.agda @@ -75,11 +75,11 @@ module Tactic.MonoidSolver where open import Algebra open import Function -open import Data.Bool as Bool using (Bool; _∨_; if_then_else_) -open import Data.Maybe as Maybe using (Maybe; just; nothing; maybe) -open import Data.List as List using (List; _∷_; []) -open import Data.Nat as ℕ using (ℕ; suc; zero) -open import Data.Product as Product using (_×_; _,_) +open import Data.Bool as Bool using (Bool; _∨_; if_then_else_) +open import Data.Maybe as Maybe using (Maybe; just; nothing; maybe) +open import Data.List.Base as List using (List; _∷_; []) +open import Data.Nat as ℕ using (ℕ; suc; zero) +open import Data.Product as Product using (_×_; _,_) open import Reflection.AST open import Reflection.AST.Term diff --git a/src/Tactic/RingSolver/Core/NatSet.agda b/src/Tactic/RingSolver/Core/NatSet.agda index 485539792e..7ebbcebc22 100644 --- a/src/Tactic/RingSolver/Core/NatSet.agda +++ b/src/Tactic/RingSolver/Core/NatSet.agda @@ -36,10 +36,10 @@ module Tactic.RingSolver.Core.NatSet where -open import Data.Nat as ℕ using (ℕ; suc; zero) -open import Data.List as List using (List; _∷_; []) +open import Data.Nat as ℕ using (ℕ; suc; zero) +open import Data.List.Base as List using (List; _∷_; []) open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) -open import Data.Bool as Bool using (Bool) +open import Data.Bool as Bool using (Bool) open import Function open import Relation.Binary.PropositionalEquality diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda index 990d6a46ed..d04ecbc131 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda @@ -16,7 +16,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Addition open import Data.Nat as ℕ using (ℕ; suc; zero; compare; _≤′_; ≤′-step; ≤′-refl) open import Data.Nat.Properties as ℕₚ using (≤′-trans) open import Data.Product using (_,_; _×_; proj₂) -open import Data.List using (_∷_; []) +open import Data.List.Base using (_∷_; []) open import Data.List.Kleene open import Data.Vec using (Vec) open import Function diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda index f0c5dfcd76..ce20b1e381 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda @@ -18,7 +18,7 @@ open import Data.Nat.Base as ℕ using (ℕ; suc; zero; open import Data.Nat.Properties as ℕₚ using (≤′-trans) open import Data.Vec.Base as Vec using (Vec; _∷_) open import Data.Fin using (Fin; zero; suc) -open import Data.List using (_∷_; []) +open import Data.List.Base using (_∷_; []) open import Data.Unit using (tt) open import Data.List.Kleene open import Data.Product using (_,_; proj₁; proj₂; map₁; _×_) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda b/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda index 648563112d..8cde662620 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda @@ -13,11 +13,11 @@ module Tactic.RingSolver.Core.Polynomial.Semantics (homo : Homomorphism r₁ r₂ r₃ r₄) where -open import Data.Nat using (ℕ; suc; zero; _≤′_; ≤′-step; ≤′-refl) -open import Data.Vec using (Vec; []; _∷_; uncons) -open import Data.List using ([]; _∷_) -open import Data.Product using (_,_; _×_) -open import Data.List.Kleene using (_+; _*; ∹_; _&_; []) +open import Data.Nat using (ℕ; suc; zero; _≤′_; ≤′-step; ≤′-refl) +open import Data.Vec using (Vec; []; _∷_; uncons) +open import Data.List.Base using ([]; _∷_) +open import Data.Product using (_,_; _×_) +open import Data.List.Kleene using (_+; _*; ∹_; _&_; []) open Homomorphism homo hiding (_^_) open import Tactic.RingSolver.Core.Polynomial.Base from diff --git a/tests/data/appending/Main.agda b/tests/data/appending/Main.agda index b5fc0a48a6..2015b0bc9a 100644 --- a/tests/data/appending/Main.agda +++ b/tests/data/appending/Main.agda @@ -3,7 +3,7 @@ module Main where -open import Data.List using (replicate) +open import Data.List.Base using (replicate) open import Data.String using (toList; fromList) open import IO diff --git a/tests/data/appending/TakeWhile.agda b/tests/data/appending/TakeWhile.agda index 9030fb3c0c..5a885c3fbe 100644 --- a/tests/data/appending/TakeWhile.agda +++ b/tests/data/appending/TakeWhile.agda @@ -3,7 +3,7 @@ module TakeWhile where open import Level -open import Data.List hiding (takeWhile) +open import Data.List.Base hiding (takeWhile) open import Data.List.Relation.Unary.All as List using ([]; _∷_) open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_; refl) open import Data.List.Relation.Ternary.Appending.Propositional diff --git a/tests/data/list/Main.agda b/tests/data/list/Main.agda index f2b11de8ae..f7f12cd63d 100644 --- a/tests/data/list/Main.agda +++ b/tests/data/list/Main.agda @@ -3,7 +3,7 @@ module Main where open import Level -open import Data.List as List using (List; _∷_; []; _++_; reverse) +open import Data.List.Base as List using (List; _∷_; []; _++_; reverse) open import Data.List.Zipper import Data.List.Sort as Sort open import Data.Maybe.Base diff --git a/tests/data/trie/Main.agda b/tests/data/trie/Main.agda index 4eab3cfd40..9dfac5cb26 100644 --- a/tests/data/trie/Main.agda +++ b/tests/data/trie/Main.agda @@ -7,14 +7,14 @@ module Main where open import Level open import Data.Unit open import Data.Bool -open import Data.Char as Char hiding (show) -import Data.Char.Properties as Char -open import Data.List as List using (List; []; _∷_) -open import Data.List.Fresh as List# using (List#; []; _∷#_) -open import Data.Maybe as Maybe -open import Data.Product as Prod -open import Data.String as String using (String; unlines; _++_) -open import Data.These as These +open import Data.Char as Char hiding (show) +import Data.Char.Properties as Char +open import Data.List.Base as List using (List; []; _∷_) +open import Data.List.Fresh as List# using (List#; []; _∷#_) +open import Data.Maybe as Maybe +open import Data.Product as Prod +open import Data.String as String using (String; unlines; _++_) +open import Data.These as These open import Function.Base using (case_of_; _$_; _∘′_; id; _on_) open import Relation.Nary From 78a871c8b335eb78788444c03352c370175e4987 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Thu, 29 Jun 2023 23:30:28 -0400 Subject: [PATCH 066/316] Add more fixities (#2008) --- CHANGELOG.md | 8 ++++++++ src/Codata/Guarded/Stream/Relation/Unary/All.agda | 2 ++ src/Foreign/Haskell/List/NonEmpty.agda | 2 ++ src/Function/Metric/Rational/Bundles.agda | 12 ++++++++++++ src/Level/Literals.agda | 2 ++ src/Relation/Binary/Construct/Union.agda | 2 ++ .../HeterogeneousEquality/Quotients/Examples.agda | 2 ++ src/Relation/Binary/Indexed/Homogeneous/Bundles.agda | 3 +++ src/Text/Regex/Search.agda | 2 ++ 9 files changed, 35 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6d692fdb4a..5891740538 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -112,6 +112,14 @@ Bug-fixes infix 4 _≈∙_ (Relation.Binary.Construct.Add.Point.Equality) infix 4 _≤⁺_ _≤⊤⁺ (Relation.Binary.Construct.Add.Supremum.NonStrict) infixr 5 _∷ʳ_ (Relation.Binary.Construct.Closure.Transitive) + infixr 5 _∷_ (Codata.Guarded.Stream.Relation.Unary.All) + infixr 5 _∷_ (Foreign.Haskell.List.NonEmpty) + infix 4 _≈_ (Function.Metric.Rational.Bundles) + infixl 6 _ℕ+_ (Level.Literals) + infixr 6 _∪_ (Relation.Binary.Construct.Union) + infixl 6 _+ℤ_ (Relation.Binary.HeterogeneousEquality.Quotients.Examples) + infix 4 _≉_ _≈ᵢ_ _≤ᵢ_ (Relation.Binary.Indexed.Homogeneous.Bundles) + infixr 5 _∷ᴹ_ _∷⁻¹ᴹ_ (Text.Regex.Search) ``` * In `System.Exit`, the `ExitFailure` constructor is now carrying an integer diff --git a/src/Codata/Guarded/Stream/Relation/Unary/All.agda b/src/Codata/Guarded/Stream/Relation/Unary/All.agda index c69ff9124b..ad87a7e589 100644 --- a/src/Codata/Guarded/Stream/Relation/Unary/All.agda +++ b/src/Codata/Guarded/Stream/Relation/Unary/All.agda @@ -20,6 +20,8 @@ private P Q R : Pred A p xs : Stream A +infixr 5 _∷_ + record All (P : Pred A ℓ) (as : Stream A) : Set ℓ where coinductive constructor _∷_ diff --git a/src/Foreign/Haskell/List/NonEmpty.agda b/src/Foreign/Haskell/List/NonEmpty.agda index a36a1fc415..93e01e561f 100644 --- a/src/Foreign/Haskell/List/NonEmpty.agda +++ b/src/Foreign/Haskell/List/NonEmpty.agda @@ -25,5 +25,7 @@ private data NonEmpty (A : Set a) : Set a where _∷_ : A → List A → NonEmpty A +infixr 5 _∷_ + {-# FOREIGN GHC type AgdaNonEmpty l a = NE.NonEmpty a #-} {-# COMPILE GHC NonEmpty = data AgdaNonEmpty ((NE.:|)) #-} diff --git a/src/Function/Metric/Rational/Bundles.agda b/src/Function/Metric/Rational/Bundles.agda index 8bbc9f85d3..f578a8a8a2 100644 --- a/src/Function/Metric/Rational/Bundles.agda +++ b/src/Function/Metric/Rational/Bundles.agda @@ -34,6 +34,8 @@ record ProtoMetric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isProtoMetric : IsProtoMetric _≈_ d + infix 4 _≈_ + open IsProtoMetric isProtoMetric public ------------------------------------------------------------------------ @@ -46,6 +48,8 @@ record PreMetric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isPreMetric : IsPreMetric _≈_ d + infix 4 _≈_ + open IsPreMetric isPreMetric public protoMetric : ProtoMetric a ℓ @@ -63,6 +67,8 @@ record QuasiSemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isQuasiSemiMetric : IsQuasiSemiMetric _≈_ d + infix 4 _≈_ + open IsQuasiSemiMetric isQuasiSemiMetric public preMetric : PreMetric a ℓ @@ -83,6 +89,8 @@ record SemiMetric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isSemiMetric : IsSemiMetric _≈_ d + infix 4 _≈_ + open IsSemiMetric isSemiMetric public quasiSemiMetric : QuasiSemiMetric a ℓ @@ -103,6 +111,8 @@ record Metric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isMetric : IsMetric _≈_ d + infix 4 _≈_ + open IsMetric isMetric public semiMetric : SemiMetric a ℓ @@ -123,6 +133,8 @@ record UltraMetric a ℓ : Set (suc (a ⊔ ℓ)) where d : DistanceFunction Carrier isUltraMetric : IsUltraMetric _≈_ d + infix 4 _≈_ + open IsUltraMetric isUltraMetric public semiMetric : SemiMetric a ℓ diff --git a/src/Level/Literals.agda b/src/Level/Literals.agda index 8e3eebb4e5..d1ac0f7ac4 100644 --- a/src/Level/Literals.agda +++ b/src/Level/Literals.agda @@ -15,6 +15,8 @@ open import Level using (Level; 0ℓ) -- Increase a Level by a number of sucs. +infixl 6 _ℕ+_ + _ℕ+_ : ℕ → Level → Level zero ℕ+ ℓ = ℓ suc n ℕ+ ℓ = Level.suc (n ℕ+ ℓ) diff --git a/src/Relation/Binary/Construct/Union.agda b/src/Relation/Binary/Construct/Union.agda index 3abd3ffe42..2b70ce8500 100644 --- a/src/Relation/Binary/Construct/Union.agda +++ b/src/Relation/Binary/Construct/Union.agda @@ -24,6 +24,8 @@ private ------------------------------------------------------------------------ -- Definition +infixr 6 _∪_ + _∪_ : REL A B ℓ₁ → REL A B ℓ₂ → REL A B (ℓ₁ ⊔ ℓ₂) L ∪ R = λ i j → L i j ⊎ R i j diff --git a/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda b/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda index c7bddf4a5a..fb1db6b9fb 100644 --- a/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda +++ b/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda @@ -82,6 +82,8 @@ module Integers (quot : Quotients 0ℓ 0ℓ) where module _ (ext : ∀ {a b} {A : Set a} {B₁ B₂ : A → Set b} {f₁ : ∀ a → B₁ a} {f₂ : ∀ a → B₂ a} → (∀ a → f₁ a ≅ f₂ a) → f₁ ≅ f₂) where + infixl 6 _+ℤ_ + _+ℤ_ : ℤ → ℤ → ℤ _+ℤ_ = Properties₂.lift₂ ext Int Int (λ i j → abs (i +² j)) $ λ {a} {b} {c} p p′ → compat-abs (+²-cong {a} {b} {c} p p′) diff --git a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda index 670949c138..fd83521783 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda @@ -39,6 +39,8 @@ record IndexedSetoid {i} (I : Set i) c ℓ : Set (suc (i ⊔ c ⊔ ℓ)) where Carrier : Set _ Carrier = ∀ i → Carrierᵢ i + infix 4 _≉_ + _≈_ : B.Rel Carrier _ _≈_ = Lift Carrierᵢ _≈ᵢ_ @@ -103,6 +105,7 @@ record IndexedPreorder {i} (I : Set i) c ℓ₁ ℓ₂ : record IndexedPoset {i} (I : Set i) c ℓ₁ ℓ₂ : Set (suc (i ⊔ c ⊔ ℓ₁ ⊔ ℓ₂)) where + infix 4 _≈ᵢ_ _≤ᵢ_ field Carrierᵢ : I → Set c _≈ᵢ_ : IRel Carrierᵢ ℓ₁ diff --git a/src/Text/Regex/Search.agda b/src/Text/Regex/Search.agda index af10c2784a..c802768e38 100644 --- a/src/Text/Regex/Search.agda +++ b/src/Text/Regex/Search.agda @@ -87,6 +87,8 @@ module Prefix where []⁻¹ᴹ : ∀ {e} → Match (Prefix _≡_) [] e → [] ∈ e []⁻¹ᴹ (mkMatch .[] p []) = p + infixr 5 _∷ᴹ_ _∷⁻¹ᴹ_ + _∷ᴹ_ : ∀ {xs e} x → Match (Prefix _≡_) xs (eat x e) → Match (Prefix _≡_) (x ∷ xs) e x ∷ᴹ (mkMatch ys ys∈e\x ys≤xs) = mkMatch (x ∷ ys) (eat-sound x _ ys∈e\x) (refl ∷ ys≤xs) From 2fb47f528ca33050e5a9f4abf2b8a11afe655468 Mon Sep 17 00:00:00 2001 From: Nathan van Doorn Date: Thu, 6 Jul 2023 09:34:35 +0200 Subject: [PATCH 067/316] Eliminate many propositional equality imports (#2002) * Eliminate many propositional equality imports * Fix merge conflict in Data.Bool.Properties Co-authored-by: G. Allais --------- Co-authored-by: G. Allais --- src/Algebra/Construct/LiftedChoice.agda | 2 +- src/Algebra/Operations/CommutativeMonoid.agda | 2 +- .../CommutativeMonoid/Mult/TCOptimised.agda | 1 - .../Properties/CommutativeMonoid/Sum.agda | 2 +- src/Algebra/Properties/Monoid/Mult.agda | 2 +- .../Properties/Monoid/Mult/TCOptimised.agda | 2 +- src/Algebra/Properties/Semiring/Exp.agda | 2 +- src/Algebra/Solver/CommutativeMonoid.agda | 2 +- .../Solver/CommutativeMonoid/Example.agda | 2 +- src/Algebra/Solver/Monoid.agda | 2 +- src/Algebra/Solver/Ring.agda | 2 +- .../Solver/Ring/NaturalCoefficients.agda | 2 +- .../Ring/NaturalCoefficients/Default.agda | 2 +- src/Codata/Guarded/Stream/Properties.agda | 2 +- .../Stream/Relation/Binary/Pointwise.agda | 3 ++- src/Codata/Musical/Cofin.agda | 2 +- src/Codata/Musical/Colist/Infinite-merge.agda | 2 +- src/Codata/Musical/Conat.agda | 2 +- src/Codata/Musical/Covec.agda | 2 +- src/Codata/Musical/Stream.agda | 2 +- src/Codata/Sized/Colist.agda | 2 +- src/Codata/Sized/Colist/Bisimilarity.agda | 3 ++- src/Codata/Sized/Colist/Properties.agda | 2 +- src/Codata/Sized/Covec/Bisimilarity.agda | 2 +- src/Codata/Sized/Covec/Properties.agda | 2 +- src/Codata/Sized/Cowriter/Bisimilarity.agda | 3 ++- src/Codata/Sized/Delay/Bisimilarity.agda | 2 +- src/Codata/Sized/Delay/Properties.agda | 2 +- src/Codata/Sized/M/Bisimilarity.agda | 2 +- src/Codata/Sized/M/Properties.agda | 3 ++- src/Codata/Sized/Stream/Bisimilarity.agda | 3 ++- src/Codata/Sized/Stream/Properties.agda | 2 +- src/Data/AVL/Indexed/WithK.agda | 2 +- src/Data/AVL/IndexedMap.agda | 2 +- src/Data/Bool.agda | 3 +-- src/Data/Bool/Properties.agda | 3 ++- src/Data/Char/Properties.agda | 3 ++- src/Data/Container/Indexed/WithK.agda | 2 +- .../Container/Relation/Binary/Pointwise.agda | 2 +- .../Relation/Binary/Pointwise/Properties.agda | 2 +- src/Data/Digit.agda | 2 +- src/Data/Digit/Properties.agda | 2 +- src/Data/Fin/Substitution/Example.agda | 2 +- src/Data/Fin/Substitution/Lemmas.agda | 2 +- src/Data/Graph/Acyclic.agda | 2 +- src/Data/Integer/Coprimality.agda | 2 +- src/Data/List/Countdown.agda | 3 ++- src/Data/List/Extrema/Core.agda | 2 +- src/Data/List/Extrema/Nat.agda | 2 +- .../Fresh/Membership/Setoid/Properties.agda | 2 +- .../Fresh/Relation/Unary/All/Properties.agda | 2 +- .../Fresh/Relation/Unary/Any/Properties.agda | 2 +- .../List/Membership/DecPropositional.agda | 3 ++- src/Data/List/Membership/Propositional.agda | 3 ++- .../Propositional/Properties/Core.agda | 2 +- .../Propositional/Properties/WithK.agda | 2 +- .../List/Membership/Setoid/Properties.agda | 2 +- src/Data/List/NonEmpty.agda | 16 +------------- .../Binary/Disjoint/Propositional.agda | 2 +- .../Binary/Equality/Propositional.agda | 3 ++- .../Infix/Heterogeneous/Properties.agda | 2 +- .../Binary/Permutation/Propositional.agda | 2 +- .../Permutation/Propositional/Properties.agda | 2 +- .../Relation/Binary/Permutation/Setoid.agda | 2 +- .../Binary/Permutation/Setoid/Properties.agda | 2 +- src/Data/List/Relation/Binary/Pointwise.agda | 3 ++- .../Relation/Binary/Pointwise/Properties.agda | 2 +- .../Prefix/Heterogeneous/Properties.agda | 2 +- .../Sublist/DecPropositional/Solver.agda | 4 ++-- .../Binary/Sublist/Heterogeneous.agda | 2 +- .../Sublist/Heterogeneous/Properties.agda | 2 +- .../Sublist/Propositional/Disjoint.agda | 2 +- .../Example/UniqueBoundVariables.agda | 2 +- .../List/Relation/Binary/Sublist/Setoid.agda | 2 +- .../Binary/Sublist/Setoid/Properties.agda | 2 +- .../Relation/Binary/Subset/Propositional.agda | 2 +- .../Suffix/Heterogeneous/Properties.agda | 2 +- src/Data/List/Relation/Ternary/Appending.agda | 2 +- .../Ternary/Appending/Properties.agda | 2 +- .../Appending/Propositional/Properties.agda | 3 ++- .../Ternary/Appending/Setoid/Properties.agda | 2 +- .../List/Relation/Ternary/Interleaving.agda | 2 +- .../Ternary/Interleaving/Propositional.agda | 3 ++- .../Propositional/Properties.agda | 2 +- src/Data/List/Relation/Unary/All.agda | 3 ++- .../Relation/Unary/AllPairs/Properties.agda | 2 +- .../List/Relation/Unary/Any/Properties.agda | 2 +- .../Unary/Enumerates/Setoid/Properties.agda | 2 +- .../Relation/Unary/Linked/Properties.agda | 2 +- src/Data/List/Relation/Unary/Sufficient.agda | 2 +- .../Unary/Unique/DecPropositional.agda | 2 +- .../Unique/DecPropositional/Properties.agda | 2 +- .../Relation/Unary/Unique/Propositional.agda | 2 +- .../Unary/Unique/Setoid/Properties.agda | 2 +- src/Data/Maybe/Relation/Binary/Connected.agda | 2 +- src/Data/Maybe/Relation/Binary/Pointwise.agda | 2 +- src/Data/Maybe/Relation/Unary/All.agda | 2 +- src/Data/Maybe/Relation/Unary/Any.agda | 2 +- src/Data/Nat/Coprimality.agda | 2 +- src/Data/Nat/Divisibility.agda | 3 ++- src/Data/Nat/GCD.agda | 2 +- src/Data/Nat/LCM.agda | 2 +- src/Data/Nat/Logarithm.agda | 2 +- src/Data/Nat/Show/Properties.agda | 2 +- src/Data/Product/Effectful/Examples.agda | 2 +- .../Product/Function/Dependent/Setoid.agda | 3 ++- .../Function/Dependent/Setoid/WithK.agda | 3 ++- .../Product/Relation/Binary/Lex/Strict.agda | 2 +- .../Relation/Binary/Pointwise/Dependent.agda | 2 +- .../Binary/Pointwise/Dependent/WithK.agda | 3 ++- .../Binary/Pointwise/NonDependent.agda | 3 ++- src/Data/String.agda | 2 +- src/Data/String/Properties.agda | 2 +- src/Data/String/Unsafe.agda | 2 +- src/Data/Sum/Relation/Binary/LeftOrder.agda | 2 +- src/Data/Sum/Relation/Binary/Pointwise.agda | 3 ++- src/Data/Tree/AVL/Indexed.agda | 2 +- .../Tree/AVL/Indexed/Relation/Unary/All.agda | 2 +- .../Relation/Unary/Any/Properties.agda | 2 +- src/Data/Tree/AVL/Indexed/WithK.agda | 2 +- src/Data/Tree/AVL/IndexedMap.agda | 2 +- src/Data/Tree/AVL/Key.agda | 2 +- src/Data/Tree/AVL/NonEmpty/Propositional.agda | 2 +- src/Data/Tree/AVL/Sets/Membership.agda | 1 - .../Tree/AVL/Sets/Membership/Properties.agda | 2 +- .../Relation/Binary/Equality/Setoid.agda | 2 +- .../Relation/Binary/Pointwise/Properties.agda | 2 +- src/Data/Vec/Membership/DecPropositional.agda | 3 ++- src/Data/Vec/Membership/Propositional.agda | 3 ++- .../Membership/Propositional/Properties.agda | 2 +- src/Data/Vec/Properties/WithK.agda | 2 +- src/Data/Vec/Recursive/Properties.agda | 2 +- .../Vec/Relation/Binary/Equality/Setoid.agda | 1 - src/Data/Vec/Relation/Binary/Lex/Core.agda | 2 +- .../Vec/Relation/Binary/Lex/NonStrict.agda | 1 - src/Data/Vec/Relation/Binary/Lex/Strict.agda | 2 +- .../Binary/Pointwise/Extensional.agda | 2 +- .../Relation/Binary/Pointwise/Inductive.agda | 2 +- src/Data/Vec/Relation/Unary/All.agda | 2 +- .../Relation/Unary/AllPairs/Properties.agda | 2 +- .../Vec/Relation/Unary/Any/Properties.agda | 2 +- .../Vec/Relation/Unary/Linked/Properties.agda | 2 +- .../Relation/Unary/Unique/Propositional.agda | 2 +- .../Unary/Unique/Setoid/Properties.agda | 2 +- src/Data/W/Sized.agda | 2 +- src/Effect/Monad/Partiality.agda | 3 ++- src/Effect/Monad/Partiality/All.agda | 2 +- src/Function/Construct/Identity.agda | 3 ++- src/Function/Endomorphism/Propositional.agda | 3 ++- src/Function/Metric/Nat/Structures.agda | 2 +- src/Function/Metric/Rational/Structures.agda | 2 +- src/Function/Properties/Bijection.agda | 2 +- src/Function/Properties/Equivalence.agda | 2 +- src/Function/Properties/Inverse.agda | 3 ++- src/Function/Related.agda | 3 ++- src/Function/Related/Propositional.agda | 3 ++- src/Function/Related/TypeIsomorphisms.agda | 2 +- src/Reflection/AST/Abstraction.agda | 10 ++++----- src/Reflection/AST/Argument.agda | 10 ++++----- src/Reflection/AST/Argument/Information.agda | 8 +++---- src/Reflection/AST/Argument/Modality.agda | 8 +++---- src/Reflection/AST/Argument/Quantity.agda | 6 ++--- src/Reflection/AST/Argument/Relevance.agda | 6 ++--- src/Reflection/AST/Argument/Visibility.agda | 6 ++--- src/Reflection/AST/Definition.agda | 12 +++++----- src/Reflection/AST/Literal.agda | 8 +++---- src/Reflection/AST/Meta.agda | 10 ++++----- src/Reflection/AST/Name.agda | 16 +++++++------- src/Reflection/AST/Term.agda | 6 ++--- .../Construct/Add/Extrema/NonStrict.agda | 2 +- .../Construct/Add/Infimum/NonStrict.agda | 3 ++- .../Binary/Construct/Add/Infimum/Strict.agda | 3 ++- .../Binary/Construct/Add/Point/Equality.agda | 2 +- .../Construct/Add/Supremum/NonStrict.agda | 3 ++- .../Binary/Construct/Add/Supremum/Strict.agda | 3 ++- .../Closure/Reflexive/Properties.agda | 3 ++- .../Closure/Reflexive/Properties/WithK.agda | 2 +- .../ReflexiveTransitive/Properties.agda | 3 ++- .../Binary/Construct/Closure/Transitive.agda | 2 +- .../Construct/Closure/Transitive/WithK.agda | 2 +- .../Binary/HeterogeneousEquality.agda | 3 ++- .../Quotients/Examples.agda | 2 +- .../Binary/Indexed/Homogeneous/Bundles.agda | 2 +- .../Indexed/Homogeneous/Structures.agda | 2 +- .../Binary/Reasoning/MultiSetoid.agda | 2 +- src/Relation/Binary/Reflection.agda | 2 +- src/Relation/Nary.agda | 2 +- .../Nullary/Construct/Add/Extrema.agda | 2 +- src/Relation/Nullary/Universe.agda | 4 ++-- src/Tactic/Cong.agda | 2 +- .../Polynomial/Homomorphism/Addition.agda | 2 +- .../Homomorphism/Exponentiation.agda | 2 +- .../Core/Polynomial/Homomorphism/Lemmas.agda | 22 +++++++++---------- src/Text/Regex/Derivative/Brzozowski.agda | 2 +- src/Text/Regex/Properties.agda | 1 - src/Text/Regex/Search.agda | 2 +- src/Text/Regex/SmartConstructors.agda | 2 +- src/Text/Regex/String/Unsafe.agda | 2 +- 198 files changed, 282 insertions(+), 266 deletions(-) diff --git a/src/Algebra/Construct/LiftedChoice.agda b/src/Algebra/Construct/LiftedChoice.agda index 83cf2110c3..91d3f1d546 100644 --- a/src/Algebra/Construct/LiftedChoice.agda +++ b/src/Algebra/Construct/LiftedChoice.agda @@ -16,7 +16,7 @@ open import Relation.Nullary using (¬_; yes; no) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Product.Base using (_×_; _,_) open import Level using (Level; _⊔_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Unary using (Pred) import Relation.Binary.Reasoning.Setoid as EqReasoning diff --git a/src/Algebra/Operations/CommutativeMonoid.agda b/src/Algebra/Operations/CommutativeMonoid.agda index 3c94a94419..52d72af156 100644 --- a/src/Algebra/Operations/CommutativeMonoid.agda +++ b/src/Algebra/Operations/CommutativeMonoid.agda @@ -12,7 +12,7 @@ open import Data.Fin.Base using (Fin; zero) open import Data.Nat.Base as ℕ using (ℕ; zero; suc) open import Function.Base using (_∘_) open import Relation.Binary.Core using (_Preserves_⟶_; _Preserves₂_⟶_⟶_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) module Algebra.Operations.CommutativeMonoid {s₁ s₂} (CM : CommutativeMonoid s₁ s₂) diff --git a/src/Algebra/Properties/CommutativeMonoid/Mult/TCOptimised.agda b/src/Algebra/Properties/CommutativeMonoid/Mult/TCOptimised.agda index b61a3e987e..8985fb21cb 100644 --- a/src/Algebra/Properties/CommutativeMonoid/Mult/TCOptimised.agda +++ b/src/Algebra/Properties/CommutativeMonoid/Mult/TCOptimised.agda @@ -10,7 +10,6 @@ open import Algebra.Bundles using (CommutativeMonoid) open import Data.Nat.Base as ℕ using (ℕ; zero; suc) open import Relation.Binary.Core using (_Preserves_⟶_; _Preserves₂_⟶_⟶_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) module Algebra.Properties.CommutativeMonoid.Mult.TCOptimised {a ℓ} (M : CommutativeMonoid a ℓ) where diff --git a/src/Algebra/Properties/CommutativeMonoid/Sum.agda b/src/Algebra/Properties/CommutativeMonoid/Sum.agda index f70b965130..6cb417bc69 100644 --- a/src/Algebra/Properties/CommutativeMonoid/Sum.agda +++ b/src/Algebra/Properties/CommutativeMonoid/Sum.agda @@ -14,7 +14,7 @@ open import Data.Fin.Permutation as Perm using (Permutation; _⟨$⟩ˡ_; _⟨$ open import Data.Fin.Patterns using (0F) open import Data.Vec.Functional open import Function.Base using (_∘_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Negation using (contradiction) module Algebra.Properties.CommutativeMonoid.Sum diff --git a/src/Algebra/Properties/Monoid/Mult.agda b/src/Algebra/Properties/Monoid/Mult.agda index f74404e886..1a9e346585 100644 --- a/src/Algebra/Properties/Monoid/Mult.agda +++ b/src/Algebra/Properties/Monoid/Mult.agda @@ -9,7 +9,7 @@ open import Algebra.Bundles using (Monoid) open import Data.Nat.Base as ℕ using (ℕ; zero; suc; NonZero) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) module Algebra.Properties.Monoid.Mult {a ℓ} (M : Monoid a ℓ) where diff --git a/src/Algebra/Properties/Monoid/Mult/TCOptimised.agda b/src/Algebra/Properties/Monoid/Mult/TCOptimised.agda index 86c4ac566c..ded5f1339e 100644 --- a/src/Algebra/Properties/Monoid/Mult/TCOptimised.agda +++ b/src/Algebra/Properties/Monoid/Mult/TCOptimised.agda @@ -10,7 +10,7 @@ open import Algebra.Bundles using (Monoid) open import Data.Nat.Base as ℕ using (ℕ; zero; suc) open import Relation.Binary.Core using (_Preserves_⟶_; _Preserves₂_⟶_⟶_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) module Algebra.Properties.Monoid.Mult.TCOptimised {a ℓ} (M : Monoid a ℓ) where diff --git a/src/Algebra/Properties/Semiring/Exp.agda b/src/Algebra/Properties/Semiring/Exp.agda index df467b1f66..1d50298ca5 100644 --- a/src/Algebra/Properties/Semiring/Exp.agda +++ b/src/Algebra/Properties/Semiring/Exp.agda @@ -9,7 +9,7 @@ open import Algebra open import Data.Nat.Base as ℕ using (ℕ; zero; suc) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Data.Nat.Properties as ℕ module Algebra.Properties.Semiring.Exp diff --git a/src/Algebra/Solver/CommutativeMonoid.agda b/src/Algebra/Solver/CommutativeMonoid.agda index 623beaeebd..7e4b14b18c 100644 --- a/src/Algebra/Solver/CommutativeMonoid.agda +++ b/src/Algebra/Solver/CommutativeMonoid.agda @@ -27,7 +27,7 @@ import Relation.Binary.Reflection as Reflection import Relation.Nullary.Decidable as Dec import Data.Vec.Relation.Binary.Pointwise.Inductive as Pointwise -open import Relation.Binary.PropositionalEquality as P using (_≡_; decSetoid) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Decidable using (Dec) open CommutativeMonoid M diff --git a/src/Algebra/Solver/CommutativeMonoid/Example.agda b/src/Algebra/Solver/CommutativeMonoid/Example.agda index 83351df044..e59f5b1e1f 100644 --- a/src/Algebra/Solver/CommutativeMonoid/Example.agda +++ b/src/Algebra/Solver/CommutativeMonoid/Example.agda @@ -8,7 +8,7 @@ module Algebra.Solver.CommutativeMonoid.Example where -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) open import Data.Bool.Base using (_∨_) open import Data.Bool.Properties using (∨-commutativeMonoid) diff --git a/src/Algebra/Solver/Monoid.agda b/src/Algebra/Solver/Monoid.agda index 3006374347..bf066f7745 100644 --- a/src/Algebra/Solver/Monoid.agda +++ b/src/Algebra/Solver/Monoid.agda @@ -22,7 +22,7 @@ open import Data.Vec.Base using (Vec; lookup) open import Function.Base using (_∘_; _$_) open import Relation.Binary using (Decidable) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.Reflection open import Relation.Nullary import Relation.Nullary.Decidable as Dec diff --git a/src/Algebra/Solver/Ring.agda b/src/Algebra/Solver/Ring.agda index a1ea98ead3..e103b7a70e 100644 --- a/src/Algebra/Solver/Ring.agda +++ b/src/Algebra/Solver/Ring.agda @@ -42,7 +42,7 @@ open import Algebra.Properties.Semiring.Exp semiring open import Relation.Binary open import Relation.Nullary.Decidable using (yes; no) open import Relation.Binary.Reasoning.Setoid setoid -import Relation.Binary.PropositionalEquality as PropEq +import Relation.Binary.PropositionalEquality.Core as PropEq import Relation.Binary.Reflection as Reflection open import Data.Nat.Base using (ℕ; suc; zero) diff --git a/src/Algebra/Solver/Ring/NaturalCoefficients.agda b/src/Algebra/Solver/Ring/NaturalCoefficients.agda index 95af2b0a33..fdd0a65e6b 100644 --- a/src/Algebra/Solver/Ring/NaturalCoefficients.agda +++ b/src/Algebra/Solver/Ring/NaturalCoefficients.agda @@ -14,7 +14,7 @@ open import Algebra.Solver.Ring.AlmostCommutativeRing open import Data.Nat.Base as ℕ open import Data.Product.Base using (module Σ) open import Function.Base using (id) -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) module Algebra.Solver.Ring.NaturalCoefficients {r₁ r₂} (R : CommutativeSemiring r₁ r₂) diff --git a/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda b/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda index df01719174..84003922a0 100644 --- a/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda +++ b/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda @@ -20,7 +20,7 @@ import Algebra.Properties.Semiring.Mult as SemiringMultiplication open import Data.Maybe.Base using (Maybe; map) open import Data.Nat using (_≟_) open import Relation.Binary.Consequences using (dec⇒weaklyDec) -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P open CommutativeSemiring R open SemiringMultiplication semiring diff --git a/src/Codata/Guarded/Stream/Properties.agda b/src/Codata/Guarded/Stream/Properties.agda index 3e4bd83dcb..29ea54bb1d 100644 --- a/src/Codata/Guarded/Stream/Properties.agda +++ b/src/Codata/Guarded/Stream/Properties.agda @@ -20,7 +20,7 @@ open import Data.Product as Prod using (_×_; _,_; proj₁; proj₂) open import Data.Vec.Base as Vec using (Vec; _∷_) open import Function.Base using (const; flip; id; _∘′_; _$′_; _⟨_⟩_; _∘₂′_) open import Level using (Level) -open import Relation.Binary.PropositionalEquality as P using (_≡_; cong; cong₂) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; cong; cong₂) private variable diff --git a/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda b/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda index c2d44f8145..3f610599a5 100644 --- a/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda +++ b/src/Codata/Guarded/Stream/Relation/Binary/Pointwise.agda @@ -13,7 +13,8 @@ open import Data.Nat.Base using (ℕ; zero; suc) open import Function.Base using (_∘_; _on_) open import Level using (Level; _⊔_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P private variable diff --git a/src/Codata/Musical/Cofin.agda b/src/Codata/Musical/Cofin.agda index 082a6848dd..bc901ef194 100644 --- a/src/Codata/Musical/Cofin.agda +++ b/src/Codata/Musical/Cofin.agda @@ -12,7 +12,7 @@ open import Codata.Musical.Notation open import Codata.Musical.Conat as Conat using (Coℕ; suc; ∞ℕ) open import Data.Nat.Base using (ℕ; zero; suc) open import Data.Fin.Base using (Fin; zero; suc) -open import Relation.Binary.PropositionalEquality using (_≡_ ; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_ ; refl) open import Function.Base using (_∋_) ------------------------------------------------------------------------ diff --git a/src/Codata/Musical/Colist/Infinite-merge.agda b/src/Codata/Musical/Colist/Infinite-merge.agda index 9c859bcf26..677024808a 100644 --- a/src/Codata/Musical/Colist/Infinite-merge.agda +++ b/src/Codata/Musical/Colist/Infinite-merge.agda @@ -23,7 +23,7 @@ open import Function.Inverse as Inv using (_↔_; Inverse; inverse) import Function.Related as Related open import Function.Related.TypeIsomorphisms import Induction.WellFounded as WF -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.Construct.On as On ------------------------------------------------------------------------ diff --git a/src/Codata/Musical/Conat.agda b/src/Codata/Musical/Conat.agda index f8c1490a40..d8e76d90be 100644 --- a/src/Codata/Musical/Conat.agda +++ b/src/Codata/Musical/Conat.agda @@ -12,7 +12,7 @@ open import Codata.Musical.Notation open import Data.Nat.Base using (ℕ; zero; suc) open import Function.Base using (_∋_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) ------------------------------------------------------------------------ -- Re-exporting the type and basic operations diff --git a/src/Codata/Musical/Covec.agda b/src/Codata/Musical/Covec.agda index 48cc1910e8..88b15c070b 100644 --- a/src/Codata/Musical/Covec.agda +++ b/src/Codata/Musical/Covec.agda @@ -18,7 +18,7 @@ open import Data.Product using (_,_) open import Function.Base using (_∋_) open import Level using (Level) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) private variable diff --git a/src/Codata/Musical/Stream.agda b/src/Codata/Musical/Stream.agda index 9b00ba510f..a51f8f41b5 100644 --- a/src/Codata/Musical/Stream.agda +++ b/src/Codata/Musical/Stream.agda @@ -14,7 +14,7 @@ open import Codata.Musical.Colist using (Colist; []; _∷_) open import Data.Vec.Base using (Vec; []; _∷_) open import Data.Nat.Base using (ℕ; zero; suc) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) private variable diff --git a/src/Codata/Sized/Colist.agda b/src/Codata/Sized/Colist.agda index 4f916fbc68..e57a5b632e 100644 --- a/src/Codata/Sized/Colist.agda +++ b/src/Codata/Sized/Colist.agda @@ -27,7 +27,7 @@ open import Codata.Sized.Cowriter as CW using (Cowriter; _∷_) open import Codata.Sized.Delay as Delay using (Delay ; now ; later) open import Codata.Sized.Stream using (Stream ; _∷_) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) private variable diff --git a/src/Codata/Sized/Colist/Bisimilarity.agda b/src/Codata/Sized/Colist/Bisimilarity.agda index 0a9f76306b..9efbcebbca 100644 --- a/src/Codata/Sized/Colist/Bisimilarity.agda +++ b/src/Codata/Sized/Colist/Bisimilarity.agda @@ -16,7 +16,8 @@ open import Data.List.Base using (List; []; _∷_) open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as Eq private variable diff --git a/src/Codata/Sized/Colist/Properties.agda b/src/Codata/Sized/Colist/Properties.agda index dea697b088..de5925e482 100644 --- a/src/Codata/Sized/Colist/Properties.agda +++ b/src/Codata/Sized/Colist/Properties.agda @@ -31,7 +31,7 @@ open import Data.Product as Prod using (_×_; _,_; uncurry) open import Data.These.Base as These using (These; this; that; these) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Function.Base -open import Relation.Binary.PropositionalEquality as Eq using (_≡_; [_]) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) private variable diff --git a/src/Codata/Sized/Covec/Bisimilarity.agda b/src/Codata/Sized/Covec/Bisimilarity.agda index cbe55ecbf7..7610c41946 100644 --- a/src/Codata/Sized/Covec/Bisimilarity.agda +++ b/src/Codata/Sized/Covec/Bisimilarity.agda @@ -14,7 +14,7 @@ open import Codata.Sized.Thunk open import Codata.Sized.Conat hiding (_⊔_) open import Codata.Sized.Covec open import Relation.Binary -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) data Bisim {a b r} {A : Set a} {B : Set b} (R : A → B → Set r) (i : Size) : ∀ m n (xs : Covec A ∞ m) (ys : Covec B ∞ n) → Set (r ⊔ a ⊔ b) where diff --git a/src/Codata/Sized/Covec/Properties.agda b/src/Codata/Sized/Covec/Properties.agda index 139eba6029..08122efe0b 100644 --- a/src/Codata/Sized/Covec/Properties.agda +++ b/src/Codata/Sized/Covec/Properties.agda @@ -14,7 +14,7 @@ open import Codata.Sized.Conat open import Codata.Sized.Covec open import Codata.Sized.Covec.Bisimilarity open import Function.Base using (id; _∘_) -open import Relation.Binary.PropositionalEquality as Eq +open import Relation.Binary.PropositionalEquality.Core as Eq -- Functor laws diff --git a/src/Codata/Sized/Cowriter/Bisimilarity.agda b/src/Codata/Sized/Cowriter/Bisimilarity.agda index 846101b538..84ab0375c4 100644 --- a/src/Codata/Sized/Cowriter/Bisimilarity.agda +++ b/src/Codata/Sized/Cowriter/Bisimilarity.agda @@ -13,7 +13,8 @@ open import Size open import Codata.Sized.Thunk open import Codata.Sized.Cowriter open import Relation.Binary -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as Eq private variable diff --git a/src/Codata/Sized/Delay/Bisimilarity.agda b/src/Codata/Sized/Delay/Bisimilarity.agda index 1143f15263..4d9f702acc 100644 --- a/src/Codata/Sized/Delay/Bisimilarity.agda +++ b/src/Codata/Sized/Delay/Bisimilarity.agda @@ -13,7 +13,7 @@ open import Codata.Sized.Thunk open import Codata.Sized.Delay open import Level open import Relation.Binary -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) data Bisim {a b r} {A : Set a} {B : Set b} (R : A → B → Set r) i : (xs : Delay A ∞) (ys : Delay B ∞) → Set (a ⊔ b ⊔ r) where diff --git a/src/Codata/Sized/Delay/Properties.agda b/src/Codata/Sized/Delay/Properties.agda index 5db7bafe7f..e491178c71 100644 --- a/src/Codata/Sized/Delay/Properties.agda +++ b/src/Codata/Sized/Delay/Properties.agda @@ -17,7 +17,7 @@ open import Codata.Sized.Conat.Bisimilarity as Coℕ using (zero ; suc) open import Codata.Sized.Delay open import Codata.Sized.Delay.Bisimilarity open import Function.Base using (id; _∘′_) -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) module _ {a} {A : Set a} where diff --git a/src/Codata/Sized/M/Bisimilarity.agda b/src/Codata/Sized/M/Bisimilarity.agda index 1b8cbd3188..3a60a91d16 100644 --- a/src/Codata/Sized/M/Bisimilarity.agda +++ b/src/Codata/Sized/M/Bisimilarity.agda @@ -17,7 +17,7 @@ open import Data.Container.Relation.Binary.Pointwise using (Pointwise; _,_) open import Data.Product using (_,_) open import Function.Base using (_∋_) open import Relation.Binary -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P data Bisim {s p} (C : Container s p) (i : Size) : Rel (M C ∞) (s ⊔ p) where inf : ∀ {t u} → Pointwise C (Thunk^R (Bisim C) i) t u → Bisim C i (inf t) (inf u) diff --git a/src/Codata/Sized/M/Properties.agda b/src/Codata/Sized/M/Properties.agda index 3b26955e60..4161f4d1f1 100644 --- a/src/Codata/Sized/M/Properties.agda +++ b/src/Codata/Sized/M/Properties.agda @@ -18,7 +18,8 @@ import Data.Container.Morphism as Mp open import Data.Product as Prod using (_,_) open import Data.Product.Properties hiding (map-cong) open import Function.Base using (_$′_; _∘′_) -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P +import Relation.Binary.PropositionalEquality.Properties as P open import Data.Container.Relation.Binary.Pointwise using (_,_) import Data.Container.Relation.Binary.Equality.Setoid as EqSetoid diff --git a/src/Codata/Sized/Stream/Bisimilarity.agda b/src/Codata/Sized/Stream/Bisimilarity.agda index 737e73c306..74419c7809 100644 --- a/src/Codata/Sized/Stream/Bisimilarity.agda +++ b/src/Codata/Sized/Stream/Bisimilarity.agda @@ -15,7 +15,8 @@ open import Level open import Data.List.NonEmpty as List⁺ using (_∷_) open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as Eq using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as Eq private variable diff --git a/src/Codata/Sized/Stream/Properties.agda b/src/Codata/Sized/Stream/Properties.agda index 539a6b7b20..51b0719c7d 100644 --- a/src/Codata/Sized/Stream/Properties.agda +++ b/src/Codata/Sized/Stream/Properties.agda @@ -24,7 +24,7 @@ open import Data.Product as Prod using (_,_) open import Data.Vec.Base as Vec using (_∷_) open import Function.Base using (id; _$_; _∘′_; const) -open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; _≢_) private variable diff --git a/src/Data/AVL/Indexed/WithK.agda b/src/Data/AVL/Indexed/WithK.agda index 4a5de070f0..15da148fa2 100644 --- a/src/Data/AVL/Indexed/WithK.agda +++ b/src/Data/AVL/Indexed/WithK.agda @@ -7,7 +7,7 @@ {-# OPTIONS --with-K --safe #-} open import Relation.Binary -open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; subst) module Data.AVL.Indexed.WithK {k r} (Key : Set k) {_<_ : Rel Key r} diff --git a/src/Data/AVL/IndexedMap.agda b/src/Data/AVL/IndexedMap.agda index 64a0d5c36a..25bccdee5f 100644 --- a/src/Data/AVL/IndexedMap.agda +++ b/src/Data/AVL/IndexedMap.agda @@ -8,7 +8,7 @@ open import Data.Product as Prod open import Relation.Binary -open import Relation.Binary.PropositionalEquality using (_≡_; cong; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong; subst) import Data.Tree.AVL.Value module Data.AVL.IndexedMap diff --git a/src/Data/Bool.agda b/src/Data/Bool.agda index 909b659f22..5fdbcc45e0 100644 --- a/src/Data/Bool.agda +++ b/src/Data/Bool.agda @@ -10,8 +10,7 @@ module Data.Bool where open import Relation.Nullary open import Relation.Binary -open import Relation.Binary.PropositionalEquality as PropEq - using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) ------------------------------------------------------------------------ -- The boolean type and some operations diff --git a/src/Data/Bool/Properties.agda b/src/Data/Bool/Properties.agda index ef963f6511..56448d8e2b 100644 --- a/src/Data/Bool/Properties.agda +++ b/src/Data/Bool/Properties.agda @@ -22,7 +22,8 @@ open import Function.Equivalence open import Induction.WellFounded using (WellFounded; Acc; acc) open import Level using (Level; 0ℓ) open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality hiding ([_]) +open import Relation.Binary.PropositionalEquality.Core +open import Relation.Binary.PropositionalEquality.Properties open import Relation.Nullary.Reflects using (ofʸ; ofⁿ) open import Relation.Nullary.Decidable.Core using (True; does; proof; yes; no) import Relation.Unary as U diff --git a/src/Data/Char/Properties.agda b/src/Data/Char/Properties.agda index 1db34c4f0b..2bbf63ab17 100644 --- a/src/Data/Char/Properties.agda +++ b/src/Data/Char/Properties.agda @@ -22,8 +22,9 @@ import Relation.Binary.Construct.On as On import Relation.Binary.Construct.Subst.Equality as Subst import Relation.Binary.Construct.Closure.Reflexive as Refl import Relation.Binary.Construct.Closure.Reflexive.Properties as Reflₚ -open import Relation.Binary.PropositionalEquality as PropEq +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; _≢_; refl; cong; sym; trans; subst) +import Relation.Binary.PropositionalEquality.Properties as PropEq ------------------------------------------------------------------------ -- Primitive properties diff --git a/src/Data/Container/Indexed/WithK.agda b/src/Data/Container/Indexed/WithK.agda index 565b14fcdd..ca5f18205d 100644 --- a/src/Data/Container/Indexed/WithK.agda +++ b/src/Data/Container/Indexed/WithK.agda @@ -19,7 +19,7 @@ open import Data.Product as Prod hiding (map) open import Function.Base renaming (id to ⟨id⟩; _∘_ to _⟨∘⟩_) open import Level open import Relation.Unary using (Pred; _⊆_) -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) open import Relation.Binary.HeterogeneousEquality as H using (_≅_; refl) open import Relation.Binary.Indexed.Heterogeneous diff --git a/src/Data/Container/Relation/Binary/Pointwise.agda b/src/Data/Container/Relation/Binary/Pointwise.agda index 8a022a072c..2b0b966b3d 100644 --- a/src/Data/Container/Relation/Binary/Pointwise.agda +++ b/src/Data/Container/Relation/Binary/Pointwise.agda @@ -12,7 +12,7 @@ open import Data.Product using (_,_; Σ-syntax; -,_; proj₁; proj₂) open import Function open import Level using (_⊔_) open import Relation.Binary using (REL; _⇒_) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; subst; cong) open import Data.Container.Core using (Container; ⟦_⟧) diff --git a/src/Data/Container/Relation/Binary/Pointwise/Properties.agda b/src/Data/Container/Relation/Binary/Pointwise/Properties.agda index 24e48a74a3..3092037901 100644 --- a/src/Data/Container/Relation/Binary/Pointwise/Properties.agda +++ b/src/Data/Container/Relation/Binary/Pointwise/Properties.agda @@ -14,7 +14,7 @@ open import Data.Container.Relation.Binary.Pointwise open import Data.Product using (_,_; Σ-syntax; -,_) open import Level using (_⊔_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; subst; cong) module _ {s p x r} {X : Set x} (C : Container s p) (R : Rel X r) where diff --git a/src/Data/Digit.agda b/src/Data/Digit.agda index 7e7c1c7555..60557b142a 100644 --- a/src/Data/Digit.agda +++ b/src/Data/Digit.agda @@ -21,7 +21,7 @@ open import Data.Nat.DivMod open import Data.Nat.Induction open import Relation.Nullary.Decidable using (True; does; toWitness) open import Relation.Binary.Definitions using (Decidable) -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) open import Function.Base using (_$_) ------------------------------------------------------------------------ diff --git a/src/Data/Digit/Properties.agda b/src/Data/Digit/Properties.agda index 355467ec39..37ead69a28 100644 --- a/src/Data/Digit/Properties.agda +++ b/src/Data/Digit/Properties.agda @@ -16,7 +16,7 @@ open import Data.Vec.Relation.Unary.Unique.Propositional using (Unique) import Data.Vec.Relation.Unary.Unique.Propositional.Properties as Uniqueₚ open import Data.Vec.Relation.Unary.AllPairs using (allPairs?) open import Relation.Nullary.Decidable using (True; from-yes; ¬?) -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Function.Base using (_∘_) module Data.Digit.Properties where diff --git a/src/Data/Fin/Substitution/Example.agda b/src/Data/Fin/Substitution/Example.agda index f4b42438e5..8b3c903a7c 100644 --- a/src/Data/Fin/Substitution/Example.agda +++ b/src/Data/Fin/Substitution/Example.agda @@ -14,7 +14,7 @@ open import Data.Fin.Substitution.Lemmas open import Data.Nat.Base hiding (_/_) open import Data.Fin.Base using (Fin) open import Data.Vec.Base -open import Relation.Binary.PropositionalEquality as PropEq +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; refl; sym; cong; cong₂) open PropEq.≡-Reasoning open import Relation.Binary.Construct.Closure.ReflexiveTransitive diff --git a/src/Data/Fin/Substitution/Lemmas.agda b/src/Data/Fin/Substitution/Lemmas.agda index 3747f21018..6109f28726 100644 --- a/src/Data/Fin/Substitution/Lemmas.agda +++ b/src/Data/Fin/Substitution/Lemmas.agda @@ -15,7 +15,7 @@ open import Data.Fin.Base using (Fin; zero; suc; lift) open import Data.Vec.Base import Data.Vec.Properties as VecProp open import Function.Base as Fun using (_∘_; _$_; flip) -open import Relation.Binary.PropositionalEquality as PropEq +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; refl; sym; cong; cong₂) open import Relation.Binary.Construct.Closure.ReflexiveTransitive using (Star; ε; _◅_; _▻_) diff --git a/src/Data/Graph/Acyclic.agda b/src/Data/Graph/Acyclic.agda index 440424206a..d7b298f0ef 100644 --- a/src/Data/Graph/Acyclic.agda +++ b/src/Data/Graph/Acyclic.agda @@ -28,7 +28,7 @@ open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.List.Base as List using (List; []; _∷_) open import Function open import Relation.Nullary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) ------------------------------------------------------------------------ -- A lemma diff --git a/src/Data/Integer/Coprimality.agda b/src/Data/Integer/Coprimality.agda index 35df9a1457..c3cfafcbff 100644 --- a/src/Data/Integer/Coprimality.agda +++ b/src/Data/Integer/Coprimality.agda @@ -16,7 +16,7 @@ import Data.Nat.Divisibility as ℕ open import Function.Base using (_on_) open import Level using (0ℓ) open import Relation.Binary using (Rel; Decidable; Symmetric) -open import Relation.Binary.PropositionalEquality using (subst) +open import Relation.Binary.PropositionalEquality.Core using (subst) ------------------------------------------------------------------------ -- Definition diff --git a/src/Data/List/Countdown.agda b/src/Data/List/Countdown.agda index fde7439ebf..f1ef43ba8e 100644 --- a/src/Data/List/Countdown.agda +++ b/src/Data/List/Countdown.agda @@ -29,9 +29,10 @@ open import Data.Sum.Properties open import Relation.Nullary.Reflects using (invert) open import Relation.Nullary open import Relation.Nullary.Decidable using (dec-true; dec-false) -open import Relation.Binary.PropositionalEquality as PropEq +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; _≢_; refl; cong) open PropEq.≡-Reasoning +import Relation.Binary.PropositionalEquality.Properties as PropEq private open module D = DecSetoid D diff --git a/src/Data/List/Extrema/Core.agda b/src/Data/List/Extrema/Core.agda index aa0b3f8da9..1fb59ae06d 100644 --- a/src/Data/List/Extrema/Core.agda +++ b/src/Data/List/Extrema/Core.agda @@ -18,7 +18,7 @@ import Algebra.Construct.NaturalChoice.Max as Max open import Data.Product using (_×_; _,_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Level using (Level) -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) open import Algebra.Construct.LiftedChoice diff --git a/src/Data/List/Extrema/Nat.agda b/src/Data/List/Extrema/Nat.agda index d1d8f3f4ac..6e2899b8e6 100644 --- a/src/Data/List/Extrema/Nat.agda +++ b/src/Data/List/Extrema/Nat.agda @@ -20,7 +20,7 @@ open import Data.List.Relation.Unary.Any as Any using (Any) open import Data.List.Relation.Unary.All as All using (All) open import Data.Product using (_×_; _,_; uncurry′) open import Level using (Level) -open import Relation.Binary.PropositionalEquality using (_≢_) +open import Relation.Binary.PropositionalEquality.Core using (_≢_) private variable diff --git a/src/Data/List/Fresh/Membership/Setoid/Properties.agda b/src/Data/List/Fresh/Membership/Setoid/Properties.agda index 52be3b0d60..0515b84efe 100644 --- a/src/Data/List/Fresh/Membership/Setoid/Properties.agda +++ b/src/Data/List/Fresh/Membership/Setoid/Properties.agda @@ -21,7 +21,7 @@ open import Function.Base using (id; _∘′_; _$_) open import Relation.Nullary open import Relation.Unary as U using (Pred) import Relation.Binary as B -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P open import Relation.Nary open import Data.List.Fresh diff --git a/src/Data/List/Fresh/Relation/Unary/All/Properties.agda b/src/Data/List/Fresh/Relation/Unary/All/Properties.agda index cbad777b96..f2c47657b5 100644 --- a/src/Data/List/Fresh/Relation/Unary/All/Properties.agda +++ b/src/Data/List/Fresh/Relation/Unary/All/Properties.agda @@ -16,7 +16,7 @@ open import Function.Base using (_∘′_) open import Relation.Nullary open import Relation.Unary as U open import Relation.Binary as B using (Rel) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open import Data.List.Fresh using (List#; []; cons; _∷#_; _#_) open import Data.List.Fresh.Relation.Unary.All diff --git a/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda b/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda index f185a2ef32..09ec3d5333 100644 --- a/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda +++ b/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda @@ -20,7 +20,7 @@ open import Relation.Nullary open import Relation.Unary as U using (Pred) open import Relation.Binary as B using (Rel) open import Relation.Nary -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open import Data.List.Fresh open import Data.List.Fresh.Relation.Unary.All diff --git a/src/Data/List/Membership/DecPropositional.agda b/src/Data/List/Membership/DecPropositional.agda index 4380ff8ca2..a59ce42c67 100644 --- a/src/Data/List/Membership/DecPropositional.agda +++ b/src/Data/List/Membership/DecPropositional.agda @@ -7,7 +7,8 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Relation.Binary using (Decidable) -open import Relation.Binary.PropositionalEquality using (_≡_; decSetoid) +open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Properties using (decSetoid) module Data.List.Membership.DecPropositional {a} {A : Set a} (_≟_ : Decidable (_≡_ {A = A})) where diff --git a/src/Data/List/Membership/Propositional.agda b/src/Data/List/Membership/Propositional.agda index 4a74db3d04..c1ae08761e 100644 --- a/src/Data/List/Membership/Propositional.agda +++ b/src/Data/List/Membership/Propositional.agda @@ -10,7 +10,8 @@ module Data.List.Membership.Propositional {a} {A : Set a} where open import Data.List.Relation.Unary.Any using (Any) -open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; setoid; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; _≢_; subst) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) import Data.List.Membership.Setoid as SetoidMembership diff --git a/src/Data/List/Membership/Propositional/Properties/Core.agda b/src/Data/List/Membership/Propositional/Properties/Core.agda index 55a03f454c..85ad85aab0 100644 --- a/src/Data/List/Membership/Propositional/Properties/Core.agda +++ b/src/Data/List/Membership/Propositional/Properties/Core.agda @@ -20,7 +20,7 @@ open import Data.List.Membership.Propositional open import Data.Product as Prod using (_,_; proj₁; proj₂; uncurry′; ∃; _×_) open import Level using (Level) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) open import Relation.Unary using (Pred; _⊆_) diff --git a/src/Data/List/Membership/Propositional/Properties/WithK.agda b/src/Data/List/Membership/Propositional/Properties/WithK.agda index 5909ec3e72..60a86ee5e3 100644 --- a/src/Data/List/Membership/Propositional/Properties/WithK.agda +++ b/src/Data/List/Membership/Propositional/Properties/WithK.agda @@ -14,7 +14,7 @@ open import Data.List.Relation.Unary.Unique.Propositional open import Data.List.Membership.Propositional import Data.List.Membership.Setoid.Properties as Membershipₛ open import Relation.Unary using (Irrelevant) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Properties as P open import Relation.Binary.PropositionalEquality.WithK ------------------------------------------------------------------------ diff --git a/src/Data/List/Membership/Setoid/Properties.agda b/src/Data/List/Membership/Setoid/Properties.agda index 919bf19ba6..47768eed76 100644 --- a/src/Data/List/Membership/Setoid/Properties.agda +++ b/src/Data/List/Membership/Setoid/Properties.agda @@ -27,7 +27,7 @@ open import Function.Base using (_$_; flip; _∘_; _∘′_; id) open import Function.Inverse using (_↔_) open import Level using (Level) open import Relation.Binary as B hiding (Decidable) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Unary as U using (Decidable; Pred) open import Relation.Nullary using (¬_; does; _because_; yes; no) open import Relation.Nullary.Reflects using (invert) diff --git a/src/Data/List/NonEmpty.agda b/src/Data/List/NonEmpty.agda index 9e9f189fb5..5ce7ff4be2 100644 --- a/src/Data/List/NonEmpty.agda +++ b/src/Data/List/NonEmpty.agda @@ -9,21 +9,7 @@ module Data.List.NonEmpty where open import Level using (Level) -open import Effect.Monad -open import Data.Bool.Base using (Bool; false; true; not; T) -open import Data.Bool.Properties -open import Data.List.Base as List using (List; []; _∷_) -open import Data.Maybe.Base using (Maybe ; nothing; just) -open import Data.Nat.Base as ℕ -open import Data.Product as Prod using (∃; _×_; proj₁; proj₂; _,_; -,_) -open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) -open import Data.These.Base as These using (These; this; that; these) -open import Data.Unit.Base using (tt) -open import Data.Vec.Base as Vec using (Vec; []; _∷_) -open import Function.Base -open import Function.Bundles using () renaming (module Equivalence to Eq) -open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_; refl) -open import Relation.Nullary.Decidable using (isYes) +open import Data.List.Base as List using (List) ------------------------------------------------------------------------ -- Re-export basic type and operations diff --git a/src/Data/List/Relation/Binary/Disjoint/Propositional.agda b/src/Data/List/Relation/Binary/Disjoint/Propositional.agda index ecae6c7610..6b78c64c85 100644 --- a/src/Data/List/Relation/Binary/Disjoint/Propositional.agda +++ b/src/Data/List/Relation/Binary/Disjoint/Propositional.agda @@ -11,7 +11,7 @@ open import Relation.Binary module Data.List.Relation.Binary.Disjoint.Propositional {a} {A : Set a} where -open import Relation.Binary.PropositionalEquality using (setoid) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) open import Data.List.Relation.Binary.Disjoint.Setoid as DisjointUnique ------------------------------------------------------------------------ diff --git a/src/Data/List/Relation/Binary/Equality/Propositional.agda b/src/Data/List/Relation/Binary/Equality/Propositional.agda index f263778211..9ecb2cfd6b 100644 --- a/src/Data/List/Relation/Binary/Equality/Propositional.agda +++ b/src/Data/List/Relation/Binary/Equality/Propositional.agda @@ -16,7 +16,8 @@ module Data.List.Relation.Binary.Equality.Propositional {a} {A : Set a} where open import Data.List.Base import Data.List.Relation.Binary.Equality.Setoid as SetoidEquality -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P ------------------------------------------------------------------------ -- Re-export everything from setoid equality diff --git a/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda index 9366b5a027..f9610d5422 100644 --- a/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda @@ -21,7 +21,7 @@ open import Relation.Nullary.Decidable using (yes; no; does; map′; _⊎-dec_) open import Relation.Nullary.Negation using (¬_; contradiction) open import Relation.Unary as U using (Pred) open import Relation.Binary using (REL; _⇒_; Decidable; Trans; Antisym) -open import Relation.Binary.PropositionalEquality using (_≢_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≢_; refl; cong) open import Data.List.Relation.Binary.Pointwise as Pointwise using (Pointwise) open import Data.List.Relation.Binary.Infix.Heterogeneous diff --git a/src/Data/List/Relation/Binary/Permutation/Propositional.agda b/src/Data/List/Relation/Binary/Permutation/Propositional.agda index 939491ecc4..5d9068755b 100644 --- a/src/Data/List/Relation/Binary/Permutation/Propositional.agda +++ b/src/Data/List/Relation/Binary/Permutation/Propositional.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Binary.Permutation.Propositional open import Data.List.Base using (List; []; _∷_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.Reasoning.Setoid as EqReasoning ------------------------------------------------------------------------ diff --git a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda index f5a87cb067..135d5a778d 100644 --- a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda @@ -28,7 +28,7 @@ open import Function.Inverse as Inv using (inverse) open import Level using (Level) open import Relation.Unary using (Pred) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as ≡ +open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_ ; refl ; cong; cong₂; _≢_) open import Relation.Nullary diff --git a/src/Data/List/Relation/Binary/Permutation/Setoid.agda b/src/Data/List/Relation/Binary/Permutation/Setoid.agda index e98cc6315c..5a147d8008 100644 --- a/src/Data/List/Relation/Binary/Permutation/Setoid.agda +++ b/src/Data/List/Relation/Binary/Permutation/Setoid.agda @@ -17,7 +17,7 @@ import Data.List.Relation.Binary.Pointwise as Pointwise open import Data.List.Relation.Binary.Equality.Setoid S open import Data.Nat.Base using (ℕ; zero; suc; _+_) open import Level using (_⊔_) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.Reasoning.Setoid as SetoidReasoning private diff --git a/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda index 3483323844..24b8bee2cf 100644 --- a/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Setoid/Properties.agda @@ -36,7 +36,7 @@ open import Function.Inverse as Inv using (inverse) open import Level using (Level; _⊔_) open import Relation.Unary using (Pred; Decidable) open import Relation.Binary.Properties.Setoid S using (≉-resp₂) -open import Relation.Binary.PropositionalEquality as ≡ +open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_ ; refl; sym; cong; cong₂; subst; _≢_) open import Relation.Nullary.Decidable using (yes; no; does) open import Relation.Nullary.Negation using (contradiction) diff --git a/src/Data/List/Relation/Binary/Pointwise.agda b/src/Data/List/Relation/Binary/Pointwise.agda index cadfaf0846..0852085a37 100644 --- a/src/Data/List/Relation/Binary/Pointwise.agda +++ b/src/Data/List/Relation/Binary/Pointwise.agda @@ -26,7 +26,8 @@ open import Relation.Nullary hiding (Irrelevant) import Relation.Nullary.Decidable as Dec using (map′) open import Relation.Unary as U using (Pred) open import Relation.Binary renaming (Rel to Rel₂) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P private variable diff --git a/src/Data/List/Relation/Binary/Pointwise/Properties.agda b/src/Data/List/Relation/Binary/Pointwise/Properties.agda index 61470fdc76..207f0fe70d 100644 --- a/src/Data/List/Relation/Binary/Pointwise/Properties.agda +++ b/src/Data/List/Relation/Binary/Pointwise/Properties.agda @@ -13,7 +13,7 @@ open import Data.List.Base using (List; []; _∷_) open import Level open import Relation.Binary.Core using (REL; _⇒_) open import Relation.Binary.Definitions -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P open import Relation.Nullary using (yes; no; _×-dec_) import Relation.Nullary.Decidable as Dec diff --git a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda index eea13df3b6..da5a26e6e0 100644 --- a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda @@ -26,7 +26,7 @@ open import Relation.Nullary.Negation using (¬_) open import Relation.Nullary.Decidable as Dec using (_×-dec_; yes; no; _because_) open import Relation.Unary as U using (Pred) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_; _≢_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; _≢_) private variable diff --git a/src/Data/List/Relation/Binary/Sublist/DecPropositional/Solver.agda b/src/Data/List/Relation/Binary/Sublist/DecPropositional/Solver.agda index 6ca8768c43..6385ff0960 100644 --- a/src/Data/List/Relation/Binary/Sublist/DecPropositional/Solver.agda +++ b/src/Data/List/Relation/Binary/Sublist/DecPropositional/Solver.agda @@ -8,12 +8,12 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Relation.Binary using (Decidable) -open import Agda.Builtin.Equality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) module Data.List.Relation.Binary.Sublist.DecPropositional.Solver {a} {A : Set a} (_≟_ : Decidable {A = A} _≡_) where -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Properties as P open import Data.List.Relation.Binary.Sublist.DecSetoid.Solver (P.decSetoid _≟_) public diff --git a/src/Data/List/Relation/Binary/Sublist/Heterogeneous.agda b/src/Data/List/Relation/Binary/Sublist/Heterogeneous.agda index 854a6a1e8f..698dd789b0 100644 --- a/src/Data/List/Relation/Binary/Sublist/Heterogeneous.agda +++ b/src/Data/List/Relation/Binary/Sublist/Heterogeneous.agda @@ -12,7 +12,7 @@ open import Data.List.Base using (List; []; _∷_; [_]) open import Data.List.Relation.Unary.Any using (Any; here; there) open import Level using (_⊔_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Unary using (Pred) module Data.List.Relation.Binary.Sublist.Heterogeneous diff --git a/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Properties.agda index 7d13343130..f11e85258c 100644 --- a/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Sublist/Heterogeneous/Properties.agda @@ -34,7 +34,7 @@ open import Relation.Nullary using (Dec; does; _because_; yes; no; ¬_) open import Relation.Nullary.Decidable as Dec using (¬?) open import Relation.Unary as U using (Pred) open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) ------------------------------------------------------------------------ -- Injectivity of constructors diff --git a/src/Data/List/Relation/Binary/Sublist/Propositional/Disjoint.agda b/src/Data/List/Relation/Binary/Sublist/Propositional/Disjoint.agda index edcf2b565b..a6a33cc43a 100644 --- a/src/Data/List/Relation/Binary/Sublist/Propositional/Disjoint.agda +++ b/src/Data/List/Relation/Binary/Sublist/Propositional/Disjoint.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Binary.Sublist.Propositional.Disjoint open import Data.List.Base using (List) open import Data.List.Relation.Binary.Sublist.Propositional -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) ------------------------------------------------------------------------ -- A Union where the triangles commute is a diff --git a/src/Data/List/Relation/Binary/Sublist/Propositional/Example/UniqueBoundVariables.agda b/src/Data/List/Relation/Binary/Sublist/Propositional/Example/UniqueBoundVariables.agda index b8b8745b68..9a681ff916 100644 --- a/src/Data/List/Relation/Binary/Sublist/Propositional/Example/UniqueBoundVariables.agda +++ b/src/Data/List/Relation/Binary/Sublist/Propositional/Example/UniqueBoundVariables.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Binary.Sublist.Propositional.Example.UniqueBoundVariables (Base : Set) where -open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong; subst; module ≡-Reasoning) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; sym; cong; subst; module ≡-Reasoning) open ≡-Reasoning open import Data.List.Base using (List; []; _∷_; [_]) diff --git a/src/Data/List/Relation/Binary/Sublist/Setoid.agda b/src/Data/List/Relation/Binary/Sublist/Setoid.agda index 7a7b62c673..8915308cf2 100644 --- a/src/Data/List/Relation/Binary/Sublist/Setoid.agda +++ b/src/Data/List/Relation/Binary/Sublist/Setoid.agda @@ -26,7 +26,7 @@ import Data.List.Relation.Binary.Sublist.Heterogeneous.Properties open import Data.Product using (∃; ∃₂; _×_; _,_; proj₂) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary using (¬_; Dec; yes; no) open Setoid S renaming (Carrier to A) diff --git a/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda b/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda index 5600339c7b..b9c3d21968 100644 --- a/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda +++ b/src/Data/List/Relation/Binary/Sublist/Setoid/Properties.agda @@ -21,7 +21,7 @@ open import Function.Base open import Function.Bundles using (_⇔_; _⤖_) open import Level open import Relation.Binary using () renaming (Decidable to Decidable₂) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open import Relation.Binary.Structures using (IsDecTotalOrder) open import Relation.Unary using (Pred; Decidable; Irrelevant) open import Relation.Nullary.Negation using (¬_) diff --git a/src/Data/List/Relation/Binary/Subset/Propositional.agda b/src/Data/List/Relation/Binary/Subset/Propositional.agda index d97fc73114..c6ecf5e5fa 100644 --- a/src/Data/List/Relation/Binary/Subset/Propositional.agda +++ b/src/Data/List/Relation/Binary/Subset/Propositional.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Binary.Subset.Propositional {a} {A : Set a} where import Data.List.Relation.Binary.Subset.Setoid as SetoidSubset -open import Relation.Binary.PropositionalEquality using (setoid) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) ------------------------------------------------------------------------ -- Re-export parameterised definitions from setoid sublists diff --git a/src/Data/List/Relation/Binary/Suffix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Suffix/Heterogeneous/Properties.agda index 736389bb75..05b7725d31 100644 --- a/src/Data/List/Relation/Binary/Suffix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Suffix/Heterogeneous/Properties.agda @@ -26,7 +26,7 @@ open import Relation.Unary as U using (Pred) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary as B using (REL; Rel; Trans; Antisym; Irrelevant; _⇒_) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; _≢_; refl; sym; subst; subst₂) import Data.List.Properties as Listₚ diff --git a/src/Data/List/Relation/Ternary/Appending.agda b/src/Data/List/Relation/Ternary/Appending.agda index 75e50d15af..0d1f935414 100644 --- a/src/Data/List/Relation/Ternary/Appending.agda +++ b/src/Data/List/Relation/Ternary/Appending.agda @@ -13,7 +13,7 @@ open import Data.List.Base as List using (List; []; _∷_) open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) open import Data.Product as Prod using (∃₂; _×_; _,_; -,_) open import Relation.Binary using (REL) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) private variable diff --git a/src/Data/List/Relation/Ternary/Appending/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Properties.agda index 11db3cf16e..4508a7f719 100644 --- a/src/Data/List/Relation/Ternary/Appending/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Properties.agda @@ -13,7 +13,7 @@ open import Data.List.Relation.Ternary.Appending open import Data.List.Relation.Binary.Pointwise as Pw using (Pointwise; []; _∷_) open import Level using (Level) open import Relation.Binary using (REL; Rel; Trans) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) private variable diff --git a/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda index e4ecefddae..757d888012 100644 --- a/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda @@ -14,7 +14,8 @@ import Data.List.Relation.Binary.Pointwise as Pw open import Data.List.Relation.Binary.Equality.Propositional using (_≋_) open import Data.List.Relation.Ternary.Appending.Propositional {A = A} open import Function.Base using (_∘′_) -open import Relation.Binary.PropositionalEquality as Eq using (_≡_; setoid) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) import Data.List.Relation.Ternary.Appending.Setoid.Properties (setoid A) as Appendingₚ diff --git a/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda index 60e3e2f4ad..0530b8b965 100644 --- a/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda @@ -15,7 +15,7 @@ import Data.List.Properties as Listₚ open import Data.List.Relation.Binary.Pointwise using (Pointwise; []) import Data.List.Relation.Ternary.Appending.Properties as Appendingₚ open import Data.Product using (_,_) -open import Relation.Binary.PropositionalEquality using (refl) +open import Relation.Binary.PropositionalEquality.Core using (refl) open import Data.List.Relation.Ternary.Appending.Setoid S module S = Setoid S; open S renaming (Carrier to A) using (_≈_) diff --git a/src/Data/List/Relation/Ternary/Interleaving.agda b/src/Data/List/Relation/Ternary/Interleaving.agda index cfc84e52c4..62206daf2c 100644 --- a/src/Data/List/Relation/Ternary/Interleaving.agda +++ b/src/Data/List/Relation/Ternary/Interleaving.agda @@ -16,7 +16,7 @@ open import Data.Product as Prod using (∃; ∃₂; _×_; uncurry; _,_; -,_; pr open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function.Base open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) ------------------------------------------------------------------------ -- Definition diff --git a/src/Data/List/Relation/Ternary/Interleaving/Propositional.agda b/src/Data/List/Relation/Ternary/Interleaving/Propositional.agda index c1ac5c9adf..55515cd447 100644 --- a/src/Data/List/Relation/Ternary/Interleaving/Propositional.agda +++ b/src/Data/List/Relation/Ternary/Interleaving/Propositional.agda @@ -12,7 +12,8 @@ open import Data.List.Base as List using (List; []; _∷_; _++_) open import Data.List.Relation.Binary.Permutation.Propositional as Perm using (_↭_) open import Data.List.Relation.Binary.Permutation.Propositional.Properties using (shift) import Data.List.Relation.Ternary.Interleaving.Setoid as General -open import Relation.Binary.PropositionalEquality using (setoid; refl) +open import Relation.Binary.PropositionalEquality.Core using (refl) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) open Perm.PermutationReasoning ------------------------------------------------------------------------ diff --git a/src/Data/List/Relation/Ternary/Interleaving/Propositional/Properties.agda b/src/Data/List/Relation/Ternary/Interleaving/Propositional/Properties.agda index b8328e48e8..c4253a7253 100644 --- a/src/Data/List/Relation/Ternary/Interleaving/Propositional/Properties.agda +++ b/src/Data/List/Relation/Ternary/Interleaving/Propositional/Properties.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Ternary.Interleaving.Propositional.Properties import Data.List.Relation.Ternary.Interleaving.Setoid.Properties as SetoidProperties -open import Relation.Binary.PropositionalEquality using (setoid) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) ------------------------------------------------------------------------ -- Re-exporting existing properties diff --git a/src/Data/List/Relation/Unary/All.agda b/src/Data/List/Relation/Unary/All.agda index 090af7e6b6..52d2baa819 100644 --- a/src/Data/List/Relation/Unary/All.agda +++ b/src/Data/List/Relation/Unary/All.agda @@ -24,7 +24,8 @@ open import Relation.Nullary hiding (Irrelevant) import Relation.Nullary.Decidable as Dec open import Relation.Unary hiding (_∈_) open import Relation.Binary using (Setoid; _Respects_) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P +import Relation.Binary.PropositionalEquality.Properties as P private variable diff --git a/src/Data/List/Relation/Unary/AllPairs/Properties.agda b/src/Data/List/Relation/Unary/AllPairs/Properties.agda index 009ac3ce75..037279cfe1 100644 --- a/src/Data/List/Relation/Unary/AllPairs/Properties.agda +++ b/src/Data/List/Relation/Unary/AllPairs/Properties.agda @@ -20,7 +20,7 @@ open import Data.Nat.Properties using (≤-refl; m) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) private variable diff --git a/src/Data/Tree/AVL/Indexed/Relation/Unary/All.agda b/src/Data/Tree/AVL/Indexed/Relation/Unary/All.agda index e37c7f9b34..5add64a3cc 100644 --- a/src/Data/Tree/AVL/Indexed/Relation/Unary/All.agda +++ b/src/Data/Tree/AVL/Indexed/Relation/Unary/All.agda @@ -20,7 +20,7 @@ open import Function.Base open import Function.Nary.NonDependent using (congₙ) open import Level using (Level; _⊔_) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Nullary.Decidable using (Dec; yes; map′; _×-dec_) open import Relation.Unary using (Pred; Decidable; Universal; Irrelevant; _⊆_; _∪_) diff --git a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda index 8b5b195d42..f2dec21b8c 100644 --- a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda +++ b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda @@ -22,7 +22,7 @@ open import Function.Base as F open import Level using (Level) open import Relation.Binary using (_Respects_; tri<; tri≈; tri>) -open import Relation.Binary.PropositionalEquality using (_≡_) renaming (refl to ≡-refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) renaming (refl to ≡-refl) open import Relation.Nullary using (¬_; Dec; yes; no) open import Relation.Nullary.Negation using (contradiction) open import Relation.Unary using (Pred; _∩_) diff --git a/src/Data/Tree/AVL/Indexed/WithK.agda b/src/Data/Tree/AVL/Indexed/WithK.agda index 2ef4ec3544..7467a3813f 100644 --- a/src/Data/Tree/AVL/Indexed/WithK.agda +++ b/src/Data/Tree/AVL/Indexed/WithK.agda @@ -7,7 +7,7 @@ {-# OPTIONS --with-K --safe #-} open import Relation.Binary -open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; subst) module Data.Tree.AVL.Indexed.WithK {k r} (Key : Set k) {_<_ : Rel Key r} diff --git a/src/Data/Tree/AVL/IndexedMap.agda b/src/Data/Tree/AVL/IndexedMap.agda index 21413e0478..cb16cd6220 100644 --- a/src/Data/Tree/AVL/IndexedMap.agda +++ b/src/Data/Tree/AVL/IndexedMap.agda @@ -8,7 +8,7 @@ open import Data.Product as Prod open import Relation.Binary -open import Relation.Binary.PropositionalEquality using (_≡_; cong; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong; subst) import Data.Tree.AVL.Value module Data.Tree.AVL.IndexedMap diff --git a/src/Data/Tree/AVL/Key.agda b/src/Data/Tree/AVL/Key.agda index dc7e77824d..9a2b7e8521 100644 --- a/src/Data/Tree/AVL/Key.agda +++ b/src/Data/Tree/AVL/Key.agda @@ -17,7 +17,7 @@ open import Level open import Data.Empty open import Data.Unit open import Data.Product -open import Relation.Binary.PropositionalEquality using (_≡_ ; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_ ; refl) open import Relation.Nullary.Negation using (¬_) open import Relation.Nullary.Construct.Add.Extrema as AddExtremaToSet using (_±) diff --git a/src/Data/Tree/AVL/NonEmpty/Propositional.agda b/src/Data/Tree/AVL/NonEmpty/Propositional.agda index f537b1c673..82ea9125fd 100644 --- a/src/Data/Tree/AVL/NonEmpty/Propositional.agda +++ b/src/Data/Tree/AVL/NonEmpty/Propositional.agda @@ -7,7 +7,7 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Relation.Binary using (Rel; IsStrictTotalOrder; StrictTotalOrder) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; subst) module Data.Tree.AVL.NonEmpty.Propositional {k r} {Key : Set k} {_<_ : Rel Key r} diff --git a/src/Data/Tree/AVL/Sets/Membership.agda b/src/Data/Tree/AVL/Sets/Membership.agda index 947036500c..53e0aea9f9 100644 --- a/src/Data/Tree/AVL/Sets/Membership.agda +++ b/src/Data/Tree/AVL/Sets/Membership.agda @@ -18,7 +18,6 @@ open import Data.Sum.Base as Sum using (_⊎_) open import Data.Unit.Base using (tt) open import Function.Base using (_∘_; _∘′_; const) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) open import Relation.Nullary using (¬_; yes; no; Reflects) open import Relation.Nullary.Reflects using (fromEquivalence) diff --git a/src/Data/Tree/AVL/Sets/Membership/Properties.agda b/src/Data/Tree/AVL/Sets/Membership/Properties.agda index 7c1f27a1d1..75fc1e9242 100644 --- a/src/Data/Tree/AVL/Sets/Membership/Properties.agda +++ b/src/Data/Tree/AVL/Sets/Membership/Properties.agda @@ -18,7 +18,7 @@ open import Data.Sum.Base as Sum using (_⊎_) open import Data.Unit.Base using (tt) open import Function.Base using (_∘_; _∘′_; const) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Nullary using (¬_; yes; no; Reflects) open import Relation.Nullary.Reflects using (fromEquivalence) diff --git a/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda b/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda index 8b29e710f8..603582bf02 100644 --- a/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda +++ b/src/Data/Vec/Functional/Relation/Binary/Equality/Setoid.agda @@ -13,7 +13,7 @@ open import Data.Vec.Functional.Relation.Binary.Pointwise import Data.Vec.Functional.Relation.Binary.Pointwise.Properties as PW open import Level using (Level) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) module Data.Vec.Functional.Relation.Binary.Equality.Setoid {a ℓ} (S : Setoid a ℓ) where diff --git a/src/Data/Vec/Functional/Relation/Binary/Pointwise/Properties.agda b/src/Data/Vec/Functional/Relation/Binary/Pointwise/Properties.agda index c0ae709b0f..0aa81b07a7 100644 --- a/src/Data/Vec/Functional/Relation/Binary/Pointwise/Properties.agda +++ b/src/Data/Vec/Functional/Relation/Binary/Pointwise/Properties.agda @@ -20,7 +20,7 @@ open import Data.Vec.Functional.Relation.Binary.Pointwise open import Function.Base open import Level using (Level) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as ≡ using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) private variable diff --git a/src/Data/Vec/Membership/DecPropositional.agda b/src/Data/Vec/Membership/DecPropositional.agda index 0b20505b4b..e1b100f0af 100644 --- a/src/Data/Vec/Membership/DecPropositional.agda +++ b/src/Data/Vec/Membership/DecPropositional.agda @@ -7,7 +7,8 @@ {-# OPTIONS --cubical-compatible --safe #-} open import Relation.Binary using (Decidable) -open import Relation.Binary.PropositionalEquality using (_≡_; decSetoid) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) +open import Relation.Binary.PropositionalEquality.Properties using (decSetoid) module Data.Vec.Membership.DecPropositional {a} {A : Set a} (_≟_ : Decidable (_≡_ {A = A})) where diff --git a/src/Data/Vec/Membership/Propositional.agda b/src/Data/Vec/Membership/Propositional.agda index d76cedd1d3..21213e679d 100644 --- a/src/Data/Vec/Membership/Propositional.agda +++ b/src/Data/Vec/Membership/Propositional.agda @@ -11,7 +11,8 @@ module Data.Vec.Membership.Propositional {a} {A : Set a} where open import Data.Vec.Base using (Vec) open import Data.Vec.Relation.Unary.Any using (Any) -open import Relation.Binary.PropositionalEquality using (setoid; subst) +open import Relation.Binary.PropositionalEquality.Core using (subst) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) import Data.Vec.Membership.Setoid as SetoidMembership diff --git a/src/Data/Vec/Membership/Propositional/Properties.agda b/src/Data/Vec/Membership/Propositional/Properties.agda index 8efef380d4..983e70ae63 100644 --- a/src/Data/Vec/Membership/Propositional/Properties.agda +++ b/src/Data/Vec/Membership/Propositional/Properties.agda @@ -21,7 +21,7 @@ open import Data.List.Membership.Propositional open import Level using (Level) open import Function.Base using (_∘_; id) open import Relation.Unary using (Pred) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) private variable diff --git a/src/Data/Vec/Properties/WithK.agda b/src/Data/Vec/Properties/WithK.agda index 8d3bd95aee..7ca8cc2c91 100644 --- a/src/Data/Vec/Properties/WithK.agda +++ b/src/Data/Vec/Properties/WithK.agda @@ -12,7 +12,7 @@ module Data.Vec.Properties.WithK where open import Data.Nat.Base open import Data.Nat.Properties using (+-assoc) open import Data.Vec.Base -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) open import Relation.Binary.HeterogeneousEquality as H using (_≅_; refl) ------------------------------------------------------------------------ diff --git a/src/Data/Vec/Recursive/Properties.agda b/src/Data/Vec/Recursive/Properties.agda index 745681a617..d557808cee 100644 --- a/src/Data/Vec/Recursive/Properties.agda +++ b/src/Data/Vec/Recursive/Properties.agda @@ -14,7 +14,7 @@ open import Data.Product open import Data.Vec.Recursive open import Data.Vec.Base using (Vec; _∷_) open import Function.Inverse using (_↔_; inverse) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P open ≡-Reasoning private diff --git a/src/Data/Vec/Relation/Binary/Equality/Setoid.agda b/src/Data/Vec/Relation/Binary/Equality/Setoid.agda index 116b104829..d40bd24998 100644 --- a/src/Data/Vec/Relation/Binary/Equality/Setoid.agda +++ b/src/Data/Vec/Relation/Binary/Equality/Setoid.agda @@ -19,7 +19,6 @@ open import Data.Vec.Relation.Binary.Pointwise.Inductive as PW open import Function.Base open import Level using (_⊔_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) open Setoid S renaming (Carrier to A) diff --git a/src/Data/Vec/Relation/Binary/Lex/Core.agda b/src/Data/Vec/Relation/Binary/Lex/Core.agda index 4ac943401e..a3ff214a06 100644 --- a/src/Data/Vec/Relation/Binary/Lex/Core.agda +++ b/src/Data/Vec/Relation/Binary/Lex/Core.agda @@ -19,7 +19,7 @@ open import Function.Base using (flip) open import Function.Bundles using (_⇔_; mk⇔) open import Level using (Level; _⊔_) open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl; cong) import Relation.Nullary as Nullary open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×-dec_; _⊎-dec_) diff --git a/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda b/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda index 877d345045..d3c24ab42b 100644 --- a/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda +++ b/src/Data/Vec/Relation/Binary/Lex/NonStrict.agda @@ -22,7 +22,6 @@ open import Data.Vec.Relation.Binary.Pointwise.Inductive as Pointwise open import Function.Base using (id) open import Relation.Binary import Relation.Binary.Construct.NonStrictToStrict as Conv -open import Relation.Binary.PropositionalEquality as P using (_≡_) open import Relation.Nullary hiding (Irrelevant) open import Level using (Level; _⊔_) diff --git a/src/Data/Vec/Relation/Binary/Lex/Strict.agda b/src/Data/Vec/Relation/Binary/Lex/Strict.agda index 7e4052476b..a1f11fb1b1 100644 --- a/src/Data/Vec/Relation/Binary/Lex/Strict.agda +++ b/src/Data/Vec/Relation/Binary/Lex/Strict.agda @@ -27,7 +27,7 @@ open import Relation.Nullary using (yes; no; ¬_) open import Relation.Binary open import Relation.Binary.Consequences open import Relation.Binary.Construct.On as On using (wellFounded) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Level using (Level; _⊔_) private diff --git a/src/Data/Vec/Relation/Binary/Pointwise/Extensional.agda b/src/Data/Vec/Relation/Binary/Pointwise/Extensional.agda index ff6fd79833..c7b2b3d7ea 100644 --- a/src/Data/Vec/Relation/Binary/Pointwise/Extensional.agda +++ b/src/Data/Vec/Relation/Binary/Pointwise/Extensional.agda @@ -19,7 +19,7 @@ open import Function.Bundles using (module Equivalence; _⇔_; mk⇔) open import Function.Properties.Equivalence using (⇔-setoid) open import Level using (Level; _⊔_; 0ℓ) open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary.Construct.Closure.Transitive as Plus hiding (equivalent; map) open import Relation.Nullary diff --git a/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda b/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda index e435e2681b..011c2b731b 100644 --- a/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda +++ b/src/Data/Vec/Relation/Binary/Pointwise/Inductive.agda @@ -17,7 +17,7 @@ open import Level using (Level; _⊔_) open import Function.Base using (_∘_) open import Function.Bundles using (_⇔_; mk⇔) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Decidable using (yes; no; _×-dec_; map′) open import Relation.Unary using (Pred) diff --git a/src/Data/Vec/Relation/Unary/All.agda b/src/Data/Vec/Relation/Unary/All.agda index 9ba434368c..2eda26c71e 100644 --- a/src/Data/Vec/Relation/Unary/All.agda +++ b/src/Data/Vec/Relation/Unary/All.agda @@ -20,7 +20,7 @@ open import Level using (Level; _⊔_) open import Relation.Nullary.Decidable as Dec using (_×-dec_; yes; no) open import Relation.Unary hiding (_∈_) open import Relation.Binary using (Setoid; _Respects_) -open import Relation.Binary.PropositionalEquality as P using (subst) +open import Relation.Binary.PropositionalEquality.Core as P using (subst) private variable diff --git a/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda b/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda index 339a884a3b..672c9fa485 100644 --- a/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda +++ b/src/Data/Vec/Relation/Unary/AllPairs/Properties.agda @@ -20,7 +20,7 @@ open import Data.Nat.Base using (zero; suc; _+_) open import Function.Base using (_∘_) open import Level using (Level) open import Relation.Binary using (Rel) -open import Relation.Binary.PropositionalEquality using (_≢_) +open import Relation.Binary.PropositionalEquality.Core using (_≢_) private variable diff --git a/src/Data/Vec/Relation/Unary/Any/Properties.agda b/src/Data/Vec/Relation/Unary/Any/Properties.agda index 5b3eab5fa1..1c9f171d7b 100644 --- a/src/Data/Vec/Relation/Unary/Any/Properties.agda +++ b/src/Data/Vec/Relation/Unary/Any/Properties.agda @@ -29,7 +29,7 @@ open import Level using (Level) open import Relation.Nullary.Negation using (¬_) open import Relation.Unary hiding (_∈_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_; _≗_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) private variable diff --git a/src/Data/Vec/Relation/Unary/Linked/Properties.agda b/src/Data/Vec/Relation/Unary/Linked/Properties.agda index a9604e1e6a..340b6b81a2 100644 --- a/src/Data/Vec/Relation/Unary/Linked/Properties.agda +++ b/src/Data/Vec/Relation/Unary/Linked/Properties.agda @@ -20,7 +20,7 @@ open import Data.Nat.Properties using (<-pred) open import Level using (Level) open import Function.Base using (_∘_; flip; _on_) open import Relation.Binary using (Rel; Transitive; DecSetoid) -open import Relation.Binary.PropositionalEquality using (_≢_) +open import Relation.Binary.PropositionalEquality.Core using (_≢_) open import Relation.Unary using (Pred; Decidable) open import Relation.Nullary.Decidable using (yes; no; does) diff --git a/src/Data/Vec/Relation/Unary/Unique/Propositional.agda b/src/Data/Vec/Relation/Unary/Unique/Propositional.agda index 836f7f5b67..20b042ef17 100644 --- a/src/Data/Vec/Relation/Unary/Unique/Propositional.agda +++ b/src/Data/Vec/Relation/Unary/Unique/Propositional.agda @@ -8,7 +8,7 @@ module Data.Vec.Relation.Unary.Unique.Propositional {a} {A : Set a} where -open import Relation.Binary.PropositionalEquality using (setoid) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) open import Data.Vec.Relation.Unary.Unique.Setoid as SetoidUnique ------------------------------------------------------------------------ diff --git a/src/Data/Vec/Relation/Unary/Unique/Setoid/Properties.agda b/src/Data/Vec/Relation/Unary/Unique/Setoid/Properties.agda index 66371b89b5..4c433c04f6 100644 --- a/src/Data/Vec/Relation/Unary/Unique/Setoid/Properties.agda +++ b/src/Data/Vec/Relation/Unary/Unique/Setoid/Properties.agda @@ -19,7 +19,7 @@ open import Data.Nat.Base using (ℕ; _+_) open import Function.Base using (_∘_; id) open import Level using (Level) open import Relation.Binary using (Rel; Setoid) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Negation using (contradiction; contraposition) private diff --git a/src/Data/W/Sized.agda b/src/Data/W/Sized.agda index c16b21828e..72d742ff4b 100644 --- a/src/Data/W/Sized.agda +++ b/src/Data/W/Sized.agda @@ -15,7 +15,7 @@ open import Data.Product using (_,_; -,_; proj₂) open import Data.Container.Core as Container using (Container; ⟦_⟧; Shape; Position; _⇒_; ⟪_⟫) open import Data.Container.Relation.Unary.All using (□; all) open import Relation.Nullary.Negation using (¬_) -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) private variable diff --git a/src/Effect/Monad/Partiality.agda b/src/Effect/Monad/Partiality.agda index 03f82db8bb..0751cb5b15 100644 --- a/src/Effect/Monad/Partiality.agda +++ b/src/Effect/Monad/Partiality.agda @@ -21,7 +21,8 @@ open import Function.Bundles using (_⇔_; mk⇔) open import Level using (Level; _⊔_) open import Relation.Binary as B hiding (Rel; _⇔_) import Relation.Binary.Properties.Setoid as SetoidProperties -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P open import Relation.Nullary open import Relation.Nullary.Decidable hiding (map) open import Relation.Nullary.Negation diff --git a/src/Effect/Monad/Partiality/All.agda b/src/Effect/Monad/Partiality/All.agda index 9bc5d4bc7e..7e90400a85 100644 --- a/src/Effect/Monad/Partiality/All.agda +++ b/src/Effect/Monad/Partiality/All.agda @@ -14,7 +14,7 @@ open import Codata.Musical.Notation open import Function open import Level open import Relation.Binary using (_Respects_; IsEquivalence) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open Partiality._⊥ open Partiality.Equality using (Rel) diff --git a/src/Function/Construct/Identity.agda b/src/Function/Construct/Identity.agda index 32660bee09..bec0ecd3d6 100644 --- a/src/Function/Construct/Identity.agda +++ b/src/Function/Construct/Identity.agda @@ -15,7 +15,8 @@ import Function.Definitions as Definitions import Function.Structures as Structures open import Level using (Level) open import Relation.Binary as B hiding (_⇔_; IsEquivalence) -open import Relation.Binary.PropositionalEquality using (_≡_; setoid) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) +open import Relation.Binary.PropositionalEquality.Properties using (setoid) private variable diff --git a/src/Function/Endomorphism/Propositional.agda b/src/Function/Endomorphism/Propositional.agda index 8a78f69496..d14128edfe 100644 --- a/src/Function/Endomorphism/Propositional.agda +++ b/src/Function/Endomorphism/Propositional.agda @@ -21,7 +21,8 @@ open import Data.Product using (_,_) open import Function open import Function.Equality using (_⟨$⟩_) open import Relation.Binary using (_Preserves_⟶_) -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P import Function.Endomorphism.Setoid (P.setoid A) as Setoid diff --git a/src/Function/Metric/Nat/Structures.agda b/src/Function/Metric/Nat/Structures.agda index 648e7a4adc..839dc7b974 100644 --- a/src/Function/Metric/Nat/Structures.agda +++ b/src/Function/Metric/Nat/Structures.agda @@ -12,7 +12,7 @@ open import Data.Nat.Base hiding (suc) open import Function.Base using (const) open import Level using (Level; suc) open import Relation.Binary hiding (Symmetric) -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) open import Function.Metric.Nat.Core open import Function.Metric.Nat.Definitions diff --git a/src/Function/Metric/Rational/Structures.agda b/src/Function/Metric/Rational/Structures.agda index 824f90b912..daa2b71a60 100644 --- a/src/Function/Metric/Rational/Structures.agda +++ b/src/Function/Metric/Rational/Structures.agda @@ -10,7 +10,7 @@ open import Data.Rational.Base open import Function.Base using (const) open import Level using (Level; suc) open import Relation.Binary hiding (Symmetric) -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) open import Function.Metric.Rational.Core open import Function.Metric.Rational.Definitions diff --git a/src/Function/Properties/Bijection.agda b/src/Function/Properties/Bijection.agda index e484098774..c8abd7db19 100644 --- a/src/Function/Properties/Bijection.agda +++ b/src/Function/Properties/Bijection.agda @@ -11,7 +11,7 @@ module Function.Properties.Bijection where open import Function.Bundles open import Level using (Level) open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P using (setoid) +import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.Reasoning.Setoid as SetoidReasoning open import Data.Product using (_,_; proj₁; proj₂) open import Function.Base using (_∘_) diff --git a/src/Function/Properties/Equivalence.agda b/src/Function/Properties/Equivalence.agda index ced34d9bd3..066316c01b 100644 --- a/src/Function/Properties/Equivalence.agda +++ b/src/Function/Properties/Equivalence.agda @@ -12,7 +12,7 @@ module Function.Properties.Equivalence where open import Function.Bundles using (Equivalence; _⇔_) open import Level open import Relation.Binary using (Setoid; IsEquivalence) -import Relation.Binary.PropositionalEquality as Eq using (setoid) +import Relation.Binary.PropositionalEquality.Properties as Eq import Function.Construct.Identity as Identity import Function.Construct.Symmetry as Symmetry diff --git a/src/Function/Properties/Inverse.agda b/src/Function/Properties/Inverse.agda index 508a8664be..6ef0b45af0 100644 --- a/src/Function/Properties/Inverse.agda +++ b/src/Function/Properties/Inverse.agda @@ -14,7 +14,8 @@ open import Data.Product.Base using (_,_; proj₁; proj₂) open import Function.Bundles open import Level using (Level) open import Relation.Binary using (Setoid; IsEquivalence) -open import Relation.Binary.PropositionalEquality as P using (setoid) +import Relation.Binary.PropositionalEquality.Core as P +import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.Reasoning.Setoid as SetoidReasoning open import Function.Consequences diff --git a/src/Function/Related.agda b/src/Function/Related.agda index fa114d077c..ca06dceffb 100644 --- a/src/Function/Related.agda +++ b/src/Function/Related.agda @@ -18,7 +18,8 @@ open import Function.Inverse as Inv using (Inverse; _↔_) open import Function.LeftInverse as LeftInv using (LeftInverse) open import Function.Surjection as Surj using (Surjection) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P open import Data.Product using (_,_; proj₁; proj₂; <_,_>) import Function.Related.Propositional as R diff --git a/src/Function/Related/Propositional.agda b/src/Function/Related/Propositional.agda index 0ef8830265..5d62c0718b 100644 --- a/src/Function/Related/Propositional.agda +++ b/src/Function/Related/Propositional.agda @@ -13,7 +13,8 @@ open import Relation.Binary using (Sym; Reflexive; Trans; IsEquivalence; Setoid; IsPreorder; Preorder) open import Function.Bundles open import Function.Base -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) +import Relation.Binary.PropositionalEquality.Properties as P open import Function.Properties.Surjection using (↠⇒↪; ↠⇒⇔) open import Function.Properties.RightInverse using (↪⇒↠) diff --git a/src/Function/Related/TypeIsomorphisms.agda b/src/Function/Related/TypeIsomorphisms.agda index cf151d9d3c..58cf6bab88 100644 --- a/src/Function/Related/TypeIsomorphisms.agda +++ b/src/Function/Related/TypeIsomorphisms.agda @@ -28,7 +28,7 @@ open import Function.Equivalence as Eq using (_⇔_; Equivalence) open import Function.Inverse as Inv using (_↔_; Inverse; inverse) open import Function.Related open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P using (_≡_; _≗_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Reflects using (invert) open import Relation.Nullary using (Dec; ¬_; _because_; ofⁿ) import Relation.Nullary.Indexed as I diff --git a/src/Reflection/AST/Abstraction.agda b/src/Reflection/AST/Abstraction.agda index 9ed64b8835..793c729aec 100644 --- a/src/Reflection/AST/Abstraction.agda +++ b/src/Reflection/AST/Abstraction.agda @@ -8,12 +8,12 @@ module Reflection.AST.Abstraction where -open import Data.Product using (_×_; <_,_>; uncurry) -open import Data.String as String using (String) +open import Data.Product using (_×_; <_,_>; uncurry) +open import Data.String as String using (String) open import Level -open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂) +open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) private variable diff --git a/src/Reflection/AST/Argument.agda b/src/Reflection/AST/Argument.agda index 1b0884b615..0feb2deddd 100644 --- a/src/Reflection/AST/Argument.agda +++ b/src/Reflection/AST/Argument.agda @@ -8,11 +8,11 @@ module Reflection.AST.Argument where -open import Data.List.Base as List using (List; []; _∷_) -open import Data.Product using (_×_; <_,_>; uncurry) -open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂) +open import Data.List.Base as List using (List; []; _∷_) +open import Data.Product using (_×_; <_,_>; uncurry) +open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) open import Level open import Reflection.AST.Argument.Visibility diff --git a/src/Reflection/AST/Argument/Information.agda b/src/Reflection/AST/Argument/Information.agda index fe09976fb9..e0f5be24a5 100644 --- a/src/Reflection/AST/Argument/Information.agda +++ b/src/Reflection/AST/Argument/Information.agda @@ -8,10 +8,10 @@ module Reflection.AST.Argument.Information where -open import Data.Product.Base using (_×_; <_,_>; uncurry) -open import Relation.Nullary.Decidable using (map′; _×-dec_) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂) +open import Data.Product.Base using (_×_; <_,_>; uncurry) +open import Relation.Nullary.Decidable using (map′; _×-dec_) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) open import Reflection.AST.Argument.Modality as Modality using (Modality) open import Reflection.AST.Argument.Visibility as Visibility using (Visibility) diff --git a/src/Reflection/AST/Argument/Modality.agda b/src/Reflection/AST/Argument/Modality.agda index 95f15b2264..02e481af58 100644 --- a/src/Reflection/AST/Argument/Modality.agda +++ b/src/Reflection/AST/Argument/Modality.agda @@ -8,10 +8,10 @@ module Reflection.AST.Argument.Modality where -open import Data.Product.Base using (_×_; <_,_>; uncurry) -open import Relation.Nullary.Decidable using (map′; _×-dec_) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong₂) +open import Data.Product.Base using (_×_; <_,_>; uncurry) +open import Relation.Nullary.Decidable using (map′; _×-dec_) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) open import Reflection.AST.Argument.Relevance as Relevance using (Relevance) open import Reflection.AST.Argument.Quantity as Quantity using (Quantity) diff --git a/src/Reflection/AST/Argument/Quantity.agda b/src/Reflection/AST/Argument/Quantity.agda index 0c53a521c1..5b3b98e092 100644 --- a/src/Reflection/AST/Argument/Quantity.agda +++ b/src/Reflection/AST/Argument/Quantity.agda @@ -8,9 +8,9 @@ module Reflection.AST.Argument.Quantity where -open import Relation.Nullary using (yes; no) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (refl) +open import Relation.Nullary using (yes; no) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (refl) ------------------------------------------------------------------------ -- Re-exporting the builtins publicly diff --git a/src/Reflection/AST/Argument/Relevance.agda b/src/Reflection/AST/Argument/Relevance.agda index 6cdce1d96f..03ba0f4f0a 100644 --- a/src/Reflection/AST/Argument/Relevance.agda +++ b/src/Reflection/AST/Argument/Relevance.agda @@ -8,9 +8,9 @@ module Reflection.AST.Argument.Relevance where -open import Relation.Nullary using (yes; no) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (refl) +open import Relation.Nullary using (yes; no) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (refl) ------------------------------------------------------------------------ -- Re-exporting the builtins publicly diff --git a/src/Reflection/AST/Argument/Visibility.agda b/src/Reflection/AST/Argument/Visibility.agda index 4f94b24fe3..b5e9236043 100644 --- a/src/Reflection/AST/Argument/Visibility.agda +++ b/src/Reflection/AST/Argument/Visibility.agda @@ -8,9 +8,9 @@ module Reflection.AST.Argument.Visibility where -open import Relation.Nullary using (yes; no) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (refl) +open import Relation.Nullary using (yes; no) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (refl) ------------------------------------------------------------------------ -- Re-exporting the builtins publicly diff --git a/src/Reflection/AST/Definition.agda b/src/Reflection/AST/Definition.agda index 5b6dace7cd..7ccabb6f51 100644 --- a/src/Reflection/AST/Definition.agda +++ b/src/Reflection/AST/Definition.agda @@ -8,12 +8,12 @@ module Reflection.AST.Definition where -import Data.List.Properties as Listₚ using (≡-dec) -import Data.Nat.Properties as ℕₚ using (_≟_) -open import Data.Product using (_×_; <_,_>; uncurry) -open import Relation.Nullary.Decidable using (map′; _×-dec_; yes; no) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; cong₂) +import Data.List.Properties as Listₚ using (≡-dec) +import Data.Nat.Properties as ℕₚ using (_≟_) +open import Data.Product using (_×_; <_,_>; uncurry) +open import Relation.Nullary.Decidable using (map′; _×-dec_; yes; no) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong; cong₂) import Reflection.AST.Argument as Arg import Reflection.AST.Name as Name diff --git a/src/Reflection/AST/Literal.agda b/src/Reflection/AST/Literal.agda index 33ceed9ca5..ff8835236a 100644 --- a/src/Reflection/AST/Literal.agda +++ b/src/Reflection/AST/Literal.agda @@ -16,10 +16,10 @@ import Data.String as String using (_≟_) import Data.Word as Word using (_≟_) import Reflection.AST.Meta as Meta import Reflection.AST.Name as Name -open import Relation.Nullary using (yes; no) -open import Relation.Nullary.Decidable using (map′; isYes) -open import Relation.Binary using (DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Nullary using (yes; no) +open import Relation.Nullary.Decidable using (map′; isYes) +open import Relation.Binary using (DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) ------------------------------------------------------------------------ -- Re-exporting the builtin type and constructors diff --git a/src/Reflection/AST/Meta.agda b/src/Reflection/AST/Meta.agda index 93584f573c..56bda50d31 100644 --- a/src/Reflection/AST/Meta.agda +++ b/src/Reflection/AST/Meta.agda @@ -8,12 +8,12 @@ module Reflection.AST.Meta where -import Data.Nat.Properties as ℕₚ using (_≟_) -open import Function.Base using (_on_) -open import Relation.Nullary.Decidable using (map′) -open import Relation.Binary using (Rel; Decidable; DecidableEquality) +import Data.Nat.Properties as ℕₚ using (_≟_) +open import Function.Base using (_on_) +open import Relation.Nullary.Decidable using (map′) +open import Relation.Binary using (Rel; Decidable; DecidableEquality) import Relation.Binary.Construct.On as On -open import Relation.Binary.PropositionalEquality using (_≡_; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong) open import Agda.Builtin.Reflection public using (Meta) renaming (primMetaToNat to toℕ; primMetaEquality to _≡ᵇ_) diff --git a/src/Reflection/AST/Name.agda b/src/Reflection/AST/Name.agda index 1baa63029f..a46940e0a5 100644 --- a/src/Reflection/AST/Name.agda +++ b/src/Reflection/AST/Name.agda @@ -8,14 +8,14 @@ module Reflection.AST.Name where -open import Data.List.Base using (List) -import Data.Product.Properties as Prodₚ using (≡-dec) -import Data.Word.Properties as Wₚ using (_≟_) -open import Function.Base using (_on_) -open import Relation.Nullary.Decidable using (map′) -open import Relation.Binary using (Rel; Decidable; DecidableEquality) -open import Relation.Binary.Construct.On using (decidable) -open import Relation.Binary.PropositionalEquality using (_≡_; cong) +open import Data.List.Base using (List) +import Data.Product.Properties as Prodₚ using (≡-dec) +import Data.Word.Properties as Wₚ using (_≟_) +open import Function.Base using (_on_) +open import Relation.Nullary.Decidable using (map′) +open import Relation.Binary using (Rel; Decidable; DecidableEquality) +open import Relation.Binary.Construct.On using (decidable) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong) ---------------------------------------------------------------------- -- Re-export built-ins diff --git a/src/Reflection/AST/Term.agda b/src/Reflection/AST/Term.agda index 183f839015..cfa7e70cb1 100644 --- a/src/Reflection/AST/Term.agda +++ b/src/Reflection/AST/Term.agda @@ -15,9 +15,9 @@ open import Data.Product using (_×_; _,_; <_,_>; uncurry; map₁) open import Data.Product.Properties using (,-injective) open import Data.Maybe.Base using (Maybe; just; nothing) open import Data.String as String using (String) -open import Relation.Nullary.Decidable using (map′; _×-dec_; yes; no) -open import Relation.Binary using (Decidable; DecidableEquality) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong; cong₂) +open import Relation.Nullary.Decidable using (map′; _×-dec_; yes; no) +open import Relation.Binary using (Decidable; DecidableEquality) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong; cong₂) open import Reflection.AST.Abstraction open import Reflection.AST.Argument diff --git a/src/Relation/Binary/Construct/Add/Extrema/NonStrict.agda b/src/Relation/Binary/Construct/Add/Extrema/NonStrict.agda index 93a04ce62a..e160bb3b85 100644 --- a/src/Relation/Binary/Construct/Add/Extrema/NonStrict.agda +++ b/src/Relation/Binary/Construct/Add/Extrema/NonStrict.agda @@ -17,7 +17,7 @@ module Relation.Binary.Construct.Add.Extrema.NonStrict open import Function.Base open import Relation.Nullary.Construct.Add.Extrema import Relation.Nullary.Construct.Add.Infimum as I -open import Relation.Binary.PropositionalEquality using (_≡_) +open import Relation.Binary.PropositionalEquality.Core using (_≡_) import Relation.Binary.Construct.Add.Infimum.NonStrict as AddInfimum import Relation.Binary.Construct.Add.Supremum.NonStrict as AddSupremum import Relation.Binary.Construct.Add.Extrema.Equality as Equality diff --git a/src/Relation/Binary/Construct/Add/Infimum/NonStrict.agda b/src/Relation/Binary/Construct/Add/Infimum/NonStrict.agda index c6c313c98c..b6cd5e4bf6 100644 --- a/src/Relation/Binary/Construct/Add/Infimum/NonStrict.agda +++ b/src/Relation/Binary/Construct/Add/Infimum/NonStrict.agda @@ -16,8 +16,9 @@ module Relation.Binary.Construct.Add.Infimum.NonStrict open import Level using (_⊔_) open import Data.Sum.Base as Sum -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.Construct.Add.Infimum.Equality as Equality open import Relation.Nullary hiding (Irrelevant) open import Relation.Nullary.Construct.Add.Infimum diff --git a/src/Relation/Binary/Construct/Add/Infimum/Strict.agda b/src/Relation/Binary/Construct/Add/Infimum/Strict.agda index 45463af482..80a0727fc1 100644 --- a/src/Relation/Binary/Construct/Add/Infimum/Strict.agda +++ b/src/Relation/Binary/Construct/Add/Infimum/Strict.agda @@ -17,8 +17,9 @@ module Relation.Binary.Construct.Add.Infimum.Strict open import Level using (_⊔_) open import Data.Product open import Function.Base -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.Construct.Add.Infimum.Equality as Equality import Relation.Binary.Construct.Add.Infimum.NonStrict as NonStrict open import Relation.Nullary hiding (Irrelevant) diff --git a/src/Relation/Binary/Construct/Add/Point/Equality.agda b/src/Relation/Binary/Construct/Add/Point/Equality.agda index a0b01a3d2b..1715d6f2d1 100644 --- a/src/Relation/Binary/Construct/Add/Point/Equality.agda +++ b/src/Relation/Binary/Construct/Add/Point/Equality.agda @@ -16,7 +16,7 @@ module Relation.Binary.Construct.Add.Point.Equality open import Level using (_⊔_) open import Function.Base -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P open import Relation.Nullary hiding (Irrelevant) open import Relation.Nullary.Construct.Add.Point import Relation.Nullary.Decidable as Dec diff --git a/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda b/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda index be30c7973c..a509871377 100644 --- a/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda +++ b/src/Relation/Binary/Construct/Add/Supremum/NonStrict.agda @@ -18,8 +18,9 @@ open import Level using (_⊔_) open import Data.Sum.Base as Sum open import Relation.Nullary hiding (Irrelevant) import Relation.Nullary.Decidable as Dec -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P open import Relation.Nullary.Construct.Add.Supremum import Relation.Binary.Construct.Add.Supremum.Equality as Equality diff --git a/src/Relation/Binary/Construct/Add/Supremum/Strict.agda b/src/Relation/Binary/Construct/Add/Supremum/Strict.agda index 46415e6895..0bbefc05fa 100644 --- a/src/Relation/Binary/Construct/Add/Supremum/Strict.agda +++ b/src/Relation/Binary/Construct/Add/Supremum/Strict.agda @@ -19,8 +19,9 @@ open import Data.Product open import Function.Base open import Relation.Nullary hiding (Irrelevant) import Relation.Nullary.Decidable as Dec -open import Relation.Binary.PropositionalEquality as P +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P open import Relation.Nullary.Construct.Add.Supremum import Relation.Binary.Construct.Add.Supremum.Equality as Equality import Relation.Binary.Construct.Add.Supremum.NonStrict as NonStrict diff --git a/src/Relation/Binary/Construct/Closure/Reflexive/Properties.agda b/src/Relation/Binary/Construct/Closure/Reflexive/Properties.agda index 9bac46632e..d9bf470f5c 100644 --- a/src/Relation/Binary/Construct/Closure/Reflexive/Properties.agda +++ b/src/Relation/Binary/Construct/Closure/Reflexive/Properties.agda @@ -15,7 +15,8 @@ open import Function.Base using (id) open import Level open import Relation.Binary hiding (_⇔_) open import Relation.Binary.Construct.Closure.Reflexive -open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as PropEq open import Relation.Nullary import Relation.Nullary.Decidable as Dec open import Relation.Unary using (Pred) diff --git a/src/Relation/Binary/Construct/Closure/Reflexive/Properties/WithK.agda b/src/Relation/Binary/Construct/Closure/Reflexive/Properties/WithK.agda index 2ae6422870..26d04320b0 100644 --- a/src/Relation/Binary/Construct/Closure/Reflexive/Properties/WithK.agda +++ b/src/Relation/Binary/Construct/Closure/Reflexive/Properties/WithK.agda @@ -10,7 +10,7 @@ module Relation.Binary.Construct.Closure.Reflexive.Properties.WithK where open import Relation.Binary open import Relation.Binary.Construct.Closure.Reflexive -open import Relation.Binary.PropositionalEquality as PropEq using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary.Construct.Closure.Reflexive.Properties public diff --git a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda index 88e284c2bf..64c81b7151 100644 --- a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda +++ b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda @@ -11,8 +11,9 @@ module Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties where open import Function open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive -open import Relation.Binary.PropositionalEquality as PropEq +open import Relation.Binary.PropositionalEquality.Core as PropEq using (_≡_; refl; sym; cong; cong₂) +import Relation.Binary.PropositionalEquality.Properties as PropEq import Relation.Binary.Reasoning.Preorder as PreR ------------------------------------------------------------------------ diff --git a/src/Relation/Binary/Construct/Closure/Transitive.agda b/src/Relation/Binary/Construct/Closure/Transitive.agda index 1699dc0cb6..551b6f5cb5 100644 --- a/src/Relation/Binary/Construct/Closure/Transitive.agda +++ b/src/Relation/Binary/Construct/Closure/Transitive.agda @@ -13,7 +13,7 @@ open import Function.Bundles using (_⇔_; mk⇔) open import Induction.WellFounded open import Level open import Relation.Binary hiding (_⇔_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) private variable diff --git a/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda b/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda index 1eff43bbca..62816238d9 100644 --- a/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda +++ b/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda @@ -11,7 +11,7 @@ module Relation.Binary.Construct.Closure.Transitive.WithK where open import Function open import Relation.Binary open import Relation.Binary.Construct.Closure.Transitive -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) module _ {a ℓ} {A : Set a} {_∼_ : Rel A ℓ} where diff --git a/src/Relation/Binary/HeterogeneousEquality.agda b/src/Relation/Binary/HeterogeneousEquality.agda index 0a4886531e..1ca855e122 100644 --- a/src/Relation/Binary/HeterogeneousEquality.agda +++ b/src/Relation/Binary/HeterogeneousEquality.agda @@ -22,7 +22,8 @@ open import Relation.Binary.Indexed.Heterogeneous using (IndexedSetoid) open import Relation.Binary.Indexed.Heterogeneous.Construct.At using (_atₛ_) -open import Relation.Binary.PropositionalEquality as P using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.HeterogeneousEquality.Core as Core diff --git a/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda b/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda index fb1db6b9fb..d2825a3548 100644 --- a/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda +++ b/src/Relation/Binary/HeterogeneousEquality/Quotients/Examples.agda @@ -12,7 +12,7 @@ open import Relation.Binary.HeterogeneousEquality.Quotients open import Level using (0ℓ) open import Relation.Binary open import Relation.Binary.HeterogeneousEquality hiding (isEquivalence) -import Relation.Binary.PropositionalEquality as ≡ +import Relation.Binary.PropositionalEquality.Core as ≡ open import Data.Nat.Base open import Data.Nat.Properties open import Data.Product diff --git a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda index fd83521783..5ed814cdc1 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda @@ -15,7 +15,7 @@ open import Data.Product using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) open import Relation.Binary as B using (_⇒_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Negation using (¬_) open import Relation.Binary.Indexed.Homogeneous.Core open import Relation.Binary.Indexed.Homogeneous.Structures diff --git a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda index 1404bf7f52..38db83929a 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda @@ -21,7 +21,7 @@ open import Data.Product using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) open import Relation.Binary as B using (_⇒_) -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary.Indexed.Homogeneous.Definitions ------------------------------------------------------------------------ diff --git a/src/Relation/Binary/Reasoning/MultiSetoid.agda b/src/Relation/Binary/Reasoning/MultiSetoid.agda index 994ac3c4b6..7737e6a779 100644 --- a/src/Relation/Binary/Reasoning/MultiSetoid.agda +++ b/src/Relation/Binary/Reasoning/MultiSetoid.agda @@ -29,7 +29,7 @@ module Relation.Binary.Reasoning.MultiSetoid where open import Function.Base using (flip) open import Level using (_⊔_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality as P using (_≡_) +open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.Reasoning.Setoid as EqR diff --git a/src/Relation/Binary/Reflection.agda b/src/Relation/Binary/Reflection.agda index 5a9ec838fb..20e2054cfc 100644 --- a/src/Relation/Binary/Reflection.agda +++ b/src/Relation/Binary/Reflection.agda @@ -14,7 +14,7 @@ open import Function.Base using (id; _⟨_⟩_) open import Function.Bundles using (module Equivalence) open import Level using (Level) open import Relation.Binary -import Relation.Binary.PropositionalEquality as P +import Relation.Binary.PropositionalEquality.Core as P -- Think of the parameters as follows: -- diff --git a/src/Relation/Nary.agda b/src/Relation/Nary.agda index 5e6ecb5b25..da804883f5 100644 --- a/src/Relation/Nary.agda +++ b/src/Relation/Nary.agda @@ -27,7 +27,7 @@ open import Function.Nary.NonDependent open import Relation.Nullary.Negation using (¬_) open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _because_; _×-dec_) import Relation.Unary as Unary -open import Relation.Binary.PropositionalEquality using (_≡_; cong; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong; subst) private variable diff --git a/src/Relation/Nullary/Construct/Add/Extrema.agda b/src/Relation/Nullary/Construct/Add/Extrema.agda index 4b88fb3b3e..3366d83c27 100644 --- a/src/Relation/Nullary/Construct/Add/Extrema.agda +++ b/src/Relation/Nullary/Construct/Add/Extrema.agda @@ -8,7 +8,7 @@ module Relation.Nullary.Construct.Add.Extrema where -open import Relation.Binary.PropositionalEquality using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Nullary.Construct.Add.Infimum as Infimum using (_₋) open import Relation.Nullary.Construct.Add.Supremum as Supremum using (_⁺) diff --git a/src/Relation/Nullary/Universe.agda b/src/Relation/Nullary/Universe.agda index 4c0308343d..68394c051c 100644 --- a/src/Relation/Nullary/Universe.agda +++ b/src/Relation/Nullary/Universe.agda @@ -12,8 +12,8 @@ open import Relation.Nullary open import Relation.Nullary.Negation open import Relation.Binary hiding (_⇒_) import Relation.Binary.Construct.Always as Always -open import Relation.Binary.PropositionalEquality as PropEq - using (_≡_; refl) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) +import Relation.Binary.PropositionalEquality.Properties as PropEq import Relation.Binary.Indexed.Heterogeneous.Construct.Trivial as Trivial open import Data.Sum as Sum hiding (map) diff --git a/src/Tactic/Cong.agda b/src/Tactic/Cong.agda index 25e21193be..e46392ee5d 100644 --- a/src/Tactic/Cong.agda +++ b/src/Tactic/Cong.agda @@ -36,7 +36,7 @@ open import Data.Unit.Base using (⊤) open import Data.Word.Base as Word using (toℕ) open import Data.Product -open import Relation.Binary.PropositionalEquality as Eq using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_; refl; cong) -- 'Data.String.Properties' defines this via 'Dec', so let's use the builtin -- for maximum speed. diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda index d04ecbc131..1eb2244f5d 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda @@ -22,7 +22,7 @@ open import Data.Vec using (Vec) open import Function open import Relation.Unary -import Relation.Binary.PropositionalEquality as ≡ +import Relation.Binary.PropositionalEquality.Core as ≡ open Homomorphism homo hiding (_^_) open import Tactic.RingSolver.Core.Polynomial.Homomorphism.Lemmas homo diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda index 6fda530012..ca622ab00a 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda @@ -21,7 +21,7 @@ open import Data.List.Kleene open import Data.Vec using (Vec) import Data.Nat.Properties as ℕ-Prop -import Relation.Binary.PropositionalEquality as ≡ +import Relation.Binary.PropositionalEquality.Core as ≡ open Homomorphism homo open import Tactic.RingSolver.Core.Polynomial.Homomorphism.Lemmas homo diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda index ce20b1e381..6f2eba31d7 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda @@ -13,20 +13,20 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Lemmas (homo : Homomorphism r₁ r₂ r₃ r₄) where -open import Data.Bool using (Bool;true;false) -open import Data.Nat.Base as ℕ using (ℕ; suc; zero; compare; _≤′_; ≤′-step; ≤′-refl) -open import Data.Nat.Properties as ℕₚ using (≤′-trans) -open import Data.Vec.Base as Vec using (Vec; _∷_) -open import Data.Fin using (Fin; zero; suc) -open import Data.List.Base using (_∷_; []) +open import Data.Bool using (Bool;true;false) +open import Data.Nat.Base as ℕ using (ℕ; suc; zero; compare; _≤′_; ≤′-step; ≤′-refl) +open import Data.Nat.Properties as ℕₚ using (≤′-trans) +open import Data.Vec.Base as Vec using (Vec; _∷_) +open import Data.Fin using (Fin; zero; suc) +open import Data.List.Base using (_∷_; []) open import Data.Unit using (tt) open import Data.List.Kleene -open import Data.Product using (_,_; proj₁; proj₂; map₁; _×_) -open import Data.Maybe using (nothing; just) +open import Data.Product using (_,_; proj₁; proj₂; map₁; _×_) +open import Data.Maybe using (nothing; just) open import Function -open import Level using (lift) -open import Relation.Nullary using (Dec; yes; no) -open import Relation.Binary.PropositionalEquality as ≡ using (_≡_) +open import Level using (lift) +open import Relation.Nullary using (Dec; yes; no) +open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_) open Homomorphism homo hiding (_^_) open import Tactic.RingSolver.Core.Polynomial.Reasoning to diff --git a/src/Text/Regex/Derivative/Brzozowski.agda b/src/Text/Regex/Derivative/Brzozowski.agda index ca3768296b..d368bfc70d 100644 --- a/src/Text/Regex/Derivative/Brzozowski.agda +++ b/src/Text/Regex/Derivative/Brzozowski.agda @@ -19,7 +19,7 @@ open import Relation.Nullary.Decidable using (Dec; yes; no) open import Relation.Nullary.Negation using (contradiction) open import Relation.Nullary.Decidable using (map′; ¬?) open import Relation.Binary using (Decidable) -open import Relation.Binary.PropositionalEquality using (_≡_; refl; cong) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open DecPoset P? using (preorder) renaming (Carrier to A) open import Text.Regex.Base preorder as R hiding (_∣_; _∙_; _⋆) diff --git a/src/Text/Regex/Properties.agda b/src/Text/Regex/Properties.agda index 2652f9c8cf..cf807ca3f3 100644 --- a/src/Text/Regex/Properties.agda +++ b/src/Text/Regex/Properties.agda @@ -24,7 +24,6 @@ open import Relation.Nullary.Negation import Relation.Unary as U open import Relation.Binary using (Decidable) -import Relation.Binary.PropositionalEquality as P open DecPoset P? renaming (Carrier to A) open import Text.Regex.Base preorder diff --git a/src/Text/Regex/Search.agda b/src/Text/Regex/Search.agda index c802768e38..f5c8c780c3 100644 --- a/src/Text/Regex/Search.agda +++ b/src/Text/Regex/Search.agda @@ -30,7 +30,7 @@ open import Relation.Nullary using (Dec; ¬_; yes; no) open import Relation.Nullary.Decidable using (map′) open import Relation.Nullary.Negation using (contradiction) open import Relation.Binary using (Rel; Decidable; _⇒_) -open import Relation.Binary.PropositionalEquality hiding (preorder) +open import Relation.Binary.PropositionalEquality.Core open DecPoset P? using (preorder) renaming (Carrier to A) open import Text.Regex.Base preorder diff --git a/src/Text/Regex/SmartConstructors.agda b/src/Text/Regex/SmartConstructors.agda index eecda1284f..afe9d3f936 100644 --- a/src/Text/Regex/SmartConstructors.agda +++ b/src/Text/Regex/SmartConstructors.agda @@ -19,7 +19,7 @@ open import Data.Sum.Base using (inj₁; inj₂; fromInj₁; fromInj₂) open import Relation.Nullary.Decidable using (yes; no) open import Relation.Nullary.Negation using (contradiction) -open import Relation.Binary.PropositionalEquality using (refl) +open import Relation.Binary.PropositionalEquality.Core using (refl) open import Text.Regex.Base P as R hiding (_∣_; _∙_; _⋆) open import Text.Regex.Properties.Core P diff --git a/src/Text/Regex/String/Unsafe.agda b/src/Text/Regex/String/Unsafe.agda index bc6c9fc0d7..a46fcd5655 100644 --- a/src/Text/Regex/String/Unsafe.agda +++ b/src/Text/Regex/String/Unsafe.agda @@ -13,7 +13,7 @@ import Data.String.Unsafe as Stringₚ open import Function.Base using (_on_; id) open import Level using (0ℓ) open import Relation.Binary using (Rel; Decidable) -open import Relation.Binary.PropositionalEquality using (_≡_; sym; subst) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; sym; subst) open import Relation.Nullary.Decidable using (map′) ------------------------------------------------------------------------ From 20a346053a923877130ea22bd950dec667375d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Am=C3=A9lia=20Liao?= Date: Fri, 21 Jul 2023 13:04:52 -0300 Subject: [PATCH 068/316] Put indexed data types in the right universe To fix agda/agda#6654, we've decided that large indices will no longer be allowed by default. There is an infective flag `--large-indices` to bring them back, but none of the uses of large indices in the standard library were essential: to avoid complicated mutually-recursive PRs across repos, I adjusted the levels to check with `--no-large-indices` instead of adding the flag to the modules that used them. --- src/Data/Star/Decoration.agda | 2 +- src/Data/Star/Pointer.agda | 2 +- src/Reflection/AnnotatedAST.agda | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Data/Star/Decoration.agda b/src/Data/Star/Decoration.agda index 24428a5843..170b5abb07 100644 --- a/src/Data/Star/Decoration.agda +++ b/src/Data/Star/Decoration.agda @@ -28,7 +28,7 @@ data NonEmptyEdgePred {ℓ r p : Level} {I : Set ℓ} (T : Rel I r) -- Decorating an edge with more information. data DecoratedWith {ℓ r p : Level} {I : Set ℓ} {T : Rel I r} (P : EdgePred p T) - : Rel (NonEmpty (Star T)) p where + : Rel (NonEmpty (Star T)) (ℓ ⊔ r ⊔ p) where ↦ : ∀ {i j k} {x : T i j} {xs : Star T j k} (p : P x) → DecoratedWith P (nonEmpty (x ◅ xs)) (nonEmpty xs) diff --git a/src/Data/Star/Pointer.agda b/src/Data/Star/Pointer.agda index ed606807ce..bc86786f74 100644 --- a/src/Data/Star/Pointer.agda +++ b/src/Data/Star/Pointer.agda @@ -26,7 +26,7 @@ private data Pointer {T : Rel I r} (P : EdgePred p T) (Q : EdgePred q T) - : Rel (Maybe (NonEmpty (Star T))) (p ⊔ q) where + : Rel (Maybe (NonEmpty (Star T))) (ℓ ⊔ r ⊔ p ⊔ q) where step : ∀ {i j k} {x : T i j} {xs : Star T j k} (p : P x) → Pointer P Q (just (nonEmpty (x ◅ xs))) (just (nonEmpty xs)) diff --git a/src/Reflection/AnnotatedAST.agda b/src/Reflection/AnnotatedAST.agda index 61d55def7d..8ebc54b919 100644 --- a/src/Reflection/AnnotatedAST.agda +++ b/src/Reflection/AnnotatedAST.agda @@ -35,8 +35,8 @@ Annotation : ∀ ℓ → Set (suc ℓ) Annotation ℓ = ∀ {u} → ⟦ u ⟧ → Set ℓ -- An annotated type is a family over an Annotation and a reflected term. -Typeₐ : ∀ ℓ → Univ → Set (suc ℓ) -Typeₐ ℓ u = Annotation ℓ → ⟦ u ⟧ → Set ℓ +Typeₐ : ∀ ℓ → Univ → Set (suc (suc ℓ)) +Typeₐ ℓ u = Annotation ℓ → ⟦ u ⟧ → Set (suc ℓ) private variable @@ -168,7 +168,7 @@ mutual -- An annotation function computes the top-level annotation given a -- term annotated at all sub-terms. -AnnotationFun : Annotation ℓ → Set ℓ +AnnotationFun : Annotation ℓ → Set (suc ℓ) AnnotationFun Ann = ∀ u {t : ⟦ u ⟧} → Annotated′ Ann t → Ann t From c9d6f183155f3850d221f9edd8cfbe63d9317210 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 25 Jul 2023 15:40:35 +0200 Subject: [PATCH 069/316] CHANGELOG: fix whitespace violations: remove trailing whitespace --- CHANGELOG.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5891740538..f1448641fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2165,9 +2165,9 @@ Other minor changes take-suc-tabulate : (f : Fin n → A) (o : Fin n) → let m = toℕ o in take (suc m) (tabulate f) ≡ take m (tabulate f) ∷ʳ f o drop-take-suc : (o : Fin (length xs)) → let m = toℕ o in drop m (take (suc m) xs) ≡ [ lookup xs o ] drop-take-suc-tabulate : (f : Fin n → A) (o : Fin n) → let m = toℕ o in drop m (take (suc m) (tabulate f)) ≡ [ f o ] - - take-all : n ≥ length xs → take n xs ≡ xs - + + take-all : n ≥ length xs → take n xs ≡ xs + take-[] : ∀ m → take m [] ≡ [] drop-[] : ∀ m → drop m [] ≡ [] ``` @@ -2901,7 +2901,7 @@ Other minor changes foldr-map : foldr f x (map g xs) ≡ foldr (g -⟨ f ∣) x xs foldl-map : foldl f x (map g xs) ≡ foldl (∣ f ⟩- g) x xs ``` - + NonZero/Positive/Negative changes --------------------------------- From 484c2448bfa883bbd1d85d2f759db16bb3e937d1 Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 25 Jul 2023 15:43:48 +0200 Subject: [PATCH 070/316] CHANGELOG: fix whitespace violations: replace tabs by spaces --- CHANGELOG.md | 100 +++++++++++++++++++++++++-------------------------- 1 file changed, 50 insertions(+), 50 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1448641fe..092d73a881 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -371,42 +371,42 @@ Non-backwards compatible changes `m / n` without having to explicitly provide a proof, as instance search will fill it in for you. The full list of such operations changed is as follows: - In `Data.Nat.DivMod`: `_/_`, `_%_`, `_div_`, `_mod_` - - In `Data.Nat.Pseudorandom.LCG`: `Generator` - - In `Data.Integer.DivMod`: `_divℕ_`, `_div_`, `_modℕ_`, `_mod_` - - In `Data.Rational`: `mkℚ+`, `normalize`, `_/_`, `1/_` - - In `Data.Rational.Unnormalised`: `_/_`, `1/_`, `_÷_` + - In `Data.Nat.Pseudorandom.LCG`: `Generator` + - In `Data.Integer.DivMod`: `_divℕ_`, `_div_`, `_modℕ_`, `_mod_` + - In `Data.Rational`: `mkℚ+`, `normalize`, `_/_`, `1/_` + - In `Data.Rational.Unnormalised`: `_/_`, `1/_`, `_÷_` * At the moment, there are 4 different ways such instance arguments can be provided, listed in order of convenience and clarity: 1. *Automatic basic instances* - the standard library provides instances based on the constructors of each - numeric type in `Data.X.Base`. For example, `Data.Nat.Base` constains an instance of `NonZero (suc n)` for any `n` - and `Data.Integer.Base` contains an instance of `NonNegative (+ n)` for any `n`. Consequently, - if the argument is of the required form, these instances will always be filled in by instance search - automatically, e.g. - ``` - 0/n≡0 : 0 / suc n ≡ 0 - ``` - 2. *Take the instance as an argument* - You can provide the instance argument as a parameter to your function - and Agda's instance search will automatically use it in the correct place without you having to - explicitly pass it, e.g. - ``` - 0/n≡0 : .{{_ : NonZero n}} → 0 / n ≡ 0 - ``` - 3. *Define the instance locally* - You can define an instance argument in scope (e.g. in a `where` clause) - and Agda's instance search will again find it automatically, e.g. - ``` - instance - n≢0 : NonZero n - n≢0 = ... - - 0/n≡0 : 0 / n ≡ 0 - ``` - 4. *Pass the instance argument explicitly* - Finally, if all else fails you can pass the - instance argument explicitly into the function using `{{ }}`, e.g. - ``` - 0/n≡0 : ∀ n (n≢0 : NonZero n) → ((0 / n) {{n≢0}}) ≡ 0 - ``` - Suitable constructors for `NonZero`/`Positive` etc. can be found in `Data.X.Base`. + numeric type in `Data.X.Base`. For example, `Data.Nat.Base` constains an instance of `NonZero (suc n)` for any `n` + and `Data.Integer.Base` contains an instance of `NonNegative (+ n)` for any `n`. Consequently, + if the argument is of the required form, these instances will always be filled in by instance search + automatically, e.g. + ``` + 0/n≡0 : 0 / suc n ≡ 0 + ``` + 2. *Take the instance as an argument* - You can provide the instance argument as a parameter to your function + and Agda's instance search will automatically use it in the correct place without you having to + explicitly pass it, e.g. + ``` + 0/n≡0 : .{{_ : NonZero n}} → 0 / n ≡ 0 + ``` + 3. *Define the instance locally* - You can define an instance argument in scope (e.g. in a `where` clause) + and Agda's instance search will again find it automatically, e.g. + ``` + instance + n≢0 : NonZero n + n≢0 = ... + + 0/n≡0 : 0 / n ≡ 0 + ``` + 4. *Pass the instance argument explicitly* - Finally, if all else fails you can pass the + instance argument explicitly into the function using `{{ }}`, e.g. + ``` + 0/n≡0 : ∀ n (n≢0 : NonZero n) → ((0 / n) {{n≢0}}) ≡ 0 + ``` + Suitable constructors for `NonZero`/`Positive` etc. can be found in `Data.X.Base`. * A full list of proofs that have changed to use instance arguments is available at the end of this file. Notable changes to proofs are now discussed below. @@ -457,14 +457,14 @@ Non-backwards compatible changes * As a consequence of this, some proofs that relied on this reduction behaviour or on eta-equality may no longer go through. There are several ways to fix this: 1. The principled way is to not rely on this reduction behaviour in the first place. - The `Properties` files for rational numbers have been greatly expanded in `v1.7` - and `v2.0`, and we believe most proofs should be able to be built up from existing - proofs contained within these files. + The `Properties` files for rational numbers have been greatly expanded in `v1.7` + and `v2.0`, and we believe most proofs should be able to be built up from existing + proofs contained within these files. 2. Alternatively, annotating any rational arguments to a proof with either - `@record{}` or `@(mkℚ _ _ _)` should restore the old reduction behaviour for any - terms involving those parameters. + `@record{}` or `@(mkℚ _ _ _)` should restore the old reduction behaviour for any + terms involving those parameters. 3. Finally, if the above approaches are not viable then you may be forced to explicitly - use `cong` combined with a lemma that proves the old reduction behaviour. + use `cong` combined with a lemma that proves the old reduction behaviour. ### Change to the definition of `LeftCancellative` and `RightCancellative` @@ -478,20 +478,20 @@ Non-backwards compatible changes * Therefore the definitions have been changed as follows to make all their arguments explicit: - `LeftCancellative _•_` - - From: `∀ x {y z} → (x • y) ≈ (x • z) → y ≈ z` - - To: `∀ x y z → (x • y) ≈ (x • z) → y ≈ z` + - From: `∀ x {y z} → (x • y) ≈ (x • z) → y ≈ z` + - To: `∀ x y z → (x • y) ≈ (x • z) → y ≈ z` - `RightCancellative _•_` - From: `∀ {x} y z → (y • x) ≈ (z • x) → y ≈ z` - - To: `∀ x y z → (y • x) ≈ (z • x) → y ≈ z` + - To: `∀ x y z → (y • x) ≈ (z • x) → y ≈ z` - `AlmostLeftCancellative e _•_` - From: `∀ {x} y z → ¬ x ≈ e → (x • y) ≈ (x • z) → y ≈ z` - - To: `∀ x y z → ¬ x ≈ e → (x • y) ≈ (x • z) → y ≈ z` + - To: `∀ x y z → ¬ x ≈ e → (x • y) ≈ (x • z) → y ≈ z` - `AlmostRightCancellative e _•_` - - From: `∀ {x} y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z` - - To: `∀ x y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z` + - From: `∀ {x} y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z` + - To: `∀ x y z → ¬ x ≈ e → (y • x) ≈ (z • x) → y ≈ z` * Correspondingly some proofs of the above types will need additional arguments passed explicitly. Instances can easily be fixed by adding additional underscores, e.g. @@ -643,7 +643,7 @@ Non-backwards compatible changes - `¬?` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Decidable.Core` - `¬-reflects` has been moved from `Relation.Nullary.Negation.Core` to `Relation.Nullary.Reflects`. - `decidable-stable`, `excluded-middle` and `¬-drop-Dec` have been moved from `Relation.Nullary.Negation` - to `Relation.Nullary.Decidable`. + to `Relation.Nullary.Decidable`. - `fromDec` and `toDec` have been mvoed from `Data.Sum.Base` to `Data.Sum`. ### Refactoring of the unindexed Functor/Applicative/Monad hiearchy @@ -883,13 +883,13 @@ Major improvements * The ring solver tactic has been greatly improved. In particular: 1. When the solver is used for concrete ring types, e.g. ℤ, the equality can now use - all the ring operations defined natively for that type, rather than having - to use the operations defined in `AlmostCommutativeRing`. For example - previously you could not use `Data.Integer.Base._*_` but instead had to - use `AlmostCommutativeRing._*_`. + all the ring operations defined natively for that type, rather than having + to use the operations defined in `AlmostCommutativeRing`. For example + previously you could not use `Data.Integer.Base._*_` but instead had to + use `AlmostCommutativeRing._*_`. 2. The solver now supports use of the subtraction operator `_-_` whenever it is defined immediately in terms of `_+_` and `-_`. This is the case for - `Data.Integer` and `Data.Rational`. + `Data.Integer` and `Data.Rational`. ### Moved `_%_` and `_/_` operators to `Data.Nat.Base` From f84aa763b37538e640ac6f92a55b561546dffabf Mon Sep 17 00:00:00 2001 From: Andreas Abel Date: Tue, 25 Jul 2023 15:49:38 +0200 Subject: [PATCH 071/316] CHANGELOG for #2030: fix large indices --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 092d73a881..1da4157a62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -733,6 +733,13 @@ Non-backwards compatible changes * In accordance with changes to the flags in Agda 2.6.3, all modules that previously used the `--without-K` flag now use the `--cubical-compatible` flag instead. +* To avoid _large indices_ that are by default no longer allowed in Agda 2.6.4, + universe levels have been increased in the following definitions: + - `Data.Star.Decoration.DecoratedWith` + - `Data.Star.Pointer.Pointer` + - `Reflection.AnnotatedAST.Typeₐ` + - `Reflection.AnnotatedAST.AnnotationFun` + * The first two arguments of `m≡n⇒m-n≡0` (now `i≡j⇒i-j≡0`) in `Data.Integer.Base` have been made implicit. From f64ce4d2fd135f530631e6f7bd5d1b5b582a7a24 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Fri, 28 Jul 2023 09:22:30 -0400 Subject: [PATCH 072/316] Simplify some `Relation.Binary` imports (#2009) * Simplify some `Relation.Binary` imports * Format * Better naming scheme * Fix tests * Merge issues --- README/Data/Trie/NonDependent.agda | 2 +- README/Design/Hierarchies.agda | 2 +- src/Algebra/Consequences/Propositional.agda | 4 +++- src/Algebra/Consequences/Setoid.agda | 5 ++++- src/Algebra/Construct/Initial.agda | 5 ++++- src/Algebra/FunctionProperties/Consequences.agda | 5 ++++- src/Algebra/Lattice/Bundles/Raw.agda | 2 +- src/Algebra/Lattice/Structures.agda | 4 +++- src/Algebra/Lattice/Structures/Biased.agda | 4 +++- src/Algebra/Module/Consequences.agda | 3 ++- src/Algebra/Module/Structures.agda | 4 +++- src/Algebra/Module/Structures/Biased.agda | 4 +++- src/Algebra/Ordered/Bundles.agda | 2 +- .../Properties/CancellativeCommutativeSemiring.agda | 2 +- src/Algebra/Properties/Semiring/Primality.agda | 2 +- src/Algebra/Solver/Monoid.agda | 2 +- src/Algebra/Structures.agda | 4 +++- src/Algebra/Structures/Biased.agda | 4 +++- src/Data/String.agda | 2 +- src/Effect/Monad/Partiality.agda | 8 +++++++- src/Function/Construct/Symmetry.agda | 4 +++- src/Function/Indexed/Bundles.agda | 2 +- src/Relation/Binary/Construct/Closure/Transitive.agda | 4 +++- .../Binary/Indexed/Heterogeneous/Bundles.agda | 2 +- .../Binary/Indexed/Heterogeneous/Structures.agda | 2 +- src/Relation/Binary/Indexed/Homogeneous/Bundles.agda | 11 ++++++----- src/Relation/Binary/Indexed/Homogeneous/Core.agda | 2 +- .../Binary/Indexed/Homogeneous/Structures.agda | 6 ++++-- .../Binary/Lattice/Properties/BoundedLattice.agda | 2 +- src/Relation/Nullary/Universe.agda | 3 ++- src/Relation/Unary/PredicateTransformer.agda | 2 +- src/Text/Regex.agda | 2 +- src/Text/Regex/Base.agda | 2 +- src/Text/Regex/Derivative/Brzozowski.agda | 4 ++-- src/Text/Regex/Properties.agda | 4 ++-- src/Text/Regex/Properties/Core.agda | 2 +- src/Text/Regex/Search.agda | 5 +++-- src/Text/Regex/SmartConstructors.agda | 2 +- src/Text/Regex/String/Unsafe.agda | 3 ++- tests/data/trie/Main.agda | 2 +- 40 files changed, 88 insertions(+), 48 deletions(-) diff --git a/README/Data/Trie/NonDependent.agda b/README/Data/Trie/NonDependent.agda index 2387a71242..974ce5c96d 100644 --- a/README/Data/Trie/NonDependent.agda +++ b/README/Data/Trie/NonDependent.agda @@ -62,7 +62,7 @@ open import Data.These as These open import Function.Base using (case_of_; _$_; _∘′_; id; _on_) open import Relation.Nary -open import Relation.Binary using (Rel) +open import Relation.Binary.Core using (Rel) open import Relation.Nullary.Decidable using (¬?) open import Data.Trie Char.<-strictTotalOrder diff --git a/README/Design/Hierarchies.agda b/README/Design/Hierarchies.agda index 0a91586086..cc03919b85 100644 --- a/README/Design/Hierarchies.agda +++ b/README/Design/Hierarchies.agda @@ -10,7 +10,7 @@ module README.Design.Hierarchies where open import Data.Sum using (_⊎_) open import Level using (Level; _⊔_; suc) -open import Relation.Binary using (_Preserves₂_⟶_⟶_) +open import Relation.Binary.Core using (_Preserves₂_⟶_⟶_) private variable diff --git a/src/Algebra/Consequences/Propositional.agda b/src/Algebra/Consequences/Propositional.agda index 7c3030f4a6..6f2626889c 100644 --- a/src/Algebra/Consequences/Propositional.agda +++ b/src/Algebra/Consequences/Propositional.agda @@ -11,7 +11,9 @@ module Algebra.Consequences.Propositional {a} {A : Set a} where open import Data.Sum.Base using (inj₁; inj₂) -open import Relation.Binary using (Rel; Setoid; Symmetric; Total) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Definitions using (Symmetric; Total) open import Relation.Binary.PropositionalEquality open import Relation.Unary using (Pred) diff --git a/src/Algebra/Consequences/Setoid.agda b/src/Algebra/Consequences/Setoid.agda index 07b75806c2..444a9296b8 100644 --- a/src/Algebra/Consequences/Setoid.agda +++ b/src/Algebra/Consequences/Setoid.agda @@ -7,7 +7,10 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Rel; Setoid; Substitutive; Symmetric; Total) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Definitions + using (Substitutive; Symmetric; Total) module Algebra.Consequences.Setoid {a ℓ} (S : Setoid a ℓ) where diff --git a/src/Algebra/Construct/Initial.agda b/src/Algebra/Construct/Initial.agda index e542446248..99d80b98a3 100644 --- a/src/Algebra/Construct/Initial.agda +++ b/src/Algebra/Construct/Initial.agda @@ -22,7 +22,10 @@ open import Algebra.Core using (Op₂) open import Algebra.Definitions using (Congruent₂) open import Algebra.Structures using (IsMagma; IsSemigroup; IsBand) open import Data.Empty.Polymorphic -open import Relation.Binary using (Rel; Reflexive; Symmetric; Transitive; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Structures using (IsEquivalence) +open import Relation.Binary.Definitions + using (Reflexive; Symmetric; Transitive) ------------------------------------------------------------------------ diff --git a/src/Algebra/FunctionProperties/Consequences.agda b/src/Algebra/FunctionProperties/Consequences.agda index 03c9113995..e77b0b6d4e 100644 --- a/src/Algebra/FunctionProperties/Consequences.agda +++ b/src/Algebra/FunctionProperties/Consequences.agda @@ -6,7 +6,10 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Rel; Setoid; Substitutive; Symmetric; Total) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Definitions + using (Substitutive; Symmetric; Total) module Algebra.FunctionProperties.Consequences {a ℓ} (S : Setoid a ℓ) where diff --git a/src/Algebra/Lattice/Bundles/Raw.agda b/src/Algebra/Lattice/Bundles/Raw.agda index 5ac79408a5..8b5501cb72 100644 --- a/src/Algebra/Lattice/Bundles/Raw.agda +++ b/src/Algebra/Lattice/Bundles/Raw.agda @@ -11,7 +11,7 @@ module Algebra.Lattice.Bundles.Raw where open import Algebra.Core open import Algebra.Bundles.Raw using (RawMagma) open import Level using (suc; _⊔_) -open import Relation.Binary using (Rel) +open import Relation.Binary.Core using (Rel) record RawLattice c ℓ : Set (suc (c ⊔ ℓ)) where infixr 7 _∧_ diff --git a/src/Algebra/Lattice/Structures.agda b/src/Algebra/Lattice/Structures.agda index b02787eee0..fc40c0c300 100644 --- a/src/Algebra/Lattice/Structures.agda +++ b/src/Algebra/Lattice/Structures.agda @@ -16,7 +16,9 @@ open import Algebra.Core open import Data.Product.Base using (proj₁; proj₂) open import Level using (_⊔_) -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Lattice.Structures {a ℓ} {A : Set a} -- The underlying set diff --git a/src/Algebra/Lattice/Structures/Biased.agda b/src/Algebra/Lattice/Structures/Biased.agda index fefe3bef67..b5e1e6c9fd 100644 --- a/src/Algebra/Lattice/Structures/Biased.agda +++ b/src/Algebra/Lattice/Structures/Biased.agda @@ -16,7 +16,9 @@ open import Algebra.Core open import Algebra.Consequences.Setoid open import Data.Product.Base using (proj₁; proj₂) open import Level using (_⊔_) -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Lattice.Structures.Biased {a ℓ} {A : Set a} -- The underlying set diff --git a/src/Algebra/Module/Consequences.agda b/src/Algebra/Module/Consequences.agda index 4741349edc..2e53f96d76 100644 --- a/src/Algebra/Module/Consequences.agda +++ b/src/Algebra/Module/Consequences.agda @@ -14,7 +14,8 @@ open import Algebra.Module.Core using (Opₗ; Opᵣ) open import Algebra.Module.Definitions open import Function.Base using (flip) open import Level using (Level) -open import Relation.Binary using (Rel; Setoid) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) import Relation.Binary.Reasoning.Setoid as Rea private diff --git a/src/Algebra/Module/Structures.agda b/src/Algebra/Module/Structures.agda index 4a0e40c17c..5b071b1a63 100644 --- a/src/Algebra/Module/Structures.agda +++ b/src/Algebra/Module/Structures.agda @@ -6,7 +6,9 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Module.Structures where diff --git a/src/Algebra/Module/Structures/Biased.agda b/src/Algebra/Module/Structures/Biased.agda index 74d825e335..99e48695ae 100644 --- a/src/Algebra/Module/Structures/Biased.agda +++ b/src/Algebra/Module/Structures/Biased.agda @@ -7,7 +7,9 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Module.Structures.Biased where diff --git a/src/Algebra/Ordered/Bundles.agda b/src/Algebra/Ordered/Bundles.agda index fd69b7145d..896f9d4d1f 100644 --- a/src/Algebra/Ordered/Bundles.agda +++ b/src/Algebra/Ordered/Bundles.agda @@ -16,7 +16,7 @@ open import Algebra.Core open import Algebra.Bundles open import Algebra.Ordered.Structures open import Level using (suc; _⊔_) -open import Relation.Binary using (Rel) +open import Relation.Binary.Core using (Rel) open import Relation.Binary.Bundles using (Preorder; Poset) ------------------------------------------------------------------------ diff --git a/src/Algebra/Properties/CancellativeCommutativeSemiring.agda b/src/Algebra/Properties/CancellativeCommutativeSemiring.agda index f07f898eb2..e92fa5170e 100644 --- a/src/Algebra/Properties/CancellativeCommutativeSemiring.agda +++ b/src/Algebra/Properties/CancellativeCommutativeSemiring.agda @@ -9,7 +9,7 @@ open import Algebra using (CancellativeCommutativeSemiring) open import Algebra.Definitions using (AlmostRightCancellative) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) -open import Relation.Binary using (Decidable) +open import Relation.Binary.Definitions using (Decidable) open import Relation.Nullary.Decidable using (yes; no) open import Relation.Nullary.Negation using (contradiction) diff --git a/src/Algebra/Properties/Semiring/Primality.agda b/src/Algebra/Properties/Semiring/Primality.agda index 2b0d226491..210d9fb1a0 100644 --- a/src/Algebra/Properties/Semiring/Primality.agda +++ b/src/Algebra/Properties/Semiring/Primality.agda @@ -9,7 +9,7 @@ open import Algebra using (Semiring) open import Data.Sum.Base using (reduce) open import Function.Base using (flip) -open import Relation.Binary using (Symmetric) +open import Relation.Binary.Definitions using (Symmetric) module Algebra.Properties.Semiring.Primality {a ℓ} (R : Semiring a ℓ) diff --git a/src/Algebra/Solver/Monoid.agda b/src/Algebra/Solver/Monoid.agda index bf066f7745..23e994821c 100644 --- a/src/Algebra/Solver/Monoid.agda +++ b/src/Algebra/Solver/Monoid.agda @@ -20,7 +20,7 @@ open import Data.Nat.Base using (ℕ) open import Data.Product open import Data.Vec.Base using (Vec; lookup) open import Function.Base using (_∘_; _$_) -open import Relation.Binary using (Decidable) +open import Relation.Binary.Definitions using (Decidable) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.Reflection diff --git a/src/Algebra/Structures.agda b/src/Algebra/Structures.agda index eb9d49b2c9..4f9fc7fcb3 100644 --- a/src/Algebra/Structures.agda +++ b/src/Algebra/Structures.agda @@ -9,7 +9,9 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Structures {a ℓ} {A : Set a} -- The underlying set diff --git a/src/Algebra/Structures/Biased.agda b/src/Algebra/Structures/Biased.agda index 0aa549c66c..c0c6994e3f 100644 --- a/src/Algebra/Structures/Biased.agda +++ b/src/Algebra/Structures/Biased.agda @@ -11,7 +11,9 @@ open import Algebra.Core open import Algebra.Consequences.Setoid open import Data.Product.Base using (_,_; proj₁; proj₂) open import Level using (_⊔_) -open import Relation.Binary using (Rel; Setoid; IsEquivalence) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) +open import Relation.Binary.Structures using (IsEquivalence) module Algebra.Structures.Biased {a ℓ} {A : Set a} -- The underlying set diff --git a/src/Data/String.agda b/src/Data/String.agda index fffe1ac300..7ff82dfac0 100644 --- a/src/Data/String.agda +++ b/src/Data/String.agda @@ -22,7 +22,7 @@ open import Data.Vec.Base as Vec using (Vec) open import Data.Char.Base as Char using (Char) import Data.Char.Properties as Char using (_≟_) open import Function -open import Relation.Binary using (Rel) +open import Relation.Binary.Core using (Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Nullary.Decidable using (does) open import Relation.Unary using (Pred; Decidable) diff --git a/src/Effect/Monad/Partiality.agda b/src/Effect/Monad/Partiality.agda index 0751cb5b15..e6cfdd1c05 100644 --- a/src/Effect/Monad/Partiality.agda +++ b/src/Effect/Monad/Partiality.agda @@ -19,7 +19,13 @@ open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function.Base open import Function.Bundles using (_⇔_; mk⇔) open import Level using (Level; _⊔_) -open import Relation.Binary as B hiding (Rel; _⇔_) +open import Relation.Binary.Core as B hiding (Rel; _⇔_) +open import Relation.Binary.Definitions + using (Decidable; Reflexive; Symmetric; Transitive) +open import Relation.Binary.Structures + using (IsPreorder; IsEquivalence) +open import Relation.Binary.Bundles + using (Preorder; Setoid; Poset) import Relation.Binary.Properties.Setoid as SetoidProperties open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.PropositionalEquality.Properties as P diff --git a/src/Function/Construct/Symmetry.agda b/src/Function/Construct/Symmetry.agda index 86fa273c57..1974dee391 100644 --- a/src/Function/Construct/Symmetry.agda +++ b/src/Function/Construct/Symmetry.agda @@ -11,7 +11,9 @@ module Function.Construct.Symmetry where open import Data.Product.Base using (_,_; swap; proj₁; proj₂) open import Function open import Level using (Level) -open import Relation.Binary hiding (_⇔_) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Definitions using (Symmetric; Transitive) +open import Relation.Binary.Bundles using (Setoid) open import Relation.Binary.PropositionalEquality private diff --git a/src/Function/Indexed/Bundles.agda b/src/Function/Indexed/Bundles.agda index 033cabd426..6cce0a3026 100644 --- a/src/Function/Indexed/Bundles.agda +++ b/src/Function/Indexed/Bundles.agda @@ -10,7 +10,7 @@ module Function.Indexed.Bundles where open import Relation.Unary using (Pred) open import Function.Bundles using (_⟶_; _↣_; _↠_; _⤖_; _⇔_; _↩_; _↪_; _↩↪_; _↔_) -open import Relation.Binary hiding (_⇔_) +open import Relation.Binary.Core hiding (_⇔_) open import Level using (Level) private diff --git a/src/Relation/Binary/Construct/Closure/Transitive.agda b/src/Relation/Binary/Construct/Closure/Transitive.agda index 551b6f5cb5..ed20e48bb0 100644 --- a/src/Relation/Binary/Construct/Closure/Transitive.agda +++ b/src/Relation/Binary/Construct/Closure/Transitive.agda @@ -12,7 +12,9 @@ open import Function.Base open import Function.Bundles using (_⇔_; mk⇔) open import Induction.WellFounded open import Level -open import Relation.Binary hiding (_⇔_) +open import Relation.Binary.Core using (Rel; _=[_]⇒_; _⇒_) +open import Relation.Binary.Definitions + using (Reflexive; Symmetric; Transitive) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) private diff --git a/src/Relation/Binary/Indexed/Heterogeneous/Bundles.agda b/src/Relation/Binary/Indexed/Heterogeneous/Bundles.agda index 089cad70ab..86dc3ccdaa 100644 --- a/src/Relation/Binary/Indexed/Heterogeneous/Bundles.agda +++ b/src/Relation/Binary/Indexed/Heterogeneous/Bundles.agda @@ -13,7 +13,7 @@ module Relation.Binary.Indexed.Heterogeneous.Bundles where open import Function.Base open import Level using (suc; _⊔_) -open import Relation.Binary using (_⇒_) +open import Relation.Binary.Core using (_⇒_) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary.Indexed.Heterogeneous.Core open import Relation.Binary.Indexed.Heterogeneous.Structures diff --git a/src/Relation/Binary/Indexed/Heterogeneous/Structures.agda b/src/Relation/Binary/Indexed/Heterogeneous/Structures.agda index c61022d362..7e27aab07f 100644 --- a/src/Relation/Binary/Indexed/Heterogeneous/Structures.agda +++ b/src/Relation/Binary/Indexed/Heterogeneous/Structures.agda @@ -17,7 +17,7 @@ module Relation.Binary.Indexed.Heterogeneous.Structures open import Function.Base open import Level using (suc; _⊔_) -open import Relation.Binary using (_⇒_) +open import Relation.Binary.Core using (_⇒_) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary.Indexed.Heterogeneous.Definitions diff --git a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda index 5ed814cdc1..1f218cfc01 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda @@ -14,7 +14,8 @@ module Relation.Binary.Indexed.Homogeneous.Bundles where open import Data.Product using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) -open import Relation.Binary as B using (_⇒_) +open import Relation.Binary.Core using (_⇒_; Rel) +open import Relation.Binary.Bundles as B open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Nullary.Negation using (¬_) open import Relation.Binary.Indexed.Homogeneous.Core @@ -41,10 +42,10 @@ record IndexedSetoid {i} (I : Set i) c ℓ : Set (suc (i ⊔ c ⊔ ℓ)) where infix 4 _≉_ - _≈_ : B.Rel Carrier _ + _≈_ : Rel Carrier _ _≈_ = Lift Carrierᵢ _≈ᵢ_ - _≉_ : B.Rel Carrier _ + _≉_ : Rel Carrier _ x ≉ y = ¬ (x ≈ y) setoid : B.Setoid _ _ @@ -89,10 +90,10 @@ record IndexedPreorder {i} (I : Set i) c ℓ₁ ℓ₂ : Carrier : Set _ Carrier = ∀ i → Carrierᵢ i - _≈_ : B.Rel Carrier _ + _≈_ : Rel Carrier _ x ≈ y = ∀ i → x i ≈ᵢ y i - _∼_ : B.Rel Carrier _ + _∼_ : Rel Carrier _ x ∼ y = ∀ i → x i ∼ᵢ y i preorder : B.Preorder _ _ _ diff --git a/src/Relation/Binary/Indexed/Homogeneous/Core.agda b/src/Relation/Binary/Indexed/Homogeneous/Core.agda index 6dc2e03f82..7281652597 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Core.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Core.agda @@ -13,7 +13,7 @@ module Relation.Binary.Indexed.Homogeneous.Core where open import Level using (Level; _⊔_) open import Data.Product using (_×_) -open import Relation.Binary as B using (REL; Rel) +open import Relation.Binary.Core as B using (REL; Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.Indexed.Heterogeneous as I open import Relation.Unary.Indexed using (IPred) diff --git a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda index 38db83929a..0ccad66a6f 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda @@ -20,7 +20,9 @@ module Relation.Binary.Indexed.Homogeneous.Structures open import Data.Product using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) -open import Relation.Binary as B using (_⇒_) +open import Relation.Binary.Core using (_⇒_) +import Relation.Binary.Definitions as B +import Relation.Binary.Structures as B open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) open import Relation.Binary.Indexed.Homogeneous.Definitions @@ -97,7 +99,7 @@ record IsIndexedPreorder {ℓ₂} (_∼ᵢ_ : IRel A ℓ₂) -- Lifted properties - reflexive : Lift A _≈ᵢ_ B.⇒ Lift A _∼ᵢ_ + reflexive : Lift A _≈ᵢ_ ⇒ Lift A _∼ᵢ_ reflexive x≈y i = reflexiveᵢ (x≈y i) refl : B.Reflexive (Lift A _∼ᵢ_) diff --git a/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda b/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda index 95bf238945..1f3477b19d 100644 --- a/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda +++ b/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda @@ -15,7 +15,7 @@ open BoundedLattice L open import Algebra.Definitions _≈_ open import Data.Product using (_,_) -open import Relation.Binary using (Setoid) +open import Relation.Binary.Bundles using (Setoid) open import Relation.Binary.Lattice.Properties.MeetSemilattice meetSemilattice open import Relation.Binary.Lattice.Properties.JoinSemilattice joinSemilattice diff --git a/src/Relation/Nullary/Universe.agda b/src/Relation/Nullary/Universe.agda index 68394c051c..74b34607a6 100644 --- a/src/Relation/Nullary/Universe.agda +++ b/src/Relation/Nullary/Universe.agda @@ -10,7 +10,8 @@ module Relation.Nullary.Universe where open import Relation.Nullary open import Relation.Nullary.Negation -open import Relation.Binary hiding (_⇒_) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Bundles using (Setoid) import Relation.Binary.Construct.Always as Always open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.PropositionalEquality.Properties as PropEq diff --git a/src/Relation/Unary/PredicateTransformer.agda b/src/Relation/Unary/PredicateTransformer.agda index 518552d0d8..b6df4f2b8a 100644 --- a/src/Relation/Unary/PredicateTransformer.agda +++ b/src/Relation/Unary/PredicateTransformer.agda @@ -13,7 +13,7 @@ open import Function open import Level hiding (_⊔_) open import Relation.Nullary open import Relation.Unary -open import Relation.Binary using (REL) +open import Relation.Binary.Core using (REL) private variable diff --git a/src/Text/Regex.agda b/src/Text/Regex.agda index b6454f36ae..9b818d15b5 100644 --- a/src/Text/Regex.agda +++ b/src/Text/Regex.agda @@ -10,7 +10,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (DecPoset) +open import Relation.Binary.Bundles using (DecPoset) module Text.Regex {a e r} (decPoset : DecPoset a e r) where diff --git a/src/Text/Regex/Base.agda b/src/Text/Regex/Base.agda index 839bad4181..e5cc2c24a4 100644 --- a/src/Text/Regex/Base.agda +++ b/src/Text/Regex/Base.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Preorder) +open import Relation.Binary.Bundles using (Preorder) module Text.Regex.Base {a e r} (P : Preorder a e r) where diff --git a/src/Text/Regex/Derivative/Brzozowski.agda b/src/Text/Regex/Derivative/Brzozowski.agda index d368bfc70d..9c66c831a4 100644 --- a/src/Text/Regex/Derivative/Brzozowski.agda +++ b/src/Text/Regex/Derivative/Brzozowski.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (DecPoset) +open import Relation.Binary.Bundles using (DecPoset) module Text.Regex.Derivative.Brzozowski {a e r} (P? : DecPoset a e r) where @@ -18,7 +18,7 @@ open import Function.Base using (_$_; _∘′_; case_of_) open import Relation.Nullary.Decidable using (Dec; yes; no) open import Relation.Nullary.Negation using (contradiction) open import Relation.Nullary.Decidable using (map′; ¬?) -open import Relation.Binary using (Decidable) +open import Relation.Binary.Definitions using (Decidable) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) open DecPoset P? using (preorder) renaming (Carrier to A) diff --git a/src/Text/Regex/Properties.agda b/src/Text/Regex/Properties.agda index cf807ca3f3..815bf04471 100644 --- a/src/Text/Regex/Properties.agda +++ b/src/Text/Regex/Properties.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (DecPoset) +open import Relation.Binary.Bundles using (DecPoset) module Text.Regex.Properties {a e r} (P? : DecPoset a e r) where @@ -23,7 +23,7 @@ open import Relation.Nullary.Negation using (¬_; contradiction) import Relation.Unary as U -open import Relation.Binary using (Decidable) +open import Relation.Binary.Definitions using (Decidable) open DecPoset P? renaming (Carrier to A) open import Text.Regex.Base preorder diff --git a/src/Text/Regex/Properties/Core.agda b/src/Text/Regex/Properties/Core.agda index 64faba7029..e1916fb5cf 100644 --- a/src/Text/Regex/Properties/Core.agda +++ b/src/Text/Regex/Properties/Core.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Preorder) +open import Relation.Binary.Bundles using (Preorder) module Text.Regex.Properties.Core {a e r} (P : Preorder a e r) where diff --git a/src/Text/Regex/Search.agda b/src/Text/Regex/Search.agda index f5c8c780c3..b96fb3847c 100644 --- a/src/Text/Regex/Search.agda +++ b/src/Text/Regex/Search.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (DecPoset) +open import Relation.Binary.Bundles using (DecPoset) module Text.Regex.Search {a e r} (P? : DecPoset a e r) where @@ -29,7 +29,8 @@ open import Data.List.Relation.Binary.Suffix.Heterogeneous open import Relation.Nullary using (Dec; ¬_; yes; no) open import Relation.Nullary.Decidable using (map′) open import Relation.Nullary.Negation using (contradiction) -open import Relation.Binary using (Rel; Decidable; _⇒_) +open import Relation.Binary.Core using (Rel; _⇒_) +open import Relation.Binary.Definitions using (Decidable) open import Relation.Binary.PropositionalEquality.Core open DecPoset P? using (preorder) renaming (Carrier to A) diff --git a/src/Text/Regex/SmartConstructors.agda b/src/Text/Regex/SmartConstructors.agda index afe9d3f936..3269d22da5 100644 --- a/src/Text/Regex/SmartConstructors.agda +++ b/src/Text/Regex/SmartConstructors.agda @@ -9,7 +9,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Relation.Binary using (Preorder) +open import Relation.Binary.Bundles using (Preorder) module Text.Regex.SmartConstructors {a e r} (P : Preorder a e r) where diff --git a/src/Text/Regex/String/Unsafe.agda b/src/Text/Regex/String/Unsafe.agda index a46fcd5655..118b48505a 100644 --- a/src/Text/Regex/String/Unsafe.agda +++ b/src/Text/Regex/String/Unsafe.agda @@ -12,7 +12,8 @@ open import Data.String.Base using (String; toList; fromList) import Data.String.Unsafe as Stringₚ open import Function.Base using (_on_; id) open import Level using (0ℓ) -open import Relation.Binary using (Rel; Decidable) +open import Relation.Binary.Core using (Rel) +open import Relation.Binary.Definitions using (Decidable) open import Relation.Binary.PropositionalEquality.Core using (_≡_; sym; subst) open import Relation.Nullary.Decidable using (map′) diff --git a/tests/data/trie/Main.agda b/tests/data/trie/Main.agda index 9dfac5cb26..3ce2ad3ecb 100644 --- a/tests/data/trie/Main.agda +++ b/tests/data/trie/Main.agda @@ -18,7 +18,7 @@ open import Data.These as These open import Function.Base using (case_of_; _$_; _∘′_; id; _on_) open import Relation.Nary -open import Relation.Binary using (Rel) +open import Relation.Binary.Core using (Rel) open import Relation.Nullary.Decidable using (¬?) open import Data.Trie Char.<-strictTotalOrder From 2c47650515f157c77dd597178731ae5bf31585b8 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Fri, 28 Jul 2023 11:01:15 -0400 Subject: [PATCH 073/316] Simplify Data.Sum and leftover Data.List imports (#2011) --- README/Case.agda | 2 -- README/Data/Container/FreeMonad.agda | 2 +- README/Design/Decidability.agda | 2 +- README/Design/Hierarchies.agda | 2 +- README/Nary.agda | 2 +- src/Algebra/Construct/Flip/Op.agda | 2 +- src/Algebra/Construct/NaturalChoice/Min.agda | 2 +- src/Algebra/Construct/Subst/Equality.agda | 2 +- src/Algebra/Lattice/Construct/Subst/Equality.agda | 1 - src/Algebra/Module/Definitions/Left.agda | 1 - src/Algebra/Module/Definitions/Right.agda | 1 - src/Data/Container/Indexed/Combinator.agda | 2 +- src/Data/List/Relation/Unary/Enumerates/Setoid.agda | 2 +- .../List/Relation/Unary/Enumerates/Setoid/Properties.agda | 2 +- src/Data/List/Relation/Unary/First.agda | 2 +- src/Data/List/Relation/Unary/Grouped.agda | 2 +- src/Data/List/Relation/Unary/Grouped/Properties.agda | 2 +- src/Data/List/Relation/Unary/Unique/DecSetoid/Properties.agda | 2 +- src/Data/Nat/Binary/Subtraction.agda | 2 +- src/Data/Nat/Combinatorics/Specification.agda | 2 +- src/Data/Nat/InfinitelyOften.agda | 2 +- src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda | 2 +- src/Data/Tree/AVL/Map/Membership/Propositional.agda | 2 +- .../Tree/AVL/Map/Membership/Propositional/Properties.agda | 2 +- src/Data/Vec/Relation/Binary/Lex/Core.agda | 2 +- src/Effect/Monad/Error/Transformer.agda | 4 ++-- src/Reflection/External.agda | 2 +- src/Relation/Nullary/Universe.agda | 2 +- src/Relation/Unary/Algebra.agda | 2 +- 29 files changed, 26 insertions(+), 31 deletions(-) diff --git a/README/Case.agda b/README/Case.agda index 358460a63b..450105aff9 100644 --- a/README/Case.agda +++ b/README/Case.agda @@ -12,8 +12,6 @@ module README.Case where open import Data.Fin hiding (pred) open import Data.Maybe hiding (from-just) open import Data.Nat hiding (pred) -open import Data.List -open import Data.Sum open import Data.Product open import Function.Base using (case_of_; case_return_of_) open import Relation.Nullary diff --git a/README/Data/Container/FreeMonad.agda b/README/Data/Container/FreeMonad.agda index 54f0935937..ab302c90f5 100644 --- a/README/Data/Container/FreeMonad.agda +++ b/README/Data/Container/FreeMonad.agda @@ -15,7 +15,7 @@ open import Data.Empty open import Data.Unit open import Data.Bool.Base using (Bool; true) open import Data.Nat -open import Data.Sum using (inj₁; inj₂) +open import Data.Sum.Base using (inj₁; inj₂) open import Data.Product.Base renaming (_×_ to _⟨×⟩_) open import Data.Container using (Container; _▷_) open import Data.Container.Combinator diff --git a/README/Design/Decidability.agda b/README/Design/Decidability.agda index e615af282e..38bb52d489 100644 --- a/README/Design/Decidability.agda +++ b/README/Design/Decidability.agda @@ -9,7 +9,7 @@ module README.Design.Decidability where open import Data.Bool -open import Data.List +open import Data.List.Base using (List; []; _∷_) open import Data.List.Properties using (∷-injective) open import Data.Nat open import Data.Nat.Properties using (suc-injective) diff --git a/README/Design/Hierarchies.agda b/README/Design/Hierarchies.agda index cc03919b85..09d5504a91 100644 --- a/README/Design/Hierarchies.agda +++ b/README/Design/Hierarchies.agda @@ -8,7 +8,7 @@ module README.Design.Hierarchies where -open import Data.Sum using (_⊎_) +open import Data.Sum.Base using (_⊎_) open import Level using (Level; _⊔_; suc) open import Relation.Binary.Core using (_Preserves₂_⟶_⟶_) diff --git a/README/Nary.agda b/README/Nary.agda index 826d7b74e6..da2c2fcca3 100644 --- a/README/Nary.agda +++ b/README/Nary.agda @@ -16,7 +16,7 @@ open import Data.Fin using (Fin; fromℕ; #_; inject₁) open import Data.List open import Data.List.Properties open import Data.Product using (_×_; _,_) -open import Data.Sum using (inj₁; inj₂) +open import Data.Sum.Base using (inj₁; inj₂) open import Function open import Relation.Nullary open import Relation.Binary using (module Tri); open Tri diff --git a/src/Algebra/Construct/Flip/Op.agda b/src/Algebra/Construct/Flip/Op.agda index cc84ad59c9..4dd5849a6f 100644 --- a/src/Algebra/Construct/Flip/Op.agda +++ b/src/Algebra/Construct/Flip/Op.agda @@ -11,7 +11,7 @@ module Algebra.Construct.Flip.Op where open import Algebra import Data.Product.Base as Prod -import Data.Sum as Sum +import Data.Sum.Base as Sum open import Function.Base using (flip) open import Level using (Level) open import Relation.Binary.Core using (Rel; _Preserves₂_⟶_⟶_) diff --git a/src/Algebra/Construct/NaturalChoice/Min.agda b/src/Algebra/Construct/NaturalChoice/Min.agda index 100dac2193..41f895afe6 100644 --- a/src/Algebra/Construct/NaturalChoice/Min.agda +++ b/src/Algebra/Construct/NaturalChoice/Min.agda @@ -9,7 +9,7 @@ open import Algebra.Core open import Algebra.Bundles open import Algebra.Construct.NaturalChoice.Base -open import Data.Sum using (inj₁; inj₂; [_,_]) +open import Data.Sum.Base using (inj₁; inj₂; [_,_]) open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Relation.Binary diff --git a/src/Algebra/Construct/Subst/Equality.agda b/src/Algebra/Construct/Subst/Equality.agda index 636b1d8004..05d0277398 100644 --- a/src/Algebra/Construct/Subst/Equality.agda +++ b/src/Algebra/Construct/Subst/Equality.agda @@ -19,7 +19,7 @@ module Algebra.Construct.Subst.Equality open import Algebra.Definitions open import Algebra.Structures -import Data.Sum as Sum +import Data.Sum.Base as Sum open import Function.Base open import Relation.Binary.Construct.Subst.Equality equiv diff --git a/src/Algebra/Lattice/Construct/Subst/Equality.agda b/src/Algebra/Lattice/Construct/Subst/Equality.agda index 19b4884e8e..14a8f650cf 100644 --- a/src/Algebra/Lattice/Construct/Subst/Equality.agda +++ b/src/Algebra/Lattice/Construct/Subst/Equality.agda @@ -12,7 +12,6 @@ open import Algebra.Core using (Op₂) open import Algebra.Definitions open import Algebra.Lattice.Structures -import Data.Sum as Sum open import Data.Product as Prod open import Function.Base open import Relation.Binary.Core diff --git a/src/Algebra/Module/Definitions/Left.agda b/src/Algebra/Module/Definitions/Left.agda index 1175292fcb..e43f2ef38e 100644 --- a/src/Algebra/Module/Definitions/Left.agda +++ b/src/Algebra/Module/Definitions/Left.agda @@ -15,7 +15,6 @@ module Algebra.Module.Definitions.Left {a b ℓb} (A : Set a) {B : Set b} (_≈_ : Rel B ℓb) where -open import Data.Sum open import Data.Product ------------------------------------------------------------------------ diff --git a/src/Algebra/Module/Definitions/Right.agda b/src/Algebra/Module/Definitions/Right.agda index 9f9dc67bf7..875dcfc594 100644 --- a/src/Algebra/Module/Definitions/Right.agda +++ b/src/Algebra/Module/Definitions/Right.agda @@ -16,7 +16,6 @@ module Algebra.Module.Definitions.Right where open import Data.Product -open import Data.Sum ------------------------------------------------------------------------ -- Binary operations diff --git a/src/Data/Container/Indexed/Combinator.agda b/src/Data/Container/Indexed/Combinator.agda index bc99e83f96..43721d4689 100644 --- a/src/Data/Container/Indexed/Combinator.agda +++ b/src/Data/Container/Indexed/Combinator.agda @@ -13,7 +13,7 @@ open import Data.Container.Indexed open import Data.Empty.Polymorphic using (⊥; ⊥-elim) open import Data.Unit.Polymorphic.Base using (⊤) open import Data.Product as Prod hiding (Σ) renaming (_×_ to _⟨×⟩_) -open import Data.Sum renaming (_⊎_ to _⟨⊎⟩_) +open import Data.Sum.Base renaming (_⊎_ to _⟨⊎⟩_) open import Data.Sum.Relation.Unary.All as All using (All) open import Function.Base as F hiding (id; const) renaming (_∘_ to _⟨∘⟩_) open import Function.Inverse using (_↔̇_; inverse) diff --git a/src/Data/List/Relation/Unary/Enumerates/Setoid.agda b/src/Data/List/Relation/Unary/Enumerates/Setoid.agda index cdfd9c7ed5..4ac2f914d7 100644 --- a/src/Data/List/Relation/Unary/Enumerates/Setoid.agda +++ b/src/Data/List/Relation/Unary/Enumerates/Setoid.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.List +open import Data.List.Base using (List) open import Level open import Relation.Binary diff --git a/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda b/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda index dc0114238a..f3feaf2f02 100644 --- a/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda +++ b/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda @@ -11,7 +11,7 @@ open import Data.List.Membership.Setoid.Properties as Membership open import Data.List.Relation.Unary.Any using (index) open import Data.List.Relation.Unary.Any.Properties using (lookup-index) open import Data.List.Relation.Unary.Enumerates.Setoid -open import Data.Sum using (inj₁; inj₂) +open import Data.Sum.Base using (inj₁; inj₂) open import Data.Sum.Relation.Binary.Pointwise using (_⊎ₛ_; inj₁; inj₂) open import Data.Product using (_,_; proj₁; proj₂) diff --git a/src/Data/List/Relation/Unary/First.agda b/src/Data/List/Relation/Unary/First.agda index b00f35e9d3..90b8bf26cb 100644 --- a/src/Data/List/Relation/Unary/First.agda +++ b/src/Data/List/Relation/Unary/First.agda @@ -16,7 +16,7 @@ open import Data.List.Base as List using (List; []; _∷_) open import Data.List.Relation.Unary.All as All using (All; []; _∷_) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) open import Data.Product as Prod using (∃; -,_; _,_) -open import Data.Sum as Sum using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Function open import Relation.Unary open import Relation.Nullary diff --git a/src/Data/List/Relation/Unary/Grouped.agda b/src/Data/List/Relation/Unary/Grouped.agda index 51f3f28a17..b907069142 100644 --- a/src/Data/List/Relation/Unary/Grouped.agda +++ b/src/Data/List/Relation/Unary/Grouped.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Unary.Grouped where open import Data.List.Base using (List; []; _∷_; map) open import Data.List.Relation.Unary.All as All using (All; []; _∷_; all?) -open import Data.Sum using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Data.Product using (_×_; _,_) open import Relation.Binary as B using (REL; Rel) open import Relation.Unary as U using (Pred) diff --git a/src/Data/List/Relation/Unary/Grouped/Properties.agda b/src/Data/List/Relation/Unary/Grouped/Properties.agda index a8a72e6cec..65ac3d6ed6 100644 --- a/src/Data/List/Relation/Unary/Grouped/Properties.agda +++ b/src/Data/List/Relation/Unary/Grouped/Properties.agda @@ -9,7 +9,7 @@ module Data.List.Relation.Unary.Grouped.Properties where open import Data.Bool using (true; false) -open import Data.List +open import Data.List.Base using ([]; [_]; _∷_; map; derun) open import Data.List.Relation.Unary.All as All using (All; []; _∷_) import Data.List.Relation.Unary.All.Properties as All open import Data.List.Relation.Unary.AllPairs as AllPairs using (AllPairs; []; _∷_) diff --git a/src/Data/List/Relation/Unary/Unique/DecSetoid/Properties.agda b/src/Data/List/Relation/Unary/Unique/DecSetoid/Properties.agda index 8945b2f220..2eda2ded13 100644 --- a/src/Data/List/Relation/Unary/Unique/DecSetoid/Properties.agda +++ b/src/Data/List/Relation/Unary/Unique/DecSetoid/Properties.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.List +open import Data.List.Base using ([]; _∷_; deduplicate) import Data.List.Relation.Unary.Unique.DecSetoid as Unique open import Data.List.Relation.Unary.All.Properties using (all-filter) open import Data.List.Relation.Unary.Unique.Setoid.Properties diff --git a/src/Data/Nat/Binary/Subtraction.agda b/src/Data/Nat/Binary/Subtraction.agda index 8b095b137f..f1c0b64f56 100644 --- a/src/Data/Nat/Binary/Subtraction.agda +++ b/src/Data/Nat/Binary/Subtraction.agda @@ -17,7 +17,7 @@ open import Data.Nat.Binary.Base open import Data.Nat.Binary.Properties import Data.Nat.Properties as ℕₚ open import Data.Product using (_×_; _,_; proj₁; proj₂; ∃) -open import Data.Sum using (inj₁; inj₂) +open import Data.Sum.Base using (inj₁; inj₂) open import Data.Vec using ([]; _∷_) open import Function.Base using (_∘_; _$_) open import Level using (0ℓ) diff --git a/src/Data/Nat/Combinatorics/Specification.agda b/src/Data/Nat/Combinatorics/Specification.agda index 533a565d23..0b263eed54 100644 --- a/src/Data/Nat/Combinatorics/Specification.agda +++ b/src/Data/Nat/Combinatorics/Specification.agda @@ -16,7 +16,7 @@ open import Data.Nat.DivMod open import Data.Nat.Divisibility open import Data.Nat.Properties open import Data.Nat.Combinatorics.Base -open import Data.Sum using (inj₁; inj₂) +open import Data.Sum.Base using (inj₁; inj₂) open import Relation.Binary.PropositionalEquality using (_≡_; trans; _≢_) open import Relation.Nullary.Decidable using (yes; no; does) diff --git a/src/Data/Nat/InfinitelyOften.agda b/src/Data/Nat/InfinitelyOften.agda index 0913f3fd5c..ba4dc24f1d 100644 --- a/src/Data/Nat/InfinitelyOften.agda +++ b/src/Data/Nat/InfinitelyOften.agda @@ -14,7 +14,7 @@ open import Data.Empty using (⊥-elim) open import Data.Nat.Base open import Data.Nat.Properties open import Data.Product as Prod hiding (map) -open import Data.Sum hiding (map) +open import Data.Sum.Base using (inj₁; inj₂; _⊎_) open import Function open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Negation using (¬_) diff --git a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda index f2dec21b8c..0a803425f2 100644 --- a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda +++ b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda @@ -17,7 +17,7 @@ open import Data.Maybe.Properties using (just-injective) open import Data.Maybe.Relation.Unary.All as Maybe using (nothing; just) open import Data.Nat.Base using (ℕ) open import Data.Product as Prod using (∃; ∃-syntax; _×_; _,_; proj₁; proj₂) -open import Data.Sum as Sum using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Function.Base as F open import Level using (Level) diff --git a/src/Data/Tree/AVL/Map/Membership/Propositional.agda b/src/Data/Tree/AVL/Map/Membership/Propositional.agda index 7e5d297025..5e9498ea31 100644 --- a/src/Data/Tree/AVL/Map/Membership/Propositional.agda +++ b/src/Data/Tree/AVL/Map/Membership/Propositional.agda @@ -17,7 +17,7 @@ open import Data.Bool.Base using (true; false) open import Data.Maybe.Base using (just; nothing; is-just) open import Data.Product as Prod using (_×_; ∃-syntax; _,_; proj₁; proj₂) open import Data.Product.Relation.Binary.Pointwise.NonDependent renaming (Pointwise to _×ᴿ_) -open import Data.Sum using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function.Base using (_∘_; _∘′_) open import Level using (Level) diff --git a/src/Data/Tree/AVL/Map/Membership/Propositional/Properties.agda b/src/Data/Tree/AVL/Map/Membership/Propositional/Properties.agda index 91df2a1c0c..c05ed27177 100644 --- a/src/Data/Tree/AVL/Map/Membership/Propositional/Properties.agda +++ b/src/Data/Tree/AVL/Map/Membership/Propositional/Properties.agda @@ -17,7 +17,7 @@ open import Data.Bool.Base using (true; false) open import Data.Maybe.Base using (just; nothing; is-just) open import Data.Product as Prod using (_×_; ∃-syntax; _,_; proj₁; proj₂) open import Data.Product.Relation.Binary.Pointwise.NonDependent renaming (Pointwise to _×ᴿ_) -open import Data.Sum using (_⊎_; inj₁; inj₂) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function.Base using (_∘_; _∘′_) open import Level using (Level) diff --git a/src/Data/Vec/Relation/Binary/Lex/Core.agda b/src/Data/Vec/Relation/Binary/Lex/Core.agda index a3ff214a06..9b2bea47b7 100644 --- a/src/Data/Vec/Relation/Binary/Lex/Core.agda +++ b/src/Data/Vec/Relation/Binary/Lex/Core.agda @@ -12,7 +12,7 @@ open import Data.Empty open import Data.Nat using (ℕ; suc) import Data.Nat.Properties as ℕ open import Data.Product using (_×_; _,_; proj₁; proj₂; uncurry) -open import Data.Sum using (_⊎_; inj₁; inj₂; [_,_]) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Vec using (Vec; []; _∷_) open import Data.Vec.Relation.Binary.Pointwise.Inductive using (Pointwise; []; _∷_) open import Function.Base using (flip) diff --git a/src/Effect/Monad/Error/Transformer.agda b/src/Effect/Monad/Error/Transformer.agda index d6d5f97626..308a20bbbd 100644 --- a/src/Effect/Monad/Error/Transformer.agda +++ b/src/Effect/Monad/Error/Transformer.agda @@ -41,7 +41,7 @@ record RawMonadError module Sumₗ where - open import Data.Sum using (inj₁; inj₂; [_,_]′) + open import Data.Sum.Base using (inj₁; inj₂; [_,_]′) open import Data.Sum.Effectful.Left.Transformer E a monadError : RawMonad M → RawMonadError (SumₗT M) @@ -54,7 +54,7 @@ module Sumₗ where module Sumᵣ where - open import Data.Sum using (inj₁; inj₂; [_,_]′) + open import Data.Sum.Base using (inj₁; inj₂; [_,_]′) open import Data.Sum.Effectful.Right.Transformer a E monadError : RawMonad M → RawMonadError (SumᵣT M) diff --git a/src/Reflection/External.agda b/src/Reflection/External.agda index ba4e076426..e7e9ae989d 100644 --- a/src/Reflection/External.agda +++ b/src/Reflection/External.agda @@ -14,7 +14,7 @@ open import Data.Nat.Base using (ℕ; suc; zero; NonZero) open import Data.List.Base using (List; _∷_; []) open import Data.Product using (_×_; _,_) open import Data.String.Base as String using (String; _++_) -open import Data.Sum using (_⊎_; inj₁; inj₂; [_,_]) +open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Unit.Base using (⊤; tt) open import Function.Base using (case_of_; _$_; _∘_) open import Reflection hiding (name) diff --git a/src/Relation/Nullary/Universe.agda b/src/Relation/Nullary/Universe.agda index 74b34607a6..6ab36647c3 100644 --- a/src/Relation/Nullary/Universe.agda +++ b/src/Relation/Nullary/Universe.agda @@ -17,7 +17,7 @@ open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.PropositionalEquality.Properties as PropEq import Relation.Binary.Indexed.Heterogeneous.Construct.Trivial as Trivial -open import Data.Sum as Sum hiding (map) +open import Data.Sum.Base as Sum hiding (map) open import Data.Sum.Relation.Binary.Pointwise open import Data.Product as Prod hiding (map) open import Data.Product.Relation.Binary.Pointwise.NonDependent diff --git a/src/Relation/Unary/Algebra.agda b/src/Relation/Unary/Algebra.agda index 2d121be0fa..600bab6c1f 100644 --- a/src/Relation/Unary/Algebra.agda +++ b/src/Relation/Unary/Algebra.agda @@ -15,7 +15,7 @@ import Algebra.Lattice.Structures as AlgebraicLatticeStructures import Algebra.Structures as AlgebraicStructures open import Data.Empty.Polymorphic using (⊥-elim) open import Data.Product as Product using (_,_; proj₁; proj₂; <_,_>; curry; uncurry) -open import Data.Sum as Sum using (inj₁; inj₂; [_,_]) +open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]) open import Data.Unit.Polymorphic using (tt) open import Function.Base using (id; const; _∘_) open import Level From 77a24631f54c52970b7ab0e79009b376db49753b Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:00:51 -0400 Subject: [PATCH 074/316] score didn t change when changing the Import of Data.Nat.Show (#2025) --- src/Data/Fin/Show.agda | 2 +- src/Data/Integer.agda | 2 +- src/System/Clock.agda | 2 +- src/System/Console/ANSI.agda | 2 +- src/Test/Golden.agda | 2 +- src/Text/Printf.agda | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Data/Fin/Show.agda b/src/Data/Fin/Show.agda index 360cc8b1fc..8f9ae0583b 100644 --- a/src/Data/Fin/Show.agda +++ b/src/Data/Fin/Show.agda @@ -11,7 +11,7 @@ module Data.Fin.Show where open import Data.Fin.Base using (Fin; toℕ; fromℕ<) open import Data.Maybe.Base using (Maybe; nothing; just; _>>=_) open import Data.Nat as ℕ using (ℕ; _≤?_; _ Date: Fri, 28 Jul 2023 13:21:13 -0400 Subject: [PATCH 075/316] Simplify leftover `Function` imports (#2012) * Simplify leftover `Function` imports * `Function` -> `Function.Base` Co-authored-by: G. Allais --------- Co-authored-by: G. Allais --- README/Data/Container/Indexed.agda | 2 +- README/Design/Decidability.agda | 2 +- README/Function/Reasoning.agda | 2 +- README/Nary.agda | 2 +- README/Tactic/RingSolver.agda | 1 - .../Lattice/Properties/BooleanAlgebra/Expression.agda | 2 +- src/Algebra/Properties/AbelianGroup.agda | 2 +- src/Algebra/Solver/Ring.agda | 2 +- src/Algebra/Solver/Ring/Lemmas.agda | 2 +- src/Axiom/Extensionality/Heterogeneous.agda | 2 +- src/Codata/Sized/Delay/Effectful.agda | 2 +- src/Data/Container/Relation/Binary/Pointwise.agda | 2 +- src/Data/Container/Relation/Unary/Any.agda | 2 +- src/Data/DifferenceList.agda | 2 +- src/Data/DifferenceNat.agda | 2 +- src/Data/DifferenceVec.agda | 2 +- src/Data/Graph/Acyclic.agda | 2 +- src/Data/Integer/Divisibility.agda | 2 +- src/Data/Integer/Divisibility/Signed.agda | 2 +- src/Data/List/NonEmpty/Effectful.agda | 2 +- src/Data/List/Properties.agda | 3 ++- .../List/Relation/Ternary/Interleaving/Properties.agda | 2 +- .../Relation/Ternary/Interleaving/Setoid/Properties.agda | 2 +- .../List/Relation/Unary/Enumerates/Setoid/Properties.agda | 4 +++- src/Data/List/Relation/Unary/First.agda | 2 +- src/Data/List/Relation/Unary/First/Properties.agda | 2 +- src/Data/List/Reverse.agda | 2 +- src/Data/List/Zipper.agda | 2 +- src/Data/List/Zipper/Properties.agda | 2 +- src/Data/Maybe/Properties.agda | 3 ++- src/Data/Maybe/Relation/Unary/All/Properties.agda | 2 +- src/Data/Nat/Coprimality.agda | 2 +- src/Data/Nat/GCD.agda | 2 +- src/Data/Nat/GCD/Lemmas.agda | 2 +- src/Data/Nat/InfinitelyOften.agda | 2 +- src/Data/Nat/LCM.agda | 1 - src/Data/Product/Effectful/Examples.agda | 2 +- src/Data/Product/Properties/WithK.agda | 2 +- src/Data/Record.agda | 2 +- src/Data/Star/BoundedVec.agda | 2 +- src/Data/Star/Decoration.agda | 2 +- src/Data/Star/Nat.agda | 2 +- src/Data/String.agda | 1 - src/Data/Sum/Effectful/Examples.agda | 2 +- src/Data/Sum/Properties.agda | 4 ++-- src/Data/Sum/Relation/Binary/LeftOrder.agda | 2 +- src/Data/These.agda | 2 +- src/Data/These/Effectful/Left/Base.agda | 2 +- src/Data/These/Effectful/Right/Base.agda | 2 +- src/Data/Tree/AVL/NonEmpty.agda | 2 +- src/Data/Tree/Binary/Relation/Unary/All/Properties.agda | 2 +- src/Data/Tree/Binary/Zipper.agda | 2 +- src/Data/Tree/Binary/Zipper/Properties.agda | 2 +- src/Data/Trie.agda | 2 +- src/Data/Universe/Indexed.agda | 2 +- src/Data/Vec/Bounded.agda | 2 +- .../Vec/Functional/Relation/Unary/All/Properties.agda | 2 +- src/Data/Vec/Functional/Relation/Unary/Any.agda | 2 +- src/Data/Vec/Membership/Setoid.agda | 2 +- src/Data/Vec/Recursive/Effectful.agda | 2 +- src/Data/Word/Base.agda | 2 +- src/Effect/Applicative/Predicate.agda | 2 +- src/Effect/Comonad.agda | 2 +- src/Effect/Functor/Predicate.agda | 2 +- src/Effect/Monad/Continuation.agda | 2 +- src/Effect/Monad/Partiality/All.agda | 2 +- src/Effect/Monad/Predicate.agda | 2 +- src/Effect/Monad/Reader/Indexed.agda | 2 +- src/Effect/Monad/Writer/Indexed.agda | 2 +- src/Function/Construct/Composition.agda | 8 +++++++- src/Function/Construct/Symmetry.agda | 8 +++++++- src/Function/Endomorphism/Propositional.agda | 2 +- src/Function/Properties.agda | 3 ++- .../Construct/Closure/ReflexiveTransitive/Properties.agda | 2 +- .../Closure/ReflexiveTransitive/Properties/WithK.agda | 2 +- .../Binary/Construct/Closure/Transitive/WithK.agda | 2 +- src/Relation/Binary/HeterogeneousEquality/Quotients.agda | 2 +- src/Relation/Nullary/Indexed/Negation.agda | 2 +- src/Relation/Nullary/Universe.agda | 2 +- src/Relation/Unary/PredicateTransformer.agda | 2 +- src/System/Directory.agda | 2 +- src/System/FilePath/Posix.agda | 1 - src/Tactic/MonoidSolver.agda | 2 +- src/Tactic/RingSolver/Core/NatSet.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Addition.agda | 2 +- .../Core/Polynomial/Homomorphism/Exponentiation.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda | 2 +- .../Core/Polynomial/Homomorphism/Multiplication.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Negation.agda | 2 +- src/Tactic/RingSolver/Core/Polynomial/Parameters.agda | 1 - src/Tactic/RingSolver/NonReflective.agda | 2 +- 91 files changed, 104 insertions(+), 92 deletions(-) diff --git a/README/Data/Container/Indexed.agda b/README/Data/Container/Indexed.agda index 0c94e182ec..7ace9736f1 100644 --- a/README/Data/Container/Indexed.agda +++ b/README/Data/Container/Indexed.agda @@ -12,7 +12,7 @@ open import Data.Unit open import Data.Empty open import Data.Nat.Base open import Data.Product -open import Function +open import Function.Base using (_∋_) open import Data.W.Indexed open import Data.Container.Indexed open import Data.Container.Indexed.WithK diff --git a/README/Design/Decidability.agda b/README/Design/Decidability.agda index 38bb52d489..cb41cf41ef 100644 --- a/README/Design/Decidability.agda +++ b/README/Design/Decidability.agda @@ -15,7 +15,7 @@ open import Data.Nat open import Data.Nat.Properties using (suc-injective) open import Data.Product open import Data.Unit -open import Function +open import Function.Base using (id; _∘_) open import Relation.Binary.PropositionalEquality open import Relation.Nary diff --git a/README/Function/Reasoning.agda b/README/Function/Reasoning.agda index 0c9afa4532..4b9835346e 100644 --- a/README/Function/Reasoning.agda +++ b/README/Function/Reasoning.agda @@ -36,7 +36,7 @@ open import Data.Nat open import Data.List.Base open import Data.Char.Base open import Data.String as String using (String; toList; fromList; _==_) -open import Function +open import Function.Base using (_∘_) open import Data.Bool hiding (_≤?_) open import Data.Product as P using (_×_; <_,_>; uncurry; proj₁) open import Agda.Builtin.Equality diff --git a/README/Nary.agda b/README/Nary.agda index da2c2fcca3..16e50392b3 100644 --- a/README/Nary.agda +++ b/README/Nary.agda @@ -17,7 +17,7 @@ open import Data.List open import Data.List.Properties open import Data.Product using (_×_; _,_) open import Data.Sum.Base using (inj₁; inj₂) -open import Function +open import Function.Base using (id; flip; _∘′_) open import Relation.Nullary open import Relation.Binary using (module Tri); open Tri open import Relation.Binary.PropositionalEquality diff --git a/README/Tactic/RingSolver.agda b/README/Tactic/RingSolver.agda index fdbea87bbf..8071bee39c 100644 --- a/README/Tactic/RingSolver.agda +++ b/README/Tactic/RingSolver.agda @@ -29,7 +29,6 @@ instance -- Imports! open import Data.List.Base as List using (List; _∷_; []) -open import Function open import Relation.Binary.PropositionalEquality using (subst; cong; _≡_; module ≡-Reasoning) open import Data.Bool as Bool using (Bool; true; false; if_then_else_) diff --git a/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda b/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda index 9cdad57edc..88a5cc5518 100644 --- a/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda +++ b/src/Algebra/Lattice/Properties/BooleanAlgebra/Expression.agda @@ -25,7 +25,7 @@ import Function.Identity.Effectful as IdCat open import Data.Vec.Properties using (lookup-map) open import Data.Vec.Relation.Binary.Pointwise.Extensional as PW using (Pointwise; ext) -open import Function +open import Function.Base using (_∘_; _$_; flip) open import Relation.Binary.PropositionalEquality as P using (_≗_) import Relation.Binary.Reflection as Reflection diff --git a/src/Algebra/Properties/AbelianGroup.agda b/src/Algebra/Properties/AbelianGroup.agda index a1c2056ccb..6846f29d83 100644 --- a/src/Algebra/Properties/AbelianGroup.agda +++ b/src/Algebra/Properties/AbelianGroup.agda @@ -12,7 +12,7 @@ module Algebra.Properties.AbelianGroup {a ℓ} (G : AbelianGroup a ℓ) where open AbelianGroup G -open import Function +open import Function.Base using (_$_) open import Relation.Binary.Reasoning.Setoid setoid ------------------------------------------------------------------------ diff --git a/src/Algebra/Solver/Ring.agda b/src/Algebra/Solver/Ring.agda index e103b7a70e..5bc696da38 100644 --- a/src/Algebra/Solver/Ring.agda +++ b/src/Algebra/Solver/Ring.agda @@ -49,7 +49,7 @@ open import Data.Nat.Base using (ℕ; suc; zero) open import Data.Fin.Base using (Fin; zero; suc) open import Data.Vec.Base using (Vec; []; _∷_; lookup) open import Data.Maybe.Base using (just; nothing) -open import Function +open import Function.Base using (_⟨_⟩_; _$_) open import Level using (_⊔_) infix 9 :-_ -H_ -N_ diff --git a/src/Algebra/Solver/Ring/Lemmas.agda b/src/Algebra/Solver/Ring/Lemmas.agda index 0a9cd7ac73..944e30dfb7 100644 --- a/src/Algebra/Solver/Ring/Lemmas.agda +++ b/src/Algebra/Solver/Ring/Lemmas.agda @@ -24,7 +24,7 @@ open AlmostCommutativeRing r open import Algebra.Morphism open _-Raw-AlmostCommutative⟶_ morphism open import Relation.Binary.Reasoning.Setoid setoid -open import Function +open import Function.Base using (_⟨_⟩_; _$_) lemma₀ : ∀ a b c x → (a + b) * x + c ≈ a * x + (b * x + c) diff --git a/src/Axiom/Extensionality/Heterogeneous.agda b/src/Axiom/Extensionality/Heterogeneous.agda index 0b10affb61..ed1be68791 100644 --- a/src/Axiom/Extensionality/Heterogeneous.agda +++ b/src/Axiom/Extensionality/Heterogeneous.agda @@ -9,7 +9,7 @@ module Axiom.Extensionality.Heterogeneous where import Axiom.Extensionality.Propositional as P -open import Function +open import Function.Base using (_$_; _∘_) open import Level open import Relation.Binary.HeterogeneousEquality.Core open import Relation.Binary.PropositionalEquality.Core diff --git a/src/Codata/Sized/Delay/Effectful.agda b/src/Codata/Sized/Delay/Effectful.agda index 95254c3a13..2724c67d47 100644 --- a/src/Codata/Sized/Delay/Effectful.agda +++ b/src/Codata/Sized/Delay/Effectful.agda @@ -9,7 +9,7 @@ module Codata.Sized.Delay.Effectful where open import Codata.Sized.Delay -open import Function +open import Function.Base using (id) open import Effect.Choice open import Effect.Empty open import Effect.Functor diff --git a/src/Data/Container/Relation/Binary/Pointwise.agda b/src/Data/Container/Relation/Binary/Pointwise.agda index 2b0b966b3d..7b20aa8dbb 100644 --- a/src/Data/Container/Relation/Binary/Pointwise.agda +++ b/src/Data/Container/Relation/Binary/Pointwise.agda @@ -9,7 +9,7 @@ module Data.Container.Relation.Binary.Pointwise where open import Data.Product using (_,_; Σ-syntax; -,_; proj₁; proj₂) -open import Function +open import Function.Base using (_∘_) open import Level using (_⊔_) open import Relation.Binary using (REL; _⇒_) open import Relation.Binary.PropositionalEquality.Core as P diff --git a/src/Data/Container/Relation/Unary/Any.agda b/src/Data/Container/Relation/Unary/Any.agda index 944734af3d..de3937f221 100644 --- a/src/Data/Container/Relation/Unary/Any.agda +++ b/src/Data/Container/Relation/Unary/Any.agda @@ -11,7 +11,7 @@ module Data.Container.Relation.Unary.Any where open import Level using (_⊔_) open import Relation.Unary using (Pred; _⊆_) open import Data.Product as Prod using (_,_; proj₂; ∃) -open import Function +open import Function.Base using (_∘′_; id) open import Data.Container.Core hiding (map) import Data.Container.Morphism as M diff --git a/src/Data/DifferenceList.agda b/src/Data/DifferenceList.agda index dc62baf000..3227e6ed8e 100644 --- a/src/Data/DifferenceList.agda +++ b/src/Data/DifferenceList.agda @@ -10,7 +10,7 @@ module Data.DifferenceList where open import Level using (Level) open import Data.List.Base as List using (List) -open import Function +open import Function.Base using (_⟨_⟩_) open import Data.Nat.Base private diff --git a/src/Data/DifferenceNat.agda b/src/Data/DifferenceNat.agda index 0d6c024e51..c0f33a1fea 100644 --- a/src/Data/DifferenceNat.agda +++ b/src/Data/DifferenceNat.agda @@ -10,7 +10,7 @@ module Data.DifferenceNat where open import Data.Nat.Base as N using (ℕ) -open import Function +open import Function.Base using (_⟨_⟩_) infixl 6 _+_ diff --git a/src/Data/DifferenceVec.agda b/src/Data/DifferenceVec.agda index acb50ffde0..c34382a051 100644 --- a/src/Data/DifferenceVec.agda +++ b/src/Data/DifferenceVec.agda @@ -10,7 +10,7 @@ module Data.DifferenceVec where open import Data.DifferenceNat open import Data.Vec.Base as V using (Vec) -open import Function +open import Function.Base using (_⟨_⟩_) import Data.Nat.Base as N infixr 5 _∷_ _++_ diff --git a/src/Data/Graph/Acyclic.agda b/src/Data/Graph/Acyclic.agda index d7b298f0ef..586b28e278 100644 --- a/src/Data/Graph/Acyclic.agda +++ b/src/Data/Graph/Acyclic.agda @@ -26,7 +26,7 @@ open import Data.Empty open import Data.Unit.Base using (⊤; tt) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.List.Base as List using (List; []; _∷_) -open import Function +open import Function.Base using (_$_; _∘′_; _∘_; id) open import Relation.Nullary open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) diff --git a/src/Data/Integer/Divisibility.agda b/src/Data/Integer/Divisibility.agda index 44a97c6554..0f089b30fc 100644 --- a/src/Data/Integer/Divisibility.agda +++ b/src/Data/Integer/Divisibility.agda @@ -10,7 +10,7 @@ module Data.Integer.Divisibility where -open import Function +open import Function.Base using (_on_; _$_) open import Data.Integer.Base open import Data.Integer.Properties import Data.Nat.Base as ℕ diff --git a/src/Data/Integer/Divisibility/Signed.agda b/src/Data/Integer/Divisibility/Signed.agda index d4a22e420a..db80bcb3a0 100644 --- a/src/Data/Integer/Divisibility/Signed.agda +++ b/src/Data/Integer/Divisibility/Signed.agda @@ -8,7 +8,7 @@ module Data.Integer.Divisibility.Signed where -open import Function +open import Function.Base using (_⟨_⟩_; _$_; _$′_; _∘_; _∘′_) open import Data.Integer.Base open import Data.Integer.Properties open import Data.Integer.Divisibility as Unsigned diff --git a/src/Data/List/NonEmpty/Effectful.agda b/src/Data/List/NonEmpty/Effectful.agda index 654002c839..373ceceb26 100644 --- a/src/Data/List/NonEmpty/Effectful.agda +++ b/src/Data/List/NonEmpty/Effectful.agda @@ -16,7 +16,7 @@ open import Effect.Functor open import Effect.Applicative open import Effect.Monad open import Effect.Comonad -open import Function +open import Function.Base using (flip; _∘′_; _∘_) ------------------------------------------------------------------------ -- List⁺ applicative functor diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index c4cf722ec6..c05d3251de 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -31,7 +31,8 @@ import Data.Product.Relation.Unary.All as Prod using (All) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Data.These.Base as These using (These; this; that; these) open import Data.Fin.Properties using (toℕ-cast) -open import Function +open import Function.Base using (id; _∘_; _∘′_; _∋_; _-⟨_∣; ∣_⟩-_; _$_; const; flip) +open import Function.Definitions using (Injective) open import Level using (Level) open import Relation.Binary as B using (DecidableEquality) import Relation.Binary.Reasoning.Setoid as EqR diff --git a/src/Data/List/Relation/Ternary/Interleaving/Properties.agda b/src/Data/List/Relation/Ternary/Interleaving/Properties.agda index 563adfc9d9..ba61947c85 100644 --- a/src/Data/List/Relation/Ternary/Interleaving/Properties.agda +++ b/src/Data/List/Relation/Ternary/Interleaving/Properties.agda @@ -13,7 +13,7 @@ open import Data.Nat.Properties using (+-suc) open import Data.List.Base hiding (_∷ʳ_) open import Data.List.Properties using (reverse-involutive) open import Data.List.Relation.Ternary.Interleaving hiding (map) -open import Function +open import Function.Base using (_$_) open import Relation.Binary open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong; module ≡-Reasoning) diff --git a/src/Data/List/Relation/Ternary/Interleaving/Setoid/Properties.agda b/src/Data/List/Relation/Ternary/Interleaving/Setoid/Properties.agda index f66628a628..cdd8f968aa 100644 --- a/src/Data/List/Relation/Ternary/Interleaving/Setoid/Properties.agda +++ b/src/Data/List/Relation/Ternary/Interleaving/Setoid/Properties.agda @@ -16,7 +16,7 @@ open import Data.Bool.Base using (true; false) open import Relation.Unary using (Decidable) open import Relation.Nullary.Decidable using (does) open import Relation.Nullary.Decidable using (¬?) -open import Function +open import Function.Base using (_∘_) open import Data.List.Relation.Binary.Equality.Setoid S using (≋-refl) open import Data.List.Relation.Ternary.Interleaving.Setoid S diff --git a/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda b/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda index f3feaf2f02..78a365324b 100644 --- a/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda +++ b/src/Data/List/Relation/Unary/Enumerates/Setoid/Properties.agda @@ -17,7 +17,9 @@ open import Data.Sum.Relation.Binary.Pointwise open import Data.Product using (_,_; proj₁; proj₂) open import Data.Product.Relation.Binary.Pointwise.NonDependent using (_×ₛ_) -open import Function +open import Function.Base using (_∘_) +open import Function.Bundles using (Surjection) +open import Function.Definitions using (Surjective) open import Level open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core using (_≡_) diff --git a/src/Data/List/Relation/Unary/First.agda b/src/Data/List/Relation/Unary/First.agda index 90b8bf26cb..931195aea6 100644 --- a/src/Data/List/Relation/Unary/First.agda +++ b/src/Data/List/Relation/Unary/First.agda @@ -17,7 +17,7 @@ open import Data.List.Relation.Unary.All as All using (All; []; _∷_) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) open import Data.Product as Prod using (∃; -,_; _,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) -open import Function +open import Function.Base using (id; _∘′_) open import Relation.Unary open import Relation.Nullary diff --git a/src/Data/List/Relation/Unary/First/Properties.agda b/src/Data/List/Relation/Unary/First/Properties.agda index 7885712d7e..f30e037022 100644 --- a/src/Data/List/Relation/Unary/First/Properties.agda +++ b/src/Data/List/Relation/Unary/First/Properties.agda @@ -15,7 +15,7 @@ open import Data.List.Relation.Unary.All as All using (All; []; _∷_) open import Data.List.Relation.Unary.Any as Any using (here; there) open import Data.List.Relation.Unary.First import Data.Sum as Sum -open import Function +open import Function.Base using (_∘′_; _$_; _∘_; id) open import Relation.Binary.PropositionalEquality as P using (_≡_; refl; _≗_) open import Relation.Unary open import Relation.Nullary.Negation diff --git a/src/Data/List/Reverse.agda b/src/Data/List/Reverse.agda index 92b2aa5b0c..0464181932 100644 --- a/src/Data/List/Reverse.agda +++ b/src/Data/List/Reverse.agda @@ -10,7 +10,7 @@ module Data.List.Reverse where open import Data.List.Base as L hiding (reverse) open import Data.List.Properties -open import Function +open import Function.Base using (_$_) open import Relation.Binary.PropositionalEquality -- If you want to traverse a list from the end, then you can use the diff --git a/src/Data/List/Zipper.agda b/src/Data/List/Zipper.agda index 86f122e522..e2cc769ed2 100644 --- a/src/Data/List/Zipper.agda +++ b/src/Data/List/Zipper.agda @@ -11,7 +11,7 @@ module Data.List.Zipper where open import Data.Nat.Base open import Data.Maybe.Base as Maybe using (Maybe ; just ; nothing) open import Data.List.Base as List using (List ; [] ; _∷_) -open import Function +open import Function.Base using (_on_; flip) -- Definition diff --git a/src/Data/List/Zipper/Properties.agda b/src/Data/List/Zipper/Properties.agda index 3e3dea85d2..5c4ce7c7d8 100644 --- a/src/Data/List/Zipper/Properties.agda +++ b/src/Data/List/Zipper/Properties.agda @@ -15,7 +15,7 @@ open import Data.Maybe.Base using (Maybe; just; nothing) open import Data.Maybe.Relation.Unary.All using (All; just; nothing) open import Relation.Binary.PropositionalEquality open ≡-Reasoning -open import Function +open import Function.Base using (_on_; _$′_; _$_; flip) -- Invariant: Zipper represents a given list ------------------------------------------------------------------------ diff --git a/src/Data/Maybe/Properties.agda b/src/Data/Maybe/Properties.agda index 6833f301e7..cb19c9c328 100644 --- a/src/Data/Maybe/Properties.agda +++ b/src/Data/Maybe/Properties.agda @@ -14,7 +14,8 @@ import Algebra.Definitions as Definitions open import Data.Maybe.Base open import Data.Maybe.Relation.Unary.All using (All; just; nothing) open import Data.Product using (_,_) -open import Function +open import Function.Base using (_∋_; id; _∘_; _∘′_) +open import Function.Definitions using (Injective) open import Level using (Level) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality diff --git a/src/Data/Maybe/Relation/Unary/All/Properties.agda b/src/Data/Maybe/Relation/Unary/All/Properties.agda index 37d55adf0a..493f8679d0 100644 --- a/src/Data/Maybe/Relation/Unary/All/Properties.agda +++ b/src/Data/Maybe/Relation/Unary/All/Properties.agda @@ -13,7 +13,7 @@ open import Data.Maybe.Relation.Unary.All as All using (All; nothing; just) open import Data.Maybe.Relation.Binary.Connected open import Data.Product using (_×_; _,_) -open import Function +open import Function.Base using (_∘_) open import Level open import Relation.Unary open import Relation.Binary.Core diff --git a/src/Data/Nat/Coprimality.agda b/src/Data/Nat/Coprimality.agda index 13701b486c..04283143fd 100644 --- a/src/Data/Nat/Coprimality.agda +++ b/src/Data/Nat/Coprimality.agda @@ -19,7 +19,7 @@ open import Data.Nat.Primality open import Data.Nat.Properties open import Data.Nat.DivMod open import Data.Product as Prod -open import Function +open import Function.Base using (_∘_) open import Level using (0ℓ) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; _≢_; refl; trans; cong; subst; module ≡-Reasoning) diff --git a/src/Data/Nat/GCD.agda b/src/Data/Nat/GCD.agda index 9e21f6f812..c843ae215b 100644 --- a/src/Data/Nat/GCD.agda +++ b/src/Data/Nat/GCD.agda @@ -17,7 +17,7 @@ open import Data.Nat.Induction using (Acc; acc; <′-Rec; <′-recBuilder; <-wellFounded-fast) open import Data.Product open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) -open import Function +open import Function.Base using (_$_; _∘_) open import Induction using (build) open import Induction.Lexicographic using (_⊗_; [_⊗_]) open import Relation.Binary diff --git a/src/Data/Nat/GCD/Lemmas.agda b/src/Data/Nat/GCD/Lemmas.agda index 8d92924ddd..3f9a4b6d42 100644 --- a/src/Data/Nat/GCD/Lemmas.agda +++ b/src/Data/Nat/GCD/Lemmas.agda @@ -11,7 +11,7 @@ module Data.Nat.GCD.Lemmas where open import Data.Nat.Base open import Data.Nat.Properties open import Data.Nat.Solver -open import Function +open import Function.Base using (_$_) open import Relation.Binary.PropositionalEquality open +-*-Solver diff --git a/src/Data/Nat/InfinitelyOften.agda b/src/Data/Nat/InfinitelyOften.agda index ba4dc24f1d..9e89841633 100644 --- a/src/Data/Nat/InfinitelyOften.agda +++ b/src/Data/Nat/InfinitelyOften.agda @@ -15,7 +15,7 @@ open import Data.Nat.Base open import Data.Nat.Properties open import Data.Product as Prod hiding (map) open import Data.Sum.Base using (inj₁; inj₂; _⊎_) -open import Function +open import Function.Base using (_∘_; id) open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Negation using (¬_) open import Relation.Nullary.Negation using (¬¬-Monad; call/cc) diff --git a/src/Data/Nat/LCM.agda b/src/Data/Nat/LCM.agda index 5ce1c7cd2a..af85ed64ad 100644 --- a/src/Data/Nat/LCM.agda +++ b/src/Data/Nat/LCM.agda @@ -17,7 +17,6 @@ open import Data.Nat.Properties open import Data.Nat.GCD open import Data.Product open import Data.Sum.Base using (_⊎_; inj₁; inj₂) -open import Function open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl; sym; trans; cong; cong₂; module ≡-Reasoning) open import Relation.Binary diff --git a/src/Data/Product/Effectful/Examples.agda b/src/Data/Product/Effectful/Examples.agda index daf05ce431..a393cb4f66 100644 --- a/src/Data/Product/Effectful/Examples.agda +++ b/src/Data/Product/Effectful/Examples.agda @@ -16,7 +16,7 @@ open import Effect.Functor using (RawFunctor) open import Effect.Monad using (RawMonad) open import Data.Product open import Data.Product.Relation.Binary.Pointwise.NonDependent -open import Function +open import Function.Base using (id) import Function.Identity.Effectful as Id open import Relation.Binary using (Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) diff --git a/src/Data/Product/Properties/WithK.agda b/src/Data/Product/Properties/WithK.agda index 2218ec4ca3..645ea6a6c4 100644 --- a/src/Data/Product/Properties/WithK.agda +++ b/src/Data/Product/Properties/WithK.agda @@ -9,7 +9,7 @@ module Data.Product.Properties.WithK where open import Data.Product -open import Function +open import Function.Base using (_∋_) open import Relation.Binary.PropositionalEquality ------------------------------------------------------------------------ diff --git a/src/Data/Record.agda b/src/Data/Record.agda index b2328e89ad..edc19da8ff 100644 --- a/src/Data/Record.agda +++ b/src/Data/Record.agda @@ -14,7 +14,7 @@ open import Data.Empty open import Data.List.Base open import Data.Product hiding (proj₁; proj₂) open import Data.Unit.Polymorphic -open import Function +open import Function.Base using (id; _∘_) open import Level open import Relation.Binary open import Relation.Binary.PropositionalEquality diff --git a/src/Data/Star/BoundedVec.agda b/src/Data/Star/BoundedVec.agda index bae0c52f2d..2755554354 100644 --- a/src/Data/Star/BoundedVec.agda +++ b/src/Data/Star/BoundedVec.agda @@ -16,7 +16,7 @@ open import Data.Star.Decoration open import Data.Star.Pointer open import Data.Star.List using (List) open import Data.Unit -open import Function +open import Function.Base using (const) open import Relation.Binary open import Relation.Binary.Consequences open import Relation.Binary.Construct.Closure.ReflexiveTransitive diff --git a/src/Data/Star/Decoration.agda b/src/Data/Star/Decoration.agda index 170b5abb07..48c0f4f11a 100644 --- a/src/Data/Star/Decoration.agda +++ b/src/Data/Star/Decoration.agda @@ -9,7 +9,7 @@ module Data.Star.Decoration where open import Data.Unit -open import Function +open import Function.Base using (flip) open import Level open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive diff --git a/src/Data/Star/Nat.agda b/src/Data/Star/Nat.agda index 42cf1e6b9f..ef81051ff9 100644 --- a/src/Data/Star/Nat.agda +++ b/src/Data/Star/Nat.agda @@ -9,7 +9,7 @@ module Data.Star.Nat where open import Data.Unit -open import Function +open import Function.Base using (const) open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive open import Relation.Binary.Construct.Always using (Always) diff --git a/src/Data/String.agda b/src/Data/String.agda index 7ff82dfac0..8a6dd08045 100644 --- a/src/Data/String.agda +++ b/src/Data/String.agda @@ -21,7 +21,6 @@ open import Data.List.Relation.Binary.Lex.Strict using (Lex-<; Lex-≤) open import Data.Vec.Base as Vec using (Vec) open import Data.Char.Base as Char using (Char) import Data.Char.Properties as Char using (_≟_) -open import Function open import Relation.Binary.Core using (Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) open import Relation.Nullary.Decidable using (does) diff --git a/src/Data/Sum/Effectful/Examples.agda b/src/Data/Sum/Effectful/Examples.agda index f6850c7e19..773c6ca316 100644 --- a/src/Data/Sum/Effectful/Examples.agda +++ b/src/Data/Sum/Effectful/Examples.agda @@ -21,7 +21,7 @@ private module Examplesₗ {a b} {A : Set a} {B : Set b} where open import Agda.Builtin.Equality - open import Function + open import Function.Base using (id) module Sₗ = Sumₗ A b open RawFunctor Sₗ.functor diff --git a/src/Data/Sum/Properties.agda b/src/Data/Sum/Properties.agda index 3fede95b06..2c6e638731 100644 --- a/src/Data/Sum/Properties.agda +++ b/src/Data/Sum/Properties.agda @@ -10,8 +10,8 @@ module Data.Sum.Properties where open import Level open import Data.Sum.Base -open import Function -open import Function.Bundles using (mk↔′) +open import Function.Base using (_∋_; _∘_; id) +open import Function.Bundles using (mk↔′; _↔_) open import Relation.Binary using (Decidable) open import Relation.Binary.PropositionalEquality open import Relation.Nullary.Decidable using (yes; no) diff --git a/src/Data/Sum/Relation/Binary/LeftOrder.agda b/src/Data/Sum/Relation/Binary/LeftOrder.agda index 34c676bcbb..2749640316 100644 --- a/src/Data/Sum/Relation/Binary/LeftOrder.agda +++ b/src/Data/Sum/Relation/Binary/LeftOrder.agda @@ -13,7 +13,7 @@ open import Data.Sum.Relation.Binary.Pointwise as PW using (Pointwise; inj₁; inj₂) open import Data.Product open import Data.Empty -open import Function +open import Function.Base using (_$_; _∘_) open import Level open import Relation.Nullary import Relation.Nullary.Decidable as Dec diff --git a/src/Data/These.agda b/src/Data/These.agda index c8d042c8e9..45024ec599 100644 --- a/src/Data/These.agda +++ b/src/Data/These.agda @@ -11,7 +11,7 @@ module Data.These where open import Level open import Data.Maybe.Base using (Maybe; just; nothing; maybe′) open import Data.Sum.Base using (_⊎_; [_,_]′) -open import Function +open import Function.Base using (const; _∘′_; id; constᵣ) ------------------------------------------------------------------------ diff --git a/src/Data/These/Effectful/Left/Base.agda b/src/Data/These/Effectful/Left/Base.agda index 04f569abdf..8f8f3c48bc 100644 --- a/src/Data/These/Effectful/Left/Base.agda +++ b/src/Data/These/Effectful/Left/Base.agda @@ -21,7 +21,7 @@ open import Data.These.Base open import Effect.Functor open import Effect.Applicative open import Effect.Monad -open import Function +open import Function.Base using (_∘_; flip) Theseₗ : Set (a ⊔ b) → Set (a ⊔ b) Theseₗ B = These A B diff --git a/src/Data/These/Effectful/Right/Base.agda b/src/Data/These/Effectful/Right/Base.agda index 91da52ab02..721426ae68 100644 --- a/src/Data/These/Effectful/Right/Base.agda +++ b/src/Data/These/Effectful/Right/Base.agda @@ -21,7 +21,7 @@ open import Data.These.Base open import Effect.Functor open import Effect.Applicative open import Effect.Monad -open import Function +open import Function.Base using (flip; _∘_) Theseᵣ : Set (a ⊔ b) → Set (a ⊔ b) Theseᵣ A = These A B diff --git a/src/Data/Tree/AVL/NonEmpty.agda b/src/Data/Tree/AVL/NonEmpty.agda index 622e2b4a58..d4af2edd58 100644 --- a/src/Data/Tree/AVL/NonEmpty.agda +++ b/src/Data/Tree/AVL/NonEmpty.agda @@ -23,7 +23,7 @@ open import Data.Maybe.Base hiding (map) open import Data.Nat.Base hiding (_<_; _⊔_; compare) open import Data.Product hiding (map) open import Data.Unit -open import Function +open import Function.Base using (_$_; _∘′_) open import Level using (_⊔_; Lift; lift) open import Relation.Unary diff --git a/src/Data/Tree/Binary/Relation/Unary/All/Properties.agda b/src/Data/Tree/Binary/Relation/Unary/All/Properties.agda index 198964ef4d..08361f8476 100644 --- a/src/Data/Tree/Binary/Relation/Unary/All/Properties.agda +++ b/src/Data/Tree/Binary/Relation/Unary/All/Properties.agda @@ -12,7 +12,7 @@ open import Level open import Data.Tree.Binary as Tree using (Tree; leaf; node) open import Data.Tree.Binary.Relation.Unary.All open import Relation.Unary -open import Function +open import Function.Base using (id) private variable diff --git a/src/Data/Tree/Binary/Zipper.agda b/src/Data/Tree/Binary/Zipper.agda index 0e5f4b8d05..5786ca7672 100644 --- a/src/Data/Tree/Binary/Zipper.agda +++ b/src/Data/Tree/Binary/Zipper.agda @@ -13,7 +13,7 @@ open import Data.Tree.Binary as BT using (Tree; node; leaf) open import Data.List.Base as List using (List; []; _∷_; sum; _++_; [_]) open import Data.Maybe using (Maybe; nothing; just) open import Data.Nat.Base using (ℕ; suc; _+_) -open import Function +open import Function.Base using (_$_; _∘_) private variable diff --git a/src/Data/Tree/Binary/Zipper/Properties.agda b/src/Data/Tree/Binary/Zipper/Properties.agda index 20017ad162..107981bcbf 100644 --- a/src/Data/Tree/Binary/Zipper/Properties.agda +++ b/src/Data/Tree/Binary/Zipper/Properties.agda @@ -17,7 +17,7 @@ open import Data.Maybe.Base using (Maybe; just; nothing) open import Data.Maybe.Relation.Unary.All using (All; just; nothing) open import Relation.Binary.PropositionalEquality open ≡-Reasoning -open import Function +open import Function.Base using (_on_; _∘_; _$_) open import Level using (Level) private diff --git a/src/Data/Trie.agda b/src/Data/Trie.agda index 2ea6b2f963..7f06a6f0ed 100644 --- a/src/Data/Trie.agda +++ b/src/Data/Trie.agda @@ -20,7 +20,7 @@ import Data.List.NonEmpty as List⁺ open import Data.Maybe.Base as Maybe using (Maybe; just; nothing; maybe′) open import Data.Product as Prod using (∃) open import Data.These.Base as These using (These) -open import Function +open import Function.Base using (_∘′_; const) open import Relation.Unary using (IUniversal; _⇒_) open StrictTotalOrder S diff --git a/src/Data/Universe/Indexed.agda b/src/Data/Universe/Indexed.agda index a11958e16f..cb6d9f4e56 100644 --- a/src/Data/Universe/Indexed.agda +++ b/src/Data/Universe/Indexed.agda @@ -10,7 +10,7 @@ module Data.Universe.Indexed where open import Data.Product open import Data.Universe -open import Function +open import Function.Base using (_∘_) open import Level ------------------------------------------------------------------------ diff --git a/src/Data/Vec/Bounded.agda b/src/Data/Vec/Bounded.agda index 2e1f286419..3a1aae623e 100644 --- a/src/Data/Vec/Bounded.agda +++ b/src/Data/Vec/Bounded.agda @@ -11,7 +11,7 @@ module Data.Vec.Bounded where open import Level using (Level) open import Data.Nat.Base open import Data.Vec as Vec using (Vec) -open import Function +open import Function.Base using (id) open import Relation.Binary using (_Preserves_⟶_) open import Relation.Unary using (Pred; Decidable) diff --git a/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda b/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda index 3de5f61679..89dba8d259 100644 --- a/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda +++ b/src/Data/Vec/Functional/Relation/Unary/All/Properties.agda @@ -14,7 +14,7 @@ open import Data.Product as Σ using (_×_; _,_; proj₁; proj₂; uncurry) open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Vec.Functional as VF hiding (map) open import Data.Vec.Functional.Relation.Unary.All -open import Function +open import Function.Base using (const; _∘_) open import Level using (Level) open import Relation.Unary diff --git a/src/Data/Vec/Functional/Relation/Unary/Any.agda b/src/Data/Vec/Functional/Relation/Unary/Any.agda index 83e0e6dfb3..de6c3570cb 100644 --- a/src/Data/Vec/Functional/Relation/Unary/Any.agda +++ b/src/Data/Vec/Functional/Relation/Unary/Any.agda @@ -13,7 +13,7 @@ open import Data.Fin.Properties using (any?) open import Data.Nat.Base open import Data.Product as Σ using (Σ; ∃; _×_; _,_; proj₁; proj₂) open import Data.Vec.Functional as VF hiding (map) -open import Function +open import Function.Base using (id) open import Level using (Level) open import Relation.Unary diff --git a/src/Data/Vec/Membership/Setoid.agda b/src/Data/Vec/Membership/Setoid.agda index 1151aecf6f..50ef16bb79 100644 --- a/src/Data/Vec/Membership/Setoid.agda +++ b/src/Data/Vec/Membership/Setoid.agda @@ -10,7 +10,7 @@ open import Relation.Binary using (Setoid; _Respects_) module Data.Vec.Membership.Setoid {c ℓ} (S : Setoid c ℓ) where -open import Function +open import Function.Base using (_∘_; flip) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.Vec.Relation.Unary.Any as Any using (Any; here; there; index) diff --git a/src/Data/Vec/Recursive/Effectful.agda b/src/Data/Vec/Recursive/Effectful.agda index 567020352a..cc58d5af6d 100644 --- a/src/Data/Vec/Recursive/Effectful.agda +++ b/src/Data/Vec/Recursive/Effectful.agda @@ -14,7 +14,7 @@ open import Data.Vec.Recursive open import Effect.Functor open import Effect.Applicative open import Effect.Monad -open import Function +open import Function.Base using (_∘_; flip) ------------------------------------------------------------------------ -- Functor and applicative diff --git a/src/Data/Word/Base.agda b/src/Data/Word/Base.agda index 34206371e1..1dcaea5731 100644 --- a/src/Data/Word/Base.agda +++ b/src/Data/Word/Base.agda @@ -10,7 +10,7 @@ module Data.Word.Base where open import Level using (zero) import Data.Nat.Base as ℕ -open import Function +open import Function.Base using (_on_) open import Relation.Binary using (Rel) open import Relation.Binary.PropositionalEquality diff --git a/src/Effect/Applicative/Predicate.agda b/src/Effect/Applicative/Predicate.agda index 0bfe6a9803..bcfec53170 100644 --- a/src/Effect/Applicative/Predicate.agda +++ b/src/Effect/Applicative/Predicate.agda @@ -13,7 +13,7 @@ module Effect.Applicative.Predicate where open import Effect.Functor.Predicate open import Data.Product -open import Function +open import Function.Base using (const; constᵣ) open import Level open import Relation.Unary open import Relation.Unary.PredicateTransformer using (Pt) diff --git a/src/Effect/Comonad.agda b/src/Effect/Comonad.agda index 67a4d7d43d..72cf07d732 100644 --- a/src/Effect/Comonad.agda +++ b/src/Effect/Comonad.agda @@ -11,7 +11,7 @@ module Effect.Comonad where open import Level -open import Function +open import Function.Base using (id; _∘′_; flip) private variable diff --git a/src/Effect/Functor/Predicate.agda b/src/Effect/Functor/Predicate.agda index d24938b26a..70704e34c3 100644 --- a/src/Effect/Functor/Predicate.agda +++ b/src/Effect/Functor/Predicate.agda @@ -10,7 +10,7 @@ module Effect.Functor.Predicate where -open import Function +open import Function.Base using (const) open import Level open import Relation.Unary open import Relation.Unary.PredicateTransformer using (PT) diff --git a/src/Effect/Monad/Continuation.agda b/src/Effect/Monad/Continuation.agda index bcc66ce265..2ff9dd4bb9 100644 --- a/src/Effect/Monad/Continuation.agda +++ b/src/Effect/Monad/Continuation.agda @@ -13,7 +13,7 @@ open import Effect.Applicative.Indexed open import Effect.Monad open import Function.Identity.Effectful as Id using (Identity) open import Effect.Monad.Indexed -open import Function +open import Function.Base using (flip) open import Level private diff --git a/src/Effect/Monad/Partiality/All.agda b/src/Effect/Monad/Partiality/All.agda index 7e90400a85..2954a5da2b 100644 --- a/src/Effect/Monad/Partiality/All.agda +++ b/src/Effect/Monad/Partiality/All.agda @@ -11,7 +11,7 @@ module Effect.Monad.Partiality.All where open import Effect.Monad open import Effect.Monad.Partiality as Partiality using (_⊥; ⇒≈) open import Codata.Musical.Notation -open import Function +open import Function.Base using (flip; _∘_) open import Level open import Relation.Binary using (_Respects_; IsEquivalence) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) diff --git a/src/Effect/Monad/Predicate.agda b/src/Effect/Monad/Predicate.agda index 5593b202d8..df3e58347c 100644 --- a/src/Effect/Monad/Predicate.agda +++ b/src/Effect/Monad/Predicate.agda @@ -15,7 +15,7 @@ open import Effect.Monad open import Effect.Monad.Indexed open import Data.Unit open import Data.Product -open import Function +open import Function.Base using (const; id; _∘_) open import Level open import Relation.Binary.PropositionalEquality open import Relation.Unary diff --git a/src/Effect/Monad/Reader/Indexed.agda b/src/Effect/Monad/Reader/Indexed.agda index 2260b07e09..28eab8d453 100644 --- a/src/Effect/Monad/Reader/Indexed.agda +++ b/src/Effect/Monad/Reader/Indexed.agda @@ -10,7 +10,7 @@ open import Level module Effect.Monad.Reader.Indexed {r} (R : Set r) (a : Level) where -open import Function +open import Function.Base using (const; flip; _∘_) open import Function.Identity.Effectful as Id using (Identity) open import Effect.Applicative.Indexed open import Effect.Monad.Indexed diff --git a/src/Effect/Monad/Writer/Indexed.agda b/src/Effect/Monad/Writer/Indexed.agda index 9720e72b3c..6d99dd9b43 100644 --- a/src/Effect/Monad/Writer/Indexed.agda +++ b/src/Effect/Monad/Writer/Indexed.agda @@ -16,7 +16,7 @@ open import Data.Unit.Polymorphic open import Effect.Applicative.Indexed open import Effect.Monad open import Effect.Monad.Indexed -open import Function +open import Function.Base using (_∘′_) open import Function.Identity.Effectful as Id using (Identity) private diff --git a/src/Function/Construct/Composition.agda b/src/Function/Construct/Composition.agda index a18b4b87b1..269448eaba 100644 --- a/src/Function/Construct/Composition.agda +++ b/src/Function/Construct/Composition.agda @@ -9,7 +9,13 @@ module Function.Construct.Composition where open import Data.Product.Base using (_,_) -open import Function +open import Function.Base using (_∘_) +open import Function.Bundles + using (Func; Injection; Surjection; Bijection; Equivalence; LeftInverse; RightInverse; Inverse; _⟶_; _↣_; _↠_; _⤖_; _⇔_; _↩_; _↪_; _↔_) +open import Function.Definitions + using (Congruent; Injective; Surjective; Bijective; Inverseˡ; Inverseʳ; Inverseᵇ) +open import Function.Structures + using (IsCongruent; IsInjection; IsSurjection; IsBijection; IsLeftInverse; IsRightInverse; IsInverse) open import Level using (Level) open import Relation.Binary hiding (_⇔_; IsEquivalence) diff --git a/src/Function/Construct/Symmetry.agda b/src/Function/Construct/Symmetry.agda index 1974dee391..14a7adc466 100644 --- a/src/Function/Construct/Symmetry.agda +++ b/src/Function/Construct/Symmetry.agda @@ -9,7 +9,13 @@ module Function.Construct.Symmetry where open import Data.Product.Base using (_,_; swap; proj₁; proj₂) -open import Function +open import Function.Base using (_∘_) +open import Function.Definitions + using (Bijective; Injective; Surjective; Inverseˡ; Inverseʳ; Inverseᵇ; Congruent) +open import Function.Structures + using (IsBijection; IsCongruent; IsRightInverse; IsLeftInverse; IsInverse) +open import Function.Bundles + using (Bijection; Equivalence; LeftInverse; RightInverse; Inverse; _⤖_; _⇔_; _↩_; _↪_; _↔_) open import Level using (Level) open import Relation.Binary.Core using (Rel) open import Relation.Binary.Definitions using (Symmetric; Transitive) diff --git a/src/Function/Endomorphism/Propositional.agda b/src/Function/Endomorphism/Propositional.agda index d14128edfe..9cb46af85f 100644 --- a/src/Function/Endomorphism/Propositional.agda +++ b/src/Function/Endomorphism/Propositional.agda @@ -18,7 +18,7 @@ open import Data.Nat.Base using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (+-0-monoid; +-semigroup) open import Data.Product using (_,_) -open import Function +open import Function.Base using (id; _∘′_; _∋_) open import Function.Equality using (_⟨$⟩_) open import Relation.Binary using (_Preserves_⟶_) open import Relation.Binary.PropositionalEquality.Core as P using (_≡_; refl) diff --git a/src/Function/Properties.agda b/src/Function/Properties.agda index b20807f64e..adfb3c73b6 100644 --- a/src/Function/Properties.agda +++ b/src/Function/Properties.agda @@ -9,7 +9,8 @@ module Function.Properties where open import Axiom.Extensionality.Propositional using (Extensionality) -open import Function +open import Function.Base using (flip; _∘_) +open import Function.Bundles using (_↔_; mk↔′; Inverse) open import Level open import Relation.Binary.PropositionalEquality.Core using (trans; cong; cong′) diff --git a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda index 64c81b7151..963c5b6330 100644 --- a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda +++ b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties.agda @@ -8,7 +8,7 @@ module Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties where -open import Function +open import Function.Base using (id; _∘_; _$_) open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive open import Relation.Binary.PropositionalEquality.Core as PropEq diff --git a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties/WithK.agda b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties/WithK.agda index c88cf76c8a..aa2fd6e0a5 100644 --- a/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties/WithK.agda +++ b/src/Relation/Binary/Construct/Closure/ReflexiveTransitive/Properties/WithK.agda @@ -11,7 +11,7 @@ module Relation.Binary.Construct.Closure.ReflexiveTransitive.Properties.WithK where -open import Function +open import Function.Base using (_∋_) open import Relation.Binary open import Relation.Binary.Construct.Closure.ReflexiveTransitive open import Relation.Binary.PropositionalEquality diff --git a/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda b/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda index 62816238d9..b432e3e1dd 100644 --- a/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda +++ b/src/Relation/Binary/Construct/Closure/Transitive/WithK.agda @@ -8,7 +8,7 @@ module Relation.Binary.Construct.Closure.Transitive.WithK where -open import Function +open import Function.Base using (_∋_) open import Relation.Binary open import Relation.Binary.Construct.Closure.Transitive open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) diff --git a/src/Relation/Binary/HeterogeneousEquality/Quotients.agda b/src/Relation/Binary/HeterogeneousEquality/Quotients.agda index a429dafe8f..fcdc1e97fc 100644 --- a/src/Relation/Binary/HeterogeneousEquality/Quotients.agda +++ b/src/Relation/Binary/HeterogeneousEquality/Quotients.agda @@ -8,7 +8,7 @@ module Relation.Binary.HeterogeneousEquality.Quotients where -open import Function +open import Function.Base using (_$_; const; _∘_) open import Level hiding (lift) open import Relation.Binary open import Relation.Binary.HeterogeneousEquality diff --git a/src/Relation/Nullary/Indexed/Negation.agda b/src/Relation/Nullary/Indexed/Negation.agda index 45c6a9e2a1..4a742baea3 100644 --- a/src/Relation/Nullary/Indexed/Negation.agda +++ b/src/Relation/Nullary/Indexed/Negation.agda @@ -10,7 +10,7 @@ module Relation.Nullary.Indexed.Negation where open import Axiom.Extensionality.Propositional using (Extensionality) open import Data.Empty.Polymorphic -open import Function +open import Function.Bundles using (_↔_) open import Function.Properties import Function.Construct.Identity as Identity open import Relation.Nullary.Indexed diff --git a/src/Relation/Nullary/Universe.agda b/src/Relation/Nullary/Universe.agda index 6ab36647c3..5df3c1c423 100644 --- a/src/Relation/Nullary/Universe.agda +++ b/src/Relation/Nullary/Universe.agda @@ -21,7 +21,7 @@ open import Data.Sum.Base as Sum hiding (map) open import Data.Sum.Relation.Binary.Pointwise open import Data.Product as Prod hiding (map) open import Data.Product.Relation.Binary.Pointwise.NonDependent -open import Function +open import Function.Base using (_∘_; id) import Function.Equality as FunS open import Data.Empty open import Effect.Applicative diff --git a/src/Relation/Unary/PredicateTransformer.agda b/src/Relation/Unary/PredicateTransformer.agda index b6df4f2b8a..0ae725588a 100644 --- a/src/Relation/Unary/PredicateTransformer.agda +++ b/src/Relation/Unary/PredicateTransformer.agda @@ -9,7 +9,7 @@ module Relation.Unary.PredicateTransformer where open import Data.Product -open import Function +open import Function.Base using (_∘_) open import Level hiding (_⊔_) open import Relation.Nullary open import Relation.Unary diff --git a/src/System/Directory.agda b/src/System/Directory.agda index baee50bc2d..fc2a1578a9 100644 --- a/src/System/Directory.agda +++ b/src/System/Directory.agda @@ -17,7 +17,7 @@ open import Data.Maybe.Base using (Maybe) open import Data.Nat.Base using (ℕ) open import Data.String.Base using (String) open import Foreign.Haskell.Coerce using (coerce) -open import Function +open import Function.Base using (_∘′_) open import System.FilePath.Posix hiding (makeRelative) open import System.Directory.Primitive as Prim diff --git a/src/System/FilePath/Posix.agda b/src/System/FilePath/Posix.agda index 4e4a205d47..d486f1d342 100644 --- a/src/System/FilePath/Posix.agda +++ b/src/System/FilePath/Posix.agda @@ -15,7 +15,6 @@ open import IO.Base using (IO; lift) open import Data.Maybe.Base using (Maybe) open import Data.Product using (_×_) open import Data.Sum.Base using (_⊎_) -open import Function open import Foreign.Haskell.Coerce diff --git a/src/Tactic/MonoidSolver.agda b/src/Tactic/MonoidSolver.agda index fcf193244b..991ff41556 100644 --- a/src/Tactic/MonoidSolver.agda +++ b/src/Tactic/MonoidSolver.agda @@ -73,7 +73,7 @@ module Tactic.MonoidSolver where open import Algebra -open import Function +open import Function.Base using (_⟨_⟩_) open import Data.Bool as Bool using (Bool; _∨_; if_then_else_) open import Data.Maybe as Maybe using (Maybe; just; nothing; maybe) diff --git a/src/Tactic/RingSolver/Core/NatSet.agda b/src/Tactic/RingSolver/Core/NatSet.agda index 7ebbcebc22..d28b441d05 100644 --- a/src/Tactic/RingSolver/Core/NatSet.agda +++ b/src/Tactic/RingSolver/Core/NatSet.agda @@ -40,7 +40,7 @@ open import Data.Nat as ℕ using (ℕ; suc; zero) open import Data.List.Base as List using (List; _∷_; []) open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) open import Data.Bool as Bool using (Bool) -open import Function +open import Function.Base using (const; _∘_) open import Relation.Binary.PropositionalEquality ------------------------------------------------------------------------ diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda index 1eb2244f5d..1f6de95f4f 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda @@ -19,7 +19,7 @@ open import Data.Product using (_,_; _×_; proj₂) open import Data.List.Base using (_∷_; []) open import Data.List.Kleene open import Data.Vec using (Vec) -open import Function +open import Function.Base using (_⟨_⟩_; flip) open import Relation.Unary import Relation.Binary.PropositionalEquality.Core as ≡ diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda index ca622ab00a..9435251957 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda @@ -13,7 +13,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Exponentiation (homo : Homomorphism r₁ r₂ r₃ r₄) where -open import Function +open import Function.Base using (_⟨_⟩_) open import Data.Nat.Base as ℕ using (ℕ; suc; zero; compare) open import Data.Product using (_,_; _×_; proj₁; proj₂) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda index 6f2eba31d7..3e1ce2bfe3 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda @@ -23,7 +23,7 @@ open import Data.Unit using (tt) open import Data.List.Kleene open import Data.Product using (_,_; proj₁; proj₂; map₁; _×_) open import Data.Maybe using (nothing; just) -open import Function +open import Function.Base using (_⟨_⟩_) open import Level using (lift) open import Relation.Nullary using (Dec; yes; no) open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≡_) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda index c322284a96..2baeac0f23 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda @@ -19,7 +19,7 @@ open import Data.Nat.Induction open import Data.Product using (_×_; _,_; proj₁; proj₂; map₁) open import Data.List.Kleene open import Data.Vec using (Vec) -open import Function +open import Function.Base using (_⟨_⟩_; flip) open import Induction.WellFounded open import Relation.Unary diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda index ebef6fc39e..dd84eafef2 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda @@ -18,7 +18,7 @@ open import Data.Vec using (Vec) open import Data.Nat using (_<′_) open import Data.Nat.Induction -open import Function +open import Function.Base using (_⟨_⟩_; flip) open Homomorphism homo open import Tactic.RingSolver.Core.Polynomial.Homomorphism.Lemmas homo diff --git a/src/Tactic/RingSolver/Core/Polynomial/Parameters.agda b/src/Tactic/RingSolver/Core/Polynomial/Parameters.agda index a622ffb49c..c7777160a8 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Parameters.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Parameters.agda @@ -13,7 +13,6 @@ module Tactic.RingSolver.Core.Polynomial.Parameters where open import Algebra.Bundles using (RawRing) open import Data.Bool.Base using (Bool; T) -open import Function open import Level open import Relation.Unary open import Tactic.RingSolver.Core.AlmostCommutativeRing diff --git a/src/Tactic/RingSolver/NonReflective.agda b/src/Tactic/RingSolver/NonReflective.agda index 1c65a6c1bb..ef99adc22e 100644 --- a/src/Tactic/RingSolver/NonReflective.agda +++ b/src/Tactic/RingSolver/NonReflective.agda @@ -18,7 +18,7 @@ module Tactic.RingSolver.NonReflective where open import Algebra.Morphism -open import Function +open import Function.Base using (id; _⟨_⟩_) open import Data.Bool.Base using (Bool; true; false; T; if_then_else_) open import Data.Maybe.Base open import Data.Empty using (⊥-elim) From 2b1c341deaece45ba9df2096fc5c1094f208514c Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Fri, 28 Jul 2023 16:02:13 -0400 Subject: [PATCH 076/316] Simplify more `Data.product` imports (#2014) * Simplify more `Data.Product` import to `Data.Product.Base` * Missed an import --- src/Codata/Guarded/Stream/Properties.agda | 2 +- src/Codata/Guarded/Stream/Relation/Unary/All.agda | 2 +- src/Codata/Musical/Covec.agda | 2 +- src/Codata/Sized/Colist.agda | 2 +- src/Codata/Sized/Colist/Properties.agda | 2 +- src/Codata/Sized/M/Bisimilarity.agda | 2 +- src/Codata/Sized/M/Properties.agda | 2 +- src/Codata/Sized/Stream/Effectful.agda | 2 +- src/Codata/Sized/Stream/Properties.agda | 2 +- src/Data/AVL/IndexedMap.agda | 2 +- src/Data/Char/Properties.agda | 2 +- src/Data/Digit/Properties.agda | 2 +- src/Data/Fin/Induction.agda | 2 +- src/Data/Fin/Permutation.agda | 2 +- src/Data/Fin/Permutation/Components.agda | 2 +- src/Data/Fin/Permutation/Transposition/List.agda | 2 +- src/Data/Integer/Properties.agda | 3 +-- src/Data/List/Extrema/Core.agda | 2 +- src/Data/List/Extrema/Nat.agda | 2 +- src/Data/List/Fresh/Properties.agda | 2 +- src/Data/List/Fresh/Relation/Unary/All.agda | 2 +- src/Data/List/Fresh/Relation/Unary/All/Properties.agda | 2 +- src/Data/List/Fresh/Relation/Unary/Any/Properties.agda | 2 +- src/Data/List/Nary/NonDependent.agda | 2 +- src/Data/List/NonEmpty/Effectful.agda | 2 +- src/Data/List/Relation/Binary/Disjoint/Setoid.agda | 2 +- src/Data/List/Relation/Binary/Disjoint/Setoid/Properties.agda | 2 +- src/Data/List/Relation/Binary/Lex/Strict.agda | 2 +- .../Relation/Binary/Permutation/Propositional/Properties.agda | 2 +- .../List/Relation/Binary/Prefix/Heterogeneous/Properties.agda | 2 +- 30 files changed, 30 insertions(+), 31 deletions(-) diff --git a/src/Codata/Guarded/Stream/Properties.agda b/src/Codata/Guarded/Stream/Properties.agda index 29ea54bb1d..df68a9c4b2 100644 --- a/src/Codata/Guarded/Stream/Properties.agda +++ b/src/Codata/Guarded/Stream/Properties.agda @@ -16,7 +16,7 @@ open import Data.List.Base as List using (List; []; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_) open import Data.Nat.Base using (ℕ; zero; suc; _+_; _*_) import Data.Nat.GeneralisedArithmetic as ℕ -open import Data.Product as Prod using (_×_; _,_; proj₁; proj₂) +open import Data.Product.Base as Prod using (_×_; _,_; proj₁; proj₂) open import Data.Vec.Base as Vec using (Vec; _∷_) open import Function.Base using (const; flip; id; _∘′_; _$′_; _⟨_⟩_; _∘₂′_) open import Level using (Level) diff --git a/src/Codata/Guarded/Stream/Relation/Unary/All.agda b/src/Codata/Guarded/Stream/Relation/Unary/All.agda index ad87a7e589..69171a8960 100644 --- a/src/Codata/Guarded/Stream/Relation/Unary/All.agda +++ b/src/Codata/Guarded/Stream/Relation/Unary/All.agda @@ -9,7 +9,7 @@ module Codata.Guarded.Stream.Relation.Unary.All where open import Codata.Guarded.Stream using (Stream; head; tail) -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Level open import Relation.Unary diff --git a/src/Codata/Musical/Covec.agda b/src/Codata/Musical/Covec.agda index 88b15c070b..8993fd5aa8 100644 --- a/src/Codata/Musical/Covec.agda +++ b/src/Codata/Musical/Covec.agda @@ -14,7 +14,7 @@ open import Codata.Musical.Cofin using (Cofin; zero; suc) open import Codata.Musical.Colist as Colist using (Colist; []; _∷_) open import Data.Nat.Base using (ℕ; zero; suc) open import Data.Vec.Base using (Vec; []; _∷_) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_∋_) open import Level using (Level) open import Relation.Binary diff --git a/src/Codata/Sized/Colist.agda b/src/Codata/Sized/Colist.agda index e57a5b632e..0675721bab 100644 --- a/src/Codata/Sized/Colist.agda +++ b/src/Codata/Sized/Colist.agda @@ -12,7 +12,7 @@ open import Level using (Level) open import Size open import Data.Unit.Base open import Data.Nat.Base -open import Data.Product using (_×_ ; _,_) +open import Data.Product.Base using (_×_ ; _,_) open import Data.These.Base using (These; this; that; these) open import Data.Maybe.Base using (Maybe; nothing; just) open import Data.List.Base using (List; []; _∷_) diff --git a/src/Codata/Sized/Colist/Properties.agda b/src/Codata/Sized/Colist/Properties.agda index de5925e482..5b77551b7f 100644 --- a/src/Codata/Sized/Colist/Properties.agda +++ b/src/Codata/Sized/Colist/Properties.agda @@ -27,7 +27,7 @@ open import Data.Maybe.Base as Maybe using (Maybe; nothing; just) import Data.Maybe.Properties as Maybeₚ open import Data.Maybe.Relation.Unary.All using (All; nothing; just) open import Data.Nat.Base as ℕ using (zero; suc; z≤n; s≤s) -open import Data.Product as Prod using (_×_; _,_; uncurry) +open import Data.Product.Base as Prod using (_×_; _,_; uncurry) open import Data.These.Base as These using (These; this; that; these) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Function.Base diff --git a/src/Codata/Sized/M/Bisimilarity.agda b/src/Codata/Sized/M/Bisimilarity.agda index 3a60a91d16..ef26860e66 100644 --- a/src/Codata/Sized/M/Bisimilarity.agda +++ b/src/Codata/Sized/M/Bisimilarity.agda @@ -14,7 +14,7 @@ open import Codata.Sized.Thunk open import Codata.Sized.M open import Data.Container.Core open import Data.Container.Relation.Binary.Pointwise using (Pointwise; _,_) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_∋_) open import Relation.Binary import Relation.Binary.PropositionalEquality.Core as P diff --git a/src/Codata/Sized/M/Properties.agda b/src/Codata/Sized/M/Properties.agda index 4161f4d1f1..f9801448f5 100644 --- a/src/Codata/Sized/M/Properties.agda +++ b/src/Codata/Sized/M/Properties.agda @@ -15,7 +15,7 @@ open import Codata.Sized.M open import Codata.Sized.M.Bisimilarity open import Data.Container.Core as C hiding (map) import Data.Container.Morphism as Mp -open import Data.Product as Prod using (_,_) +open import Data.Product.Base as Prod using (_,_) open import Data.Product.Properties hiding (map-cong) open import Function.Base using (_$′_; _∘′_) import Relation.Binary.PropositionalEquality.Core as P diff --git a/src/Codata/Sized/Stream/Effectful.agda b/src/Codata/Sized/Stream/Effectful.agda index 00fe7eb2b1..a9636ad027 100644 --- a/src/Codata/Sized/Stream/Effectful.agda +++ b/src/Codata/Sized/Stream/Effectful.agda @@ -8,7 +8,7 @@ module Codata.Sized.Stream.Effectful where -open import Data.Product using (<_,_>) +open import Data.Product.Base using (<_,_>) open import Codata.Sized.Stream open import Effect.Functor open import Effect.Applicative diff --git a/src/Codata/Sized/Stream/Properties.agda b/src/Codata/Sized/Stream/Properties.agda index 51b0719c7d..69685e12b2 100644 --- a/src/Codata/Sized/Stream/Properties.agda +++ b/src/Codata/Sized/Stream/Properties.agda @@ -20,7 +20,7 @@ open import Data.Nat.GeneralisedArithmetic using (fold; fold-pull) open import Data.List.Base as List using ([]; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_) import Data.List.Relation.Binary.Equality.Propositional as Eq -open import Data.Product as Prod using (_,_) +open import Data.Product.Base as Prod using (_,_) open import Data.Vec.Base as Vec using (_∷_) open import Function.Base using (id; _$_; _∘′_; const) diff --git a/src/Data/AVL/IndexedMap.agda b/src/Data/AVL/IndexedMap.agda index 25bccdee5f..84dbcceba4 100644 --- a/src/Data/AVL/IndexedMap.agda +++ b/src/Data/AVL/IndexedMap.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Product as Prod +open import Data.Product.Base using (∃) open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core using (_≡_; cong; subst) import Data.Tree.AVL.Value diff --git a/src/Data/Char/Properties.agda b/src/Data/Char/Properties.agda index 2bbf63ab17..52a997fd81 100644 --- a/src/Data/Char/Properties.agda +++ b/src/Data/Char/Properties.agda @@ -12,7 +12,7 @@ open import Data.Bool.Base using (Bool) open import Data.Char.Base import Data.Nat.Base as ℕ import Data.Nat.Properties as ℕₚ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base open import Relation.Nullary using (¬_; yes; no) diff --git a/src/Data/Digit/Properties.agda b/src/Data/Digit/Properties.agda index 37ead69a28..113bdde6ca 100644 --- a/src/Data/Digit/Properties.agda +++ b/src/Data/Digit/Properties.agda @@ -11,7 +11,7 @@ import Data.Char.Properties as Charₚ open import Data.Nat.Base using (ℕ) open import Data.Nat.Properties using (_≤?_) open import Data.Fin.Properties using (inject≤-injective) -open import Data.Product using (_,_; proj₁) +open import Data.Product.Base using (_,_; proj₁) open import Data.Vec.Relation.Unary.Unique.Propositional using (Unique) import Data.Vec.Relation.Unary.Unique.Propositional.Properties as Uniqueₚ open import Data.Vec.Relation.Unary.AllPairs using (allPairs?) diff --git a/src/Data/Fin/Induction.agda b/src/Data/Fin/Induction.agda index 3c9bf54546..b0cf553d0d 100644 --- a/src/Data/Fin/Induction.agda +++ b/src/Data/Fin/Induction.agda @@ -13,7 +13,7 @@ open import Data.Nat.Base as ℕ using (ℕ; zero; suc; _∸_; s≤s) open import Data.Nat.Properties using (n<1+n; ≤⇒≯) import Data.Nat.Induction as ℕ import Data.Nat.Properties as ℕ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Vec.Base as Vec using (Vec; []; _∷_) open import Data.Vec.Relation.Unary.Linked as Linked using (Linked; [-]; _∷_) import Data.Vec.Relation.Unary.Linked.Properties as Linkedₚ diff --git a/src/Data/Fin/Permutation.agda b/src/Data/Fin/Permutation.agda index f6a7820b52..852a609779 100644 --- a/src/Data/Fin/Permutation.agda +++ b/src/Data/Fin/Permutation.agda @@ -15,7 +15,7 @@ open import Data.Fin.Patterns open import Data.Fin.Properties import Data.Fin.Permutation.Components as PC open import Data.Nat.Base using (ℕ; suc; zero) -open import Data.Product using (_,_; proj₂) +open import Data.Product.Base using (_,_; proj₂) open import Function.Bundles using (_↔_; Injection; Inverse; mk↔′) open import Function.Construct.Composition using (_↔-∘_) open import Function.Construct.Identity using (↔-id) diff --git a/src/Data/Fin/Permutation/Components.agda b/src/Data/Fin/Permutation/Components.agda index b053cee86b..e75fa29eb2 100644 --- a/src/Data/Fin/Permutation/Components.agda +++ b/src/Data/Fin/Permutation/Components.agda @@ -13,7 +13,7 @@ open import Data.Fin.Base open import Data.Fin.Properties open import Data.Nat.Base as ℕ using (zero; suc; _∸_) import Data.Nat.Properties as ℕₚ -open import Data.Product using (proj₂) +open import Data.Product.Base using (proj₂) open import Function.Base using (_∘_) open import Relation.Nullary.Reflects using (invert) open import Relation.Nullary using (does; _because_; yes; no) diff --git a/src/Data/Fin/Permutation/Transposition/List.agda b/src/Data/Fin/Permutation/Transposition/List.agda index 07feee0020..4da8f08d37 100644 --- a/src/Data/Fin/Permutation/Transposition/List.agda +++ b/src/Data/Fin/Permutation/Transposition/List.agda @@ -14,7 +14,7 @@ open import Data.Fin.Permutation as P hiding (lift₀) import Data.Fin.Permutation.Components as PC open import Data.List.Base using (List; []; _∷_; map) open import Data.Nat.Base using (ℕ; suc; zero) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Function.Base using (_∘_) open import Relation.Binary.PropositionalEquality using (_≡_; sym; cong; module ≡-Reasoning) diff --git a/src/Data/Integer/Properties.agda b/src/Data/Integer/Properties.agda index 518c1456f4..78011e54b1 100644 --- a/src/Data/Integer/Properties.agda +++ b/src/Data/Integer/Properties.agda @@ -21,11 +21,10 @@ open import Data.Nat as ℕ hiding (module ℕ) import Data.Nat.Properties as ℕ open import Data.Nat.Solver -open import Data.Product using (proj₁; proj₂; _,_) +open import Data.Product.Base using (proj₁; proj₂; _,_; _×_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂; [_,_]′) open import Data.Sign as Sign using (Sign) renaming (_*_ to _𝕊*_) import Data.Sign.Properties as 𝕊ₚ -open import Data.Product using (_×_) open import Function.Base using (_∘_; _$_; id) open import Level using (0ℓ) open import Relation.Binary diff --git a/src/Data/List/Extrema/Core.agda b/src/Data/List/Extrema/Core.agda index 1fb59ae06d..0ed9dbe159 100644 --- a/src/Data/List/Extrema/Core.agda +++ b/src/Data/List/Extrema/Core.agda @@ -15,7 +15,7 @@ open import Algebra.Core open import Algebra.Definitions import Algebra.Construct.NaturalChoice.Min as Min import Algebra.Construct.NaturalChoice.Max as Max -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Level using (Level) open import Relation.Binary.PropositionalEquality.Core using (_≡_) diff --git a/src/Data/List/Extrema/Nat.agda b/src/Data/List/Extrema/Nat.agda index 6e2899b8e6..89f513e2bf 100644 --- a/src/Data/List/Extrema/Nat.agda +++ b/src/Data/List/Extrema/Nat.agda @@ -18,7 +18,7 @@ open import Data.List.Base using (List) import Data.List.Extrema open import Data.List.Relation.Unary.Any as Any using (Any) open import Data.List.Relation.Unary.All as All using (All) -open import Data.Product using (_×_; _,_; uncurry′) +open import Data.Product.Base using (_×_; _,_; uncurry′) open import Level using (Level) open import Relation.Binary.PropositionalEquality.Core using (_≢_) diff --git a/src/Data/List/Fresh/Properties.agda b/src/Data/List/Fresh/Properties.agda index cc8925eca6..b22347f92e 100644 --- a/src/Data/List/Fresh/Properties.agda +++ b/src/Data/List/Fresh/Properties.agda @@ -9,7 +9,7 @@ module Data.List.Fresh.Properties where open import Level using (Level; _⊔_; Lift) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Relation.Nullary open import Relation.Unary as U using (Pred) open import Relation.Binary as B using (Rel) diff --git a/src/Data/List/Fresh/Relation/Unary/All.agda b/src/Data/List/Fresh/Relation/Unary/All.agda index c013f934bb..b0e2115ce1 100644 --- a/src/Data/List/Fresh/Relation/Unary/All.agda +++ b/src/Data/List/Fresh/Relation/Unary/All.agda @@ -9,7 +9,7 @@ module Data.List.Fresh.Relation.Unary.All where open import Level using (Level; _⊔_; Lift) -open import Data.Product using (_×_; _,_; proj₁; uncurry) +open import Data.Product.Base using (_×_; _,_; proj₁; uncurry) open import Data.Sum.Base as Sum using (inj₁; inj₂) open import Relation.Nullary.Decidable as Dec using (Dec; yes; no; _×-dec_) open import Relation.Unary as U diff --git a/src/Data/List/Fresh/Relation/Unary/All/Properties.agda b/src/Data/List/Fresh/Relation/Unary/All/Properties.agda index f2c47657b5..8c2f0c80b4 100644 --- a/src/Data/List/Fresh/Relation/Unary/All/Properties.agda +++ b/src/Data/List/Fresh/Relation/Unary/All/Properties.agda @@ -11,7 +11,7 @@ module Data.List.Fresh.Relation.Unary.All.Properties where open import Level using (Level; _⊔_; Lift) open import Data.Empty open import Data.Nat.Base using (ℕ; zero; suc) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_∘′_) open import Relation.Nullary open import Relation.Unary as U diff --git a/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda b/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda index 09ec3d5333..8b47063949 100644 --- a/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda +++ b/src/Data/List/Fresh/Relation/Unary/Any/Properties.agda @@ -12,7 +12,7 @@ open import Level using (Level; _⊔_; Lift) open import Data.Bool.Base using (true; false) open import Data.Empty open import Data.Nat.Base using (ℕ; zero; suc) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base as Sum using (_⊎_; inj₁; inj₂) open import Function.Base using (_∘′_) open import Relation.Nullary.Reflects using (invert) diff --git a/src/Data/List/Nary/NonDependent.agda b/src/Data/List/Nary/NonDependent.agda index 6fff2b0dac..f95da6345c 100644 --- a/src/Data/List/Nary/NonDependent.agda +++ b/src/Data/List/Nary/NonDependent.agda @@ -10,7 +10,7 @@ module Data.List.Nary.NonDependent where open import Data.Nat.Base using (zero; suc) open import Data.List.Base as List using (List; []; _∷_) -open import Data.Product as Prod using (_,_) +open import Data.Product.Base as Prod using (_,_) open import Data.Product.Nary.NonDependent using (Product) open import Function.Base using () open import Function.Nary.NonDependent.Base diff --git a/src/Data/List/NonEmpty/Effectful.agda b/src/Data/List/NonEmpty/Effectful.agda index 373ceceb26..e2edccdf9f 100644 --- a/src/Data/List/NonEmpty/Effectful.agda +++ b/src/Data/List/NonEmpty/Effectful.agda @@ -11,7 +11,7 @@ module Data.List.NonEmpty.Effectful where open import Agda.Builtin.List import Data.List.Effectful as List open import Data.List.NonEmpty.Base -open import Data.Product using (uncurry) +open import Data.Product.Base using (uncurry) open import Effect.Functor open import Effect.Applicative open import Effect.Monad diff --git a/src/Data/List/Relation/Binary/Disjoint/Setoid.agda b/src/Data/List/Relation/Binary/Disjoint/Setoid.agda index d5003aab4e..6ea7e15cf7 100644 --- a/src/Data/List/Relation/Binary/Disjoint/Setoid.agda +++ b/src/Data/List/Relation/Binary/Disjoint/Setoid.agda @@ -15,7 +15,7 @@ open import Relation.Nullary.Negation using (¬_) open import Function.Base using (_∘_) open import Data.List.Base using (List; []; [_]; _∷_) open import Data.List.Relation.Unary.Any using (here; there) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open Setoid S renaming (Carrier to A) open import Data.List.Membership.Setoid S using (_∈_; _∉_) diff --git a/src/Data/List/Relation/Binary/Disjoint/Setoid/Properties.agda b/src/Data/List/Relation/Binary/Disjoint/Setoid/Properties.agda index 3f0701a8ef..43a67d4d7d 100644 --- a/src/Data/List/Relation/Binary/Disjoint/Setoid/Properties.agda +++ b/src/Data/List/Relation/Binary/Disjoint/Setoid/Properties.agda @@ -14,7 +14,7 @@ import Data.List.Relation.Unary.Any as Any open import Data.List.Relation.Unary.All as All open import Data.List.Relation.Unary.All.Properties using (¬Any⇒All¬) open import Data.List.Relation.Unary.Any.Properties using (++⁻) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base using (inj₁; inj₂) open import Relation.Binary open import Relation.Nullary.Negation using (¬_) diff --git a/src/Data/List/Relation/Binary/Lex/Strict.agda b/src/Data/List/Relation/Binary/Lex/Strict.agda index fef11ad07e..c0428b347d 100644 --- a/src/Data/List/Relation/Binary/Lex/Strict.agda +++ b/src/Data/List/Relation/Binary/Lex/Strict.agda @@ -14,7 +14,7 @@ module Data.List.Relation.Binary.Lex.Strict where open import Data.Empty using (⊥) open import Data.Unit.Base using (⊤; tt) open import Function.Base using (_∘_; id) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Sum.Base using (inj₁; inj₂) open import Data.List.Base using (List; []; _∷_) open import Level using (_⊔_) diff --git a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda index 135d5a778d..dc7e34db86 100644 --- a/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda +++ b/src/Data/List/Relation/Binary/Permutation/Propositional/Properties.agda @@ -13,7 +13,7 @@ open import Algebra.Definitions open import Algebra.Structures open import Data.Bool.Base using (Bool; true; false) open import Data.Nat using (suc) -open import Data.Product using (-,_; proj₂) +open import Data.Product.Base using (-,_; proj₂) open import Data.List.Base as List open import Data.List.Relation.Binary.Permutation.Propositional open import Data.List.Relation.Unary.Any using (Any; here; there) diff --git a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda index da5a26e6e0..21e61b4aa4 100644 --- a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda @@ -19,7 +19,7 @@ open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) open import Data.List.Relation.Binary.Prefix.Heterogeneous as Prefix hiding (PrefixView; _++_) open import Data.Nat.Base using (ℕ; zero; suc; _≤_; z≤n; s≤s) open import Data.Nat.Properties using (suc-injective) -open import Data.Product as Prod using (_×_; _,_; proj₁; proj₂; uncurry) +open import Data.Product.Base as Prod using (_×_; _,_; proj₁; proj₂; uncurry) open import Function.Base open import Relation.Nullary.Negation using (¬_) From f1c6e48051e9f0f94c36c8765ac7ad834eb7bddb Mon Sep 17 00:00:00 2001 From: Sofia El Boufi--Crouzet <136095087+Sofia-Insa@users.noreply.github.com> Date: Sat, 29 Jul 2023 01:09:33 -0400 Subject: [PATCH 077/316] Simplify import of `Data.List.Relation.Binary.Pointwise` in agda-stdl (#2019) * Simplify import of `Data.List.Relation.Binary.Pointwise` in agda-stdl * rectifications on Data.List.Relation.Binary.Pointwise import * rectifications on Data.List.Relation.Binary.Pointwise import * Delete weights-README.dot * Delete weight.png * Delete README.dot --- README/Case.agda | 1 - README/Data/List/Relation/Binary/Equality.agda | 2 +- README/Inspect.agda | 3 ++- src/Codata/Sized/Colist/Bisimilarity.agda | 2 +- src/Codata/Sized/Stream/Bisimilarity.agda | 2 +- src/Data/Container/Indexed/FreeMonad.agda | 2 +- .../List/Relation/Binary/Infix/Heterogeneous/Properties.agda | 3 +-- src/Data/List/Relation/Binary/Lex/NonStrict.agda | 2 +- src/Data/List/Relation/Binary/Permutation/Homogeneous.agda | 4 +++- src/Data/List/Relation/Binary/Permutation/Setoid.agda | 2 +- .../List/Relation/Binary/Prefix/Heterogeneous/Properties.agda | 2 +- src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda | 2 +- src/Data/List/Relation/Ternary/Appending.agda | 2 +- src/Data/List/Relation/Ternary/Appending/Properties.agda | 3 ++- src/Data/List/Relation/Ternary/Appending/Propositional.agda | 3 +-- .../Relation/Ternary/Appending/Propositional/Properties.agda | 2 +- .../List/Relation/Ternary/Appending/Setoid/Properties.agda | 2 +- src/Data/List/Relation/Ternary/Interleaving.agda | 2 +- src/Data/List/Relation/Ternary/Interleaving/Properties.agda | 4 +++- src/Data/List/Relation/Unary/All/Properties.agda | 2 +- src/Data/String.agda | 2 +- src/Text/Regex/Properties.agda | 3 +-- 22 files changed, 27 insertions(+), 25 deletions(-) diff --git a/README/Case.agda b/README/Case.agda index 450105aff9..15449391d4 100644 --- a/README/Case.agda +++ b/README/Case.agda @@ -16,7 +16,6 @@ open import Data.Product open import Function.Base using (case_of_; case_return_of_) open import Relation.Nullary open import Relation.Binary -open import Relation.Binary.PropositionalEquality ------------------------------------------------------------------------ -- Different types of pattern-matching lambdas diff --git a/README/Data/List/Relation/Binary/Equality.agda b/README/Data/List/Relation/Binary/Equality.agda index 6201dc5c5d..4ce5fe2478 100644 --- a/README/Data/List/Relation/Binary/Equality.agda +++ b/README/Data/List/Relation/Binary/Equality.agda @@ -54,7 +54,7 @@ open import Relation.Binary.PropositionalEquality using (_≗_) -- to `_≗_`. However instead of using the pointwise module directly -- to write: -open import Data.List.Relation.Binary.Pointwise using (Pointwise) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise) lem₃ : Pointwise _≗_ ((λ x → x + 1) ∷ []) ((λ x → x + 2 ∸ 1) ∷ []) lem₃ = {!!} diff --git a/README/Inspect.agda b/README/Inspect.agda index cff492d008..002005abaa 100644 --- a/README/Inspect.agda +++ b/README/Inspect.agda @@ -15,7 +15,8 @@ module README.Inspect where open import Data.Nat.Base open import Data.Nat.Properties open import Data.Product -open import Relation.Binary.PropositionalEquality +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) +open import Relation.Binary.PropositionalEquality using (inspect) ------------------------------------------------------------------------ -- Using inspect diff --git a/src/Codata/Sized/Colist/Bisimilarity.agda b/src/Codata/Sized/Colist/Bisimilarity.agda index 9efbcebbca..d66ade8b89 100644 --- a/src/Codata/Sized/Colist/Bisimilarity.agda +++ b/src/Codata/Sized/Colist/Bisimilarity.agda @@ -13,7 +13,7 @@ open import Size open import Codata.Sized.Thunk open import Codata.Sized.Colist open import Data.List.Base using (List; []; _∷_) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Data.List.NonEmpty as List⁺ using (List⁺; _∷_) open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) diff --git a/src/Codata/Sized/Stream/Bisimilarity.agda b/src/Codata/Sized/Stream/Bisimilarity.agda index 74419c7809..c036d030b7 100644 --- a/src/Codata/Sized/Stream/Bisimilarity.agda +++ b/src/Codata/Sized/Stream/Bisimilarity.agda @@ -13,7 +13,7 @@ open import Codata.Sized.Thunk open import Codata.Sized.Stream open import Level open import Data.List.NonEmpty as List⁺ using (_∷_) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core as Eq using (_≡_) import Relation.Binary.PropositionalEquality.Properties as Eq diff --git a/src/Data/Container/Indexed/FreeMonad.agda b/src/Data/Container/Indexed/FreeMonad.agda index f2fe0d2aab..1c6ee81c1a 100644 --- a/src/Data/Container/Indexed/FreeMonad.agda +++ b/src/Data/Container/Indexed/FreeMonad.agda @@ -19,7 +19,7 @@ open import Data.Product open import Data.W.Indexed open import Relation.Unary open import Relation.Unary.PredicateTransformer -open import Relation.Binary.PropositionalEquality +open import Relation.Binary.PropositionalEquality.Core using (refl) ------------------------------------------------------------------------ diff --git a/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda index f9610d5422..cc067dc846 100644 --- a/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Infix/Heterogeneous/Properties.agda @@ -22,8 +22,7 @@ open import Relation.Nullary.Negation using (¬_; contradiction) open import Relation.Unary as U using (Pred) open import Relation.Binary using (REL; _⇒_; Decidable; Trans; Antisym) open import Relation.Binary.PropositionalEquality.Core using (_≢_; refl; cong) - -open import Data.List.Relation.Binary.Pointwise as Pointwise using (Pointwise) +open import Data.List.Relation.Binary.Pointwise.Base as Pointwise using (Pointwise) open import Data.List.Relation.Binary.Infix.Heterogeneous open import Data.List.Relation.Binary.Prefix.Heterogeneous as Prefix using (Prefix; []; _∷_) diff --git a/src/Data/List/Relation/Binary/Lex/NonStrict.agda b/src/Data/List/Relation/Binary/Lex/NonStrict.agda index 83c8767cb3..4606c9cdbd 100644 --- a/src/Data/List/Relation/Binary/Lex/NonStrict.agda +++ b/src/Data/List/Relation/Binary/Lex/NonStrict.agda @@ -16,7 +16,7 @@ open import Function.Base open import Data.Unit.Base using (⊤; tt) open import Data.Product open import Data.List.Base -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []) import Data.List.Relation.Binary.Lex.Strict as Strict open import Level open import Relation.Nullary diff --git a/src/Data/List/Relation/Binary/Permutation/Homogeneous.agda b/src/Data/List/Relation/Binary/Permutation/Homogeneous.agda index 9e247e734b..6b9fd9c20d 100644 --- a/src/Data/List/Relation/Binary/Permutation/Homogeneous.agda +++ b/src/Data/List/Relation/Binary/Permutation/Homogeneous.agda @@ -9,8 +9,10 @@ module Data.List.Relation.Binary.Permutation.Homogeneous where open import Data.List.Base using (List; _∷_) -open import Data.List.Relation.Binary.Pointwise as Pointwise +open import Data.List.Relation.Binary.Pointwise.Base as Pointwise using (Pointwise) +open import Data.List.Relation.Binary.Pointwise.Properties as Pointwise + using (symmetric) open import Level using (Level; _⊔_) open import Relation.Binary diff --git a/src/Data/List/Relation/Binary/Permutation/Setoid.agda b/src/Data/List/Relation/Binary/Permutation/Setoid.agda index 5a147d8008..a9a0cf6400 100644 --- a/src/Data/List/Relation/Binary/Permutation/Setoid.agda +++ b/src/Data/List/Relation/Binary/Permutation/Setoid.agda @@ -13,7 +13,7 @@ module Data.List.Relation.Binary.Permutation.Setoid open import Data.List.Base using (List; _∷_) import Data.List.Relation.Binary.Permutation.Homogeneous as Homogeneous -import Data.List.Relation.Binary.Pointwise as Pointwise +import Data.List.Relation.Binary.Pointwise.Properties as Pointwise using (refl) open import Data.List.Relation.Binary.Equality.Setoid S open import Data.Nat.Base using (ℕ; zero; suc; _+_) open import Level using (_⊔_) diff --git a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda index 21e61b4aa4..5706dbc36e 100644 --- a/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda +++ b/src/Data/List/Relation/Binary/Prefix/Heterogeneous/Properties.agda @@ -15,7 +15,7 @@ open import Data.List.Relation.Unary.All as All using (All; []; _∷_) import Data.List.Relation.Unary.All.Properties as All open import Data.List.Base as List hiding (map; uncons) open import Data.List.Membership.Propositional.Properties using ([]∈inits) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Data.List.Relation.Binary.Prefix.Heterogeneous as Prefix hiding (PrefixView; _++_) open import Data.Nat.Base using (ℕ; zero; suc; _≤_; z≤n; s≤s) open import Data.Nat.Properties using (suc-injective) diff --git a/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda b/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda index 984b857c59..aeeb927d2d 100644 --- a/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda +++ b/src/Data/List/Relation/Binary/Suffix/Heterogeneous.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Binary.Suffix.Heterogeneous where open import Level open import Relation.Binary using (REL; _⇒_) open import Data.List.Base as List using (List; []; _∷_) -open import Data.List.Relation.Binary.Pointwise as Pointwise +open import Data.List.Relation.Binary.Pointwise.Base as Pointwise using (Pointwise; []; _∷_) module _ {a b r} {A : Set a} {B : Set b} (R : REL A B r) where diff --git a/src/Data/List/Relation/Ternary/Appending.agda b/src/Data/List/Relation/Ternary/Appending.agda index 0d1f935414..802f80aac3 100644 --- a/src/Data/List/Relation/Ternary/Appending.agda +++ b/src/Data/List/Relation/Ternary/Appending.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Ternary.Appending {a b c} {A : Set a} {B : Set b} {C : open import Level using (Level; _⊔_) open import Data.List.Base as List using (List; []; _∷_) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Data.Product as Prod using (∃₂; _×_; _,_; -,_) open import Relation.Binary using (REL) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong) diff --git a/src/Data/List/Relation/Ternary/Appending/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Properties.agda index 4508a7f719..6c02c49ffb 100644 --- a/src/Data/List/Relation/Ternary/Appending/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Properties.agda @@ -10,7 +10,8 @@ module Data.List.Relation.Ternary.Appending.Properties where open import Data.List.Base using (List; []) open import Data.List.Relation.Ternary.Appending -open import Data.List.Relation.Binary.Pointwise as Pw using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base as Pw using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Properties as Pw using (transitive) open import Level using (Level) open import Relation.Binary using (REL; Rel; Trans) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) diff --git a/src/Data/List/Relation/Ternary/Appending/Propositional.agda b/src/Data/List/Relation/Ternary/Appending/Propositional.agda index 6149e2a236..46567a01ed 100644 --- a/src/Data/List/Relation/Ternary/Appending/Propositional.agda +++ b/src/Data/List/Relation/Ternary/Appending/Propositional.agda @@ -14,8 +14,7 @@ open import Data.List.Base as List using (List; []; _∷_) open import Data.Product using (_,_) import Data.List.Properties as Listₚ -import Data.List.Relation.Binary.Pointwise as Pw - +import Data.List.Relation.Binary.Pointwise as Pw using (≡⇒Pointwise-≡; Pointwise-≡⇒≡) open import Relation.Binary.PropositionalEquality using (_≡_; setoid; refl; trans; cong₂; module ≡-Reasoning) diff --git a/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda index 757d888012..54e19f59d2 100644 --- a/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Propositional/Properties.agda @@ -10,7 +10,7 @@ module Data.List.Relation.Ternary.Appending.Propositional.Properties {a} {A : Se open import Data.List.Base as List using (List; []) import Data.List.Properties as Listₚ -import Data.List.Relation.Binary.Pointwise as Pw +import Data.List.Relation.Binary.Pointwise as Pw using (Pointwise-≡⇒≡) open import Data.List.Relation.Binary.Equality.Propositional using (_≋_) open import Data.List.Relation.Ternary.Appending.Propositional {A = A} open import Function.Base using (_∘′_) diff --git a/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda b/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda index 0530b8b965..c205170359 100644 --- a/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda +++ b/src/Data/List/Relation/Ternary/Appending/Setoid/Properties.agda @@ -12,7 +12,7 @@ module Data.List.Relation.Ternary.Appending.Setoid.Properties {c l} (S : Setoid open import Data.List.Base as List using (List; []) import Data.List.Properties as Listₚ -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []) import Data.List.Relation.Ternary.Appending.Properties as Appendingₚ open import Data.Product using (_,_) open import Relation.Binary.PropositionalEquality.Core using (refl) diff --git a/src/Data/List/Relation/Ternary/Interleaving.agda b/src/Data/List/Relation/Ternary/Interleaving.agda index 62206daf2c..158701fc7e 100644 --- a/src/Data/List/Relation/Ternary/Interleaving.agda +++ b/src/Data/List/Relation/Ternary/Interleaving.agda @@ -11,7 +11,7 @@ module Data.List.Relation.Ternary.Interleaving where open import Level open import Data.List.Base as List using (List; []; _∷_; _++_) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Data.Product as Prod using (∃; ∃₂; _×_; uncurry; _,_; -,_; proj₂) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Function.Base diff --git a/src/Data/List/Relation/Ternary/Interleaving/Properties.agda b/src/Data/List/Relation/Ternary/Interleaving/Properties.agda index ba61947c85..da3d687ba5 100644 --- a/src/Data/List/Relation/Ternary/Interleaving/Properties.agda +++ b/src/Data/List/Relation/Ternary/Interleaving/Properties.agda @@ -15,7 +15,9 @@ open import Data.List.Properties using (reverse-involutive) open import Data.List.Relation.Ternary.Interleaving hiding (map) open import Function.Base using (_$_) open import Relation.Binary -open import Relation.Binary.PropositionalEquality +--open import Relation.Binary.PropositionalEquality +-- using (_≡_; refl; sym; cong; module ≡-Reasoning) +open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; sym; cong; module ≡-Reasoning) open ≡-Reasoning diff --git a/src/Data/List/Relation/Unary/All/Properties.agda b/src/Data/List/Relation/Unary/All/Properties.agda index 004424df80..da3de23dd9 100644 --- a/src/Data/List/Relation/Unary/All/Properties.agda +++ b/src/Data/List/Relation/Unary/All/Properties.agda @@ -25,7 +25,7 @@ open import Data.List.Relation.Unary.All as All using ) open import Data.List.Relation.Unary.Any as Any using (Any; here; there) import Data.List.Relation.Binary.Equality.Setoid as ListEq using (_≋_; []; _∷_) -open import Data.List.Relation.Binary.Pointwise using (Pointwise; []; _∷_) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise; []; _∷_) open import Data.List.Relation.Binary.Subset.Propositional using (_⊆_) open import Data.Maybe.Base as Maybe using (Maybe; just; nothing) open import Data.Maybe.Relation.Unary.All as Maybe using (just; nothing) diff --git a/src/Data/String.agda b/src/Data/String.agda index 8a6dd08045..6a63342ccd 100644 --- a/src/Data/String.agda +++ b/src/Data/String.agda @@ -16,7 +16,7 @@ import Data.Nat.Properties as ℕₚ open import Data.List.Base as List using (List; _∷_; []; [_]) open import Data.List.NonEmpty as NE using (List⁺) open import Data.List.Extrema ℕₚ.≤-totalOrder -open import Data.List.Relation.Binary.Pointwise using (Pointwise) +open import Data.List.Relation.Binary.Pointwise.Base using (Pointwise) open import Data.List.Relation.Binary.Lex.Strict using (Lex-<; Lex-≤) open import Data.Vec.Base as Vec using (Vec) open import Data.Char.Base as Char using (Char) diff --git a/src/Text/Regex/Properties.agda b/src/Text/Regex/Properties.agda index 815bf04471..02b6db2039 100644 --- a/src/Text/Regex/Properties.agda +++ b/src/Text/Regex/Properties.agda @@ -27,8 +27,7 @@ open import Relation.Binary.Definitions using (Decidable) open DecPoset P? renaming (Carrier to A) open import Text.Regex.Base preorder - -open import Data.List.Relation.Binary.Pointwise using ([]) +open import Data.List.Relation.Binary.Pointwise.Base using ([]) open import Data.List.Relation.Ternary.Appending.Propositional {A = A} open import Data.List.Relation.Ternary.Appending.Propositional.Properties {A = A} From ec52a7713553dc3a12ffc5b44dfa942b40ab3f0c Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Sat, 29 Jul 2023 01:56:18 -0400 Subject: [PATCH 078/316] Bump stdlib and agda version in installation guide (#2027) --- notes/installation-guide.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/notes/installation-guide.md b/notes/installation-guide.md index f7f351b484..f05f21ed90 100644 --- a/notes/installation-guide.md +++ b/notes/installation-guide.md @@ -3,19 +3,19 @@ Installation instructions Note: the full story on installing Agda libraries can be found at [readthedocs](http://agda.readthedocs.io/en/latest/tools/package-system.html). -Use version v1.7.1 of the standard library with Agda 2.6.2.2, 2.6.2.1, or 2.6.2. +Use version v1.7.2 of the standard library with Agda 2.6.3. 1. Navigate to a suitable directory `$HERE` (replace appropriately) where you would like to install the library. -2. Download the tarball of v1.7.1 of the standard library. This can either be +2. Download the tarball of v1.7.2 of the standard library. This can either be done manually by visiting the Github repository for the library, or via the command line as follows: ``` - wget -O agda-stdlib.tar https://github.com/agda/agda-stdlib/archive/v1.7.1.tar.gz + wget -O agda-stdlib.tar https://github.com/agda/agda-stdlib/archive/v1.7.2.tar.gz ``` Note that you can replace `wget` with other popular tools such as `curl` and that - you can replace `1.7.1` with any other version of the library you desire. + you can replace `1.7.2` with any other version of the library you desire. 3. Extract the standard library from the tarball. Again this can either be done manually or via the command line as follows: @@ -26,7 +26,7 @@ Use version v1.7.1 of the standard library with Agda 2.6.2.2, 2.6.2.1, or 2.6.2. 4. [ OPTIONAL ] If using [cabal](https://www.haskell.org/cabal/) then run the commands to install via cabal: ``` - cd agda-stdlib-1.7.1 + cd agda-stdlib-1.7.2 cabal install ``` @@ -40,7 +40,7 @@ Use version v1.7.1 of the standard library with Agda 2.6.2.2, 2.6.2.1, or 2.6.2. 6. Register the standard library with Agda's package system by adding the following line to `$HOME/.agda/libraries`: ``` - $HERE/agda-stdlib-1.7.1/standard-library.agda-lib + $HERE/agda-stdlib-1.7.2/standard-library.agda-lib ``` Now, the standard library is ready to be used either: From 55ec99dd03bc651abe7c63f58ffaf27a022ece65 Mon Sep 17 00:00:00 2001 From: Saransh Chopra Date: Sat, 29 Jul 2023 04:40:59 -0400 Subject: [PATCH 079/316] Simplify more `Data.Product` imports to `Data.Product.Base` (#2036) * Simplify more `Data.Product` import to `Data.Product.Base` * Simplify more `Data.Product` import to `Data.Product.Base` * Indent --- src/Function/Endomorphism/Propositional.agda | 2 +- src/Function/Nary/NonDependent.agda | 2 +- src/Function/Properties/Bijection.agda | 2 +- src/Function/Related.agda | 2 +- src/Function/Related/TypeIsomorphisms/Solver.agda | 2 +- src/Reflection/AST/Abstraction.agda | 2 +- src/Reflection/AST/Argument.agda | 2 +- src/Reflection/AST/Definition.agda | 2 +- src/Reflection/AST/Show.agda | 2 +- src/Reflection/AST/Term.agda | 4 ++-- src/Reflection/AST/Traversal.agda | 2 +- src/Reflection/AST/Universe.agda | 2 +- src/Reflection/AnnotatedAST.agda | 2 +- src/Reflection/AnnotatedAST/Free.agda | 2 +- src/Reflection/External.agda | 2 +- src/Relation/Binary/Construct/Subst/Equality.agda | 2 +- src/Relation/Binary/Indexed/Homogeneous/Bundles.agda | 2 +- src/Relation/Binary/Indexed/Homogeneous/Core.agda | 2 +- src/Relation/Binary/Indexed/Homogeneous/Definitions.agda | 2 +- src/Relation/Binary/Indexed/Homogeneous/Structures.agda | 2 +- src/Relation/Binary/Lattice/Properties/BoundedLattice.agda | 2 +- .../Binary/Lattice/Properties/DistributiveLattice.agda | 2 +- src/Relation/Binary/Lattice/Properties/Lattice.agda | 2 +- src/Relation/Binary/Morphism/Construct/Identity.agda | 2 +- src/Relation/Binary/Morphism/OrderMonomorphism.agda | 2 +- src/Relation/Binary/Properties/HeytingAlgebra.agda | 2 +- src/Relation/Nary.agda | 2 +- src/Relation/Nullary/Universe.agda | 2 +- src/Relation/Unary/Algebra.agda | 2 +- src/System/Environment.agda | 2 +- src/System/FilePath/Posix.agda | 2 +- src/System/Process.agda | 2 +- src/Tactic/MonoidSolver.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Addition.agda | 2 +- .../Core/Polynomial/Homomorphism/Exponentiation.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda | 2 +- .../Core/Polynomial/Homomorphism/Multiplication.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Negation.agda | 2 +- .../RingSolver/Core/Polynomial/Homomorphism/Variables.agda | 2 +- src/Tactic/RingSolver/Core/Polynomial/Semantics.agda | 2 +- src/Test/Golden.agda | 2 +- src/Text/Regex/Properties/Core.agda | 2 +- src/Text/Tabular/List.agda | 2 +- src/Text/Tabular/Vec.agda | 2 +- 44 files changed, 45 insertions(+), 45 deletions(-) diff --git a/src/Function/Endomorphism/Propositional.agda b/src/Function/Endomorphism/Propositional.agda index 9cb46af85f..d53142c532 100644 --- a/src/Function/Endomorphism/Propositional.agda +++ b/src/Function/Endomorphism/Propositional.agda @@ -16,7 +16,7 @@ open import Algebra.Morphism; open Definitions open import Data.Nat.Base using (ℕ; zero; suc; _+_) open import Data.Nat.Properties using (+-0-monoid; +-semigroup) -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id; _∘′_; _∋_) open import Function.Equality using (_⟨$⟩_) diff --git a/src/Function/Nary/NonDependent.agda b/src/Function/Nary/NonDependent.agda index 3c29079b5e..aa9c35a0f5 100644 --- a/src/Function/Nary/NonDependent.agda +++ b/src/Function/Nary/NonDependent.agda @@ -17,7 +17,7 @@ module Function.Nary.NonDependent where open import Level using (Level; 0ℓ; _⊔_; Lift) open import Data.Nat.Base using (ℕ; zero; suc) open import Data.Fin.Base using (Fin; zero; suc) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.Product.Nary.NonDependent open import Function.Base using (_∘′_; _$′_; const; flip) open import Relation.Unary using (IUniversal) diff --git a/src/Function/Properties/Bijection.agda b/src/Function/Properties/Bijection.agda index c8abd7db19..89aab1b58e 100644 --- a/src/Function/Properties/Bijection.agda +++ b/src/Function/Properties/Bijection.agda @@ -13,7 +13,7 @@ open import Level using (Level) open import Relation.Binary hiding (_⇔_) import Relation.Binary.PropositionalEquality.Properties as P import Relation.Binary.Reasoning.Setoid as SetoidReasoning -open import Data.Product using (_,_; proj₁; proj₂) +open import Data.Product.Base using (_,_; proj₁; proj₂) open import Function.Base using (_∘_) open import Function.Properties.Inverse using (Inverse⇒Equivalence) diff --git a/src/Function/Related.agda b/src/Function/Related.agda index ca06dceffb..12920055af 100644 --- a/src/Function/Related.agda +++ b/src/Function/Related.agda @@ -20,7 +20,7 @@ open import Function.Surjection as Surj using (Surjection) open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.PropositionalEquality.Properties as P -open import Data.Product using (_,_; proj₁; proj₂; <_,_>) +open import Data.Product.Base using (_,_; proj₁; proj₂; <_,_>) import Function.Related.Propositional as R import Function.Bundles as B diff --git a/src/Function/Related/TypeIsomorphisms/Solver.agda b/src/Function/Related/TypeIsomorphisms/Solver.agda index 29f19c8afd..52f27d15ed 100644 --- a/src/Function/Related/TypeIsomorphisms/Solver.agda +++ b/src/Function/Related/TypeIsomorphisms/Solver.agda @@ -13,7 +13,7 @@ module Function.Related.TypeIsomorphisms.Solver where open import Algebra using (CommutativeSemiring) import Algebra.Solver.Ring.NaturalCoefficients.Default open import Data.Empty.Polymorphic using (⊥) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Data.Sum.Base using (_⊎_) open import Data.Unit.Polymorphic using (⊤) open import Level using (Level) diff --git a/src/Reflection/AST/Abstraction.agda b/src/Reflection/AST/Abstraction.agda index 793c729aec..55043355d7 100644 --- a/src/Reflection/AST/Abstraction.agda +++ b/src/Reflection/AST/Abstraction.agda @@ -8,7 +8,7 @@ module Reflection.AST.Abstraction where -open import Data.Product using (_×_; <_,_>; uncurry) +open import Data.Product.Base using (_×_; <_,_>; uncurry) open import Data.String as String using (String) open import Level open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) diff --git a/src/Reflection/AST/Argument.agda b/src/Reflection/AST/Argument.agda index 0feb2deddd..449a45c4d8 100644 --- a/src/Reflection/AST/Argument.agda +++ b/src/Reflection/AST/Argument.agda @@ -9,7 +9,7 @@ module Reflection.AST.Argument where open import Data.List.Base as List using (List; []; _∷_) -open import Data.Product using (_×_; <_,_>; uncurry) +open import Data.Product.Base using (_×_; <_,_>; uncurry) open import Relation.Nullary.Decidable using (Dec; map′; _×-dec_) open import Relation.Binary using (DecidableEquality) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong₂) diff --git a/src/Reflection/AST/Definition.agda b/src/Reflection/AST/Definition.agda index 7ccabb6f51..ea005eebd3 100644 --- a/src/Reflection/AST/Definition.agda +++ b/src/Reflection/AST/Definition.agda @@ -10,7 +10,7 @@ module Reflection.AST.Definition where import Data.List.Properties as Listₚ using (≡-dec) import Data.Nat.Properties as ℕₚ using (_≟_) -open import Data.Product using (_×_; <_,_>; uncurry) +open import Data.Product.Base using (_×_; <_,_>; uncurry) open import Relation.Nullary.Decidable using (map′; _×-dec_; yes; no) open import Relation.Binary using (DecidableEquality) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong; cong₂) diff --git a/src/Reflection/AST/Show.agda b/src/Reflection/AST/Show.agda index f0291cf447..7650f6fc8e 100644 --- a/src/Reflection/AST/Show.agda +++ b/src/Reflection/AST/Show.agda @@ -15,7 +15,7 @@ import Data.Char as Char using (show) import Data.Float as Float using (show) open import Data.List.Base hiding (_++_; intersperse) import Data.Nat.Show as ℕ using (show) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.String as String using (String; _++_; intersperse; braces; parens; parensIfSpace; _<+>_) import Data.Word as Word using (toℕ) diff --git a/src/Reflection/AST/Term.agda b/src/Reflection/AST/Term.agda index cfa7e70cb1..c850900464 100644 --- a/src/Reflection/AST/Term.agda +++ b/src/Reflection/AST/Term.agda @@ -10,8 +10,8 @@ module Reflection.AST.Term where open import Data.List.Base as List hiding (_++_) open import Data.List.Properties using (∷-dec) -open import Data.Nat as ℕ using (ℕ; zero; suc) -open import Data.Product using (_×_; _,_; <_,_>; uncurry; map₁) +open import Data.Nat as ℕ using (ℕ; zero; suc) +open import Data.Product.Base using (_×_; _,_; <_,_>; uncurry; map₁) open import Data.Product.Properties using (,-injective) open import Data.Maybe.Base using (Maybe; just; nothing) open import Data.String as String using (String) diff --git a/src/Reflection/AST/Traversal.agda b/src/Reflection/AST/Traversal.agda index c311567c7f..5437c52b73 100644 --- a/src/Reflection/AST/Traversal.agda +++ b/src/Reflection/AST/Traversal.agda @@ -13,7 +13,7 @@ module Reflection.AST.Traversal open import Data.Nat using (ℕ; zero; suc; _+_) open import Data.List.Base using (List; []; _∷_; _++_; reverse; length) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.String using (String) open import Function.Base using (_∘_) open import Reflection hiding (pure) diff --git a/src/Reflection/AST/Universe.agda b/src/Reflection/AST/Universe.agda index 334458ce2d..dac0af71ed 100644 --- a/src/Reflection/AST/Universe.agda +++ b/src/Reflection/AST/Universe.agda @@ -10,7 +10,7 @@ module Reflection.AST.Universe where open import Data.List.Base using (List) open import Data.String.Base using (String) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Reflection.AST.Argument using (Arg) open import Reflection.AST.Abstraction using (Abs) open import Reflection.AST.Term using (Term; Pattern; Sort; Clause) diff --git a/src/Reflection/AnnotatedAST.agda b/src/Reflection/AnnotatedAST.agda index 8ebc54b919..9b281bd4bd 100644 --- a/src/Reflection/AnnotatedAST.agda +++ b/src/Reflection/AnnotatedAST.agda @@ -17,7 +17,7 @@ open import Effect.Applicative using (RawApplicative) open import Data.Bool.Base using (Bool; false; true; if_then_else_) open import Data.List.Base using (List; []; _∷_) open import Data.List.Relation.Unary.All using (All; _∷_; []) -open import Data.Product using (_×_; _,_; proj₁; proj₂) +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂) open import Data.String.Base using (String) open import Reflection hiding (pure) diff --git a/src/Reflection/AnnotatedAST/Free.agda b/src/Reflection/AnnotatedAST/Free.agda index 79ae7a96be..2017e2fd9f 100644 --- a/src/Reflection/AnnotatedAST/Free.agda +++ b/src/Reflection/AnnotatedAST/Free.agda @@ -12,7 +12,7 @@ open import Data.Bool.Base using (if_then_else_) open import Data.Nat.Base using (ℕ; _∸_; compare; _<ᵇ_; less; equal; greater) open import Data.List.Base using (List; []; _∷_; [_]; concatMap; length) open import Data.List.Relation.Unary.All using (_∷_) -open import Data.Product using (_×_; _,_; proj₁; proj₂) +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂) open import Data.String.Base using (String) open import Reflection diff --git a/src/Reflection/External.agda b/src/Reflection/External.agda index e7e9ae989d..5a132d9362 100644 --- a/src/Reflection/External.agda +++ b/src/Reflection/External.agda @@ -12,7 +12,7 @@ import Agda.Builtin.Reflection.External as Builtin open import Data.Nat.Base using (ℕ; suc; zero; NonZero) open import Data.List.Base using (List; _∷_; []) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.String.Base as String using (String; _++_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂; [_,_]) open import Data.Unit.Base using (⊤; tt) diff --git a/src/Relation/Binary/Construct/Subst/Equality.agda b/src/Relation/Binary/Construct/Subst/Equality.agda index 4e0a3d0100..24e465f9f0 100644 --- a/src/Relation/Binary/Construct/Subst/Equality.agda +++ b/src/Relation/Binary/Construct/Subst/Equality.agda @@ -9,7 +9,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Product as Prod +open import Data.Product.Base as Prod open import Relation.Binary module Relation.Binary.Construct.Subst.Equality diff --git a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda index 1f218cfc01..4bbd118c13 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Bundles.agda @@ -11,7 +11,7 @@ module Relation.Binary.Indexed.Homogeneous.Bundles where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) open import Relation.Binary.Core using (_⇒_; Rel) diff --git a/src/Relation/Binary/Indexed/Homogeneous/Core.agda b/src/Relation/Binary/Indexed/Homogeneous/Core.agda index 7281652597..50f8b3a200 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Core.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Core.agda @@ -12,7 +12,7 @@ module Relation.Binary.Indexed.Homogeneous.Core where open import Level using (Level; _⊔_) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Relation.Binary.Core as B using (REL; Rel) open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl) import Relation.Binary.Indexed.Heterogeneous as I diff --git a/src/Relation/Binary/Indexed/Homogeneous/Definitions.agda b/src/Relation/Binary/Indexed/Homogeneous/Definitions.agda index 0231def44f..6160c7e014 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Definitions.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Definitions.agda @@ -11,7 +11,7 @@ module Relation.Binary.Indexed.Homogeneous.Definitions where -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Level using (Level) import Relation.Binary as B open import Relation.Unary.Indexed using (IPred) diff --git a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda index 0ccad66a6f..77438dafdd 100644 --- a/src/Relation/Binary/Indexed/Homogeneous/Structures.agda +++ b/src/Relation/Binary/Indexed/Homogeneous/Structures.agda @@ -17,7 +17,7 @@ module Relation.Binary.Indexed.Homogeneous.Structures (_≈ᵢ_ : IRel A ℓ) -- The underlying indexed equality relation where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_⟨_⟩_) open import Level using (Level; _⊔_; suc) open import Relation.Binary.Core using (_⇒_) diff --git a/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda b/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda index 1f3477b19d..b665166517 100644 --- a/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda +++ b/src/Relation/Binary/Lattice/Properties/BoundedLattice.agda @@ -14,7 +14,7 @@ module Relation.Binary.Lattice.Properties.BoundedLattice open BoundedLattice L open import Algebra.Definitions _≈_ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Relation.Binary.Bundles using (Setoid) open import Relation.Binary.Lattice.Properties.MeetSemilattice meetSemilattice open import Relation.Binary.Lattice.Properties.JoinSemilattice joinSemilattice diff --git a/src/Relation/Binary/Lattice/Properties/DistributiveLattice.agda b/src/Relation/Binary/Lattice/Properties/DistributiveLattice.agda index 8ee0462d39..e3bd0170eb 100644 --- a/src/Relation/Binary/Lattice/Properties/DistributiveLattice.agda +++ b/src/Relation/Binary/Lattice/Properties/DistributiveLattice.agda @@ -14,7 +14,7 @@ module Relation.Binary.Lattice.Properties.DistributiveLattice open DistributiveLattice L hiding (refl) open import Algebra.Definitions _≈_ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Relation.Binary open import Relation.Binary.Reasoning.Setoid setoid open import Relation.Binary.Lattice.Properties.Lattice lattice diff --git a/src/Relation/Binary/Lattice/Properties/Lattice.agda b/src/Relation/Binary/Lattice/Properties/Lattice.agda index a221c35b2e..633832a26c 100644 --- a/src/Relation/Binary/Lattice/Properties/Lattice.agda +++ b/src/Relation/Binary/Lattice/Properties/Lattice.agda @@ -16,7 +16,7 @@ open Lattice L import Algebra.Lattice as Alg import Algebra.Structures as Alg open import Algebra.Definitions _≈_ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (flip) open import Relation.Binary open import Relation.Binary.Properties.Poset poset diff --git a/src/Relation/Binary/Morphism/Construct/Identity.agda b/src/Relation/Binary/Morphism/Construct/Identity.agda index c8ed9c6b03..db12c9793b 100644 --- a/src/Relation/Binary/Morphism/Construct/Identity.agda +++ b/src/Relation/Binary/Morphism/Construct/Identity.agda @@ -6,7 +6,7 @@ {-# OPTIONS --cubical-compatible --safe #-} -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (id) open import Level using (Level) open import Relation.Binary diff --git a/src/Relation/Binary/Morphism/OrderMonomorphism.agda b/src/Relation/Binary/Morphism/OrderMonomorphism.agda index dd2e0ef821..3d788184c2 100644 --- a/src/Relation/Binary/Morphism/OrderMonomorphism.agda +++ b/src/Relation/Binary/Morphism/OrderMonomorphism.agda @@ -11,7 +11,7 @@ open import Algebra.Morphism.Definitions open import Function.Base -open import Data.Product using (_,_; map) +open import Data.Product.Base using (_,_; map) open import Relation.Binary open import Relation.Binary.Morphism import Relation.Binary.Morphism.RelMonomorphism as RawRelation diff --git a/src/Relation/Binary/Properties/HeytingAlgebra.agda b/src/Relation/Binary/Properties/HeytingAlgebra.agda index f823a5b519..8786792e78 100644 --- a/src/Relation/Binary/Properties/HeytingAlgebra.agda +++ b/src/Relation/Binary/Properties/HeytingAlgebra.agda @@ -15,7 +15,7 @@ open HeytingAlgebra L open import Algebra.Core open import Algebra.Definitions _≈_ -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Function.Base using (_$_; flip; _∘_) open import Level using (_⊔_) open import Relation.Binary diff --git a/src/Relation/Nary.agda b/src/Relation/Nary.agda index da804883f5..36d1db0568 100644 --- a/src/Relation/Nary.agda +++ b/src/Relation/Nary.agda @@ -19,7 +19,7 @@ open import Data.Unit.Base open import Data.Bool.Base using (true; false) open import Data.Empty open import Data.Nat.Base using (zero; suc) -open import Data.Product as Prod using (_×_; _,_) +open import Data.Product.Base as Prod using (_×_; _,_) open import Data.Product.Nary.NonDependent open import Data.Sum.Base using (_⊎_) open import Function.Base using (_$_; _∘′_) diff --git a/src/Relation/Nullary/Universe.agda b/src/Relation/Nullary/Universe.agda index 5df3c1c423..658f8c7bf7 100644 --- a/src/Relation/Nullary/Universe.agda +++ b/src/Relation/Nullary/Universe.agda @@ -19,7 +19,7 @@ import Relation.Binary.Indexed.Heterogeneous.Construct.Trivial as Trivial open import Data.Sum.Base as Sum hiding (map) open import Data.Sum.Relation.Binary.Pointwise -open import Data.Product as Prod hiding (map) +open import Data.Product.Base as Prod hiding (map) open import Data.Product.Relation.Binary.Pointwise.NonDependent open import Function.Base using (_∘_; id) import Function.Equality as FunS diff --git a/src/Relation/Unary/Algebra.agda b/src/Relation/Unary/Algebra.agda index 600bab6c1f..514470de38 100644 --- a/src/Relation/Unary/Algebra.agda +++ b/src/Relation/Unary/Algebra.agda @@ -14,7 +14,7 @@ open import Algebra.Lattice.Bundles import Algebra.Lattice.Structures as AlgebraicLatticeStructures import Algebra.Structures as AlgebraicStructures open import Data.Empty.Polymorphic using (⊥-elim) -open import Data.Product as Product using (_,_; proj₁; proj₂; <_,_>; curry; uncurry) +open import Data.Product.Base as Product using (_,_; proj₁; proj₂; <_,_>; curry; uncurry) open import Data.Sum.Base as Sum using (inj₁; inj₂; [_,_]) open import Data.Unit.Polymorphic using (tt) open import Function.Base using (id; const; _∘_) diff --git a/src/System/Environment.agda b/src/System/Environment.agda index 228bf699ac..ec6833f64c 100644 --- a/src/System/Environment.agda +++ b/src/System/Environment.agda @@ -11,7 +11,7 @@ module System.Environment where open import IO using (IO; lift; run; ignore) open import Data.List.Base using (List) open import Data.Maybe.Base using (Maybe) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Data.String.Base using (String) open import Data.Unit.Polymorphic using (⊤) open import Foreign.Haskell.Coerce diff --git a/src/System/FilePath/Posix.agda b/src/System/FilePath/Posix.agda index d486f1d342..f12cf8180e 100644 --- a/src/System/FilePath/Posix.agda +++ b/src/System/FilePath/Posix.agda @@ -13,7 +13,7 @@ open import Agda.Builtin.List using (List) open import Agda.Builtin.String using (String) open import IO.Base using (IO; lift) open import Data.Maybe.Base using (Maybe) -open import Data.Product using (_×_) +open import Data.Product.Base using (_×_) open import Data.Sum.Base using (_⊎_) open import Foreign.Haskell.Coerce diff --git a/src/System/Process.agda b/src/System/Process.agda index 1473788365..4aff9ca4dd 100644 --- a/src/System/Process.agda +++ b/src/System/Process.agda @@ -10,7 +10,7 @@ module System.Process where open import Level using (Level) open import Data.List.Base using (List) -open import Data.Product using (_×_; proj₁) +open import Data.Product.Base using (_×_; proj₁) open import Data.String.Base using (String) open import Data.Unit.Polymorphic using (⊤) open import Foreign.Haskell.Coerce diff --git a/src/Tactic/MonoidSolver.agda b/src/Tactic/MonoidSolver.agda index 991ff41556..1448e41fe3 100644 --- a/src/Tactic/MonoidSolver.agda +++ b/src/Tactic/MonoidSolver.agda @@ -79,7 +79,7 @@ open import Data.Bool as Bool using (Bool; _∨_; if_then_else_) open import Data.Maybe as Maybe using (Maybe; just; nothing; maybe) open import Data.List.Base as List using (List; _∷_; []) open import Data.Nat as ℕ using (ℕ; suc; zero) -open import Data.Product as Product using (_×_; _,_) +open import Data.Product.Base as Product using (_×_; _,_) open import Reflection.AST open import Reflection.AST.Term diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda index 1f6de95f4f..3ea01b2c17 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Addition.agda @@ -15,7 +15,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Addition open import Data.Nat as ℕ using (ℕ; suc; zero; compare; _≤′_; ≤′-step; ≤′-refl) open import Data.Nat.Properties as ℕₚ using (≤′-trans) -open import Data.Product using (_,_; _×_; proj₂) +open import Data.Product.Base using (_,_; _×_; proj₂) open import Data.List.Base using (_∷_; []) open import Data.List.Kleene open import Data.Vec using (Vec) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda index 9435251957..eeacadb154 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Exponentiation.agda @@ -16,7 +16,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Exponentiation open import Function.Base using (_⟨_⟩_) open import Data.Nat.Base as ℕ using (ℕ; suc; zero; compare) -open import Data.Product using (_,_; _×_; proj₁; proj₂) +open import Data.Product.Base using (_,_; _×_; proj₁; proj₂) open import Data.List.Kleene open import Data.Vec using (Vec) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda index 3e1ce2bfe3..90183bc4c9 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Lemmas.agda @@ -21,7 +21,7 @@ open import Data.Fin using (Fin; zero; su open import Data.List.Base using (_∷_; []) open import Data.Unit using (tt) open import Data.List.Kleene -open import Data.Product using (_,_; proj₁; proj₂; map₁; _×_) +open import Data.Product.Base using (_,_; proj₁; proj₂; map₁; _×_) open import Data.Maybe using (nothing; just) open import Function.Base using (_⟨_⟩_) open import Level using (lift) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda index 2baeac0f23..c7ad6d6145 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Multiplication.agda @@ -16,7 +16,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Multiplication open import Data.Nat.Base as ℕ using (ℕ; suc; zero; _<′_; _≤′_; ≤′-step; ≤′-refl) open import Data.Nat.Properties using (≤′-trans) open import Data.Nat.Induction -open import Data.Product using (_×_; _,_; proj₁; proj₂; map₁) +open import Data.Product.Base using (_×_; _,_; proj₁; proj₂; map₁) open import Data.List.Kleene open import Data.Vec using (Vec) open import Function.Base using (_⟨_⟩_; flip) diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda index dd84eafef2..59b99cf71b 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Negation.agda @@ -13,7 +13,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Negation (homo : Homomorphism r₁ r₂ r₃ r₄) where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Vec using (Vec) open import Data.Nat using (_<′_) open import Data.Nat.Induction diff --git a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda index c3884e9e2a..9fcaca2f66 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Homomorphism/Variables.agda @@ -13,7 +13,7 @@ module Tactic.RingSolver.Core.Polynomial.Homomorphism.Variables (homo : Homomorphism r₁ r₂ r₃ r₄) where -open import Data.Product using (_,_) +open import Data.Product.Base using (_,_) open import Data.Vec.Base as Vec using (Vec) open import Data.Fin using (Fin) open import Data.List.Kleene diff --git a/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda b/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda index 8cde662620..26e19d428a 100644 --- a/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda +++ b/src/Tactic/RingSolver/Core/Polynomial/Semantics.agda @@ -16,7 +16,7 @@ module Tactic.RingSolver.Core.Polynomial.Semantics open import Data.Nat using (ℕ; suc; zero; _≤′_; ≤′-step; ≤′-refl) open import Data.Vec using (Vec; []; _∷_; uncons) open import Data.List.Base using ([]; _∷_) -open import Data.Product using (_,_; _×_) +open import Data.Product.Base using (_,_; _×_) open import Data.List.Kleene using (_+; _*; ∹_; _&_; []) open Homomorphism homo hiding (_^_) diff --git a/src/Test/Golden.agda b/src/Test/Golden.agda index efbfc59ada..079e25720a 100644 --- a/src/Test/Golden.agda +++ b/src/Test/Golden.agda @@ -89,7 +89,7 @@ open import Data.List.Relation.Unary.Any using (any?) open import Data.Maybe.Base using (Maybe; just; nothing; fromMaybe) open import Data.Nat.Base using (ℕ; _≡ᵇ_; _<ᵇ_; _+_; _∸_) import Data.Nat.Show as ℕ using (show) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.String as String using (String; lines; unlines; unwords; concat; _≟_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Data.Unit.Base using (⊤) diff --git a/src/Text/Regex/Properties/Core.agda b/src/Text/Regex/Properties/Core.agda index e1916fb5cf..51097a7656 100644 --- a/src/Text/Regex/Properties/Core.agda +++ b/src/Text/Regex/Properties/Core.agda @@ -17,7 +17,7 @@ open import Data.List.Base as List using (List; []; _∷_; _++_) open import Data.List.Relation.Unary.Any using (Any; here; there) open import Data.List.Relation.Unary.All using (All; []; _∷_) -open import Data.Product using (_×_; _,_) +open import Data.Product.Base using (_×_; _,_) open import Data.Sum.Base using (_⊎_; inj₁; inj₂) open import Relation.Nullary using (¬_; Dec; yes; no) diff --git a/src/Text/Tabular/List.agda b/src/Text/Tabular/List.agda index dd06ea809a..70fc09f3d5 100644 --- a/src/Text/Tabular/List.agda +++ b/src/Text/Tabular/List.agda @@ -11,7 +11,7 @@ module Text.Tabular.List where open import Data.String using (String) open import Data.List.Base import Data.Nat.Properties as ℕₚ -open import Data.Product using (-,_; proj₂) +open import Data.Product.Base using (-,_; proj₂) open import Data.Vec.Base as Vec using (Vec) open import Data.Vec.Bounded.Base as Vec≤ using (Vec≤) open import Function.Base diff --git a/src/Text/Tabular/Vec.agda b/src/Text/Tabular/Vec.agda index 74f899905c..1286ab1e14 100644 --- a/src/Text/Tabular/Vec.agda +++ b/src/Text/Tabular/Vec.agda @@ -9,7 +9,7 @@ module Text.Tabular.Vec where open import Data.List.Base using (List) -open import Data.Product as Prod using (uncurry) +open import Data.Product.Base as Prod using (uncurry) open import Data.String using (String; rectangle; fromAlignment) open import Data.Vec.Base open import Function.Base From 3352d4fcd0c5fc40c1b5492917da5ba125e6fc38 Mon Sep 17 00:00:00 2001 From: Maximilien Tirard Date: Sat, 29 Jul 2023 12:34:49 +0100 Subject: [PATCH 080/316] Wrapping Comments & Fixing Code Delimiters (#2015) --- src/Algebra/Consequences/Setoid.agda | 4 +- src/Algebra/Construct/LexProduct/Inner.agda | 5 +- src/Algebra/Module/Structures.agda | 10 ++-- src/Algebra/Morphism/Consequences.agda | 2 +- .../CommutativeMagma/Divisibility.agda | 4 +- .../Properties/CommutativeSemigroup.agda | 18 +++---- .../CommutativeSemigroup/Divisibility.agda | 6 +-- .../Solver/Ring/NaturalCoefficients.agda | 4 +- .../Ring/NaturalCoefficients/Default.agda | 4 +- src/Codata/Sized/Delay/Properties.agda | 12 ++--- src/Codata/Sized/M/Bisimilarity.agda | 4 +- src/Codata/Sized/Stream.agda | 8 ++-- src/Data/AVL/Key.agda | 2 +- src/Data/AVL/Value.agda | 2 +- src/Data/Empty.agda | 8 ++-- src/Data/Fin/Permutation/Components.agda | 8 ++-- src/Data/Fin/Properties.agda | 11 +++-- src/Data/List/Extrema.agda | 12 ++--- src/Data/List/Fresh.agda | 10 ++-- src/Data/List/Kleene/AsList.agda | 6 +-- src/Data/List/Properties.agda | 5 +- src/Data/List/Relation/Binary/Lex/Core.agda | 2 +- src/Data/List/Relation/Binary/Lex/Strict.agda | 6 +-- .../Sublist/DecPropositional/Solver.agda | 4 +- .../Sublist/Heterogeneous/Properties.agda | 8 ++-- .../Example/UniqueBoundVariables.agda | 26 +++++----- .../Sublist/Propositional/Properties.agda | 6 +-- .../Binary/Sublist/Setoid/Properties.agda | 2 +- src/Data/List/Relation/Unary/All.agda | 3 +- src/Data/List/Relation/Unary/First.agda | 2 +- .../Relation/Unary/Sorted/TotalOrder.agda | 2 +- src/Data/Nat/Base.agda | 4 +- src/Data/Nat/Binary/Properties.agda | 30 ++++++------ src/Data/Nat/Binary/Subtraction.agda | 2 +- src/Data/Nat/DivMod/Core.agda | 8 ++-- src/Data/Nat/Induction.agda | 8 ++-- src/Data/Nat/Logarithm.agda | 2 +- src/Data/Nat/Logarithm/Core.agda | 2 +- src/Data/Nat/Primality.agda | 14 +++--- src/Data/Nat/Properties.agda | 2 +- src/Data/Nat/PseudoRandom/LCG.agda | 10 ++-- src/Data/Product/Effectful/Examples.agda | 10 ++-- src/Data/Product/Nary/NonDependent.agda | 24 +++++----- src/Data/Rational/Base.agda | 8 ++-- src/Data/Rational/Unnormalised/Base.agda | 31 ++++++------ .../Rational/Unnormalised/Properties.agda | 6 +-- src/Data/String/Properties.agda | 2 +- src/Data/Sum/Effectful/Examples.agda | 10 ++-- src/Data/Sum/Effectful/Left.agda | 6 +-- src/Data/Sum/Effectful/Left/Transformer.agda | 6 +-- src/Data/Sum/Effectful/Right/Transformer.agda | 6 +-- src/Data/Sum/Relation/Binary/LeftOrder.agda | 6 +-- src/Data/Sum/Relation/Binary/Pointwise.agda | 6 +-- .../Relation/Unary/Any/Properties.agda | 2 +- src/Data/Tree/AVL/Key.agda | 8 ++-- .../Membership/Propositional/Properties.agda | 4 +- src/Data/Tree/AVL/NonEmpty.agda | 4 +- src/Data/Tree/AVL/Value.agda | 8 ++-- src/Data/Trie/NonEmpty.agda | 8 ++-- src/Data/Vec/Properties.agda | 6 +-- src/Data/Vec/Recursive.agda | 14 +++--- src/Data/Vec/Relation/Binary/Lex/Strict.agda | 28 +++++------ src/Effect/Monad/Reader/Indexed.agda | 4 +- src/Effect/Monad/Writer/Indexed.agda | 4 +- src/Foreign/Haskell/Coerce.agda | 48 ++++++++++--------- src/Function/Metric/Definitions.agda | 2 +- src/Function/Nary/NonDependent/Base.agda | 18 +++---- src/Function/Related/Propositional.agda | 3 +- src/IO/Base.agda | 6 +-- src/Reflection/AST/Abstraction.agda | 4 +- src/Reflection/AST/Argument.agda | 4 +- src/Reflection/AST/Name.agda | 10 ++-- src/Reflection/AST/Term.agda | 8 ++-- src/Reflection/AnnotatedAST.agda | 7 +-- src/Reflection/External.agda | 4 +- .../Construct/Add/Extrema/Equality.agda | 10 ++-- .../Construct/Add/Extrema/NonStrict.agda | 14 +++--- src/Relation/Binary/Morphism/Bundles.agda | 4 +- src/Relation/Binary/Properties/Setoid.agda | 14 +++--- .../PropositionalEquality/Properties.agda | 6 +-- src/Relation/Binary/Reasoning/Setoid.agda | 5 +- src/Relation/Nary.agda | 8 ++-- src/Relation/Nullary/Decidable/Core.agda | 7 +-- src/Relation/Unary/Closure/Base.agda | 10 ++-- .../Unary/Polymorphic/Properties.agda | 6 +-- src/Relation/Unary/Properties.agda | 12 ++--- .../Unary/Relation/Binary/Subset.agda | 4 +- src/System/Process.agda | 2 +- src/Tactic/Cong.agda | 16 +++---- src/Tactic/MonoidSolver.agda | 24 +++++----- src/Tactic/RingSolver.agda | 6 +-- src/Tactic/RingSolver/Core/NatSet.agda | 18 +++---- .../RingSolver/Core/Polynomial/Base.agda | 34 ++++++------- .../Core/Polynomial/Homomorphism/Lemmas.agda | 33 ++++++------- .../RingSolver/Core/Polynomial/Semantics.agda | 21 ++++---- src/Test/Golden.agda | 2 +- src/Text/Format/Generic.agda | 10 ++-- src/Text/Pretty/Core.agda | 9 ++-- src/Text/Regex/Search.agda | 10 ++-- 99 files changed, 458 insertions(+), 440 deletions(-) diff --git a/src/Algebra/Consequences/Setoid.agda b/src/Algebra/Consequences/Setoid.agda index 444a9296b8..f5cac63048 100644 --- a/src/Algebra/Consequences/Setoid.agda +++ b/src/Algebra/Consequences/Setoid.agda @@ -233,7 +233,7 @@ module _ {_•_ : Op₂ A} {_⁻¹ : Op₁ A} {e} (cong : Congruent₂ _•_) wh (x ⁻¹) • e ≈⟨ idʳ (x ⁻¹) ⟩ x ⁻¹ ∎ ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Bisemigroup-like structures module _ {_•_ _◦_ : Op₂ A} @@ -288,7 +288,7 @@ module _ {_•_ _◦_ : Op₂ A} (x ◦ (x • z)) • (y ◦ (x • z)) ≈˘⟨ ◦-distribʳ-• _ _ _ ⟩ (x • y) ◦ (x • z) ∎ ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Ring-like structures module _ {_+_ _*_ : Op₂ A} diff --git a/src/Algebra/Construct/LexProduct/Inner.agda b/src/Algebra/Construct/LexProduct/Inner.agda index d235c1b8fd..9b6e06f0e6 100644 --- a/src/Algebra/Construct/LexProduct/Inner.agda +++ b/src/Algebra/Construct/LexProduct/Inner.agda @@ -165,8 +165,9 @@ cong₁ a≈b = cong₁₂ a≈b M.refl cong₂ : b ≈₁ c → lex a b x y ≈₂ lex a c x y cong₂ = cong₁₂ M.refl --- It is possible to relax this. Instead of ∙ being selective and ◦ being associative it's also --- possible for _◦_ to return a single idempotent element. +-- It is possible to relax this. Instead of ∙ being selective and ◦ +-- being associative it's also possible for _◦_ to return a single +-- idempotent element. assoc : Associative _≈₁_ _∙_ → Commutative _≈₁_ _∙_ → Selective _≈₁_ _∙_ → Associative _≈₂_ _◦_ → ∀ a b c x y z → lex (a ∙ b) c (lex a b x y) z ≈₂ lex a (b ∙ c) x (lex b c y z) diff --git a/src/Algebra/Module/Structures.agda b/src/Algebra/Module/Structures.agda index 5b071b1a63..d8a291bd13 100644 --- a/src/Algebra/Module/Structures.agda +++ b/src/Algebra/Module/Structures.agda @@ -166,8 +166,9 @@ module _ (commutativeSemiring : CommutativeSemiring r ℓr) open CommutativeSemiring commutativeSemiring renaming (Carrier to R) -- An R-semimodule is an R-R-bisemimodule where R is commutative. - -- This means that *ₗ and *ᵣ coincide up to mathematical equality, though it - -- may be that they do not coincide up to definitional equality. + -- This means that *ₗ and *ᵣ coincide up to mathematical equality, + -- though it may be that they do not coincide up to definitional + -- equality. record IsSemimodule (*ₗ : Opₗ R M) (*ᵣ : Opᵣ R M) : Set (r ⊔ m ⊔ ℓr ⊔ ℓm) where @@ -281,8 +282,9 @@ module _ (commutativeRing : CommutativeRing r ℓr) open CommutativeRing commutativeRing renaming (Carrier to R) -- An R-module is an R-R-bimodule where R is commutative. - -- This means that *ₗ and *ᵣ coincide up to mathematical equality, though it - -- may be that they do not coincide up to definitional equality. + -- This means that *ₗ and *ᵣ coincide up to mathematical equality, + -- though it may be that they do not coincide up to definitional + -- equality. record IsModule (*ₗ : Opₗ R M) (*ᵣ : Opᵣ R M) : Set (r ⊔ m ⊔ ℓr ⊔ ℓm) where field diff --git a/src/Algebra/Morphism/Consequences.agda b/src/Algebra/Morphism/Consequences.agda index ac7d6de2c5..c81e55a7bb 100644 --- a/src/Algebra/Morphism/Consequences.agda +++ b/src/Algebra/Morphism/Consequences.agda @@ -15,7 +15,7 @@ open import Function.Base using (id; _∘_) open import Function.Definitions import Relation.Binary.Reasoning.Setoid as EqR ---------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- If f and g are mutually inverse maps between A and B, g is congruent, -- f is a homomorphism, then g is a homomorphism. diff --git a/src/Algebra/Properties/CommutativeMagma/Divisibility.agda b/src/Algebra/Properties/CommutativeMagma/Divisibility.agda index 27f6ba56a5..3f6cae0f0c 100644 --- a/src/Algebra/Properties/CommutativeMagma/Divisibility.agda +++ b/src/Algebra/Properties/CommutativeMagma/Divisibility.agda @@ -17,12 +17,12 @@ open CommutativeMagma CM open import Relation.Binary.Reasoning.Setoid setoid ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Re-export the contents of magmas open import Algebra.Properties.Magma.Divisibility magma public ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Further properties x∣xy : ∀ x y → x ∣ x ∙ y diff --git a/src/Algebra/Properties/CommutativeSemigroup.agda b/src/Algebra/Properties/CommutativeSemigroup.agda index e09253ece7..0c27a5e96b 100644 --- a/src/Algebra/Properties/CommutativeSemigroup.agda +++ b/src/Algebra/Properties/CommutativeSemigroup.agda @@ -18,12 +18,12 @@ open import Algebra.Definitions _≈_ open import Relation.Binary.Reasoning.Setoid setoid open import Data.Product.Base using (_,_) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Re-export the contents of semigroup open import Algebra.Properties.Semigroup semigroup public ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties interchange : Interchangable _∙_ _∙_ @@ -35,12 +35,12 @@ interchange a b c d = begin a ∙ (c ∙ (b ∙ d)) ≈˘⟨ assoc a c (b ∙ d) ⟩ (a ∙ c) ∙ (b ∙ d) ∎ ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Permutation laws for _∙_ for three factors. -- There are five nontrivial permutations. ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Partitions (1,1). x∙yz≈y∙xz : ∀ x y z → x ∙ (y ∙ z) ≈ y ∙ (x ∙ z) @@ -72,7 +72,7 @@ x∙yz≈z∙xy x y z = begin (x ∙ y) ∙ z ≈⟨ comm _ z ⟩ z ∙ (x ∙ y) ∎ ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Partitions (1,2). -- These permutation laws are proved by composing the proofs for @@ -93,7 +93,7 @@ x∙yz≈yz∙x x y z = trans (x∙yz≈y∙zx _ _ _) (sym (assoc y z x)) x∙yz≈zx∙y : ∀ x y z → x ∙ (y ∙ z) ≈ (z ∙ x) ∙ y x∙yz≈zx∙y x y z = trans (x∙yz≈z∙xy x y z) (sym (assoc z x y)) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Partitions (2,1). -- Their laws are proved by composing proofs for partitions (1,1) with @@ -114,7 +114,7 @@ xy∙z≈y∙zx x y z = trans (assoc x y z) (x∙yz≈y∙zx x y z) xy∙z≈z∙xy : ∀ x y z → (x ∙ y) ∙ z ≈ z ∙ (x ∙ y) xy∙z≈z∙xy x y z = trans (assoc x y z) (x∙yz≈z∙xy x y z) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Partitions (2,2). -- These proofs are by composing with the proofs for (2,1). @@ -134,13 +134,13 @@ xy∙z≈yz∙x x y z = trans (xy∙z≈y∙zx x y z) (sym (assoc y z x)) xy∙z≈zx∙y : ∀ x y z → (x ∙ y) ∙ z ≈ (z ∙ x) ∙ y xy∙z≈zx∙y x y z = trans (xy∙z≈z∙xy x y z) (sym (assoc z x y)) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- commutative semigroup has Jordan identity xy∙xx≈x∙yxx : ∀ x y → (x ∙ y) ∙ (x ∙ x) ≈ x ∙ (y ∙ (x ∙ x)) xy∙xx≈x∙yxx x y = assoc x y ((x ∙ x)) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- commutative semigroup is left/right/middle semiMedial semimedialˡ : LeftSemimedial _∙_ diff --git a/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda b/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda index 66bec51115..da8d3abf45 100644 --- a/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda +++ b/src/Algebra/Properties/CommutativeSemigroup/Divisibility.agda @@ -18,18 +18,18 @@ open CommutativeSemigroup CS open import Algebra.Properties.CommutativeSemigroup CS using (x∙yz≈xz∙y; x∙yz≈y∙xz) open EqReasoning setoid ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Re-export the contents of divisibility over semigroups open import Algebra.Properties.Semigroup.Divisibility semigroup public ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Re-export the contents of divisibility over commutative magmas open import Algebra.Properties.CommutativeMagma.Divisibility commutativeMagma public using (x∣xy; xy≈z⇒x∣z; ∣-factors; ∣-factors-≈) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- New properties x∣y∧z∣x/y⇒xz∣y : ∀ {x y z} → ((x/y , _) : x ∣ y) → z ∣ x/y → x ∙ z ∣ y diff --git a/src/Algebra/Solver/Ring/NaturalCoefficients.agda b/src/Algebra/Solver/Ring/NaturalCoefficients.agda index fdd0a65e6b..6d3ab81b37 100644 --- a/src/Algebra/Solver/Ring/NaturalCoefficients.agda +++ b/src/Algebra/Solver/Ring/NaturalCoefficients.agda @@ -44,8 +44,8 @@ private -- There is a homomorphism from ℕ to R. -- -- Note that the optimised _×_ is used rather than unoptimised _×ᵤ_. - -- If _×ᵤ_ were used, then Function.Related.TypeIsomorphisms.test would fail - -- to type-check. + -- If _×ᵤ_ were used, then Function.Related.TypeIsomorphisms.test + -- would fail to type-check. homomorphism : ℕ-ring -Raw-AlmostCommutative⟶ fromCommutativeSemiring R homomorphism = record diff --git a/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda b/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda index 84003922a0..9b9671c527 100644 --- a/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda +++ b/src/Algebra/Solver/Ring/NaturalCoefficients/Default.agda @@ -5,8 +5,8 @@ -- equality induced by ℕ. -- -- This is sufficient for proving equalities that are independent of the --- characteristic. In particular, this is enough for equalities in rings of --- characteristic 0. +-- characteristic. In particular, this is enough for equalities in +-- rings of characteristic 0. ------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} diff --git a/src/Codata/Sized/Delay/Properties.agda b/src/Codata/Sized/Delay/Properties.agda index e491178c71..39a56d1ef9 100644 --- a/src/Codata/Sized/Delay/Properties.agda +++ b/src/Codata/Sized/Delay/Properties.agda @@ -80,16 +80,16 @@ module _ {a} {A B : Set a} where bind̅₂ (later s) {f} (later foo) = bind̅₂ (force s) foo - -- The extracted value of a bind is equivalent to the extracted value of its - -- second element + -- The extracted value of a bind is equivalent to the extracted value + -- of its second element extract-bind-⇓ : {d : Delay A Size.∞} → {f : A → Delay B Size.∞} → (d⇓ : d ⇓) → (f⇓ : f (extract d⇓) ⇓) → extract (bind-⇓ d⇓ {f} f⇓) ≡ extract f⇓ extract-bind-⇓ (now a) f⇓ = Eq.refl extract-bind-⇓ (later t) f⇓ = extract-bind-⇓ t f⇓ - -- If the right element of a bind returns a certain value so does the entire - -- bind + -- If the right element of a bind returns a certain value so does the + -- entire bind extract-bind̅₂-bind⇓ : (d : Delay A ∞) {f : A → Delay B ∞} → (bind⇓ : bind d f ⇓) → @@ -98,8 +98,8 @@ module _ {a} {A B : Set a} where extract-bind̅₂-bind⇓ (later s) (later bind⇓) = extract-bind̅₂-bind⇓ (force s) bind⇓ - -- Proof that the length of a bind-⇓ is equal to the sum of the length of its - -- components. + -- Proof that the length of a bind-⇓ is equal to the sum of the length + -- of its components. bind⇓-length : {d : Delay A ∞} {f : A → Delay B ∞} → (bind⇓ : bind d f ⇓) → diff --git a/src/Codata/Sized/M/Bisimilarity.agda b/src/Codata/Sized/M/Bisimilarity.agda index ef26860e66..8205ae92e3 100644 --- a/src/Codata/Sized/M/Bisimilarity.agda +++ b/src/Codata/Sized/M/Bisimilarity.agda @@ -24,8 +24,8 @@ data Bisim {s p} (C : Container s p) (i : Size) : Rel (M C ∞) (s ⊔ p) where module _ {s p} {C : Container s p} where - -- unfortunately the proofs are a lot nicer if we do not use the combinators - -- C.refl, C.sym and C.trans + -- unfortunately the proofs are a lot nicer if we do not use the + -- combinators C.refl, C.sym and C.trans refl : ∀ {i} → Reflexive (Bisim C i) refl {x = inf t} = inf (P.refl , λ where p .force → refl) diff --git a/src/Codata/Sized/Stream.agda b/src/Codata/Sized/Stream.agda index 4b7d6bd37d..34a9583448 100644 --- a/src/Codata/Sized/Stream.agda +++ b/src/Codata/Sized/Stream.agda @@ -127,8 +127,8 @@ chunksOf n = chunksOfAcc n id module ChunksOf where interleave : Stream A i → Thunk (Stream A) i → Stream A i interleave (x ∷ xs) ys = x ∷ λ where .force → interleave (ys .force) xs --- This interleaving strategy can be generalised to an arbitrary non-empty --- list of streams +-- This interleaving strategy can be generalised to an arbitrary +-- non-empty list of streams interleave⁺ : List⁺ (Stream A i) → Stream A i interleave⁺ xss = List⁺.map head xss @@ -155,8 +155,8 @@ cantor (l ∷ ls) = zig (l ∷ []) (ls .force) module Cantor where zag (x ∷ []) zs (l ∷ ls) = x ∷ λ where .force → zig (l ∷⁺ zs) (ls .force) zag (x ∷ (y ∷ xs)) zs ls = x ∷ λ where .force → zag (y ∷ xs) zs ls --- We can use the Cantor zig zag function to define a form of `bind' that --- reaches any point of the plane in a finite amount of time. +-- We can use the Cantor zig zag function to define a form of `bind' +-- that reaches any point of the plane in a finite amount of time. plane : {B : A → Set b} → Stream A ∞ → ((a : A) → Stream (B a) ∞) → Stream (Σ A B) ∞ plane as bs = cantor (map (λ a → map (a ,_) (bs a)) as) diff --git a/src/Data/AVL/Key.agda b/src/Data/AVL/Key.agda index 30eaf2f5aa..96023d342d 100644 --- a/src/Data/AVL/Key.agda +++ b/src/Data/AVL/Key.agda @@ -2,7 +2,7 @@ -- The Agda standard library -- -- This module is DEPRECATED. ------------------------------------------------------------------------ +------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} diff --git a/src/Data/AVL/Value.agda b/src/Data/AVL/Value.agda index 4ddbc30003..d46bde80eb 100644 --- a/src/Data/AVL/Value.agda +++ b/src/Data/AVL/Value.agda @@ -2,7 +2,7 @@ -- The Agda standard library -- -- This module is DEPRECATED. ------------------------------------------------------------------------ +------------------------------------------------------------------------ {-# OPTIONS --cubical-compatible --safe #-} diff --git a/src/Data/Empty.agda b/src/Data/Empty.agda index ff98565038..990a9a1632 100644 --- a/src/Data/Empty.agda +++ b/src/Data/Empty.agda @@ -20,10 +20,10 @@ open import Data.Irrelevant using (Irrelevant) private data Empty : Set where --- ⊥ is defined via Data.Irrelevant (a record with a single irrelevant field) --- so that Agda can judgementally declare that all proofs of ⊥ are equal --- to each other. In particular this means that all functions returning a --- proof of ⊥ are equal. +-- ⊥ is defined via Data.Irrelevant (a record with a single irrelevant +-- field) so that Agda can judgementally declare that all proofs of ⊥ +-- are equal to each other. In particular this means that all functions +-- returning a proof of ⊥ are equal. ⊥ : Set ⊥ = Irrelevant Empty diff --git a/src/Data/Fin/Permutation/Components.agda b/src/Data/Fin/Permutation/Components.agda index e75fa29eb2..5a2f27f7f8 100644 --- a/src/Data/Fin/Permutation/Components.agda +++ b/src/Data/Fin/Permutation/Components.agda @@ -22,9 +22,9 @@ open import Relation.Binary.PropositionalEquality open import Algebra.Definitions using (Involutive) open ≡-Reasoning --------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Functions --------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- 'tranpose i j' swaps the places of 'i' and 'j'. @@ -35,9 +35,9 @@ transpose i j k with does (k ≟ i) ... | true = i ... | false = k --------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties --------------------------------------------------------------------------------- +------------------------------------------------------------------------ transpose-inverse : ∀ {n} (i j : Fin n) {k} → transpose i j (transpose j i k) ≡ k diff --git a/src/Data/Fin/Properties.agda b/src/Data/Fin/Properties.agda index e181a291e9..615728e971 100644 --- a/src/Data/Fin/Properties.agda +++ b/src/Data/Fin/Properties.agda @@ -818,8 +818,9 @@ punchInᵢ≢i (suc i) (suc j) = punchInᵢ≢i i j ∘ suc-injective -- punchOut ------------------------------------------------------------------------ --- A version of 'cong' for 'punchOut' in which the inequality argument can be --- changed out arbitrarily (reflecting the proof-irrelevance of that argument). +-- A version of 'cong' for 'punchOut' in which the inequality argument +-- can be changed out arbitrarily (reflecting the proof-irrelevance of +-- that argument). punchOut-cong : ∀ (i : Fin (suc n)) {j k} {i≢j : i ≢ j} {i≢k : i ≢ k} → j ≡ k → punchOut i≢j ≡ punchOut i≢k @@ -829,9 +830,9 @@ punchOut-cong {_} zero {suc j} {suc k} = suc-injective punchOut-cong {suc n} (suc i) {zero} {zero} _ = refl punchOut-cong {suc n} (suc i) {suc j} {suc k} = cong suc ∘ punchOut-cong i ∘ suc-injective --- An alternative to 'punchOut-cong' in the which the new inequality argument is --- specific. Useful for enabling the omission of that argument during equational --- reasoning. +-- An alternative to 'punchOut-cong' in the which the new inequality +-- argument is specific. Useful for enabling the omission of that +-- argument during equational reasoning. punchOut-cong′ : ∀ (i : Fin (suc n)) {j k} {p : i ≢ j} (q : j ≡ k) → punchOut p ≡ punchOut (p ∘ sym ∘ trans q ∘ sym) diff --git a/src/Data/List/Extrema.agda b/src/Data/List/Extrema.agda index 8d71aab6a7..5abc5edee9 100644 --- a/src/Data/List/Extrema.agda +++ b/src/Data/List/Extrema.agda @@ -30,7 +30,7 @@ open import Relation.Binary.PropositionalEquality.Core using (_≡_; sym; subst) renaming (refl to ≡-refl) import Relation.Binary.Construct.On as On ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Setup open TotalOrder totalOrder renaming (Carrier to B) @@ -43,7 +43,7 @@ private a p : Level A : Set a ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Functions argmin : (A → B) → A → List A → A @@ -58,7 +58,7 @@ min = argmin id max : B → List B → B max = argmax id ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties of argmin module _ {f : A → B} where @@ -114,7 +114,7 @@ argmin-all f {⊤} {xs} {P = P} p⊤ pxs with argmin-sel f ⊤ xs ... | inj₁ argmin≡⊤ = subst P (sym argmin≡⊤) p⊤ ... | inj₂ argmin∈xs = lookup pxs argmin∈xs ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties of argmax module _ {f : A → B} where @@ -170,7 +170,7 @@ argmax-all f {P = P} {⊥} {xs} p⊥ pxs with argmax-sel f ⊥ xs ... | inj₁ argmax≡⊥ = subst P (sym argmax≡⊥) p⊥ ... | inj₂ argmax∈xs = lookup pxs argmax∈xs ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties of min min≤v⁺ : ∀ {v} ⊤ xs → ⊤ ≤ v ⊎ Any (_≤ v) xs → min ⊤ xs ≤ v @@ -208,7 +208,7 @@ min-mono-⊆ : ∀ {⊥₁ ⊥₂ xs ys} → ⊥₁ ≤ ⊥₂ → xs ⊇ ys → min-mono-⊆ ⊥₁≤⊥₂ ys⊆xs = min[xs]≤min[ys]⁺ _ _ (inj₁ ⊥₁≤⊥₂) (tabulate (inj₂ ∘ Any.map (λ {≡-refl → refl}) ∘ ys⊆xs)) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Properties of max max≤v⁺ : ∀ {v ⊥ xs} → ⊥ ≤ v → All (_≤ v) xs → max ⊥ xs ≤ v diff --git a/src/Data/List/Fresh.agda b/src/Data/List/Fresh.agda index 72c372003a..b5a5718765 100644 --- a/src/Data/List/Fresh.agda +++ b/src/Data/List/Fresh.agda @@ -1,9 +1,9 @@ ------------------------------------------------------------------------ -- The Agda standard library -- --- Fresh lists, a proof relevant variant of Catarina Coquand's contexts in --- "A Formalised Proof of the Soundness and Completeness of a Simply Typed --- Lambda-Calculus with Explicit Substitutions" +-- Fresh lists, a proof relevant variant of Catarina Coquand's contexts +-- in "A Formalised Proof of the Soundness and Completeness of a Simply +-- Typed Lambda-Calculus with Explicit Substitutions" ------------------------------------------------------------------------ -- See README.Data.List.Fresh and README.Data.Trie.NonDependent for @@ -52,8 +52,8 @@ module _ {a} (A : Set a) (R : Rel A r) where -- the erasure ⌊_⌋ of a decidable predicate, cf. Relation.Nary) or we -- do not care about the proof, it is convenient to get back list syntax. - -- We use a different symbol to avoid conflict when importing both Data.List - -- and Data.List.Fresh. + -- We use a different symbol to avoid conflict when importing both + -- Data.List and Data.List.Fresh. infixr 5 _∷#_ pattern _∷#_ x xs = cons x xs _ diff --git a/src/Data/List/Kleene/AsList.agda b/src/Data/List/Kleene/AsList.agda index bb2c52b603..0b6d4c033d 100644 --- a/src/Data/List/Kleene/AsList.agda +++ b/src/Data/List/Kleene/AsList.agda @@ -54,9 +54,9 @@ infixr 5 _∷_ pattern _∷_ x xs = Kleene.∹ x Kleene.& xs ------------------------------------------------------------------------ --- The following functions change the type of the list (from ⁺ to * or vice --- versa) in Data.KleeneList, so we reimplement them here to keep the --- type the same. +-- The following functions change the type of the list (from ⁺ to * or +-- vice versa) in Data.KleeneList, so we reimplement them here to keep +-- the type the same. scanr : (A → B → B) → B → List A → List B scanr f b xs = Kleene.∹ Kleene.scanr* f b xs diff --git a/src/Data/List/Properties.agda b/src/Data/List/Properties.agda index c05d3251de..454ee4b211 100644 --- a/src/Data/List/Properties.agda +++ b/src/Data/List/Properties.agda @@ -55,7 +55,7 @@ private D : Set d E : Set e ------------------------------------------------------------------------ +------------------------------------------------------------------------ -- _∷_ module _ {x y : A} {xs ys : List A} where @@ -771,7 +771,8 @@ take-suc-tabulate : ∀ {n} (f : Fin n → A) (i : Fin n) → let m = toℕ i in take-suc-tabulate f i rewrite sym (toℕ-cast (sym (length-tabulate f)) i) | sym (lookup-tabulate f i) = take-suc (tabulate f) (cast _ i) --- If you take at least as many elements from a list as it has, you get the whole list. +-- If you take at least as many elements from a list as it has, you get +-- the whole list. take-all :(n : ℕ) (xs : List A) → n ≥ length xs → take n xs ≡ xs take-all zero [] _ = refl take-all (suc _) [] _ = refl diff --git a/src/Data/List/Relation/Binary/Lex/Core.agda b/src/Data/List/Relation/Binary/Lex/Core.agda index 96549e013b..0b3e821194 100644 --- a/src/Data/List/Relation/Binary/Lex/Core.agda +++ b/src/Data/List/Relation/Binary/Lex/Core.agda @@ -35,7 +35,7 @@ data Lex {A : Set a} (P : Set) next : ∀ {x xs y ys} (x≈y : x ≈ y) (xs0 {1+[2 _ ]} _ = 0 _ _ y0 : x < y → y ∸ x > 0ᵇ x0 {x} {y} = toℕ-cancel-< ∘ subst (ℕ._> 0) (sym (toℕ-homo-∸ y x)) ∘ ℕₚ.m x) ≈ x fmapIdₗ x = A.refl , refl open RawMonad monad - -- Now, let's show that "pure" is a unit for >>=. We use Lift in exactly - -- the same way as above. The data (x : B) then needs to be "lifted" to - -- this new type (Lift B). + -- Now, let's show that "pure" is a unit for >>=. We use Lift in + -- exactly the same way as above. The data (x : B) then needs to be + -- "lifted" to this new type (Lift B). pureUnitL : ∀ {x : B} {f : Lift a B → A.Carrier × Lift a B} → (pure (lift x) >>= f) ≈ f (lift x) pureUnitL = A.identityˡ _ , refl diff --git a/src/Data/Product/Nary/NonDependent.agda b/src/Data/Product/Nary/NonDependent.agda index cb421f16b6..29bb483964 100644 --- a/src/Data/Product/Nary/NonDependent.agda +++ b/src/Data/Product/Nary/NonDependent.agda @@ -28,13 +28,14 @@ open import Relation.Binary.PropositionalEquality.Core using (_≡_; refl; cong open import Function.Nary.NonDependent.Base --- Provided n Levels and a corresponding "vector" of `n` Sets, we can build a big --- right-nested product type packing a value for each one of these Sets. +-- Provided n Levels and a corresponding "vector" of `n` Sets, we can +-- build a big right-nested product type packing a value for each one +-- of these Sets. -- We have two distinct but equivalent definitions: -- the first which is always ⊤-terminated --- the other which has a special case for n = 1 because we want our `(un)curryₙ` --- functions to work for user-written functions and products and they rarely are --- ⊤-terminated. +-- the other which has a special case for n = 1 because we want our +-- `(un)curryₙ` functions to work for user-written functions and +-- products and they rarely are ⊤-terminated. Product⊤ : ∀ n {ls} → Sets n ls → Set (⨆ n ls) Product⊤ zero as = ⊤ @@ -143,8 +144,8 @@ fromEqualₙ (suc n@(suc _)) eq = uncurry (cong₂ _,_) (Prod.map₂ (fromEqual ------------------------------------------------------------------------ -- projection of the k-th component --- To know at which Set level the k-th projection out of an n-ary product --- lives, we need to extract said level, by induction on k. +-- To know at which Set level the k-th projection out of an n-ary +-- product lives, we need to extract said level, by induction on k. Levelₙ : ∀ {n} → Levels n → Fin n → Level Levelₙ (l , _) zero = l @@ -157,10 +158,11 @@ Projₙ : ∀ {n ls} → Sets n ls → ∀ k → Set (Levelₙ ls k) Projₙ (a , _) zero = a Projₙ (_ , as) (suc k) = Projₙ as k --- Finally, provided a Product of these sets, we can extract the k-th value. --- `projₙ` takes both `n` and `k` explicitly because we expect the user will --- be using a concrete `k` (potentially manufactured using `Data.Fin`'s `#_`) --- and it will not be possible to infer `n` from it. +-- Finally, provided a Product of these sets, we can extract the k-th +-- value. `projₙ` takes both `n` and `k` explicitly because we expect +-- the user will be using a concrete `k` (potentially manufactured +-- using `Data.Fin`'s `#_`) and it will not be possible to infer `n` +-- from it. projₙ : ∀ n {ls} {as : Sets n ls} k → Product n as → Projₙ as k projₙ 1 zero v = v diff --git a/src/Data/Rational/Base.agda b/src/Data/Rational/Base.agda index 666cac3dc9..53739b8571 100644 --- a/src/Data/Rational/Base.agda +++ b/src/Data/Rational/Base.agda @@ -143,7 +143,7 @@ toℚᵘ (mkℚ n d-1 _) = mkℚᵘ n d-1 fromℚᵘ : ℚᵘ → ℚ fromℚᵘ (mkℚᵘ n d-1) = n / suc d-1 ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Some constants 0ℚ : ℚ @@ -202,11 +202,11 @@ nonPositive {p@(mkℚ _ _ _)} (*≤* p≤q) = ℚᵘ.nonPositive {toℚᵘ p} ( nonNegative : ∀ {p} → p ≥ 0ℚ → NonNegative p nonNegative {p@(mkℚ _ _ _)} (*≤* p≤q) = ℚᵘ.nonNegative {toℚᵘ p} (ℚᵘ.*≤* p≤q) ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Operations on rationals --- For explanation of the `@record{}` annotations see notes in the equivalent --- place in `Data.Rational.Unnormalised.Base`. +-- For explanation of the `@record{}` annotations see notes in the +-- equivalent place in `Data.Rational.Unnormalised.Base`. infix 8 -_ 1/_ infixl 7 _*_ _÷_ _⊓_ diff --git a/src/Data/Rational/Unnormalised/Base.agda b/src/Data/Rational/Unnormalised/Base.agda index c03041650c..ec104895be 100644 --- a/src/Data/Rational/Unnormalised/Base.agda +++ b/src/Data/Rational/Unnormalised/Base.agda @@ -117,7 +117,7 @@ infixl 7 _/_ _/_ : (n : ℤ) (d : ℕ) .{{_ : ℕ.NonZero d}} → ℚᵘ n / suc d = mkℚᵘ n d ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Some constants 0ℚᵘ : ℚᵘ @@ -190,24 +190,25 @@ nonNegative : ∀ {p} → p ≥ 0ℚᵘ → NonNegative p nonNegative {mkℚᵘ +0 _} (*≤* _) = _ nonNegative {mkℚᵘ +[1+ n ] _} (*≤* _) = _ ------------------------------------------------------------------------------- +------------------------------------------------------------------------ -- Operations on rationals --- Explanation for `@record{}` everywhere: combined with no-eta-equality on --- the record definition of ℚᵘ above, these annotations prevent the operations --- from automatically expanding unless their arguments are explicitly pattern --- matched on. +-- Explanation for `@record{}` everywhere: combined with no-eta-equality +-- on the record definition of ℚᵘ above, these annotations prevent the +-- operations from automatically expanding unless their arguments are +-- explicitly pattern matched on. -- --- For example prior to their addition, `p + q` would often be normalised by --- Agda to `(↥ p ℤ.* ↧ q ℤ.+ ↥ q ℤ.* ↧ p) / (↧ₙ p ℕ.* ↧ₙ q)`. While in this --- small example this isn't a big problem, it leads to an exponential blowup --- when you have large arithmetic expressions which would often choke --- both type-checking and the display code. For example, the normalised --- form of `p + q + r + s + t + u` would be ~300 lines long. +-- For example prior to their addition, `p + q` would often be +-- normalised by Agda to `(↥ p ℤ.* ↧ q ℤ.+ ↥ q ℤ.* ↧ p) / (↧ₙ p ℕ.* ↧ₙ q)`. +-- While in this small example this isn't a big problem, it leads to an +-- exponential blowup when you have large arithmetic expressions which +-- would often choke both type-checking and the display code. For +-- example, the normalised form of `p + q + r + s + t + u` would be +-- ~300 lines long. -- --- This is fundementally a problem with Agda, so if over-eager normalisation --- is ever fixed in Agda (e.g. with glued representation of terms) these --- annotations can be removed. +-- This is fundementally a problem with Agda, so if over-eager +-- normalisation is ever fixed in Agda (e.g. with glued representation +-- of terms) these annotations can be removed. infix 8 -_ 1/_ infixl 7 _*_ _÷_ _⊓_ diff --git a/src/Data/Rational/Unnormalised/Properties.agda b/src/Data/Rational/Unnormalised/Properties.agda index 6f0d490412..3c800a5a98 100644 --- a/src/Data/Rational/Unnormalised/Properties.agda +++ b/src/Data/Rational/Unnormalised/Properties.agda @@ -794,7 +794,7 @@ p≤p+q p q rewrite +-comm-≡ p q = p≤q+p p q +-mono-<-≤ : _+_ Preserves₂ _<_ ⟶ _≤_ ⟶ _<_ +-mono-<-≤ {p} {q} {r} p x) ≡ x fmapId (inj₁ x) = refl fmapId (inj₂ y) = refl @@ -35,9 +35,9 @@ private open RawMonad Sₗ.monad - -- Now, let's show that "pure" is a unit for >>=. We use Lift in exactly - -- the same way as above. The data (x : B) then needs to be "lifted" to - -- this new type (Lift B). + -- Now, let's show that "pure" is a unit for >>=. We use Lift in + -- exactly the same way as above. The data (x : B) then needs to be + -- "lifted" to this new type (Lift B). pureUnitL : ∀ {x : B} {f : Lift a B → A ⊎ (Lift a B)} → (pure (lift x) >>= f) ≡ f (lift x) pureUnitL = refl diff --git a/src/Data/Sum/Effectful/Left.agda b/src/Data/Sum/Effectful/Left.agda index d86a7de26f..6d0f453b7b 100644 --- a/src/Data/Sum/Effectful/Left.agda +++ b/src/Data/Sum/Effectful/Left.agda @@ -18,9 +18,9 @@ open import Effect.Applicative open import Effect.Monad open import Function.Base --- To minimize the universe level of the RawFunctor, we require that elements of --- B are "lifted" to a copy of B at a higher universe level (a ⊔ b). See the --- examples for how this is done. +-- To minimize the universe level of the RawFunctor, we require that +-- elements of B are "lifted" to a copy of B at a higher universe level +-- (a ⊔ b). See the examples for how this is done. ------------------------------------------------------------------------ -- Left-biased monad instance for _⊎_ diff --git a/src/Data/Sum/Effectful/Left/Transformer.agda b/src/Data/Sum/Effectful/Left/Transformer.agda index cb45478f11..2d12a229fa 100644 --- a/src/Data/Sum/Effectful/Left/Transformer.agda +++ b/src/Data/Sum/Effectful/Left/Transformer.agda @@ -22,9 +22,9 @@ private variable M : Set (a ⊔ b) → Set (a ⊔ b) --- To minimize the universe level of the RawFunctor, we require that elements of --- B are "lifted" to a copy of B at a higher universe level (a ⊔ b). See the --- examples for how this is done. +-- To minimize the universe level of the RawFunctor, we require that +-- elements of B are "lifted" to a copy of B at a higher universe level +-- (a ⊔ b). See the examples for how this is done. open import Data.Sum.Effectful.Left A b using (Sumₗ) diff --git a/src/Data/Sum/Effectful/Right/Transformer.agda b/src/Data/Sum/Effectful/Right/Transformer.agda index 8fffb29c80..576d6fb379 100644 --- a/src/Data/Sum/Effectful/Right/Transformer.agda +++ b/src/Data/Sum/Effectful/Right/Transformer.agda @@ -22,9 +22,9 @@ private variable M : Set (a ⊔ b) → Set (a ⊔ b) --- To minimize the universe level of the RawFunctor, we require that elements of --- B are "lifted" to a copy of B at a higher universe level (a ⊔ b). See the --- examples for how this is done. +-- To minimize the universe level of the RawFunctor, we require that +-- elements of B are "lifted" to a copy of B at a higher universe level +-- (a ⊔ b). See the examples for how this is done. open import Data.Sum.Effectful.Right a B using (Sumᵣ) diff --git a/src/Data/Sum/Relation/Binary/LeftOrder.agda b/src/Data/Sum/Relation/Binary/LeftOrder.agda index 2749640316..2d23693e2d 100644 --- a/src/Data/Sum/Relation/Binary/LeftOrder.agda +++ b/src/Data/Sum/Relation/Binary/LeftOrder.agda @@ -20,7 +20,7 @@ import Relation.Nullary.Decidable as Dec open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Definition infixr 1 _⊎-<_ @@ -32,7 +32,7 @@ data _⊎-<_ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} ₁∼₁ : ∀ {x y} (x∼₁y : x ∼₁ y) → (_∼₁_ ⊎-< _∼₂_) (inj₁ x) (inj₁ y) ₂∼₂ : ∀ {x y} (x∼₂y : x ∼₂ y) → (_∼₁_ ⊎-< _∼₂_) (inj₂ x) (inj₂ y) ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Some properties which are preserved by _⊎-<_ module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} @@ -127,7 +127,7 @@ module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} ... | tri≈ x≮y x≈y x≯y = tri≈ (x≮y ∘ drop-inj₂) (inj₂ x≈y) (x≯y ∘ drop-inj₂) ... | tri> x≮y x≉y x>y = tri> (x≮y ∘ drop-inj₂) (x≉y ∘ PW.drop-inj₂) (₂∼₂ x>y) ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Some collections of properties which are preserved module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} diff --git a/src/Data/Sum/Relation/Binary/Pointwise.agda b/src/Data/Sum/Relation/Binary/Pointwise.agda index 23d10172c9..724b341c5e 100644 --- a/src/Data/Sum/Relation/Binary/Pointwise.agda +++ b/src/Data/Sum/Relation/Binary/Pointwise.agda @@ -20,7 +20,7 @@ open import Relation.Binary open import Relation.Binary.PropositionalEquality.Core as P using (_≡_) import Relation.Binary.PropositionalEquality.Properties as P ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Definition data Pointwise {a b c d r s} @@ -30,7 +30,7 @@ data Pointwise {a b c d r s} inj₁ : ∀ {a c} → R a c → Pointwise R S (inj₁ a) (inj₁ c) inj₂ : ∀ {b d} → S b d → Pointwise R S (inj₂ b) (inj₂ d) ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Relational properties module _ {a₁ a₂ ℓ₁ ℓ₂} {A₁ : Set a₁} {A₂ : Set a₂} @@ -108,7 +108,7 @@ module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} (Pointwise ∼₁ ∼₂) Respects₂ (Pointwise ≈₁ ≈₂) ⊎-respects₂ (r₁ , l₁) (r₂ , l₂) = ⊎-respectsʳ r₁ r₂ , ⊎-respectsˡ l₁ l₂ ----------------------------------------------------------------------- +------------------------------------------------------------------------ -- Structures module _ {a₁ a₂} {A₁ : Set a₁} {A₂ : Set a₂} diff --git a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda index 0a803425f2..ef06c5574a 100644 --- a/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda +++ b/src/Data/Tree/AVL/Indexed/Relation/Unary/Any/Properties.agda @@ -244,7 +244,7 @@ module _ {V : Value v} where Any P (singleton k v l