proposition: Lemma process_eval_rec4_loss_draw_loss (res : estate) l : \smin_(i <- l) f1 i = loss -> process_eval_rec4 f2 eloss edraw res l = ewin.
proof: Proof. elim: l res => [|i l IH] res; first by rewrite big_nil. rewrite big_cons [process_eval_rec4 _ _ _ _ _]/= => H. have [E1|E1] := leqP res (f2 _ _ _). have [E2|/ltnW E2] := leqP (f1 i) (\smin_(j <- l) f1 j). rewrite smin_lel // in H. apply: ge_ewinE; rewrite -[ewin]/(esflip eloss). have -> : res = eloss by apply: le_elossE; rewrite -(H4loss_draw_loss H). by apply: ge_process_eval_rec4. rewrite smin_ler // in H. by apply: IH. have [E2|E2] := leqP _ (f2 _ _ _). have [E3|/ltnW E3] := leqP (f1 i) (\smin_(j <- l) f1 j). rewrite smin_lel // in H. rewrite H4loss_draw_loss //. apply: ge_ewinE; rewrite -[ewin]/(esflip eloss). by apply: ge_process_eval_rec4. rewrite smin_ler // in H. by apply: IH. rewrite H4loss_draw_loss //=. by case: f1 (@H4loss_draw_draw i) (@H4loss_draw_win i) => // [_|]; move=> /(_ (refl_equal _)); case: f2 E2. Qed.
imports: HB(structures) mathcomp(all_ssreflect) mathcomp(all_algebra)