(************************************************************************) (* * The Rocq Prover / The Rocq Development Team *) (* v * Copyright INRIA, CNRS and contributors *) (* user_err (Pp.str "cannot find Stdlib.Logic.JMeq.JMeq; maybe library Stdlib.Logic.JMeq has to be required first.") let coq_JMeq_refl () = Rocqlib.lib_ref "core.JMeq.refl" let unsafe_fold_right f = function hd :: tl -> List.fold_right f tl hd | [] -> invalid_arg "unsafe_fold_right" let mk_coq_and env sigma l = let sigma, and_typ = Evd.fresh_global env sigma Rocqlib.(lib_ref "core.and.type") in sigma, unsafe_fold_right (fun c conj -> EConstr.(mkApp (and_typ, [| c ; conj |]))) l (* true = transparent by default, false = opaque if possible *) let proofs_transparency = ref true let program_cases = ref true let program_generalized_coercion = ref true let set_proofs_transparency = (:=) proofs_transparency let get_proofs_transparency () = !proofs_transparency let is_program_generalized_coercion () = !program_generalized_coercion let is_program_cases () = !program_cases open Goptions let () = declare_bool_option { optstage = Summary.Stage.Interp; optdepr = None; optkey = ["Transparent";"Obligations"]; optread = get_proofs_transparency; optwrite = set_proofs_transparency; } let () = declare_bool_option { optstage = Summary.Stage.Interp; optdepr = None; optkey = ["Program";"Cases"]; optread = (fun () -> !program_cases); optwrite = (:=) program_cases } let () = declare_bool_option { optstage = Summary.Stage.Interp; optdepr = None; optkey = ["Program";"Generalized";"Coercion"]; optread = (fun () -> !program_generalized_coercion); optwrite = (:=) program_generalized_coercion }