Last active
July 21, 2019 17:42
-
-
Save mietek/910b030087b96f27f0e6ed0f89f98c6d to your computer and use it in GitHub Desktop.
Breaking subject reduction in Coq, and not breaking it in Agda (any more)
This file contains 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
-- More information: | |
-- http://coq-club.inria.narkive.com/3zS9pwcc/coinductive-types-and-type-preservation | |
-- https://lists.chalmers.se/pipermail/agda/2008/000383.html | |
module CoTest where | |
open import Prelude public | |
{- | |
CoInductive tick := Tick : tick -> tick. | |
CoFixpoint loop := Tick loop. | |
Definition etaeq : loop = loop := | |
match loop with | Tick t => eq_refl (Tick t) end. | |
Definition BOOM := | |
Eval compute in (etaeq : loop = loop). | |
-} | |
record tick : Set where | |
constructor Tick | |
coinductive | |
field | |
τ : tick | |
open tick public | |
loop : tick | |
τ loop = loop | |
etaeq : loop ≡ loop | |
etaeq = refl | |
test : (l : tick) → l ≡ l | |
test l = {!refl {A = Tick (τ l)}!} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment