-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathk.agda
More file actions
28 lines (23 loc) · 766 Bytes
/
Copy pathk.agda
File metadata and controls
28 lines (23 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
-- {-# OPTIONS --without-K #-}
module K where
open import Agda.Primitive
open import Relation.Binary.PropositionalEquality using (_≡_; refl)
private
variable
ℓ : Level
J : {A : Set ℓ}→ {a b : A}
→ (target : a ≡ b)
→ (motive : {x : A} → a ≡ x → Set ℓ)
→ (base : motive refl)
→ motive target
J refl motive base = base
-- Axiom K, presented in a way that's easy to compare with the J above
K : {A : Set ℓ} {a : A}
→ (target : a ≡ a)
→ (motive : a ≡ a → Set ℓ)
→ (base : motive refl)
→ motive target
-- This implementation wouldn't type check if --without-K was enabled
K refl motive base = base
-- I found this stackoverflow post informative
-- https://stackoverflow.com/a/47243610