mathai 0.7.1__tar.gz → 0.7.2__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 (33) hide show
  1. {mathai-0.7.1 → mathai-0.7.2}/PKG-INFO +60 -6
  2. {mathai-0.7.1 → mathai-0.7.2}/README.md +59 -3
  3. {mathai-0.7.1 → mathai-0.7.2}/mathai.egg-info/PKG-INFO +60 -6
  4. {mathai-0.7.1 → mathai-0.7.2}/setup.py +1 -2
  5. {mathai-0.7.1 → mathai-0.7.2}/mathai/__init__.py +0 -0
  6. {mathai-0.7.1 → mathai-0.7.2}/mathai/apart.py +0 -0
  7. {mathai-0.7.1 → mathai-0.7.2}/mathai/base.py +0 -0
  8. {mathai-0.7.1 → mathai-0.7.2}/mathai/bivariate_inequality.py +0 -0
  9. {mathai-0.7.1 → mathai-0.7.2}/mathai/console.py +0 -0
  10. {mathai-0.7.1 → mathai-0.7.2}/mathai/diff.py +0 -0
  11. {mathai-0.7.1 → mathai-0.7.2}/mathai/expand.py +0 -0
  12. {mathai-0.7.1 → mathai-0.7.2}/mathai/factor.py +0 -0
  13. {mathai-0.7.1 → mathai-0.7.2}/mathai/fraction.py +0 -0
  14. {mathai-0.7.1 → mathai-0.7.2}/mathai/integrate.py +0 -0
  15. {mathai-0.7.1 → mathai-0.7.2}/mathai/inverse.py +0 -0
  16. {mathai-0.7.1 → mathai-0.7.2}/mathai/limit.py +0 -0
  17. {mathai-0.7.1 → mathai-0.7.2}/mathai/linear.py +0 -0
  18. {mathai-0.7.1 → mathai-0.7.2}/mathai/logic.py +0 -0
  19. {mathai-0.7.1 → mathai-0.7.2}/mathai/matrix.py +0 -0
  20. {mathai-0.7.1 → mathai-0.7.2}/mathai/ode.py +0 -0
  21. {mathai-0.7.1 → mathai-0.7.2}/mathai/parser.py +0 -0
  22. {mathai-0.7.1 → mathai-0.7.2}/mathai/parsetab.py +0 -0
  23. {mathai-0.7.1 → mathai-0.7.2}/mathai/printeq.py +0 -0
  24. {mathai-0.7.1 → mathai-0.7.2}/mathai/simplify.py +0 -0
  25. {mathai-0.7.1 → mathai-0.7.2}/mathai/structure.py +0 -0
  26. {mathai-0.7.1 → mathai-0.7.2}/mathai/tool.py +0 -0
  27. {mathai-0.7.1 → mathai-0.7.2}/mathai/trig.py +0 -0
  28. {mathai-0.7.1 → mathai-0.7.2}/mathai/univariate_inequality.py +0 -0
  29. {mathai-0.7.1 → mathai-0.7.2}/mathai.egg-info/SOURCES.txt +0 -0
  30. {mathai-0.7.1 → mathai-0.7.2}/mathai.egg-info/dependency_links.txt +0 -0
  31. {mathai-0.7.1 → mathai-0.7.2}/mathai.egg-info/requires.txt +0 -0
  32. {mathai-0.7.1 → mathai-0.7.2}/mathai.egg-info/top_level.txt +0 -0
  33. {mathai-0.7.1 → mathai-0.7.2}/setup.cfg +0 -0
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
- Author: educated indians are having a low iq and are good for nothing
7
6
  Requires-Python: >=3.7
8
7
  Description-Content-Type: text/markdown
9
8
  Requires-Dist: lark-parser
10
- Dynamic: author
11
9
  Dynamic: description
12
10
  Dynamic: description-content-type
13
11
  Dynamic: home-page
@@ -117,7 +115,7 @@ printeq(equation)
117
115
 
118
116
  ### Demonstrations
119
117
 
120
- #### Example Demonstration 1
118
+ #### Example Demonstration 1 (absolute value inequalities)
121
119
  ```python
122
120
  from mathai import *
123
121
  question_list_from_lecture = [
@@ -157,7 +155,7 @@ for item in question_list_from_lecture:
157
155
  (-inf,-(7/3))
158
156
  ```
