HP Forums
(49g/50g) Tables from the Book of Soyga - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Software Libraries (/forum-10.html)
+--- Forum: General Software Library (/forum-13.html)
+--- Thread: (49g/50g) Tables from the Book of Soyga (/thread-17282.html)



(49g/50g) Tables from the Book of Soyga - John Keith - 07-25-2021 05:54 PM

The Book of Soyga (also known as Aldaraia) is a 16th century treatise on magic, astrology and mysticism by author(s) unknown. The last section of the book consists of 36 tables each of which is a 36 by 36 grid of letters. The tables can be produced by a deterministic algorithm which is described in this paper by Jim Reeds. Further information at A346223. Both sources also link to a PDF of the book edited and translated by Jane Kupin.

The following directory of programs implements the algorithm used to produce the tables, in the form of a numerical array as in the OEIS link, or as a printable grid of letters. A brief description of the programs follows.


SOYMAT is the main program. Input is a string of 2 to 10 letters in the Classical Latin alphabet, which does not include the letters j, v or w; the letter j will be converted into i; the letters v and w will be converted into u. The input string is not case sensitive but cannot contain spaces or other non-letter characters.
Output is an n^2 X n^2 array of integers representing letters in the Classical Latin alphabet from 0(a) to 22(z). The array is returned as a list of lists. If desired it can be converted into a matrix with AXL.

The program SOYTAB turns the array returned by SOYMAT into a grid of letters suitable for printing. If the input string has 6 letters or less, the letters in the grid are interspersed with spaces for legibility.

The programs NL\->LA and LA\->NL convert between lower-case letters of the Classical Latin alphabet and integers in the range 0..22.

NIMAP is a list of 23 integers which implements the non-invertible mapping of characters. It can be replaced by any list of 23 integers in the range of 0..22 to create a custom mapping.

KEYS is a list of the 36 keywords used to create the original tables.

The programs require ListExt 1.3, and are best run under an emulator on a computer so that the tables can be easily visualized and printed.

Example: With the string "NISRAM" on the stack, pressing SOYMAT followed by SOYTAB will return the first table from the book:


Code:

 n d i z b d i z b d i z b d i z b d i z b d i z b d i z b d i z b d i z 
 i s r l y t r l y t r l y t r l y t r l y t r l y t r l y t r l y t r l 
 s c u c b x i b a x i b a x i b a x i b a x i b a x i b a x i b a x i b 
 r o e r n m h g g d o k q s r n p l f d f z l y q s r n p l f d f z l y 
 a q b t x d n x y t y b s c u e f n u t o h q t a u i d u c i s o h q t 
 m p p i m c q s g b a d z e l b h s e k f k h a c z l a y s r f q e g b 
 m o z l i r d z i q x t h k c e y k u b h p x q z b n p m r e u h k y r 
 a q u c m q a b l n m s q g i t g q r n y g d x p p c s u i t e y b a t 
 r d b e c t i q h s u k h m h a i g z p m f f z r c f u m h a g e q x l 
 s m a g i k a s q p k b k d n p y y p e c i u p g i u m l e p u u h c o 
 i c d m h p o c t z m a m c q m x o z g i z y g n z y d q b r h b k s y 
 n r p b k g u s d e c d r o a o f q u y a b a i d e n s a d y z d p h d 
 n h u r x y m r p s l a t y q l c t e n p p o r p s x k q a a b f r t m 
 i y m q s g s b r f n p i n g r o d k e f r b t z u n a s i p p t b x d 
 s g s a u y k r e u e f l k y i e s s n u i q q u m m z u a r c y r i s 
 r s c d b a m q b y u x c n n z g a u e l f s a y d r l r m q z a t r f 
 a u s m a c p f d d b z e d s h m z y u c i i p m c u c u d x p o d y x 
 m t c p o l m e s m a b g k k z o h d b e z l m l z y s e s f r b f a z 
 m s l m n b o n i c d g n a m y f k t k u p a o t h d z g a h y r r m y 
 a u c p c e e d o l a i d f o g m i k b y g g u l e s h m z k o b t u o 
 r h h u s n t m n b c m c i e x d o s k o p u m k u k z o h p d g b y f 
 s q e l p c y d s k s u s r q s m n i a q m t u b y b b q e f f i q t o 
 i g l h u s g k k b u m r e g a o x a c t u l r n n q y h k x x a s d t 
 n x c l r f i a m a y d y u y q l s i r g c o b p c t g o s f z c x t d 
 n m b n h l f c p o g k o e n g r f l o p q l y g i k y f u x p q s d i 
 i c e d n b h h u f i a q b p u i u c r c t t g n z m x x m u g y k t r 
 s l b f p p x z y x a c t k g c m t l o l q q d s h r i m l r s g q q o 
 r y r r c s f b a z c f x b i r z x c r y h x t c l o r z n h z i g y f 
 a a t b e i u r m y s o f d o b b z e h d n m s l h t b b p x p y y o o 
 m z x r q f y i c b u f h i e q y p s q a p b u c l q y r c a r k o y f 
 m y n h x x o r o k m e y a g y o z u h f r n l z n g e h h f t s y o o 
 a a p x n m n h t s u u o i x o y p k z h y e b b p u u z k x l p m n e 
 r m o f p b p x l p k m n z z q t z m y z a g h g x m t h p l h u d s n 
 s u f h u r c a n f m l k p n g b b o g f c k z i m l q e f n y m c x e 
 i l c l r e r m m e c o s z p u r n e x x s s h o u c t n u e n c f z g 
 n b e b t n h r z g i e i o z y i d k n m r f k f y s d s e t x s o h m


