From 40fc24500da3db21c2f03c6de9cdc30d0ea22e75 Mon Sep 17 00:00:00 2001 From: Thomas Baruchel Date: Thu, 15 Sep 2022 19:56:45 +0200 Subject: [PATCH] Update --- carleman.lisp | 32 +++++++------------------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/carleman.lisp b/carleman.lisp index 19ad5f7..4387ffb 100644 --- a/carleman.lisp +++ b/carleman.lisp @@ -28,24 +28,6 @@ ; look for the compiled file like "convolution.o" and from now on: ; load("carleman.o")$ -; Usage -; ----- -; Two functions are provided here: -; * carleman(v) -; * carleman_diag(v) -; The most important is the second one. -; -; Both functions compute the Carleman matrix of a function given as -; a list of coefficients from its Taylor expansion at 0. -; For instance: carleman([0,2,1,0,0,0,0,0]); for f(x)=x^2+2x -; -; The size of resulting matrices will match the length of the initial list. -; -; The second function returns the diagonalized Carleman matrix as a list -; of three matrices whose dot product is the Carleman matrix. - - - ; Compute the Carleman matrix for series whose coefficients are in v. ; Return a list of lists. ; The vector v contains Maxima objects, but the car '(mlist simp) should @@ -62,7 +44,7 @@ (addn (loop for a in x for b in u - collect (mul a b))) s)) + collect (mul a b)) NIL) s)) finally (return s)) collect u))) @@ -84,7 +66,7 @@ (addn (loop for e in x for f in u - collect (mul e f))) + collect (mul e f)) NIL) (sub d1 d2)) x) for d2 = (div d1 d) then (div d2 d) finally (setf (cdr z) r) @@ -115,7 +97,7 @@ (addn (loop for e in x for f in u - collect (mul e f))) + collect (mul e f)) NIL) (sub d1 d2)) (cdr y)) finally (return (append q x))))) @@ -128,7 +110,7 @@ (defun $carleman (v) (simplifya (cons '($matrix) (mapcar #'(lambda (x) (simplify (cons '(mlist) x))) - (carleman (cdr v)))))) + (carleman (cdr v)))) NIL)) ; Let M be the Carleman matrix of a function having 0 as a fixed point ; (ie. f(0)=0) and f'(0) not in {0, 1} ; now, V(M) is such @@ -148,13 +130,13 @@ ; left part (simplifya (cons '($matrix) (mapcar #'(lambda (x) (simplify (cons '(mlist) x))) - (carleman-diag-left m d)))) + (carleman-diag-left m d))) NIL) ; diagonal matrix (simplifya (cons '($matrix) (mapcar #'(lambda (x) (simplify (cons '(mlist) x))) - (carleman-diag-middle m d)))) + (carleman-diag-middle m d))) NIL) ; right part (simplifya (cons '($matrix) (mapcar #'(lambda (x) (simplify (cons '(mlist) x))) - (carleman-diag-right m d)))))))) + (carleman-diag-right m d))) NIL)) NIL)))