I managed to get a little help in the IRC from Daniel Peebles (copumpkin) , who explained that the ability to use propositional equality over codates is usually not something normal allowed. He pointed out that one can define one's own equivalence relation, for example, as Agda defines for Data.Stream :
data _β_ {A} : Stream A β Stream A β Set where _β·_ : β {xy xs ys} (xβ‘ : x β‘ y) (xsβ : β (β xs β β ys)) β x β· xs β y β· ys
I was able to directly translate this definition into Idris:
module MyStream %default total codata MyStream a = MkStream a (MyStream a) infixl 9 =
And this easily passed the integrity check, because now we just make a simple coin.
This fact is a bit disappointing, as it seems to mean that we cannot define a VerifiedFunctor for our stream type.
Daniel also pointed out that observational-type theory allows propositional equality over codata, something that needs to be studied.
source share