; finite field GF(p^q) (let ((fft (fileVal "finiteField"))(DoV ((fileVal "Do") 'DoV)) (rc4 (fileVal "RC4"))) (lambda (p q rs) (let* ( (r (((rc4 rs) 'rbi) p)) (GFp (fft p)) (trim (GFp 'trim)) (ff ((GFp 'fops) ((GFp 'gsip) q)))) (list (lambda () (DoV q (lambda (j) (r)))) '#() (lambda (x) (zero? (vector-length (trim x)))) '#(1) (GFp 'p+) (GFp 'p-) (ff 'f*) (ff 'f/))))) ; Demos (ylppa (ylppa ((fileVal "GFpq") 17 4 "p") (fileVal "Matrix")) (lambda (rmg mm inv ip tr det i? v= m=) (let ((inv (lambda (q) ((fileVal "try") (lambda (w) (inv q w))(lambda (e) "e"))))) (let* ((m (rmg 4))(mi (inv m))) (list m mi (inv mi) (i? (mm m mi))))))) (define a #(3 4 3)) (define w ((fileVal "GFpq") 7 3 "Poo")) (apply (lambda (gen zer zer? one add neg tim inv) (cons (zer? (add (tim (inv a) a) (neg one))) (tim (inv a) a))) w) -------- (define a #(3 4 3)) (define w ((fileVal "GFpq") 7 3 "Poo")) (define gen (car w)) (define zer (cadr w)) (define zer? (caddr w)) (define one (cadddr w)) (define W (cddddr w)) (define add (car W)) (define neg (cadr W)) (define tim (caddr W)) (define inv (cadddr W)) (cons (zer? (add (tim (inv a) a) (neg one))) (tim (inv a) a)) ;=> (#t . #3(1 0))