Advertisement
Guest User

loopassoc.g

a guest
Jan 16th, 2020
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.09 KB | None | 0 0
  1. # save this as loopassoc.g
  2.  
  3. # to use this in gap, type Read("loopassoc.g");
  4.  
  5. # load the loops package:
  6. LoadPackage("Loops");
  7.  
  8. # The octonion loop is MoufangLoop(16,3)
  9.  
  10. # Here is a list of the numbers we can use to get Moufang loops out of the library:
  11. moufangloopnums := Immutable([[12,1],[16,5],[20,1],[24,5],[28,1],[32,71],[36,4],[40,5],[42,1],[44,1],[48,51],[52,1],[54,2],[56,4],[60,5],[64,4262],[81,5],[243,72]]);
  12.  
  13. # LeftBolLoop(n,m) is the mth Bol loop of order n
  14. bolloopnums := Immutable([[8,1],[12,1],[15,1],[16,2038]]);
  15.  
  16. AssocProb := function(loop)
  17. local total,i,j,k;
  18. total := 0;
  19. for i in Elements(loop) do
  20. for j in Elements(loop) do
  21. for k in Elements(loop) do
  22. if Associator(i,j,k) = One(loop) then
  23. total := total + 1;
  24. fi;
  25. od;
  26. od;
  27. od;
  28. return total / (Length(Elements(loop))^3);
  29. end;
  30.  
  31. TryMoufangLoops := function()
  32. local loopType, i, probNotExceeded, currentProb;
  33. probNotExceeded := true;
  34. for loopType in moufangloopnums do
  35. for i in [1..loopType[2]] do
  36. currentProb := AssocProb(MoufangLoop(loopType[1],i));
  37. if currentProb > 43/64 then
  38. Print("Moufang loop ", loopType[1], ", ", i, " has association probability ", currentProb, "\n");
  39. probNotExceeded := false;
  40. fi;
  41. od;
  42. od;
  43. if probNotExceeded then
  44. Print("Octonion probability not exceeded in Moufang loops.");
  45. fi;
  46. end;
  47.  
  48. TryLeftBolLoops := function()
  49. local loopType, i, probNotExceeded, currentProb;
  50. probNotExceeded := true;
  51. for loopType in bolloopnums do
  52. for i in [1..loopType[2]] do
  53. currentProb := AssocProb(LeftBolLoop(loopType[1],i));
  54. if currentProb > 43/64 then
  55. Print("Left Bol loop ", loopType[1], ", ", i, " has association probability ", currentProb, "\n");
  56. probNotExceeded := false;
  57. fi;
  58. od;
  59. od;
  60. if probNotExceeded then
  61. Print("Octonion probability not exceeded in left Bol loops.");
  62. fi;
  63. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement