Skip to content

Commit 9d4cd5d

Browse files
committed
move folder
1 parent 3557e6c commit 9d4cd5d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2282
-1567
lines changed

Meta.v Axiom/Meta.v

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ Tactic Notation "contra" := contra as ?H.
1414

1515
Declare Scope set_scope.
1616
Delimit Scope set_scope with set.
17+
Delimit Scope type_scope with type.
1718
Open Scope set_scope.
1819

1920
Parameter set : Type.
@@ -58,7 +59,12 @@ Qed.
5859
Notation "'∃' ! x .. y , P" :=
5960
(ex (unique (λ x, .. (ex (unique (λ y, P))) ..)))
6061
(at level 200, x binder, right associativity,
61-
format "'[' '∃' ! '/ ' x .. y , '/ ' P ']'") : type_scope.
62+
format "'[' '∃' ! '/ ' x .. y , '/ ' P ']'") : type_scope.
63+
64+
Notation "'∃' ! x .. y ∈ A , P" :=
65+
(∃! x, x ∈ A ∧ (.. (∃! y, y ∈ A ∧ P) ..))
66+
(at level 200, x binder, right associativity,
67+
format "'[' '∃' ! '/ ' x .. y ∈ A , '/ ' P ']'") : set_scope.
6268

6369
(* 经典明确描述 *)
6470
Axiom classical_definite_description : ∀ (A : Type) (P : A → Prop),

ZFC0.v Axiom/ZFC0.v

+17-12
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(** adapted from the thesis by Jonas Kaiser, November 23, 2012 **)
33
(** Coq coding by choukh, April 2020 **)
44

5-
Require Export ZFC.Meta.
5+
Require Export ZFC.Axiom.Meta.
66

