Skip to content

Instantly share code, notes, and snippets.

@pnlph
Created January 14, 2020 19:05
Show Gist options
  • Save pnlph/b16ef57c4f1175d1011bbcafc86748ae to your computer and use it in GitHub Desktop.
Save pnlph/b16ef57c4f1175d1011bbcafc86748ae to your computer and use it in GitHub Desktop.
K-rule enunciation and proof
module K-rule where
data _≡_ {A : Set} (x : A) : A → Set where
refl : x ≡ x
-- Enunciation of K-rule
K-rule : Set₁
K-rule = {A : Set}{x : A}(P : x ≡ x → Set)(p : P refl)(e : x ≡ x) → P e
-- Proof of K-rule
-- by pattern matching on x ≡ x (Coquand, 1992)
.K-rule-proof : {A : Set}{x : A}(P : x ≡ x → Set)(p : P refl)(e : x ≡ x) → P e
K-rule-proof P p refl = p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment