Skip to content

Commit 7bd938c

Browse files
committed
refactor: exploit duality; cherry-picked from agda#2567
1 parent 8d072d6 commit 7bd938c

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Function/Consequences.agda

+6-5
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ private
3131

3232
contraInjective : (≈₂ : Rel B ℓ₂) Injective ≈₁ ≈₂ f
3333
{x y} ¬ (≈₁ x y) ¬ (≈₂ (f x) (f y))
34-
contraInjective _ inj p = contraposition inj p
34+
contraInjective _ inj = contraposition inj
3535

3636
------------------------------------------------------------------------
3737
-- Inverseˡ
3838

3939
inverseˡ⇒surjective : (≈₂ : Rel B ℓ₂)
4040
Inverseˡ ≈₁ ≈₂ f f⁻¹
4141
Surjective ≈₁ ≈₂ f
42-
inverseˡ⇒surjective ≈₂ invˡ y = (_ , invˡ)
42+
inverseˡ⇒surjective ≈₂ invˡ _ = (_ , invˡ)
4343

4444
------------------------------------------------------------------------
4545
-- Inverseʳ
@@ -103,14 +103,15 @@ inverseʳ⇒strictlyInverseʳ : ∀ (≈₁ : Rel A ℓ₁) (≈₂ : Rel B ℓ
103103
Reflexive ≈₂
104104
Inverseʳ ≈₁ ≈₂ f f⁻¹
105105
StrictlyInverseʳ ≈₁ f f⁻¹
106-
inverseʳ⇒strictlyInverseʳ _ _ refl sinv x = sinv refl
106+
inverseʳ⇒strictlyInverseʳ {f = f} {f⁻¹ = f⁻¹} ≈₁ ≈₂ =
107+
inverseˡ⇒strictlyInverseˡ {f = f⁻¹} {f⁻¹ = f} ≈₂ ≈₁
107108

108109
strictlyInverseʳ⇒inverseʳ : Transitive ≈₁
109110
Congruent ≈₂ ≈₁ f⁻¹
110111
StrictlyInverseʳ ≈₁ f f⁻¹
111112
Inverseʳ ≈₁ ≈₂ f f⁻¹
112-
strictlyInverseʳ⇒inverseʳ trans cong sinv {x} y≈f⁻¹x =
113-
trans (cong y≈f⁻¹x) (sinv x)
113+
strictlyInverseʳ⇒inverseʳ {≈₁ = ≈₁} {≈₂ = ≈₂} {f⁻¹ = f⁻¹} {f = f} =
114+
strictlyInverseˡ⇒inverseˡ {≈₂ = ≈₁} {≈₁ = ≈₂} {f = f⁻¹} {f⁻¹ = f}
114115

115116
------------------------------------------------------------------------
116117
-- Theory of the section of a Surjective function

0 commit comments

Comments
 (0)