I am pushing a little bit the limits of Unicode support
in SWI-Prolog. Especially parsing and unparsing Prolog terms.
With version 9.3.2 I get the following result:
?- X = π(x).
X = π(x).
?- X = π₂(x).
ERROR: Syntax error: Operator expected
ERROR: X =
ERROR: ** here **
ERROR: π₂(x) .
On the other hand, using the JDK 21 Unicode database,
their category definitions I get in my Prolog systems:
?- X = π(x).
X = π(x).
?- X = π₂(x).
X = π₂(x).
I started using the subscript and superscript feature of
Unicode for some proof display. I guess it gets parsed and
unparse as expected in my system because:
?- char_code('₂', C), code_type(C, T).
T = 11
And OTHER_NUMBER = 11
also known as No
, I do
allow these in a Prolog identifiers.