package coq-waterproof
Coq proofs in a style that resembles non-mechanized mathematical proofs
Install
Dune Dependency
Authors
Maintainers
Sources
2.2.0+8.20.tar.gz
md5=18c6dafc6fb018f167f89fb236ff494b
sha512=096ebe52912ebe3fb063a5ce88bee1dfc8f63226f7f1284a4304a079751b98c617a4fcafa9781c3e54e024e631c87248885b56efc20086c98ae0e525cfe08efb
doc/src/coq-waterproof.plugin/wp_evars.ml.html
Source file wp_evars.ml
1 2 3 4 5 6 7 8 9 10 11 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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
(******************************************************************************) (* This file is part of Waterproof-lib. *) (* *) (* Waterproof-lib is free software: you can redistribute it and/or modify *) (* it under the terms of the GNU General Public License as published by *) (* the Free Software Foundation, either version 3 of the License, or *) (* (at your option) any later version. *) (* *) (* Waterproof-lib is distributed in the hope that it will be useful, *) (* but WITHOUT ANY WARRANTY; without even the implied warranty of *) (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *) (* GNU General Public License for more details. *) (* *) (* You should have received a copy of the GNU General Public License *) (* along with Waterproof-lib. If not, see <https://www.gnu.org/licenses/>. *) (* *) (******************************************************************************) open Proofview open Proofview.Notations (** Checks whether a given evar is a blank in the evar_map. *) let is_blank (ev_map : Evd.evar_map) (ev : Evar.t) : bool = let EvarInfo ev_info = Evd.find ev_map ev in let _, ev_kind = (Evd.evar_source ev_info) in match ev_kind with | Evar_kinds.QuestionMark _ -> true | _ -> false (** A tactic that resturns a list of all evars in a term (= Evd.econstr) that were introduced by the user as a blank and have not been resolved yet. *) let blank_evars_in_term (term : Evd.econstr) : Evar.t list tactic = tclEVARMAP >>= fun sigma -> tclUNIT @@ let evars = Evarutil.undefined_evars_of_term sigma term in List.filter (is_blank sigma) (Evar.Set.elements evars) (** Refines the current goal with just a new named evar, the name of which is freshly generated based on the input string. *) let refine_goal_with_evar (input : string) : unit tactic = let src = (Loc.tag Evar_kinds.GoalEvar) in Proofview.Goal.enter begin fun gl -> let env = Proofview.Goal.env gl in let concl = Proofview.Goal.concl gl in Refine.refine ~typecheck:true begin function sigma -> let sigma, t = Evarutil.new_evar ~src ~naming:(Namegen.IntroFresh (Names.Id.of_string input)) env sigma concl in (sigma, t) end end
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>