Skip to content

Commit e72c08e

Browse files
Move pointwise equality to .Core module (#2335)
* Closes #2331. Also makes a few changes of imports that are related. Many of the places which look like this improvement might also help use other things from `Relation.Binary.PropositionalEquality` that should *not* be moved to `.Core`. (But it might make sense to split them off into their own lighter weight module.) * don't import Data.Nullary itself since its sub-modules were already imported, just redistribute the using properly.
1 parent 7388b4b commit e72c08e

File tree

7 files changed

+32
-21
lines changed

7 files changed

+32
-21
lines changed

src/Algebra/Properties/Monoid/Sum.agda

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ open import Data.Fin.Base using (zero; suc)
1313
open import Data.Unit using (tt)
1414
open import Function.Base using (_∘_)
1515
open import Relation.Binary.Core using (_Preserves_⟶_)
16-
open import Relation.Binary.PropositionalEquality as ≡ using (_≗_; _≡_)
16+
open import Relation.Binary.PropositionalEquality.Core as ≡ using (_≗_; _≡_)
1717

1818
module Algebra.Properties.Monoid.Sum {a ℓ} (M : Monoid a ℓ) where
1919

src/Data/List/Effectful.agda

+10-5
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,19 @@ module Data.List.Effectful where
1010

1111
open import Data.Bool.Base using (false; true)
1212
open import Data.List.Base
13+
using (List; map; [_]; ap; []; _∷_; _++_; concat; concatMap)
1314
open import Data.List.Properties
14-
open import Effect.Choice
15-
open import Effect.Empty
16-
open import Effect.Functor
15+
using (++-identityʳ; ++-assoc; map-cong; concatMap-cong; map-concatMap;
16+
concatMap-pure)
17+
open import Effect.Choice using (RawChoice)
18+
open import Effect.Empty using (RawEmpty)
19+
open import Effect.Functor using (RawFunctor)
1720
open import Effect.Applicative
21+
using (RawApplicative; RawApplicativeZero; RawAlternative)
1822
open import Effect.Monad
19-
open import Function.Base
20-
open import Level
23+
using (RawMonad; module Join; RawMonadZero; RawMonadPlus)
24+
open import Function.Base using (flip; _∘_; const; _$_; id; _∘′_; _$′_)
25+
open import Level using (Level)
2126
open import Relation.Binary.PropositionalEquality as ≡
2227
using (_≡_; _≢_; _≗_; refl)
2328
open ≡.≡-Reasoning

src/Data/List/Membership/Propositional/Properties.agda

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ open import Level using (Level)
3737
open import Relation.Binary.Core using (Rel)
3838
open import Relation.Binary.Definitions as Binary hiding (Decidable)
3939
open import Relation.Binary.PropositionalEquality as ≡
40-
using (_≡_; _≢_; refl; sym; trans; cong; subst; →-to-⟶; _≗_)
40+
using (_≡_; _≢_; refl; sym; trans; cong; subst; _≗_)
4141
import Relation.Binary.Properties.DecTotalOrder as DTOProperties
4242
open import Relation.Unary using (_⟨×⟩_; Decidable)
4343
import Relation.Nullary.Reflects as Reflects

src/Data/List/Relation/Unary/All/Properties.agda

+9-8
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,13 @@ module Data.List.Relation.Unary.All.Properties where
1111
open import Axiom.Extensionality.Propositional using (Extensionality)
1212
open import Data.Bool.Base using (Bool; T; true; false)
1313
open import Data.Bool.Properties using (T-∧)
14-
open import Data.Empty
14+
open import Data.Empty using (⊥-elim)
1515
open import Data.Fin.Base using (Fin; zero; suc)
1616
open import Data.List.Base as List hiding (lookup; updateAt)
1717
open import Data.List.Properties as Listₚ using (partition-defn)
18-
open import Data.List.Membership.Propositional
18+
open import Data.List.Membership.Propositional using (_∈_; _≢∈_)
1919
open import Data.List.Membership.Propositional.Properties
20+
using (there-injective-≢∈; ∈-filter⁻)
2021
import Data.List.Membership.Setoid as SetoidMembership
2122
open import Data.List.Relation.Unary.All as All using
2223
( All; []; _∷_; lookup; updateAt
@@ -33,18 +34,18 @@ open import Data.Maybe.Relation.Unary.Any as Maybe using (just)
3334
open import Data.Nat.Base using (zero; suc; s≤s; _<_; z<s; s<s)
3435
open import Data.Nat.Properties using (≤-refl; m≤n⇒m≤1+n)
3536
open import Data.Product.Base as Product using (_×_; _,_; uncurry; uncurry′)
36-
open import Function.Base
37-
open import Function.Bundles
37+
open import Function.Base using (_∘_; _$_; id; case_of_; flip)
38+
open import Function.Bundles using (_↠_; mk↠ₛ; _⇔_; mk⇔; _↔_; mk↔ₛ′; Equivalence)
3839
open import Level using (Level)
3940
open import Relation.Binary.Core using (REL)
4041
open import Relation.Binary.Bundles using (Setoid)
4142
import Relation.Binary.Definitions as B
42-
open import Relation.Binary.PropositionalEquality
43+
open import Relation.Binary.PropositionalEquality.Core
4344
using (_≡_; refl; cong; cong₂; _≗_)
44-
open import Relation.Nullary
4545
open import Relation.Nullary.Reflects using (invert)
46-
open import Relation.Nullary.Negation using (contradiction)
47-
open import Relation.Nullary.Decidable using (¬?; decidable-stable)
46+
open import Relation.Nullary.Negation.Core using (¬_; contradiction)
47+
open import Relation.Nullary.Decidable
48+
using (Dec; does; yes; no; _because_; ¬?; decidable-stable)
4849
open import Relation.Unary
4950
using (Decidable; Pred; Universal; ∁; _∩_; _⟨×⟩_) renaming (_⊆_ to _⋐_)
5051
open import Relation.Unary.Properties using (∁?)

src/Data/Product/Properties.agda

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ open import Function.Base using (_∋_; _∘_; id)
1414
open import Function.Bundles using (_↔_; mk↔ₛ′)
1515
open import Level using (Level)
1616
open import Relation.Binary.Definitions using (DecidableEquality)
17-
open import Relation.Binary.PropositionalEquality
17+
open import Relation.Binary.PropositionalEquality.Core
18+
using (_≡_; refl; _≗_; subst; cong; cong₂; cong′)
1819
open import Relation.Nullary.Decidable as Dec using (Dec; yes; no)
1920

2021
private

src/Relation/Binary/PropositionalEquality.agda

-5
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,9 @@ open import Relation.Binary.PropositionalEquality.Algebra public
3737
------------------------------------------------------------------------
3838
-- Pointwise equality
3939

40-
infix 4 _≗_
41-
4240
_→-setoid_ : (A : Set a) (B : Set b) Setoid _ _
4341
A →-setoid B = ≡-setoid A (Trivial.indexedSetoid (setoid B))
4442

45-
_≗_ : (f g : A B) Set _
46-
_≗_ {A = A} {B = B} = Setoid._≈_ (A →-setoid B)
47-
4843
:→-to-Π : {A : Set a} {B : IndexedSetoid A b ℓ}
4944
((x : A) IndexedSetoid.Carrier B x)
5045
Dependent.Func (setoid A) B

src/Relation/Binary/PropositionalEquality/Core.agda

+9
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ infix 4 _≢_
3232
_≢_ : {A : Set a} Rel A a
3333
x ≢ y = ¬ x ≡ y
3434

35+
------------------------------------------------------------------------
36+
-- Pointwise equality
37+
38+
infix 4 _≗_
39+
40+
_≗_ : (f g : A B) Set _
41+
_≗_ {A = A} {B = B} f g = x f x ≡ g x
42+
43+
3544
------------------------------------------------------------------------
3645
-- A variant of `refl` where the argument is explicit
3746

0 commit comments

Comments
 (0)