Theory AbelianGroup_ZF

(* 
This file is a part of IsarMathLib - 
a library of formalized mathematics for Isabelle/Isar.

Copyright (C) 2005, 2006  Slawomir Kolodynski

This program is free software; Redistribution and use in source and binary forms, 
with or without modification, are permitted provided that the 
following conditions are met:

1. Redistributions of source code must retain the above copyright notice, 
   this list of conditions and the following disclaimer.
   2. Redistributions in binary form must reproduce the above copyright notice, 
   this list of conditions and the following disclaimer in the documentation and/or 
   other materials provided with the distribution.
   3. The name of the author may not be used to endorse or promote products 
   derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

*)

section Abelian Group

theory AbelianGroup_ZF imports Group_ZF

begin

textA group is called ``abelian`` if its operation is commutative, i.e.
  $P\langle a,b \rangle  = P\langle a,b \rangle$ for all group 
  elements $a,b$, where $P$ is the group operation. It is customary
  to use the additive notation for abelian groups, so this condition
  is typically written as $a+b = b+a$. We will be using multiplicative 
  notation though (in which the commutativity condition 
  of the operation is written as $a\cdot b = b\cdot a$), just to avoid
  the hassle of changing the notation we used for general groups. 


subsectionRearrangement formulae

textThis section is not interesting and should not be read.
  Here we will prove formulas is which right hand side uses the same
  factors as the left hand side, just in different order. These facts
  are obvious in informal math sense, but Isabelle prover is not able
  to derive them automatically, so we have to prove them by hand. 


textProving the facts about associative and commutative operations is 
  quite tedious in formalized mathematics. To a human the thing is simple:
  we can arrange the elements in any order and put parantheses wherever we 
  want, it is all the same. However, formalizing this statement would be 
  rather difficult (I think). The next lemma attempts a quasi-algorithmic
  approach to this type of problem. To prove that two expressions are equal, 
  we first strip one from parantheses, then rearrange the elements in proper 
  order, then put the parantheses where we want them to be. The algorithm for 
  rearrangement is easy to describe: we keep putting the first element 
  (from the right) that is in the wrong place at the left-most position
  until we get the proper arrangement. 
  As far removing parantheses is concerned Isabelle does its job 
  automatically.

lemma (in group0) group0_4_L2:
  assumes A1:"P {is commutative on} G"
  and A2:"aG" "bG" "cG" "dG" "EG" "FG"
  shows "(ab)(cd)(EF) = (a(dF))(b(cE))"
proof -
  from A2 have "(ab)(cd)(EF) = abcdEF"
    using group_op_closed group_oper_assoc
    by simp
  also have  "abcdEF = adFbcE"
  proof -
    from A1 A2 have "abcdEF = F(abcdE)"
      using IsCommutative_def group_op_closed 
      by simp
    also from A2 have "F(abcdE) = FabcdE"
      using group_op_closed group_oper_assoc
      by simp
    also from A1 A2 have "FabcdE = d(Fabc)E"
      using IsCommutative_def group_op_closed
      by simp
    also from A2 have "d(Fabc)E = dFabcE"
      using group_op_closed group_oper_assoc
      by simp
    also from A1 A2 have " dFabcE = a(dF)bcE"
      using IsCommutative_def group_op_closed
      by simp
    also from A2 have "a(dF)bcE = adFbcE" 
      using group_op_closed group_oper_assoc
      by simp
    finally show ?thesis by simp
  qed
  also from A2 have "adFbcE = (a(dF))(b(cE))"
    using group_op_closed group_oper_assoc
    by simp
  finally show ?thesis by simp
qed
  
textAnother useful rearrangement.

lemma (in group0) group0_4_L3:
  assumes A1:"P {is commutative on} G" 
  and A2: "aG"  "bG" and A3: "cG"  "dG"  "EG"  "FG"
  shows "ab((cd)¯(EF)¯) = (a(Ec)¯)(b(Fd)¯)"
