Proof using.
induction l; intros; simpl in *; intuition.
break_if; intuition.
- f_equal. auto.
- do_bool. specialize (H a); intuition; omega.
Qed.

(* Specifications: *)
Lemma entries_gt_0 :
forall net h e,
refined_raft_intermediate_reachable net ->
In e (log (snd (nwState net h))) ->
eIndex e > 0.
Lemma findGtIndex_app_in_1 :
forall l1 l2 e,
sorted (l1 ++ l2) ->
In e l1 ->
exists l',
findGtIndex (l1 ++ l2) (eIndex e) = l' /\
forall x,
In x l' -> In x l1.