merge n (inspect_conclusion n s) (inspect_conclusion n t)
| Cic.Lambda (_, s, t) ->
merge n (inspect_conclusion n s) (inspect_conclusion n t)
merge n (inspect_conclusion n s) (inspect_conclusion n t)
| Cic.Lambda (_, s, t) ->
merge n (inspect_conclusion n s) (inspect_conclusion n t)
- | Cic.LetIn (_, s, t) ->
- merge n (inspect_conclusion n s) (inspect_conclusion n t)
+ | Cic.LetIn (_, s, ty, t) ->
+ merge n (inspect_conclusion n s)
+ (merge n (inspect_conclusion n ty) (inspect_conclusion n t))
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
add_root (n-1) u l
| Cic.Appl ((Cic.MutInd (u, t, exp_named_subst))::l) ->
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
add_root (n-1) u l
| Cic.Appl ((Cic.MutInd (u, t, exp_named_subst))::l) ->
Some uri, SetSet.empty
| Cic.Cast (t, _) -> inspect_term n t
| Cic.Prod (_, _, t) -> inspect_term n t
Some uri, SetSet.empty
| Cic.Cast (t, _) -> inspect_term n t
| Cic.Prod (_, _, t) -> inspect_term n t
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
let childunion = inspect_children (n-1) l in
Some u, childunion
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
let childunion = inspect_children (n-1) l in
Some u, childunion
| Cic.Const (u,exp_named_subst) ->
UriManagerSet.singleton u
| Cic.MutInd (u, t, exp_named_subst) ->
| Cic.Const (u,exp_named_subst) ->
UriManagerSet.singleton u
| Cic.MutInd (u, t, exp_named_subst) ->
| Cic.MutConstruct (u, t, c, exp_named_subst) ->
let uri = UriManager.uri_of_uriref u t (Some c) in
| Cic.MutConstruct (u, t, c, exp_named_subst) ->
let uri = UriManager.uri_of_uriref u t (Some c) in
| Cic.Cast (t, _) -> signature_concl t
| Cic.Prod (_, s, t) ->
UriManagerSet.union (signature_concl s) (signature_concl t)
| Cic.Lambda (_, s, t) ->
UriManagerSet.union (signature_concl s) (signature_concl t)
| Cic.Cast (t, _) -> signature_concl t
| Cic.Prod (_, s, t) ->
UriManagerSet.union (signature_concl s) (signature_concl t)
| Cic.Lambda (_, s, t) ->
UriManagerSet.union (signature_concl s) (signature_concl t)
- | Cic.LetIn (_, s, t) ->
- UriManagerSet.union (signature_concl s) (signature_concl t)
+ | Cic.LetIn (_, s, ty, t) ->
+ UriManagerSet.union (signature_concl s)
+ (UriManagerSet.union (signature_concl ty) (signature_concl t))
let rec signature_of = function
| Cic.Cast (t, _) -> signature_of t
| Cic.Prod (_, _, t) -> signature_of t
let rec signature_of = function
| Cic.Cast (t, _) -> signature_of t
| Cic.Prod (_, _, t) -> signature_of t
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
Some (u, []), add l
| Cic.Appl ((Cic.MutInd (u, t, exp_named_subst))::l) ->
| Cic.Appl ((Cic.Const (u,exp_named_subst))::l) ->
Some (u, []), add l
| Cic.Appl ((Cic.MutInd (u, t, exp_named_subst))::l) ->
| Some (main, types) -> Some main,types
in
let constants_no = UriManagerSet.cardinal constants in
| Some (main, types) -> Some main,types
in
let constants_no = UriManagerSet.cardinal constants in
let types_no = List.length types in
if types_no > 0 then
List.map (function (n,l) -> (n+types_no,types@l)) subsets
else subsets
in
let types_no = List.length types in
if types_no > 0 then
List.map (function (n,l) -> (n+types_no,types@l)) subsets
else subsets
in
let all_constants =
let all = match main with None -> types | Some m -> m::types in
List.fold_right UriManagerSet.add all constants
in
compute_with_only ~dbd ~where main subsets all_constants
else
let all_constants =
let all = match main with None -> types | Some m -> m::types in
List.fold_right UriManagerSet.add all constants
in
compute_with_only ~dbd ~where main subsets all_constants
else
(0,[]) :: List.map (function (n,l) -> (n+types_no,types@l)) subsets
else subsets
in
(0,[]) :: List.map (function (n,l) -> (n+types_no,types@l)) subsets
else subsets
in