(Sorry, my previous email was sent when I was only halfway done writing it.)
David A. Wheeler wrote:
> > Some of ISO 80000-2 is not in
set.mm and I expect it would be too hard to
> > implement. The most obvious is function application; the ISO spec uses
> > f(x), while
set.mm uses (f ` x)...
Mario Carneiro replied:
> Indeed, this is a "necessary sacrifice", not a deliberate deviation from
> the literature. It is impossible due to "technical difficulties". More
> precisely, if df-fv was "A ( B )" then it would be a suffix notation (a
> class expression that begins with a class expression), and it is impossible
> to have both prefix and suffix constructors in the same grammar without
> ambiguity...
Technically it's possible to do both, since many parsers do *exactly* this,
but I know what you mean - it would require a fundamental change.
So let's presume that's *not* on the table.
> It is possible to use "` A ( B )" and hide the backtick, but I wonder if this is
> not more strange and inconvenient.
That's an interesting possibility. It basically treats ` as an "apply" operator.
I'm not even sure you need to hide the backtick; that might be a separate issue.
I guess the question is, what is more aesthetically pleasing:
( sin ` x )
` sin ( x )
It's exactly the same number of symbols, and same number of characters.
Since ` sin ( x ) is more similar to traditional notation, perhaps
that should be seriously considered. It'd be a big change.
On the other hand, it's probably automatable and justifiable.
I typically look at the HTML as the "published" version of the work, and
I suspect this change would make the "published" version look much better
(it'd be closer in form to traditional notation).
How would multi-argument functions best be handled, if this big change were done?
> > Note that it is possible to use the notation "XX ( B )" if XX is a
> > constant, by defining the entire thing as one piece of syntax. But this
> > requires "convenience theorems" like equality and hypothesis builders...
From a *syntactic* view that'd be ideal, but I understand that the extra
work is undesirable.
> > > Some things are implementable but involve nontrivial changes. It's not
> > > clear those changes would be worth it, but it might be worth discussing.
> > > For example, ISO uses p => q for implication (two-line), not p -> q (they
> > > use -> for expressions involving limits), and same is true for "<=>".
> > > Metamath uses "->", not "=>", in its real notation (the "=>" is generated
> > > in the HTML in some special cases, but that could be changed to another
> > > symbol). Is that worth changing?...
> > I have also noted this, as HOL seems to prefer "==>" for implication. Since
> > the change is trivial (even if it touches every theorem in the database), I
> > don't have a strong opinion for either -> or => . However, it should be
> > noted that the web page uses "&" and "=>" for connectives between
> > hypotheses and from hypothesis to conclusion...
Right, that's what I meant when I said that the "=>" is generated in the HTML.
> ... if "->" is changed to "=>" what should "=>" become?
Lots of other symbols are available.
My immediate thought is the 3 dot "therefore" sign, documented here:
http://en.wikipedia.org/wiki/Therefore_sign
and available in HTML as ∴
> > Furthermore, it appears to be standard in logic textbooks to use "->" in
> > actual formulas, especially when they are being nested. To me, => as
> > implication makes more sense if it is rare and surrounded by plain text,
> > and I wonder if this is the context being addressed by ISO 80000
I suspect that many logic textbooks that use -> primarily focus only on logic,
and do NOT also include limits, derivatives, and integrals (which ALSO traditionally
use -> but for a completely different meaning). I note that the ISO spec uses ->
for these latter meanings.
> > Are you sure you got that right, because I would call that a misstep on
> > ISO's part. I have only ever seen "lg" to mean log base 2, not "lb".
> > (Perhaps they wanted to claim "lg" for log base 10, but that's just
> > confusing...)
ISO does indeed define log as the two-argument version, and then define:
lg: common/decimal log, base 10
lb: binary log, base 2
ln: natural log, base e
IIRC, this has been a typical problem. "Everyone" knows what the base of log is,
it's the one they use. Engineers presume that log is base 10,
Computer Scientists presume that log is base 2 (so they'll write "log x" meaning "log base 2"),
and some mathematicians presume that log is base e.
Engineers build the calculators, so "log" means "base 10" on calculators.
I've never seen "lg" to mean log base 2, but I *have* seen "log" to mean base 2.
> >
> > This is actually a good point, though, in that we have no definition of log
> > with general base; since we have ^c it seems reasonable to extend log to
> > other bases as well. I'm a bit torn on the notation, though; options are "(
> > B log_ A )", "( ( log_ ` B ) ` A )", and "( log_ B ` A )" to mean log base
> > B of A. A possible definition (according to the last notation) might be
> >
> > log_ B = ( a e. ( CC \ { 0 } ) |-> ( ( log ` a ) / ( log ` B ) ) )
I think the current current "log" should be renamed as "ln", because
that is unambiguous. Then define a 2-argument log.
If the function application notation were changed, this is an obvious example
of the question, "how can multi-argument functions best be handled?"
> > > N* [natural numbers not including 0],
> >
> > Now here's a minefield. No one ever seems to be able to come to consensus
> > on whether 0 e. NN.
> > Given such a choice, the "other" definition ( NN \ { 0
> > } ) = NN* or ( NN u. { 0 } ) = NN0 is easily notated, but NN itself is
> > certainly not "agreed upon" with either definition.
I'm well aware of this. It's very useful to have a set starting with 0, and a set
starting with 1, and it's sad that people can't universally agree on the names of these two sets.
On the other hand, if we can appeal to an international
standard, we at least have a good justification for the choice used.
I also like the "*" convention that means "do not include 0". 0 is special
(e.g., can't divide by it), so having a shorthand for it is useful in other areas.
> > That said, it is simple
> > to change this in the database (although from a pedagogical point of view I
> > would prefer the initial development start with NN0 and define NN* in terms
> > of it, if NN0 gets the more fundamental symbol).
Sure. As a long as the development makes sense.
--- David A. Wheeler