proof -
  from A3 have T1:
    "c¯G" "d¯G" "E¯G" "F¯G" "(cd)¯G" "(EF)¯G"
    using inverse_in_group group_op_closed 
    by auto
  from A2 T1 have 
    "ab((cd)¯(EF)¯) = ab(cd)¯(EF)¯"
    using group_op_closed group_oper_assoc
    by simp
  also from A2 A3 have 
    "ab(cd)¯(EF)¯ = (ab)(d¯c¯)(F¯E¯)"
    using group_inv_of_two by simp
   also from A1 A2 T1 have 
    "(ab)(d¯c¯)(F¯E¯) = (a(c¯E¯))(b(d¯F¯))"
    using group0_4_L2 by simp
  also from A2 A3 have 
    "(a(c¯E¯))(b(d¯F¯)) = (a(Ec)¯)(b(Fd)¯)"
    using group_inv_of_two by simp
  finally show ?thesis by simp
qed

textSome useful rearrangements for two elements of a group.

lemma (in group0) group0_4_L4:
  assumes A1:"P {is commutative on} G"
  and A2: "aG" "bG"
  shows 
  "b¯a¯ = a¯b¯" 
  "(ab)¯ = a¯b¯" 
  "(ab¯)¯ = a¯b"
proof -
  from A2 have T1: "b¯G" "a¯G" using inverse_in_group by auto
  with A1 show "b¯a¯ = a¯b¯" using IsCommutative_def by simp
  with A2 show "(ab)¯ = a¯b¯" using group_inv_of_two by simp
  from A2 T1 have "(ab¯)¯ = (b¯)¯a¯" using group_inv_of_two by simp
  with A1 A2 T1 show "(ab¯)¯ = a¯b" 
    using group_inv_of_inv IsCommutative_def by simp
qed
 
textAnother bunch of useful rearrangements with three elements.

lemma (in group0) group0_4_L4A: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"
  shows 
  "abc = cab" 
  "a¯(b¯c¯)¯ = (a(bc)¯)¯" 
  "a(bc)¯ = ab¯c¯" 
  "a(bc¯)¯ = ab¯c" 
  "ab¯c¯ = ac¯b¯"
proof -
  from A1 A2 have "abc = c(ab)"
    using IsCommutative_def group_op_closed
    by simp
  with A2 show "abc = cab" using
     group_op_closed group_oper_assoc
    by simp
  from A2 have T: 
    "b¯G"  "c¯G"  "b¯c¯  G"  "ab  G"
    using inverse_in_group group_op_closed
    by auto
  with A1 A2 show "a¯(b¯c¯)¯ = (a(bc)¯)¯"
    using group_inv_of_two IsCommutative_def 
    by simp
  from A1 A2 T have "a(bc)¯ = a(b¯c¯)"
    using group_inv_of_two IsCommutative_def by simp
  with A2 T show "a(bc)¯ = ab¯c¯"
    using group_oper_assoc by simp
  from A1 A2 T have "a(bc¯)¯ = a(b¯(c¯)¯)"
    using group_inv_of_two IsCommutative_def by simp
  with A2 T show "a(bc¯)¯ = ab¯c"
    using group_oper_assoc group_inv_of_inv by simp
  from A1 A2 T have "ab¯c¯ = a(c¯b¯)"
    using group_oper_assoc IsCommutative_def by simp
  with A2 T show "ab¯c¯ = ac¯b¯"
    using group_oper_assoc by simp
qed

textAnother useful rearrangement.

lemma (in group0) group0_4_L4B: 
  assumes "P {is commutative on} G"
  and "aG"  "bG"  "cG"
  shows "ab¯(bc¯) = ac¯"  
  using assms inverse_in_group group_op_closed 
    group0_4_L4 group_oper_assoc inv_cancel_two by simp

textA couple of permutations of order for three alements.

lemma (in group0) group0_4_L4C: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG" "bG" "cG"
  shows
  "abc = cab"
  "abc = a(cb)"
  "abc = c(ab)"
  "abc = cba"
