X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Focaml%2Fcic_disambiguation%2Flogic_notation.ml;h=2f404be83a956eccdf3c31bafff32f3f831a60a9;hb=6d9de12a536ee4b9e369849ff7e9aa4ca464de9d;hp=f23098f9688764a3083447f2cd91959fa56f1979;hpb=aba014724c9ad08f80944ec3021c9fa3826dca4a;p=helm.git diff --git a/helm/ocaml/cic_disambiguation/logic_notation.ml b/helm/ocaml/cic_disambiguation/logic_notation.ml index f23098f96..2f404be83 100644 --- a/helm/ocaml/cic_disambiguation/logic_notation.ml +++ b/helm/ocaml/cic_disambiguation/logic_notation.ml @@ -29,18 +29,34 @@ open Parser EXTEND term: LEVEL "add" [ - [ t1 = term; SYMBOL "∨"; t2 = term -> - return_term loc (Appl_symbol ("or", [t1; t2])) + [ t1 = term; SYMBOL <:unicode> (* ∨ *); t2 = term -> + return_term loc (Appl_symbol ("or", 0, [t1; t2])) ] ]; term: LEVEL "mult" [ - [ t1 = term; SYMBOL "∧"; t2 = term -> - return_term loc (Appl_symbol ("and", [t1; t2])) + [ t1 = term; SYMBOL <:unicode> (* ∧ *); t2 = term -> + return_term loc (Appl_symbol ("and", 0, [t1; t2])) ] ]; term: LEVEL "inv" [ - [ SYMBOL "¬"; t = term -> return_term loc (Appl_symbol ("not", [t])) ] + [ SYMBOL <:unicode> (* ¬ *); t = term -> + return_term loc (Appl_symbol ("not", 0, [t])) ] ]; END + +let _ = + Disambiguate.add_symbol_choice "eq" + ("leibnitz's equality", + (fun interp _ args -> + let t1, t2 = + match args with + | [t1; t2] -> t1, t2 + | _ -> raise Disambiguate.Invalid_choice + in + Cic.Appl [ + Cic.MutInd (HelmLibraryObjects.Logic.eq_URI, 0, []); + Cic.Implicit; t1; t2 + ])) +