X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Ftactics%2FproofEngineHelpers.mli;h=71486050195dcd55b95961c3c2545e1d304d971f;hb=8e76ac2823de8cffc0b5f75b36264f86e3d0b52d;hp=f0b2c87f12fc14a2b8f8ac3d477c7654a023cc9f;hpb=5d010a40c726d9a7eceeb35e70e41a158eb63c70;p=helm.git diff --git a/helm/software/components/tactics/proofEngineHelpers.mli b/helm/software/components/tactics/proofEngineHelpers.mli index f0b2c87f1..714860501 100644 --- a/helm/software/components/tactics/proofEngineHelpers.mli +++ b/helm/software/components/tactics/proofEngineHelpers.mli @@ -35,7 +35,7 @@ val subst_meta_in_proof : ProofEngineTypes.proof * Cic.metasenv val subst_meta_and_metasenv_in_proof : ProofEngineTypes.proof -> - int -> (Cic.term -> Cic.term) -> Cic.metasenv -> + int -> Cic.substitution -> Cic.metasenv -> ProofEngineTypes.proof * Cic.metasenv (* returns the list of goals that are in newmetasenv and were not in @@ -79,7 +79,7 @@ val select: pattern:ProofEngineTypes.lazy_pattern -> Cic.substitution * Cic.metasenv * CicUniv.universe_graph * [ `Decl of (Cic.context * Cic.term) list - | `Def of (Cic.context * Cic.term) list * (Cic.context * Cic.term) list option + | `Def of (Cic.context * Cic.term) list * (Cic.context * Cic.term) list ] option list * (Cic.context * Cic.term) list @@ -106,8 +106,32 @@ val locate_in_conjecture: (* returns the index and the type of a premise in a context *) val lookup_type: Cic.metasenv -> Cic.context -> string -> int * Cic.term +(* orders a metasenv w.r.t. dependency among metas *) +val sort_metasenv: Cic.metasenv -> Cic.metasenv + +(* finds an hypothesis by name in the context *) +val find_hyp: string -> Cic.context -> Cic.term * Cic.term + +(* sort pattern hypotheses from the smallest to the highest Rel *) +val sort_pattern_hyps: + Cic.context -> ProofEngineTypes.lazy_pattern -> ProofEngineTypes.lazy_pattern + + (* FG: some helper functions ************************************************) val get_name: Cic.context -> int -> string option val get_rel: Cic.context -> string -> Cic.term option + +(* split_with_whd (c, t) takes a type t typed in the context c and returns + [(c_0, t_0); (c_1, t_1); ...; (c_n, t_n)], n where t_0 is the conclusion of + t and t_i is the premise of t accessed by Rel i in t_0. + Performes a whd on the conclusion before giving up. + Each t_i is returned with a context c_i in wich it is typed + split_with_normalize (c, t) normalizes t before operating the split + whd is useless here +*) +val split_with_whd: Cic.context * Cic.term -> + (Cic.context * Cic.term) list * int +val split_with_normalize: Cic.context * Cic.term -> + (Cic.context * Cic.term) list * int