Bug computing homotopy groups solved

This commit is contained in:
Ana Romero Ibáñez 2020-01-16 10:13:23 +01:00
parent f77a9e1c74
commit 03a89c7e1d

View File

@ -57,11 +57,13 @@
(result (homology-format (eval ft) (1+ indx)))) (result (homology-format (eval ft) (1+ indx))))
(if (= (1+ indx) n-hom) (if (= (1+ indx) n-hom)
(homology-format (eval ft) n-hom) (homology-format (eval ft) n-hom)
(if (string= "NIL" result) nil (if (string= "NIL" result) ;; NIL
(if (string= "Z " result) (let ((first-non-null (first-non-null-homology-group ft n-hom)))
(compute-homotopy-z-xslt n-hom ft (1+ indx)) (compute-homotopy ft n-hom first-non-null))
(if (string= "Z/2Z " result) (if (string= "Z " result)
(compute-homotopy-z2-xslt n-hom ft (1+ indx)) (compute-homotopy-z-xslt n-hom ft (1+ indx))
(if (string= "Z/2Z " result)
(compute-homotopy-z2-xslt n-hom ft (1+ indx))
(if (and (string= (subseq result 0 2) "Z/") (string= (subseq result (search "Z" result :start2 2)) "Z")) (if (and (string= (subseq result 0 2) "Z/") (string= (subseq result (search "Z" result :start2 2)) "Z"))
(compute-homotopy-zp-xslt n-hom ft (1+ indx) (read-from-string (subseq result 2 (search "Z" result :start2 2)))) (compute-homotopy-zp-xslt n-hom ft (1+ indx) (read-from-string (subseq result 2 (search "Z" result :start2 2))))
(compute-homotopy-several-xslt n-hom ft (1+ indx) result)))))))) (compute-homotopy-several-xslt n-hom ft (1+ indx) result))))))))
@ -74,7 +76,9 @@
(result (homology-format (eval ft) (1+ indx)))) (result (homology-format (eval ft) (1+ indx))))
(if (= (1+ indx) n-hom) (if (= (1+ indx) n-hom)
(homology-format (eval ft) n-hom) (homology-format (eval ft) n-hom)
(if (string= "NIL" result) nil (if (string= "NIL" result) ;; nil
(let ((first-non-null (first-non-null-homology-group ft n-hom)))
(compute-homotopy ft n-hom first-non-null))
(if (string= "Z " result) (if (string= "Z " result)
(compute-homotopy-z-xslt n-hom ft (1+ indx)) (compute-homotopy-z-xslt n-hom ft (1+ indx))
(if (string= "Z/2Z " result) (if (string= "Z/2Z " result)
@ -91,7 +95,9 @@
(result (homology-format (eval ft) (1+ indx)))) (result (homology-format (eval ft) (1+ indx))))
(if (= (1+ indx) n-hom) (if (= (1+ indx) n-hom)
(homology-format (eval ft) n-hom) (homology-format (eval ft) n-hom)
(if (string= "NIL" result) nil (if (string= "NIL" result) ;; nil
(let ((first-non-null (first-non-null-homology-group ft n-hom)))
(compute-homotopy ft n-hom first-non-null))
(if (string= "Z " result) (if (string= "Z " result)
(compute-homotopy-z-xslt n-hom ft (1+ indx)) (compute-homotopy-z-xslt n-hom ft (1+ indx))
(if (string= "Z/2Z " result) (if (string= "Z/2Z " result)
@ -207,5 +213,14 @@
(setf smst X degr 4)
(setf n-hom 4 obj smst degree (first-non-null-homology-group smst degr)
hom (homology-format smst (1+ degree)))
(compute-homotopy-z-xslt n-hom obj (1+ degree))
(setf degree (1+ degree))