DisambiguateChoices.add_num_choice
("real number",
(fun _ num _ -> HelmLibraryObjects.build_real (int_of_string num)));
+ DisambiguateChoices.add_num_choice
+ ("binary positive number",
+ (fun _ num _ ->
+ let num = int_of_string num in
+ if num = 0 then
+ raise DisambiguateChoices.Invalid_choice
+ else
+ HelmLibraryObjects.build_bin_pos num));
+ DisambiguateChoices.add_num_choice
+ ("binary integer number",
+ (fun _ num _ ->
+ let num = int_of_string num in
+ if num = 0 then
+ HelmLibraryObjects.BinInt.z0
+ else if num > 0 then
+ Cic.Appl [
+ HelmLibraryObjects.BinInt.zpos;
+ HelmLibraryObjects.build_bin_pos num ]
+ else
+ assert false));
DisambiguateChoices.add_binary_op "plus" "natural plus"
HelmLibraryObjects.Peano.plus;
DisambiguateChoices.add_binary_op "plus" "real plus"
HelmLibraryObjects.Reals.rplus;
+ DisambiguateChoices.add_binary_op "plus" "binary integer plus"
+ HelmLibraryObjects.BinInt.zplus;
+ DisambiguateChoices.add_binary_op "plus" "binary positive plus"
+ HelmLibraryObjects.BinPos.pplus;
DisambiguateChoices.add_binary_op "minus" "natural minus"
(const HelmLibraryObjects.Peano.minus_URI);
DisambiguateChoices.add_binary_op "minus" "real minus"
(const HelmLibraryObjects.Reals.rminus_URI);
+ DisambiguateChoices.add_binary_op "minus" "binary integer minus"
+ HelmLibraryObjects.BinInt.zminus;
+ DisambiguateChoices.add_binary_op "minus" "binary positive minus"
+ HelmLibraryObjects.BinPos.pminus;
DisambiguateChoices.add_binary_op "times" "natural times"
(const HelmLibraryObjects.Peano.mult_URI);
DisambiguateChoices.add_binary_op "times" "real times"
(const HelmLibraryObjects.Reals.rmult_URI);
+ DisambiguateChoices.add_binary_op "times" "binary positive times"
+ HelmLibraryObjects.BinPos.pmult;
DisambiguateChoices.add_binary_op "divide" "real divide"
(const HelmLibraryObjects.Reals.rdiv_URI);
DisambiguateChoices.add_unary_op "uminus" "real unary minus"
(const HelmLibraryObjects.Reals.ropp_URI);
+ DisambiguateChoices.add_unary_op "uminus" "binary integer negative sign"
+ (HelmLibraryObjects.BinInt.zneg);
+ DisambiguateChoices.add_unary_op "uminus" "binary integer unary minus"
+ (HelmLibraryObjects.BinInt.zopp);
DisambiguateChoices.add_binary_op "leq" "natural 'less or equal to'"
(mutind HelmLibraryObjects.Peano.le_URI);