DGCV 0.3.0__tar.gz → 0.3.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 (55) hide show
  1. {dgcv-0.3.0/src/dgcv.egg-info → dgcv-0.3.2}/PKG-INFO +1 -1
  2. {dgcv-0.3.0 → dgcv-0.3.2}/pyproject.toml +1 -1
  3. {dgcv-0.3.0 → dgcv-0.3.2}/setup.cfg +1 -1
  4. {dgcv-0.3.0 → dgcv-0.3.2}/setup.py +1 -1
  5. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/CR_geometry.py +25 -11
  6. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/Riemannian_geometry.py +17 -17
  7. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/_config.py +1 -1
  8. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/_dgcv_display.py +2 -31
  9. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/_tensor_field_printers.py +3 -3
  10. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/combinatorics.py +3 -3
  11. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/complex_structures.py +25 -25
  12. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/coordinate_maps.py +5 -5
  13. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/dgcv_core.py +79 -22
  14. dgcv-0.3.2/src/dgcv/eds/ast.py +158 -0
  15. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/eds/eds.py +97 -35
  16. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/eds/eds_representations.py +10 -2
  17. dgcv-0.3.2/src/dgcv/filtered_structures.py +426 -0
  18. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/finite_dim_algebras.py +138 -195
  19. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/polynomials.py +96 -2
  20. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/solvers.py +3 -0
  21. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/styles.py +64 -5
  22. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/vector_fields_and_differential_forms.py +76 -76
  23. {dgcv-0.3.0 → dgcv-0.3.2/src/dgcv.egg-info}/PKG-INFO +1 -1
  24. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv.egg-info/SOURCES.txt +1 -0
  25. dgcv-0.3.0/src/dgcv/filtered_structures.py +0 -377
  26. {dgcv-0.3.0 → dgcv-0.3.2}/LICENSE.txt +0 -0
  27. {dgcv-0.3.0 → dgcv-0.3.2}/MANIFEST.in +0 -0
  28. {dgcv-0.3.0 → dgcv-0.3.2}/README.md +0 -0
  29. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/__init__.py +0 -0
  30. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/_safeguards.py +0 -0
  31. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/_settings.py +0 -0
  32. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/__init__.py +0 -0
  33. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Black.ttf +0 -0
  34. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Black.woff2 +0 -0
  35. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Bold.ttf +0 -0
  36. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Bold.woff2 +0 -0
  37. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-ExtraBold.ttf +0 -0
  38. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-ExtraBold.woff2 +0 -0
  39. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Medium.ttf +0 -0
  40. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Medium.woff2 +0 -0
  41. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Regular.ttf +0 -0
  42. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-Regular.woff2 +0 -0
  43. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-SemiBold.ttf +0 -0
  44. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/Orbitron-SemiBold.woff2 +0 -0
  45. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/PatrickHand-Regular.ttf +0 -0
  46. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/assets/fonts/fonts.css +0 -0
  47. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/conversions.py +0 -0
  48. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/dgcv_formatter.py +0 -0
  49. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/eds/__init__.py +0 -0
  50. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/eds/eds_operations.py +0 -0
  51. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/tensors.py +0 -0
  52. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv/vmf.py +0 -0
  53. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv.egg-info/dependency_links.txt +0 -0
  54. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv.egg-info/requires.txt +0 -0
  55. {dgcv-0.3.0 → dgcv-0.3.2}/src/dgcv.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dgcv
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: Differential Geometry with Complex Variables
5
5
  Author: David Sykes
6
6
  Author-email: David Sykes <david@realandimaginary.com>
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
5
5
  [project]
6
6
  requires-python = ">=3.6"
7
7
  name = "dgcv"
8
- version = "0.3.0"
8
+ version = "0.3.2"
9
9
  description = "Differential Geometry with Complex Variables"
10
10
  authors = [{ name = "David Sykes", email = "david@realandimaginary.com" }]
11
11
  license = { text = "MIT" }
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = dgcv
3
- version = 0.3.0
3
+ version = 0.3.2
4
4
  description = A package for Differential Geometry with Complex Variables
5
5
  author = David Sykes
6
6
  author_email = david@realandimaginary.com
@@ -15,7 +15,7 @@ To get started, check out the Jupyter Notebook tutorials:
15
15
 
