mathai 0.7.8__py3-none-any.whl → 0.8.0__py3-none-any.whl

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.
mathai/trig.py CHANGED
@@ -7,24 +7,40 @@ from .parser import parse
7
7
  trig_sin_table = {
8
8
  (0,1): parse("0"),
9
9
  (1,6): parse("1/2"),
10
- (1,4): parse("2^(1/2)/2"), # π/4
11
- (1,3): parse("3^(1/2)/2"), # π/3
12
- (1,2): parse("1"), # π/2
13
- (2,3): parse("3^(1/2)/2"), # 2π/3
14
- (3,4): parse("2^(1/2)/2"), # 3π/4
15
- (5,6): parse("1/2"), # 5π/6
16
- (1,1): parse("0") # π
10
+ (1,4): parse("2^(1/2)/2"),
11
+
12
+ (1,3): parse("3^(1/2)/2"),
13
+
14
+ (1,2): parse("1"),
15
+
16
+ (2,3): parse("3^(1/2)/2"),
17
+
18
+ (3,4): parse("2^(1/2)/2"),
19
+
20
+ (5,6): parse("1/2"),
21
+
22
+ (1,1): parse("0")
23
+
17
24
  }
18
25
  trig_cos_table = {
19
- (0,1): parse("1"), # 0
20
- (1,6): parse("3^(1/2)/2"), # π/6
21
- (1,4): parse("2^(1/2)/2"), # π/4
22
- (1,3): parse("1/2"), # π/3
23
- (1,2): parse("0"), # π/2
24
- (2,3): parse("-1/2"), # 2π/3
25
- (3,4): parse("-2^(1/2)/2"), # 3π/4
26
- (5,6): parse("-1/2"), # 5π/6
27
- (1,1): parse("-1") # π
26
+ (0,1): parse("1"),
27
+
28
+ (1,6): parse("3^(1/2)/2"),
29
+
30
+ (1,4): parse("2^(1/2)/2"),
31
+
32
+ (1,3): parse("1/2"),
33
+
34
+ (1,2): parse("0"),
35
+
36
+ (2,3): parse("-1/2"),
37
+
38
+ (3,4): parse("-2^(1/2)/2"),
39
+
40
+ (5,6): parse("-1/2"),
41
+
42
+ (1,1): parse("-1")
43
+
28
44
  }
29
45
 
30
46
  for key in trig_cos_table.keys():
@@ -60,7 +76,7 @@ def trig0(eq):
60
76
  return a, b
61
77
  if eq.name == "f_arccosec":
62
78
  return (1/eq.children[0]).fx("arcsin")
63
-
79
+
64
80
  if eq.name == "f_arctan":
65
81
  if eq.children[0].name == "d_0":
66
82
  return tree_form("d_0")
@@ -77,7 +93,7 @@ def trig0(eq):
77
93
  return eq.children[0].fx("sin")**-1
78
94
  if eq.name == "f_cot":
79
95
  return eq.children[0].fx("cos")/eq.children[0].fx("sin")
80
-
96
+
81
97
  if eq.name == "f_sin":
82
98
  if eq.children[0].name == "f_arcsin":
83
99
  return eq.children[0].children[0]
@@ -87,7 +103,7 @@ def trig0(eq):
87
103
  out=single_pi(lst)
88
104
  if out is not None and tuple(out) in trig_sin_table.keys():
89
105
  return trig_sin_table[tuple(out)]
90
-
106
+
91
107
  if eq.name == "f_cos":
92
108
  if eq.children[0].name == "f_arccos":
93
109
  return eq.children[0].children[0]
@@ -128,7 +144,7 @@ def product_to_sum(expr):
128
144
  out =((A - B).fx("cos") + (A + B).fx("cos")) / tree_form("d_2")
129
145
  elif a.name == "f_sin" and b.name == "f_cos":
