mathematicskit 0.2.0__tar.gz → 0.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (475) hide show
  1. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/PKG-INFO +1 -1
  2. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/__init__.py +1 -1
  3. mathematicskit-0.2.1/mathematicskit/abstract_algebra/__init__.py +94 -0
  4. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/core/base.py +47 -1
  5. mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/__init__.py +60 -0
  6. mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/actions.py +92 -0
  7. mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/codes.py +103 -0
  8. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/systems/finite_fields.py +10 -1
  9. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/systems/groups.py +110 -1
  10. mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/homomorphisms.py +117 -0
  11. mathematicskit-0.2.1/mathematicskit/abstract_algebra/systems/structure.py +399 -0
  12. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/systems/subgroups.py +55 -42
  13. mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_actions.py +39 -0
  14. mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_codes.py +39 -0
  15. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/test_finite_fields.py +17 -0
  16. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/test_groups.py +39 -0
  17. mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_homomorphisms.py +39 -0
  18. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/test_polynomial_ring.py +13 -0
  19. mathematicskit-0.2.1/mathematicskit/abstract_algebra/tests/test_structure.py +105 -0
  20. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/test_subgroups.py +35 -0
  21. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/__init__.py +37 -7
  22. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/core/base.py +15 -1
  23. mathematicskit-0.2.1/mathematicskit/calculus/systems/__init__.py +54 -0
  24. mathematicskit-0.2.1/mathematicskit/calculus/systems/exhaustion.py +59 -0
  25. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/systems/finite_differences.py +37 -1
  26. mathematicskit-0.2.1/mathematicskit/calculus/systems/quadrature.py +460 -0
  27. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/systems/taylor_series.py +47 -19
  28. mathematicskit-0.2.1/mathematicskit/calculus/tests/test_exhaustion.py +38 -0
  29. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_finite_differences.py +20 -0
  30. mathematicskit-0.2.1/mathematicskit/calculus/tests/test_quadrature_rules.py +90 -0
  31. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_taylor_series.py +14 -7
  32. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/__init__.py +38 -2
  33. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/core/base.py +15 -1
  34. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/__init__.py +60 -0
  35. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/designs.py +114 -0
  36. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/extremal.py +124 -0
  37. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/matching.py +85 -0
  38. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/necklaces.py +71 -0
  39. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/sequences.py +149 -0
  40. mathematicskit-0.2.1/mathematicskit/combinatorics/systems/trees.py +116 -0
  41. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_designs.py +36 -0
  42. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_extremal.py +63 -0
  43. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_matching.py +30 -0
  44. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_necklaces.py +23 -0
  45. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_sequences.py +50 -0
  46. mathematicskit-0.2.1/mathematicskit/combinatorics/tests/test_trees.py +24 -0
  47. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/__init__.py +19 -2
  48. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/__init__.py +14 -0
  49. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/box_counting.py +6 -4
  50. mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/curves.py +229 -0
  51. mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/dla.py +89 -0
  52. mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/lsystems.py +101 -0
  53. mathematicskit-0.2.1/mathematicskit/fractals_chaos/systems/maps.py +49 -0
  54. mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_curves.py +76 -0
  55. mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_lsystems.py +35 -0
  56. mathematicskit-0.2.1/mathematicskit/fractals_chaos/tests/test_maps_and_dla.py +49 -0
  57. mathematicskit-0.2.1/mathematicskit/geometry/__init__.py +82 -0
  58. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/core/base.py +81 -1
  59. mathematicskit-0.2.1/mathematicskit/geometry/systems/__init__.py +39 -0
  60. mathematicskit-0.2.1/mathematicskit/geometry/systems/bezier.py +65 -0
  61. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/systems/convex_hull.py +8 -3
  62. mathematicskit-0.2.1/mathematicskit/geometry/systems/distances.py +38 -0
  63. mathematicskit-0.2.1/mathematicskit/geometry/systems/enclosing.py +82 -0
  64. mathematicskit-0.2.1/mathematicskit/geometry/systems/polygon.py +154 -0
  65. mathematicskit-0.2.1/mathematicskit/geometry/systems/polyhedra.py +56 -0
  66. mathematicskit-0.2.1/mathematicskit/geometry/systems/proximity.py +82 -0
  67. mathematicskit-0.2.1/mathematicskit/geometry/systems/simplification.py +64 -0
  68. mathematicskit-0.2.1/mathematicskit/geometry/systems/surfaces.py +146 -0
  69. mathematicskit-0.2.1/mathematicskit/geometry/tests/test_algorithms.py +93 -0
  70. mathematicskit-0.2.1/mathematicskit/geometry/tests/test_measurement.py +70 -0
  71. mathematicskit-0.2.1/mathematicskit/geometry/tests/test_surfaces.py +45 -0
  72. mathematicskit-0.2.1/mathematicskit/graph_theory/__init__.py +99 -0
  73. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/core/base.py +94 -3
  74. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/__init__.py +38 -0
  75. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/assignment.py +44 -0
  76. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/systems/coloring.py +6 -1
  77. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/components.py +62 -0
  78. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/enumeration.py +49 -0
  79. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/extremal.py +101 -0
  80. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/hamiltonian.py +67 -0
  81. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/matching.py +83 -0
  82. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/systems/max_flow.py +10 -0
  83. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/ranking.py +68 -0
  84. mathematicskit-0.2.1/mathematicskit/graph_theory/systems/search.py +75 -0
  85. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_coloring.py +9 -0
  86. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_max_flow.py +19 -0
  87. mathematicskit-0.2.1/mathematicskit/graph_theory/tests/test_new_algorithms.py +174 -0
  88. mathematicskit-0.2.1/mathematicskit/graph_theory/utils/__init__.py +21 -0
  89. mathematicskit-0.2.1/mathematicskit/graph_theory/utils/generators.py +197 -0
  90. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/__init__.py +32 -0
  91. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/core/base.py +75 -9
  92. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/__init__.py +21 -0
  93. mathematicskit-0.2.1/mathematicskit/linalg/systems/cramer.py +68 -0
  94. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/eigen.py +2 -0
  95. mathematicskit-0.2.1/mathematicskit/linalg/systems/gershgorin.py +59 -0
  96. mathematicskit-0.2.1/mathematicskit/linalg/systems/lanczos.py +73 -0
  97. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/lu.py +14 -2
  98. mathematicskit-0.2.1/mathematicskit/linalg/systems/matrix_polynomial.py +84 -0
  99. mathematicskit-0.2.1/mathematicskit/linalg/systems/pseudoinverse.py +91 -0
  100. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/qr.py +10 -4
  101. mathematicskit-0.2.1/mathematicskit/linalg/systems/schur.py +78 -0
  102. mathematicskit-0.2.1/mathematicskit/linalg/systems/stationary.py +224 -0
  103. mathematicskit-0.2.1/mathematicskit/linalg/tests/test_classical.py +105 -0
  104. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_lu.py +22 -1
  105. mathematicskit-0.2.1/mathematicskit/linalg/tests/test_stationary_and_spectral.py +106 -0
  106. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/__init__.py +26 -3
  107. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/core/base.py +39 -7
  108. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/__init__.py +17 -1
  109. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/continued_fractions.py +42 -11
  110. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/diophantine.py +8 -0
  111. mathematicskit-0.2.1/mathematicskit/number_theory/systems/factorization.py +74 -0
  112. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/primality.py +57 -6
  113. mathematicskit-0.2.1/mathematicskit/number_theory/systems/prime_distribution.py +109 -0
  114. mathematicskit-0.2.1/mathematicskit/number_theory/systems/quadratic_residues.py +143 -0
  115. mathematicskit-0.2.1/mathematicskit/number_theory/systems/sums_of_squares.py +104 -0
  116. mathematicskit-0.2.1/mathematicskit/number_theory/systems/zeta.py +58 -0
  117. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_continued_fractions.py +32 -0
  118. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_diophantine.py +11 -0
  119. mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_factorization.py +48 -0
  120. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_primality.py +31 -0
  121. mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_prime_distribution.py +50 -0
  122. mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_quadratic_residues.py +66 -0
  123. mathematicskit-0.2.1/mathematicskit/number_theory/tests/test_sums_of_squares.py +53 -0
  124. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/__init__.py +26 -5
  125. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/core/base.py +43 -0
  126. mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/__init__.py +37 -0
  127. mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/acceleration.py +57 -0
  128. mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/approximation.py +265 -0
  129. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/systems/interpolation.py +67 -2
  130. mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/polynomials.py +141 -0
  131. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/systems/regression.py +4 -1
  132. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/systems/root_finding.py +155 -6
  133. mathematicskit-0.2.1/mathematicskit/numerical_analysis/systems/summation.py +68 -0
  134. mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_acceleration.py +31 -0
  135. mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_approximation.py +98 -0
  136. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_interpolation.py +33 -1
  137. mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_polynomials.py +71 -0
  138. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_root_finding.py +50 -1
  139. mathematicskit-0.2.1/mathematicskit/numerical_analysis/tests/test_summation.py +38 -0
  140. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/utils/error_analysis.py +6 -4
  141. mathematicskit-0.2.1/mathematicskit/ode_dynamics/__init__.py +77 -0
  142. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/core/base.py +38 -2
  143. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/__init__.py +58 -0
  144. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/chaotic_flows.py +186 -0
  145. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/chemical_oscillators.py +97 -0
  146. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/epidemics.py +156 -0
  147. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/excitable.py +133 -0
  148. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/limit_cycles.py +55 -3
  149. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/population.py +186 -0
  150. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/stability.py +88 -13
  151. mathematicskit-0.2.1/mathematicskit/ode_dynamics/systems/synchronization.py +149 -0
  152. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_chaotic_flows.py +59 -0
  153. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_chemical_oscillators.py +30 -0
  154. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_epidemics.py +43 -0
  155. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_excitable.py +37 -0
  156. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_limit_cycles.py +13 -1
  157. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_population.py +53 -0
  158. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_stability.py +24 -1
  159. mathematicskit-0.2.1/mathematicskit/ode_dynamics/tests/test_synchronization.py +48 -0
  160. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/__init__.py +39 -3
  161. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/core/base.py +91 -1
  162. mathematicskit-0.2.1/mathematicskit/optimization/systems/__init__.py +37 -0
  163. mathematicskit-0.2.1/mathematicskit/optimization/systems/direct_search.py +77 -0
  164. mathematicskit-0.2.1/mathematicskit/optimization/systems/dynamic_programming.py +72 -0
  165. mathematicskit-0.2.1/mathematicskit/optimization/systems/frank_wolfe.py +103 -0
  166. mathematicskit-0.2.1/mathematicskit/optimization/systems/game_theory.py +80 -0
  167. mathematicskit-0.2.1/mathematicskit/optimization/systems/least_squares.py +76 -0
  168. mathematicskit-0.2.1/mathematicskit/optimization/systems/linear_programming.py +131 -0
  169. mathematicskit-0.2.1/mathematicskit/optimization/systems/momentum.py +152 -0
  170. mathematicskit-0.2.1/mathematicskit/optimization/systems/scalar_search.py +78 -0
  171. mathematicskit-0.2.1/mathematicskit/optimization/systems/stochastic.py +81 -0
  172. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_direct_search.py +28 -0
  173. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_dynamic_programming.py +45 -0
  174. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_frank_wolfe.py +45 -0
  175. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_game_theory.py +42 -0
  176. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_least_squares.py +40 -0
  177. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_linear_programming.py +71 -0
  178. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_momentum.py +61 -0
  179. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_scalar_search.py +38 -0
  180. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_stochastic.py +30 -0
  181. mathematicskit-0.2.1/mathematicskit/optimization/tests/test_test_functions.py +69 -0
  182. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/utils/test_functions.py +22 -3
  183. mathematicskit-0.2.1/mathematicskit/probability/__init__.py +83 -0
  184. mathematicskit-0.2.1/mathematicskit/probability/core/__init__.py +21 -0
  185. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/core/base.py +64 -1
  186. mathematicskit-0.2.1/mathematicskit/probability/systems/__init__.py +48 -0
  187. mathematicskit-0.2.1/mathematicskit/probability/systems/bayes.py +80 -0
  188. mathematicskit-0.2.1/mathematicskit/probability/systems/branching.py +111 -0
  189. mathematicskit-0.2.1/mathematicskit/probability/systems/buffon.py +73 -0
  190. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/systems/continuous.py +38 -2
  191. mathematicskit-0.2.1/mathematicskit/probability/systems/continuous_time_markov.py +81 -0
  192. mathematicskit-0.2.1/mathematicskit/probability/systems/inequalities.py +57 -0
  193. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/systems/markov_chain.py +11 -3
  194. mathematicskit-0.2.1/mathematicskit/probability/systems/queueing.py +52 -0
  195. mathematicskit-0.2.1/mathematicskit/probability/systems/st_petersburg.py +79 -0
  196. mathematicskit-0.2.1/mathematicskit/probability/systems/stochastic_processes.py +158 -0
  197. mathematicskit-0.2.1/mathematicskit/probability/tests/test_classical_problems.py +90 -0
  198. mathematicskit-0.2.1/mathematicskit/probability/tests/test_stochastic_processes.py +113 -0
  199. mathematicskit-0.2.1/mathematicskit/special_functions/__init__.py +77 -0
  200. mathematicskit-0.2.1/mathematicskit/special_functions/core/base.py +81 -0
  201. mathematicskit-0.2.1/mathematicskit/special_functions/systems/__init__.py +53 -0
  202. mathematicskit-0.2.1/mathematicskit/special_functions/systems/airy.py +46 -0
  203. mathematicskit-0.2.1/mathematicskit/special_functions/systems/elliptic.py +132 -0
  204. mathematicskit-0.2.1/mathematicskit/special_functions/systems/error_functions.py +93 -0
  205. mathematicskit-0.2.1/mathematicskit/special_functions/systems/gamma_beta.py +160 -0
  206. mathematicskit-0.2.1/mathematicskit/special_functions/systems/hypergeometric.py +80 -0
  207. mathematicskit-0.2.1/mathematicskit/special_functions/systems/lambert_w.py +56 -0
  208. mathematicskit-0.2.1/mathematicskit/special_functions/systems/mathieu.py +122 -0
  209. mathematicskit-0.2.1/mathematicskit/special_functions/systems/zeta.py +85 -0
  210. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_airy.py +49 -0
  211. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_elliptic.py +74 -0
  212. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_error_functions.py +65 -0
  213. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/test_gamma_beta.py +29 -0
  214. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_hypergeometric.py +66 -0
  215. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_lambert_w.py +47 -0
  216. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_mathieu.py +56 -0
  217. mathematicskit-0.2.1/mathematicskit/special_functions/tests/test_zeta.py +44 -0
  218. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/__init__.py +40 -3
  219. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/core/base.py +121 -0
  220. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/__init__.py +20 -1
  221. mathematicskit-0.2.1/mathematicskit/statistics/systems/correlation.py +99 -0
  222. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/hypothesis_tests.py +10 -2
  223. mathematicskit-0.2.1/mathematicskit/statistics/systems/jackknife.py +62 -0
  224. mathematicskit-0.2.1/mathematicskit/statistics/systems/likelihood.py +95 -0
  225. mathematicskit-0.2.1/mathematicskit/statistics/systems/multiple_testing.py +86 -0
  226. mathematicskit-0.2.1/mathematicskit/statistics/systems/nonparametric.py +167 -0
  227. mathematicskit-0.2.1/mathematicskit/statistics/systems/shrinkage.py +64 -0
  228. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_correlation.py +45 -0
  229. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_jackknife.py +28 -0
  230. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_likelihood.py +58 -0
  231. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_multiple_testing.py +43 -0
  232. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_nonparametric.py +74 -0
  233. mathematicskit-0.2.1/mathematicskit/statistics/tests/test_shrinkage.py +36 -0
  234. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/PKG-INFO +1 -1
  235. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/SOURCES.txt +140 -0
  236. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/pyproject.toml +1 -1
  237. mathematicskit-0.2.0/mathematicskit/abstract_algebra/__init__.py +0 -43
  238. mathematicskit-0.2.0/mathematicskit/abstract_algebra/systems/__init__.py +0 -23
  239. mathematicskit-0.2.0/mathematicskit/calculus/systems/__init__.py +0 -27
  240. mathematicskit-0.2.0/mathematicskit/calculus/systems/quadrature.py +0 -184
  241. mathematicskit-0.2.0/mathematicskit/combinatorics/systems/__init__.py +0 -29
  242. mathematicskit-0.2.0/mathematicskit/geometry/__init__.py +0 -42
  243. mathematicskit-0.2.0/mathematicskit/geometry/systems/__init__.py +0 -19
  244. mathematicskit-0.2.0/mathematicskit/geometry/systems/polygon.py +0 -73
  245. mathematicskit-0.2.0/mathematicskit/graph_theory/__init__.py +0 -47
  246. mathematicskit-0.2.0/mathematicskit/graph_theory/systems/__init__.py +0 -19
  247. mathematicskit-0.2.0/mathematicskit/graph_theory/utils/__init__.py +0 -5
  248. mathematicskit-0.2.0/mathematicskit/graph_theory/utils/generators.py +0 -111
  249. mathematicskit-0.2.0/mathematicskit/numerical_analysis/systems/__init__.py +0 -22
  250. mathematicskit-0.2.0/mathematicskit/ode_dynamics/__init__.py +0 -44
  251. mathematicskit-0.2.0/mathematicskit/ode_dynamics/systems/__init__.py +0 -30
  252. mathematicskit-0.2.0/mathematicskit/optimization/systems/__init__.py +0 -19
  253. mathematicskit-0.2.0/mathematicskit/optimization/systems/linear_programming.py +0 -67
  254. mathematicskit-0.2.0/mathematicskit/optimization/tests/test_linear_programming.py +0 -37
  255. mathematicskit-0.2.0/mathematicskit/probability/__init__.py +0 -43
  256. mathematicskit-0.2.0/mathematicskit/probability/core/__init__.py +0 -5
  257. mathematicskit-0.2.0/mathematicskit/probability/systems/__init__.py +0 -24
  258. mathematicskit-0.2.0/mathematicskit/special_functions/__init__.py +0 -39
  259. mathematicskit-0.2.0/mathematicskit/special_functions/core/base.py +0 -38
  260. mathematicskit-0.2.0/mathematicskit/special_functions/systems/__init__.py +0 -22
  261. mathematicskit-0.2.0/mathematicskit/special_functions/systems/gamma_beta.py +0 -87
  262. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/LICENSE +0 -0
  263. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/README.md +0 -0
  264. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/systems/polynomial_ring.py +0 -0
  265. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/__init__.py +0 -0
  266. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/tests/test_visualizers.py +0 -0
  267. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/utils/__init__.py +0 -0
  268. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/utils/checks.py +0 -0
  269. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/visualizers/__init__.py +0 -0
  270. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/abstract_algebra/visualizers/plots.py +0 -0
  271. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/core/__init__.py +0 -0
  272. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/systems/autodiff.py +0 -0
  273. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/systems/dual_numbers.py +0 -0
  274. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/__init__.py +0 -0
  275. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_autodiff.py +0 -0
  276. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_dual_numbers.py +0 -0
  277. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_quadrature.py +0 -0
  278. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/tests/test_visualizers.py +0 -0
  279. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/utils/__init__.py +0 -0
  280. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/utils/series_utils.py +0 -0
  281. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/visualizers/__init__.py +0 -0
  282. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/calculus/visualizers/plots.py +0 -0
  283. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/core/__init__.py +0 -0
  284. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/systems/counting.py +0 -0
  285. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/systems/inclusion_exclusion.py +0 -0
  286. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/systems/partitions.py +0 -0
  287. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/systems/pascals_triangle.py +0 -0
  288. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/systems/special_numbers.py +0 -0
  289. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/__init__.py +0 -0
  290. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_counting.py +0 -0
  291. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_inclusion_exclusion.py +0 -0
  292. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_partitions.py +0 -0
  293. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_pascals_triangle.py +0 -0
  294. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_special_numbers.py +0 -0
  295. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/tests/test_visualizers.py +0 -0
  296. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/utils/__init__.py +0 -0
  297. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/utils/bell_number.py +0 -0
  298. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/visualizers/__init__.py +0 -0
  299. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/combinatorics/visualizers/plots.py +0 -0
  300. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/constants.py +0 -0
  301. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/core/__init__.py +0 -0
  302. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/core/base.py +0 -0
  303. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/cellular_automata.py +0 -0
  304. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/ifs.py +0 -0
  305. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/lyapunov.py +0 -0
  306. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/systems/mandelbrot_julia.py +0 -0
  307. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/__init__.py +0 -0
  308. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_box_counting.py +0 -0
  309. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_cellular_automata.py +0 -0
  310. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_ifs.py +0 -0
  311. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_lyapunov.py +0 -0
  312. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_mandelbrot_julia.py +0 -0
  313. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/tests/test_visualizers.py +0 -0
  314. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/utils/__init__.py +0 -0
  315. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/utils/ifs_utils.py +0 -0
  316. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/visualizers/__init__.py +0 -0
  317. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/fractals_chaos/visualizers/plots.py +0 -0
  318. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/core/__init__.py +0 -0
  319. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/systems/curves.py +0 -0
  320. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/systems/intersections.py +0 -0
  321. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/systems/triangulation.py +0 -0
  322. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/__init__.py +0 -0
  323. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_convex_hull.py +0 -0
  324. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_curves.py +0 -0
  325. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_intersections.py +0 -0
  326. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_polygon.py +0 -0
  327. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_triangulation.py +0 -0
  328. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/tests/test_visualizers.py +0 -0
  329. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/utils/__init__.py +0 -0
  330. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/utils/curves_library.py +0 -0
  331. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/visualizers/__init__.py +0 -0
  332. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/geometry/visualizers/plots.py +0 -0
  333. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/core/__init__.py +0 -0
  334. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/systems/shortest_paths.py +0 -0
  335. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/systems/spanning_tree.py +0 -0
  336. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/systems/spectral.py +0 -0
  337. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/__init__.py +0 -0
  338. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_generators.py +0 -0
  339. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_graph.py +0 -0
  340. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_shortest_paths.py +0 -0
  341. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_spanning_tree.py +0 -0
  342. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_spectral.py +0 -0
  343. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/tests/test_visualizers.py +0 -0
  344. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/visualizers/__init__.py +0 -0
  345. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/graph_theory/visualizers/plots.py +0 -0
  346. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/integrators/__init__.py +0 -0
  347. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/integrators/adaptive.py +0 -0
  348. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/integrators/fixed_step.py +0 -0
  349. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/integrators/tests/__init__.py +0 -0
  350. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/integrators/tests/test_integrators.py +0 -0
  351. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/core/__init__.py +0 -0
  352. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/cholesky.py +0 -0
  353. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/iterative.py +0 -0
  354. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/stability.py +0 -0
  355. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/systems/svd.py +0 -0
  356. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/__init__.py +0 -0
  357. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_cholesky.py +0 -0
  358. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_eigen.py +0 -0
  359. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_iterative.py +0 -0
  360. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_qr.py +0 -0
  361. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_stability.py +0 -0
  362. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_svd.py +0 -0
  363. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/tests/test_visualizers.py +0 -0
  364. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/utils/__init__.py +0 -0
  365. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/utils/matrix_utils.py +0 -0
  366. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/visualizers/__init__.py +0 -0
  367. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/linalg/visualizers/plots.py +0 -0
  368. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/core/__init__.py +0 -0
  369. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/crt.py +0 -0
  370. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/modular_arithmetic.py +0 -0
  371. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/systems/totient.py +0 -0
  372. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/__init__.py +0 -0
  373. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_crt.py +0 -0
  374. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_gcd_lcm.py +0 -0
  375. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_modular_arithmetic.py +0 -0
  376. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_totient.py +0 -0
  377. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/tests/test_visualizers.py +0 -0
  378. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/utils/__init__.py +0 -0
  379. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/utils/gcd_lcm.py +0 -0
  380. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/visualizers/__init__.py +0 -0
  381. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/number_theory/visualizers/plots.py +0 -0
  382. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/core/__init__.py +0 -0
  383. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/systems/chebyshev.py +0 -0
  384. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/systems/splines.py +0 -0
  385. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/__init__.py +0 -0
  386. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_chebyshev.py +0 -0
  387. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_error_analysis.py +0 -0
  388. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_regression.py +0 -0
  389. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_splines.py +0 -0
  390. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/tests/test_visualizers.py +0 -0
  391. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/utils/__init__.py +0 -0
  392. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/visualizers/__init__.py +0 -0
  393. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/numerical_analysis/visualizers/plots.py +0 -0
  394. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/core/__init__.py +0 -0
  395. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/bifurcations.py +0 -0
  396. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/logistic_map.py +0 -0
  397. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/phase_portrait.py +0 -0
  398. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/systems/poincare.py +0 -0
  399. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/__init__.py +0 -0
  400. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_bifurcations.py +0 -0
  401. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_logistic_map.py +0 -0
  402. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_phase_portrait.py +0 -0
  403. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_poincare.py +0 -0
  404. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/tests/test_visualizers.py +0 -0
  405. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/utils/__init__.py +0 -0
  406. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/utils/period_estimation.py +0 -0
  407. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/visualizers/__init__.py +0 -0
  408. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/ode_dynamics/visualizers/plots.py +0 -0
  409. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/core/__init__.py +0 -0
  410. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/systems/conjugate_gradient.py +0 -0
  411. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/systems/constrained.py +0 -0
  412. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/systems/gradient_descent.py +0 -0
  413. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/systems/newton_quasi_newton.py +0 -0
  414. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/__init__.py +0 -0
  415. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_comparison.py +0 -0
  416. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_conjugate_gradient.py +0 -0
  417. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_constrained.py +0 -0
  418. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_gradient_descent.py +0 -0
  419. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_newton_quasi_newton.py +0 -0
  420. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/tests/test_visualizers.py +0 -0
  421. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/utils/__init__.py +0 -0
  422. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/utils/comparison.py +0 -0
  423. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/utils/line_search.py +0 -0
  424. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/visualizers/__init__.py +0 -0
  425. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/optimization/visualizers/plots.py +0 -0
  426. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/systems/discrete.py +0 -0
  427. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/systems/limit_theorems.py +0 -0
  428. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/systems/monte_carlo.py +0 -0
  429. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/__init__.py +0 -0
  430. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_continuous.py +0 -0
  431. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_discrete.py +0 -0
  432. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_limit_theorems.py +0 -0
  433. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_markov_chain.py +0 -0
  434. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_monte_carlo.py +0 -0
  435. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/tests/test_visualizers.py +0 -0
  436. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/utils/__init__.py +0 -0
  437. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/utils/diagnostics.py +0 -0
  438. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/visualizers/__init__.py +0 -0
  439. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/probability/visualizers/plots.py +0 -0
  440. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/core/__init__.py +0 -0
  441. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/systems/bessel.py +0 -0
  442. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/systems/fourier_transform.py +0 -0
  443. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/systems/orthogonal_polynomials.py +0 -0
  444. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/__init__.py +0 -0
  445. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/test_bessel.py +0 -0
  446. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/test_fourier_transform.py +0 -0
  447. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/test_orthogonal_polynomials.py +0 -0
  448. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/tests/test_visualizers.py +0 -0
  449. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/utils/__init__.py +0 -0
  450. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/utils/orthogonality.py +0 -0
  451. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/visualizers/__init__.py +0 -0
  452. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/special_functions/visualizers/plots.py +0 -0
  453. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/core/__init__.py +0 -0
  454. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/bootstrap.py +0 -0
  455. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/confidence_intervals.py +0 -0
  456. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/descriptive.py +0 -0
  457. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/systems/regression.py +0 -0
  458. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/__init__.py +0 -0
  459. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_bootstrap.py +0 -0
  460. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_confidence_intervals.py +0 -0
  461. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_descriptive.py +0 -0
  462. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_effect_size.py +0 -0
  463. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_hypothesis_tests.py +0 -0
  464. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_regression.py +0 -0
  465. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/tests/test_visualizers.py +0 -0
  466. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/utils/__init__.py +0 -0
  467. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/utils/effect_size.py +0 -0
  468. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/visualizers/__init__.py +0 -0
  469. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/statistics/visualizers/plots.py +0 -0
  470. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/tests/__init__.py +0 -0
  471. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit/tests/test_package.py +0 -0
  472. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/dependency_links.txt +0 -0
  473. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/requires.txt +0 -0
  474. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/mathematicskit.egg-info/top_level.txt +0 -0
  475. {mathematicskit-0.2.0 → mathematicskit-0.2.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathematicskit
3
- Version: 0.2.0
3
+ Version: 0.2.1
4
4
  Summary: Unified computational mathematics toolkit: numerical analysis, linear algebra, calculus, dynamical systems, optimization, probability, statistics, number theory, combinatorics, graph theory, abstract algebra, geometry, special functions, and fractals/chaos -- all hand-rolled from first principles.
5
5
  Author-email: Charles Poli <cpoli374@gmail.com>
6
6
  Maintainer-email: Charles Poli <cpoli374@gmail.com>
@@ -28,7 +28,7 @@ from mathematicskit import (
28
28
  statistics,
29
29
  )
30
30
 
31
- __version__ = "0.1.0"
31
+ __version__ = "0.2.1"
32
32
 
33
33
  __all__ = [
34
34
  "abstract_algebra",
@@ -0,0 +1,94 @@
1
+ """mathematicskit.abstract_algebra: group, ring, and field theory made computational.
2
+
3
+ Every algorithm here is hand-rolled from its textbook definition --
4
+ finite group/ring/field theory has no ``numpy``/``scipy`` equivalent.
5
+ Cyclic, permutation, dihedral, and quaternion group implementations
6
+ with Cayley table generation; group-property checks (order, identity,
7
+ inverses, abelian, cyclicity); subgroup and coset enumeration for small
8
+ groups; structure theory (normal subgroups and quotients, derived
9
+ series and solvability, Sylow subgroups, composition series); group
10
+ actions and Burnside orbit counting; homomorphisms and their kernels
11
+ and images; Reed-Solomon codes over ``GF(p)``; finite
12
+ field arithmetic (``GF(p)`` and ``GF(p^n)`` via irreducible polynomials
13
+ over ``GF(p)``); and polynomial ring arithmetic (addition,
14
+ multiplication, division with remainder, gcd) over :math:`\\mathbb{Z}`,
15
+ :math:`\\mathbb{Q}`, and finite fields.
16
+ """
17
+
18
+ from mathematicskit.abstract_algebra.core.base import (
19
+ CompositionSeriesResult,
20
+ FiniteGroup,
21
+ GroupPropertiesResult,
22
+ HomomorphismResult,
23
+ Polynomial,
24
+ SylowResult,
25
+ )
26
+ from mathematicskit.abstract_algebra.systems.actions import count_orbits, orbits
27
+ from mathematicskit.abstract_algebra.systems.codes import rs_decode_erasures, rs_encode
28
+ from mathematicskit.abstract_algebra.systems.finite_fields import GF, find_irreducible_polynomial, is_irreducible
29
+ from mathematicskit.abstract_algebra.systems.groups import CyclicGroup, DihedralGroup, PermutationGroup, QuaternionGroup, group_properties
30
+ from mathematicskit.abstract_algebra.systems.homomorphisms import analyze_homomorphism, homomorphism_image, homomorphism_kernel, is_homomorphism
31
+ from mathematicskit.abstract_algebra.systems.polynomial_ring import poly_add, poly_divmod, poly_gcd, poly_mul, poly_sub
32
+ from mathematicskit.abstract_algebra.systems.structure import (
33
+ QuotientGroup,
34
+ Subgroup,
35
+ commutator_subgroup,
36
+ composition_series,
37
+ derived_series,
38
+ elements_of_order,
39
+ generated_subgroup,
40
+ is_normal_subgroup,
41
+ is_solvable,
42
+ quotient_group,
43
+ sylow_subgroups,
44
+ )
45
+ from mathematicskit.abstract_algebra.systems.subgroups import all_subgroups, cyclic_subgroup, left_cosets
46
+ from mathematicskit.abstract_algebra.utils.checks import is_cyclic
47
+
48
+ __version__ = "0.1.0"
49
+
50
+ __all__ = [
51
+ "__version__",
52
+ "FiniteGroup",
53
+ "GroupPropertiesResult",
54
+ "Polynomial",
55
+ "CyclicGroup",
56
+ "PermutationGroup",
57
+ "group_properties",
58
+ "is_cyclic",
59
+ "cyclic_subgroup",
60
+ "all_subgroups",
61
+ "left_cosets",
62
+ "GF",
63
+ "is_irreducible",
64
+ "find_irreducible_polynomial",
65
+ "poly_add",
66
+ "poly_sub",
67
+ "poly_mul",
68
+ "poly_divmod",
69
+ "poly_gcd",
70
+ "SylowResult",
71
+ "CompositionSeriesResult",
72
+ "HomomorphismResult",
73
+ "DihedralGroup",
74
+ "QuaternionGroup",
75
+ "Subgroup",
76
+ "generated_subgroup",
77
+ "elements_of_order",
78
+ "is_normal_subgroup",
79
+ "QuotientGroup",
80
+ "quotient_group",
81
+ "commutator_subgroup",
82
+ "derived_series",
83
+ "is_solvable",
84
+ "sylow_subgroups",
85
+ "composition_series",
86
+ "orbits",
87
+ "count_orbits",
88
+ "is_homomorphism",
89
+ "homomorphism_kernel",
90
+ "homomorphism_image",
91
+ "analyze_homomorphism",
92
+ "rs_encode",
93
+ "rs_decode_erasures",
94
+ ]
@@ -17,7 +17,7 @@ from typing import Optional
17
17
 
18
18
  import numpy as np
19
19
 
20
- __all__ = ["FiniteGroup", "GroupPropertiesResult", "Polynomial"]
20
+ __all__ = ["FiniteGroup", "GroupPropertiesResult", "SylowResult", "CompositionSeriesResult", "HomomorphismResult", "Polynomial"]
21
21
 
22
22
 
23
23
  class FiniteGroup(ABC):
@@ -124,6 +124,41 @@ class GroupPropertiesResult:
124
124
  """dict: ``{element: order}`` for every element."""
125
125
 
126
126
 
127
+ @dataclass
128
+ class SylowResult:
129
+ """Container for the Sylow :math:`p`-subgroups of a finite group."""
130
+
131
+ p: int
132
+ sylow_order: int
133
+ """int: :math:`p^k`, the largest power of ``p`` dividing :math:`|G|`."""
134
+ subgroups: list
135
+ """list of list: Every Sylow :math:`p`-subgroup, each as a list of elements."""
136
+
137
+ @property
138
+ def count(self) -> int:
139
+ """int: :math:`n_p`, the number of Sylow :math:`p`-subgroups."""
140
+ return len(self.subgroups)
141
+
142
+
143
+ @dataclass
144
+ class CompositionSeriesResult:
145
+ """Container for a composition series :math:`G = G_0 > G_1 > \\dots > G_m = \\{e\\}`."""
146
+
147
+ series: list
148
+ """list of list: The subgroups :math:`G_0, \\dots, G_m`, largest first."""
149
+ factor_orders: list
150
+ """list of int: The orders :math:`|G_i / G_{i+1}|` of the composition factors."""
151
+
152
+
153
+ @dataclass
154
+ class HomomorphismResult:
155
+ """Container for a group homomorphism's kernel and image."""
156
+
157
+ kernel: list
158
+ image: list
159
+ is_homomorphism: bool
160
+
161
+
127
162
  class Polynomial:
128
163
  r"""A polynomial with coefficients over :math:`\mathbb{Q}` (``modulus=None``,
129
164
  stored as exact :class:`fractions.Fraction`) or :math:`\mathrm{GF}(p)`
@@ -189,19 +224,29 @@ class Polynomial:
189
224
  return -1
190
225
  return len(self.coeffs) - 1
191
226
 
227
+ def _check_same_field(self, other: Polynomial) -> None:
228
+ """Reject arithmetic between polynomials over different coefficient fields."""
229
+ if not isinstance(other, Polynomial):
230
+ raise TypeError(f"expected a Polynomial, got {type(other).__name__}")
231
+ if self.modulus != other.modulus:
232
+ raise ValueError(f"cannot combine polynomials over different fields (modulus {self.modulus} vs {other.modulus})")
233
+
192
234
  def _pad(self, n: int) -> list:
193
235
  zero = Fraction(0) if self.modulus is None else 0
194
236
  return self.coeffs + [zero] * (n - len(self.coeffs))
195
237
 
196
238
  def __add__(self, other: Polynomial) -> Polynomial:
239
+ self._check_same_field(other)
197
240
  n = max(len(self.coeffs), len(other.coeffs))
198
241
  return self._wrap([self._reduce(a + b) for a, b in zip(self._pad(n), other._pad(n))])
199
242
 
200
243
  def __sub__(self, other: Polynomial) -> Polynomial:
244
+ self._check_same_field(other)
201
245
  n = max(len(self.coeffs), len(other.coeffs))
202
246
  return self._wrap([self._reduce(a - b) for a, b in zip(self._pad(n), other._pad(n))])
203
247
 
204
248
  def __mul__(self, other: Polynomial) -> Polynomial:
249
+ self._check_same_field(other)
205
250
  result = [Fraction(0) if self.modulus is None else 0] * (len(self.coeffs) + len(other.coeffs) - 1)
206
251
  for i, a in enumerate(self.coeffs):
207
252
  for j, b in enumerate(other.coeffs):
@@ -216,6 +261,7 @@ class Polynomial:
216
261
 
217
262
  def __divmod__(self, other: Polynomial):
218
263
  r"""Polynomial long division: ``self = quotient * other + remainder``, ``deg(remainder) < deg(other)``."""
264
+ self._check_same_field(other)
219
265
  if other.degree == -1:
220
266
  raise ZeroDivisionError("division by the zero polynomial")
221
267
  remainder = self._wrap(list(self.coeffs))
@@ -0,0 +1,60 @@
1
+ """Concrete group, ring, and field algorithms."""
2
+
3
+ from mathematicskit.abstract_algebra.systems.actions import count_orbits, orbits
4
+ from mathematicskit.abstract_algebra.systems.codes import rs_decode_erasures, rs_encode
5
+ from mathematicskit.abstract_algebra.systems.finite_fields import GF, find_irreducible_polynomial, is_irreducible
6
+ from mathematicskit.abstract_algebra.systems.groups import CyclicGroup, DihedralGroup, PermutationGroup, QuaternionGroup, group_properties
7
+ from mathematicskit.abstract_algebra.systems.homomorphisms import analyze_homomorphism, homomorphism_image, homomorphism_kernel, is_homomorphism
8
+ from mathematicskit.abstract_algebra.systems.polynomial_ring import poly_add, poly_divmod, poly_gcd, poly_mul, poly_sub
9
+ from mathematicskit.abstract_algebra.systems.structure import (
10
+ QuotientGroup,
11
+ Subgroup,
12
+ commutator_subgroup,
13
+ composition_series,
14
+ derived_series,
15
+ elements_of_order,
16
+ generated_subgroup,
17
+ is_normal_subgroup,
18
+ is_solvable,
19
+ quotient_group,
20
+ sylow_subgroups,
21
+ )
22
+ from mathematicskit.abstract_algebra.systems.subgroups import all_subgroups, cyclic_subgroup, left_cosets
23
+
24
+ __all__ = [
25
+ "CyclicGroup",
26
+ "PermutationGroup",
27
+ "group_properties",
28
+ "cyclic_subgroup",
29
+ "all_subgroups",
30
+ "left_cosets",
31
+ "GF",
32
+ "is_irreducible",
33
+ "find_irreducible_polynomial",
34
+ "poly_add",
35
+ "poly_sub",
36
+ "poly_mul",
37
+ "poly_divmod",
38
+ "poly_gcd",
39
+ "DihedralGroup",
40
+ "QuaternionGroup",
41
+ "Subgroup",
42
+ "generated_subgroup",
43
+ "elements_of_order",
44
+ "is_normal_subgroup",
45
+ "QuotientGroup",
46
+ "quotient_group",
47
+ "commutator_subgroup",
48
+ "derived_series",
49
+ "is_solvable",
50
+ "sylow_subgroups",
51
+ "composition_series",
52
+ "orbits",
53
+ "count_orbits",
54
+ "is_homomorphism",
55
+ "homomorphism_kernel",
56
+ "homomorphism_image",
57
+ "analyze_homomorphism",
58
+ "rs_encode",
59
+ "rs_decode_erasures",
60
+ ]
@@ -0,0 +1,92 @@
1
+ r"""Group actions on finite sets: orbits and Burnside's orbit-counting lemma.
2
+
3
+ No numpy/scipy equivalent. See Dummit & Foote, *Abstract Algebra*, 3rd
4
+ ed., Sec. 4.1 (group actions), and W. Burnside, *Theory of Groups of
5
+ Finite Order* (Cambridge: Cambridge University Press, 1897), Sec. 145.
6
+ """
7
+
8
+ from __future__ import annotations
9
+
10
+ from fractions import Fraction
11
+ from typing import Callable
12
+
13
+ from mathematicskit.abstract_algebra.core.base import FiniteGroup
14
+
15
+ __all__ = ["orbits", "count_orbits"]
16
+
17
+
18
+ def orbits(group: FiniteGroup, points, action: Callable) -> list:
19
+ r"""The orbits of `group` acting on `points`, found by direct search.
20
+
21
+ Parameters
22
+ ----------
23
+ group : FiniteGroup
24
+ points : iterable
25
+ A finite set closed under the action.
26
+ action : callable
27
+ ``action(g, x)`` returns the image of point ``x`` under group element ``g``.
28
+
29
+ Returns
30
+ -------
31
+ list of list
32
+ Each orbit as a list of points.
33
+
34
+ Examples
35
+ --------
36
+ >>> from mathematicskit.abstract_algebra.systems.groups import CyclicGroup
37
+ >>> rotate = lambda g, word: word[g:] + word[:g] # Z_3 rotating 3-letter words
38
+ >>> len(orbits(CyclicGroup(3), ["aab", "aba", "baa", "aaa"], rotate))
39
+ 2
40
+ """
41
+ seen = set()
42
+ result = []
43
+ for x in points:
44
+ if x in seen:
45
+ continue
46
+ orbit = []
47
+ for g in group.elements:
48
+ y = action(g, x)
49
+ if y not in seen:
50
+ seen.add(y)
51
+ orbit.append(y)
52
+ result.append(orbit)
53
+ return result
54
+
55
+
56
+ def count_orbits(group: FiniteGroup, points, action: Callable) -> int:
57
+ r"""The number of orbits, by Burnside's lemma: the average number of fixed points.
58
+
59
+ .. math::
60
+
61
+ |X/G| = \frac{1}{|G|} \sum_{g \in G} |\mathrm{Fix}(g)|
62
+
63
+ The formula was known to Augustin-Louis Cauchy (1845) and Ferdinand
64
+ Georg Frobenius (1887); William Burnside's 1897 book made it
65
+ standard. Counting fixed points is usually far easier than listing
66
+ orbits. See Dummit & Foote, *Abstract Algebra*, 3rd ed., Sec. 4.1.
67
+
68
+ Parameters
69
+ ----------
70
+ group : FiniteGroup
71
+ points : iterable
72
+ action : callable
73
+ ``action(g, x)`` returns the image of point ``x`` under ``g``.
74
+
75
+ Returns
76
+ -------
77
+ int
78
+
79
+ Examples
80
+ --------
81
+ >>> from itertools import product
82
+ >>> from mathematicskit.abstract_algebra.systems.groups import CyclicGroup
83
+ >>> necklaces = ["".join(w) for w in product("RB", repeat=4)] # 2-colored 4-bead necklaces
84
+ >>> count_orbits(CyclicGroup(4), necklaces, lambda g, w: w[g:] + w[:g])
85
+ 6
86
+ """
87
+ points = list(points)
88
+ total = sum(sum(1 for x in points if action(g, x) == x) for g in group.elements)
89
+ count = Fraction(total, group.order)
90
+ if count.denominator != 1:
91
+ raise ValueError("fixed-point average is not an integer; is `action` a genuine group action?")
92
+ return int(count)
@@ -0,0 +1,103 @@
1
+ r"""Reed-Solomon codes over a prime field :math:`\mathrm{GF}(p)`, in their
2
+ original evaluation form.
3
+
4
+ A message of :math:`k` symbols is read as the coefficients of a
5
+ polynomial of degree below :math:`k`; the codeword is that polynomial's
6
+ values at :math:`n` distinct field elements. Any :math:`k` surviving
7
+ values determine the polynomial by Lagrange interpolation, so the code
8
+ recovers from up to :math:`n-k` erasures. No numpy/scipy equivalent
9
+ (exact modular arithmetic). See I. S. Reed and G. Solomon, "Polynomial
10
+ Codes over Certain Finite Fields," Journal of the Society for Industrial
11
+ and Applied Mathematics 8(2) (1960), 300-304.
12
+ """
13
+
14
+ from __future__ import annotations
15
+
16
+ __all__ = ["rs_encode", "rs_decode_erasures"]
17
+
18
+
19
+ def _check_prime_field(p: int, n: int, k: int) -> None:
20
+ if p < 2 or any(p % d == 0 for d in range(2, int(p**0.5) + 1)):
21
+ raise ValueError(f"p = {p} must be prime")
22
+ if not 0 < k <= n <= p:
23
+ raise ValueError("need 0 < k <= n <= p")
24
+
25
+
26
+ def rs_encode(message, n: int, p: int) -> list:
27
+ r"""Encode `message` as the values :math:`m(0), m(1), \dots, m(n-1)` of its polynomial over :math:`\mathrm{GF}(p)`.
28
+
29
+ Parameters
30
+ ----------
31
+ message : sequence of int
32
+ The :math:`k` message symbols, each in ``range(p)``; ``message[i]``
33
+ is the coefficient of :math:`x^i`.
34
+ n : int
35
+ Codeword length, :math:`k \le n \le p`.
36
+ p : int
37
+ A prime field size.
38
+
39
+ Returns
40
+ -------
41
+ list of int
42
+
43
+ Examples
44
+ --------
45
+ >>> rs_encode([3, 1], n=5, p=7) # m(x) = 3 + x at x = 0..4
46
+ [3, 4, 5, 6, 0]
47
+ """
48
+ message = [int(c) % p for c in message]
49
+ _check_prime_field(p, n, len(message))
50
+ codeword = []
51
+ for x in range(n):
52
+ value = 0
53
+ for c in reversed(message):
54
+ value = (value * x + c) % p
55
+ codeword.append(value)
56
+ return codeword
57
+
58
+
59
+ def rs_decode_erasures(received, k: int, p: int) -> list:
60
+ r"""Recover a :math:`k`-symbol message from a codeword with erased symbols.
61
+
62
+ Lagrange-interpolates the unique polynomial of degree below
63
+ :math:`k` through any :math:`k` surviving positions, working exactly
64
+ in :math:`\mathrm{GF}(p)`.
65
+
66
+ Parameters
67
+ ----------
68
+ received : sequence
69
+ The codeword, with ``None`` at each erased position.
70
+ k : int
71
+ Message length.
72
+ p : int
73
+ The prime field size used to encode.
74
+
75
+ Returns
76
+ -------
77
+ list of int
78
+ The message symbols (polynomial coefficients, lowest degree first).
79
+
80
+ Examples
81
+ --------
82
+ >>> codeword = rs_encode([2, 5, 1], n=6, p=11)
83
+ >>> damaged = [None, codeword[1], None, codeword[3], codeword[4], None]
84
+ >>> rs_decode_erasures(damaged, k=3, p=11)
85
+ [2, 5, 1]
86
+ """
87
+ _check_prime_field(p, len(received), k)
88
+ points = [(x, int(y) % p) for x, y in enumerate(received) if y is not None][:k]
89
+ if len(points) < k:
90
+ raise ValueError(f"only {len(points)} symbols survive; at least k = {k} are needed")
91
+ coeffs = [0] * k
92
+ for i, (xi, yi) in enumerate(points):
93
+ basis = [1] # the Lagrange basis polynomial prod_{j != i} (x - xj) / (xi - xj)
94
+ denominator = 1
95
+ for j, (xj, _) in enumerate(points):
96
+ if j == i:
97
+ continue
98
+ basis = [((basis[t - 1] if t > 0 else 0) - xj * (basis[t] if t < len(basis) else 0)) % p for t in range(len(basis) + 1)]
99
+ denominator = denominator * (xi - xj) % p
100
+ scale = yi * pow(denominator, p - 2, p) % p
101
+ for t, b in enumerate(basis):
102
+ coeffs[t] = (coeffs[t] + scale * b) % p
103
+ return coeffs
@@ -40,10 +40,19 @@ def is_irreducible(poly: Polynomial) -> bool:
40
40
  True
41
41
  >>> is_irreducible(Polynomial([0, 1, 1], modulus=2)) # x^2+x = x(x+1): reducible
42
42
  False
43
+ >>> is_irreducible(Polynomial([1], modulus=2)) # the constant 1 is a unit, not irreducible
44
+ False
45
+ >>> is_irreducible(Polynomial([0], modulus=2)) # nor is the zero polynomial
46
+ False
43
47
  """
44
48
  p = poly.modulus
45
49
  n = poly.degree
46
- if n <= 1:
50
+ if n < 1:
51
+ # Degree 0 is a nonzero constant (a unit) and degree -1 is the zero
52
+ # polynomial; by definition neither is irreducible, since
53
+ # irreducibility asks for a non-unit with no non-unit factorization.
54
+ return False
55
+ if n == 1:
47
56
  return True
48
57
  for d in range(1, n // 2 + 1):
49
58
  for candidate_coeffs in _monic_polynomials_of_degree(p, d):
@@ -10,7 +10,7 @@ from __future__ import annotations
10
10
 
11
11
  from mathematicskit.abstract_algebra.core.base import FiniteGroup, GroupPropertiesResult
12
12
 
13
- __all__ = ["CyclicGroup", "PermutationGroup", "group_properties"]
13
+ __all__ = ["CyclicGroup", "PermutationGroup", "DihedralGroup", "QuaternionGroup", "group_properties"]
14
14
 
15
15
 
16
16
  class CyclicGroup(FiniteGroup):
@@ -137,6 +137,115 @@ class PermutationGroup(FiniteGroup):
137
137
  return tuple(inv)
138
138
 
139
139
 
140
+ class DihedralGroup(PermutationGroup):
141
+ r"""The dihedral group :math:`D_n` of symmetries of a regular ``n``-gon, of order :math:`2n`.
142
+
143
+ Realized as permutations of the polygon's vertices ``0, ..., n-1``,
144
+ generated by the rotation :math:`r: i \mapsto i+1 \pmod n` and the
145
+ reflection :math:`s: i \mapsto -i \pmod n`. Felix Klein's 1872
146
+ Erlangen program made groups like this -- the transformations that
147
+ preserve a figure -- the organizing principle of geometry. See
148
+ Dummit & Foote, *Abstract Algebra*, 3rd ed., Sec. 1.2.
149
+
150
+ Parameters
151
+ ----------
152
+ n : int
153
+ Number of polygon vertices, ``n >= 3``.
154
+
155
+ Examples
156
+ --------
157
+ >>> d4 = DihedralGroup(4) # symmetries of a square
158
+ >>> d4.order
159
+ 8
160
+ >>> d4.is_abelian()
161
+ False
162
+ """
163
+
164
+ def __init__(self, n: int):
165
+ if n < 3:
166
+ raise ValueError("n must be >= 3")
167
+ self.n = int(n)
168
+ rotation = tuple((i + 1) % n for i in range(n))
169
+ reflection = tuple((-i) % n for i in range(n))
170
+ super().__init__(n, generators=[rotation, reflection])
171
+
172
+ @property
173
+ def rotation(self) -> tuple:
174
+ """tuple: The generating rotation by one vertex."""
175
+ return self.generators[0]
176
+
177
+ @property
178
+ def reflection(self) -> tuple:
179
+ """tuple: The generating reflection through vertex 0."""
180
+ return self.generators[1]
181
+
182
+
183
+ _QUATERNION_UNIT_PRODUCTS = {
184
+ ("1", "1"): (1, "1"),
185
+ ("1", "i"): (1, "i"),
186
+ ("1", "j"): (1, "j"),
187
+ ("1", "k"): (1, "k"),
188
+ ("i", "1"): (1, "i"),
189
+ ("j", "1"): (1, "j"),
190
+ ("k", "1"): (1, "k"),
191
+ ("i", "i"): (-1, "1"),
192
+ ("j", "j"): (-1, "1"),
193
+ ("k", "k"): (-1, "1"),
194
+ ("i", "j"): (1, "k"),
195
+ ("j", "k"): (1, "i"),
196
+ ("k", "i"): (1, "j"),
197
+ ("j", "i"): (-1, "k"),
198
+ ("k", "j"): (-1, "i"),
199
+ ("i", "k"): (-1, "j"),
200
+ }
201
+
202
+
203
+ class QuaternionGroup(FiniteGroup):
204
+ r"""The quaternion group :math:`Q_8 = \{\pm1, \pm i, \pm j, \pm k\}` under quaternion multiplication.
205
+
206
+ Elements are the strings ``"1", "-1", "i", "-i", "j", "-j", "k", "-k"``,
207
+ multiplied by William Rowan Hamilton's 1843 rules
208
+ :math:`i^2 = j^2 = k^2 = ijk = -1`. It is the smallest non-abelian
209
+ group in which every subgroup is normal. See Dummit & Foote,
210
+ *Abstract Algebra*, 3rd ed., Sec. 1.5.
211
+
212
+ Examples
213
+ --------
214
+ >>> q = QuaternionGroup()
215
+ >>> q.operate("i", "j"), q.operate("j", "i")
216
+ ('k', '-k')
217
+ >>> q.operate(q.operate("i", "j"), "k") # ijk = -1
218
+ '-1'
219
+ >>> q.element_order("i")
220
+ 4
221
+ """
222
+
223
+ _ELEMENTS = ["1", "-1", "i", "-i", "j", "-j", "k", "-k"]
224
+
225
+ @property
226
+ def elements(self) -> list:
227
+ return list(self._ELEMENTS)
228
+
229
+ def identity(self) -> str:
230
+ return "1"
231
+
232
+ @staticmethod
233
+ def _split(a: str) -> tuple:
234
+ return (-1, a[1:]) if a.startswith("-") else (1, a)
235
+
236
+ def operate(self, a: str, b: str) -> str:
237
+ sa, ua = self._split(a)
238
+ sb, ub = self._split(b)
239
+ s, u = _QUATERNION_UNIT_PRODUCTS[(ua, ub)]
240
+ return u if sa * sb * s == 1 else "-" + u
241
+
242
+ def inverse(self, a: str) -> str:
243
+ sign, unit = self._split(a)
244
+ if unit == "1":
245
+ return a
246
+ return unit if sign == -1 else "-" + unit
247
+
248
+
140
249
  def group_properties(group: FiniteGroup) -> GroupPropertiesResult:
141
250
  """Summarize a finite group's order, abelian-ness, and every element's order.
142
251