16
16
  setup(
17
17
  name="dgcv",
18
- version="0.3.0",
18
+ version="0.3.2",
19
19
  description="Differential Geometry with Complex Variables",
20
20
  long_description=long_description, # This shows up on PyPI
21
21
  long_description_content_type="text/markdown",
@@ -43,7 +43,7 @@ from .dgcv_core import (
43
43
  symToReal,
44
44
  variableProcedure,
45
45
  )
46
- from .polynomials import createPolynomial
46
+ from .polynomials import createMultigradedPolynomial
47
47
  from .solvers import solve_dgcv
48
48
  from .vector_fields_and_differential_forms import assembleFromHolVFC
49
49
 
@@ -130,16 +130,23 @@ def weightedHomogeneousVF(
130
130
  NA
131
131
  """
132
132
  pListLoc = []
133
- for j in range(len(arg3)):
133
+ if not isinstance(arg2, (list,tuple)):
134
+ arg2 = [arg2]
135
+ if not isinstance(arg3[0],(list,tuple)):
136
+ arg3 = [arg3]
137
+ if not all(len(weightList)==len(arg1) for weightList in arg3):
138
+ raise KeyError('weight systems given to weightedHomogeneousVF must be lists whose length is the number of variables given.')
139
+ for j in range(len(arg1)):
134
140
  pListLoc.append(
135
- createPolynomial(
141
+ createMultigradedPolynomial(
136
142
  arg4 + "_" + str(j) + "_",
137
- arg2 + arg3[j],
143
+ [d + L[j] for d,L in zip(arg2,arg3)],
138
144
  arg1,
145
+ arg3,
139
146
  degreeCap=degreeCap,
140
- weightedHomogeneity=arg3,
141
147
  _tempVar=_tempVar,
142
148
  assumeReal=assumeReal,
149
+ report=False
143
150
  )
144
151
  )
145
152
  return reduce(
@@ -194,13 +201,14 @@ def findWeightedCRSymmetries_old(
194
201
  """
195
202
  def extractRIVar(arg1):
196
203
  return sum([list(holToReal(j).atoms(sp.Symbol)) for j in arg1], [])
197
-
204
+ Akey = create_key(prefix='A',key_length=5)
205
+ Bkey = create_key(prefix='B',key_length=5)
198
206
  VFLoc = addVF(
199
207
  weightedHomogeneousVF(
200
208
  arg2,
201
209
  arg4,
202
210
  arg3,
203
- "ALoc",
211
+ "Akey",
204
212
  _tempVar=retrieve_passkey(),
205
213
  degreeCap=degreeCap,
206
214
  assumeReal=True,
@@ -209,7 +217,7 @@ def findWeightedCRSymmetries_old(
209
217
  arg2,
210
218
  arg4,
211
219
  arg3,
212
- "BLoc",
220
+ "Bkey",
213
221
  _tempVar=retrieve_passkey(),
214
222
  degreeCap=degreeCap,
215
223
  assumeReal=True,
@@ -301,6 +309,12 @@ def findWeightedCRSymmetries(
301
309
  ):
302
310
  """
303
311
  """
312
+ if not isinstance(coordinate_weights[0],(list,tuple)):
313
+ coordinate_weights = [coordinate_weights]
314
+ if not isinstance(symmetry_weight,(list,tuple)):
315
+ symmetry_weight = [symmetry_weight]
316
+ if not len(symmetry_weight)==len(coordinate_weights):
317
+ raise KeyError('`findWeightedCRSymmetries` was given a tuple of weight systems whose length does not match the length of given symmetry weights to test for.')
304
318
  if returnAllformats:
305
319
  returnVectorFieldBasis = True
306
320
  vr = get_variable_registry()
@@ -367,13 +381,13 @@ def findWeightedCRSymmetries(
367
381
 
368
382
  subVar = set()
369
383
  for term in VFCLoc:
370
- subVar |= term.atoms(sp.Symbol)
384
+ if hasattr(term, 'atoms'):
385
+ subVar |= term.atoms(sp.Symbol)
371
386
  subVar.difference_update(set(holomorphic_coordinates))
372
387
  variableProcedure(coeff_label, len(subVar), assumeReal=True)
373
388
  coeff_vars = _cached_caller_globals[coeff_label]
374
389
  VFCLoc = [
375
- j.subs(dict(zip(subVar, coeff_vars)))
376
- for j in VFCLoc
390
+ j.subs(dict(zip(subVar, coeff_vars))) if hasattr(j,'subs') else j for j in VFCLoc
377
391
  ]
378
392
  clearVar(*listVar(temporary_only=True), report=False)
379
393
  if returnVectorFieldBasis:
@@ -1,7 +1,7 @@
1
1
  """
2
- DGCV: Differential Geometry with Complex Variables
2
+ dgcv: Differential Geometry with Complex Variables
3
3
 
4
- This module provides tools for Riemannian geometry within the DGCV package. It includes
4
+ This module provides tools for Riemannian geometry within the dgcv package. It includes
5
5
  functions and classes for defining and manipulating metrics, Christoffel symbols, curvature tensors,
6
6
  and Levi-Civita connections.
7
7
 
@@ -63,7 +63,7 @@ class metricClass(sp.Basic):
63
63
  self.varSpace = STF.varSpace
64
64
  self.degree = STF.degree
65
65
  self._simplifyKW = STF._simplifyKW
66
- self.DGCVType = STF.DGCVType
66
+ self.dgcvType = STF.dgcvType
67
67
  self.SymTensorField = STF
68
68
  self._varSpace_type = STF._varSpace_type
69
69
 
@@ -94,7 +94,7 @@ class metricClass(sp.Basic):
94
94
 
95
95
  @property
96
96
  def realVarSpace(self):
97
- if self.DGCVType == "standard":
97
+ if self.dgcvType == "standard":
98
98
  return self._realVarSpace
99
99
  if self._realVarSpace is None or self._imVarSpace is None:
100
100
  self.coeff_dicts
@@ -103,7 +103,7 @@ class metricClass(sp.Basic):
103
103
 
104
104
  @property
105
105
  def holVarSpace(self):
106
- if self.DGCVType == "standard":
106
+ if self.dgcvType == "standard":
107
107
  return self._holVarSpace
108
108
  if self._holVarSpace is None:
109
109
  self.coeff_dicts
@@ -112,7 +112,7 @@ class metricClass(sp.Basic):
112
112
 
113
113
  @property
114
114
  def antiholVarSpace(self):
115
- if self.DGCVType == "standard":
115
+ if self.dgcvType == "standard":
116
116
  return self._antiholVarSpace
117
117
  if self._antiholVarSpace is None:
118
118
  self.coeff_dicts
@@ -121,7 +121,7 @@ class metricClass(sp.Basic):
121
121
 
122
122
  @property
123
123
  def compVarSpace(self):
124
- if self.DGCVType == "standard":
124
+ if self.dgcvType == "standard":
125
125
  return self._holVarSpace + self._antiholVarSpace
126
126
  if self._holVarSpace is None or self._antiholVarSpace is None:
127
127
  self.coeff_dicts
@@ -132,7 +132,7 @@ class metricClass(sp.Basic):
132
132
  def coeff_dicts(
133
133
  self,
134
134
  ): # Retrieves coeffs in different variable formats and updates *VarSpace and _coeff_dicts caches if needed
135
- if self.DGCVType == "standard" or all(
135
+ if self.dgcvType == "standard" or all(
136
136
  j is not None
137
137
  for j in [
138
138
  self._realVarSpace,
@@ -593,7 +593,7 @@ class metricClass(sp.Basic):
593
593
  sparse_data = {
594
594
  indices: entry_rule(indices) for indices in generate_indices(shape)
595
595
  }
596
- self._RCT04 = tensorField(self.varSpace, sparse_data, valence=(0,0,0,0), DGCVType=self.DGCVType)
596
+ self._RCT04 = tensorField(self.varSpace, sparse_data, valence=(0,0,0,0), dgcvType=self.dgcvType)
597
597
  return self._RCT04
598
598
 
599
599
  @property
@@ -634,7 +634,7 @@ class metricClass(sp.Basic):
634
634
  self.varSpace,
635
635
  sparse_data,
636
636
  self.degree,
637
- DGCVType=self.DGCVType,
637
+ dgcvType=self.dgcvType,
638
638
  _simplifyKW=self._simplifyKW,
639
639
  )
640
640
  return self._Ricci
@@ -707,7 +707,7 @@ class metricClass(sp.Basic):
707
707
  sparse_data = {
708
708
  indices: entry_rule(indices) for indices in generate_indices(shape)
709
709
  }
710
- self._Weyl = tensorField(self.varSpace, sparse_data, valence=(0,0,0,0), DGCVType=self.DGCVType)
710
+ self._Weyl = tensorField(self.varSpace, sparse_data, valence=(0,0,0,0), dgcvType=self.dgcvType)
711
711
  return self._Weyl
712
712
 
713
713
  @property
@@ -775,7 +775,7 @@ class metricClass(sp.Basic):
775
775
  The simplification rule to apply. Options include 'real', 'holomorphic', and 'symbolic_conjugate'.
776
776
 
777
777
  skipVar : list, optional
778
- A list of strings that are parent labels for DGCV variable systems to exclude from the simplification process.
778
+ A list of strings that are parent labels for dgcv variable systems to exclude from the simplification process.
779
779
 
780
780
  Returns
781
781
  -------
@@ -849,7 +849,7 @@ class metricClass(sp.Basic):
849
849
  self.varSpace,
850
850
  simplified_coeffs,
851
851
  self.degree,
852
- DGCVType=self.DGCVType,
852
+ dgcvType=self.dgcvType,
853
853
  _simplifyKW=self._simplifyKW,
854
854
  )
855
855
  )
@@ -1013,9 +1013,9 @@ class LeviCivitaConnectionClass(sp.Basic):
1013
1013
  else:
1014
1014
  raise KeyError(
1015
1015
  "To initialize a `LeviCivitaConnectionClass` instance with variable_handling_default='complex', "
1016
- "`varSpace` must contain only variables from DGCV's complex variables systems, and all variables in "
1016
+ "`varSpace` must contain only variables from dgcv's complex variables systems, and all variables in "
1017
1017
  "`varSpace` must be simultaneously among the real and imaginary types, or simultaneously among the "
1018
- "holomorphic and antiholomorphic types. Use `complexVarProc` to easily create DGCV complex variable systems."
1018
+ "holomorphic and antiholomorphic types. Use `complexVarProc` to easily create dgcv complex variable systems."
1019
1019
  )
1020
1020
  else:
1021
1021
  self._varSpace_type = "standard"
@@ -1056,12 +1056,12 @@ class LeviCivitaConnectionClass(sp.Basic):
1056
1056
  vf1 = changeVFBasis(allToReal(vf1), self.varSpace)
1057
1057
  vf2 = changeVFBasis(allToReal(vf2), self.varSpace)
1058
1058
  newCoeffs = [_coeff(vf1, vf2, L) for L in range(dimLoc)]
1059
- return VFClass(self.varSpace, newCoeffs, DGCVType="complex")
1059
+ return VFClass(self.varSpace, newCoeffs, dgcvType="complex")
1060
1060
  elif self._varSpace_type == "complex":
1061
1061
  vf1 = changeVFBasis(allToSym(vf1), self.varSpace)
1062
1062
  vf2 = changeVFBasis(allToSym(vf2), self.varSpace)
1063
1063
  newCoeffs = [_coeff(vf1, vf2, L) for L in range(dimLoc)]
1064
- return VFClass(self.varSpace, newCoeffs, DGCVType="complex")
1064
+ return VFClass(self.varSpace, newCoeffs, dgcvType="complex")
1065
1065
 
1066
1066
 
1067
1067
  def metric_from_matrix(coordinates, matrix):
@@ -186,7 +186,7 @@ variable_registry = {
186
186
  }
187
187
  dgcv_settings_registry = {
188
188
  'use_latex':False,
189
- 'theme':'default',
189
+ 'theme':'blue',
190
190
  'format_displays':False,
191
191
  'version_specific_defaults':f'v{__version__}'
192
192
  }
@@ -152,7 +152,6 @@ def show(*args):
152
152
  for j in args:
153
153
  _display_DGCV_single(j)
154
154
 
155
-
156
155
  def _display_DGCV_single(arg):
157
156
  if isinstance(arg, str):
158
157
  display(Latex(arg))
@@ -168,14 +167,12 @@ def _display_DGCV_single(arg):
168
167
  else:
169
168
  display(arg)
170
169
 
171
-
172
170
  def _complexDisplay(*args):
173
171
  """
174
172
  Taking dgcv expressions in *args* written in terms of symbolic conjugate variables, displays them with actual complex conjugates
175
173
  """
176
174
  display(*[symToHol(j, simplify_everything=False) for j in args])
177
175
 
178
-
179
176
  class _alglabeldisplayclass(sp.Basic):
180
177
 
181
178
  def __new__(cls, label, ae=None):
@@ -234,14 +231,13 @@ class _alglabeldisplayclass(sp.Basic):
234
231
 
235
232
  def _repr_latex_(self):
236
233
  if self.ae:
237
- return _alglabeldisplayclass.format_algebra_label(self.label)
238
- else:
239
234
  return _alglabeldisplayclass.format_ae(self.ae)
235
+ else:
236
+ return _alglabeldisplayclass.format_algebra_label(self.label)
240
237
 
241
238
  def __str__(self):
242
239
  return self.label
243
240
 
244
-
245
241
  def load_fonts():
246
242
  font_links = """
247
243
  <link href="https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&family=Press+Start+2P&family=Roboto:wght@400;700&display=swap" rel="stylesheet">
@@ -253,9 +249,6 @@ def load_fonts():
253
249
  """
254
250
  display(HTML(font_links))
255
251
 
256
-
257
-
258
- # dgcv-specific SymPy LatexPrinter for VFClass and DFClass
259
252
  class DGCVLatexPrinter(LatexPrinter):
260
253
  def _print_VFClass(self, expr):
261
254
  return expr._repr_latex_()
@@ -273,28 +266,6 @@ def DGCV_collection_latex_printer(obj):
273
266
  return None
274
267
 
275
268
 
276
- # def DGCV_latex_printer(obj, **kwargs):
277
- # if isinstance(
278
- # obj,
279
- # (
280
- # VFClass,
281
- # DFClass,
282
- # STFClass,
283
- # tensorField,
284
- # metricClass,
285
- # FAClass,
286
- # AlgebraElement,
287
- # dgcvPolyClass,
288
- # Tanaka_symbol
289
- # ),
290
- # ):
291
- # latex_str = obj._repr_latex_()
292
- # return latex_str.strip("$")
293
- # elif isinstance(obj, (list, tuple)):
294
- # latex_elements = [DGCV_latex_printer(elem) for elem in obj]
295
- # return r"\left( " + r" , ".join(latex_elements) + r" \right)"
296
- # return latex(obj, **kwargs)
297
-
298
269
  def DGCV_latex_printer(obj, **kwargs):
299
270
  if obj is None:
300
271
  return ''
@@ -138,9 +138,9 @@ def tensor_VS_printer(tp):
138
138
  vec = vec[:len(vec)//2]
139
139
  if scalar != 0:
140
140
  basis_elements = [
141
- f"{_process_var_label(basis_labels[vec[j]])}"
141
+ f"{basis_labels[vec[j]]}"
142
142
  if valence[j] == 1
143
- else f"{_process_var_label(basis_labels[vec[j]])}^''"
143
+ else f"{basis_labels[vec[j]]}^''"
144
144
  for j in range(len(valence))
145
145
  ]
146
146
  basis_element = '@'.join(basis_elements)
@@ -148,7 +148,7 @@ def tensor_VS_printer(tp):
148
148
 
149
149
  if not formatted_terms: # If all scalars are zero
150
150
  basis_elements = [
151
- f"{_process_var_label(basis_labels[vec[j]])}"
151
+ f"{basis_labels[vec[j]]}"
152
152
  for j in range(tp.max_degree)
153
153
  ]
154
154
  formatted_terms.append(f"0{'@'.join(basis_elements)}")
@@ -1,7 +1,7 @@
1
1
  """
2
- DGCV: Differential Geometry with Complex Variables
2
+ dgcv: Differential Geometry with Complex Variables
3
3
 
4
- This module provides various combinatorial functions used throughout the DGCV package,
4
+ This module provides various combinatorial functions used throughout the dgcv package,
5
5
  primarily focusing on efficient computation of Cartesian products, permutations, and
6
6
  related operations. These functions are optimized for performance and designed to
7
7
  handle large inputs by utilizing generators where possible.
@@ -24,7 +24,7 @@ Dependencies
24
24
 
25
25
  Notes
26
26
  -----
27
- This module minimizes dependencies and is critical for handling combinatorics within the DGCV package's computationally intensive operations.
27
+ This module minimizes dependencies and is critical for handling combinatorics within the dgcv package's computationally intensive operations.
28
28
 
29
29
  """
30
30
 
@@ -1,7 +1,7 @@
1
1
  """
2
- DGCV: Differential Geometry with Complex Variables
2
+ dgcv: Differential Geometry with Complex Variables
3
3
 
4
- This module provides tools uniquely relevant for complex differential geometry within the DGCV package. It includes Dolbeault operators (Del and DelBar) and a class for constructing and analyzing Kähler structures.
4
+ This module provides tools uniquely relevant for complex differential geometry within the dgcv package. It includes Dolbeault operators (Del and DelBar) and a class for constructing and analyzing Kähler structures.
5
5
 
6
6
  Key Functions:
7
7
  - Del(): Applies the holomorphic Dolbeault operator ∂ to a differential form or scalar.
@@ -53,7 +53,7 @@ def Del(arg1):
53
53
  Parameters:
54
54
  -----------
55
55
  arg1 : DFClass or sympy.Expr
56
- A differential form (DFClass) with DGCVType='complex', or a scalar (interpreted as a zero-form).
56
+ A differential form (DFClass) with dgcvType='complex', or a scalar (interpreted as a zero-form).
57
57
 
58
58
  Returns:
59
59
  --------
@@ -63,7 +63,7 @@ def Del(arg1):
63
63
  Raises:
64
64
  -------
65
65
  TypeError
66
- If the input is not a DFClass or scalar (sympy.Expr), or if the DFClass has DGCVType='standard'.
66
+ If the input is not a DFClass or scalar (sympy.Expr), or if the DFClass has dgcvType='standard'.
67
67
  """
68
68
  variable_registry = get_variable_registry()
69
69
  # Ensure arg1 is a DFClass or convert it into a zero-form
@@ -77,19 +77,19 @@ def Del(arg1):
77
77
  ]
78
78
  )
79
79
  intermediateDF = makeZeroForm(
80
- arg1, varSpace=varSpace, DGCVType="complex", default_var_format="complex"
80
+ arg1, varSpace=varSpace, dgcvType="complex", default_var_format="complex"
81
81
  )
82
82
  arg1 = makeZeroForm(
83
83
  arg1,
84
84
  intermediateDF.compVarSpace,
85
- DGCVType="complex",
85
+ dgcvType="complex",
86
86
  default_var_format="complex",
87
87
  )
88
88
 
89
89
  elif isinstance(arg1, DFClass):
90
- if arg1.DGCVType == "standard":
90
+ if arg1.dgcvType == "standard":
91
91
  raise TypeError(
92
- "`Del` only operates on DFClass differential forms with DGCVType='complex' (and scalars like sympy.Expr, which it interprets as 0-forms). Tip: set 'complex=True' in the `createVariables` variable creation function to initialize a coframe with `DGCVType='complex'.`"
92
+ "`Del` only operates on DFClass differential forms with dgcvType='complex' (and scalars like sympy.Expr, which it interprets as 0-forms). Tip: set 'complex=True' in the `createVariables` variable creation function to initialize a coframe with `dgcvType='complex'.`"
93
93
  )
94
94
  else:
95
95
  arg1 = realToSym(symToReal(arg1))
@@ -105,7 +105,7 @@ def Del(arg1):
105
105
  (j,): sp.diff(allToSym(arg1.coeffsInKFormBasis[0]), HVSpace[j])
106
106
  for j in range(len(HVSpace))
107
107
  }
108
- return DFClass(arg1.varSpace, sparseDataLoc, 1, DGCVType="complex")
108
+ return DFClass(arg1.varSpace, sparseDataLoc, 1, dgcvType="complex")
109
109
 
110
110
  # Handle zero-forms
111
111
  if arg1.degree == 0:
@@ -114,12 +114,12 @@ def Del(arg1):
114
114
  # Handle higher-degree forms
115
115
  minDataLoc = arg1.DFClassDataMinimal
116
116
  coeffsTo1Forms = [
117
- DelOfZeroForm(makeZeroForm(j[1], varSpace=arg1.varSpace, DGCVType="complex"))
117
+ DelOfZeroForm(makeZeroForm(j[1], varSpace=arg1.varSpace, dgcvType="complex"))
118
118
  for j in minDataLoc
119
119
  ]
120
120
  # Construct the corresponding basis k-forms
121
121
  basisOfCoeffs = [
122
- DFClass(arg1.varSpace, {tuple(j[0]): 1}, arg1.degree, DGCVType="complex")
122
+ DFClass(arg1.varSpace, {tuple(j[0]): 1}, arg1.degree, dgcvType="complex")
123
123
  for j in minDataLoc
124
124
  ]
125
125
  # Multiply the one-forms by the basis and sum them
@@ -138,7 +138,7 @@ def DelBar(arg1):
138
138
  Parameters:
139
139
  -----------
140
140
  arg1 : DFClass or sympy.Expr
141
- A differential form (DFClass) with DGCVType='complex', or a scalar (interpreted as a zero-form).
141
+ A differential form (DFClass) with dgcvType='complex', or a scalar (interpreted as a zero-form).
142
142
 
143
143
  Returns:
144
144
  --------
@@ -148,7 +148,7 @@ def DelBar(arg1):
148
148
  Raises:
149
149
  -------
150
150
  TypeError
151
- If the input is not a DFClass or scalar (sympy.Expr), or if the DFClass has DGCVType='standard'.
151
+ If the input is not a DFClass or scalar (sympy.Expr), or if the DFClass has dgcvType='standard'.
152
152
  """
153
153
  variable_registry = get_variable_registry()
154
154
  # Ensure arg1 is a DFClass or convert it into a zero-form
@@ -162,19 +162,19 @@ def DelBar(arg1):
162
162
  ]
163
163
  )
164
164
  intermediateDF = makeZeroForm(
165
- arg1, varSpace=varSpace, DGCVType="complex", default_var_format="complex"
165
+ arg1, varSpace=varSpace, dgcvType="complex", default_var_format="complex"
166
166
  )
167
167
  arg1 = makeZeroForm(
168
168
  arg1,
169
169
  intermediateDF.compVarSpace,
170
- DGCVType="complex",
170
+ dgcvType="complex",
171
171
  default_var_format="complex",
172
172
  )
173
173
 
174
174
  if isinstance(arg1, DFClass):
175
- if arg1.DGCVType == "standard":
175
+ if arg1.dgcvType == "standard":
176
176
  raise TypeError(
177
- "`DelBar` only operates on DFClass differential forms with DGCVType='complex' (and scalars like sympy.Expr, which it interprets as 0-forms). Tip: set 'complex=True' in the `createVariables` variable creation function to initialize a coframe with `DGCVType='complex'.`"
177
+ "`DelBar` only operates on DFClass differential forms with dgcvType='complex' (and scalars like sympy.Expr, which it interprets as 0-forms). Tip: set 'complex=True' in the `createVariables` variable creation function to initialize a coframe with `dgcvType='complex'.`"
178
178
  )
179
179
  else:
180
180
  arg1 = allToSym(symToReal(arg1))
@@ -191,7 +191,7 @@ def DelBar(arg1):
191
191
  (j + CDim,): sp.diff(allToSym(arg1.coeffsInKFormBasis[0]), AHVspace[j])
192
192
  for j in range(CDim)
193
193
  }
194
- return DFClass(arg1.varSpace, sparseDataLoc, 1, DGCVType="complex")
194
+ return DFClass(arg1.varSpace, sparseDataLoc, 1, dgcvType="complex")
195
195
 
196
196
  # Handle zero-forms
197
197
  if arg1.degree == 0:
@@ -200,12 +200,12 @@ def DelBar(arg1):
200
200
  # Handle higher-degree forms
201
201
  minDataLoc = arg1.DFClassDataMinimal
202
202
  coeffsTo1Forms = [
203
- DelBarOfZeroForm(makeZeroForm(j[1], varSpace=arg1.varSpace, DGCVType="complex"))
203
+ DelBarOfZeroForm(makeZeroForm(j[1], varSpace=arg1.varSpace, dgcvType="complex"))
204
204
  for j in minDataLoc
205
205
  ]
206
206
  # Construct the corresponding basis k-forms
207
207
  basisOfCoeffs = [
208
- DFClass(arg1.varSpace, {tuple(j[0]): 1}, arg1.degree, DGCVType="complex")
208
+ DFClass(arg1.varSpace, {tuple(j[0]): 1}, arg1.degree, dgcvType="complex")
209
209
  for j in minDataLoc
210
210
  ]
211
211
 
@@ -229,7 +229,7 @@ class KahlerStructure(sp.Basic):
229
229
  Parameters:
230
230
  -----------
231
231
  varSpace : tuple of sympy.Symbol
232
- A tuple of variables from DGCV's complex coordinate systems representing the coordinate space of the manifold.
232
+ A tuple of variables from dgcv's complex coordinate systems representing the coordinate space of the manifold.
233
233
  kahlerForm : DFClass
234
234
  A Kähler form representing the symplectic structure.
235
235
 
@@ -480,7 +480,7 @@ class KahlerStructure(sp.Basic):
480
480
  for k in range(j, len(self.coor_frame))
481
481
  }
482
482
  self._metric = metricClass(
483
- STFClass(self.varSpace, coeffData, 2, DGCVType="complex")
483
+ STFClass(self.varSpace, coeffData, 2, dgcvType="complex")
484
484
  )
485
485
  return self._metric
486
486
 
@@ -506,7 +506,7 @@ class KahlerStructure(sp.Basic):
506
506
  for L in range(dim)
507
507
  for m in range(dim)
508
508
  }
509
- self._holRiemann = tensorField(self.varSpace, coeffData, valence=(0,0,0,0), DGCVType="complex")
509
+ self._holRiemann = tensorField(self.varSpace, coeffData, valence=(0,0,0,0), dgcvType="complex")
510
510
  return self._holRiemann
511
511
 
512
512
  @property
@@ -529,7 +529,7 @@ class KahlerStructure(sp.Basic):
529
529
  for j in range(dim)
530
530
  for k in range(j, dim)
531
531
  }
