passagemath-standard-no-symbolics 10.6.45__cp313-cp313-macosx_13_0_arm64.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.
Files changed (83) hide show
  1. passagemath_standard_no_symbolics/__init__.py +1 -0
  2. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grep +5 -0
  3. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-grepdoc +5 -0
  4. passagemath_standard_no_symbolics-10.6.45.data/scripts/sage-list-packages +103 -0
  5. passagemath_standard_no_symbolics-10.6.45.dist-info/METADATA +150 -0
  6. passagemath_standard_no_symbolics-10.6.45.dist-info/RECORD +83 -0
  7. passagemath_standard_no_symbolics-10.6.45.dist-info/WHEEL +6 -0
  8. passagemath_standard_no_symbolics-10.6.45.dist-info/top_level.txt +2 -0
  9. sage/all.py +207 -0
  10. sage/all_cmdline.py +36 -0
  11. sage/cli/__init__.py +61 -0
  12. sage/cli/__main__.py +5 -0
  13. sage/cli/eval_cmd.py +45 -0
  14. sage/cli/eval_cmd_test.py +25 -0
  15. sage/cli/interactive_shell_cmd.py +28 -0
  16. sage/cli/notebook_cmd.py +51 -0
  17. sage/cli/notebook_cmd_test.py +39 -0
  18. sage/cli/options.py +26 -0
  19. sage/cli/run_file_cmd.py +50 -0
  20. sage/cli/version_cmd.py +26 -0
  21. sage/databases/all.py +83 -0
  22. sage/databases/cubic_hecke_db.py +1527 -0
  23. sage/dynamics/all.py +31 -0
  24. sage/dynamics/surface_dynamics_deprecation.py +32 -0
  25. sage/ext_data/kenzo/CP2.txt +45 -0
  26. sage/ext_data/kenzo/CP3.txt +349 -0
  27. sage/ext_data/kenzo/CP4.txt +4774 -0
  28. sage/ext_data/kenzo/README.txt +49 -0
  29. sage/ext_data/kenzo/S4.txt +20 -0
  30. sage/ext_data/mwrank/PRIMES +1 -0
  31. sage/ext_data/nbconvert/postprocess.py +48 -0
  32. sage/ext_data/nbconvert/rst_sage.tpl +99 -0
  33. sage/ext_data/nodoctest +0 -0
  34. sage/ext_data/notebook-ipython/kernel.json.in +11 -0
  35. sage/ext_data/notebook-ipython/logo-64x64.png +0 -0
  36. sage/ext_data/notebook-ipython/logo.svg +352 -0
  37. sage/ext_data/valgrind/pyalloc.supp +58 -0
  38. sage/ext_data/valgrind/sage-additional.supp +417 -0
  39. sage/ext_data/valgrind/sage.supp +43 -0
  40. sage/ext_data/valgrind/valgrind-python.supp +480 -0
  41. sage/geometry/all.py +12 -0
  42. sage/groups/matrix_gps/pickling_overrides.py +110 -0
  43. sage/homology/tests.py +66 -0
  44. sage/interacts/algebra.py +20 -0
  45. sage/interacts/all.py +25 -0
  46. sage/interacts/calculus.py +24 -0
  47. sage/interacts/fractals.py +18 -0
  48. sage/interacts/geometry.py +19 -0
  49. sage/interacts/library.py +1950 -0
  50. sage/interacts/library_cython.cpython-313-darwin.so +0 -0
  51. sage/interacts/statistics.py +19 -0
  52. sage/interfaces/axiom.py +1002 -0
  53. sage/interfaces/kash.py +834 -0
  54. sage/interfaces/lie.py +950 -0
  55. sage/interfaces/matlab.py +413 -0
  56. sage/interfaces/mupad.py +686 -0
  57. sage/interfaces/octave.py +858 -0
  58. sage/interfaces/phc.py +943 -0
  59. sage/interfaces/psage.py +189 -0
  60. sage/interfaces/qsieve.py +4 -0
  61. sage/interfaces/r.py +2096 -0
  62. sage/interfaces/read_data.py +46 -0
  63. sage/interfaces/scilab.py +576 -0
  64. sage/interfaces/tests.py +81 -0
  65. sage/libs/all.py +11 -0
  66. sage/libs/cremona/__init__.py +0 -0
  67. sage/libs/mwrank/__init__.py +0 -0
  68. sage/logic/all.py +3 -0
  69. sage/logic/booleval.py +160 -0
  70. sage/logic/boolformula.py +1490 -0
  71. sage/logic/logic.py +856 -0
  72. sage/logic/logicparser.py +696 -0
  73. sage/logic/logictable.py +272 -0
  74. sage/logic/propcalc.py +311 -0
  75. sage/misc/all.py +28 -0
  76. sage/misc/lazy_attribute.pyi +11 -0
  77. sage/rings/all.py +48 -0
  78. sage/rings/commutative_algebra.py +38 -0
  79. sage/rings/finite_rings/all.py +21 -0
  80. sage/rings/numbers_abc.py +58 -0
  81. sage/rings/polynomial/all.py +22 -0
  82. sage/rings/polynomial/convolution.py +421 -0
  83. sage/symbolic/all__sagemath_standard_no_symbolics.py +0 -0