159
157
 
160
- #### Example Demonstration 2
158
+ #### Example Demonstration 2 (trigonometry)
161
159
  ```python
162
160
  from mathai import *
163
161
  def nested_func(eq_node):
@@ -182,7 +180,7 @@ true
182
180
  true
183
181
  ```
184
182
 
185
- #### Example Demonstration 3
183
+ #### Example Demonstration 3 (integration)
186
184
  ```python
187
185
  from mathai import *
188
186
 
@@ -237,3 +235,59 @@ cos(cos(x))
237
235
  -((e^-(x^2))/2)
238
236
  -(((8*sin((2*x)))-(12*x)-sin((4*x)))/32)
239
237
  ```
238
+
239
+ #### Example Demonstration 4 (derivation of hydrogen atom's ground state energy in electron volts using the variational principle in quantum physics)
240
+ ```python
241
+ from mathai import *;
242
+ def auto_integration(eq):
243
+ for _ in range(3):
244
+ eq=dowhile(integrate_subs(eq),lambda x:integrate_summation(integrate_const(integrate_formula(simplify(expand(x))))));
245
+ out=integrate_clean(copy.deepcopy(eq));
246
+ if "f_integrate" not in str_form(out):return dowhile(out,lambda x:simplify(fraction(x)));
247
+ eq=integrate_byparts(eq);
248
+ return eq;
249
+ z,k,m,e1,hbar=map(lambda s:simplify(parse(s)),["1","8987551787","9109383701*10^(-40)","1602176634*10^(-28)","1054571817*10^(-43)"]);
250
+ pi,euler,r=tree_form("s_pi"),tree_form("s_e"),parse("r");a0=hbar**2/(k*e1**2*m);psi=((z**3/(pi*a0**3)).fx("sqrt"))*euler**(-(z/a0)*r);
251
+ laplace_psi=diff(r**2*diff(psi,r.name),r.name)/r**2;V=-(k*z*e1**2)/r;Hpsi=-hbar**2/(2*m)*laplace_psi+V*psi;
252
+ norm=lambda f:simplify(
253
+ limit3(limit2(expand(TreeNode("f_limitpinf",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))))
254
+ -limit1(TreeNode("f_limit",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))
255
+ );
256
+ print(compute(norm(psi*Hpsi)/(norm(psi**2)*e1)));
257
+ ```
258
+ #### Output
259
+
260
+ ```
261
+ -13.605693122882867
262
+ ```
263
+
264
+ #### Example Demonstration 5 (boolean algebra)
265
+ ```python
266
+ from mathai import *
267
+ print(logic_n(simplify(parse("~(p<->q)<->(~p<->q)"))))
268
+ print(logic_n(simplify(parse("(p->q)<->(~q->~p)"))))
269
+ ```
270
+ #### Output
271
+
272
+ ```
273
+ true
274
+ true
275
+ ```
276
+
277
+ #### Example Demonstration 6 (limits)
278
+ ```python
279
+ from mathai import *
280
+ limits = ["(e^(tan(x)) - 1 - tan(x)) / x^2", "sin(x)/x", "(1-cos(x))/x^2", "(sin(x)-x)/sin(x)^3"]
281
+ for q in limits:
282
+ q = fraction(simplify(TreeNode("f_limit",[parse(q),parse("x")])))
283
+ q = limit1(q)
284
+ print(q)
285
+ ```
286
+ #### Output
287
+
288
+ ```
289
+ 1/2
290
+ 1
291
+ 1/2
292
+ -(1/6)
293
+ ```
@@ -100,7 +100,7 @@ printeq(equation)
100
100
 
101
101
  ### Demonstrations
102
102
 
103
- #### Example Demonstration 1
103
+ #### Example Demonstration 1 (absolute value inequalities)
104
104
  ```python
105
105
  from mathai import *
106
106
  question_list_from_lecture = [
@@ -140,7 +140,7 @@ for item in question_list_from_lecture:
140
140
  (-inf,-(7/3))
141
141
  ```
142
142
 
143
- #### Example Demonstration 2
143
+ #### Example Demonstration 2 (trigonometry)
144
144
  ```python
145
145
  from mathai import *
146
146
  def nested_func(eq_node):
@@ -165,7 +165,7 @@ true
165
165
  true
166
166
  ```
