Why does x=y -> f(x)=f(y)?

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

User avatar
Robert'); DROP TABLE *;
Posts: 730
Joined: Mon Sep 08, 2008 6:46 pm UTC
Location: in ur fieldz

Why does x=y -> f(x)=f(y)?

Postby Robert'); DROP TABLE *; » Thu Oct 06, 2016 10:33 pm UTC

One of the first rules of basic algebra is that if you have an equation, you can transform both sides with the same function to produce another valid equation. However, from a foundations perspective, which axiom(s) actually imply that this is true?
...And that is how we know the Earth to be banana-shaped.

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 3369
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: Why does x=y -> f(x)=f(y)?

Postby Soupspoon » Thu Oct 06, 2016 11:19 pm UTC

Not sure about official axioms, but from the head of the Wiki article, "In mathematics, a function[1] is a relation between a set of inputs and a set of permissible outputs with the property that each input is related to exactly one output."

Whether or not two nonequal x and y can still f(x)=f(y), equal x and y must, through f(), arrive at the same result, at least within the domain of mathematical functions (as opposed to computational ones, which are slippier beasts less strict about this). That result may be "undefined", or even composite (±2, 3±1, all cube roots of 1+i, etc), but would be identical or an identical set.

If it is a composite result, then further winnowing of f(x) might produce differences to further winnowing of f(y), but only with unequal winnowing functions, so I don't think that invalidates this. BICBW.

User avatar
Flumble
Yes Man
Posts: 1998
Joined: Sun Aug 05, 2012 9:35 pm UTC

Re: Why does x=y -> f(x)=f(y)?

Postby Flumble » Thu Oct 06, 2016 11:19 pm UTC

Huh, according to wikipedia that's a substitution axiom (schema) for functions as part of first-order logic. Well, there it's described for functions with any number of parameters, but one of those is exactly x=y -> f(x)=f(y).

I would've expected an axiom that simply said "if x=y you can replace x by y wherever you want" and build x=y, f(x)=f(x) -> f(x)=f(y) from there, but it seems mathematicians prefer the former.

[edit]ninjaing within a minute is just unfair :cry:

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 3369
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: Why does x=y -> f(x)=f(y)?

Postby Soupspoon » Thu Oct 06, 2016 11:28 pm UTC

Flumble wrote:[edit]ninjaing within a minute is just unfair :cry:

You clearly did more work than me, who only went on what I thought instinctively and obviously missed the next link. I think you deserve all the credit. (I spent too much time wondering whether to attempt to write out the cube roots of 1+i in full... As if that had anything to do with the price of fish1.)

1 Or maybe "poisson distribution"? ;)

User avatar
Eebster the Great
Posts: 2994
Joined: Mon Nov 10, 2008 12:58 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby Eebster the Great » Fri Oct 07, 2016 12:41 am UTC

It depends on what rules of inference or transformation you are using. There are many equivalent formal systems, some of which include an axiom (or axiom schema) of substitution.

The axioms used in algebra class typically are special cases or simplifications of more general axioms used by mathematicians. For example, you may know about the "field axioms" like the associative property for addition (a+b)+c = a+(b+c), which can be simply taken as an axiom defining addition or which can be proved for a specific construction of addition as in Peano arithmetic.

User avatar
Zohar
COMMANDER PORN
Posts: 8127
Joined: Fri Apr 27, 2007 8:45 pm UTC
Location: Denver

Re: Why does x=y -> f(x)=f(y)?

Postby Zohar » Fri Oct 07, 2016 12:53 pm UTC

Yeah it basically comes down to how we define a function.
Mighty Jalapeno: "See, Zohar agrees, and he's nice to people."
SecondTalon: "Still better looking than Jesus."

Not how I say my name

User avatar
doogly
Dr. The Juggernaut of Touching Himself
Posts: 5393
Joined: Mon Oct 23, 2006 2:31 am UTC
Location: Somerville, MA
Contact:

Re: Why does x=y -> f(x)=f(y)?

Postby doogly » Fri Oct 07, 2016 8:14 pm UTC

And how you define =. If you say x=y but f(x) != f(y), then there must be something not-quite-x about y. Which generally is not a notion supported by =. Try ~?
LE4dGOLEM: What's a Doug?
Noc: A larval Doogly. They grow the tail and stinger upon reaching adulthood.

Keep waggling your butt brows Brothers.
Or; Is that your eye butthairs?

MostlyHarmless
Posts: 154
Joined: Sun Oct 22, 2006 4:29 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby MostlyHarmless » Fri Oct 07, 2016 9:01 pm UTC

