-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAlgebraicElement.class.st
More file actions
78 lines (65 loc) · 2.03 KB
/
Copy pathAlgebraicElement.class.st
File metadata and controls
78 lines (65 loc) · 2.03 KB
1
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
"
Elements of finite algebraic field (or ring) extensions. See AlgebraicExtension.
"
Class {
#name : #AlgebraicElement,
#superclass : #RegularFunction,
#category : #'Mathematics-Fields'
}
{ #category : #'as yet unclassified' }
AlgebraicElement >> = anObject [
(self class = anObject class and: [parent = anObject parent])
ifTrue: [^ representative = anObject representative].
^ self = (parent ! anObject)
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> characteristicPolynomial [
^ self representation characteristicPolynomial
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> characteristicPolynomial2 [
| x |
x := QQ algebraicClosure polynomials x.
^ self parent base ! (self parent embeddings product: [:each| x - (each value: self)])
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> hash [
^ representative hash
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> minimalPolynomial [
^ self representation minimalPolynomial
" | x |
x := self parent x.
^ self conjugates product: [:each| x - each] :: as: self parent base"
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> minimalPolynomial2 [
^ (self parent preferedEmbedding value: self) minimalPolynomial
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> norm [
| f |
f := self minimalPolynomial.
^ f independentCoefficient / f leadingCoefficient * (f degree even ifTrue: [1] ifFalse: [-1])
"alternatively:
^ self representation determinant"
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> representation [
"Answer the representation map defined by multiplication by the receiver."
^ self parent asVectorSpace endomorphisms evaluating: [:x| x * self]
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> symmetricFunction: i [
^ self notYetImplemented
]
{ #category : #'as yet unclassified' }
AlgebraicElement >> trace [
"Answer the absolute trace of the receiver."
| f |
f := self minimalPolynomial.
^ (f coefficientAtDegree: f degree - 1) negated
"alternatively:
^ self representation trace"
]