Code:

DIR
  SOYMAT
  \<< DUP SIZE DUP SQ 0. \-> n n2 col1
    \<< LA\->NL DUP REV + n 2. / LMRPT 1. n2 SUB DUP 'col1' STO 1. GET 2. n2
      START DUPDUP NIMAP SWAP 1. + GET + 23. MOD
      NEXT n2 \->LIST 2. n2
      FOR k DUP TAIL col1 k GET { SWAP NIMAP SWAP 1. + GET + 23. MOD } LSCAN
      NEXT n2 \->LIST
    \>>
  \>>
  SOYTAB
  \<< DUP SIZE \v/ 6. \<= \-> f
  \<< { f { { 32. SWAP } LMAP } IFT NL\->LA 13. CHR + 10. CHR + } LMAP \GSLIST
  \>>
\>>
  NL\->LA
  \<< NL\->S { 0. 8. 97. } CHR+ { 9. 19. 98. } CHR+ { 20. 22. 100. } CHR+
  \>>
  LA\->NL
  \<< LCASE "j" "i" SREPL DROP "v" "u" SREPL DROP "w" "u" SREPL DROP
{ 97. 105. -97. } CHR+ { 107. 117. -98. } CHR+ { 120. 122. -100. } CHR+ S\->NL
  \>>
  NIMAP { 2. 2. 3. 5. 14. 2. 6. 5. 14. 15. 20. 22. 14. 8. 13. 20. 11. 8. 8.
15. 15. 15. 2. }
  KEYS { "NISRAM" "ROELER" "IOMIOT" "ISIAPO" "ORRASE" "OSACUE" "XUAUIR"
"RAOSAC" "RSADUA" "ATROGA" "SDUOLO" "ARICAA" "MARSIN" "RELEOR" "TOIMOI"
"OPAISI" "ESARRO" "EUCASO" "RIUAUX" "CASOAR" "AUDASR" "AGORTA" "OLOUDS"
"AACIRA" "OSRESO" "NIEBOA" "OIAIAE" "ITIABA" "ADAMIS" "REUELA" "UISEUA"
"MERONF" "ILIOSU" "OYNIND" "IASULA" "MOYSES" }
END