+(* let bo'' = *)
+(* C.Appl ( *)
+(* [C.MutInd (HL.Logic.eq_URI, 0, []); *)
+(* S.lift 1 eq_ty] @ *)
+(* if ordering = U.Gt then [S.lift 1 bo'; S.lift 1 right] *)
+(* else [S.lift 1 left; S.lift 1 bo']) *)
+(* in *)
+(* let t' = *)
+(* let name = C.Name ("x_SupL_" ^ (string_of_int !sup_l_counter)) in *)
+(* incr sup_l_counter; *)
+(* C.Lambda (name, ty, bo'') *)
+(* in *)
+ incr maxmeta;
+ let metaproof =
+ let irl =
+ CicMkImplicit.identity_relocation_list_for_metavariable context in
+ C.Meta (!maxmeta, irl)
+ in
+ let target' =
+ let eq_found =
+ let proof' =
+ let ens =
+ if pos = Utils.Left then
+ build_ens_for_sym_eq ty what other
+ else
+ build_ens_for_sym_eq ty other what
+ in
+ Inference.ProofSymBlock (ens, proof')
+ in
+ let what, other =
+ if pos = Utils.Left then what, other else other, what
+ in
+ pos, (0, proof', (ty, other, what, Utils.Incomparable), menv', args')
+ in
+ let target_proof =
+ let pb =
+ Inference.ProofBlock (s, eq_URI, t', eq_found,
+ Inference.BasicProof metaproof)
+ in
+ match proof with
+ | Inference.BasicProof _ ->
+ print_endline "replacing a BasicProof";
+ pb
+ | Inference.ProofGoalBlock (_, parent_eq) ->
+ print_endline "replacing another ProofGoalBlock";
+ Inference.ProofGoalBlock (pb, parent_eq)
+ | _ -> assert false
+ in
+ (weight, target_proof, (eq_ty, left, right, ordering), [], [])
+ in
+ let refl =
+ C.Appl [C.MutConstruct (* reflexivity *)
+ (HelmLibraryObjects.Logic.eq_URI, 0, 1, []);
+ eq_ty; if ordering = U.Gt then right else left]
+ in
+ (bo',
+ Inference.ProofGoalBlock (Inference.BasicProof refl, target'))