## 35 Reputation

12 years, 265 days
Universita' di Pisa
Dr.

I am a researcher working in Pisa.

In a nutshell, I am interested in dyanamical systems, ergodic theory and number theory (expecially issues connected with continued fractions).

I am using Maple (mostly in a naive way :) to investigate some combinatorial issues arising from my research.

## evalhf vs. matrices...

However, for your purposes, you might be able to use ?evalhf, depending on the boolean expression. For example,

`evalhf(3 < Pi);                      1.0`

Note that the result is float, not an integer.

As a matter of fact what I am checking is an identity of matrices in SL(2,Z); and the evalhf displays strange behaviour with matrices... should I write a short script to ask maple to check the identity componentwise, or is there a more clever way to proceed?

## My maple script...

Here it is my program. The problem is in the last loop (presently it does 12 iterations, but going beyond 16 is quite hard for my laptop)

##########################################################
#k-esima cifra di stringa periodica PP
#
kthfig:=proc(PP,kk) local pq, hh:
hh:=1+modp(kk-1, nops(PP)):
pq:=op(hh,PP): #restituisce valori in 1..m invece che in 0..m-1
end:

#k-esima cifra di stringa finita
#
kthfigo:=proc(PP,kk) local pc:
if kk<nops(PP)+1 then pc:=op(kk,PP):
else pc:=0: fi:
pc;
end:

#lyndon bisection
lybi:=proc(A,B) local jj, C, a, b, c, ii, iii:
jj:=0: #stopper
C:=[]: c:=[0]:
for ii from 1 while jj=0 do
a:=kthfig(A,ii): b:=kthfigo(B,ii):
if a=b then C:=[op(C), b]:
else
for iii from 1 while kthfig(A,iii+ii)=1 do
c:=[op(c),1]: od:
C:=[op(C),op(c),1]:
jj:=1: #stopped
fi:
od:
C;
end:

L:=[[0],[1]]: #lista base
# lista lyndon
for jj from 1 to 12 do
N:=[op(1,L)]:
for j from 1 to nops(L)-1 do
N:=[op(N), lybi(op(j,L),op(j+1,L)), op(j+1,L)]:
od:
L:=N:
od:
L;

#save L, "lyndonL00.m";

#####################################################

 1 2 Page 2 of 2
﻿