@@ -2274,86 +2274,6 @@ cdef class Algebra(Ring):
2274
2274
Ring.__init__ (self ,base_ring, names = names, normalize = normalize,
2275
2275
category = category)
2276
2276
2277
- def characteristic (self ):
2278
- r """
2279
- Return the characteristic of this algebra, which is the same
2280
- as the characteristic of its base ring.
2281
-
2282
- See objects with the ``base_ring`` attribute for additional examples.
2283
- Here are some examples that explicitly use the :class:`Algebra` class.
2284
-
2285
- EXAMPLES::
2286
-
2287
- sage: # needs sage. modules
2288
- sage: A = Algebra( ZZ) ; A
2289
- <sage. rings. ring. Algebra object at ... >
2290
- sage: A. characteristic( )
2291
- 0
2292
- sage: A = Algebra( GF( 7^ 3, 'a')) # needs sage. rings. finite_rings
2293
- sage: A. characteristic( ) # needs sage. rings. finite_rings
2294
- 7
2295
- """
2296
- return self .base_ring().characteristic()
2297
-
2298
- def has_standard_involution (self ):
2299
- r """
2300
- Return ``True`` if the algebra has a standard involution and ``False`` otherwise.
2301
- This algorithm follows Algorithm 2. 10 from John Voight's * Identifying the Matrix Ring* .
2302
- Currently the only type of algebra this will work for is a quaternion algebra.
2303
- Though this function seems redundant, once algebras have more functionality, in particular
2304
- have a method to construct a basis, this algorithm will have more general purpose.
2305
-
2306
- EXAMPLES::
2307
-
2308
- sage: # needs sage. combinat sage. modules
2309
- sage: B = QuaternionAlgebra( 2)
2310
- sage: B. has_standard_involution( )
2311
- True
2312
- sage: R. <x> = PolynomialRing( QQ)
2313
- sage: K. <u> = NumberField( x** 2 - 2) # needs sage. rings. number_field
2314
- sage: A = QuaternionAlgebra( K, -2, 5) # needs sage. rings. number_field
2315
- sage: A. has_standard_involution( ) # needs sage. rings. number_field
2316
- True
2317
- sage: L. <a,b> = FreeAlgebra( QQ, 2)
2318
- sage: L. has_standard_involution( )
2319
- Traceback ( most recent call last) :
2320
- ...
2321
- NotImplementedError: has_standard_involution is not implemented for this algebra
2322
- """
2323
- field = self .base_ring()
2324
- try :
2325
- basis = self .basis()
2326
- except AttributeError :
2327
- raise AttributeError (" Basis is not yet implemented for this algebra." )
2328
- try :
2329
- # TODO: The following code is specific to the quaternion algebra
2330
- # and should belong there
2331
- # step 1
2332
- for i in range (1 ,4 ):
2333
- ei = basis[i]
2334
- a = ei** 2
2335
- coef = a.coefficient_tuple()
2336
- ti = coef[i]
2337
- ni = a - ti* ei
2338
- if ni not in field:
2339
- return False
2340
- # step 2
2341
- for i in range (1 ,4 ):
2342
- for j in range (2 ,4 ):
2343
- ei = basis[i]
2344
- ej = basis[j]
2345
- a = ei** 2
2346
- coef = a.coefficient_tuple()
2347
- ti = coef[i]
2348
- b = ej** 2
2349
- coef = b.coefficient_tuple()
2350
- tj = coef[j]
2351
- nij = (ei + ej)** 2 - (ti + tj)* (ei + ej)
2352
- if nij not in field:
2353
- return False
2354
- except AttributeError :
2355
- raise NotImplementedError (" has_standard_involution is not implemented for this algebra" )
2356
- return True
2357
2277
2358
2278
cdef class CommutativeAlgebra(CommutativeRing):
2359
2279
"""
0 commit comments