I'm studying coinductive and copatterns through https://agda.readthedocs.io/en/v2.6.0.1/language/coinduction.html . I thought I understood the article code, so I decided to work on the following proposition.
cons-uncons-id : ∀ {A} (xs : Stream A) → cons (uncons xs) ≈ xs
I thought this proposition was very similar to the article problem and could be proved as well, but I can't prove it well. Here is the code I write.
I thought it could be refined with cons-uncons-id (tl xs)
because the type is very similar to merge-split-id, but Agda doesn't accept it.
This is a problem I thought of myself, so I think it's true, but of course there is a possibility of misunderstanding. However, it is natural that uncons and cons will return as they are.
If you should be able to prove it without being misunderstood, please tell me how you can prove it.
Can you explain why you can't prove it in the same way as merge-split-id?
Regards, thank you!