]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/components/grafite/grafiteAstPp.ml
1. "by proof" now allowed as a justification in equality chains.
[helm.git] / helm / software / components / grafite / grafiteAstPp.ml
index 521db02f3d28d3655d55e35bfc8613aa32869583..4828d037957a72e291de454bd361fd75e9726e55 100644 (file)
@@ -96,7 +96,7 @@ let rec pp_tactic ~term_pp ~lazy_term_pp =
      "applyS " ^ term_pp term ^
       String.concat " " 
         (List.map (fun (k,v) -> if v <> "" then k ^ "=" ^ v else k) params)
-  | Auto (_,params) -> "auto " ^ 
+  | AutoBatch (_,params) -> "auto batch " ^ 
       String.concat " " 
         (List.map (fun (k,v) -> if v <> "" then k ^ "=" ^ v else k) params)
   | Assumption _ -> "assumption"
@@ -107,6 +107,11 @@ 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, 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) ->
      "cut " ^ term_pp term ^
@@ -182,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 " "
@@ -227,6 +232,9 @@ let pp_macro ~term_pp =
   (* real macros *)
   | Check (_, term) -> Printf.sprintf "check %s" (term_pp term)
   | Hint _ -> "hint"
+  | AutoInteractive (_,params) -> "auto " ^ 
+      String.concat " " 
+        (List.map (fun (k,v) -> if v <> "" then k ^ "=" ^ v else k) params)
   | Inline (_, style, suri, prefix) ->  
       Printf.sprintf "inline %s\"%s\"%s" (style_pp style) suri (prefix_pp prefix)