This theory covers basic facts about fields.
In this section we define what is a field and list the basic properties of fields.
Field is a notrivial commutative ring such that all non-zero elements have an inverse. We define the notion of being a field as a statement about three sets. The first set, denoted K is the carrier of the field. The second set, denoted A represents the additive operation on K (recall that in ZF set theory functions are sets). The third set M represents the multiplicative operation on K.
definition
\( \text{IsAfield}(K,A,M) \equiv \) \( ( \text{IsAring}(K,A,M) \wedge (M \text{ is commutative on } K) \wedge \) \( \text{ TheNeutralElement}(K,A) \neq \text{ TheNeutralElement}(K,M) \wedge \) \( (\forall a\in K.\ a\neq \text{ TheNeutralElement}(K,A)\longrightarrow \) \( (\exists b\in K.\ M\langle a,b\rangle = \text{ TheNeutralElement}(K,M)))) \)
The field0 context extends the ring0 context adding field-related assumptions and notation related to the multiplicative inverse.
locale field0 = ring0 K A M +
assumes mult_commute: \( M \text{ is commutative on } K \)
assumes not_triv: \( 0 \neq 1 \)
assumes inv_exists: \( \forall x\in K.\ x\neq 0 \longrightarrow (\exists y\in K.\ x\cdot y = 1 ) \)
defines \( K_0 \equiv K-\{ 0 \} \)
defines \( a^{-1} \equiv \text{GroupInv}(K_0,\text{restrict}(M,K_0\times K_0))(a) \)
The next lemma assures us that we are talking fields in the field0 context.
lemma (in field0) Field_ZF_1_L1:
shows \( \text{IsAfield}(K,A,M) \) using ringAssum, mult_commute, not_triv, inv_exists, IsAfield_defWe can use theorems proven in the field0 context whenever we talk about a field.
lemma field_field0:
assumes \( \text{IsAfield}(K,A,M) \)
shows \( field0(K,A,M) \) using assms, IsAfield_def, field0_axioms.intro, ring0_def, field0_defLet's have an explicit statement that the multiplication in fields is commutative.
lemma (in field0) field_mult_comm:
assumes \( a\in K \), \( b\in K \)
shows \( a\cdot b = b\cdot a \) using mult_commute, assms, IsCommutative_defFields do not have zero divisors.
lemma (in field0) field_has_no_zero_divs:
shows \( \text{HasNoZeroDivs}(K,A,M) \)proof\(K_0\) (the set of nonzero field elements is closed with respect to multiplication.
lemma (in field0) Field_ZF_1_L2:
shows \( K_0 \text{ is closed under } M \) using Ring_ZF_1_L4, field_has_no_zero_divs, Ring_ZF_1_L12, IsOpClosed_defAny nonzero element has a right inverse that is nonzero.
lemma (in field0) Field_ZF_1_L3:
assumes A1: \( a\in K_0 \)
shows \( \exists b\in K_0.\ a\cdot b = 1 \)proofIf we remove zero, the field with multiplication becomes a group and we can use all theorems proven in group0 context.
theorem (in field0) Field_ZF_1_L4:
shows \( \text{IsAgroup}(K_0,\text{restrict}(M,K_0\times K_0)) \), \( group0(K_0,\text{restrict}(M,K_0\times K_0)) \), \( 1 = \text{ TheNeutralElement}(K_0,\text{restrict}(M,K_0\times K_0)) \)proofThe inverse of a nonzero field element is nonzero.
lemma (in field0) Field_ZF_1_L5:
assumes A1: \( a\in K \), \( a\neq 0 \)
shows \( a^{-1} \in K_0 \), \( (a^{-1})^2 \in K_0 \), \( a^{-1} \in K \), \( a^{-1} \neq 0 \)proofThe inverse is really the inverse.
lemma (in field0) Field_ZF_1_L6:
assumes A1: \( a\in K \), \( a\neq 0 \)
shows \( a\cdot a^{-1} = 1 \), \( a^{-1}\cdot a = 1 \)proofA lemma with two field elements and cancelling.
lemma (in field0) Field_ZF_1_L7:
assumes \( a\in K \), \( b\in K \), \( b\neq 0 \)
shows \( a\cdot b\cdot b^{-1} = a \), \( a\cdot b^{-1}\cdot b = a \) using assms, Field_ZF_1_L5, Ring_ZF_1_L11, Field_ZF_1_L6, Ring_ZF_1_L3This section deals with more specialized identities that are true in fields.
\(a/(a^2) = 1/a \) .
lemma (in field0) Field_ZF_2_L1:
assumes A1: \( a\in K \), \( a\neq 0 \)
shows \( a\cdot (a^{-1})^2 = a^{-1} \)proofIf we multiply two different numbers by a nonzero number, the results will be different.
lemma (in field0) Field_ZF_2_L2:
assumes \( a\in K \), \( b\in K \), \( c\in K \), \( a\neq b \), \( c\neq 0 \)
shows \( a\cdot c^{-1} \neq b\cdot c^{-1} \) using assms, field_has_no_zero_divs, Field_ZF_1_L5, Ring_ZF_1_L12BWe can put a nonzero factor on the other side of non-identity (is this the best way to call it?) changing it to the inverse.
lemma (in field0) Field_ZF_2_L3:
assumes A1: \( a\in K \), \( b\in K \), \( b\neq 0 \), \( c\in K \) and A2: \( a\cdot b \neq c \)
shows \( a \neq c\cdot b^{-1} \)proofIf if the inverse of \(b\) is different than \(a\), then the inverse of \(a\) is different than \(b\).
lemma (in field0) Field_ZF_2_L4:
assumes \( a\in K \), \( a\neq 0 \) and \( b^{-1} \neq a \)
shows \( a^{-1} \neq b \) using assms, Field_ZF_1_L4, group0_2_L11BAn identity with two field elements, one and an inverse.
lemma (in field0) Field_ZF_2_L5:
assumes \( a\in K \), \( b\in K \), \( b\neq 0 \)
shows \( (1 + a\cdot b)\cdot b^{-1} = a + b^{-1} \) using assms, Ring_ZF_1_L4, Field_ZF_1_L5, Ring_ZF_1_L2, ring_oper_distr, Field_ZF_1_L7, Ring_ZF_1_L3An identity with three field elements, inverse and cancelling.
lemma (in field0) Field_ZF_2_L6:
assumes A1: \( a\in K \), \( b\in K \), \( b\neq 0 \), \( c\in K \)
shows \( a\cdot b\cdot (c\cdot b^{-1}) = a\cdot c \)proofIn ZF if \(f: X\rightarrow Y\) and \(x\notin X\) we have \(f(x)=\emptyset\). Since \(\emptyset\) (the empty set) in ZF is the same as zero of natural numbers we can claim that \(1/0=0\) in certain sense. In this section we prove a theorem that makes makes it explicit.
The next locale extends the field0 locale to introduce notation for division operation.
locale fieldd = field0 +
defines \( division \equiv \{\langle p,\text{fst}(p)\cdot \text{snd}(p)^{-1}\rangle .\ p\in K\times K_0\} \)
defines \( x / y \equiv division\langle x,y\rangle \)
Division is a function on \(K\times K_0\) with values in \(K\).
lemma (in fieldd) div_fun:
shows \( division: K\times K_0 \rightarrow K \)proofSo, really \(1/0=0\). The essential lemma is apply_0 from standard Isabelle's func.thy.
theorem (in fieldd) one_over_zero:
shows \( 1 / 0 = 0 \)proofassumes \( a\in R \), \( b\in R \), \( c\in R \)
shows \( a + b + c = a + (b + c) \), \( a\cdot b\cdot c = a\cdot (b\cdot c) \)assumes \( x\in R \)
shows \( 0 \cdot x = 0 \), \( x\cdot 0 = 0 \)assumes \( a\in R \)
shows \( ( - a) \in R \), \( ( - ( - a)) = a \), \( a + 0 = a \), \( 0 + a = a \), \( a\cdot 1 = a \), \( 1 \cdot a = a \), \( a - a = 0 \), \( a - 0 = a \), \( 2 \cdot a = a + a \), \( ( - a) + a = 0 \)assumes \( a\in R \), \( b\in R \)
shows \( a + b \in R \), \( a - b \in R \), \( a\cdot b \in R \), \( a + b = b + a \)assumes \( \text{HasNoZeroDivs}(R,A,M) \) and \( a\in R \), \( a\neq 0 \), \( b\in R \), \( b\neq 0 \)
shows \( a\cdot b\neq 0 \)assumes \( f \text{ is associative on } X \) and \( A\subseteq X \) and \( A \text{ is closed under } f \)
shows \( \text{restrict}(f,A\times A) \text{ is associative on } A \)assumes \( e \in G \wedge (\forall g\in G.\ e \oplus g = g \wedge g \oplus e = g) \)
shows \( e = \text{ TheNeutralElement}(G,f) \)assumes \( a\in K_0 \)
shows \( \exists b\in K_0.\ a\cdot b = 1 \)assumes \( \text{IsAmonoid}(G,f) \) and \( \forall g\in G.\ \exists b\in G.\ f\langle g,b\rangle = \text{ TheNeutralElement}(G,f) \)
shows \( \text{IsAgroup}(G,f) \)assumes \( x\in G \)
shows \( x^{-1}\in G \)assumes \( x\in G \)
shows \( x\cdot x^{-1} = 1 \wedge x^{-1}\cdot x = 1 \)assumes \( a\in K \), \( a\neq 0 \)
shows \( a^{-1} \in K_0 \), \( (a^{-1})^2 \in K_0 \), \( a^{-1} \in K \), \( a^{-1} \neq 0 \)assumes \( a\in K \), \( a\neq 0 \)
shows \( a\cdot a^{-1} = 1 \), \( a^{-1}\cdot a = 1 \)assumes \( \text{HasNoZeroDivs}(R,A,M) \), \( a\in R \), \( b\in R \), \( c\in R \), \( a\neq b \), \( c\neq 0 \)
shows \( a\cdot c \neq b\cdot c \)assumes \( a\in K \), \( b\in K \), \( c\in K \), \( a\neq b \), \( c\neq 0 \)
shows \( a\cdot c^{-1} \neq b\cdot c^{-1} \)assumes \( a\in K \), \( b\in K \), \( b\neq 0 \)
shows \( a\cdot b\cdot b^{-1} = a \), \( a\cdot b^{-1}\cdot b = a \)assumes \( a\in G \) and \( b^{-1} \neq a \)
shows \( a^{-1} \neq b \)assumes \( a\in R \), \( b\in R \), \( c\in R \)
shows \( a\cdot (b + c) = a\cdot b + a\cdot c \), \( (b + c)\cdot a = b\cdot a + c\cdot a \)assumes \( \forall x\in X.\ b(x) \in Y \)
shows \( \{\langle x,b(x)\rangle .\ x\in X\} : X\rightarrow Y \)assumes \( f:A\rightarrow C \)
shows \( domain(f) = A \)