| Change of loc * ('term, 'lazy_term, 'ident) pattern * 'lazy_term
| Clear of loc * 'ident
| ClearBody of loc * 'ident
- | Compare of loc * 'term
| Constructor of loc * int
| Contradiction of loc
| Cut of loc * 'ident option * 'term
- | DecideEquality of loc
| Decompose of loc * ('term, 'ident) type_spec list * 'ident * 'ident list
| Discriminate of loc * 'term
| Elim of loc * 'term * 'term option * int option * 'ident list
sprintf "change %s with %s" (pp_tactic_pattern where) (lazy_term_pp with_what)
| Clear (_,id) -> sprintf "clear %s" id
| ClearBody (_,id) -> sprintf "clearbody %s" id
- | Compare (_,term) -> "compare " ^ term_pp term
| Constructor (_,n) -> "constructor " ^ string_of_int n
| Contradiction _ -> "contradiction"
| Cut (_, ident, term) ->
"cut " ^ term_pp term ^
(match ident with None -> "" | Some id -> " as " ^ id)
- | DecideEquality _ -> "decide equality"
| Decompose (_, [], what, names) ->
sprintf "decompose %s%s" what (pp_intros_specs (None, names))
| Decompose (_, types, what, names) ->
| GrafiteAst.Clear (_,id) -> Tactics.clear id
| GrafiteAst.ClearBody (_,id) -> Tactics.clearbody id
| GrafiteAst.Contradiction _ -> Tactics.contradiction
- | GrafiteAst.Compare (_, term) -> Tactics.compare term
| GrafiteAst.Constructor (_, n) -> Tactics.constructor n
| GrafiteAst.Cut (_, ident, term) ->
let names = match ident with None -> [] | Some id -> [id] in
Tactics.cut ~mk_fresh_name_callback:(namer_of names) term
- | GrafiteAst.DecideEquality _ -> Tactics.decide_equality
| GrafiteAst.Decompose (_, types, what, names) ->
let to_type = function
| GrafiteAst.Type (uri, typeno) -> uri, typeno
metasenv,GrafiteAst.Clear (loc,id)
| GrafiteAst.ClearBody (loc,id) ->
metasenv,GrafiteAst.ClearBody (loc,id)
- | GrafiteAst.Compare (loc,term) ->
- let metasenv,term = disambiguate_term context metasenv term in
- metasenv,GrafiteAst.Compare (loc,term)
| GrafiteAst.Constructor (loc,n) ->
metasenv,GrafiteAst.Constructor (loc,n)
| GrafiteAst.Contradiction loc ->
| GrafiteAst.Cut (loc, ident, term) ->
let metasenv,cic = disambiguate_term context metasenv term in
metasenv,GrafiteAst.Cut (loc, ident, cic)
- | GrafiteAst.DecideEquality loc ->
- metasenv,GrafiteAst.DecideEquality loc
| GrafiteAst.Decompose (loc, types, what, names) ->
let disambiguate (metasenv,types) = function
| GrafiteAst.Type _ -> assert false
GrafiteAst.ClearBody (loc,id)
| IDENT "change"; what = pattern_spec; "with"; t = tactic_term ->
GrafiteAst.Change (loc, what, t)
- | IDENT "compare"; t = tactic_term ->
- GrafiteAst.Compare (loc,t)
| IDENT "constructor"; n = int ->
GrafiteAst.Constructor (loc, n)
| IDENT "contradiction" ->
GrafiteAst.Contradiction loc
| IDENT "cut"; t = tactic_term; ident = OPT [ "as"; id = IDENT -> id] ->
GrafiteAst.Cut (loc, ident, t)
- | IDENT "decide"; IDENT "equality" ->
- GrafiteAst.DecideEquality loc
| IDENT "decompose"; types = OPT ident_list0; what = IDENT;
(num, idents) = intros_spec ->
let types = match types with None -> [] | Some types -> types in
in
ProofEngineTypes.mk_tactic (discriminate_tac ~term)
-let decide_equality_tac =
-(* il goal e' un termine della forma t1=t2\/~t1=t2; la tattica decide se l'uguaglianza
-e' vera o no e lo risolve *)
- Tacticals.id_tac
-
-let compare_tac ~term = Tacticals.id_tac
- (*
-(* term is in the form t1=t2; the tactic leaves two goals: in the first you have to *)
-(* demonstrate the goal with the additional hyp that t1=t2, in the second the hyp is ~t1=t2 *)
- let module C = Cic in
- let module U = UriManager in
- let module P = PrimitiveTactics in
- let module T = Tacticals in
- let _,metasenv,_,_ = proof in
- let _,context,gty = CicUtil.lookup_meta goal metasenv in
- let termty = (CicTypeChecker.type_of_aux' metasenv context term) in
- match termty with
- (C.Appl [(C.MutInd (uri, 0, [])); _; t1; t2]) when (uri = (U.uri_of_string "cic:/Coq/Init/Logic/eq.ind")) ->
-
- let term' = (* (t1=t2)\/~(t1=t2) *)
- C.Appl [
- (C.MutInd ((U.uri_of_string "cic:/Coq/Init/Logic/or.ind"), 0, [])) ;
- term ;
- C.Appl [
- (C.MutInd ((U.uri_of_string "cic:/Coq/Init/Logic/eq.ind"), 1, [])) ;
- t1 ;
- C.Appl [C.Const ((U.uri_of_string "cic:/Coq/Init/Logic/not.con"), []) ; t2]
- ]
- ]
- in
- T.thens
- ~start:(P.cut_tac ~term:term')
- ~continuations:[
- T.then_ ~start:(P.intros_tac) ~continuation:(P.elim_intros_simpl_tac ~term:(C.Rel 1)) ;
- decide_equality_tac]
- status
- | (C.Appl [(C.MutInd (uri, 0, [])); _; t1; t2]) when (uri = (U.uri_of_string "cic:/Coq/Init/Logic_Type/eqT.ind")) ->
- let term' = (* (t1=t2) \/ ~(t1=t2) *)
- C.Appl [
- (C.MutInd ((U.uri_of_string "cic:/Coq/Init/Logic/or.ind"), 0, [])) ;
- term ;
- C.Appl [
- (C.MutInd ((U.uri_of_string "cic:/Coq/Init/Logic_Type/eqT.ind"), 1, [])) ;
- t1 ;
- C.Appl [C.Const ((U.uri_of_string "cic:/Coq/Init/Logic/not.con"), []) ; t2]
- ]
- ]
- in
- T.thens
- ~start:(P.cut_tac ~term:term')
- ~continuations:[
- T.then_ ~start:(P.intros_tac) ~continuation:(P.elim_intros_simpl_tac ~term:(C.Rel 1)) ;
- decide_equality_tac]
- status
- | _ -> raise (ProofEngineTypes.Fail "Compare: Not an equality")
-*)
-;;
-
-
-
(* DISCRIMINTATE SENZA INJECTION
exception TwoDifferentSubtermsFound of (Cic.term * Cic.term * int)
val injection_tac: term:Cic.term -> ProofEngineTypes.tactic
val discriminate_tac: term:Cic.term -> ProofEngineTypes.tactic
-val decide_equality_tac: ProofEngineTypes.tactic
-val compare_tac: term:Cic.term -> ProofEngineTypes.tactic
-
let change = ReductionTactics.change_tac
let clear = ProofEngineStructuralRules.clear
let clearbody = ProofEngineStructuralRules.clearbody
-let compare = DiscriminationTactics.compare_tac
let constructor = IntroductionTactics.constructor_tac
let contradiction = NegationTactics.contradiction_tac
let cut = PrimitiveTactics.cut_tac
-let decide_equality = DiscriminationTactics.decide_equality_tac
let decompose = EliminationTactics.decompose_tac
let demodulate = Saturation.demodulate_tac
let discriminate = DiscriminationTactics.discriminate_tac
Cic.lazy_term -> ProofEngineTypes.tactic
val clear : hyp:string -> ProofEngineTypes.tactic
val clearbody : hyp:string -> ProofEngineTypes.tactic
-val compare : term:Cic.term -> ProofEngineTypes.tactic
val constructor : n:int -> ProofEngineTypes.tactic
val contradiction : ProofEngineTypes.tactic
val cut :
?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type ->
Cic.term -> ProofEngineTypes.tactic
-val decide_equality : ProofEngineTypes.tactic
val decompose :
?mk_fresh_name_callback:ProofEngineTypes.mk_fresh_name_type ->
?user_types:(UriManager.uri * int) list ->
<keyword>clear</keyword>
<keyword>clearbody</keyword>
<keyword>change</keyword>
- <keyword>compare</keyword>
<keyword>constructor</keyword>
<keyword>contradiction</keyword>
<keyword>cut</keyword>
- <keyword>decide</keyword> <keyword>equality</keyword> <!-- CSC: ??? -->
<keyword>decompose</keyword>
<keyword>discriminate</keyword>
<keyword>elim</keyword>