Separation axiom

This commit is contained in:
Dan Frumin 2019-01-21 19:12:17 +01:00
parent 8bac5d98fe
commit ea05bc91fd
1 changed files with 58 additions and 0 deletions

58
czf.v
View File

@ -196,3 +196,61 @@ Proof.
destruct (HBA (g y) Hgy) as [x Hx].
exists x. symmetry. apply Hx.
Qed.
(** * Axioms *)
(** Extensionality *)
(* ... *)
(** Paring *)
Lemma CZF_pairing (x y : V) :
forall (w : V), w ({[x; y]} : V)
w x w y.
Proof.
intros w. split.
- intros [[?|?] ?]; eauto.
- intros [Hw|Hw].
+ exists (inl ()). eauto.
+ exists (inr ()). eauto.
Qed.
(** Union *)
(* TODO: need big union operation *)
(** Empty set *)
Lemma CZF_empty :
forall y, ¬ (y ( : V)).
Proof. intros ? [[] ?]. Qed.
(** Infinity *)
Definition suc (x : V) := x {[x]}.
Lemma CZF_infinity :
NN (forall y, y NN suc y NN).
Proof.
split.
- exists 0. reflexivity.
- intros y [n Hn]. exists (S n).
unfold suc. rewrite Hn.
reflexivity.
Qed.
(** Separation *)
Definition sep (a : V) (ϕ : V Prop) : V.
Proof.
destruct a as [A f].
refine (sup (sigT (λ (x:A), ϕ (f x))) _).
intros [x ?]. exact (f x).
Defined.
Class SetPredicate (ϕ : V Prop) :=
pred_proper :> Proper (() ==> impl) ϕ.
Lemma CZF_separation a ϕ `{SetPredicate ϕ} :
forall y, (y sep a ϕ y a ϕ y).
Proof.
intros y. destruct a as [A f]. split.
- intros [[x ] Hx]. simpl in *.
rewrite Hx. split; [exists x|]; eauto.
- intros [[x Hx] ]. simpl in *.
rewrite Hx in .
exists (existT x ). assumption.
Qed.