| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
open Names |
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
module Hook : sig |
| 43 |
type 'a g |
| 44 |
|
| 45 |
type t = unit g |
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
module S : sig |
| 52 |
type t = |
| 53 |
{ uctx : UState.t |
| 54 |
|
| 55 |
; obls : (Id.t * Constr.t) list |
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
; scope : Locality.definition_scope |
| 60 |
|
| 61 |
; dref : GlobRef.t |
| 62 |
|
| 63 |
} |
| 64 |
end |
| 65 |
|
| 66 |
val make_g : (S.t -> 'a -> 'a) -> 'a g |
| 67 |
val make : (S.t -> unit) -> t |
| 68 |
val call : ?hook:t -> S.t -> unit |
| 69 |
end |
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
module CInfo : sig |
| 75 |
type 'constr t |
| 76 |
|
| 77 |
val make |
| 78 |
: ?loc:Loc.t |
| 79 |
-> name:Id.t |
| 80 |
-> typ:'constr |
| 81 |
-> ?args:Name.t list |
| 82 |
-> ?impargs:Impargs.manual_implicits |
| 83 |
-> unit |
| 84 |
-> 'constr t |
| 85 |
|
| 86 |
|
| 87 |
val to_constr : Evd.evar_map -> EConstr.t t -> Constr.t t |
| 88 |
|
| 89 |
|
| 90 |
val get_typ : 'constr t -> 'constr |
| 91 |
|
| 92 |
end |
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
module Info : sig |
| 97 |
|
| 98 |
type t |
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
val make |
| 103 |
: ?poly:PolyFlags.t |
| 104 |
-> ?inline : bool |
| 105 |
-> ?kind : Decls.logical_kind |
| 106 |
|
| 107 |
-> ?udecl : UState.universe_decl |
| 108 |
-> ?scope : Locality.definition_scope |
| 109 |
|
| 110 |
-> ?clearbody:bool |
| 111 |
-> ?hook : Hook.t |
| 112 |
|
| 113 |
-> ?typing_flags:Declarations.typing_flags |
| 114 |
-> ?user_warns : Globnames.extended_global_reference UserWarn.with_qf |
| 115 |
-> ?ntns : Metasyntax.notation_interpretation_decl list |
| 116 |
-> unit |
| 117 |
-> t |
| 118 |
|
| 119 |
end |
| 120 |
|
| 121 |
|
| 122 |
|
| 123 |
|
| 124 |
|
| 125 |
|
| 126 |
val declare_definition |
| 127 |
: info:Info.t |
| 128 |
-> cinfo:EConstr.t option CInfo.t |
| 129 |
-> opaque:bool |
| 130 |
-> body:EConstr.t |
| 131 |
-> ?using:Vernacexpr.section_subset_expr |
| 132 |
-> Evd.evar_map |
| 133 |
-> GlobRef.t |
| 134 |
|
| 135 |
val declare_mutual_definitions |
| 136 |
: info:Info.t |
| 137 |
-> cinfo: Constr.t CInfo.t list |
| 138 |
-> opaque:bool |
| 139 |
-> eff:Evd.side_effects |
| 140 |
-> uctx:UState.t |
| 141 |
-> bodies:Constr.t list |
| 142 |
-> possible_guard:Pretyping.possible_guard * Sorts.relevance list |
| 143 |
-> ?using:Vernacexpr.section_subset_expr |
| 144 |
-> unit |
| 145 |
-> Names.GlobRef.t list |
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
module OblState : sig |
| 152 |
|
| 153 |
type t |
| 154 |
val empty : t |
| 155 |
|
| 156 |
module View : sig |
| 157 |
module Obl : sig |
| 158 |
type t = private |
| 159 |
{ name : Id.t |
| 160 |
; loc : Loc.t option |
| 161 |
; status : bool * Evar_kinds.obligation_definition_status |
| 162 |
; solved : bool |
| 163 |
} |
| 164 |
end |
| 165 |
|
| 166 |
type t = private |
| 167 |
{ opaque : bool |
| 168 |
; remaining : int |
| 169 |
; obligations : Obl.t array |
| 170 |
} |
| 171 |
end |
| 172 |
|
| 173 |
val view : t -> View.t Id.Map.t |
| 174 |
|
| 175 |
end |
| 176 |
|
| 177 |
|
| 178 |
module Proof : sig |
| 179 |
|
| 180 |
type t |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
|
| 185 |
val start |
| 186 |
: info:Info.t |
| 187 |
-> cinfo:EConstr.t CInfo.t |
| 188 |
-> ?using:Id.Set.t |
| 189 |
-> Evd.evar_map |
| 190 |
-> t |
| 191 |
|
| 192 |
|
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
|
| 197 |
|
| 198 |
val start_derive : name:Id.t -> info:Info.t -> cinfo:unit CInfo.t list -> Proofview.telescope -> t |
| 199 |
|
| 200 |
val start_equations : |
| 201 |
name:Id.t |
| 202 |
-> info:Info.t |
| 203 |
-> hook:(pm:OblState.t -> Constant.t list -> Evd.evar_map -> OblState.t) |
| 204 |
-> types:(Environ.env * Evar.t * Evd.undefined Evd.evar_info * EConstr.named_context * Evd.econstr) list |
| 205 |
-> Evd.evar_map |
| 206 |
-> Proofview.telescope |
| 207 |
-> t |
| 208 |
|
| 209 |
|
| 210 |
val start_definition |
| 211 |
: info:Info.t |
| 212 |
-> cinfo:EConstr.t CInfo.t |
| 213 |
-> ?using:Vernacexpr.section_subset_expr |
| 214 |
-> Evd.evar_map |
| 215 |
-> t |
| 216 |
|
| 217 |
|
| 218 |
val start_mutual_definitions |
| 219 |
: info:Info.t |
| 220 |
-> cinfo:Constr.t CInfo.t list |
| 221 |
-> bodies:Constr.t option list |
| 222 |
-> possible_guard:(Pretyping.possible_guard * Sorts.relevance list) |
| 223 |
-> ?using:Vernacexpr.section_subset_expr |
| 224 |
-> Evd.evar_map |
| 225 |
-> t |
| 226 |
|
| 227 |
|
| 228 |
val start_mutual_definitions_refine |
| 229 |
: info:Info.t |
| 230 |
-> cinfo:EConstr.t CInfo.t list |
| 231 |
-> bodies:EConstr.t option list |
| 232 |
-> possible_guard:(Pretyping.possible_guard * Evd.erelevance list) |
| 233 |
-> ?using:Vernacexpr.section_subset_expr |
| 234 |
-> Evd.evar_map |
| 235 |
-> t |
| 236 |
|
| 237 |
|
| 238 |
val save |
| 239 |
: pm:OblState.t |
| 240 |
-> proof:t |
| 241 |
-> opaque:Vernacexpr.opacity_flag |
| 242 |
-> idopt:Names.lident option |
| 243 |
-> OblState.t * GlobRef.t list |
| 244 |
|
| 245 |
|
| 246 |
val save_regular |
| 247 |
: proof:t |
| 248 |
-> opaque:Vernacexpr.opacity_flag |
| 249 |
-> idopt:Names.lident option |
| 250 |
-> GlobRef.t list |
| 251 |
|
| 252 |
|
| 253 |
val save_admitted : pm:OblState.t -> proof:t -> OblState.t |
| 254 |
|
| 255 |
|
| 256 |
|
| 257 |
|
| 258 |
val by : Environ.env -> unit Proofview.tactic -> t -> t * bool |
| 259 |
|
| 260 |
|
| 261 |
val get : t -> Proof.t |
| 262 |
val get_name : t -> Names.Id.t |
| 263 |
|
| 264 |
val fold : f:(Proof.t -> 'a) -> t -> 'a |
| 265 |
val map : f:(Proof.t -> Proof.t) -> t -> t |
| 266 |
val map_fold : f:(Proof.t -> Proof.t * 'a) -> t -> t * 'a |
| 267 |
val map_fold_endline : f:(Gentactic.glob_generic_tactic option -> Proof.t -> Proof.t * 'a) -> t -> t * 'a |
| 268 |
|
| 269 |
|
| 270 |
val set_endline_tactic : Gentactic.glob_generic_tactic -> t -> t |
| 271 |
|
| 272 |
val definition_scope : t -> Locality.definition_scope |
| 273 |
|
| 274 |
|
| 275 |
|
| 276 |
val set_proof_using : t -> Vernacexpr.section_subset_expr -> Constr.named_context * t |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
val get_used_variables : t -> Id.Set.t option |
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
val compact : t -> t |
| 285 |
|
| 286 |
|
| 287 |
|
| 288 |
|
| 289 |
val update_sigma_univs : UGraph.t -> t -> t |
| 290 |
|
| 291 |
val get_open_goals : t -> int |
| 292 |
|
| 293 |
|
| 294 |
|
| 295 |
|
| 296 |
|
| 297 |
|
| 298 |
|
| 299 |
val get_goal_context : t -> int -> Evd.evar_map * Environ.env |
| 300 |
|
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
|
| 305 |
|
| 306 |
val get_current_context : t -> Evd.evar_map * Environ.env |
| 307 |
|
| 308 |
|
| 309 |
|
| 310 |
|
| 311 |
|
| 312 |
|
| 313 |
type closed_proof_output |
| 314 |
|
| 315 |
|
| 316 |
val return_proof : t -> closed_proof_output |
| 317 |
|
| 318 |
|
| 319 |
|
| 320 |
|
| 321 |
type proof_object |
| 322 |
|
| 323 |
val close_proof : ?warn_incomplete:bool -> opaque:Vernacexpr.opacity_flag -> keep_body_ucst_separate:bool -> t -> proof_object |
| 324 |
val close_future_proof : feedback_id:Stateid.t -> t -> closed_proof_output Future.computation -> proof_object |
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
val save_lemma_admitted_delayed : |
| 329 |
pm:OblState.t |
| 330 |
-> proof:proof_object |
| 331 |
-> OblState.t |
| 332 |
|
| 333 |
val save_lemma_proved_delayed |
| 334 |
: pm:OblState.t |
| 335 |
-> proof:proof_object |
| 336 |
-> idopt:Names.lident option |
| 337 |
-> OblState.t |
| 338 |
|
| 339 |
exception NotGuarded of |
| 340 |
Environ.env * Evd.evar_map * |
| 341 |
(Environ.env * int * EConstr.t Type_errors.pcofix_guard_error) option * |
| 342 |
(Environ.env * int * int list * EConstr.t Type_errors.pfix_guard_error) list * |
| 343 |
EConstr.rec_declaration |
| 344 |
|
| 345 |
val control_only_guard : t -> unit |
| 346 |
|
| 347 |
end |
| 348 |
|
| 349 |
|
| 350 |
|
| 351 |
|
| 352 |
|
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
type proof_entry |
| 358 |
type parameter_entry |
| 359 |
type primitive_entry |
| 360 |
type symbol_entry |
| 361 |
|
| 362 |
val definition_entry |
| 363 |
: ?opaque:bool |
| 364 |
-> ?using:Names.Id.Set.t |
| 365 |
-> ?inline:bool |
| 366 |
-> ?types:Constr.types |
| 367 |
-> ?univs:UState.named_universes_entry |
| 368 |
-> Constr.constr |
| 369 |
-> proof_entry |
| 370 |
|
| 371 |
val parameter_entry |
| 372 |
: ?inline:int |
| 373 |
-> ?univs:UState.named_universes_entry |
| 374 |
-> Constr.constr |
| 375 |
-> parameter_entry |
| 376 |
|
| 377 |
val primitive_entry |
| 378 |
: ?types:(Constr.types * UState.named_universes_entry) |
| 379 |
-> CPrimitives.op_or_type |
| 380 |
-> primitive_entry |
| 381 |
|
| 382 |
val symbol_entry |
| 383 |
: ?univs:UState.named_universes_entry |
| 384 |
-> unfold_fix:bool |
| 385 |
-> Constr.types |
| 386 |
-> symbol_entry |
| 387 |
|
| 388 |
|
| 389 |
|
| 390 |
|
| 391 |
val declare_entry |
| 392 |
: ?loc:Loc.t |
| 393 |
-> name:Id.t |
| 394 |
-> ?scope:Locality.definition_scope |
| 395 |
-> kind:Decls.logical_kind |
| 396 |
-> ?user_warns:Globnames.extended_global_reference UserWarn.with_qf |
| 397 |
-> ?hook:Hook.t |
| 398 |
-> impargs:Impargs.manual_implicits |
| 399 |
-> uctx:UState.t |
| 400 |
-> proof_entry |
| 401 |
-> GlobRef.t |
| 402 |
|
| 403 |
|
| 404 |
type variable_declaration = |
| 405 |
| SectionLocalDef of { |
| 406 |
clearbody : bool; |
| 407 |
entry : proof_entry; |
| 408 |
} |
| 409 |
| SectionLocalAssum of { |
| 410 |
typ : Constr.types; |
| 411 |
impl : Glob_term.binding_kind; |
| 412 |
univs : UState.named_universes_entry; |
| 413 |
} |
| 414 |
|
| 415 |
|
| 416 |
val declare_variable |
| 417 |
: name:variable |
| 418 |
-> kind:Decls.logical_kind |
| 419 |
-> typing_flags:Declarations.typing_flags option |
| 420 |
-> variable_declaration |
| 421 |
-> unit |
| 422 |
|
| 423 |
|
| 424 |
|
| 425 |
|
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
type constant_entry = |
| 430 |
| DefinitionEntry of proof_entry |
| 431 |
| ParameterEntry of parameter_entry |
| 432 |
| PrimitiveEntry of primitive_entry |
| 433 |
| SymbolEntry of symbol_entry |
| 434 |
|
| 435 |
val prepare_parameter |
| 436 |
: poly:PolyFlags.t |
| 437 |
-> udecl:UState.universe_decl |
| 438 |
-> types:EConstr.types |
| 439 |
-> Evd.evar_map |
| 440 |
-> Evd.evar_map * parameter_entry |
| 441 |
|
| 442 |
|
| 443 |
|
| 444 |
|
| 445 |
|
| 446 |
|
| 447 |
|
| 448 |
|
| 449 |
val declare_constant |
| 450 |
: ?loc:Loc.t |
| 451 |
-> ?local:Locality.import_status |
| 452 |
-> name:Id.t |
| 453 |
-> kind:Decls.logical_kind |
| 454 |
-> ?typing_flags:Declarations.typing_flags |
| 455 |
-> ?user_warns:Globnames.extended_global_reference UserWarn.with_qf |
| 456 |
-> constant_entry |
| 457 |
-> Constant.t |
| 458 |
|
| 459 |
|
| 460 |
|
| 461 |
val declare_definition_full |
| 462 |
: info:Info.t |
| 463 |
-> cinfo:EConstr.t option CInfo.t |
| 464 |
-> opaque:bool |
| 465 |
-> body:EConstr.t |
| 466 |
-> ?using:Vernacexpr.section_subset_expr |
| 467 |
-> Evd.evar_map |
| 468 |
-> GlobRef.t * Univ.ContextSet.t |
| 469 |
|
| 470 |
|
| 471 |
|
| 472 |
|
| 473 |
val definition_message : Id.t -> unit |
| 474 |
val assumption_message : Id.t -> unit |
| 475 |
val fixpoint_message : int array option -> Id.t list -> unit |
| 476 |
|
| 477 |
|
| 478 |
|
| 479 |
|
| 480 |
|
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
|
| 500 |
|
| 501 |
|
| 502 |
|
| 503 |
|
| 504 |
|
| 505 |
|
| 506 |
|
| 507 |
|
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
|
| 512 |
|
| 513 |
|
| 514 |
|
| 515 |
|
| 516 |
|
| 517 |
|
| 518 |
|
| 519 |
|
| 520 |
|
| 521 |
|
| 522 |
|
| 523 |
|
| 524 |
|
| 525 |
|
| 526 |
|
| 527 |
module Obls : sig |
| 528 |
|
| 529 |
type fixpoint_kind = IsFixpoint of lident option list | IsCoFixpoint |
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
val check_solved_obligations : pm:OblState.t -> what_for:Pp.t -> unit |
| 534 |
val default_tactic : unit Proofview.tactic ref |
| 535 |
|
| 536 |
|
| 537 |
val prepare_obligations |
| 538 |
: name:Id.t |
| 539 |
-> PolyFlags.t |
| 540 |
-> ?types:EConstr.t |
| 541 |
-> body:EConstr.t |
| 542 |
-> Environ.env |
| 543 |
-> Evd.evar_map |
| 544 |
-> Constr.constr * Constr.types * UState.t * RetrieveObl.obligation_name_lifter * RetrieveObl.obligation_info |
| 545 |
|
| 546 |
|
| 547 |
|
| 548 |
|
| 549 |
|
| 550 |
|
| 551 |
val add_definition : |
| 552 |
pm:OblState.t |
| 553 |
-> info:Info.t |
| 554 |
-> cinfo:Constr.types CInfo.t |
| 555 |
-> opaque:bool |
| 556 |
-> uctx:UState.t |
| 557 |
-> ?body:Constr.t |
| 558 |
-> ?tactic:unit Proofview.tactic |
| 559 |
-> ?reduce:(Constr.t -> Constr.t) |
| 560 |
-> ?using:Vernacexpr.section_subset_expr |
| 561 |
-> ?obl_hook: OblState.t Hook.g |
| 562 |
-> RetrieveObl.obligation_info |
| 563 |
-> OblState.t |
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
val add_mutual_definitions : |
| 570 |
pm:OblState.t |
| 571 |
-> info:Info.t |
| 572 |
-> cinfo:Constr.types CInfo.t list |
| 573 |
-> opaque:bool |
| 574 |
-> uctx:UState.t |
| 575 |
-> bodies:Constr.t list |
| 576 |
-> possible_guard:(Pretyping.possible_guard * Sorts.relevance list) |
| 577 |
-> ?tactic:unit Proofview.tactic |
| 578 |
-> ?reduce:(Constr.t -> Constr.t) |
| 579 |
-> ?using:Vernacexpr.section_subset_expr |
| 580 |
-> ?obl_hook: OblState.t Hook.g |
| 581 |
-> RetrieveObl.obligation_info list |
| 582 |
-> OblState.t |
| 583 |
|
| 584 |
|
| 585 |
val obligation : |
| 586 |
int * Names.Id.t option |
| 587 |
-> pm:OblState.t |
| 588 |
-> Gentactic.glob_generic_tactic option |
| 589 |
-> Proof.t |
| 590 |
|
| 591 |
|
| 592 |
val next_obligation : |
| 593 |
pm:OblState.t -> ?final:bool -> Names.Id.t option -> Gentactic.glob_generic_tactic option -> Proof.t |
| 594 |
|
| 595 |
|
| 596 |
val solve_obligations : |
| 597 |
pm:OblState.t -> Names.Id.t option -> unit Proofview.tactic option -> OblState.t |
| 598 |
|
| 599 |
|
| 600 |
val solve_all_obligations : pm:OblState.t -> unit Proofview.tactic option -> OblState.t |
| 601 |
|
| 602 |
|
| 603 |
val show_obligations : pm:OblState.t -> ?msg:bool -> Names.Id.t option -> unit |
| 604 |
|
| 605 |
|
| 606 |
val show_term : pm:OblState.t -> Names.Id.t option -> Pp.t |
| 607 |
|
| 608 |
|
| 609 |
val admit_obligations : pm:OblState.t -> Names.Id.t option -> OblState.t |
| 610 |
|
| 611 |
val check_program_libraries : unit -> unit |
| 612 |
|
| 613 |
val program_inference_hook : Environ.env -> Evd.evar_map -> Evar.t -> (Evd.evar_map * EConstr.t) option |
| 614 |
|
| 615 |
end |
| 616 |
|
| 617 |
val is_local_constant : Constant.t -> bool |
| 618 |
|
| 619 |
|
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
module Internal : sig |
| 624 |
|
| 625 |
|
| 626 |
module Constant : sig |
| 627 |
type t |
| 628 |
val tag : (Id.t * t) Libobject.Dyn.tag |
| 629 |
val kind : t -> Decls.logical_kind |
| 630 |
end |
| 631 |
|
| 632 |
val objVariable : Id.t Libobject.Dyn.tag |
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
|
| 638 |
val export_side_effects : Evd.side_effects -> unit |
| 639 |
|
| 640 |
val register_side_effects : Proof.t -> Proof.t |
| 641 |
|
| 642 |
end |