w3c / mathml

MathML4 editors draft
https://w3c.github.io/mathml/
Other
64 stars 19 forks source link

tends-to #485

Closed NSoiffer closed 10 months ago

NSoiffer commented 10 months ago

During the 4 Jan meeting, we agreed to add tends-to as an intent. However, the notes don't mention any details. There are potentially three parts: "var arrow limit". The trivial (common) case is $x→0$. Here are two non-trivial examples: $x↗0$ and $x→0^-$.

What should the intent that goes on the mrow around them?

dginev commented 10 months ago

Here is a list of possibly useful details:

It is not immediately clear how to represent the pieces as a joint intent expression, since we have some unfinished design questions about optional arguments, and how complex we want to make argument patterns... But I'll venture a first guess:

  1. An optional third argument for tends-to is the simplest answer, where tends-to(x,0,below) is an adequate fit for $x \nearrow 0$. Each "direction of approach" can be treated as an intent concept name. I'd suggest above, below, left and right as the arguments.

  2. If we can't do optional arguments, an alternative is to have a 2-arg tends-to(x,0) and a more custom separate 3-arg concept, akin to approaches-with-direction(x,0,below), but that naturally feels heavier/less appealing.

So, assuming we can have optional arguments, a sample mrow for $\displaystyle \lim_{x\nearrow 0} f(x)$ could be:

<!-- "one-sided-limit" or "limit", upto pedagogical choice -->
<mrow intent="one-sided-limit($approach,$function)">
  <munder>
    <mi>lim</mi>
    <mrow arg="approach" intent="tends-to(x,0,below)">
      <mi>x</mi>
      <mo>↗</mo>
      <mn>0</mn>
    </mrow>
  </munder>
  <mrow arg="function" intent="f(x)">
    <mi>f</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>)</mo>   
  </mrow>
</mrow>

The other nuance is whether we prefer limit($approach,$function) or limit($approach)($function) as the markup. I think these two variants appear somewhat equivalent, but the higher-order syntax allows to detach the subtrees further, as in:

<!-- "one-sided-limit" or "limit", upto pedagogical choice -->
<mrow intent="$limit($function)">
  <munder arg="limit" intent="one-sided-limit($approach)">
    <mi>lim</mi>
    <mrow arg="approach" intent="tends-to(x,0,below)">
      <mi>x</mi>
      <mo>↗</mo>
      <mn>0</mn>
    </mrow>
  </munder>
  <mrow arg="function" intent="f(x)">
    <mi>f</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>)</mo>   
  </mrow>
</mrow>
NSoiffer commented 10 months ago

At the meeting, we discussed whether "tends-to" stands on its own or is connected to limit (which we already have). We decided this should stand on its own.

One important feature of an intent name we discussed in the past is that if AT doesn't know anything about it (e.g., it is added to core after some release), it should speak reasonably even if the AT speaks it as if it were in open. So tends-to:infix(x, 0) is good, but neither tends-to:infix(x, 0, below) ("x tends to 0 tends to below") nor tends-to(x, 0, below) ("tends-to of x and 0 and below") has a good reading.

I'm sure we have some names now that fail this "speaks well" test; they likely need to change.

After thinking about it for a few hours, unfortunately(?) I think we probably need 3 names:

I'm not wedded to "tends-to" or "above"/"below" -- the other names Deyan mentions (approaches, left/right) are also good.

dginev commented 10 months ago

I wonder if we may need a better way to deal with arguments that act as AdvP adverbial phrases when spoken. In this case the direction-of-approach argument answers a "how" question for "tends-to", supplementing the 2 core arguments. If taken to be a general rule, adding AdvP pieces to the concept names can make the lists grow quite significantly in size, especially in the Open realm.

dginev commented 10 months ago

I found a good counter-argument to my own point, and in support of Neil's suggestion for multiple names, which is that we have precedent for adding multiple entries for the same concept with different boundary conditions. Namely for the same interval concept, we have open-interval, open-closed-interval, closed-open-interval and closed-interval.

So, based on that precedent, it is reasonable to do the same kind of branching for tends-to.

Edit: Thinking on this some more, the interval example showcases both points.

  1. We have done it before, so we can do it again (multiple concepts varying on boundary conditions)
  2. Without better argument support, various AdvP arguments will require branching into multiple concepts.
polx commented 10 months ago

This multiplicity (of intervals) is inherited from Content-MathML. It is just as questionable, I feel.

dginev commented 10 months ago

Another useful couple of details - there is an alternative perspective and pronunciation (which I assume will use the Open concepts left-hand-limit and right-hand-limit) for the same constructs, as introduced here. It ignores the variable name when pronounced, as in:

The same text also presents "from the left" and "from the right" as an alternative pronunciation, as we've discussed above. I wonder if we want all of these available as choices for the AT to make, or if each intent concept will prescribe exactly one variation ("from the left" OR "from below" OR "left-hand-limit").

As a final note, I suspect that just picking one of these for Core is fine, but we should expect all of the other variations to show up in the Open list.

davidfarmer commented 10 months ago

I understand that $\lim\limits_{x\rightarrow c^-} f(x) = L$ can be spoken "the left-hand limit of f at c is L".

But there is a perfectly acceptable standard pronunciation, which follows the earlier suggestion of that the tends-to "stands on its own": "the limit as x approaches c from the left of f of x is L"

The point I am making is independent of whether the phrase is "approaches" or "tends to", or whether it is "from the left" or "from below".

NSoiffer commented 10 months ago

Added tends-to, tends-to-from-above, and tends-to-from-below as agreed to at 18 Jan, 2024 meeting.