proposition: Lemma le_cardinal_ens_surj {X Y : Type} (U : Ensemble X) (V : Ensemble Y) : le_cardinal_ens U V <-> ge_cardinal_ens V U.
proof: Proof. split. - intros [[H0 H1]|[f [Hf0 Hf1]]]. { right. exists (fun y : Y => False_rect X (H0 y)). split; intros ? ?; firstorder; try contradiction. } destruct (classic (Inhabited U)). 2: { left. firstorder. } destruct H as [x0 Hx0]. right. pose proof (injective_ens_left_inverse U V f x0 Hx0 Hf0 Hf1) as [g [Hg0 Hg1]]. exists g; split; auto. intros x Hx. exists (f x). split; auto. symmetry. apply Hg1. assumption. - intros [H|[f [Hf0 Hf1]]]. { destruct (classic (inhabited Y)). { destruct H0 as [y]. right. exists (fun _ => y). split; intros ? ?; firstorder. } left. split; auto. } destruct (classic (Inhabited V)). 2: { destruct (classic (inhabited Y)). { destruct H0 as [y0]. right. exists (fun _ => y0). firstorder. } left. firstorder. } destruct H as [y Hy]. pose proof (surjective_ens_right_inverse V U f y Hy Hf0 Hf1) as [g [Hg0 Hg1]]. right. exists g; split; auto. intros x0 x1 Hx0 Hx1 Hx. pose proof (Hg1 x0 Hx0). pose proof (Hg1 x1 Hx1). congruence. Qed.
imports: Coq(ClassicalChoice Description Lia PeanoNat Program.Subset) ZornsLemma(Cardinals CountableTypes CSB DecidableDec Families Finite_sets FiniteTypes FunctionProperties FunctionPropertiesEns InverseImage Powerset_facts Proj1SigInjective ReverseMath.AddSubtract) Coq(RelationClasses)