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

David Sycamore djsycamore at yahoo.co.uk
Thu Mar 28 08:46:31 CET 2024


I agree that three different uses of “|” in the same statement is overdoing it, and may lead to confusion. However there is perhaps a case for restricting it to two rather than one “deployment” within a given statement, where the distinction is obvious within the concept being explained. 

Use of “|” to mean “such that” is in my opinion the problem in the example given, and is unnecessary because it seems to me that  “:” is a much better choice. 

Use of “|” and “|{set}|” to mean “divides” and “card” respectively are pretty much universal and I see no ambiguity or confusion in the use of both in the same statement, for example in Mike’s expression, where the meaning of cardinality is conveyed by the fact that “|” appears first and last, ie nothing to the left of the first and nothing to the right of the last, with set notation in between clearly refers to the number of elements in that set, whilst “p|k” obviously conveys the standard meaning that p divides k.

In case of any doubt the best fallback is to “spell it out in full in plain English”. 
Nowt wrong with that 

David.


> On 28 Mar 2024, at 05:39, mike at vincico.com wrote:
> 
> 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/
> 
> 
> --
> Seqfan Mailing list - http://list.seqfan.eu/



More information about the SeqFan mailing list