532
- self._holRicci = tensorField(self.varSpace, coeffData, valence=(0,0), DGCVType="complex")
532
+ self._holRicci = tensorField(self.varSpace, coeffData, valence=(0,0), dgcvType="complex")
533
533
  return self._holRicci
534
534
 
535
535
  @property
@@ -574,7 +574,7 @@ class KahlerStructure(sp.Basic):
574
574
  self.varSpace,
575
575
  coeffData,
576
576
  valence=(0,0,0,0),
577
- DGCVType="complex",
577
+ dgcvType="complex",
578
578
  _simplifyKW={
579
579
  "simplify_rule": None,
580
580
  "simplify_ignore_list": None,
@@ -63,7 +63,7 @@ class coordinate_map(Basic):
63
63
  ] + [simplify(im(allToReal(j))) for j in coordinate_formulas]
64
64
  else:
65
65
  raise TypeError(
66
- "When setting `holomorphic=True`, `coordinate_map` expects the variables given for the domain and range to be all holomorphic parts of DGCV complex variable systems. It will infer the appropriate action of antiholomophic/real/imaginary parts using holomorphicity."
66
+ "When setting `holomorphic=True`, `coordinate_map` expects the variables given for the domain and range to be all holomorphic parts of dgcv complex variable systems. It will infer the appropriate action of antiholomophic/real/imaginary parts using holomorphicity."
67
67
  )
