package coq-core
The Coq Proof Assistant -- Core Binaries and Tools
Install
Dune Dependency
Authors
Maintainers
Sources
coq-8.19.0.tar.gz
md5=64b49dbc3205477bd7517642c0b9cbb6
sha512=02fb5b4fb575af79e092492cbec6dc0d15a1d74a07f827f657a72d4e6066532630e5a6d15be4acdb73314bd40b9a321f9ea0584e0ccfe51fd3a56353bd30db9b
doc/src/coq-core.tactics/redops.ml.html
Source file redops.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 58 59 60 61 62 63 64 65 66 67 68 69
(************************************************************************) (* * 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) *) (************************************************************************) open Genredexpr let union_consts l1 l2 = Util.List.union (=) l1 l2 (* FIXME *) let all_flags = {rBeta = true; rMatch = true; rFix = true; rCofix = true; rZeta = true; rDelta = true; rConst = []; rStrength = Norm; } let make_red_flag l = let rec add_flag red = function | [] -> red | FHead :: lf -> add_flag { red with rStrength = Head } lf | FBeta :: lf -> add_flag { red with rBeta = true } lf | FMatch :: lf -> add_flag { red with rMatch = true } lf | FFix :: lf -> add_flag { red with rFix = true } lf | FCofix :: lf -> add_flag { red with rCofix = true } lf | FZeta :: lf -> add_flag { red with rZeta = true } lf | FConst l :: lf -> if red.rDelta then CErrors.user_err Pp.(str "Cannot set both constants to unfold and constants not to unfold"); add_flag { red with rConst = union_consts red.rConst l } lf | FDeltaBut l :: lf -> if red.rConst <> [] && not red.rDelta then CErrors.user_err Pp.(str "Cannot set both constants to unfold and constants not to unfold"); add_flag { red with rConst = union_consts red.rConst l; rDelta = true } lf in add_flag {rBeta = false; rMatch = false; rFix = false; rCofix = false; rZeta = false; rDelta = false; rConst = []; rStrength = Norm; } l let make_red_flag = function | [FHead] -> { all_flags with rStrength = Head } | l -> make_red_flag l (** Mapping [red_expr_gen] *) let map_flags f flags = { flags with rConst = List.map f flags.rConst } let map_occs f (occ,e) = (occ,f e) let map_red_expr_gen f g h = function | Fold l -> Fold (List.map f l) | Pattern occs_l -> Pattern (List.map (map_occs f) occs_l) | Simpl (flags,occs_o) -> Simpl (map_flags g flags, Option.map (map_occs (Util.map_union g h)) occs_o) | Unfold occs_l -> Unfold (List.map (map_occs g) occs_l) | Cbv flags -> Cbv (map_flags g flags) | Lazy flags -> Lazy (map_flags g flags) | CbvVm occs_o -> CbvVm (Option.map (map_occs (Util.map_union g h)) occs_o) | CbvNative occs_o -> CbvNative (Option.map (map_occs (Util.map_union g h)) occs_o) | Cbn flags -> Cbn (map_flags g flags) | ExtraRedExpr _ | Red | Hnf as x -> x
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>