fact: Fixpoint addCacheToConstructor {Dom : list Type} (oldConstructor : constructorType rep Dom) : constructorType cachedRep Dom := match Dom return constructorType rep Dom -> constructorType cachedRep Dom with | nil => fun oldConstructor => or <- oldConstructor; cv <- {cv | cacheSpec or cv}; ret {| origRep := or; cachedVal := cv |} | cons D Dom' => fun oldConstructor (d : D) => @addCacheToConstructor Dom' (oldConstructor d) end oldConstructor.
imports: Fiat.Common Fiat.Computation Fiat.ADT Coq.Sets.Ensembles Fiat.ADTRefinement Fiat.ADTRefinement.Refinements.ADTRepInv