of "(id)". Fixed.
(* Costruttori Aggiunti *)
| Assume of loc * 'ident * 'term
| Suppose of loc * 'term *'ident * 'term option
- | By_term_we_proved of loc *'term option * 'term * 'ident * 'term option
- | We_need_to_prove of loc * 'term * 'ident * 'term option
+ | By_term_we_proved of loc *'term option * 'term * 'ident option * 'term option
+ | We_need_to_prove of loc * 'term * 'ident option * 'term option
| Bydone of loc * 'term option
| We_proceed_by_induction_on of loc * 'term * 'term
| Byinduction of loc * 'term * 'ident
| Assume (_, ident , term) -> "assume" ^ ident ^ ":" ^ term_pp term
| Suppose (_, term, ident,term1) -> "suppose" ^ term_pp term ^ "(" ^ ident ^ ")" ^ (match term1 with None -> " " | Some term1 -> term_pp term1)
| Bydone (_, term) -> "by" ^ (match term with None -> "_" | Some term -> term_pp term) ^ "done"
- | By_term_we_proved (_, term, term1, ident, term2) -> "by" ^ (match term with None -> "_" | Some term -> term_pp term) ^ "we proved" ^ term_pp term1 ^ "(" ^ident^ ")" ^
+ | By_term_we_proved (_, term, term1, ident, term2) -> "by" ^ (match term with None -> "_" | Some term -> term_pp term) ^ "we proved" ^ term_pp term1 ^ (match ident with None -> "" | Some ident -> "(" ^ident^ ")") ^
(match term2 with None -> " " | Some term2 -> term_pp term2)
- | We_need_to_prove (_, term, ident, term1) -> "we need to prove" ^ term_pp term ^ "(" ^ ident ^ ")" ^ (match term1 with None -> " " | Some term1 -> term_pp term1)
+ | We_need_to_prove (_, term, ident, term1) -> "we need to prove" ^ term_pp term ^ (match ident with None -> "" | Some ident -> "(" ^ ident ^ ")") ^ (match term1 with None -> " " | Some term1 -> term_pp term1)
| We_proceed_by_induction_on (_, term, term1) -> "we proceed by induction on" ^ term_pp term ^ "to prove" ^ term_pp term1
| Byinduction (_, term, ident) -> "by induction hypothesis we know" ^ term_pp term ^ "(" ^ ident ^ ")"
| Thesisbecomes (_, term) -> "the thesis becomes " ^ term_pp term
type by_continuation =
BYC_done
- | BYC_weproved of CicNotationPt.term * string * CicNotationPt.term option
+ | BYC_weproved of CicNotationPt.term * string option * CicNotationPt.term option
| BYC_letsuchthat of string * CicNotationPt.term * string * CicNotationPt.term
| BYC_wehaveand of string * CicNotationPt.term * string * CicNotationPt.term
(floc,CicNotationParser.Parse_error
"tactic_term expected here"))
| LSome t -> GrafiteAst.AndElim (loc, t, id1, t1, id2, t2)))
- | IDENT "we" ; IDENT "need" ; "to" ; IDENT "prove" ; t = tactic_term ; id = OPT [ LPAREN ; id = IDENT ; RPAREN ] ; t1 = OPT [IDENT "or" ; IDENT "equivalently"; t' = tactic_term -> t']->
+ | IDENT "we" ; IDENT "need" ; "to" ; IDENT "prove" ; t = tactic_term ; id = OPT [ LPAREN ; id = IDENT ; RPAREN -> id ] ; t1 = OPT [IDENT "or" ; IDENT "equivalently"; t' = tactic_term -> t']->
GrafiteAst.We_need_to_prove (loc, t, id, t1)
| IDENT "we" ; IDENT "proceed" ; IDENT "by" ; IDENT "induction" ; "on" ; t=tactic_term ; "to" ; IDENT "prove" ; t1=tactic_term ->
GrafiteAst.We_proceed_by_induction_on (loc, t, t1)
;;
let by_term_we_proved ~dbd t ty id ty' =
+match id with None -> assert false | Some id ->
let just =
match t with
None -> Tactics.auto ~dbd ~params:[]
;;
let we_need_to_prove t id ty =
+match id with None -> assert false | Some id ->
let aux status =
let cont,cutted =
match ty with
val suppose : Cic.term -> string -> Cic.term option -> ProofEngineTypes.tactic
val by_term_we_proved :
- dbd:HMysql.dbd -> Cic.term option -> Cic.term -> string -> Cic.term option ->
+ dbd:HMysql.dbd -> Cic.term option -> Cic.term -> string option -> Cic.term option ->
ProofEngineTypes.tactic
val bydone : dbd:HMysql.dbd -> Cic.term option -> ProofEngineTypes.tactic
val we_need_to_prove :
- Cic.term -> string -> Cic.term option -> ProofEngineTypes.tactic
+ Cic.term -> string option -> Cic.term option -> ProofEngineTypes.tactic
val we_proceed_by_induction_on : Cic.term -> Cic.term -> ProofEngineTypes.tactic