Debian Codegraph @

tactics/equality.mli

raw symbols SCIP
1 (************************************************************************)
2 (* * The Rocq Prover / The Rocq Development Team *)
3 (* v * Copyright INRIA, CNRS and contributors *)
4 (* <O___,, * (see version control and CREDITS file for authors & dates) *)
5 (* \VV/ **************************************************************)
6 (* // * This file is distributed under the terms of the *)
7 (* * GNU Lesser General Public License Version 2.1 *)
8 (* * (see LICENSE file for the text of the license) *)
9 (************************************************************************)
10
11 (*i*)
12 open Names
13 open EConstr
14 open Ind_tables
15 open Locus
16 open Tactypes
17 open Tactics
18 (*i*)
19
20 type dep_proof_flag = bool (* true = support rewriting dependent proofs *)
21 type freeze_evars_flag = bool (* true = don't instantiate existing evars *)
22
23 type orientation = bool
24
25 type conditions =
26 | Naive (* Only try the first occurrence of the lemma (default) *)
27 | FirstSolved (* Use the first match whose side-conditions are solved *)
28 | AllMatches (* Rewrite all matches whose side-conditions are solved *)
29
30 val lookup_eq_eliminator_with_error : ?het_eq:bool -> Environ.env -> Evd.evar_map -> Evd.econstr ->
31 dep:orientation -> inccl:orientation -> l2r:orientation option ->
32 c_sort:ESorts.t ->
33 e_sort:ESorts.t ->
34 p_sort:ESorts.t ->
35 (Evd.evar_map * Evd.econstr) * equality_position_on_elim
36
37 (* Equivalent to [general_rewrite l2r] *)
38 val rewriteLR : constr -> unit Proofview.tactic
39 val rewriteRL : constr -> unit Proofview.tactic
40
41 (* Warning: old [general_rewrite_in] is now [general_rewrite_bindings_in] *)
42
43 val general_setoid_rewrite_clause :
44 (Id.t option -> orientation -> occurrences -> constr with_bindings ->
45 new_goals:constr list -> unit Proofview.tactic) Hook.t
46
47 val general_rewrite : where:Id.t option ->
48 l2r:orientation -> occurrences -> freeze:freeze_evars_flag -> dep:dep_proof_flag -> with_evars:evars_flag ->
49 ?tac:(unit Proofview.tactic * conditions) -> constr with_bindings -> unit Proofview.tactic
50
51 type multi =
52 | Precisely of int
53 | UpTo of int
54 | RepeatStar
55 | RepeatPlus
56
57 val general_multi_rewrite :
58 evars_flag -> (bool * multi * clear_flag * delayed_open_constr_with_bindings) list ->
59 clause -> (unit Proofview.tactic * conditions) option -> unit Proofview.tactic
60
61 val replace_in_clause_maybe_by : bool option -> constr -> constr -> clause -> unit Proofview.tactic option -> unit Proofview.tactic
62 val replace : constr -> constr -> unit Proofview.tactic
63 val replace_by : constr -> constr -> unit Proofview.tactic -> unit Proofview.tactic
64
65 type inj_flags = {
66 keep_proof_equalities : bool; (* One may want it or not *)
67 injection_pattern_l2r_order : bool; (* Compatibility option: no reason not to want it *)
68 }
69
70 val discr : evars_flag -> constr with_bindings -> unit Proofview.tactic
71 val discrConcl : unit Proofview.tactic
72 val discrHyp : Id.t -> unit Proofview.tactic
73 val discrEverywhere : evars_flag -> unit Proofview.tactic
74 val discr_tac : evars_flag ->
75 constr with_bindings Tactics.destruction_arg option -> unit Proofview.tactic
76
77 (* Below, if flag is [None], it takes the value from the dynamic value of the option *)
78 exception NothingToInject
79 val inj : inj_flags option -> ?injection_in_context:bool -> intro_patterns option -> evars_flag ->
80 clear_flag -> constr with_bindings -> unit Proofview.tactic
81 val injClause : inj_flags option -> ?injection_in_context:bool -> intro_patterns option -> evars_flag ->
82 constr with_bindings Tactics.destruction_arg option -> unit Proofview.tactic
83 val injHyp : inj_flags option -> ?injection_in_context:bool -> clear_flag -> Id.t -> unit Proofview.tactic
84 val injConcl : inj_flags option -> ?injection_in_context:bool -> unit -> unit Proofview.tactic
85 val simpleInjClause : inj_flags option -> evars_flag ->
86 constr with_bindings Tactics.destruction_arg option -> unit Proofview.tactic
87
88 val dEq : keep_proofs:(bool option) -> evars_flag -> constr with_bindings Tactics.destruction_arg option -> unit Proofview.tactic
89 val dEqThen : keep_proofs:(bool option) -> evars_flag -> (int -> unit Proofview.tactic) -> constr with_bindings Tactics.destruction_arg option -> unit Proofview.tactic
90
91 (* The family rewriteIn expect the proof of an equality *)
92 val rewriteInHyp : bool -> constr -> Id.t -> unit Proofview.tactic
93 val rewriteInConcl : bool -> constr -> unit Proofview.tactic
94
95 val set_keep_equality : Libobject.locality -> inductive -> bool -> unit
96
97 (* Subst *)
98
99 (* val unfold_body : Id.t -> tactic *)
100
101 type subst_tactic_flags = {
102 only_leibniz : bool;
103 rewrite_dependent_proof : bool
104 }
105 val subst_gen : bool -> Id.t list -> unit Proofview.tactic
106 val subst : Id.t list -> unit Proofview.tactic
107 val subst_all : ?flags:subst_tactic_flags -> unit -> unit Proofview.tactic
108
109 (* Replace term *)
110 (* [replace_term dir_opt c cl]
111 performs replacement of [c] by the first value found in context
112 (according to [dir] if given to get the rewrite direction) in the clause [cl]
113 *)
114 val replace_term : bool option -> constr -> clause -> unit Proofview.tactic
115
116 val set_eq_dec_scheme_kind : mutual scheme_kind -> unit