/usr/share/axiom-20170501/src/algebra/TABLEAU.spad is in axiom-source 20170501-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | )abbrev domain TABLEAU Tableau
++ Author: William H. Burge
++ Date Created: 1987
++ Date Last Updated: 23 Sept 1991
++ Description:
++ The tableau domain is for printing Young tableaux, and
++ coercions to and from List List S where S is a set.
Tableau(S) : SIG == CODE where
S : SetCategory
L ==> List
I ==> Integer
NNI ==> NonNegativeInteger
OUT ==> OutputForm
V ==> Vector
fm==>formMatrix$PrintableForm()
SIG ==> with
tableau : L L S -> %
++ tableau(ll) converts a list of lists ll to a tableau.
listOfLists : % -> L L S
++ listOfLists t converts a tableau t to a list of lists.
coerce : % -> OUT
++ coerce(t) converts a tableau t to an output form.
CODE ==> add
Rep := L L S
tableau(lls:(L L S)) == lls pretend %
listOfLists(x:%):(L L S) == x pretend (L L S)
makeupv : (NNI,L S) -> L OUT
makeupv(n,ls)==
v:=new(n,message " ")$(List OUT)
for i in 1..#ls for s in ls repeat v.i:=box(s::OUT)
v
maketab : L L S -> OUT
maketab lls ==
ll : L OUT :=
empty? lls => [[empty()]]
sz:NNI:=# first lls
[blankSeparate makeupv(sz,i) for i in lls]
pile ll
coerce(x:%):OUT == maketab listOfLists x
|