Zulip Chat Archive

Stream: mathlib4

Topic: Elementary functions


Trebor Huang (Oct 16 2023 at 15:10):

I don't think there are elementary functions in mathlib (as a class of functions) yet? Since every individual type (sin, exp etc.) of functions is already in mathlib, I'd like to define the set of elementary functions and prove some elementary (no pun intended) properties. What is the best way to do this? One problem I can think of is that we also need to formalize the notion of "natural domain" of a function, which excludes zero for reciprocals, negative numbers for square roots, etc.

Alex J. Best (Oct 16 2023 at 15:19):

Generally we would define a class of functions like this using an inductive predicate, to express some fixed type of combinations of some fixed base functions. See docs#IsPoly or docs#IsSolvableByRad for some examples

Trebor Huang (Oct 16 2023 at 15:30):

Alex J. Best said:

Generally we would define a class of functions like this using an inductive predicate, to express some fixed type of combinations of some fixed base functions. See docs#IsPoly or docs#IsSolvableByRad for some examples

I'm thinking about either this or defining an inductive syntax (i.e. no indices, just an inductive type Elementary : Type), and a function Elementary -> Real -> Real that is zero outside of the natural domain.

Trebor Huang (Oct 16 2023 at 15:31):

I'm still worried about this domain thing. What should the value of 1x+1\frac{1}{x} + 1 be at zero?

Trebor Huang (Oct 16 2023 at 15:34):

Also, we should have a theorem like "the floor function isn't elementary because it is not continuous on its domain". But if we use junk values I think this is false..

Ruben Van de Velde (Oct 16 2023 at 15:40):

Are you saying the floor function would be elementary, that it would be continuous, or that the implication "not continuous -> not elementary" would be false?

Timo Carlin-Burns (Oct 16 2023 at 15:41):

Could you define it as an inductive predicate on partial functions? docs#Nat.Partrec for an example

Trebor Huang (Oct 16 2023 at 16:09):

A quick sketch of my proposal before I go to bed:

Full Code

Trebor Huang (Oct 16 2023 at 16:10):

Ruben Van de Velde said:

Are you saying the floor function would be elementary, that it would be continuous, or that the implication "not continuous -> not elementary" would be false?

The last. I think this is one of the "headline properties" of elementary functions, so we need to deal with it.

Trebor Huang (Oct 17 2023 at 05:16):

The rational roots look like a mess.. Let me see if there's some slick mathematical definition that avoids discussing the domain of ration powers


Last updated: Dec 20 2023 at 11:08 UTC