77
(**=== 公理1: 外延公理 ===**)
88
(* 两个集合相等当且仅当它们包含相同的成员 *)
@@ -13,6 +13,15 @@ Proof.
1313
intros A B [x [Hx Hx']] Hext. apply Hx'. congruence.
1414
Qed.
1515

16+
Tactic Notation "ext" :=
17+
apply ExtAx; split; intros.
18+
19+
Tactic Notation "ext" ident(H) :=
20+
apply ExtAx; split; intros H.
21+
22+
Tactic Notation "ext" ident(x) ident(H) :=
23+
apply ExtAx; intros x; split; intros H.
24+
1625
(** Sub是集合的子集关系。
1726
我们用 A ⊆ B 表示 "A是B的子集",用 A ⊈ B 表示 "A不是B的子集"。 *)
1827
Definition Sub := λ A B, ∀x ∈ A, x ∈ B.
@@ -62,8 +71,7 @@ Qed.
6271
(* Introduction rule of empty set (空集的介入) *)
6372
Lemma EmptyI : ∀ A, (∀ x, x ∉ A) → A = ∅.
6473
Proof.
65-
intros A E. apply ExtAx.
66-
split; intros H.
74+
intros A E. ext.
6775
- exfalso. eapply E. apply H.
6876
- exfalso0.
6977
Qed.
@@ -147,9 +155,9 @@ Qed.
147155
(* 空集的并集是空集 *)
148156
Fact union_empty : ⋃∅ = ∅.
149157
Proof.
150-
apply ExtAx. split.
151-
- intros. apply UnionAx in H as [a [H _]]. exfalso0.
152-
- intros. exfalso0.
158+
ext.
159+
- apply UnionAx in H as [a [H _]]. exfalso0.
160+
- exfalso0.
153161
Qed.
154162

155163
(**=== 公理4: 幂集公理 ===**)
@@ -169,11 +177,8 @@ Proof. intros. apply PowerAx. apply sub_refl. Qed.
169177
(* 若集合是空集的幂集的成员,那么这个集合是空集 *)
170178
Example only_empty_in_power_empty: ∀ x, x ∈ 𝒫 ∅ → x = ∅.
171179
Proof.
172-
intros.
173-
apply PowerAx in H.
174-
unfold Sub in H.
175-
apply ExtAx. split; intros.
176-
- apply H. apply H0.
180+
intros. ext.
181+
- apply PowerAx in H. apply H. apply H0.
177182
- exfalso0.
178183
Qed.
179184

@@ -208,7 +213,7 @@ Qed.
208213
Lemma repl_ext : ∀ G F A, (∀a ∈ A, F a = G a) →
209214
{F a | a ∊ A} = {G a | a ∊ A}.
210215
Proof with auto.
211-
intros. apply ExtAx. split; intros Hx.
216+
intros. ext Hx.
212217
- apply ReplAx in Hx as [y [Hy Hx]].
213218
apply ReplAx. exists y. split... rewrite <- H...
214219
- apply ReplAx in Hx as [y [Hy Hx]].

ZFC1.v Axiom/ZFC1.v

+19-13
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(** adapted from the thesis by Jonas Kaiser, November 23, 2012 **)
33
(** Coq coding by choukh, April 2020 **)
44

5-
Require Export ZFC.ZFC0.
5+
Require Export ZFC.Axiom.ZFC0.
66

77
(*** ZFC集合论1:配对,单集,二元并,集族的并 ***)
88

@@ -59,8 +59,7 @@ Qed.
5959
(* 配对是顺序无关的 *)
6060
Theorem pair_ordering_agnostic : ∀ a b, {a, b} = {b, a}.
6161
Proof.
62-
intros. apply ExtAx.
63-
split; intros.
62+
intros. ext.
6463
- apply PairE in H.
6564
destruct H as [H1|H2].
6665
+ subst x. apply PairI2.
@@ -183,7 +182,7 @@ Qed.
183182
Lemma character_of_single : ∀ A, ∀x ∈ A, (∀y ∈ A, x = y) → A = ⎨x⎬.
184183
Proof.
185184
intros A x Hx H.
186-
apply ExtAx. split; intros.
185+
ext.
187186
- apply H in H0. subst. apply SingI.
188187
- apply SingE in H0. subst. apply Hx.
189188
Qed.
@@ -228,7 +227,7 @@ Qed.
228227
(* 任意集合的单集的并就是原集合 *)
229228
Lemma union_single : ∀ A, ⋃ ⎨A⎬ = A.
230229
Proof.
231-
intros. apply ExtAx. split; intros.
230+
intros. ext.
232231
- apply UnionAx in H as [a [H1 H2]].
233232
apply SingE in H1. subst. apply H2.
234233
- eapply UnionI. apply SingI. apply H.
@@ -239,13 +238,13 @@ Lemma union_one : ⋃ 1 = ∅.
239238
Proof. exact (union_single ∅). Qed.
240239

241240
(* 集合的并等于空集当且仅当该集合是零或壹 *)
242-
Lemma union_empty_iff : ∀ A, ⋃ A = ∅ ↔ A = ∅ ∨ A = 1.
241+
Lemma union_eq_empty : ∀ A, ⋃ A = ∅ ↔ A = ∅ ∨ A = 1.
243242
Proof with eauto.
244243
split; intros.
245244
- destruct (classic (A = ∅)). left...
246245
apply EmptyNE in H0 as [a Ha].
247246
destruct (classic (a = ∅)). {
248-
right. apply ExtAx. intros b. split; intros Hb.
247+
right. ext b Hb.
249248
- destruct (classic (b = ∅)).
250249
+ rewrite H1. apply SingI.
251250
+ exfalso. apply EmptyNE in H1 as [x Hx].
@@ -263,7 +262,7 @@ Qed.
263262
(* 贰的并是壹 *)
264263
Lemma union_two : ⋃ 2 = 1.
265264
Proof.
266-
apply ExtAx. split; intro.
265+
ext.
267266
- apply UnionAx in H as [a [H1 H2]].
268267
apply TwoE in H1 as [].
269268
+ rewrite H in H2. exfalso0.
@@ -274,7 +273,7 @@ Qed.
274273
(* 零的幂集是壹 *)
275274
Lemma power_empty : 𝒫 ∅ = 1.
276275
Proof.
277-
apply ExtAx. split; intros.
276+
ext.
278277
- apply PowerAx in H. apply OneI2.
279278
apply sub_empty. apply H.
280279
- apply PowerAx. apply OneE in H.
@@ -284,7 +283,7 @@ Qed.
284283
(* 集合的单集的幂集 *)
285284
Lemma power_single : ∀ a, 𝒫 ⎨a⎬ = {∅, ⎨a⎬}.
286285
Proof.
287-
intros. apply ExtAx. split; intros.
286+
intros. ext.
288287
- apply PowerAx in H.
289288
apply subset_of_single in H as []; subst.
290289
apply PairI1. apply PairI2.
@@ -325,7 +324,7 @@ Qed.
325324

326325
Lemma bunion_self : ∀ A, A ∪ A = A.
327326
Proof.
328-
intros. apply ExtAx. split; intros Hx.
327+
intros. ext Hx.
329328
- apply BUnionE in Hx as []; auto.
330329
- apply BUnionI1; auto.
331330
Qed.
@@ -358,7 +357,7 @@ Proof.
358357
apply H in H1.
359358
eapply member_of_member_of_two_is_zero. apply H2. apply H1.
360359
}
361-
apply ExtAx. split; intros.
360+
ext.
362361
- apply H1 in H2. subst. apply OneI1.
363362
- apply UnionAx. exists 1. split.
364363
+ apply ReplAx in H0. apply H0.
@@ -368,7 +367,7 @@ Qed.
368367
Fact funion_const : ∀ X F C,
369368
⦿ X → (∀x ∈ X, F x = C) → ⋃{F x | x ∊ X} = C.
370369
Proof.
371-
intros. apply ExtAx. split; intros.
370+
intros. ext.
372371
- apply FUnionE in H1. destruct H1 as [y [H1 H2]].
373372
apply H0 in H1. subst. auto.
374373
- destruct H as [y H]. eapply FUnionI.
@@ -397,4 +396,11 @@ Proof.
397396
rewrite H2. apply TwoI1.
398397
Qed.
399398

399+
Lemma repl_eq_1 : ∀ F A, {F x | x ∊ A} = 1 → ∀ x ∈ A, F x = ∅.
400+
Proof with eauto.
401+
intros F A H x Hx. contra.
402+
assert (F x ∈ 1). rewrite <- H. eapply ReplI...
403+
apply SingE in H1...
404+
Qed.
405+
400406
Close Scope ZFC1_scope.

ZFC2.v Axiom/ZFC2.v

+8-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(** adapted from the thesis by Jonas Kaiser, November 23, 2012 **)
33
(** Coq coding by choukh, April 2020 **)
44

5-
Require Export ZFC.ZFC1.
5+
Require Export ZFC.Axiom.ZFC1.
66

77
(*** ZFC集合论2:集合建构式,任意交,二元交,有序对,笛卡尔积 ***)
88

@@ -71,7 +71,7 @@ Qed.
7171
Lemma sep_ext : ∀ A P Q,
7272
(∀x ∈ A, P x ↔ Q x) → {x ∊ A | P x} = {x ∊ A | Q x}.
7373
Proof with auto.
74-
intros. apply ExtAx. split; intros Hx.
74+
intros. ext Hx.
7575
- apply SepE in Hx as [Hx HP].
7676
apply SepI... apply H...
7777
- apply SepE in Hx as [Hx HQ].
@@ -174,7 +174,7 @@ Lemma disjoint_bunion_injective : ∀ A B C,
174174
A ∪ C = B ∪ C → A = B.
175175
Proof with auto.
176176
intros * Hdja Hdjb Heq.
177-
apply ExtAx. split; intros Hx.
177+
ext Hx.
178178
- assert (Hx': x ∈ A ∪ C) by (apply BUnionI1; auto).
179179
rewrite Heq in Hx'. apply BUnionE in Hx' as []...
180180
exfalso. apply (disjointE A C x)...
@@ -193,7 +193,7 @@ Definition π2 := λ p, ⋃ {x ∊ ⋃p | x ∈ ⋂p → ⋃p = ⋂p}.
193193

194194
Lemma op_union : ∀ x y, ⋃<x, y> = {x, y}.
195195
Proof.
196-
intros. apply ExtAx. intros a. split; intros.
196+
intros. ext a H.
197197
- apply UnionAx in H.
198198
destruct H as [A [H1 H2]].
199199
apply PairE in H1. destruct H1.
@@ -207,7 +207,7 @@ Qed.
207207

208208
Lemma op_inter : ∀ x y, ⋂<x, y> = ⎨x⎬.
209209
Proof.
210-
intros. apply ExtAx. intros a. split; intros.
210+
intros. ext a H.
211211
- apply InterE in H as [_ H].
212212
apply H. apply PairI1.
213213
- apply SingE in H. subst. apply InterI.
@@ -228,7 +228,7 @@ Proof.
228228
unfold π2. intros.
229229
rewrite op_union in *.
230230
rewrite op_inter in *.
231-
apply ExtAx. intros a. split; intros.
231+
ext a H.
232232
- apply UnionAx in H... destruct H as [A [H1 H2]].
233233
apply SepE in H1 as [H3 H4].
234234
apply PairE in H3. destruct H3.
@@ -332,7 +332,7 @@ Qed.
332332

333333
Fact cprod_single_single : ∀ x, ⎨x⎬ × ⎨x⎬ = ⎨<x, x>⎬.
334334
Proof with auto.
335-
intros. apply ExtAx. split; intros Hx.
335+
intros. ext Hx.
336336
- apply CProdE1 in Hx as [a [Ha [b [Hb Hx]]]].
337337
apply SingE in Ha. apply SingE in Hb. subst...
338338
- apply SingE in Hx. subst. apply CProdI...
@@ -341,7 +341,7 @@ Qed.
341341
Fact cprod_alternative_definition : ∀ A B,
342342
A × B = ⋃ {{<a, b> | b ∊ B} | a ∊ A}.
343343
Proof with auto.
344-
intros. apply ExtAx. split; intros Hx.
344+
intros. ext Hx.
345345
- apply CProdE1 in Hx as [a [Ha [b [Hb Hx]]]]. subst x.
346346
apply UnionAx. exists {<a, b> | b ∊ B}. split.
347347
+ apply ReplAx. exists a. split...

ZFC3.v Axiom/ZFC3.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(** adapted from the thesis by Jonas Kaiser, November 23, 2012 **)
33
(** Coq coding by choukh, April 2020 **)
44

5-
Require Export ZFC.ZFC2.
5+
Require Export ZFC.Axiom.ZFC2.
66

77
(*** ZFC集合论3:无穷公理,选择公理,正则公理 ***)
88

CoqMakefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
## # GNU Lesser General Public License Version 2.1 ##
88
## # (see LICENSE file for the text of the license) ##
99
##########################################################################
10-
## GNUMakefile for Coq 8.13.1
10+
## GNUMakefile for Coq 8.13.2
1111

1212
# For debugging purposes (must stay here, don't move below)
1313
INITIAL_VARS := $(.VARIABLES)
@@ -218,7 +218,7 @@ COQDOCLIBS?=$(COQLIBS_NOML)
218218
# The version of Coq being run and the version of coq_makefile that
219219
# generated this makefile
220220
COQ_VERSION:=$(shell $(COQC) --print-version | cut -d " " -f 1)
221-
COQMAKEFILE_VERSION:=8.13.1
221+
COQMAKEFILE_VERSION:=8.13.2
222222

223223
COQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I "$(COQLIB)/$(d)")
224224

CoqMakefile.conf

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# #
99
###############################################################################
1010

11-
COQMF_VFILES = Meta.v ZFC0.v ZFC1.v ZFC2.v ZFC3.v lib/Essential.v lib/EpsilonInduction.v lib/EpsilonImpliesAC.v lib/Class.v EST2.v EX2.v EST3_1.v EST3_2.v EST3_3.v EX3_1.v EX3_2.v EST7_1.v lib/Relation.v lib/FuncFacts.v EST4_1.v EST4_2.v EST4_3.v EX4.v lib/Natural.v lib/NatIsomorphism.v lib/WosetMin.v EST5_1.v EST5_2.v EST5_3.v EST5_4.v EX5.v EST5_5.v EST5_6.v EST5_7.v lib/Real.v EST6_1.v lib/algebra/Inj_2n3m.v lib/IndexedFamilyUnion.v lib/Dominate.v lib/ChoiceFacts.v lib/Choice.v EST7_2.v EST7_3.v EST7_4.v EST7_5.v EST6_2.v EX6_1.v lib/NaturalFacts.v lib/OrdFacts.v EST6_3.v EST6_4.v EX6_2.v EST6_5.v EST6_6.v EX6_3.v lib/Cardinal.v EX7_1.v EX7_2.v lib/Ordinal.v lib/ZornsLemma.v EST7_6.v lib/ScottsTrick.v EX7_3.v lib/LoStruct.v lib/WoStructExtension.v EST8_1.v EST8_2.v EST8_3.v EST8_4.v EX8_1.v EX8_2.v EX8_3.v EX8_4.v EST8_5.v EST8_6.v EST8_7.v
11+
COQMF_VFILES = Axiom/Meta.v Axiom/ZFC0.v Axiom/ZFC1.v Axiom/ZFC2.v Axiom/ZFC3.v Lib/Essential.v Lib/EpsilonInduction.v Lib/EpsilonImpliesAC.v Lib/Class.v Theory/EST2.v Theory/EX2.v Theory/EST3_1.v Theory/EST3_2.v Theory/EST3_3.v Theory/EX3_1.v Theory/EX3_2.v Theory/EST7_1.v Lib/Relation.v Lib/FuncFacts.v Theory/EST4_1.v Theory/EST4_2.v Theory/EST4_3.v Theory/EX4.v Lib/Natural.v Lib/NatIsomorphism.v Lib/WosetMin.v Theory/EST5_1.v Theory/EST5_2.v Theory/EST5_3.v Theory/EST5_4.v Theory/EX5.v Theory/EST5_5.v Theory/EST5_6.v Theory/EST5_7.v Lib/Real.v Theory/EST6_1.v Lib/algebra/Inj_2n3m.v Lib/IndexedFamilyUnion.v Lib/Dominate.v Lib/ChoiceFacts.v Lib/Choice.v Theory/EST7_2.v Theory/EST7_3.v Theory/EST7_4.v Theory/EST7_5.v Theory/EST6_2.v Theory/EX6_1.v Lib/NaturalFacts.v Lib/OrdFacts.v Theory/EST6_3.v Theory/EST6_4.v Theory/EX6_2.v Theory/EST6_5.v Theory/EST6_6.v Theory/EX6_3.v Lib/Cardinal.v Theory/EX7_1.v Theory/EX7_2.v Lib/Ordinal.v Lib/ZornsLemma.v Theory/EST7_6.v Lib/ScottsTrick.v Theory/EX7_3.v Lib/LoStruct.v Lib/WoStructExtension.v Theory/EST8_1.v Theory/EST8_2.v Theory/EST8_3.v Theory/EST8_4.v Theory/EX8_1.v Theory/EX8_2.v Theory/EX8_3.v Theory/EX8_4.v Theory/EST8_5.v Theory/EST8_6.v Theory/EST8_7.v
1212
COQMF_MLIFILES =
1313
COQMF_MLFILES =
1414
COQMF_MLGFILES =
@@ -36,7 +36,7 @@ COQMF_CMDLINE_COQLIBS =
3636

3737
COQMF_LOCAL=0
3838
COQMF_COQLIB=/usr/local/lib/coq/
39-
COQMF_DOCDIR=/usr/local/Cellar/coq/8.13.1/share/doc/coq/
39+
COQMF_DOCDIR=/usr/local/Cellar/coq/8.13.2/share/doc/coq/
4040
COQMF_OCAMLFIND=/usr/local/opt/ocaml-findlib/bin/ocamlfind
4141
COQMF_CAMLFLAGS=-thread -rectypes -w +a-4-9-27-41-42-44-45-48-58-67 -safe-string -strict-sequence
4242
COQMF_WARN=-warn-error +a-3

0 commit comments

Comments
 (0)