X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=components%2Flibrary%2FcicCoercion.ml;h=d7ad886b2c8fa33a07213faf7ea8b98bb9e974b4;hb=6b018dd85365fcb4af1bb538c3198978c01cb24e;hp=f06035604535dcd5a132f2667292f6318dc15fd2;hpb=b20889b47bf949b17a6297ac39a5c0df0301de9e;p=helm.git diff --git a/components/library/cicCoercion.ml b/components/library/cicCoercion.ml index f06035604..d7ad886b2 100644 --- a/components/library/cicCoercion.ml +++ b/components/library/cicCoercion.ml @@ -99,7 +99,7 @@ let generate_composite_closure rt c1 c2 univ arity = let len,names = aux [] 0 t in let len = len - arity in List.fold_left - (fun (n,l) x -> if n <= len then n+1,l@[x] else n,l) (0,[]) + (fun (n,l) x -> if n < len then n+1,l@[x] else n,l) (0,[]) names in let compose c1 nc1 c2 nc2 = @@ -194,8 +194,8 @@ let generate_composite_closure rt c1 c2 univ arity = debug_print (lazy ("\nCOMPOSING")); debug_print (lazy (" c1= "^CicPp.ppterm c1 ^" : "^ CicPp.ppterm c1_ty)); debug_print (lazy (" c2= "^CicPp.ppterm c2 ^" : "^ CicPp.ppterm c2_ty)); - let saturations_for_c1, names_c1 = count_saturations_needed c1_ty arity in - let saturations_for_c2, names_c2 = count_saturations_needed c2_ty 0 in + let saturations_for_c1, names_c1 = count_saturations_needed c1_ty 0 in + let saturations_for_c2, names_c2 = count_saturations_needed c2_ty arity in let c = compose c1 saturations_for_c1 c2 saturations_for_c2 in let spline_len = saturations_for_c1 + saturations_for_c2 in let c = mk_lambda_spline c (namer (names_c1 @ names_c2)) spline_len in