Skip to content

Commit 796d120

Browse files
authored
[Refractor] contradiction over ⊥-elim in module Constant (#2666)
1 parent baee917 commit 796d120

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/Data/Container/Combinator/Properties.agda

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,15 @@ module Data.Container.Combinator.Properties where
1111
open import Axiom.Extensionality.Propositional using (Extensionality)
1212
open import Data.Container.Core using (Container; ⟦_⟧)
1313
open import Data.Container.Combinator
14-
open import Data.Empty using (⊥-elim)
15-
open import Data.Product.Base as P using (∃; _,_; proj₁; proj₂; <_,_>; uncurry; curry)
14+
open import Data.Product.Base as P
15+
using (∃; _,_; proj₁; proj₂; <_,_>; uncurry; curry)
1616
open import Data.Sum.Base as S using (inj₁; inj₂; [_,_]′; [_,_])
1717
open import Function.Base as F using (_∘′_)
1818
open import Function.Bundles using (_↔_; mk↔ₛ′)
1919
open import Level using (_⊔_; lower)
20-
open import Relation.Binary.PropositionalEquality.Core using (_≡_; _≗_; refl; cong)
20+
open import Relation.Binary.PropositionalEquality.Core
21+
using (_≡_; _≗_; refl; cong)
22+
open import Relation.Nullary.Negation.Core using (contradiction)
2123

2224
-- I have proved some of the correctness statements under the
2325
-- assumption of functional extensionality. I could have reformulated
@@ -34,7 +36,7 @@ module Constant (ext : ∀ {ℓ ℓ′} → Extensionality ℓ ℓ′) where
3436
correct {x} {y} X {Y} = mk↔ₛ′ (from-const X) (to-const X) (λ _ refl) from∘to
3537
where
3638
from∘to : (x : ⟦ const X ⟧ Y) to-const X (proj₁ x) ≡ x
37-
from∘to xs = cong (proj₁ xs ,_) (ext (λ x ⊥-elim (lower x)))
39+
from∘to xs = cong (proj₁ xs ,_) (ext (λ x contradiction x lower ))
3840

3941
module Composition {s₁ s₂ p₁ p₂} (C₁ : Container s₁ p₁) (C₂ : Container s₂ p₂) where
4042

0 commit comments

Comments
 (0)