]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/ocaml/tactics/discriminationTactics.ml
implemented lazy disambiguation of tactics arguments, when those
[helm.git] / helm / ocaml / tactics / discriminationTactics.ml
index 590b482c716db80b74b83429aa4808fbb804aa38..a26895e6221fe003849d6597c038e37afd6263a1 100644 (file)
@@ -162,21 +162,18 @@ and injection1_tac ~term ~i =
                            in
                             ProofEngineTypes.apply_tactic 
                             (ReductionTactics.change_tac
-                               ~pattern:(ProofEngineTypes.conclusion_pattern (Some new_t1'))
-                               (C.Appl [
-                                 C.Lambda (
-                                  C.Name "x", tty,
-                                  C.MutCase (
-                                   turi, typeno,
-                                   (C.Lambda (
-                                    (C.Name "x"),
+                               ~pattern:(ProofEngineTypes.conclusion_pattern
+                                (Some new_t1'))
+                               (fun _ m u ->
+                                 C.Appl [ C.Lambda (C.Name "x", tty,
+                                  C.MutCase (turi, typeno,
+                                   (C.Lambda ((C.Name "x"),
                                     (S.lift 1 tty),
                                     (S.lift 2 tty'))),
                                    (C.Rel 1), pattern
                                   )
                                  );
-                                 t1]
-                               ))
+                                 t1], m, u))
                         status
                        ))
                      ~continuation:
@@ -300,8 +297,9 @@ let discriminate'_tac ~term =
                             (T.then_
                              ~start:
                               (ReductionTactics.change_tac 
-                               ~pattern:(ProofEngineTypes.conclusion_pattern (Some gty'))
-                               (C.Appl [
+                               ~pattern:(ProofEngineTypes.conclusion_pattern
+                                (Some gty'))
+                               (fun _ m u -> C.Appl [
                                  C.Lambda (
                                   C.Name "x", tty, 
                                   C.MutCase (
@@ -310,9 +308,7 @@ let discriminate'_tac ~term =
                                    (C.Rel 1), pattern
                                   )
                                  ); 
-                                 t2]
-                               )
-                              )
+                                 t2], m, u))
                              ~continuation:
                               (
                                  T.then_