doogly wrote:And how you define =. If you say x=y but f(x) != f(y), then there must be something not-quite-x about y. Which generally is not a notion supported by =. Try ~?


A little of both, I suppose, but this feels more like a property of functions than a property of equality to me. The first example that comes to mind is a function on rational numbers such that f(a/b) = a. It's perfectly reasonable to define equality of rational numbers so that 1/2 = 2/4, but f(1/2) = 1 != 2 = f(2/4), so f is not a function.

User avatar
Xenomortis
Not actually a special flower.
Posts: 1420
Joined: Thu Oct 11, 2012 8:47 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby Xenomortis » Fri Oct 07, 2016 9:51 pm UTC

I don't think that makes sense.
Your function there is really f: N2 -> N, not Q -> N.
In Q, you don't differentiate 1/2 and 2/4.
Image

User avatar
Eebster the Great
Posts: 2994
Joined: Mon Nov 10, 2008 12:58 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby Eebster the Great » Fri Oct 07, 2016 10:31 pm UTC

1/2 and 2/4 are, by the usual definitions, either elements of the same rational number (where rational numbers are defined as equivalence classes of ordered pairs of integers, with the second integer nonzero, and a/b means (a,b)) or representations of the same rational number (using an axiomatic definition). Technically, they are not themselves rational numbers.

You could define a function over elements of rational numbers, which is a subset of Z2, in which case 1/2 != 2/4, so it is perfectly possible that f(1/2) != f(2/4) for some function f.

MostlyHarmless
Posts: 154
Joined: Sun Oct 22, 2006 4:29 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby MostlyHarmless » Fri Oct 07, 2016 11:27 pm UTC

Sure, I wasn't being very precise about my definitions of rational numbers, but my point was that such an f is not a function under any standard definitions of the terms. (In fact, I remember this being one of the textbook examples in my undergrad "introduction to proofs" class.) Admittedly, I did not express myself very well; I'll try again.

Doogly said that if x = y but f(x) != f(y), then there must be something not-quite-x about y, which is generally not a notion supported by =. I think we all agree that such an f cannot exist under the normal definitions of "equals" and "function". As a parallel, if x = y but f(x) != f(y), then there must be something about f that cares whether you called the input x or y, which is generally not a notion supported by "function". Again, I think we all agree that such an f cannot exist under the normal definitions of "equals" and "function".

The domain of a function is always (as far as wikipedia and I know) a set, so if x and y are both in the domain and x = y, then x and y are just two different names for the same element. If we pretend there is a function such that x = y and f(x) != f(y), then either x is not really equal to y, so we have a contradiction, or f cares how we name elements, which is also a contradiction.

Again, I think we all agree that my example was not a function (and not very well explained) and that no such function exists with standard terminology. I was just trying to point out that it makes as much sense to blame the definition of "function" as it does to blame the definition of "equals".

User avatar
Soupspoon
You have done something you shouldn't. Or are about to.
Posts: 3369
Joined: Thu Jan 28, 2016 7:00 pm UTC
Location: 53-1

Re: Why does x=y -> f(x)=f(y)?

Postby Soupspoon » Sat Oct 08, 2016 12:06 am UTC

In computing terms, inequality could happen in a number of circumstances.

Code: Select all

sub f(value) = return rand(value);
// Same input value brings forth (almost always) different 0<=return<value, or similar constraints

Code: Select all

sub f(value) = return { while value-- {out=pop list}; out};
//...or similar stateful returns like traversing a linked-list circuit or static variable memory between calls

Code: Select all

sub f(valueRef) = return valueRef.address
// Assuming the compiler hasn't optomised x and y as same address whilst equal...

...you can doubtless think of others (f(whatever)=time(now())?) and most mean that even f(x)!=f(x) is entirely possible.

But none of those are valid pure mathematical functions. Most are stateful (randomiser included) and so are f(value, state), when unpacked.

User avatar
Eebster the Great
Posts: 2994
Joined: Mon Nov 10, 2008 12:58 am UTC

Re: Why does x=y -> f(x)=f(y)?

Postby Eebster the Great » Sat Oct 08, 2016 1:12 am UTC

Equality is treated pretty loosely in most languages too, especially with 0 and -0, for instance. A function IsNegative(x) that returns true for -0 and false for 0 is easy to define, but 0==-0 returns true.


Return to “Mathematics”

Who is online

Users browsing this forum: No registered users and 11 guests