moreover, in terms of sets functions are a relation with some restrictions:
- That they are binary relations
- The "functional-requirement" (as I call it) refers to the difference between a relation and a function. for every x, f(x) = (only one thing); e.g. a relation can have pairs (x,a) and (x,b) but no function can do this.
As far as I've understood, this gets really "fun" when characteristic-functions enter the scene... With these boolean-valued functions it's possible to define a set.
- Sets as fundamental: define ordered pairs via Kuratowski's definition, define relations as sets of ordered pairs, define functions as relations not containing any two ordered pairs with the same first projection but different second projections
- Relations as fundamental: define sets as unary relations, define functions as relations the same way as before
- Functions as fundamental: define sets as functions where the codomain is some fixed singleton (characteristic functions are more appropriate for subsets of a set, rather than sets on their own), define relations as functions whose codomains are power sets
Because of this sort of thing, I don't think any notion of "fundamental" that's purely based on interdefinability really makes much sense.
I personally have a sense that some definitions are "constructive" and others are "destructive" (my use of "constructive" here is in no way related to "constructive" as in "constructive logic", it's just based on the English meaning of "construct"). Of the definitions I gave above, I perceive the definitions of functions and relations from sets, of functions from relations, and relations from functions as "constructive", while the definitions of sets from functions and from relations are "destructive". Since I can't think of any "constructive" definition of sets from functions or relations, while I can think of "constructive" definitions in the opposite direction, I would say sets are more fundamental than functions and relations. Whereas since both relations and functions can be "constructively" inter-defined, I'd say they're both on the same level.
Admittedly, I have no idea how to define "constructive".
But assuming that it is possible (as the GP believes), my feeling is that relations would be more general, maybe similar to how graphs are a more general concept than directed graphs. Representing relations as functions to power sets feels rather complex to me compared with functions being a special type of relation, which is why I would find the latter more natural. And thus I was wondering whether the GP maybe has a good reason to go with functions rather than relations.
There has been some research pushing towards Function types being a specialization of Relations as types, where relations become the foundational elements. But I think the biggest point of contention in your comment is finding sets (i.e. Domains/Codomains) to be required to define functions.
Most of this discussion is inspired (either implicitly or explicitly) by the type theoretic foundations. There is a fundamental difference between sets and types, but they are both used to describe the ‘inputs’ and ‘outputs’ of a function in general discussion. However, type theoretical foundations takes types to be the foundation of mathematics, so sets are then defined in terms of types and do not act as the ‘inputs’ and ‘outputs’ for functions.
Sets -[construct-into]-> Relations -[construct-into]-> Functions
The 'destructive' definitions are a bit less common
> the definitions of sets from functions and from relations are "destructive".
so a destructive definition of a set:
- start with a relation: define unary relations... I can see how this could be 'destructive'; it has a feel like an 'overkill' (or a 'waste') to use relations and then use only half of what they provide to regard them as sets
- start with a function: to define a relation use a singleton co-domain (this is really very similar to characteristic functions. This has been quite tricky for me to wrap my head around: how in logic there's a tacit assumption of 'truth' in the sense that a predicate defines a set and if this set is empty then the predicate is 'false'. I'm studying this from the lens of modal logic and formal semantics)
to define a relation use a power set.
I think all this is still relying on sets, because a co-domain is a set, as well as a power set.
> Since I can't think of any "constructive" definition of sets from functions or relations, while I can think of "constructive" definitions in the opposite direction, I would say sets are more fundamental than functions and relations
As I understand this, the sets really are more fundamental because in the end they bring to the system (for the lack of a better word) the capability to identify things, and when dealing with functions, which come with variables, the concept of a set allows for identifying the same variables in the function's call (parametric denotation?) and the functions actual body (its computable definition)
What I'm trying to say, is why it may well be the case that sets really are more fundamental than functions.
may I recommend this links to read up on the precise formal definition of ‘type’
https://plato.stanford.edu/entries/type-theory/
Simple Type Theory https://plato.stanford.edu/entries/type-theory-church/