167
167
 
168
- #### Example Demonstration 3
168
+ #### Example Demonstration 3 (integration)
169
169
  ```python
170
170
  from mathai import *
171
171
 
@@ -219,4 +219,60 @@ cos(cos(x))
219
219
  ((6*((2+x)^(5/2)))-(20*((2+x)^(3/2))))/15
220
220
  -((e^-(x^2))/2)
221
221
  -(((8*sin((2*x)))-(12*x)-sin((4*x)))/32)
222
+ ```
223
+
224
+ #### Example Demonstration 4 (derivation of hydrogen atom's ground state energy in electron volts using the variational principle in quantum physics)
225
+ ```python
226
+ from mathai import *;
227
+ def auto_integration(eq):
228
+ for _ in range(3):
229
+ eq=dowhile(integrate_subs(eq),lambda x:integrate_summation(integrate_const(integrate_formula(simplify(expand(x))))));
230
+ out=integrate_clean(copy.deepcopy(eq));
231
+ if "f_integrate" not in str_form(out):return dowhile(out,lambda x:simplify(fraction(x)));
232
+ eq=integrate_byparts(eq);
233
+ return eq;
234
+ z,k,m,e1,hbar=map(lambda s:simplify(parse(s)),["1","8987551787","9109383701*10^(-40)","1602176634*10^(-28)","1054571817*10^(-43)"]);
235
+ pi,euler,r=tree_form("s_pi"),tree_form("s_e"),parse("r");a0=hbar**2/(k*e1**2*m);psi=((z**3/(pi*a0**3)).fx("sqrt"))*euler**(-(z/a0)*r);
236
+ laplace_psi=diff(r**2*diff(psi,r.name),r.name)/r**2;V=-(k*z*e1**2)/r;Hpsi=-hbar**2/(2*m)*laplace_psi+V*psi;
237
+ norm=lambda f:simplify(
238
+ limit3(limit2(expand(TreeNode("f_limitpinf",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))))
239
+ -limit1(TreeNode("f_limit",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))
240
+ );
241
+ print(compute(norm(psi*Hpsi)/(norm(psi**2)*e1)));
242
+ ```
243
+ #### Output
244
+
245
+ ```
246
+ -13.605693122882867
247
+ ```
248
+
249
+ #### Example Demonstration 5 (boolean algebra)
250
+ ```python
251
+ from mathai import *
252
+ print(logic_n(simplify(parse("~(p<->q)<->(~p<->q)"))))
253
+ print(logic_n(simplify(parse("(p->q)<->(~q->~p)"))))
254
+ ```
255
+ #### Output
256
+
257
+ ```
258
+ true
259
+ true
260
+ ```
261
+
262
+ #### Example Demonstration 6 (limits)
263
+ ```python
264
+ from mathai import *
265
+ limits = ["(e^(tan(x)) - 1 - tan(x)) / x^2", "sin(x)/x", "(1-cos(x))/x^2", "(sin(x)-x)/sin(x)^3"]
266
+ for q in limits:
267
+ q = fraction(simplify(TreeNode("f_limit",[parse(q),parse("x")])))
268
+ q = limit1(q)
269
+ print(q)
270
+ ```
271
+ #### Output
272
+
273
+ ```
274
+ 1/2
275
+ 1
276
+ 1/2
277
+ -(1/6)
222
278
  ```
@@ -1,13 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: mathai
3
- Version: 0.7.1
3
+ Version: 0.7.2
4
4
  Summary: Mathematics solving Ai tailored to NCERT
5
5
  Home-page: https://github.com/infinity390/mathai4
6
- Author: educated indians are having a low iq and are good for nothing
7
6
  Requires-Python: >=3.7
8
7
  Description-Content-Type: text/markdown
9
8
  Requires-Dist: lark-parser
10
- Dynamic: author
11
9
  Dynamic: description
12
10
  Dynamic: description-content-type
13
11
  Dynamic: home-page
@@ -117,7 +115,7 @@ printeq(equation)
117
115
 
118
116
  ### Demonstrations
119
117
 
120
- #### Example Demonstration 1
118
+ #### Example Demonstration 1 (absolute value inequalities)
121
119
  ```python
122
120
  from mathai import *
123
121
  question_list_from_lecture = [
@@ -157,7 +155,7 @@ for item in question_list_from_lecture:
157
155
  (-inf,-(7/3))
158
156
  ```
