/usr/share/axiom-20170501/src/algebra/OMENC.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 | )abbrev domain OMENC OpenMathEncoding
++ Author: Vilya Harvey
++ Description:
++ \spadtype{OpenMathEncoding} is the set of valid OpenMath encodings.
OpenMathEncoding() : SIG == CODE where
SIG ==> SetCategory with
OMencodingUnknown : () -> %
++ OMencodingUnknown() is the constant for unknown encoding types. If
++ this is used on an input device, the encoding will be autodetected.
++ It is invalid to use it on an output device.
OMencodingXML : () -> %
++ OMencodingXML() is the constant for the OpenMath XML encoding.
OMencodingSGML : () -> %
++ OMencodingSGML() is the constant for the deprecated OpenMath SGML
++ encoding.
OMencodingBinary : () -> %
++ OMencodingBinary() is the constant for the OpenMath binary encoding.
CODE ==> add
Rep := SingleInteger
=(u,v) == (u=v)$Rep
import Rep
coerce(u) ==
u::Rep = 0$Rep => "Unknown"::OutputForm
u::Rep = 1$Rep => "Binary"::OutputForm
u::Rep = 2::Rep => "XML"::OutputForm
u::Rep = 3::Rep => "SGML"::OutputForm
error "Bogus OpenMath Encoding Type"
OMencodingUnknown(): % == 0::Rep
OMencodingBinary(): % == 1::Rep
OMencodingXML(): % == 2::Rep
OMencodingSGML(): % == 3::Rep
|