This theory file covers basics of group theory.
In this section we define the notion of a group and set up the notation for discussing groups. We prove some basic theorems about groups.
To define a group we take a monoid and add a requirement that the right inverse needs to exist for every element of the group.
definition
\( \text{IsAgroup}(G,f) \equiv \) \( ( \text{IsAmonoid}(G,f) \wedge (\forall g\in G.\ \exists b\in G.\ f\langle g,b\rangle = \text{ TheNeutralElement}(G,f))) \)
We define the group inverse as the set \(\{\langle x,y \rangle \in G\times G: x\cdot y = e \}\), where \(e\) is the neutral element of the group. This set (which can be written as \((\cdot)^{-1}\{ e\}\)) is a certain relation on the group (carrier). Since, as we show later, for every \(x\in G\) there is exactly one \(y\in G\) such that \(x \cdot y = e\) this relation is in fact a function from \(G\) to \(G\).
definition
\( \text{GroupInv}(G,f) \equiv \{\langle x,y\rangle \in G\times G.\ f\langle x,y\rangle = \text{ TheNeutralElement}(G,f)\} \)
Next we define the context group0 in which groups will be discussed. The common assumption for all proposition proven in the context group0 is that fixed the pair \((G,P)\) is a group. We will use the multiplicative notation for groups. The neutral element is denoted \(1\). \( x^{-1} \) will denote the inverse of \(x\), i.e. the value of the group inverse operation on \(x\). We define the notation for product of a finite list of elements of \(G\) using the notion of Fold, defined in the Fold_ZF theory. Finally we define the notation \( x^{n} \) which is a product of the list of length \(n\) with value \(x\) repeated \(n\) times. Such list is a function that assigns \(x\) to every element of the set \(n=\{0,1,...,n-1\}\) and is represented by a set of pairs \(\{\langle k,x\rangle : k\in n\}\), which is the same as the set \(n\times\{ x\}\) (see lemma fun_def_alt1 in the func1 theory.
locale group0
assumes groupAssum: \( \text{IsAgroup}(G,P) \)
defines \( 1 \equiv \text{ TheNeutralElement}(G,P) \)
defines \( a \cdot b \equiv P\langle a,b\rangle \)
defines \( x^{-1} \equiv \text{GroupInv}(G,P)(x) \)
defines \( \prod s \equiv \text{Fold}(P,1 ,s) \)
defines \( x^{n} \equiv \prod \{\langle k,x\rangle .\ k\in n\} \)
First we show a lemma that says that we can use theorems proven in the monoid0 context (locale).
lemma (in group0) group0_2_L1:
shows \( monoid0(G,P) \) using groupAssum, IsAgroup_def, monoid0_defAssumptions of the monoid1 context are satisfied in the group0 context.
lemma (in group0) monoid1_valid_in_group:
shows \( monoid1(G,P) \) using group0_2_L1, monoid1_defThe theorems proven in the monoid1 context are valid in the group0 context.
using monoid1_valid_in_group
In some strange cases Isabelle has difficulties with applying the definition of a group. The next lemma defines a rule to be applied in such cases.
lemma definition_of_group:
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) \) using assms, IsAgroup_defA technical lemma that allows to use \(1\) as the neutral element of the group without referencing a list of lemmas and definitions.
lemma (in group0) group0_2_L2:
shows \( 1 \in G \wedge (\forall g\in G.\ (1 \cdot g = g \wedge g\cdot 1 = g)) \) using group0_2_L1, unit_is_neutralThe group is closed under the group operation. Used all the time, useful to have handy.
lemma (in group0) group_op_closed:
assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b \in G \) using assms, group0_1_L1The group operation is associative. This is another technical lemma that allows to shorten the list of referenced lemmas in some proofs.
lemma (in group0) group_oper_assoc:
assumes \( a\in G \), \( b\in G \), \( c\in G \)
shows \( a\cdot (b\cdot c) = a\cdot b\cdot c \) using groupAssum, assms, IsAgroup_def, IsAmonoid_def, IsAssociative_def, group_op_closedThe group operation maps \(G\times G\) into \(G\). It is conveniet to have this fact easily accessible in the group0 context.
lemma (in group0) group_oper_fun:
shows \( P : G\times G\rightarrow G \) using groupAssum, IsAgroup_def, IsAmonoid_def, IsAssociative_defThe definition of a group requires the existence of the right inverse. We show that this is also the left inverse.
theorem (in group0) group0_2_T1:
assumes A1: \( g\in G \) and A2: \( b\in G \) and A3: \( g\cdot b = 1 \)
shows \( b\cdot g = 1 \)proofFor every element of a group there is only one inverse.
lemma (in group0) group0_2_L4:
assumes A1: \( x\in G \)
shows \( \exists !y.\ y\in G \wedge x\cdot y = 1 \)proofThe group inverse is a function that maps G into G.
theorem group0_2_T2:
assumes A1: \( \text{IsAgroup}(G,f) \)
shows \( \text{GroupInv}(G,f) : G\rightarrow G \)proofWe can think about the group inverse (the function) as the inverse image of the neutral element. Recall that in Isabelle \( f^{-1}(A) \) denotes the inverse image of the set \(A\).
theorem (in group0) group0_2_T3:
shows \( P^{-1}\{1 \} = \text{GroupInv}(G,P) \)proofThe inverse is in the group.
lemma (in group0) inverse_in_group:
assumes A1: \( x\in G \)
shows \( x^{-1}\in G \)proofThe notation for the inverse means what it is supposed to mean.
lemma (in group0) group0_2_L6:
assumes A1: \( x\in G \)
shows \( x\cdot x^{-1} = 1 \wedge x^{-1}\cdot x = 1 \)proofThe next two lemmas state that unless we multiply by the neutral element, the result is always different than any of the operands.
lemma (in group0) group0_2_L7:
assumes A1: \( a\in G \) and A2: \( b\in G \) and A3: \( a\cdot b = a \)
shows \( b=1 \)proofSee the comment to group0_2_L7.
lemma (in group0) group0_2_L8:
assumes A1: \( a\in G \) and A2: \( b\in G \) and A3: \( a\cdot b = b \)
shows \( a=1 \)proofThe inverse of the neutral element is the neutral element.
lemma (in group0) group_inv_of_one:
shows \( 1 ^{-1} = 1 \) using group0_2_L2, inverse_in_group, group0_2_L6, group0_2_L7if \(a^{-1} = 1\), then \(a=1\).
lemma (in group0) group0_2_L8A:
assumes A1: \( a\in G \) and A2: \( a^{-1} = 1 \)
shows \( a = 1 \)proofIf \(a\) is not a unit, then its inverse is not a unit either.
lemma (in group0) group0_2_L8B:
assumes \( a\in G \) and \( a \neq 1 \)
shows \( a^{-1} \neq 1 \) using assms, group0_2_L8AIf \(a^{-1}\) is not a unit, then a is not a unit either.
lemma (in group0) group0_2_L8C:
assumes \( a\in G \) and \( a^{-1} \neq 1 \)
shows \( a\neq 1 \) using assms, group0_2_L8A, group_inv_of_oneIf a product of two elements of a group is equal to the neutral element then they are inverses of each other.
lemma (in group0) group0_2_L9:
assumes A1: \( a\in G \) and A2: \( b\in G \) and A3: \( a\cdot b = 1 \)
shows \( a = b^{-1} \) and \( b = a^{-1} \)proofIt happens quite often that we know what is (have a meta-function for) the right inverse in a group. The next lemma shows that the value of the group inverse (function) is equal to the right inverse (meta-function).
lemma (in group0) group0_2_L9A:
assumes A1: \( \forall g\in G.\ b(g) \in G \wedge g\cdot b(g) = 1 \)
shows \( \forall g\in G.\ b(g) = g^{-1} \)proofWhat is the inverse of a product?
lemma (in group0) group_inv_of_two:
assumes A1: \( a\in G \) and A2: \( b\in G \)
shows \( b^{-1}\cdot a^{-1} = (a\cdot b)^{-1} \)proofWhat is the inverse of a product of three elements?
lemma (in group0) group_inv_of_three:
assumes A1: \( a\in G \), \( b\in G \), \( c\in G \)
shows \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot (a\cdot b)^{-1} \), \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot (b^{-1}\cdot a^{-1}) \), \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot b^{-1}\cdot a^{-1} \)proofThe inverse of the inverse is the element.
lemma (in group0) group_inv_of_inv:
assumes \( a\in G \)
shows \( a = (a^{-1})^{-1} \) using assms, inverse_in_group, group0_2_L6, group0_2_L9Group inverse is nilpotent, therefore a bijection and involution.
lemma (in group0) group_inv_bij:
shows \( \text{GroupInv}(G,P)\circ \text{GroupInv}(G,P) = id(G) \) and \( \text{GroupInv}(G,P) \in \text{bij}(G,G) \) and \( \text{GroupInv}(G,P) = converse( \text{GroupInv}(G,P)) \)proofA set comprehension form of the image of a set under the group inverse.
lemma (in group0) ginv_image:
assumes \( V\subseteq G \)
shows \( \text{GroupInv}(G,P)(V) \subseteq G \) and \( \text{GroupInv}(G,P)(V) = \{g^{-1}.\ g \in V\} \)proofInverse of an element that belongs to the inverse of the set belongs to the set.
lemma (in group0) ginv_image_el:
assumes \( V\subseteq G \), \( g \in \text{GroupInv}(G,P)(V) \)
shows \( g^{-1} \in V \) using assms, ginv_image, group_inv_of_invFor the group inverse the image is the same as inverse image.
lemma (in group0) inv_image_vimage:
shows \( \text{GroupInv}(G,P)(V) = \text{GroupInv}(G,P)^{-1}(V) \) using group_inv_bij, vimage_converseIf the unit is in a set then it is in the inverse of that set.
lemma (in group0) neut_inv_neut:
assumes \( A\subseteq G \) and \( 1 \in A \)
shows \( 1 \in \text{GroupInv}(G,P)(A) \)proofThe group inverse is onto.
lemma (in group0) group_inv_surj:
shows \( \text{GroupInv}(G,P)(G) = G \) using group_inv_bij, bij_def, surj_range_image_domainIf \(a^{-1}\cdot b=1\), then \(a=b\).
lemma (in group0) group0_2_L11:
assumes A1: \( a\in G \), \( b\in G \) and A2: \( a^{-1}\cdot b = 1 \)
shows \( a=b \)proofIf \(a\cdot b^{-1}=1\), then \(a=b\).
lemma (in group0) group0_2_L11A:
assumes A1: \( a\in G \), \( b\in G \) and A2: \( a\cdot b^{-1} = 1 \)
shows \( a=b \)proofIf if the inverse of \(b\) is different than \(a\), then the inverse of \(a\) is different than \(b\).
lemma (in group0) group0_2_L11B:
assumes A1: \( a\in G \) and A2: \( b^{-1} \neq a \)
shows \( a^{-1} \neq b \)proofWhat is the inverse of \(ab^{-1}\) ?
lemma (in group0) group0_2_L12:
assumes A1: \( a\in G \), \( b\in G \)
shows \( (a\cdot b^{-1})^{-1} = b\cdot a^{-1} \), \( (a^{-1}\cdot b)^{-1} = b^{-1}\cdot a \)proofA couple useful rearrangements with three elements: we can insert a \(b\cdot b^{-1}\) between two group elements (another version) and one about a product of an element and inverse of a product, and two others.
lemma (in group0) group0_2_L14A:
assumes A1: \( a\in G \), \( b\in G \), \( c\in G \)
shows \( a\cdot c^{-1}= (a\cdot b^{-1})\cdot (b\cdot c^{-1}) \), \( a^{-1}\cdot c = (a^{-1}\cdot b)\cdot (b^{-1}\cdot c) \), \( a\cdot (b\cdot c)^{-1} = a\cdot c^{-1}\cdot b^{-1} \), \( a\cdot (b\cdot c^{-1}) = a\cdot b\cdot c^{-1} \), \( (a\cdot b^{-1}\cdot c^{-1})^{-1} = c\cdot b\cdot a^{-1} \), \( a\cdot b\cdot c^{-1}\cdot (c\cdot b^{-1}) = a \), \( a\cdot (b\cdot c)\cdot c^{-1} = a\cdot b \)proofA simple equation to solve
lemma (in group0) simple_equation0:
assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a\cdot b^{-1} = c^{-1} \)
shows \( c = b\cdot a^{-1} \)proofAnother simple equation
lemma (in group0) simple_equation1:
assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a^{-1}\cdot b = c^{-1} \)
shows \( c = b^{-1}\cdot a \)proofAnother lemma about rearranging a product of four group elements.
lemma (in group0) group0_2_L15:
assumes A1: \( a\in G \), \( b\in G \), \( c\in G \), \( d\in G \)
shows \( (a\cdot b)\cdot (c\cdot d)^{-1} = a\cdot (b\cdot d^{-1})\cdot a^{-1}\cdot (a\cdot c^{-1}) \)proofWe can cancel an element with its inverse that is written next to it.
lemma (in group0) inv_cancel_two:
assumes A1: \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)proofAnother lemma about cancelling with two group elements.
lemma (in group0) group0_2_L16A:
assumes A1: \( a\in G \), \( b\in G \)
shows \( a\cdot (b\cdot a)^{-1} = b^{-1} \)proofSome other identities with three element and cancelling.
lemma (in group0) cancel_middle:
assumes \( a\in G \), \( b\in G \), \( c\in G \)
shows \( (a\cdot b)^{-1}\cdot (a\cdot c) = b^{-1}\cdot c \), \( (a\cdot b)\cdot (c\cdot b)^{-1} = a\cdot c^{-1} \), \( a^{-1}\cdot (a\cdot b\cdot c)\cdot c^{-1} = b \), \( a\cdot (b\cdot c^{-1})\cdot c = a\cdot b \), \( a\cdot b^{-1}\cdot (b\cdot c^{-1}) = a\cdot c^{-1} \)proofAdding a neutral element to a set that is closed under the group operation results in a set that is closed under the group operation.
lemma (in group0) group0_2_L17:
assumes \( H\subseteq G \) and \( H \text{ is closed under } P \)
shows \( (H \cup \{1 \}) \text{ is closed under } P \) using assms, IsOpClosed_def, group0_2_L2We can put an element on the other side of an equation.
lemma (in group0) group0_2_L18:
assumes A1: \( a\in G \), \( b\in G \) and A2: \( c = a\cdot b \)
shows \( c\cdot b^{-1} = a \), \( a^{-1}\cdot c = b \)proofWe can cancel an element on the right from both sides of an equation.
lemma (in group0) cancel_right:
assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a\cdot b = c\cdot b \)
shows \( a = c \)proofWe can cancel an element on the left from both sides of an equation.
lemma (in group0) cancel_left:
assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a\cdot b = a\cdot c \)
shows \( b=c \)proofMultiplying different group elements by the same factor results in different group elements.
lemma (in group0) group0_2_L19:
assumes A1: \( a\in G \), \( b\in G \), \( c\in G \) and A2: \( a\neq b \)
shows \( a\cdot c \neq b\cdot c \) and \( c\cdot a \neq c\cdot b \)proofThere are two common ways to define subgroups. One requires that the group operation is closed in the subgroup. The second one defines subgroup as a subset of a group which is itself a group under the group operations. We use the second approach because it results in shorter definition. The rest of this section is devoted to proving the equivalence of these two definitions of the notion of a subgroup.
A pair \((H,P)\) is a subgroup if \(H\) forms a group with the operation \(P\) restricted to \(H\times H\). It may be surprising that we don't require \(H\) to be a subset of \(G\). This however can be inferred from the definition if the pair \((G,P)\) is a group, see lemma group0_3_L2.
definition
\( \text{IsAsubgroup}(H,P) \equiv \text{IsAgroup}(H, \text{restrict}(P,H\times H)) \)
The group is its own subgroup.
lemma (in group0) group_self_subgroup:
shows \( \text{IsAsubgroup}(G,P) \) using groupAssum, group_oper_fun, restrict_domain unfolding IsAsubgroup_defFormally the group operation in a subgroup is different than in the group as they have different domains. Of course we want to use the original operation with the associated notation in the subgroup. The next couple of lemmas will allow for that.
The next lemma states that the neutral element of a subgroup is in the subgroup and it is both right and left neutral there. The notation is very ugly because we don't want to introduce a separate notation for the subgroup operation.
lemma group0_3_L1:
assumes A1: \( \text{IsAsubgroup}(H,f) \) and A2: \( n = \text{ TheNeutralElement}(H,\text{restrict}(f,H\times H)) \)
shows \( n \in H \), \( \forall h\in H.\ \text{restrict}(f,H\times H)\langle n,h \rangle = h \), \( \forall h\in H.\ \text{restrict}(f,H\times H)\langle h,n\rangle = h \)proofA subgroup is contained in the group.
lemma (in group0) group0_3_L2:
assumes A1: \( \text{IsAsubgroup}(H,P) \)
shows \( H \subseteq G \)proofThe group's neutral element (denoted \(1\) in the group0 context) is a neutral element for the subgroup with respect to the group action.
lemma (in group0) group0_3_L3:
assumes \( \text{IsAsubgroup}(H,P) \)
shows \( \forall h\in H.\ 1 \cdot h = h \wedge h\cdot 1 = h \) using assms, groupAssum, group0_3_L2, group0_2_L2The neutral element of a subgroup is the same as that of the group.
lemma (in group0) group0_3_L4:
assumes A1: \( \text{IsAsubgroup}(H,P) \)
shows \( \text{ TheNeutralElement}(H,\text{restrict}(P,H\times H)) = 1 \)proofThe neutral element of the group (denoted \(1\) in the group0 context) belongs to every subgroup.
lemma (in group0) group0_3_L5:
assumes A1: \( \text{IsAsubgroup}(H,P) \)
shows \( 1 \in H \)proofSubgroups are closed with respect to the group operation.
lemma (in group0) group0_3_L6:
assumes A1: \( \text{IsAsubgroup}(H,P) \) and A2: \( a\in H \), \( b\in H \)
shows \( a\cdot b \in H \)proofA preliminary lemma that we need to show that taking the inverse in the subgroup is the same as taking the inverse in the group.
lemma group0_3_L7A:
assumes A1: \( \text{IsAgroup}(G,f) \) and A2: \( \text{IsAsubgroup}(H,f) \) and A3: \( g = \text{restrict}(f,H\times H) \)
shows \( \text{GroupInv}(G,f) \cap H\times H = \text{GroupInv}(H,g) \)proofUsing the lemma above we can show the actual statement: taking the inverse in the subgroup is the same as taking the inverse in the group.
theorem (in group0) group0_3_T1:
assumes A1: \( \text{IsAsubgroup}(H,P) \) and A2: \( g = \text{restrict}(P,H\times H) \)
shows \( \text{GroupInv}(H,g) = \text{restrict}( \text{GroupInv}(G,P),H) \)proofA sligtly weaker, but more convenient in applications, reformulation of the above theorem.
theorem (in group0) group0_3_T2:
assumes \( \text{IsAsubgroup}(H,P) \) and \( g = \text{restrict}(P,H\times H) \)
shows \( \forall h\in H.\ \text{GroupInv}(H,g)(h) = h^{-1} \) using assms, group0_3_T1, restrict_ifSubgroups are closed with respect to taking the group inverse.
theorem (in group0) group0_3_T3A:
assumes A1: \( \text{IsAsubgroup}(H,P) \) and A2: \( h\in H \)
shows \( h^{-1}\in H \)proofThe next theorem states that a nonempty subset of a group \(G\) that is closed under the group operation and taking the inverse is a subgroup of the group.
theorem (in group0) group0_3_T3:
assumes A1: \( H\neq 0 \) and A2: \( H\subseteq G \) and A3: \( H \text{ is closed under } P \) and A4: \( \forall x\in H.\ x^{-1} \in H \)
shows \( \text{IsAsubgroup}(H,P) \)proofThe singleton with the neutral element is a subgroup.
corollary (in group0) unit_singl_subgr:
shows \( \text{IsAsubgroup}(\{1 \},P) \) using group0_2_L2, group_inv_of_one, group0_3_T3 unfolding IsOpClosed_defIntersection of subgroups is a subgroup. This lemma is obsolete and should be replaced by subgroup_inter.
lemma group0_3_L7:
assumes A1: \( \text{IsAgroup}(G,f) \) and A2: \( \text{IsAsubgroup}(H_1,f) \) and A3: \( \text{IsAsubgroup}(H_2,f) \)
shows \( \text{IsAsubgroup}(H_1\cap H_2,\text{restrict}(f,H_1\times H_1)) \)proofIntersection of subgroups is a subgroup.
lemma (in group0) subgroup_inter:
assumes \( \ \lt H>\neq 0 \) and \( \forall H\in \ \lt H>.\ \text{IsAsubgroup}(H,P) \)
shows \( \text{IsAsubgroup}(\bigcap \ \lt H>,P) \)proofThe range of the subgroup operation is the whole subgroup.
lemma image_subgr_op:
assumes A1: \( \text{IsAsubgroup}(H,P) \)
shows \( \text{restrict}(P,H\times H)(H\times H) = H \)proofIf we restrict the inverse to a subgroup, then the restricted inverse is onto the subgroup.
lemma (in group0) restr_inv_onto:
assumes A1: \( \text{IsAsubgroup}(H,P) \)
shows \( \text{restrict}( \text{GroupInv}(G,P),H)(H) = H \)proofA union of two subgroups is a subgroup iff one of the subgroups is a subset of the other subgroup.
lemma (in group0) union_subgroups:
assumes \( \text{IsAsubgroup}(H_1,P) \) and \( \text{IsAsubgroup}(H_2,P) \)
shows \( \text{IsAsubgroup}(H_1\cup H_2,P) \longleftrightarrow (H_1\subseteq H_2 \vee H_2\subseteq H_1) \)proofTransitivity for "is a subgroup of" relation. The proof (probably) uses the lemma restrict_restrict from standard Isabelle/ZF library which states that \( \text{restrict}(\text{restrict}(f,A),B) = \text{restrict}(f,A\cap B) \). That lemma is added to the simplifier, so it does not have to be referenced explicitly in the proof below.
lemma subgroup_transitive:
assumes \( \text{IsAgroup}(G_3,P) \), \( \text{IsAsubgroup}(G_2,P) \), \( \text{IsAsubgroup}(G_1,\text{restrict}(P,G_2\times G_2)) \)
shows \( \text{IsAsubgroup}(G_1,P) \)proofWe defined groups as monoids with the inverse operation. An alternative way of defining a group is as a loop whose operation is associative.
Groups have left and right division.
lemma (in group0) gr_has_lr_div:
shows \( Has\text{ LeftDiv}(G,P) \) and \( Has\text{ RightDiv}(G,P) \)proofA group is a quasigroup and a loop.
lemma (in group0) group_is_loop:
shows \( \text{IsAquasigroup}(G,P) \) and \( \text{IsAloop}(G,P) \)proofAn associative loop is a group.
theorem assoc_loop_is_gr:
assumes \( \text{IsAloop}(G,P) \) and \( P \text{ is associative on } G \)
shows \( \text{IsAgroup}(G,P) \)proofFor groups the left and right inverse are the same as the group inverse.
lemma (in group0) lr_inv_gr_inv:
shows \( \text{LeftInv}(G,P) = \text{GroupInv}(G,P) \) and \( \text{RightInv}(G,P) = \text{GroupInv}(G,P) \)proofThe group0 context defines notation for a product of a finite list of group elements. This sections shows basic properties of that notation.
The assumptions of the semigr0 context hold in the group0 context.
lemma (in group0) semigr0_valid_in_group0:
shows \( semigr0(G,P) \) using groupAssum, IsAgroup_def, IsAmonoid_def, semigr0_defSince semigroups do not have a neutral element the product operator in the semigr0 is defined for nonempty lists only as \( \text{Fold1}(f,a) \), where \(f\) is the semigroup operation and \(a\) is a (nonempty) list. This is a bit different from the product of a finite list in the group0 context. The next lemma helps in translating between these two notations by asserting that in the group0 context the sum of a finite list \(s\) is the same as \( \text{Fold1}(s_1) \) where \(s_1\) is the list \(s\) with the neutral element of the group prepended to it.
lemma (in group0) list_prod_as_fold1:
assumes \( n\in nat \), \( s:n\rightarrow G \)
shows \( (\prod s) = \text{Fold1}(P, \text{Prepend}(s,1 )) \) using assms, prepend_props, group0_2_L2, tail_prepend unfolding Fold1_defFor nonempty lists the product is the the same as Fold1 of the list with respect to the operation.
lemma (in group0) nempty_list_prod_as_fold1:
assumes \( n\in nat \), \( s:(n + 1)\rightarrow G \)
shows \( (\prod s) = \text{Fold1}(P,s) \) using assms, group_oper_fun, group0_2_L2, fold_detach_first, succ_add_one(6), apply_funtype unfolding Fold1_defThe product of a list is an element of the group.
lemma (in group0) list_prod_in_group:
assumes \( n\in nat \), \( s:n\rightarrow G \)
shows \( (\prod s) \in G \)proofProduct of a singleton list is its only element.
lemma (in group0) prod_singleton:
assumes \( s:1\rightarrow G \)
shows \( (\prod s) = s(0) \) using assms, nempty_list_prod_as_fold1, semigr0_valid_in_group0, prod_of_1elemThe group0 locale defines a notation for a natural power of a group element. The next lemma provides two alternative definitions for that notation: a natural power of a group element \(x\) is the product of the constant list \(n\{x\}\), i.e. the fold of the group operation starting from the neutral element of \(n\{x\}\). It's really the monoid_nat_mult_def_alt lemma from Monoid_ZF_1 theory, just written in the multiplicative notation used in the group0 context.
lemma (in group0) group_nat_pow_def_alt:
shows \( x^{n} = \prod n\times \{x\} \) and \( x^{n} = \text{Fold}(P,1 ,n\times \{x\}) \) using monoid_nat_mult_def_altassumes \( e = \text{ TheNeutralElement}(G,f) \)
shows \( e \in G \wedge (\forall g\in G.\ e \oplus g = g \wedge g \oplus e = g) \)assumes \( a\in G \), \( b\in G \)
shows \( a\oplus b \in G \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b \in G \)assumes \( a\in G \), \( b\in G \), \( c\in G \)
shows \( a\cdot (b\cdot c) = a\cdot b\cdot c \)assumes \( g\in G \) and \( b\in G \) and \( g\cdot b = 1 \)
shows \( b\cdot g = 1 \)assumes \( x\in G \)
shows \( \exists !y.\ y\in G \wedge x\cdot y = 1 \)assumes \( f \subseteq X\times Y \) and \( \forall x\in X.\ \exists !y.\ y\in Y \wedge \langle x,y\rangle \in f \)
shows \( f: X\rightarrow Y \)assumes \( f:X\rightarrow Y \)
shows \( f^{-1}(\{y\}) = \{x\in X.\ f(x) = y\} \)assumes \( \text{IsAgroup}(G,f) \)
shows \( \text{GroupInv}(G,f) : G\rightarrow G \)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 G \) and \( b\in G \) and \( a\cdot b = a \)
shows \( b=1 \)assumes \( a\in G \) and \( a^{-1} = 1 \)
shows \( a = 1 \)assumes \( a\in G \) and \( b\in G \) and \( a\cdot b = 1 \)
shows \( a = b^{-1} \) and \( b = a^{-1} \)assumes \( a\in G \) and \( b\in G \)
shows \( b^{-1}\cdot a^{-1} = (a\cdot b)^{-1} \)assumes \( a\in G \)
shows \( a = (a^{-1})^{-1} \)assumes \( f: X\rightarrow Y \), \( g: X\rightarrow Z \) and \( \forall x\in X.\ f(x) = g(x) \)
shows \( f = g \)assumes \( a \in \text{bij}(A,B) \), \( b \in \text{bij}(B,A) \) and \( b\circ a = id(A) \)
shows \( a = converse(b) \) and \( b = converse(a) \)assumes \( f:X\rightarrow Y \) and \( A\subseteq X \)
shows \( f(A) = \{f(x).\ x \in A\} \)assumes \( f:X\rightarrow Y \)
shows \( f(B) \subseteq \text{range}(f) \) and \( f(B) \subseteq Y \)assumes \( V\subseteq G \)
shows \( \text{GroupInv}(G,P)(V) \subseteq G \) and \( \text{GroupInv}(G,P)(V) = \{g^{-1}.\ g \in V\} \)assumes \( f \in \text{surj}(A,B) \)
shows \( f(A) = B \)assumes \( a\in G \), \( b\in G \), \( c\in G \)
shows \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot (a\cdot b)^{-1} \), \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot (b^{-1}\cdot a^{-1}) \), \( (a\cdot b\cdot c)^{-1} = c^{-1}\cdot b^{-1}\cdot a^{-1} \)assumes \( a\in G \), \( b\in G \)
shows \( (a\cdot b^{-1})^{-1} = b\cdot a^{-1} \), \( (a^{-1}\cdot b)^{-1} = b^{-1}\cdot a \)assumes \( a\in G \), \( b\in G \)
shows \( (a\cdot b^{-1})^{-1} = b\cdot a^{-1} \), \( (a^{-1}\cdot b)^{-1} = b^{-1}\cdot a \)assumes \( a\in G \), \( b\in G \), \( c\in G \)
shows \( a\cdot c^{-1}= (a\cdot b^{-1})\cdot (b\cdot c^{-1}) \), \( a^{-1}\cdot c = (a^{-1}\cdot b)\cdot (b^{-1}\cdot c) \), \( a\cdot (b\cdot c)^{-1} = a\cdot c^{-1}\cdot b^{-1} \), \( a\cdot (b\cdot c^{-1}) = a\cdot b\cdot c^{-1} \), \( (a\cdot b^{-1}\cdot c^{-1})^{-1} = c\cdot b\cdot a^{-1} \), \( a\cdot b\cdot c^{-1}\cdot (c\cdot b^{-1}) = a \), \( a\cdot (b\cdot c)\cdot c^{-1} = a\cdot b \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( f:X\rightarrow Y \)
shows \( \text{restrict}(f,X) = f \)assumes \( \text{IsAsubgroup}(H,f) \) and \( n = \text{ TheNeutralElement}(H,\text{restrict}(f,H\times H)) \)
shows \( n \in H \), \( \forall h\in H.\ \text{restrict}(f,H\times H)\langle n,h \rangle = h \), \( \forall h\in H.\ \text{restrict}(f,H\times H)\langle h,n\rangle = h \)assumes \( f:X\rightarrow Y \), \( x\in X \), \( y = f(x) \)
shows \( \langle x,y\rangle \in f \), \( y \in \text{range}(f) \)assumes \( \langle x,y\rangle \in f \) and \( f:X\rightarrow Y \)
shows \( x\in X \wedge y\in Y \)assumes \( \text{IsAsubgroup}(H,P) \)
shows \( H \subseteq G \)assumes \( \text{IsAsubgroup}(H,P) \)
shows \( \text{ TheNeutralElement}(H,\text{restrict}(P,H\times H)) = 1 \)assumes \( f:X\rightarrow Y \) and \( B\subseteq X \)
shows \( \text{restrict}(f,B)^{-1}(A) = f^{-1}(A) \cap B \)assumes \( \text{IsAgroup}(G,f) \) and \( \text{IsAsubgroup}(H,f) \) and \( g = \text{restrict}(f,H\times H) \)
shows \( \text{GroupInv}(G,f) \cap H\times H = \text{GroupInv}(H,g) \)assumes \( f:X\rightarrow Y \) and \( g:A\rightarrow Z \) and \( A\subseteq X \) and \( f \cap A\times Z = g \)
shows \( g = \text{restrict}(f,A) \)assumes \( \text{IsAsubgroup}(H,P) \) and \( g = \text{restrict}(P,H\times H) \)
shows \( \text{GroupInv}(H,g) = \text{restrict}( \text{GroupInv}(G,P),H) \)assumes \( \text{IsAsubgroup}(H,P) \) and \( g = \text{restrict}(P,H\times H) \)
shows \( \forall h\in H.\ \text{GroupInv}(H,g)(h) = h^{-1} \)assumes \( H \text{ is closed under } f \) and \( H\subseteq G \) and \( \text{ TheNeutralElement}(G,f) \in H \)
shows \( \text{IsAmonoid}(H,\text{restrict}(f,H\times H)) \)assumes \( \text{IsAmonoid}(G,f) \) and \( H \text{ is closed under } f \) and \( H\subseteq G \) and \( \text{ TheNeutralElement}(G,f) \in H \)
shows \( \text{ TheNeutralElement}(H,\text{restrict}(f,H\times H)) = \text{ TheNeutralElement}(G,f) \)assumes \( H\neq 0 \) and \( H\subseteq G \) and \( H \text{ is closed under } P \) and \( \forall x\in H.\ x^{-1} \in H \)
shows \( \text{IsAsubgroup}(H,P) \)assumes \( \text{IsAsubgroup}(H,P) \)
shows \( 1 \in H \)assumes \( \text{IsAsubgroup}(H,P) \) and \( a\in H \), \( b\in H \)
shows \( a\cdot b \in H \)assumes \( A \text{ is closed under } f \), \( B \text{ is closed under } f \)
shows \( A\cap B \text{ is closed under } f \)assumes \( A \text{ is closed under } f \) and \( A\subseteq B \)
shows \( A \text{ is closed under } \text{restrict}(f,B\times B) \)assumes \( \text{IsAsubgroup}(H,P) \) and \( h\in H \)
shows \( h^{-1}\in H \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a\cdot b = a\cdot c \)
shows \( b=c \)assumes \( a\in G \), \( b\in G \)
shows \( a\cdot b^{-1}\cdot b = a \), \( a\cdot b\cdot b^{-1} = a \), \( a^{-1}\cdot (a\cdot b) = b \), \( a\cdot (a^{-1}\cdot b) = b \)assumes \( a\in G \), \( b\in G \), \( c\in G \), \( a\cdot b = c\cdot b \)
shows \( a = c \)assumes \( \text{IsAloop}(G,A) \)
shows \( loop0(G,A) \)assumes \( x\in G \)
shows \( \text{LeftInv}(G,A)(x) \in G \), \( ( \text{LeftInv}(G,A)(x))\cdot x = 1 \), \( \text{RightInv}(G,A)(x) \in G \), \( x\cdot ( \text{RightInv}(G,A)(x)) = 1 \)assumes \( x\in G \)
shows \( \text{LeftInv}(G,A)(x) \in G \), \( ( \text{LeftInv}(G,A)(x))\cdot x = 1 \), \( \text{RightInv}(G,A)(x) \in G \), \( x\cdot ( \text{RightInv}(G,A)(x)) = 1 \)assumes \( a\in G \) and \( b\in G \) and \( a\cdot b = 1 \)
shows \( a = b^{-1} \) and \( b = a^{-1} \)assumes \( a\in G \) and \( b\in G \) and \( a\cdot b = 1 \)
shows \( a = b^{-1} \) and \( b = a^{-1} \)assumes \( n\in nat \), \( a:n\rightarrow X \), \( x\in X \)
shows \( \text{Prepend}(a,x):(n + 1)\rightarrow X \) and \( \text{Prepend}(a,x)(0) = x \)assumes \( n\in nat \), \( a:n\rightarrow X \), \( x\in X \)
shows \( \text{Tail}( \text{Prepend}(a,x)) = a \)assumes \( n \in nat \), \( f : X\times Y \rightarrow X \), \( y:succ(n)\rightarrow Y \), \( x\in X \)
shows \( \text{Fold}(f,x,y) = \text{Fold}(f,f\langle x,y(0)\rangle , \text{Tail}(y)) \)assumes \( n\in nat \)
shows \( n + 1 = succ(n) \), \( n + 1 \in nat \), \( \{0\} + n = succ(n) \), \( n + \{0\} = succ(n) \), \( succ(n) \in nat \), \( 0 \in n + 1 \), \( n \subseteq n + 1 \)assumes \( n \in nat \) and \( f : X\times Y \rightarrow X \), \( a:n \rightarrow Y \), \( x\in X \), \( Y\neq 0 \)
shows \( \text{Fold}(f,x,a) = \text{FoldSeq}(f,x,a)(n) \) and \( \text{Fold}(f,x,a) \in X \)assumes \( n\in nat \), \( s:(n + 1)\rightarrow G \)
shows \( (\prod s) = \text{Fold1}(P,s) \)assumes \( a: 1 \rightarrow G \)
shows \( (\prod a) = a(0) \)