159
157
 
160
- #### Example Demonstration 2
158
+ #### Example Demonstration 2 (trigonometry)
161
159
  ```python
162
160
  from mathai import *
163
161
  def nested_func(eq_node):
@@ -182,7 +180,7 @@ true
182
180
  true
183
181
  ```
184
182
 
185
- #### Example Demonstration 3
183
+ #### Example Demonstration 3 (integration)
186
184
  ```python
187
185
  from mathai import *
188
186
 
@@ -237,3 +235,59 @@ cos(cos(x))
237
235
  -((e^-(x^2))/2)
238
236
  -(((8*sin((2*x)))-(12*x)-sin((4*x)))/32)
239
237
  ```
238
+
239
+ #### Example Demonstration 4 (derivation of hydrogen atom's ground state energy in electron volts using the variational principle in quantum physics)
240
+ ```python
241
+ from mathai import *;
242
+ def auto_integration(eq):
243
+ for _ in range(3):
244
+ eq=dowhile(integrate_subs(eq),lambda x:integrate_summation(integrate_const(integrate_formula(simplify(expand(x))))));
245
+ out=integrate_clean(copy.deepcopy(eq));
246
+ if "f_integrate" not in str_form(out):return dowhile(out,lambda x:simplify(fraction(x)));
247
+ eq=integrate_byparts(eq);
248
+ return eq;
249
+ z,k,m,e1,hbar=map(lambda s:simplify(parse(s)),["1","8987551787","9109383701*10^(-40)","1602176634*10^(-28)","1054571817*10^(-43)"]);
250
+ pi,euler,r=tree_form("s_pi"),tree_form("s_e"),parse("r");a0=hbar**2/(k*e1**2*m);psi=((z**3/(pi*a0**3)).fx("sqrt"))*euler**(-(z/a0)*r);
251
+ laplace_psi=diff(r**2*diff(psi,r.name),r.name)/r**2;V=-(k*z*e1**2)/r;Hpsi=-hbar**2/(2*m)*laplace_psi+V*psi;
252
+ norm=lambda f:simplify(
253
+ limit3(limit2(expand(TreeNode("f_limitpinf",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))))
254
+ -limit1(TreeNode("f_limit",[auto_integration(TreeNode("f_integrate",[f*parse("4")*pi*r**2,r])),r]))
255
+ );
256
+ print(compute(norm(psi*Hpsi)/(norm(psi**2)*e1)));
257
+ ```
258
+ #### Output
259
+
260
+ ```
261
+ -13.605693122882867
262
+ ```
263
+
264
+ #### Example Demonstration 5 (boolean algebra)
265
+ ```python
266
+ from mathai import *
267
+ print(logic_n(simplify(parse("~(p<->q)<->(~p<->q)"))))
268
+ print(logic_n(simplify(parse("(p->q)<->(~q->~p)"))))
269
+ ```
270
+ #### Output
271
+
272
+ ```
273
+ true
274
+ true
275
+ ```
276
+
277
+ #### Example Demonstration 6 (limits)
278
+ ```python
279
+ from mathai import *
280
+ limits = ["(e^(tan(x)) - 1 - tan(x)) / x^2", "sin(x)/x", "(1-cos(x))/x^2", "(sin(x)-x)/sin(x)^3"]
281
+ for q in limits:
282
+ q = fraction(simplify(TreeNode("f_limit",[parse(q),parse("x")])))
283
+ q = limit1(q)
284
+ print(q)
285
+ ```
286
+ #### Output
287
+
288
+ ```
289
+ 1/2
290
+ 1
291
+ 1/2
292
+ -(1/6)
293
+ ```
@@ -2,11 +2,10 @@ from setuptools import setup, find_packages
2
2
 
3
3
  setup(
4
4
  name="mathai",
5
- version="0.7.1",
5
+ version="0.7.2",
6
6
  description="Mathematics solving Ai tailored to NCERT",
7
7
  long_description=open("README.md").read(),
8
8
  long_description_content_type="text/markdown",
9
- author="educated indians are having a low iq and are good for nothing",
10
9
  url="https://github.com/infinity390/mathai4",
11
10
  packages=find_packages(),
12
11
  install_requires=[
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes