Last active
December 14, 2015 06:49
-
-
Save dagit/5045599 to your computer and use it in GitHub Desktop.
Possible bug in Agda? This program gives me a stack overflow when I try to load it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Bug where | |
data ℕ : Set where | |
zero : ℕ | |
suc : ℕ → ℕ | |
data _≡_ {A : Set}(x : A) : A → Set where | |
refl : x ≡ x | |
cong : ∀ {A : Set} {B : Set} | |
(f : A → B) {x y} → x ≡ y → f x ≡ f y | |
cong f refl = refl | |
lem : (n : ℕ) → n ≡ n | |
lem zero = refl | |
lem (suc n) = cong (λ x → x) (lem (suc n)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In fact, it seems that the last line can be as simple as:
lem (suc n) = cong (λ x → x) (lem {! !})