As Ralf noted, padic numbers need special support to read/write.
For some reason (maybe bug) this support is not active when using
normal files. However, it is active in Library. You can use it like:
(1) -> ll := library("tst.lib")
(1) "tst.lib"
Type: Library
(2) -> PR ==> PAdicRational(13)
Type: Void
(3) -> A : PR := 1
(3) 1
Type: PAdicRational(13)
(4) -> ll("a") := A
(4) 1
Type: PAdicRational(13)
(5) -> Al : List(PR) := [1, 1/4]
(5)
[1,
2 3 4 5 6 7 8 9
10 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13
+
10 11
9 13 + O(13 )
]
Type: List(PAdicRational(13))
(6) -> ll("Al") := Al
(6)
[1,
2 3 4 5 6 7 8 9
10 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13
+
10 11
9 13 + O(13 )
]
Type: List(PAdicRational(13))
(7) -> Am : SQMATRIX(4, PR) := [[2, 3, 5, 0], [7, 11, 12, 4], [3, 8, 6, 10], [12Am : SQMATRIX(4, PR) := [[2, 3, 5, 0], [7, 11, 12, 4], [3, 8, 6, 10], [12, 9, 8, 5]]
+2 3 5 0 +
| |
|7 11 12 4 |
(7) | |
|3 8 6 10|
| |
+12 9 8 5 +
Type: SquareMatrix(4,PAdicRational(13))
(8) -> ll("Am") := Am
+2 3 5 0 +
| |
|7 11 12 4 |
(8) | |
|3 8 6 10|
| |
+12 9 8 5 +
Type: SquareMatrix(4,PAdicRational(13))
(9) -> keys(ll)
(9) ["Am", "Al", "a"]
Type: List(String)
(10) -> close!(ll)
(10) "tst.lib"
Type: Library
In new session:
(1) -> ll := library("tst.lib")
(1) "tst.lib"
Type: Library
(2) -> keys(ll)
(2) ["Am", "Al", "a"]
Type: List(String)
(3) -> ll("a")
(3) 1
Type: PAdicRational(13)
(4) -> ll("Al")
(4)
[1,
2 3 4 5 6 7 8 9
10 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13 + 9 13
+
10 11
9 13 + O(13 )
]
Type: List(PAdicRational(13))
(5) -> ll("Am")
+2 3 5 0 +
| |
|7 11 12 4 |
(5) | |
|3 8 6 10|
| |
+12 9 8 5 +
Type: SquareMatrix(4,PAdicRational(13))
--
Waldek Hebisch