proof -
  from A1 A2 show I: "abc = cab"
    using group0_4_L4A by simp
  also from A1 A2 have "cab = acb"
    using IsCommutative_def by simp
  also from A2 have "acb = a(cb)"
    using group_oper_assoc by simp
  finally show "abc = a(cb)" by simp
  from A2 I show "abc = c(ab)"
    using group_oper_assoc by simp
  also from A1 A2 have "c(ab) = c(ba)"
    using IsCommutative_def by simp
  also from A2 have "c(ba) = cba"
    using group_oper_assoc by simp
  finally show "abc = cba" by simp
qed

textSome rearangement with three elements and inverse.

lemma (in group0) group0_4_L4D:
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"
  shows 
  "a¯b¯c = ca¯b¯"
  "b¯a¯c = ca¯b¯"
  "(a¯bc)¯ = ab¯c¯"
proof -
  from A2 have T: 
    "a¯  G"  "b¯  G"  "c¯G"
    using inverse_in_group by auto
  with A1 A2 show 
    "a¯b¯c = ca¯b¯"
    "b¯a¯c = ca¯b¯"
    using  group0_4_L4A by auto
  from A1 A2 T show "(a¯bc)¯ = ab¯c¯"
    using group_inv_of_three group_inv_of_inv group0_4_L4C
    by simp
qed

textAnother rearrangement lemma with three elements and equation.

lemma (in group0) group0_4_L5: assumes A1:"P {is commutative on} G" 
  and A2: "aG"  "bG"  "cG"
  and A3: "c = ab¯"
  shows "a = bc"
proof - 
  from A2 A3 have "c(b¯)¯ = a"
    using inverse_in_group group0_2_L18
    by simp
  with A1 A2 show ?thesis using 
     group_inv_of_inv IsCommutative_def by simp
qed

textIn abelian groups we can cancel an element with its inverse
  even if separated by another element.

lemma (in group0) group0_4_L6A: assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"
  shows 
  "aba¯ = b"
  "a¯ba = b"
  "a¯(ba) = b"
  "a(ba¯) = b"
proof -
  from A1 A2 have 
    "aba¯ = a¯ab"
    using inverse_in_group group0_4_L4A by blast
  also from A2 have " = b"
    using group0_2_L6 group0_2_L2 by simp
  finally show "aba¯ = b" by simp
  from A1 A2 have 
    "a¯ba = aa¯b"
    using inverse_in_group group0_4_L4A by blast
  also from A2 have " = b"
    using group0_2_L6 group0_2_L2 by simp
  finally show "a¯ba = b" by simp
  moreover from A2 have "a¯ba = a¯(ba)"
    using inverse_in_group group_oper_assoc by simp
  ultimately show "a¯(ba) = b" by simp
  from A1 A2 show "a(ba¯) = b"
     using inverse_in_group IsCommutative_def inv_cancel_two
     by simp
qed

textAnother lemma about cancelling with two elements.

lemma (in group0) group0_4_L6AA: 
  assumes A1: "P {is commutative on} G" and A2: "aG"  "bG"
  shows "ab¯a¯ = b¯"
  using assms inverse_in_group group0_4_L6A
  by auto

textAnother lemma about cancelling with two elements.

lemma (in group0) group0_4_L6AB: 
  assumes A1: "P {is commutative on} G" and A2: "aG"  "bG"
  shows 
  "a(ab)¯ = b¯"
  "a(ba¯) = b"
proof -
    from A2 have "a(ab)¯ = a(b¯a¯)"
      using group_inv_of_two by simp
    also from A2 have " = ab¯a¯"
      using inverse_in_group group_oper_assoc by simp
    also from A1 A2 have " =  b¯"
      using group0_4_L6AA by simp
    finally show "a(ab)¯ = b¯" by simp
    from A1 A2 have "a(ba¯) = a(a¯b)"
      using inverse_in_group IsCommutative_def by simp
    also from A2 have " = b"
      using inverse_in_group group_oper_assoc group0_2_L6 group0_2_L2
      by simp
    finally show "a(ba¯) = b" by simp
qed

textAnother lemma about cancelling with two elements.

