(*
	Cardinal.
*)

Inductive cardinal : part_set E -> nat -> Prop :=
  | cardinal_empty : forall A : part_set E, Equal A (empty E) -> cardinal A 0
  | cardinal_add :
      forall (A B : part_set E) (n : nat),
      cardinal B n ->
      forall x : E,
      ~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n).(*
	Cardinal.
*)

Inductive cardinal : part_set E -> nat -> Prop :=
  | cardinal_empty : forall A : part_set E, Equal A (empty E) -> cardinal A 0
  | cardinal_add :
      forall (A B : part_set E) (n : nat),
      cardinal B n ->
      forall x : E,
      ~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n).(*
	Cardinal.
*)

Inductive cardinal : part_set E -> nat -> Prop :=
  | cardinal_empty : forall A : part_set E, Equal A (empty E) -> cardinal A 0
  | cardinal_add :
      forall (A B : part_set E) (n : nat),
      cardinal B n ->
      forall x : E,
      ~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n).

(* Specifications: *)
Lemma cardinal_comp : forall (A B : part_set E) (n m : nat), Equal A B -> n = m -> cardinal A n -> cardinal B m.
Lemma cardinal_comp_l : forall (A B : part_set E) (n : nat), Equal A B -> cardinal A n -> cardinal B n.
Lemma cardinal_comp_r : forall (A : part_set E) (n m : nat), n = m -> cardinal A n -> cardinal A m.
Lemma cardinal_empty_O : cardinal (empty E) 0.
Lemma cardinal_single : forall x : E, cardinal (single x) 1.
Lemma cardinal_pair : forall x y : E, ~ Equal x y -> cardinal (union (single x) (single y)) 2.
Lemma cardinal_O_empty : forall A : part_set E, cardinal A 0 -> Equal A (empty E).
Lemma cardinal_1_single : forall A : part_set E, cardinal A 1 -> exists x : E, Equal A (single x).
Lemma not_in_empty : forall A : part_set E, (forall x : E, ~ in_part x A) -> Equal A (empty E).
Lemma not_in_part_trans : forall (x : E) (A B : part_set E), ~ in_part x A -> Equal A B -> ~ in_part x B.
Lemma not_in_part_trans_eq : forall (x y : E) (A : part_set E), ~ in_part x A -> Equal x y -> ~ in_part y A.
Lemma cardinal_sup3 : forall (A B C : part_set E) (x y : E), Equal A (add_part B x) -> Equal A (add_part C y) -> ~ in_part x B -> ~ in_part y C -> ~ Equal x y -> exists D : part_set E, Equal B (add_part D y) /\ Equal C (add_part D x) /\ ~ in_part x D /\ ~ in_part y D.
Lemma cardinal_ind2 : forall P : forall (n : nat) (A : part_set E), cardinal A n -> Prop, (forall (A : part_set E) (c : cardinal A 0), P 0 A c) -> (forall n : nat, (forall (B : part_set E) (c : cardinal B n), P n B c) -> forall (A B : part_set E) (x : E), ~ in_part x B -> Equal A (add_part B x) -> forall c' : cardinal A (S n), P (S n) A c') -> forall (n : nat) (A : part_set E) (c : cardinal A n), P n A c.
Lemma cardinal_S : forall (n : nat) (A B : part_set E) (x : E), ~ in_part x B -> Equal A (add_part B x) -> cardinal A (S n) -> cardinal B n.
Lemma cardinalO_unique : forall A : part_set E, cardinal A 0 -> forall m : nat, cardinal A m -> 0 = m.
Lemma cardinal_unique : forall (n : nat) (A : part_set E), cardinal A n -> forall m : nat, cardinal A m -> n = m.