proposition: Lemma max_ge_a (a b: A): le b a <-> max a b = a.
proof: Proof. unfold max. split; intro H. - apply compare_ge_iff in H as [Hlt | Heq]. + now rewrite Hlt. + rewrite Heq. now apply compare_eq_iff in Heq. - pose proof (comparable_comp_spec a b) as [Hab | Hab | Hab]. + subst. apply le_refl. + exfalso. apply compare_lt_iff in Hab. rewrite Hab in H; subst; rewrite compare_refl in Hab; discriminate. + now apply lt_incl_le. Qed.
imports: Coq(Relations RelationClasses Setoid)