123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596(************************************************************************)(* * The Coq Proof Assistant / The Coq Development Team *)(* v * Copyright INRIA, CNRS and contributors *)(* <O___,, * (see version control and CREDITS file for authors & dates) *)(* \VV/ **************************************************************)(* // * This file is distributed under the terms of the *)(* * GNU Lesser General Public License Version 2.1 *)(* * (see LICENSE file for the text of the license) *)(************************************************************************)openCErrorsopenUtilletpappsigmarargs=letopenEConstrinletgr=delayed_forcerinletevd,hd=Evarutil.new_globalsigmagrinsigma,mkApp(hd,args)letsig_typ()=Coqlib.lib_ref"core.sig.type"letsig_intro()=Coqlib.lib_ref"core.sig.intro"letsig_proj1()=Coqlib.lib_ref"core.sig.proj1"(* let sig_proj2 () = Coqlib.lib_ref "core.sig.proj2" *)letsigT_typ()=Coqlib.lib_ref"core.sigT.type"letsigT_intro()=Coqlib.lib_ref"core.sigT.intro"letsigT_proj1()=Coqlib.lib_ref"core.sigT.proj1"letsigT_proj2()=Coqlib.lib_ref"core.sigT.proj2"letprod_typ()=Coqlib.lib_ref"core.prod.type"letprod_intro()=Coqlib.lib_ref"core.prod.intro"letprod_proj1()=Coqlib.lib_ref"core.prod.proj1"letprod_proj2()=Coqlib.lib_ref"core.prod.proj2"letcoq_eq_ind()=Coqlib.lib_ref"core.eq.type"letcoq_eq_refl()=Coqlib.lib_ref"core.eq.refl"letcoq_eq_refl_ref()=Coqlib.lib_ref"core.eq.refl"letcoq_eq_rect()=Coqlib.lib_ref"core.eq.rect"letmk_coq_notsigmax=letsigma,notc=Evarutil.new_globalsigmaCoqlib.(lib_ref"core.not.type")insigma,EConstr.mkApp(notc,[|x|])letcoq_JMeq_ind()=tryCoqlib.lib_ref"core.JMeq.type"withNot_found->user_err(Pp.str"cannot find Coq.Logic.JMeq.JMeq; maybe library Coq.Logic.JMeq has to be required first.")letcoq_JMeq_refl()=Coqlib.lib_ref"core.JMeq.refl"(* let coq_not () = Universes.constr_of_global @@ Coqlib.lib_ref "core.not.type" *)(* let coq_and () = Universes.constr_of_global @@ Coqlib.lib_ref "core.and.type" *)letunsafe_fold_rightf=functionhd::tl->List.fold_rightftlhd|[]->invalid_arg"unsafe_fold_right"letmk_coq_andsigmal=letsigma,and_typ=Evarutil.new_globalsigmaCoqlib.(lib_ref"core.and.type")insigma,unsafe_fold_right(funcconj->EConstr.(mkApp(and_typ,[|c;conj|])))l(* true = transparent by default, false = opaque if possible *)letproofs_transparency=reftrueletprogram_cases=reftrueletprogram_generalized_coercion=reftrueletset_proofs_transparency=(:=)proofs_transparencyletget_proofs_transparency()=!proofs_transparencyletis_program_generalized_coercion()=!program_generalized_coercionletis_program_cases()=!program_casesopenGoptionslet()=declare_bool_option{optdepr=false;optkey=["Transparent";"Obligations"];optread=get_proofs_transparency;optwrite=set_proofs_transparency;}let()=declare_bool_option{optdepr=false;optkey=["Program";"Cases"];optread=(fun()->!program_cases);optwrite=(:=)program_cases}let()=declare_bool_option{optdepr=false;optkey=["Program";"Generalized";"Coercion"];optread=(fun()->!program_generalized_coercion);optwrite=(:=)program_generalized_coercion}