[seqfan] Re: Style sheet lacks much of anything on "vertical bar"

mike at vincico.com mike at vincico.com
Wed Mar 27 14:46:15 CET 2024


Robert,

This seems logical and good general guidance. 

If accepted, can we search for pipes/vertical bars "|" and correct phrases
that don't conform to this proposal? The versions of OR that don't conform
may occur between numbers and indeed may show in code. Of course the
recommendation could pertain to new proposals and be corrected as they are
encountered.

Here is a follow-on question:

Consider the following:

"Number of primes p such that p divides k but p is coprime to n." 

Suppose it is poorly expressed in the following caricature:

|{ p | p | k, (p, n) = 1 }|

There are 3 different uses of "|" in the same expression. Perhaps it should
rather be as follows:

Card({ p : p | k, (p, n) = 1 }).

That is, only one deployment of "|" should pertain to a function in any
expression. If one uses "|" to mean cardinality or absolute value,
divisibility or "such that", then one cannot use it to represent another
concept. Perhaps it should be so throughout any particular sequence text. It
seems that spelling it out in full in plain English is the safest bet, but
expressions are handy and concise.

Is this example overregulation? I am sure that editors would correct the
expression when it arises. Is it good general guidance for contributors?

Best regards,
Mike

-----Original Message-----
From: SeqFan <seqfan-bounces at list.seqfan.eu> On Behalf Of Robert Munafo
Sent: Tuesday, 26 March, 2024 18:00
To: Sequence Fanatics Discussion list <seqfan at list.seqfan.eu>
Subject: [seqfan] Style sheet lacks much of anything on "vertical bar"

No-one noticed on oeis.org/wiki/Talk:Style_Sheet therefore I now ask here.

Can we add to the "Spelling_and_notation" section of
oeis.org/wiki/Style_Sheet, to sanction more uses of the vertical bar "|"?

I happen to have looked for precedent specifically of the form "min_{a|b}
{expression}" and ran across the lack of clarity on whether "|" can be used
apart from set cardinality.

Searching the OEIS I find that "|" has been used for the "divides"
relation 10 or more years ago, e.g. in the formula for A117498 we
find: "min_{d|n, 1<d<n} a(d)+a(n/d)".

In the OEIS, for a similarly long amount of time, the bar has also been used
often for "such that", e.g. name of A071893 "Min{k | A071891(k)=n}".

I would recommend these uses, in no particular order, as most seem to be
already in common use, usually in an unambiguous way:
  x|<expr> for "x divides an expression" (i.e. <expr>/x is an integer) which
could be a statement, or a set definition as when "written below" Sigma or
Pi or as a subscript to a function like "min"
  x|<statement> for "x such that <statement>" as might be used in a set
definition "for all x such that...", or existence assertion e.g.
"there exists x such that"
  |<expr>| for the absolute value of a scalar-valued expression or field
members for which something similar is well-defined
  ||<expr>|| for the norm of a vector-valued expression
  |M| for the determinant of a matrix
  |S| for the cardinality of a set S

and I would recommend against:
  <expr>|<expr> for bitwise "or" as in some programming languages
  <statement>||<statement> for boolean disjunction "or" as in some
programming languages

--
  Robert Munafo, mrob27 at gmail.com

--
Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list