; Confirm that x^p is an automorphism (define (t p q) (let* ( (pq (expt p q)) (all (lambda (p) (let L ((j 0)) (or (= j pq) (and (p j) (L (+ j 1))))))) (ff ((fileVal "finiteField") p)) (ip ((ff 'gfip) q)) (gf ((ff 'fops) ip))(ex (gf 'fexpt)) (+ (ff 'p+)) (- (ff 'p-)) (* (gf 'f*)) (tr (ff 'trim)) (ev (lambda (a b) (zero? (vector-length (tr (+ a (- b))))))) (ph (lambda (x) (ex x p))) (i->p (ff 'i->p)) (p->i (ff 'p->i))) (all (lambda (i) (let ((ai (i->p i))) (all (lambda (j) (let ((aj (i->p j))) (and (ev (+ (ph ai) (ph aj)) (ph (+ ai aj))) (ev (* (ph ai) (ph aj)) (ph (* ai aj)))))))))))) ; (and (t 2 1) (t 2 2) (t 2 5) (t 3 1) (t 3 4) (t 5 2) (t 5 4) (t 7 3) (t 11 2)) => #t