theory a_sTs01_121027 imports Complex_Main begin --"\<^bold>\"section{*The Axiom of Extension*} --"\<^bold>\"subsection{*The primitive set type and membership predicate*} --"\<^bold>\\<^bold>\\<^bold>\

\<^bold>\" typedecl--"The primitive set type \\<^isub>\: everything is a set." sT ("\\<^isub>\") --"\<^bold>\

\<^bold>\\<^bold>\\<^bold>\" consts--"Membership predicate \\<^isub>\: axiomatized by subsequent axioms." inS :: "\\<^isub>\ \ \\<^isub>\ \ bool" (infixl "inS" 55) notation inS (infixl "\\<^isub>\" 55) abbreviation niS :: "\\<^isub>\ \ \\<^isub>\ \ bool" (infixl "niS" 55) where "x niS y == \(x \\<^isub>\ y)" notation niS (infixl "\\<^isub>\" 55) --"\<^bold>\"subsection{*Axiomatizing two forms of the Axiom of Extension*} --"\<^isub>'The standard Axiom of Extension is the formula \q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2). The question is whether this standard formula is equivalent to the free variable proposition (\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2). At this point, the following counterexample shows that it is not." --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" theorem--"The two forms are not equivalent." "(\q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)) \ ((\x. x \\<^isub>\ q\<^isub>3 \ x \\<^isub>\ q\<^isub>4) \ (q\<^isub>3 = q\<^isub>4))" --"nitpick[user_axioms]" --"Nitpick found a counterexample for card \\<^isub>\ = 3: Free variables: (q\<^isub>3\\\<^isub>\) = s1 (q\<^isub>4\\\<^isub>\) = s2 " oops --"\<^isub>'However, the following locale and theorem show that if we axiomatize the standard formula of the Axiom of Extension, then the standard form and the free variable form are equivalent." --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" locale standard\<^isub>'axiom\<^isub>'of\<^isub>'extension = assumes standard\<^isub>'axiom: "\q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)" --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" theorem (in standard\<^isub>'axiom\<^isub>'of\<^isub>'extension) "(\q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)) \ ((\x. x \\<^isub>\ q\<^isub>3 \ x \\<^isub>\ q\<^isub>4) \ (q\<^isub>3 = q\<^isub>4))" by (metis standard\<^isub>'axiom) --"\<^isub>'Likewise, the following locale and theorem show that if we axiomatize the free variable form of the Axiom of Extension, then the free variable form is equivalent to the standard form of Axiom of Extension." --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" locale free\<^isub>'variable\<^isub>'axiom\<^isub>'of\<^isub>'extension = assumes free\<^isub>'variable\<^isub>'axiom: "(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)" --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" theorem (in free\<^isub>'variable\<^isub>'axiom\<^isub>'of\<^isub>'extension) "(\q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)) \ ((\x. x \\<^isub>\ q\<^isub>3 \ x \\<^isub>\ q\<^isub>4) \ (q\<^isub>3 = q\<^isub>4))" by (metis free\<^isub>'variable\<^isub>'axiom) --"\<^isub>'Because we can axiomatize either form, I axiomatize both. The Ax\<^isub>'x\<^isup>N\<^isup>u axiom will be used, whenever possible, for theorems with no free variables. The Ax\<^isub>'x\<^isup>N\<^isup>f axiom will be used for theorems which contain free variables. This allows the possibility of separating the axioms and theorems with free variables from the axioms and theorems which contain no free variables." --"\<^bold>\\<^bold>\\<^bold>\\<^bold>\" axiomatization--"The Axiom of Extension: set equality." where Ax\<^isub>'x\<^isup>N\<^isup>u: "\q\<^isub>1.\q\<^isub>2.(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)" and Ax\<^isub>'x\<^isup>N\<^isup>f: "(\x. x \\<^isub>\ q\<^isub>1 \ x \\<^isub>\ q\<^isub>2) \ (q\<^isub>1 = q\<^isub>2)" end