+let pp_relation r =
+ match r with
+ | Eq i -> sprintf "= %d" i
+ | Ge i -> sprintf ">= %d" i
+ | Gt i -> sprintf "> %d" i
+ | Le i -> sprintf "<= %d" i
+ | Lt i -> sprintf "< %d" i
+
| `MainHypothesis None -> "MainHypothesis"
| `InConclusion -> "InConclusion"
| `InHypothesis -> "InHypothesis"
| `MainHypothesis None -> "MainHypothesis"
| `InConclusion -> "InConclusion"
| `InHypothesis -> "InHypothesis"
-let columns_of_position = function
- | `MainConclusion (Some d) -> `String mainconcl_pos, `Int d
+let columns_of_position pos =
+ match pos with
+ | `MainConclusion (Some (Eq d)) -> `String mainconcl_pos, `Int d
| `MainHypothesis None -> `String mainhyp_pos, `Null
| `InConclusion -> `String inconcl_pos, `Null
| `InHypothesis -> `String inhyp_pos, `Null
| `InBody -> `String inbody_pos, `Null
| `MainHypothesis None -> `String mainhyp_pos, `Null
| `InConclusion -> `String inconcl_pos, `Null
| `InHypothesis -> `String inhyp_pos, `Null
| `InBody -> `String inbody_pos, `Null
sort_cols, [source; p; d] :: rel_cols, obj_cols
| `Obj (o, p) ->
let (p, d) = columns_of_position p in
sort_cols, [source; p; d] :: rel_cols, obj_cols
| `Obj (o, p) ->
let (p, d) = columns_of_position p in
+let pp_constr =
+ function
+ | `Sort (sort, p) ->
+ sprintf "Sort %s; [%s]"
+ (CicPp.ppsort sort) (String.concat ";" (List.map pp_position p))
+ | `Rel p -> sprintf "Rel [%s]" (String.concat ";" (List.map pp_position p))
+ | `Obj (uri, p) -> sprintf "Obj %s; [%s]"
+ uri (String.concat ";" (List.map pp_position p))
+