fact: Fixpoint invert (A:Type)(n:nat)(t:htree A n){struct t} : htree A n := match t in htree _ x return htree A x with | hleaf _ v => hleaf A v | hnode _ p v t1 t2 => hnode A p v (invert A p t2)(invert A p t1) end.
imports: ZArith List Arith Bool