]> matita.cs.unibo.it Git - fireball-separation.git/blobdiff - ocaml/num.ml
The measure finally works on all problems in problems.ml!
[fireball-separation.git] / ocaml / num.ml
index 2cb9b731a1dda17d50f9211a694548e7153b89bf..d00398532ae4495d6379a2fca1cc3e7f1adbf002 100644 (file)
@@ -114,8 +114,8 @@ let rec string_of_term l =
   | `N n -> string_of_int n
   | `I _ as t -> "(" ^ string_of_term_no_pars_app l (t :> nf) ^ ")"
   | `Lam _ as t -> "(" ^ string_of_term_no_pars_lam l t ^ ")"
-  | `Match(t,_,bs_lift,bs,args) ->
-     "(match " ^ string_of_term_no_pars l (t :> nf) ^
+  | `Match(t,(v,ar),bs_lift,bs,args) ->
+     "[match("^print_name l v ^ ":" ^ string_of_int ar^") " ^ string_of_term_no_pars l (t :> nf) ^
      " with " ^ String.concat " | " (List.map (fun (n,t) -> string_of_int n ^ " => " ^ string_of_term l (lift bs_lift t)) !bs) ^ "] " ^
      String.concat " " (List.map (string_of_term l) args) ^ ")"
  and string_of_term_no_pars_app l = function
@@ -200,7 +200,7 @@ and subst truelam delift_by_one what (with_what : nf) (where : nf) =
  let aux_propagate_arity ar = function
  | `Lam(false,`Match(`I(v,args),(x,_),liftno,bs,args')) when not delift_by_one ->
     `Lam(false,`Match(`I(v,args),(x,ar),liftno,bs,args'))
- | `Var(i,oldar) -> `Var(i, if truelam && oldar = min_int then ar else oldar)
+ | `Var(i,oldar) -> `Var(i, if truelam then (assert (oldar = min_int); ar) else oldar)
  | _ as t -> t in
  let rec aux_i_num_var l =
   function