X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Fgrafite%2FgrafiteAstPp.ml;h=d7ed16efd103aa6cdea44040794c135c4fac44ef;hb=acc9067d3263ffced81c52539f918d47d418d5c7;hp=423e68d4f93ce30e5d77e82cb761eeab9fbcaffe;hpb=cea3a50f515d1e39467073d2b447a9ddfa1a4852;p=helm.git diff --git a/helm/software/components/grafite/grafiteAstPp.ml b/helm/software/components/grafite/grafiteAstPp.ml index 423e68d4f..d7ed16efd 100644 --- a/helm/software/components/grafite/grafiteAstPp.ml +++ b/helm/software/components/grafite/grafiteAstPp.ml @@ -99,10 +99,12 @@ let rec pp_tactic ~term_pp ~lazy_term_pp = sprintf "decompose%s" (pp_intros_specs (None, names)) | Demodulate _ -> "demodulate" | Destruct (_, term) -> "destruct " ^ term_pp term - | Elim (_, term, using, num, idents) -> - sprintf "elim " ^ term_pp term ^ + | Elim (_, what, using, pattern, num, idents) -> + sprintf "elim %s%s %s%s" + (term_pp what) (match using with None -> "" | Some term -> " using " ^ term_pp term) - ^ pp_intros_specs (num, idents) + (pp_tactic_pattern pattern) + (pp_intros_specs (num, idents)) | ElimType (_, term, using, num, idents) -> sprintf "elim type " ^ term_pp term ^ (match using with None -> "" | Some term -> " using " ^ term_pp term) @@ -166,7 +168,7 @@ let rec pp_tactic ~term_pp ~lazy_term_pp = | 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 - | ExistsElim (_, term0, ident, term, ident1, term1) -> "by " ^ term_pp term0 ^ "let " ^ ident ^ ":" ^ term_pp term ^ "such that " ^ term_pp term1 ^ "(" ^ ident1 ^ ")" + | 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 "") | Case (_, id, args) ->