Skip to content

Commit 679241e

Browse files
committed
fix: deprecation warning
1 parent 3e15e99 commit 679241e

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

src/Function/Properties/Surjection.agda

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ module Function.Properties.Surjection where
1111
open import Function.Base using (_∘_; _$_)
1212
open import Function.Definitions using (Surjective; Injective; Congruent)
1313
open import Function.Bundles
14-
using (Func; Surjection; _↠_; _⟶_; _↪_; mk↪; _⇔_; mk⇔)
15-
open import Function.Consequences using (module Section)
14+
using (Func; Surjection; Bijection; _↠_; _⟶_; _↪_; mk↪; _⇔_; mk⇔)
1615
import Function.Construct.Identity as Identity
16+
import Function.Construct.Symmetry as Symmetry
1717
import Function.Construct.Composition as Compose
1818
open import Level using (Level)
1919
open import Data.Product.Base using (_,_; proj₁; proj₂)
@@ -79,9 +79,13 @@ module _ (surjection : Surjection S T) where
7979

8080
injective⇒to⁻-cong : Injective Eq₁._≈_ Eq₂._≈_ to
8181
Congruent Eq₂._≈_ Eq₁._≈_ section
82-
injective⇒to⁻-cong injective =
83-
Section.cong Eq₂._≈_ surjective injective Eq₁.refl Eq₂.sym Eq₂.trans
82+
injective⇒to⁻-cong injective = section-cong
83+
where
84+
SB : Bijection S T
85+
SB = record { cong = cong ; bijective = injective , surjective }
86+
open Bijection (Symmetry.bijectionWithoutCongruence SB)
87+
using () renaming (cong to section-cong)
8488
{-# WARNING_ON_USAGE injective⇒to⁻-cong
8589
"Warning: injective⇒to⁻-cong was deprecated in v2.3.
86-
Please use Symmetry.section-cong instead. "
90+
Please use Function.Construct.Symmetry.bijectionWithoutCongruence instead. "
8791
#-}

0 commit comments

Comments
 (0)