Вот ещё пейпер по теме подвернулся
http://ps.informatik.uni-tuebingen.de/publications/ostermann20decompositiondiversity.pdfDecomposition Diversity with Symmetric Data and Codata
Concretely, this paper makes the following contributions:
• We present the first full symmetric programming language that allows invertible destructorization and constructorization.
• We have fully formalized the language in the Coq theorem prover and mechanically verified that the language is type-sound. We have implemented the transposition algorithms in Coq and have proven that they are total, preserve typing and behavior, and are inverses of each other. All łdifficultž parts of the proofs have been mechanically verified in Coq, with a few rather obvious but very laborious to mechanize ‘plumbing’ proofs left as ordinary paper proofs.1 The Coq proofs, which consumed by far the largest part of the authors’ time investment, constitute more than 60 kloc.
• We synthesize a mechanically verified implementation of the language from our Coq formalization and have integrated it into a browser-based IDE that supports constructorization and destructorization