X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteAstPp.ml;h=4828d037957a72e291de454bd361fd75e9726e55;hb=ca2a604c2817deb118d595611b94a0d77978eab6;hp=51b002de9b8d2910734cf0a2d65a73ac30ad896a;hpb=3990759a81db3ce45bf4ec56e1985e532151f6e0;p=helm.git diff --git a/helm/software/components/grafite/grafiteAstPp.ml b/helm/software/components/grafite/grafiteAstPp.ml index 51b002de9..4828d0379 100644 --- a/helm/software/components/grafite/grafiteAstPp.ml +++ b/helm/software/components/grafite/grafiteAstPp.ml @@ -107,8 +107,10 @@ let rec pp_tactic ~term_pp ~lazy_term_pp = | Clear (_,ids) -> Printf.sprintf "clear %s" (pp_hyps ids) | ClearBody (_,id) -> Printf.sprintf "clearbody %s" (pp_hyps [id]) | Constructor (_,n) -> "constructor " ^ string_of_int n - | Compose (_,t1, t2, intro_specs) -> - Printf.sprintf "compose %s %s%s" (term_pp t1) (term_pp t1) + | Compose (_,t1, t2, times, intro_specs) -> + Printf.sprintf "compose %s%s %s%s" + (if times > 0 then string_of_int times ^ " " else "") + (term_pp t1) (match t2 with None -> "" | Some t2 -> "with "^term_pp t2) (pp_intros_specs " as " intro_specs) | Contradiction _ -> "contradiction" | Cut (_, ident, term) -> @@ -185,7 +187,7 @@ let rec pp_tactic ~term_pp ~lazy_term_pp = | Thesisbecomes (_, term) -> "the thesis becomes " ^ term_pp term | ExistsElim (_, term0, ident, term, ident1, term1) -> "by " ^ (match term0 with None -> "_" | Some term -> term_pp term) ^ "let " ^ ident ^ ":" ^ term_pp term ^ "such that " ^ lazy_term_pp term1 ^ "(" ^ ident1 ^ ")" | AndElim (_, term, ident1, term1, ident2, term2) -> "by " ^ term_pp term ^ "we have " ^ term_pp term1 ^ " (" ^ ident1 ^ ") " ^ "and " ^ term_pp term2 ^ " (" ^ ident2 ^ ")" - | RewritingStep (_, term, term1, term2, cont) -> (match term with None -> " " | Some (None,term) -> "conclude " ^ term_pp term | Some (Some name,term) -> "obtain (" ^ name ^ ") " ^ term_pp term) ^ "=" ^ term_pp term1 ^ (match term2 with `Auto params -> "_" ^ String.concat " " (List.map (fun (k,v) -> if v <> "" then k ^ "=" ^ v else k) params) | `Term term2 -> term_pp term2) ^ (if cont then " done" else "") + | RewritingStep (_, term, term1, term2, cont) -> (match term with None -> " " | Some (None,term) -> "conclude " ^ term_pp term | Some (Some name,term) -> "obtain (" ^ name ^ ") " ^ term_pp term) ^ "=" ^ term_pp term1 ^ " by " ^ (match term2 with `Auto params -> "_" ^ String.concat " " (List.map (fun (k,v) -> if v <> "" then k ^ "=" ^ v else k) params) | `Term term2 -> term_pp term2 | `Proof -> "proof") ^ (if cont then " done" else "") | Case (_, id, args) -> "case" ^ id ^ String.concat " "