68
68
  self.domain_varSpace_type, self.domain_frame, self.domain_coframe = (
69
69
  coordinate_map.validate_coordinates(self.domain)
@@ -140,7 +140,7 @@ class coordinate_map(Basic):
140
140
  return "standard", get_VF(*varSpace), get_DF(*varSpace)
141
141
  elif not all(checkRegistered(var) for var in varSpace):
142
142
  raise TypeError(
143
- "`coordinate_map` was given coordinates containing variables that were not initialized in the DGCV variable management framework (VMF). Use variable creation functions like `createVariables` to initialize variables while automatically registering them in the VMF."
143
+ "`coordinate_map` was given coordinates containing variables that were not initialized in the dgcv variable management framework (VMF). Use variable creation functions like `createVariables` to initialize variables while automatically registering them in the VMF."
144
144
  )
145
145
  else:
146
146
 
@@ -212,7 +212,7 @@ class coordinate_map(Basic):
212
212
  self.domain,
213
213
  sparse_data,
214
214
  deg,
215
- DGCVType=tf.DGCVType,
215
+ dgcvType=tf.dgcvType,
216
216
  _simplifyKW=tf._simplifyKW,
217
217
  )
218
218
 
@@ -257,7 +257,7 @@ class coordinate_map(Basic):
257
257
  self.domain,
258
258
  sparse_data,
259
259
  deg,
260
- DGCVType=tf.DGCVType,
260
+ dgcvType=tf.dgcvType,
261
261
  _simplifyKW=tf._simplifyKW,
262
262
  )
263
263
 
@@ -313,7 +313,7 @@ class coordinate_map(Basic):
313
313
  self.domain,
314
314
  sparse_data,
315
315
  deg,
316
- DGCVType=tf.DGCVType,
316
+ dgcvType=tf.dgcvType,
317
317
  _simplifyKW=tf._simplifyKW,
318
318
  )
319
319