-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
cliapp.txt
46 lines (40 loc) · 892 Bytes
/
cliapp.txt
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
/*
idempotent elements
*/
ielements():=block([c:1, d:1, l:[1], r:[1], m:1, n:1],
for i:1 thru ndim do
if asymbol[i].asymbol[i]=1 then (
c:c.(1+ asymbol[i])/2 ,
m:(psnorm(c, plus)),
n: (c)/m,
display(n),
if idemp(n) then
push(n, l)
),
l
);
mtable3():=block([n, a, lst],
local (a),
lst:makelist((1+asymbol[i])/2, i, ndim),
push(1,lst),
n:length(lst),
a[i,j]:= dotsimpc(expand(lst[i].lst[j])),
genmatrix(a,n,n)
);
idempotent2(k, j):=block(
if k>ndim or j>ndim then return(false),
if signature[k]*signature[j] <0 then
[ (1+asymbol[k].asymbol[j])/2, (1-asymbol[k].asymbol[j])/2]
else [1]
);
idempotent(k):=block(
if k>ndim then return(false),
if signature[k] >0 then
[(1+asymbol[k])/2, (1-asymbol[k])/2]
else [1]
);
cinvolve(x):=block ( [ret:x],
if not freeof(".",x) then
ret: expand(x),
subst(asymbol=lambda([k], - subvar (asymbol, k) ), ret)
);