(* Derived form of replacement, restricting P to its functional part. The resulting set (for functional P) is the same as with PrimReplace, but the rules are simpler. *) definition Replace :: "[i, [i, i] ==> o] ==> i" where"Replace(A,P) ≡ PrimReplace(A, λx y. (∃!z. P(x,z)) ∧ P(x,y))"
(* Separation and Pairing can be derived from the Replacement and Powerset Axioms using the following definitions. *) definition Collect :: "[i, i ==> o] ==> i" where"Collect(A,P) ≡ {y . x∈A, x=y ∧ P(x)}"
(* ZF axioms -- see Suppes p.238 Axioms for Union, Pow and Replace state existence only, uniqueness is derivable using extensionality. *)
axiomatization where
extension: "A = B ⟷ A ⊆ B ∧ B ⊆ A"and
Union_iff: "A ∈∪(C) ⟷ (∃B∈C. A∈B)"and
Pow_iff: "A ∈ Pow(B) ⟷ A ⊆ B"and
(*We may name this set, though it is not uniquely defined.*)
infinity: "0 ∈ Inf ∧ (∀y∈Inf. succ(y) ∈ Inf)"and
(*This formulation facilitates case analysis on A.*)
foundation: "A = 0 ∨ (∃x∈A. ∀y∈x. y∉A)"and
(*Schema axiom since predicate P is a higher-order variable*)
replacement: "(∀x∈A. ∀y z. P(x,y) ∧ P(x,z) ⟶ y = z) ==> b ∈ PrimReplace(A,P) ⟷ (∃x∈A. P(x,b))"
subsection‹Definite descriptions -- via Replace over the set "1"›
definition The :: "(i ==> o) ==> i" (binder‹THE › 10) where the_def: "The(P) ≡∪({y . x ∈ {0}, P(y)})"
definitionIf :: "[o, i, i] ==> i" (‹(‹notation=‹mixfix if then else›\if (_)/ then (_)/ else (_))› [10] 10) where if_def: "if P then a else b ≡ THE z. P ∧ z=a | ¬P ∧ z=b"
notation (ASCII)
cart_prod (infixr‹*› 80) and
Int (infixl‹Int› 70) and
Un (infixl‹Un› 65) and
function_space (infixr‹->› 60) and
Subset (infixl‹🚫› 50) and
mem (infixl‹:› 50) and
not_mem (infixl‹¬:› 50)
(*Used in the datatype package*) lemma rev_bspec: "[x: A; ∀x∈A. P(x)]==> P(x)" by (simp add: Ball_def)
(*Trival rewrite rule; @{term"(\<forall>x\<in>A.P)\<longleftrightarrow>P"} holds only if A is nonempty!*) lemma ball_triv [simp]: "(∀x∈A. P) ⟷ ((∃x. x∈A) ⟶ P)" by (simp add: Ball_def)
(*The best argument order when there is only one @{term"x\<in>A"}*) lemma rev_bexI: "[x∈A; P(x)]==>∃x∈A. P(x)" by blast
(*Not of the general form for such rules. The existential quanitifer becomes universal. *) lemma bexCI: "[∀x∈A. ¬P(x) ==> P(a); a: A]==>∃x∈A. P(x)" by blast
(*We do not even have @{term"(\<exists>x\<in>A. True) \<longleftrightarrow> True"} unless @{term"A" is nonempty\<And>*) lemma bex_triv [simp]: "(∃x∈A. P) ⟷ ((∃x. x∈A) ∧ P)" by (simp add: Bex_def)
(*Introduction; there must be a unique y such that P(x,y), namely y=b. *) lemma ReplaceI [intro]: "[P(x,b); x: A; ∧y. P(x,y) ==> y=b]==> b ∈ {y. x∈A, P(x,y)}" by (rule Replace_iff [THEN iffD2], blast)
(*Elimination; may asssume there is a unique y such that P(x,y), namely y=b. *) lemma ReplaceE: "[b ∈ {y. x∈A, P(x,y)}; ∧x. [x: A; P(x,b); ∀y. P(x,y)⟶y=b]==> R \==> R" by (rule Replace_iff [THEN iffD1, THEN bexE], simp+)
(*As above but without the (generally useless) 3rd assumption*) lemma ReplaceE2 [elim!]: "[b ∈ {y. x∈A, P(x,y)}; ∧x. [x: A; P(x,b)]==> R ]==> R" by (erule ReplaceE, blast)
(*No "Addcongs [UN_cong]" because @{term\<Union>} is a combination of constants*)
(* UN_E appears before UnionE so that it is tried first, to avoid expensive calls to hyp_subst_tac. Cannot include UN_I as it is unsafe: would enlarge the search space.*)
subsection‹Rules for the empty set›
(*The set @{term"{x\<in>0. False}"} is empty; by foundation it equals 0 See Suppes, page 21.*) lemma not_mem_empty [simp]: "a ∉ 0" using foundation by (best dest: equalityD2)
lemmas emptyE [elim!] = not_mem_empty [THENnotE]
lemma empty_subsetI [simp]: "0 ⊆ A" by blast
lemma equals0I: "[∧y. y∈A ==> False]==> A=0" by blast
(*Not obviously useful for proving InterI, InterD, InterE*) lemma Inter_iff: "A ∈∩(C) ⟷ (∀x∈C. A: x) ∧ C≠0" by (force simp: Inter_def)
(* Intersection is well-behaved only if the family is non-empty! *) lemma InterI [intro!]: "[∧x. x: C ==> A: x; C≠0]==> A ∈∩(C)" by (simp add: Inter_iff)
(*A "destruct" rule -- every B in C contains A as an element, but A\<in>B can hold when B\<in>C does not! This rule is analogous to "spec". *) lemma InterD [elim, Pure.elim]: "[A ∈∩(C); B ∈ C]==> A ∈ B" by (force simp: Inter_def)
(*"Classical" elimination rule -- does not require exhibiting @{term"B\<in>C"} *) lemma InterE [elim]: "[A ∈∩(C); B∉C ==> R; A∈B ==> R]==> R" by (auto simp: Inter_def)
subsection‹Cantor's Theorem: There is no surjection from a set to its powerset.›
(*The search is undirected. Allowing redundant introduction rules may make it diverge. Variable b represents ANY map, such as (lam x\<in>A.b(x)): A->Pow(A). *) lemma cantor: "∃S ∈ Pow(A). ∀x∈A. b(x) ≠ S" by (best elim!: equalityCE del: ReplaceI RepFun_eqI)
end
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.17 Sekunden
(vorverarbeitet am 2026-04-25)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.