fact: Fixpoint toHex {n} := match n return BITS n -> string with | 0 => fun bs => EmptyString | 1 => fun bs => appendNibbleOnString (zero 3 ## bs) EmptyString | 2 => fun bs => appendNibbleOnString (zero 2 ## bs) EmptyString | 3 => fun bs => appendNibbleOnString (zero 1 ## bs) EmptyString | _ => fun bs => let (hi,lo) := split2 _ 4 bs in appendNibbleOnString lo (toHex hi) end.
imports: Coq(ZArith.ZArith Strings.String) mathcomp.ssreflect.ssreflect mathcomp(ssrfun ssrbool eqtype ssrnat seq fintype tuple zmodp)