lemma (in group0) group0_4_L6AC: 
  assumes "P {is commutative on} G" and "aG"  "bG"
  shows "a(ab¯)¯ = b"
  using assms inverse_in_group group0_4_L6AB group_inv_of_inv
  by simp


textIn abelian groups we can cancel an element with its inverse
  even if separated by two other elements.

lemma (in group0) group0_4_L6B: assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG" 
  shows 
  "abca¯ = bc"
  "a¯bca = bc"
proof -
   from A2 have 
     "abca¯ = a(bc)a¯"
     "a¯bca = a¯(bc)a"
    using group_op_closed group_oper_assoc inverse_in_group
    by auto
  with A1 A2 show
    "abca¯ = bc"
    "a¯bca = bc"
    using group_op_closed group0_4_L6A
    by auto
qed

textIn abelian groups we can cancel an element with its inverse
  even if separated by three other elements.

lemma (in group0) group0_4_L6C: assumes A1: "P {is commutative on} G"
  and A2: "aG" "bG" "cG" "dG"
  shows "abcda¯ = bcd" 
proof -
  from A2 have "abcda¯ = a(bcd)a¯"
    using group_op_closed group_oper_assoc
    by simp
  with A1 A2 show ?thesis 
    using group_op_closed group0_4_L6A 
    by simp
qed

textAnother couple of useful rearrangements of three elements
  and cancelling.

lemma (in group0) group0_4_L6D: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"
  shows 
  "ab¯(ac¯)¯ = cb¯"
  "(ac)¯(bc) = a¯b"
  "a(b(ca¯b¯)) = c"
  "abc¯(ca¯) = b"
proof -
  from A2 have T: 
    "a¯  G"  "b¯  G"  "c¯  G" 
    "ab  G"  "ab¯  G"  "c¯a¯  G"  "ca¯  G"
    using inverse_in_group group_op_closed by auto
  with A1 A2 show "ab¯(ac¯)¯ = cb¯"
    using group0_2_L12 group_oper_assoc group0_4_L6B
    IsCommutative_def by simp
  from A2 T have "(ac)¯(bc) = c¯a¯bc"
    using group_inv_of_two group_oper_assoc by simp
  also from A1 A2 T have " = a¯b"
    using group0_4_L6B by simp
  finally show "(ac)¯(bc) = a¯b"
    by simp
  from A1 A2 T show "a(b(ca¯b¯)) = c"
    using group_oper_assoc group0_4_L6B group0_4_L6A
    by simp
  from T have "abc¯(ca¯) = ab(c¯(ca¯))"
    using group_oper_assoc by simp
  also from A1 A2 T have " = b"
    using group_oper_assoc group0_2_L6 group0_2_L2 group0_4_L6A
    by simp
  finally show "abc¯(ca¯) = b" by simp
qed

textAnother useful rearrangement of three elements
  and cancelling.

lemma (in group0) group0_4_L6E: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"
  shows 
  "ab(ac)¯ = bc¯"
proof -
  from A2 have T: "b¯  G"  "c¯  G"
    using inverse_in_group by auto
  with A1 A2 have
    "a(b¯)¯(a(c¯)¯)¯ = c¯(b¯)¯"
    using group0_4_L6D by simp
  with A1 A2 T show "ab(ac)¯ = bc¯"
    using group_inv_of_inv IsCommutative_def
    by simp
qed

textA rearrangement with two elements and canceelling,
  special case of group0_4_L6D› when $c=b^{-1}$.

lemma (in group0) group0_4_L6F: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"
  shows "ab¯(ab)¯ = b¯b¯"
proof -
  from A2 have "b¯  G" 
    using inverse_in_group by simp
  with A1 A2 have "ab¯(a(b¯)¯)¯ = b¯b¯"
    using group0_4_L6D by simp
  with A2 show "ab¯(ab)¯ = b¯b¯"
    using group_inv_of_inv by simp
qed

textSome other rearrangements with four elements.
  The algorithm for proof as in group0_4_L2›
  works very well here.

lemma (in group0) rearr_ab_gr_4_elemA:
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  shows 
  "abcd = adbc"
  "abcd = ac(bd)"
