Proof with try congruence.
set (P' := fun (g_u : M.t * M.t) (res: superposition_result * M.t*M.t) =>
res = (C_example R sel, given', unselected') ->
(R, sel) = clauses_generate nil
(rsort_uniq (rev_cmp compare_clause) (M.elements given'))).
generalize (loop_ind P'). intros H1 H2. unfold P' in H1.
apply H1 with (given_unselected := (given, unselected)); auto; intros [? ?] ? ?;
inversion 1; subst...
Qed.

(* Specifications: *)
Lemma loop_Cexample_sel g u g' u' s R sel :
setd clause_denote inter TT g s ->
setd clause_denote inter TT u s ->
loop (g, u) = (C_example R sel, g', u') ->
setd clause_denote inter TT sel s.
Lemma loop_Valid_sound given unselected given' unselected' s :
setd clause_denote inter TT given s ->
setd clause_denote inter TT unselected s ->
loop (given, unselected) = (Valid, given', unselected') ->
clause_denote empty_clause s.
Lemma loop_Cexample_sound given unselected given' unselected' s R selected :
setd clause_denote inter TT given s ->
setd clause_denote inter TT unselected s ->
loop (given, unselected) = (C_example R selected, given', unselected') ->
setd clause_denote inter TT selected s /\
setd clause_denote inter TT given' s.
Lemma check_clauseset_Valid_sound init g u :
check_clauseset init = (Valid, g, u) ->
setd clause_denote inter TT init |-- clause_denote empty_clause.
Lemma check_clauseset_Cexample_model init final empty R selected :
check_clauseset init = (C_example R selected, final, empty) ->
(R, selected) = clauses_generate nil
(rsort_uniq (rev_cmp compare_clause) (M.elements final)).