@@ -18,7 +18,7 @@ open import Data.Sum.Base as S using (inj₁; inj₂; [_,_]′; [_,_])
18
18
open import Function.Base as F using (_∘′_)
19
19
open import Function.Bundles
20
20
open import Level using (_⊔_; lower)
21
- open import Relation.Binary.PropositionalEquality as ≡ using (_≡_; _≗_)
21
+ open import Relation.Binary.PropositionalEquality using (_≡_; _≗_; refl; cong )
22
22
23
23
-- I have proved some of the correctness statements under the
24
24
-- assumption of functional extensionality. I could have reformulated
@@ -27,52 +27,52 @@ open import Relation.Binary.PropositionalEquality as ≡ using (_≡_; _≗_)
27
27
module Identity where
28
28
29
29
correct : ∀ {s p x} {X : Set x} → ⟦ id {s} {p} ⟧ X ↔ F.id X
30
- correct {X = X} = mk↔ₛ′ from-id to-id (λ _ → ≡. refl) (λ _ → ≡. refl)
30
+ correct {X = X} = mk↔ₛ′ from-id to-id (λ _ → refl) (λ _ → refl)
31
31
32
32
module Constant (ext : ∀ {ℓ ℓ′} → Extensionality ℓ ℓ′) where
33
33
34
34
correct : ∀ {x p y} (X : Set x) {Y : Set y} → ⟦ const {x} {p ⊔ y} X ⟧ Y ↔ F.const X Y
35
- correct {x} {y} X {Y} = mk↔ₛ′ (from-const X) (to-const X) (λ _ → ≡. refl) from∘to
35
+ correct {x} {y} X {Y} = mk↔ₛ′ (from-const X) (to-const X) (λ _ → refl) from∘to
36
36
where
37
37
from∘to : (x : ⟦ const X ⟧ Y) → to-const X (proj₁ x) ≡ x
38
- from∘to xs = ≡. cong (proj₁ xs ,_) (ext (λ x → ⊥-elim (lower x)))
38
+ from∘to xs = cong (proj₁ xs ,_) (ext (λ x → ⊥-elim (lower x)))
39
39
40
40
module Composition {s₁ s₂ p₁ p₂} (C₁ : Container s₁ p₁) (C₂ : Container s₂ p₂) where
41
41
42
42
correct : ∀ {x} {X : Set x} → ⟦ C₁ ∘ C₂ ⟧ X ↔ (⟦ C₁ ⟧ F.∘ ⟦ C₂ ⟧) X
43
- correct {X = X} = mk↔ₛ′ (from-∘ C₁ C₂) (to-∘ C₁ C₂) (λ _ → ≡. refl) (λ _ → ≡. refl)
43
+ correct {X = X} = mk↔ₛ′ (from-∘ C₁ C₂) (to-∘ C₁ C₂) (λ _ → refl) (λ _ → refl)
44
44
45
45
module Product (ext : ∀ {ℓ ℓ′} → Extensionality ℓ ℓ′)
46
46
{s₁ s₂ p₁ p₂} (C₁ : Container s₁ p₁) (C₂ : Container s₂ p₂) where
47
47
48
48
correct : ∀ {x} {X : Set x} → ⟦ C₁ × C₂ ⟧ X ↔ (⟦ C₁ ⟧ X P.× ⟦ C₂ ⟧ X)
49
- correct {X = X} = mk↔ₛ′ (from-× C₁ C₂) (to-× C₁ C₂) (λ _ → ≡. refl) from∘to
49
+ correct {X = X} = mk↔ₛ′ (from-× C₁ C₂) (to-× C₁ C₂) (λ _ → refl) from∘to
50
50
where
51
51
from∘to : (to-× C₁ C₂) F.∘ (from-× C₁ C₂) ≗ F.id
52
52
from∘to (s , f) =
53
- ≡. cong (s ,_) (ext [ (λ _ → ≡. refl) , (λ _ → ≡. refl) ])
53
+ cong (s ,_) (ext [ (λ _ → refl) , (λ _ → refl) ])
54
54
55
55
module IndexedProduct {i s p} {I : Set i} (Cᵢ : I → Container s p) where
56
56
57
57
correct : ∀ {x} {X : Set x} → ⟦ Π I Cᵢ ⟧ X ↔ (∀ i → ⟦ Cᵢ i ⟧ X)
58
- correct {X = X} = mk↔ₛ′ (from-Π I Cᵢ) (to-Π I Cᵢ) (λ _ → ≡. refl) (λ _ → ≡. refl)
58
+ correct {X = X} = mk↔ₛ′ (from-Π I Cᵢ) (to-Π I Cᵢ) (λ _ → refl) (λ _ → refl)
59
59
60
60
module Sum {s₁ s₂ p} (C₁ : Container s₁ p) (C₂ : Container s₂ p) where
61
61
62
62
correct : ∀ {x} {X : Set x} → ⟦ C₁ ⊎ C₂ ⟧ X ↔ (⟦ C₁ ⟧ X S.⊎ ⟦ C₂ ⟧ X)
63
63
correct {X = X} = mk↔ₛ′ (from-⊎ C₁ C₂) (to-⊎ C₁ C₂) to∘from from∘to
64
64
where
65
65
from∘to : (to-⊎ C₁ C₂) F.∘ (from-⊎ C₁ C₂) ≗ F.id
66
- from∘to (inj₁ s₁ , f) = ≡. refl
67
- from∘to (inj₂ s₂ , f) = ≡. refl
66
+ from∘to (inj₁ s₁ , f) = refl
67
+ from∘to (inj₂ s₂ , f) = refl
68
68
69
69
to∘from : (from-⊎ C₁ C₂) F.∘ (to-⊎ C₁ C₂) ≗ F.id
70
- to∘from = [ (λ _ → ≡. refl) , (λ _ → ≡. refl) ]
70
+ to∘from = [ (λ _ → refl) , (λ _ → refl) ]
71
71
72
72
module IndexedSum {i s p} {I : Set i} (C : I → Container s p) where
73
73
74
74
correct : ∀ {x} {X : Set x} → ⟦ Σ I C ⟧ X ↔ (∃ λ i → ⟦ C i ⟧ X)
75
- correct {X = X} = mk↔ₛ′ (from-Σ I C) (to-Σ I C) (λ _ → ≡. refl) (λ _ → ≡. refl)
75
+ correct {X = X} = mk↔ₛ′ (from-Σ I C) (to-Σ I C) (λ _ → refl) (λ _ → refl)
76
76
77
77
module ConstantExponentiation {i s p} {I : Set i} (C : Container s p) where
78
78
0 commit comments