proof -
  from A1 A2 have "abcd = d(abc)"
    using  IsCommutative_def group_op_closed
    by simp
  also from A2 have " = dabc"
    using group_op_closed group_oper_assoc
    by simp
  also from A1 A2 have " = adbc"
    using IsCommutative_def group_op_closed
    by simp
  finally show "abcd = adbc"
    by simp
  from A1 A2 have "abcd = c(ab)d"
    using IsCommutative_def group_op_closed
    by simp
  also from A2 have " = cabd"
    using group_op_closed group_oper_assoc
    by simp
  also from A1 A2 have " = acbd"
    using IsCommutative_def group_op_closed
    by simp
  also from A2 have " = ac(bd)"
    using group_op_closed group_oper_assoc
    by simp
  finally show "abcd = ac(bd)"
    by simp
qed

textSome rearrangements with four elements and inverse
  that are applications of rearr_ab_gr_4_elem› 


lemma (in group0) rearr_ab_gr_4_elemB:
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  shows 
  "ab¯c¯d¯ = ad¯b¯c¯"
  "abcd¯ = ad¯bc"
  "abc¯d¯ =  ac¯(bd¯)"
proof -
  from A2 have T: "b¯  G"  "c¯  G"  "d¯  G"
    using inverse_in_group by auto
  with A1 A2 show 
    "ab¯c¯d¯ = ad¯b¯c¯"
    "abcd¯ = ad¯bc"
    "abc¯d¯ =  ac¯(bd¯)"
    using rearr_ab_gr_4_elemA by auto
qed
  
textSome rearrangement lemmas with four elements.
 
lemma (in group0) group0_4_L7: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  shows 
  "abcd¯ = ad¯ bc" 
  "ad(bd(cd))¯ = a(bc)¯d¯"
  "a(bc)d = abdc"
proof -
  from A2 have T:
    "bc  G" "d¯  G" "b¯G" "c¯G" 
    "d¯b  G" "c¯d  G" "(bc)¯  G"
    "bd  G"  "bdc  G"  "(bdc)¯  G"
    "ad  G"  "bc  G"
    using group_op_closed inverse_in_group 
    by auto
  with A1 A2 have "abcd¯ = a(d¯bc)"
    using group_oper_assoc group0_4_L4A by simp
  also from A2 T have "a(d¯bc) = ad¯bc"
    using group_oper_assoc by simp 
  finally show "abcd¯ = ad¯ bc" by simp
  from A2 T have "ad(bd(cd))¯ = ad(d¯(bdc)¯)"
    using group_oper_assoc group_inv_of_two by simp
  also from A2 T have " = a(bdc)¯"
    using group_oper_assoc inv_cancel_two by simp
  also from A1 A2 have " =  a(d(bc))¯"
    using IsCommutative_def group_oper_assoc by simp
  also from A2 T have " = a((bc)¯d¯)"
    using group_inv_of_two by simp
  also from A2 T have " =  a(bc)¯d¯"
    using group_oper_assoc by simp
  finally show "ad(bd(cd))¯ = a(bc)¯d¯"
    by simp
  from A2 have "a(bc)d = a(b(cd))"
    using group_op_closed group_oper_assoc by simp
  also from A1 A2 have " =  a(b(dc))"
    using IsCommutative_def group_op_closed by simp
  also from A2 have " =  abdc"
    using group_op_closed group_oper_assoc by simp
  finally show "a(bc)d = abdc" by simp
qed

textSome other rearrangements with four elements.

lemma (in group0) group0_4_L8: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  shows 
  "a(bc)¯ = (ad¯c¯)(db¯)"
  "ab(cd) = ca(bd)"
  "ab(cd) = ac(bd)"
  "a(bc¯)d = abdc¯"
  "(ab)(cd)¯(bd¯)¯ = ac¯"
