Due to uncertainty in using the raw (Ens->Prop) expression as a type of classes, I propose the next definition of the class with built-in soundness proof:
(* 'class' is the type of well-defined classes. *)
Record class := {
prty :> Ens->Prop;
sound : forall (a b : Ens), EQ a b -> (prty a <-> prty b);
}.
Definition EQC (A B:class) := forall z:Ens, A z <-> B z.
(* set to class *)
Definition stoc : Ens -> class.
Proof.
intro x.
unshelve eapply Build_class.
+ intro y. exact (IN y x).
+ intros a b aeqb. split.
- apply IN_sound_left. exact aeqb.
- apply IN_sound_left. apply EQ_sym. exact aeqb.
Defined.
Coercion stoc : Ens >-> class.
Due to uncertainty in using the raw (Ens->Prop) expression as a type of classes, I propose the next definition of the class with built-in soundness proof: