fact: Fixpoint encode (t : choice_type) : GenTree.tree nat := match t with | chUnit => GenTree.Leaf 1 | chBool => GenTree.Leaf 2 | chNat => GenTree.Leaf 3 | chProd l r => GenTree.Node 1 [:: encode l ; encode r] | chMap l r => GenTree.Node 2 [:: encode l ; encode r] | chOption u => GenTree.Node 3 [:: encode u] | chFin n => GenTree.Leaf ((4 + n) - 1)%N end.
imports: Coq(Utf8 Lia) Relational(OrderEnrichedCategory OrderEnrichedRelativeMonadExamples GenericRulesSimple) mathcomp(ssrnat ssreflect ssrfun ssrbool ssrnum eqtype choice reals distr realsum seq all_algebra fintype) Crypt(Prelude Axioms) extructures(ord fset fmap) Mon(SPropBase) Equations(Equations)