proof -
  from A2 have T:
    "bc  G" "ab  G" "d¯  G" "b¯G" "c¯G" 
    "d¯b  G" "c¯d  G" "(bc)¯  G"
    "ab  G"  "(cd)¯  G"  "(bd¯)¯  G"  "db¯  G"
    using group_op_closed inverse_in_group 
    by auto
  from A2 have "a(bc)¯ = ac¯b¯" using group0_2_L14A by blast
  moreover from A2 have "ac¯ = (ad¯)(dc¯)" using group0_2_L14A
    by blast
  ultimately have "a(bc)¯ = (ad¯)(dc¯)b¯" by simp
  with A1 A2 T have "a(bc)¯= ad¯(c¯d)b¯"
    using IsCommutative_def by simp
  with A2 T show "a(bc)¯ = (ad¯c¯)(db¯)"
    using group_op_closed group_oper_assoc by simp
  from A2 T have "ab(cd) = abcd"
    using group_oper_assoc by simp
  also have "abcd = cabd"
  proof -
    from A1 A2 have "abcd = c(ab)d"
      using IsCommutative_def group_op_closed
      by simp
    also from A2 have " = cabd"
      using group_op_closed group_oper_assoc
      by simp
    finally show ?thesis by simp
  qed
  also from A2 have "cabd =  ca(bd)"
    using group_op_closed group_oper_assoc
    by simp
  finally show "ab(cd) = ca(bd)" by simp
  with A1 A2 show "ab(cd) = ac(bd)"
    using IsCommutative_def by simp
  from A1 A2 T show "a(bc¯)d = abdc¯"
    using group0_4_L7 by simp
  from T have "(ab)(cd)¯(bd¯)¯ = (ab)((cd)¯(bd¯)¯)"
    using group_oper_assoc by simp
  also from A1 A2 T have " = (ab)(c¯d¯(db¯))"
    using group_inv_of_two group0_2_L12 IsCommutative_def
    by simp
  also from T have " = (ab)(c¯(d¯(db¯)))"
    using group_oper_assoc by simp
  also from A1 A2 T have " = ac¯"
    using group_oper_assoc group0_2_L6 group0_2_L2 IsCommutative_def
    inv_cancel_two by simp
  finally show "(ab)(cd)¯(bd¯)¯ = ac¯"
    by simp
qed


textSome other rearrangements with four elements.

lemma (in group0) group0_4_L8A: 
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  shows 
  "ab¯(cd¯) = ac(b¯d¯)"
  "ab¯(cd¯) = acb¯d¯"
proof -
  from A2 have 
    T: "aG"  "b¯  G"  "cG"  "d¯  G"
    using inverse_in_group by auto
  with A1 show "ab¯(cd¯) = ac(b¯d¯)"
    by (rule group0_4_L8)
  with A2 T show  "ab¯(cd¯) = acb¯d¯"
    using group_op_closed group_oper_assoc
    by simp
qed

textSome rearrangements with an equation.

lemma (in group0) group0_4_L9:
  assumes A1: "P {is commutative on} G"
  and A2: "aG"  "bG"  "cG"  "dG"
  and A3: "a = bc¯d¯"
  shows 
  "d = ba¯c¯"
  "d = a¯bc¯"
  "b = adc"
proof -
  from A2 have T: 
    "a¯  G"  "c¯  G"  "d¯  G"  "bc¯  G"
    using group_op_closed inverse_in_group 
    by auto
  with A2 A3 have "a(d¯)¯ =  bc¯"
    using group0_2_L18 by simp
  with A2 have "bc¯ = ad"
    using group_inv_of_inv by simp
  with A2 T have I: "a¯(bc¯) = d"
    using group0_2_L18 by simp
  with A1 A2 T show 
    "d = ba¯c¯"
    "d = a¯bc¯"
    using group_oper_assoc IsCommutative_def by auto
  from A3 have "adc = (bc¯d¯)dc" by simp
  also from A2 T have " = bc¯(d¯d)c"
    using group_oper_assoc by simp
  also from A2 T have " =  bc¯c"
    using group0_2_L6 group0_2_L2 by simp
  also from A2 T have " =  b(c¯c)"
    using group_oper_assoc by simp
  also from A2 have " = b"
    using group0_2_L6 group0_2_L2 by simp
  finally have "adc = b" by simp
  thus "b = adc" by simp
qed

end