Skip to content

Add classes as records #5

@georgydunaev

Description

@georgydunaev

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions