Inductive Cardinal : Type :=
  | cardinality: Type -> Cardinal.Inductive Cardinal : Type :=
  | cardinality: Type -> Cardinal.Fixpoint n_element_set (n:nat) : Set :=
  match n with
  | O => False
  | S m => option (n_element_set m)
  end.Definition nat_to_cardinal (n:nat) :=
  cardinality (n_element_set n).Definition aleph0 := cardinality nat.Inductive eq_cardinal : Cardinal -> Cardinal -> Prop :=
  | bij_eq_cardinal: forall {X Y:Type} (f:X->Y),
    bijective f -> eq_cardinal (cardinality X) (cardinality Y).Inductive eq_cardinal : Cardinal -> Cardinal -> Prop :=
  | bij_eq_cardinal: forall {X Y:Type} (f:X->Y),
    bijective f -> eq_cardinal (cardinality X) (cardinality Y).Inductive le_cardinal : Cardinal -> Cardinal -> Prop :=
  | inj_le_cardinal: forall {X Y:Type} (f:X->Y),
    injective f -> le_cardinal (cardinality X) (cardinality Y).Inductive le_cardinal : Cardinal -> Cardinal -> Prop :=
  | inj_le_cardinal: forall {X Y:Type} (f:X->Y),
    injective f -> le_cardinal (cardinality X) (cardinality Y).Definition lt_cardinal (kappa lambda:Cardinal) : Prop :=
  le_cardinal kappa lambda /\ ~ eq_cardinal kappa lambda.Definition ge_cardinal (kappa lambda:Cardinal) : Prop :=
  le_cardinal lambda kappa.Definition gt_cardinal (kappa lambda:Cardinal) : Prop :=
  lt_cardinal lambda kappa.

(* Specifications: *)
Lemma eq_cardinal_equiv: equivalence eq_cardinal.
Lemma eq_cardinal_impl_le_cardinal: forall kappa lambda: Cardinal, eq_cardinal kappa lambda -> le_cardinal kappa lambda.
Lemma le_cardinal_preorder: preorder le_cardinal.
Lemma le_cardinal_antisym: forall kappa lambda:Cardinal, le_cardinal kappa lambda -> le_cardinal lambda kappa -> eq_cardinal kappa lambda.
Lemma cantor_diag: forall (X:Type) (f:X->(X->bool)), ~ surjective f.
Lemma P_neq_not_P: forall (P:Prop), P <> ~P.
Lemma cantor_diag2: forall (X:Type) (f:X->(X->Prop)), ~ surjective f.
Lemma cardinals_unbounded: forall kappa:Cardinal, exists lambda:Cardinal, gt_cardinal lambda kappa.
Lemma surj_le_cardinal: forall {X Y:Type} (f:X->Y), surjective f -> le_cardinal (cardinality Y) (cardinality X).