Re: decorated characters

On Mon, Oct 18, 2021 at 9:35 AM David Farmer <farmer@aimath.org> wrote:
>
>
> A previous thread cast expressions like  x'  as multi-character
> variables.
>
> I think that was the wrong way to think about it.  There can
> be multi-character variables, but a separate and possibly more
> common situation is "decorated" characters.

Hi David, all,

I had been taught a long time ago to refer to the decorations as
"embellishments", to describe that they participate in how something
is named and have no independent contribution to the mathematical
meaning of an expression.
The word "embellish" may feel rather academic. I myself learned it in
English exactly in the context of MathML, (or was it my SAT exams?)
and haven't encountered it much besides. What it has going for it is
that is already included in the MathML 3 spec, but limited to
operators:
https://www.w3.org/TR/MathML3/chapter3.html#id.3.2.5.7.3

Personally, I like "decorated" as much, if not more. Just wanted to
bring up that the spec has used another word in the past. This could
also be a US vs UK English clash, hard to know from the outside.

I agree with what Bruce said, it is often single characters, but not
limited to. "Pr" (probability) gets decorated often. Words less
frequently so, I had to do a little careful digging to find some, but
they're certainly present in arXiv. Here are 5 I picked out from my
search:

1. "The resulting constraint mapping is denoted by {constraint}^\prime "
-source: Subsection 7.2.2 , item 3, https://arxiv.org/pdf/cs/0106035.pdf

2. {constant}^\prime
-source: Equation 6.6, https://arxiv.org/pdf/hep-th/0102041.pdf

3. {traces}^*
-source: Section 2, https://arxiv.org/pdf/cs/0007030.pdf

4. {Insert}^\prime and {Retract}^\prime
-source: Definition 6, https://arxiv.org/pdf/cs/0207085.pdf

5. {energy}^\prime
-source: Equation 35, https://arxiv.org/pdf/math/0201060.pdf

>
> Examples, and the way I would pronounce them, are:
>
> x prime
> x double prime
> x hat
> x bar
> x tilde
> x check
> x dot
> x double dot
> x star
>

Indeed, all of these make sense to me.

> Note that some of those have the decoration above the character,
> and others have the decoration above and to the right (northeast)
> of the character.
>
> I would be happy to hear of examples where one pronounces the
> decoration first and the variable second.

Indeed it is hard to imagine, and I don't have a speech corpus to
search over... You'd likely need a pre-script decoration of some sort.

>
> Suppose  J_0  is the 0th order Bessel function of the first kind.
> Is the subscript a decoration?  It looks like one to me.  And I
> pronounce it as  "J zero" not "J sub zero".
>
> An intent like
>      intent=decoration($1, $2)
> or
>      intent=decoration($2, $1)
> indicating on the order of pronunciation, could tell AT how to
> say the decorated character.  That intent also conveys the idea
> that the decorated character is one mathematical object.
>

Fun recent poll about sub-zero, which shocked me personally:
https://twitter.com/ProfKinyon/status/1445539954940014600

> I say "decorated character" and not "decorated variable" because
> the decoration might be on a function and not on a variable.
> The derivative f', and Fourier transform \hat{f}, are common
> examples of functions with decorations.

Sure, from another view these are "decorated names". What mathematical
objects they name is somewhat immaterial to AT.

>
> A flaw is that we have not conveyed the meaning, only the
> pronunciation.

A flaw for which desired goal? What is the application aimed to be enabled?

There is a pragmatic benefit to the encyclopedic approach, because you
can annotate quicker, without the burden of Full formalization.

> What if there were an (optional?) 3rd argument
> to the decoration intent?  For example:
>
> decoration(f, hat, fourier-transform)
> decoration(f, prime, derivative)
> decoration(x, dot, time-derivative)
> decoration(x, bar, mean)
> decoration(J, 0, bessel)
> decoration(a, n, index)
>
> The last one would appear in
>
>     sum a_n x^n
>

It's not really trivially computable though, since the argument
signatures are different - index(a, n) has 2 arguments, but
derivative(f) has one ("prime" gets ignored) and J_0 is even more
roundabout, as Bruce got into. So you put different kinds of objects
in the same package, which means you'll have to specify elsewhere how
to map them again into one (or many) computational runtime(s).

[Back to speech] To remind what I've drafted so far, the "lists of
intent names" proposal enabled this last example by adding
intent="index($1,$2)" and then writing a speech hint for the index
entry of "$1 $2".
The decorated names would've been intent="f-hat", intent="f-prime"
etc. but if an author was instead encoding operations they'd become
intent="fourier-transform(f)", intent="derivative(f)" etc. AT could
use "derivative" as a key for assigning special speech rules, just as
it could "f-prime".

> because the "n" is an index (of summation), and I would pronounce
> the "sub" in that case.
>
> If x' is just a new variable and the prime has no meaning,
> that could be a case to omit the 3rd argument to decoration.
>

Maybe good enough as long as you don't introduce multiple decorative
pieces, such as "Pr_{d6}^\tilde", which may mean "the probability of
having the outcome 'six' from a dice throw, during the 'tilde'
experiment". I'm unsure how an author would like that spoken. Ideally
as-written is fine (no extra remediation work = best outcome). But one
can imagine a custom reading. For the sake of example, maybe:
intent="probability-tilde-outcome-six".

Brainstorming with your extended syntax form, one may be tempted to write:
intent="decoration('Pr', 'd6',  'tilde', 'probability')",

but the positional arguments are now 4, so some new rule would be
needed, or the decorative pieces need to be pre-combined in the second
slot.

Greetings,
Deyan


> All this assumes AT actually needs help pronouncing decorated characters
> correctly.
>
> Regards,
>
> David
>
>

Received on Monday, 18 October 2021 17:48:45 UTC