Synint.Comp
type case_label =
| Lf_constant of Syncom.Location.t * Syncom.Name.t * Syncom.Id.cid_term
| Comp_constant of Syncom.Location.t * Syncom.Name.t * Syncom.Id.cid_comp_const
| BVarCase of Syncom.Location.t
| ContextCase of context_case
| PVarCase of Syncom.Location.t * int * int option
Type specified in an interactive use of `suffices`
val map_suffices_typ :
('a -> 'b) ->
'a generic_suffices_typ ->
'b generic_suffices_typ
val map_order : ('a -> 'b) -> 'a generic_order -> 'b generic_order
type meta_typ = LF.ctyp
type meta_obj = Syncom.Location.t * LF.mfront
type typ =
| TypBase of Syncom.Location.t * Syncom.Id.cid_comp_typ * meta_spine
| TypCobase of Syncom.Location.t * Syncom.Id.cid_comp_cotyp * meta_spine
| TypDef of Syncom.Location.t * Syncom.Id.cid_comp_typ * meta_spine
| TypBox of Syncom.Location.t * meta_typ
| TypArr of Syncom.Location.t * typ * typ
| TypCross of Syncom.Location.t * typ Support.List2.t
| TypPiBox of Syncom.Location.t * LF.ctyp_decl * typ
| TypClo of typ * LF.msub
| TypInd of typ
type suffices_typ = typ generic_suffices_typ
val loc_of_typ : typ -> Syncom.Location.t
val loc_of_suffices_typ : suffices_typ -> Syncom.Location.t
val rename_ctyp_decl :
(Syncom.Name.t -> Syncom.Name.t) ->
ctyp_decl ->
ctyp_decl
and exp =
| Fn of Syncom.Location.t * Syncom.Name.t * exp
| Fun of Syncom.Location.t * fun_branches
| MLam of Syncom.Location.t * Syncom.Name.t * exp * Syncom.Plicity.t
| Tuple of Syncom.Location.t * exp Support.List2.t
| LetTuple of Syncom.Location.t * exp * Syncom.Name.t Support.List2.t * exp
| Let of Syncom.Location.t * exp * Syncom.Name.t * exp
| Box of Syncom.Location.t * meta_obj * meta_typ
| Case of Syncom.Location.t * case_pragma * exp * branch list
| Impossible of Syncom.Location.t * exp
| Hole of Syncom.Location.t * Syncom.HoleId.t * Syncom.HoleId.name
| Var of Syncom.Location.t * Syncom.Id.offset
| DataConst of Syncom.Location.t * Syncom.Id.cid_comp_const
| Obs of Syncom.Location.t * exp * LF.msub * Syncom.Id.cid_comp_dest
| Const of Syncom.Location.t * Syncom.Id.cid_prog
| Apply of Syncom.Location.t * exp * exp
| MApp of Syncom.Location.t * exp * meta_obj * meta_typ * Syncom.Plicity.t
| AnnBox of Syncom.Location.t * meta_obj * meta_typ
Normal computational terms
and pattern =
| PatMetaObj of Syncom.Location.t * meta_obj
| PatConst of Syncom.Location.t * Syncom.Id.cid_comp_const * pattern_spine
| PatFVar of Syncom.Location.t * Syncom.Name.t
| PatVar of Syncom.Location.t * Syncom.Id.offset
| PatTuple of Syncom.Location.t * pattern Support.List2.t
| PatAnn of Syncom.Location.t * pattern * typ * Syncom.Plicity.t
and pattern_spine =
| PatNil
| PatApp of Syncom.Location.t * pattern * pattern_spine
| PatObs of Syncom.Location.t * Syncom.Id.cid_comp_dest * LF.msub * pattern_spine
and fun_branches =
| NilFBranch of Syncom.Location.t
| ConsFBranch of Syncom.Location.t
* LF.mctx * gctx * pattern_spine * exp
* fun_branches
type order = int generic_order
val map_total_dec_kind :
('o2 -> 'o2) ->
'o2 total_dec_kind ->
'o2 total_dec_kind
Applies a spine of checkable terms to a synthesizable term, from left to right.
val loc_of_exp : exp -> Syncom.Location.t
val make_total_dec : Syncom.Name.t -> typ -> order total_dec_kind -> total_dec
Decides whether this synthesizable expression is actually an annotated box.
val head_of_meta_obj : meta_obj -> (LF.dctx_hat * LF.head) option
Finds the head of an application. Chases meta-applications and computation applications.
val strip_pattern_spine : pattern_spine -> pattern_spine
val no_hypotheses : hypotheses
module SubgoalPath : sig ... end
type proof =
| Incomplete of Syncom.Location.t * proof_state
| Command of command * proof
| Directive of directive
and command =
| By of exp * Syncom.Name.t * typ
| Unbox of exp * Syncom.Name.t * LF.ctyp * unbox_modifier option
and proof_state = {
context : hypotheses;
label : SubgoalPath.builder;
goal : tclo;
solution : proof option Stdlib.ref;
}
and directive =
| Intros of hypothetical
| Solve of exp
| ImpossibleSplit of exp
| Suffices of exp * suffices_arg list
| MetaSplit of exp * typ * meta_branch list
| CompSplit of exp * typ * comp_branch list
| ContextSplit of exp * typ * context_branch list
and suffices_arg = Syncom.Location.t * typ * proof
and context_branch = context_case split_branch
and meta_branch = meta_branch_label split_branch
and comp_branch = Syncom.Id.cid_comp_const split_branch
A general branch of a case analysis.
A hypothetical derivation lists meta-hypotheses and hypotheses, then proceeds with a proof.
type open_subgoal = Syncom.Location.t * Syncom.Id.cid_prog * proof_state
An open subgoal is a proof state together with a reference ot the theorem in which it occurs.
val make_proof_state : SubgoalPath.builder -> tclo -> proof_state
Generates a unsolved subgoal with the given goal in an empty context, with no label.
val incomplete_proof : Syncom.Location.t -> proof_state -> proof
Smart constructor for an unfinished proof ending.
val intros : hypotheses -> proof -> proof
Smart constructor for the intros directive.
val suffices : exp -> suffices_arg list -> proof
val context_split : exp -> typ -> context_branch list -> proof
val context_branch :
context_case ->
(gctx * pattern) ->
LF.msub ->
hypotheses ->
proof ->
context_branch
val meta_split : exp -> typ -> meta_branch list -> proof
val meta_branch :
meta_branch_label ->
(gctx * pattern) ->
LF.msub ->
hypotheses ->
proof ->
meta_branch
val comp_split : exp -> typ -> comp_branch list -> proof
val comp_branch :
Syncom.Id.cid_comp_const ->
(gctx * pattern) ->
LF.msub ->
hypotheses ->
proof ->
comp_branch
Gives a more convenient way of writing complex proofs by using list syntax.
val name_of_ctyp_decl : ctyp_decl -> Syncom.Name.t
val metavariable_of_exp :
exp ->
(Syncom.Id.offset * Syncom.Id.offset option) option
Decides whether the computational term is actually a variable index object. See `LF.variable_of_mfront`.
val variable_of_exp : exp -> Syncom.Id.offset option
and value =
| FnValue of Syncom.Name.t * exp * LF.msub * env
| FunValue of fun_branches_value
| ThmValue of Syncom.Id.cid_prog * thm * LF.msub * env
| MLamValue of Syncom.Name.t * exp * LF.msub * env
| CtxValue of Syncom.Name.t * exp * LF.msub * env
| BoxValue of meta_obj
| ConstValue of Syncom.Id.cid_prog
| DataValue of Syncom.Id.cid_comp_const * data_spine
| TupleValue of value Support.List2.t
and fun_branches_value =
| NilValBranch
| ConsValBranch of pattern_spine * exp * LF.msub * env * fun_branches_value