Skip to content

Commit 9070bfd

Browse files
committed
refactor: clean up Bijection⇒Inverse
1 parent 53ab09a commit 9070bfd

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

src/Function/Properties/Bijection.agda

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,6 @@ private
3030
A B : Set a
3131
T S : Setoid a ℓ
3232

33-
------------------------------------------------------------------------
34-
-- Conversion functions
35-
36-
Bijection⇒Inverse : Bijection S T Inverse S T
37-
Bijection⇒Inverse bij = record
38-
{ to = to
39-
; from = section
40-
; to-cong = cong
41-
; from-cong = Symmetry.section-cong bijective Eq₁.refl Eq₂.sym Eq₂.trans
42-
; inverse = section-inverseˡ
43-
, λ y≈to[x] injective (Eq₂.trans (section-strictInverseˡ _) y≈to[x])
44-
}
45-
where open Bijection bij
46-
47-
Bijection⇒Equivalence : Bijection T S Equivalence T S
48-
Bijection⇒Equivalence = Inverse⇒Equivalence ∘ Bijection⇒Inverse
49-
5033
------------------------------------------------------------------------
5134
-- Setoid properties
5235

@@ -56,11 +39,28 @@ refl = Identity.bijection _
5639
-- Now we *can* prove full symmetry as we now have a proof that
5740
-- the witness produced by the surjection proof preserves equality
5841
sym : Bijection S T Bijection T S
59-
sym = Inverse⇒Bijection ∘ Symmetry.inverse ∘ Bijection⇒Inverse
42+
sym = Symmetry.bijectionWithoutCongruence
6043

6144
trans : Trans (Bijection {a} {ℓ₁} {b} {ℓ₂}) (Bijection {b} {ℓ₂} {c} {ℓ₃}) Bijection
6245
trans = Composition.bijection
6346

47+
------------------------------------------------------------------------
48+
-- Conversion functions
49+
50+
Bijection⇒Inverse : Bijection S T Inverse S T
51+
Bijection⇒Inverse bij = record
52+
{ to = to
53+
; from = Bijection.to (sym bij)
54+
; to-cong = cong
55+
; from-cong = Bijection.cong (sym bij)
56+
; inverse = inverseˡ , inverseʳ
57+
58+
}
59+
where open Bijection bij
60+
61+
Bijection⇒Equivalence : Bijection T S Equivalence T S
62+
Bijection⇒Equivalence = Inverse⇒Equivalence ∘ Bijection⇒Inverse
63+
6464
------------------------------------------------------------------------
6565
-- Propositional properties
6666

0 commit comments

Comments
 (0)