130
146
  out =((A + B).fx("sin") + (A - B).fx("sin")) / tree_form("d_2")
131
-
147
+
132
148
  return out * product(other)
133
149
 
134
150
  rest = tree_form("d_1")
@@ -138,7 +154,7 @@ def product_to_sum(expr):
138
154
  for i in range(0, len(lst), 2):
139
155
  out.append(product_to_sum(product(lst[i:i+2])))
140
156
  expr = product(out)*rest*product(other)
141
-
157
+
142
158
  return dowhile(expr, cog)
143
159
 
144
160
  def trig_formula_init():
@@ -156,7 +172,7 @@ def trig_formula_init():
156
172
  formula_list = [[simplify(parse(y)) for y in x] for x in formula_list]
157
173
  expr = [[parse("A"), parse("1")], [parse("B")], [parse("C"), parse("1")], [parse("D")]]
158
174
  return [formula_list, var, expr]
159
- #formula_gen4 = trig_formula_init()
175
+
160
176
  def trig3(eq):
161
177
  def iseven(eq):
162
178
  if eq.name[:2] != "d_":
@@ -164,7 +180,7 @@ def trig3(eq):
164
180
  if int(eq.name[2:]) < 2 or int(eq.name[2:]) % 2 != 0:
165
181
  return False
166
182
  return True
167
-
183
+
168
184
  if eq.name == "f_sin":
169
185
  lst = factor_generation(eq.children[0])
170
186
  if any(iseven(item) for item in lst):
@@ -179,7 +195,7 @@ def noneg_pow(eq):
179
195
  if eq.name == "f_pow" and frac(eq.children[1]) is not None and frac(eq.children[1])<0:
180
196
  return (eq.children[0]**(simplify(-eq.children[1])))**-1
181
197
  return TreeNode(eq.name, [noneg_pow(child) for child in eq.children])
182
-
198
+
183
199
  def trig1(eq):
184
200
  eq = noneg_pow(eq)
185
201
  return product_to_sum(eq)
@@ -231,7 +247,7 @@ def trig4(eq):
231
247
  if eq.children[0].name == "f_arctan":
232
248
  a = eq.children[0].children[0]
233
249
  return tree_form("d_1")/(1+a**2)**(tree_form("d_2")**-1)
234
-
250
+
235
251
  return TreeNode(eq.name, [_trig4(child, False, chance) if eq.name != "f_add" and\
236
252
  (not numer or (eq.name == "f_pow" and frac(eq.children[1]) is not None and frac(eq.children[1]) < 0))\
237
253
  else _trig4(child, True, chance) for child in eq.children])
@@ -240,15 +256,13 @@ def trig4(eq):
240
256
  eq = _trig4(eq,"cos")
241
257
  return eq
242
258
  def trig2(eq):
243
- # Base case: if not an addition, recurse into children
259
+
244
260
  if eq.name != "f_add":
245
261
  return TreeNode(eq.name, [trig2(child) for child in eq.children])
246
262
 
247
- # Try all pairs in the addition
248
263
  for i, j in itertools.combinations(range(len(eq.children)), 2):
249
264
  c1, c2 = eq.children[i], eq.children[j]
250
265
 
251
- # Combine only sin/sin or cos/cos
252
266
  if c1.name in ["f_sin", "f_cos"] and c2.name in ["f_sin", "f_cos"]:
253
267
  A, B = c1.children[0], c2.children[0]
254
268
  rest = [eq.children[k] for k in range(len(eq.children)) if k not in (i, j)]
@@ -256,21 +270,18 @@ def trig2(eq):
256
270
 
257
271
  two = tree_form("d_2")
258
272
 
259
- # sinA + sinB
260
273
  if c1.name == "f_sin" and c2.name == "f_sin":
261
274
  combined = two * ((A + B) / two).fx("sin") * ((A - B) / two).fx("cos")
262
275
 
263
- # cosA + cosB
264
276
  elif c1.name == "f_cos" and c2.name == "f_cos":
