X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fcomponents%2Facic_procedural%2FproceduralTypes.ml;h=45fbe756aa2da62ec4c39d435f346e89bec51de0;hb=2dd6e8f11fa3ac2995f326ecb742d9b4e8948fce;hp=8cf705d0a1c098ca87375397799d1997a147b400;hpb=951e8fda6fbef9b4149e37e4d406b2f82fd64a98;p=helm.git diff --git a/helm/software/components/acic_procedural/proceduralTypes.ml b/helm/software/components/acic_procedural/proceduralTypes.ml index 8cf705d0a..45fbe756a 100644 --- a/helm/software/components/acic_procedural/proceduralTypes.ml +++ b/helm/software/components/acic_procedural/proceduralTypes.ml @@ -80,6 +80,7 @@ type step = Note of note | Intros of count option * name list * note | Cut of name * what * note | LetIn of name * what * note + | LApply of name * what * note | Rewrite of how * what * where * pattern * note | Elim of what * using option * pattern * note | Cases of what * pattern * note @@ -173,7 +174,7 @@ let mk_record types lpsno fields = let mk_statement flavour name t v = let name = match name with Some name -> name | None -> assert false in - let obj = N.Theorem (flavour, name, t, v) in + let obj = N.Theorem (flavour, name, t, v, `Regular) in G.Executable (floc, G.Command (floc, G.Obj (floc, obj))) let mk_qed = @@ -207,6 +208,10 @@ let mk_letin name what punctation = let tactic = G.LetIn (floc, what, name) in mk_tactic tactic punctation +let mk_lapply name what punctation = + let tactic = G.LApply (floc, false, None, [], what, name) in + mk_tactic tactic punctation + let mk_rewrite direction what where pattern punctation = let direction = if direction then `RightToLeft else `LeftToRight in let pattern, rename = match where with @@ -276,6 +281,7 @@ let rec render_step sep a = function | Intros (c, ns, s) -> mk_intros c ns sep :: mk_tacnote s a | Cut (n, t, s) -> mk_cut n t sep :: mk_tacnote s a | LetIn (n, t, s) -> mk_letin n t sep :: mk_tacnote s a + | LApply (n, t, s) -> mk_lapply n t sep :: mk_tacnote s a | Rewrite (b, t, w, e, s) -> mk_rewrite b t w e sep :: mk_tacnote s a | Elim (t, xu, e, s) -> mk_elim t xu e sep :: mk_tacnote s a | Cases (t, e, s) -> mk_cases t e sep :: mk_tacnote s a @@ -344,6 +350,7 @@ let rec count_node a = function | Exact (t, _) | Cut (_, t, _) | LetIn (_, t, _) + | LApply (_, t, _) | Apply (t, _) -> count a (H.cic t) | Rewrite (_, t, _, p, _) | Elim (t, _, p, _) @@ -366,6 +373,7 @@ let rec note_of_step = function | Intros (_, _, s) | Cut (_, _, s) | LetIn (_, _, s) + | LApply (_, _, s) | Rewrite (_, _, _, _, s) | Elim (_, _, _, s) | Cases (_, _, s)