; test Isomorphism given target of ‘X’. (lambda (p q) (let* ( (pq (expt p q)) (all (lambda (p) (let L ((j 0)) (or (= j pq) (and (p j) (L (+ j 1))))))) (fp ((fileVal "finiteField") p)) (ip ((fp 'gfip) q)) (gf ((fp 'fops) ip))(ex (gf 'fexpt)) (+ (fp 'p+)) (- (fp 'p-)) (* (gf 'f*)) (tr (fp 'trim)) ; (ev (lambda (a b) (zero? (vector-length (tr (+ a (- b))))))) (ev (lambda (a b) (let z ((i (min (vector-length a) (vector-length b)))) (or (zero? i) (let ((j (sub1 i))) (and (= (vector-ref a j) (vector-ref b j)) (a j))))))) ; ph below computes where x goes when #(0 1) goes to px. (ph (lambda (px x) (let u ((vl (vector->list x))) (if (null? vl) '#() (+ (make-vector 1 (car vl)) (* px (u (cdr vl)))))))) (Ph (lambda (x) (ex x p))) (i->p (fp 'i->p)) (p->i (fp 'p->i))) (write (list ((fp 'gip) q) (ph '#(0 1)) (Ph '#(0 1)))) (write (((fileVal "Do") 'DoL) pq (lambda (i) (let ((p (i->p i))) (cons p (ph p)))))) (all (lambda (i) (let ((ai (i->p i))) (all (lambda (j) (let ((aj (i->p j))) (let ((z (and (ev (+ (ph ai) (ph aj)) (ph (+ ai aj))) (ev (* (ph ai) (ph aj)) (ph (* ai aj)))))) (if (not z) (write (list ai aj (* ai aj) (ph (* ai aj)) (* (ph ai) (ph aj))))) z))))))))) (define (r m x)(write (cons m x))(newline) x) (t 3 2 #(2 0)) =>((#3(2 2 1) #3(2 1) #3(1 0 1)) #1(2) #2(0 2)) ((#0() . #0()) (#1(1) . #1(1)) (#1(2) . #1(2)) (#2(0 1) . #1(2)) (#2(1) . #1(0)) (#2(2 1) . #1(1)) (#2(0 2) . #1(1)) (#2(1 2) . #1(2)) (#2(2) . #1(0))) (#2(0 1) #2(0 1) #2(2 0) #1(2) #1(1))#f > (t 5 2 #()) => ((#3(2 4 1) #3(1 4 1) #3(4 3 1) #3(3 3 1) #3(4 2 1) #3(3 2 1) #3(2 1) #3(1) #3(3 0 1) #3(2 0 1)) #1(0) #2(0 4))((#0() . #0()) (#1(1) . #1(1)) (#1(2) . #1(2)) (#1(3) . #1(3)) (#1(4) . #1(4)) (#2(0 1) . #1(0)) (#2(1) . #1(1)) (#2(2 1) . #1(2)) (#2(3 1) . #1(3)) (#2(4 1) . #1(4)) (#2(0 2) . #1(0)) (#2(1 2) . #1(1)) (#2(2) . #1(2)) (#2(3 2) . #1(3)) (#2(4 2) . #1(4)) (#2(0 3) . #1(0)) (#2(1 3) . #1(1)) (#2(2 3) . #1(2)) (#2(3) . #1(3)) (#2(4 3) . #1(4)) (#2(0 4) . #1(0)) (#2(1 4) . #1(1)) (#2(2 4) . #1(2)) (#2(3 4) . #1(3)) (#2(4) . #1(4)))(#2(0 1) #2(0 1) #2(3 0) #1(3) #0())#f