265
277
  combined = two * ((A + B) / two).fx("cos") * ((A - B) / two).fx("cos")
266
278
 
267
- # sinA + cosB (leave unchanged)
268
279
  else:
269
280
  continue
270
281
 
271
282
  new_expr = rest_tree + combined
272
- # Re-run trig2 in case there are more sin/cos sums to simplify
283
+
273
284
  return trig2(new_expr)
274
285
 
275
- # If no sin/cos pairs found, just recurse on children
276
286
  return TreeNode(eq.name, [trig2(child) for child in eq.children])
287
+
@@ -3,7 +3,6 @@ import itertools
3
3
  from .base import *
4
4
  from .inverse import inverse
5
5
  from collections import Counter
6
- #from .factor import factor2
7
6
  from .simplify import simplify
8
7
  from .expand import expand
9
8
  from .fraction import fraction
@@ -421,7 +420,7 @@ def handle_sqrt(eq):
421
420
  if sgn == False:
422
421
  n = tree_form("d_-1")
423
422
  d.append(TreeNode("f_ge", [eq2,tree_form("d_0")]))
424
- #d.append(TreeNode("f_ge", [item.children[0],tree_form("d_0")]))
423
+
425
424
  eq3 = simplify(expand(simplify(eq2**2)))
426
425
 
427
426
  return simplify(TreeNode(eq.name, [simplify(n*item.children[0]-eq3*n), tree_form("d_0")]))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.7.8
3
+ Version: 0.8.0
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
6
  Requires-Python: >=3.7
