coq - Unknown Interpretation for "_/_" despite importing Arith -
i trying write function converts nat
string
in coq
. here attempt.
require import arith string. (* append part of string library. signature (s1 : string) : string -> string *) fixpoint convert_nat_to_string (n : nat) : string := match n | 0 => string "0" emptystring | 1 => string "1" emptystring | 2 => string "2" emptystring | 3 => string "3" emptystring | 4 => string "4" emptystring | 5 => string "5" emptystring | 6 => string "6" emptystring | 7 => string "7" emptystring | 8 => string "8" emptystring | 9 => string "9" emptystring | _ => (append (convert_nat_to_string (n/10))) (convert_nat_to_string (n mod 10)) end.
however, on last branch, coqide
gives me error
error: unknown interpretation notation "_ / _".
even though have imported arith
library. know why getting error message?
proof /
part of arith
:
coq < require import arith. [loading ml file z_syntax_plugin.cmxs ... done] [loading ml file quote_plugin.cmxs ... done] [loading ml file newring_plugin.cmxs ... done] <w> grammar extension: in [tactic:simple_tactic], rule has been masked <w> grammar extension: in [tactic:simple_tactic], rule has been masked <w> grammar extension: in [tactic:simple_tactic], rule has been masked <w> grammar extension: in [tactic:simple_tactic], rule has been masked <w> grammar extension: in [tactic:simple_tactic], rule has been masked coq < check 5/10. 5 / 10 : nat
as of coq 8.6, function available in coq.arith.peanonat
.
require import coq.arith.peanonat. check 10 / 5. (* --> 10 / 5 : nat *)
Comments
Post a Comment