File without changes
sage/logic/all.py ADDED
@@ -0,0 +1,3 @@
1
+ from sage.logic.logic import SymbolicLogic
2
+
3
+ from sage.logic import propcalc
sage/logic/booleval.py ADDED
@@ -0,0 +1,160 @@
1
+ r"""
2
+ Evaluation of Boolean Formulas
3
+
4
+ AUTHORS:
5
+
6
+ - Chris Gorecki (2006): initial version
7
+
8
+ - Paul Scurek (2013-08-05): updated docstring formatting
9
+
10
+ EXAMPLES:
11
+
12
+ We can assign values to the variables and evaluate a formula::
13
+
14
+ sage: import sage.logic.booleval as booleval
15
+ sage: t = ['|', ['&', 'a', 'b'], ['&', 'a', 'c']]
16
+ sage: d = {'a' : True, 'b' : False, 'c' : True}
17
+ sage: booleval.eval_formula(t, d)
18
+ True
19
+
20
+ We can change our assignment of values by modifying the dictionary::
21
+
22
+ sage: d['a'] = False
23
+ sage: booleval.eval_formula(t, d)
24
+ False
25
+ """
26
+ # ****************************************************************************
27
+ # Copyright (C) 2006 Chris Gorecki <chris.k.gorecki@gmail.com>
28
+ # Copyright (C) 2013 Paul Scurek <scurek86@gmail.com>
29
+ #
30
+ # Distributed under the terms of the GNU General Public License (GPL)
31
+ # as published by the Free Software Foundation; either version 2 of
32
+ # the License, or (at your option) any later version.
33
+ # https://www.gnu.org/licenses/
34
+ # ****************************************************************************
35
+
36
+ from . import logicparser
37
+
38
+ # dictionary containing variable keys and boolean values
39
+ __vars = {}
40
+
41
+
42
+ def eval_formula(tree, vdict):
43
+ r"""
44
+ Evaluate the tree and return a boolean value.
45
+
46
+ INPUT:
47
+
48
+ - ``tree`` -- list of three elements corresponding to a branch of a
49
+ parse tree
50
+
51
+ - ``vdict`` -- dictionary containing variable keys and boolean values
52
+
53
+ OUTPUT: the result of the evaluation as a boolean value
54
+
55
+ EXAMPLES:
56
+
57
+ This example illustrates evaluating a boolean formula::
58
+
59
+ sage: import sage.logic.booleval as booleval
60
+ sage: t = ['|', ['&', 'a', 'b'], ['&', 'a', 'c']]
61
+ sage: d = {'a' : True, 'b' : False, 'c' : True}
62
+ sage: booleval.eval_formula(t, d)
63
+ True
64
+
65
+ ::
66
+
67
+ sage: d['a'] = False
68
+ sage: booleval.eval_formula(t, d)
69
+ False
70
+ """
71
+ global __vars
72
+ __vars = vdict
73
+ return logicparser.apply_func(tree, eval_f)
74
+
75
+
76
+ def eval_f(tree):
77
+ r"""
78
+ Evaluate the tree.
79
+
80
+ INPUT:
81
+
82
+ - ``tree`` -- list of three elements corresponding to a branch of a
83
+ parse tree
84
+
85
+ OUTPUT: the result of the evaluation as a boolean value
86
+
87
+ EXAMPLES:
88
+
89
+ This example illustrates how to evaluate a parse tree::
90
+
91
+ sage: import sage.logic.booleval as booleval
92
+ sage: booleval.eval_f(['&', True, False])
93
+ False
94
+
95
+ sage: booleval.eval_f(['^', True, True])
96
+ False
97
+
98
+ sage: booleval.eval_f(['|', False, True])
99
+ True
100
+ """
101
+ return eval_op(tree[0], tree[1], tree[2])
102
+
103
+
104
+ def eval_op(op, lv, rv):
105
+ r"""
106
+ Evaluate ``lv`` and ``rv`` according to the operator ``op``.
107
+
108
+ INPUT:
109
+
110
+ - ``op`` -- string or character representing a boolean operator
111
+
112
+ - ``lv`` -- boolean or variable
113
+
114
+ - ``rv`` -- boolean or variable
115
+
116
+ OUTPUT: the evaluation of ``lv op rv`` as a boolean value
117
+
118
+ EXAMPLES:
119
+
120
+ We can evaluate an operator given the values on either side::
121
+
122
+ sage: import sage.logic.booleval as booleval
123
+ sage: booleval.eval_op('&', True, False)
124
+ False
125
+
126
+ sage: booleval.eval_op('^', True, True)
127
+ False
128
+
129
+ sage: booleval.eval_op('|', False, True)
130
+ True
131
+ """
132
+ lval = rval = None
133
+ if lv is False:
134
+ lval = False
135
+ elif lv is True:
136
+ lval = True
137
+ elif lv is not None:
138
+ lval = __vars[lv]
139
+
140
+ if rv is False:
141
+ rval = False
142
+ elif rv is True:
143
+ rval = True
144
+ elif rv is not None:
145
+ rval = __vars[rv]
146
+
147
+ if op == '~':
148
+ return not lval
149
+ elif op == '&':
150
+ return lval and rval
151
+ elif op == '|':
152
+ return lval or rval
153
+ elif op == '^':
154
+ return lval ^ rval
155
+ elif op == '->':
156
+ return (not lval) or rval
157
+ elif op == '<->':
158
+ return (not lval or rval) and (not rval or lval)
159
+ else: # one variable
160
+ return __vars[op]