@@ -0,0 +1,28 @@
1
+ mathai/__init__.py,sha256=JdRPSes54qhzvi6f8Rni2sXljzzirrWZsaCmu9W9rws,1525
2
+ mathai/apart.py,sha256=VSS3khE9PNuxiRvdU5JDl4IN-KJBSIFjwR17pkhviXI,4197
3
+ mathai/base.py,sha256=zha7eOnfLjJuQcwi29rE0588U1R8v-0zulVPatr2aQo,14843
4
+ mathai/bivariate_inequality.py,sha256=Da-A1kqVynR0tNOlEI7GSTf5T2vNkcF4etL9-EoyPJg,11415
5
+ mathai/diff.py,sha256=GEiAGMCTT0dO-ULTUGvTlBKy-Io-r2xcgvFJfmqGurY,6879
6
+ mathai/expand.py,sha256=yioVkQrtCz1fC8npcnokN1WwvJlGxrO1D4aKn8F8ky0,1757
7
+ mathai/factor.py,sha256=mz_UlPuAqwvsextLB0FM5KWIuuDiMMKG51bXrofqzw8,12830
8
+ mathai/fraction.py,sha256=44RuEPQ8z2CGhnxFXrHIy4MkgaE4QDtu7-sEV12GWjc,2597
9
+ mathai/integrate.py,sha256=6Ik_uAzkLyOWCE9M7mqwH_SVTvEdiG0-UYS2KsDgjLI,17454
10
+ mathai/inverse.py,sha256=ya7P8WjzfaAL3UXL7xqOh5GaIsXLDZ-F6lZFy3IEgaQ,2931
11
+ mathai/limit.py,sha256=9F8i9UZh2xb-V8A5Sd1gdhDf9c2RFgpE1GdNn9MvbWI,5703
12
+ mathai/linear.py,sha256=36mcYq2mzSidxC2F9gmaMHrXO9vNHYH9kX8CNsopyW8,5145
13
+ mathai/logic.py,sha256=wUenUEcIazQH2jnka43QQ9XpLQgY7x3Rq2QUxzFzf-U,9569
14
+ mathai/matrix.py,sha256=k8gIasxtEF1t_B0mJSbDvUJ3FDddvYI8hhy0FMMQ54k,5416
15
+ mathai/ode.py,sha256=F0Z_Zv2YsnVf4HwIJmqvIenjONaItzy5H739THkLvcU,11616
16
+ mathai/parser.py,sha256=vXpDobXd6de3-1zdeXVDcZ817oiGM_o2RoVwgUc4U9s,6785
17
+ mathai/pde.py,sha256=KL1UFPrfyp8lI1p-mXUaEPo4Yia2GkCw9oZT2R1zhKI,3576
18
+ mathai/printeq.py,sha256=4UgLJo-vV_YlVw_3QUQY_jQMHrFnG-ZKAyVZsd7yD6o,1450
19
+ mathai/simplify.py,sha256=7V7nnFWoTGiDuTRUKP2WihDkZ6GakHD10csXIHrA4v4,13656
20
+ mathai/statistics.py,sha256=ifmaXFzRc6vIgPFWP-9EDfZZYmmMGw-WEKhoQZUaHXo,884
21
+ mathai/structure.py,sha256=u4usB0yPnem2VscgEBqKWxRN9Y4tTjymEaQh1de5Bsk,4121
22
+ mathai/tool.py,sha256=Wjp8pcBu7MkJr-oAa_bFzKr9mNAB9WrpPISSJd4p-x0,5407
23
+ mathai/trig.py,sha256=tkn6NgfXj5XzjVB261SuX_mx2g3stqNksoco4O6so90,10713
24
+ mathai/univariate_inequality.py,sha256=QoE6lZW_cUXa5sbbvwz88DjAVSY--RZt03w02edCVtA,16375
25
+ mathai-0.8.0.dist-info/METADATA,sha256=RaL-uVubiBKVs7rz5DdcPKe9ri9Ihe0llTv6bA-7ElY,7735
26
+ mathai-0.8.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
27
+ mathai-0.8.0.dist-info/top_level.txt,sha256=ROP4l3OhGYw3ihkQGASr18xM9GsK4z3_6whV5AyXLwE,7
28
+ mathai-0.8.0.dist-info/RECORD,,
mathai/console.py DELETED
@@ -1,84 +0,0 @@
1
- import copy
2
- from .expand import expand
3
- from .parser import parse
4
- from .printeq import printeq, printeq_log
5
- from .simplify import solve, simplify
6
-
7
- from .diff import diff
8
- from .base import *
9
- from .factor import _factorconst, factor
10
- from .fraction import fraction
11
- from .inverse import inverse
12
- from .trig import trig0, trig1, trig2, trig3, trig4
13
- from .logic import logic0, logic1, logic2, logic3
14
- from .apart import apart
15
-
16
- def console():
17
- eq = None
18
- orig = None
19
- while True:
20
- command = input(">>> ")
21
- try:
22
- orig = copy.deepcopy(eq)
23
- if command == "expand":
24
- eq = expand(eq)
25
- elif command.split(" ")[0] == "inverse":
26
- eq=simplify(eq)
27
- if eq.name == "f_eq":
28
- eq3 = eq.children[0]-eq.children[1]
29
- eq2 = parse(command.split(" ")[1])
30
- out = inverse(eq3, str_form(eq2))
31
- eq = TreeNode(eq.name, [eq2,out])
32
- elif command == "apart":
33
- eq = apart(eq, vlist(eq)[0])
34
- elif command == "rawprint":
35
- print(eq)
36
- elif command == "logic0":
37
- eq = logic0(eq)
38
- elif command == "logic1":
39
- eq = logic1(eq)
40
- elif command == "logic2":
41
- eq = logic2(eq)
42
- elif command == "logic3":
43
- eq = logic3(eq)
44
- elif command == "trig0":
45
- eq = trig0(eq)
46
- elif command == "trig1":
47
- eq = trig1(eq)
48
- elif command == "factor":
49
- eq = factor(eq)
50
- elif command == "trig2":
51
- eq = trig2(eq)
52
- elif command == "trig3":
53
- eq = trig3(eq)
54
- elif command == "trig4":
55
- eq = trig4(eq)
56
- elif command == "simplify":
57
- eq = _factorconst(eq)
58
- eq = simplify(eq)
59
- elif command == "fraction":
60
- eq = fraction(eq)
61
- elif command.split(" ")[0] in ["integrate", "sqint", "byparts"]:
62
- if command.split(" ")[0] == "sqint":
63
- typesqint()
64
- elif command.split(" ")[0] == "byparts":
65
- typebyparts()
66
- elif command.split(" ")[0] == "integrate":
67
- typeintegrate()
68
- out = integrate(eq, parse(command.split(" ")[1]).name)
69
- if out is None:
70
- print("failed to integrate")
71
- else:
72
- eq, logs = out
73
- eq = simplify(eq)
74
- printeq_log(logs)
75
- print()
76
- elif command.split(" ")[0] == "diff":
77
- eq = diff(eq, parse(command.split(" ")[1]).name)
78
- else:
79
- eq = parse(command)
80
- eq = copy.deepcopy(eq)
81
- printeq(eq)
82
- except:
83
- eq = copy.deepcopy(orig)
84
- print("error")
mathai/parsetab.py DELETED
@@ -1,61 +0,0 @@
1
-
2
- # parsetab.py
3
- # This file is automatically generated. Do not edit.
4
- # pylint: disable=W,C,R
5
- _tabversion = '3.10'
6
-
7
- _lr_method = 'LALR'
8
-
9
- _lr_signature = 'leftEQUIVleftIMPLYleftORleftANDleftEQLTGTLEGEleftPLUSMINUSleftTIMESDIVDOTrightPOWrightNOTUMINUSUPLUSAND CAPITAL_ID CNUMBER COMMA DIV DOT EQ EQUIV GE GT IMPLY LBRACK LE LPAREN LT MINUS NOT NUMBER OR PLUS POW RBRACK RPAREN STRING TIMES VARIABLEstart : exprexpr : expr EQUIV exprexpr : expr IMPLY exprexpr : expr OR exprexpr : expr AND exprexpr : NOT exprexpr : expr EQ expr\n | expr LT expr\n | expr GT expr\n | expr LE expr\n | expr GE exprexpr : expr PLUS expr\n | expr MINUS exprexpr : expr TIMES expr\n | expr DIV expr\n | expr DOT exprexpr : expr POW exprexpr : MINUS expr %prec UMINUSexpr : PLUS expr %prec UPLUSexpr : atomexpr : LPAREN expr RPARENexpr : LBRACK expr_list RBRACKexpr : LBRACK RBRACKexpr_list : expr_list COMMA exprexpr_list : exprexpr : VARIABLE LPAREN expr_list RPARENatom : VARIABLE\n | CAPITAL_ID\n | NUMBER\n | CNUMBER\n | STRING'
10
-
11
- _lr_action_items = {'NOT':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,]),'MINUS':([0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,],[5,24,5,5,5,-20,5,5,-27,-28,-29,-30,-31,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,-6,-19,-18,24,-23,24,5,24,24,24,24,24,24,24,24,24,-12,-13,-14,-15,-16,-17,-21,-22,5,24,-26,]),'PLUS':([0,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,56,57,],[4,23,4,4,4,-20,4,4,-27,-28,-29,-30,-31,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,-6,-19,-18,23,-23,23,4,23,23,23,23,23,23,23,23,23,-12,-13,-14,-15,-16,-17,-21,-22,4,23,-26,]),'LPAREN':([0,3,4,5,7,8,9,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[7,7,7,7,7,7,36,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,]),'LBRACK':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,]),'VARIABLE':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,]),'CAPITAL_ID':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,]),'NUMBER':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,]),'CNUMBER':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,]),'STRING':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,13,]),'$end':([1,2,6,9,10,11,12,13,29,30,31,34,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,57,],[0,-1,-20,-27,-28,-29,-30,-31,-6,-19,-18,-23,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,-26,]),'EQUIV':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[14,-20,-27,-28,-29,-30,-31,-6,-19,-18,14,-23,14,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,14,-26,]),'IMPLY':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[15,-20,-27,-28,-29,-30,-31,-6,-19,-18,15,-23,15,15,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,15,-26,]),'OR':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[16,-20,-27,-28,-29,-30,-31,-6,-19,-18,16,-23,16,16,16,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,16,-26,]),'AND':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[17,-20,-27,-28,-29,-30,-31,-6,-19,-18,17,-23,17,17,17,17,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,17,-26,]),'EQ':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[18,-20,-27,-28,-29,-30,-31,-6,-19,-18,18,-23,18,18,18,18,18,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,18,-26,]),'LT':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[19,-20,-27,-28,-29,-30,-31,-6,-19,-18,19,-23,19,19,19,19,19,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,19,-26,]),'GT':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[20,-20,-27,-28,-29,-30,-31,-6,-19,-18,20,-23,20,20,20,20,20,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,20,-26,]),'LE':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[21,-20,-27,-28,-29,-30,-31,-6,-19,-18,21,-23,21,21,21,21,21,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,21,-26,]),'GE':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[22,-20,-27,-28,-29,-30,-31,-6,-19,-18,22,-23,22,22,22,22,22,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,22,-26,]),'TIMES':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[25,-20,-27,-28,-29,-30,-31,-6,-19,-18,25,-23,25,25,25,25,25,25,25,25,25,25,25,25,-14,-15,-16,-17,-21,-22,25,-26,]),'DIV':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[26,-20,-27,-28,-29,-30,-31,-6,-19,-18,26,-23,26,26,26,26,26,26,26,26,26,26,26,26,-14,-15,-16,-17,-21,-22,26,-26,]),'DOT':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[27,-20,-27,-28,-29,-30,-31,-6,-19,-18,27,-23,27,27,27,27,27,27,27,27,27,27,27,27,-14,-15,-16,-17,-21,-22,27,-26,]),'POW':([2,6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[28,-20,-27,-28,-29,-30,-31,-6,-19,-18,28,-23,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,-21,-22,28,-26,]),'RPAREN':([6,9,10,11,12,13,29,30,31,32,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,],[-20,-27,-28,-29,-30,-31,-6,-19,-18,52,-23,-25,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,57,-24,-26,]),'RBRACK':([6,8,9,10,11,12,13,29,30,31,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,56,57,],[-20,34,-27,-28,-29,-30,-31,-6,-19,-18,53,-23,-25,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,-24,-26,]),'COMMA':([6,9,10,11,12,13,29,30,31,33,34,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,55,56,57,],[-20,-27,-28,-29,-30,-31,-6,-19,-18,54,-23,-25,-2,-3,-4,-5,-7,-8,-9,-10,-11,-12,-13,-14,-15,-16,-17,-21,-22,54,-24,-26,]),}
12
-
13
- _lr_action = {}
14
- for _k, _v in _lr_action_items.items():
15
- for _x,_y in zip(_v[0],_v[1]):
16
- if not _x in _lr_action: _lr_action[_x] = {}
17
- _lr_action[_x][_k] = _y
18
- del _lr_action_items
19
-
20
- _lr_goto_items = {'start':([0,],[1,]),'expr':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[2,29,30,31,32,35,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,35,56,]),'atom':([0,3,4,5,7,8,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,36,54,],[6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,]),'expr_list':([8,36,],[33,55,]),}
21
-
22
- _lr_goto = {}
23
- for _k, _v in _lr_goto_items.items():
24
- for _x, _y in zip(_v[0], _v[1]):
25
- if not _x in _lr_goto: _lr_goto[_x] = {}
26
- _lr_goto[_x][_k] = _y
27
- del _lr_goto_items
28
- _lr_productions = [
29
- ("S' -> start","S'",1,None,None,None),
30
- ('start -> expr','start',1,'p_start','parser.py',98),
31
- ('expr -> expr EQUIV expr','expr',3,'p_expr_equiv','parser.py',105),
32
- ('expr -> expr IMPLY expr','expr',3,'p_expr_imply','parser.py',109),
33
- ('expr -> expr OR expr','expr',3,'p_expr_or','parser.py',113),
34
- ('expr -> expr AND expr','expr',3,'p_expr_and','parser.py',117),
35
- ('expr -> NOT expr','expr',2,'p_expr_not','parser.py',121),
36
- ('expr -> expr EQ expr','expr',3,'p_expr_cmp','parser.py',128),
37
- ('expr -> expr LT expr','expr',3,'p_expr_cmp','parser.py',129),
38
- ('expr -> expr GT expr','expr',3,'p_expr_cmp','parser.py',130),
39
- ('expr -> expr LE expr','expr',3,'p_expr_cmp','parser.py',131),
40
- ('expr -> expr GE expr','expr',3,'p_expr_cmp','parser.py',132),
41
- ('expr -> expr PLUS expr','expr',3,'p_expr_add','parser.py',146),
42
- ('expr -> expr MINUS expr','expr',3,'p_expr_add','parser.py',147),
43
- ('expr -> expr TIMES expr','expr',3,'p_expr_mul','parser.py',154),
44
- ('expr -> expr DIV expr','expr',3,'p_expr_mul','parser.py',155),
45
- ('expr -> expr DOT expr','expr',3,'p_expr_mul','parser.py',156),
46
- ('expr -> expr POW expr','expr',3,'p_expr_pow','parser.py',165),
47
- ('expr -> MINUS expr','expr',2,'p_expr_uminus','parser.py',172),
48
- ('expr -> PLUS expr','expr',2,'p_expr_uplus','parser.py',176),
49
- ('expr -> atom','expr',1,'p_expr_atom','parser.py',183),
50
- ('expr -> LPAREN expr RPAREN','expr',3,'p_expr_paren','parser.py',187),
51
- ('expr -> LBRACK expr_list RBRACK','expr',3,'p_expr_list','parser.py',191),
52
- ('expr -> LBRACK RBRACK','expr',2,'p_expr_list_single','parser.py',195),
53
- ('expr_list -> expr_list COMMA expr','expr_list',3,'p_expr_list_list','parser.py',199),
54
- ('expr_list -> expr','expr_list',1,'p_expr_list_item','parser.py',203),
55
- ('expr -> VARIABLE LPAREN expr_list RPAREN','expr',4,'p_expr_func','parser.py',207),
56
- ('atom -> VARIABLE','atom',1,'p_atom_var','parser.py',214),
57
- ('atom -> CAPITAL_ID','atom',1,'p_atom_var','parser.py',215),
58
- ('atom -> NUMBER','atom',1,'p_atom_var','parser.py',216),
59
- ('atom -> CNUMBER','atom',1,'p_atom_var','parser.py',217),
60
- ('atom -> STRING','atom',1,'p_atom_var','parser.py',218),
61
- ]
@@ -1,30 +0,0 @@
1
- mathai/__init__.py,sha256=JdRPSes54qhzvi6f8Rni2sXljzzirrWZsaCmu9W9rws,1525
2
- mathai/apart.py,sha256=VSS3khE9PNuxiRvdU5JDl4IN-KJBSIFjwR17pkhviXI,4197
3
- mathai/base.py,sha256=zha7eOnfLjJuQcwi29rE0588U1R8v-0zulVPatr2aQo,14843
4
- mathai/bivariate_inequality.py,sha256=Da-A1kqVynR0tNOlEI7GSTf5T2vNkcF4etL9-EoyPJg,11415
5
- mathai/console.py,sha256=Sn58iwYE79MLEh67s8X3q6vZjw6g7f9XM1T8_dBBR2o,3048
6
- mathai/diff.py,sha256=GEiAGMCTT0dO-ULTUGvTlBKy-Io-r2xcgvFJfmqGurY,6879
7
- mathai/expand.py,sha256=IuzMX6emCT480VE27aCtR0eWU-rJ2VElvRLVa2xcRw0,2582
8
- mathai/factor.py,sha256=mz_UlPuAqwvsextLB0FM5KWIuuDiMMKG51bXrofqzw8,12830
9
- mathai/fraction.py,sha256=3Qer3K20ZO2exMAYp1z80H69qRjVMfWKg5Ik0Ud8wf4,4402
10
- mathai/integrate.py,sha256=dA5AilUSOf4axVzi6KAF3OIaxmTetFjKt-5OpEaiYuo,17366
11
- mathai/inverse.py,sha256=ya7P8WjzfaAL3UXL7xqOh5GaIsXLDZ-F6lZFy3IEgaQ,2931
12
- mathai/limit.py,sha256=9F8i9UZh2xb-V8A5Sd1gdhDf9c2RFgpE1GdNn9MvbWI,5703
13
- mathai/linear.py,sha256=viGlPU8BPrjLWHlyNUvnfPHNH5d4ZBImiQMdyXaKGg0,5702
14
- mathai/logic.py,sha256=Ndz4Fd6aNCmzFlqoPyyIpSmV_BXmYHsurePjLyZJoNc,9809
15
- mathai/matrix.py,sha256=MFe6tUL4a3jYuP13fXWGwER_34AbqfoOK5kHwVHfsKk,7169
16
- mathai/ode.py,sha256=x6pAzml9pWZ-sr2k6JRfHTX1OJT82Tx7Yf-kTfAOe7E,9104
17
- mathai/parser.py,sha256=7NWPPzci7MZazkGG_q5uUyKCOZ_-rqvOhp9UZjzBNc4,7100
18
- mathai/parsetab.py,sha256=TL-4jvRM_Tx6ipwet8CFJc2DkjR4tGsbrGF_r4IC8xI,9651
19
- mathai/pde.py,sha256=JpPU73tGu1UH4ysLFeM1GaX-3ZdjykLu7CUdi1tfUTo,3814
20
- mathai/printeq.py,sha256=4UgLJo-vV_YlVw_3QUQY_jQMHrFnG-ZKAyVZsd7yD6o,1450
21
- mathai/simplify.py,sha256=bCtYyLyc3pY04hta-MU62ii5-O4zUwGHjs1Q4WBYEvY,19680
22
- mathai/statistics.py,sha256=ifmaXFzRc6vIgPFWP-9EDfZZYmmMGw-WEKhoQZUaHXo,884
23
- mathai/structure.py,sha256=wrU7kqphSN7CqaVffyHHXD2-3t5My_Z_TtYFoUe_lTU,4099
24
- mathai/tool.py,sha256=ozcXTXLbKUnyPM9r9kz9M43YA2CBcWezcqLZfEs8rpc,6051
25
- mathai/trig.py,sha256=fnBbfiopcQzFg4ya1BoO5M0X_aCBnse2bjnKh1juw4I,11223
26
- mathai/univariate_inequality.py,sha256=LPFdWgC1y5zBwnsy1wwZxj-yP_SbqFDhCmTTzhuwoiY,16469
27
- mathai-0.7.8.dist-info/METADATA,sha256=13qi9377FQiULbVaonDa0-auk8pBon8jah_xZykHCP4,7735
28
- mathai-0.7.8.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
29
- mathai-0.7.8.dist-info/top_level.txt,sha256=ROP4l3OhGYw3ihkQGASr18xM9GsK4z3_6whV5AyXLwE,7
30
- mathai-0.7.8.dist-info/RECORD,,
File without changes