Finding inverses of two functions in Lambda Notation

CGandC
Messages
326
Reaction score
34
Homework Statement
Find if the following functions are injective and if so find their inverses.
Relevant Equations
Familiarity with Lambda notation ( from lambda calculus )
I found the following functions ( In lambda notation ) to be injective, and now I am trying to find the inverse functions for them ( the inverse for the Image of ## f ## ) but I am stuck and I need help:
1. ## f = \lambda n \in \mathbb{N}. (-1)^n + n^2 ##
2. ## f = \lambda g \in \mathbb{R} \rightarrow\mathbb{R}. \lambda x \in \mathbb{R} . g(x+1) ##

In 1. This function is indeed injective. My first approach to find the inverse was handwavingly done as follows ## (-1)^{2g(n)+1} + (2g(n)+1)^2 =n \longrightarrow g(n) = \frac{\sqrt{n+1} -1}{2} ## ( ## n \in \mathbb{N} ## ) , I've done this in order for ## (-1)^{2g(n)+1} ## to be equal to ## -1 ##, but clearly ## 2g(n) + 1 = \sqrt{n+1} ## and it won't always be the case that ## \sqrt{n+1} ## is a natural number so clearly, ## g ## is not the correct inverse function for ## f ##.

In 2. I found this function to be injective ( maybe I am wrong? ) but then I was completely stumbled and don't know how to seek the inverse.
 
Physics news on Phys.org
CGandC said:
Homework Statement:: Find if the following functions are injective and if so find their inverses.
Relevant Equations:: Familiarity with Lambda notation ( from lambda calculus )

I found the following functions ( In lambda notation ) to be injective, and now I am trying to find the inverse functions for them ( the inverse for the Image of ## f ## ) but I am stuck and I need help:
1. ## f = \lambda n \in \mathbb{N}. (-1)^n + n^2 ##
2. ## f = \lambda g \in \mathbb{R} \rightarrow\mathbb{R}. \lambda x \in \mathbb{R} . g(x+1) ##

In 1. This function is indeed injective. My first approach to find the inverse was handwavingly done as follows ## (-1)^{2g(n)+1} + (2g(n)+1)^2 =n \longrightarrow g(n) = \frac{\sqrt{n+1} -1}{2} ## ( ## n \in \mathbb{N} ## ) , I've done this in order for ## (-1)^{2g(n)+1} ## to be equal to ## -1 ##, but clearly ## 2g(n) + 1 = \sqrt{n+1} ## and it won't always be the case that ## \sqrt{n+1} ## is a natural number so clearly, ## g ## is not the correct inverse function for ## f ##.

Let's look at the pairs that we know:

##f(0) = 1## so ##g(1) = 0 = \sqrt{1-1} ##
##f(1) = 0## so ##g(0) = 1 = \sqrt{0+1}##
##f(2) = 5## so ##g(5) = 2 = \sqrt{5-1}##
##f(3) = 8## so ##g(8) = 3 = \sqrt{8+1}##
##f(4) = 17## so ##g(17) = 4 = \sqrt{17-1}##

So the pattern is not always that ##g(n) = \sqrt{n+1}##, but a case split:
If ##n## is even, then ##g(n) = \sqrt{n+1}##.
If ##n## is odd, then ##g(n) = \sqrt{n-1}##.

The fact that ##g(n)## isn't always equal to an integer is irrelevant. To be an inverse of ##f##, all you need is that ##g(f(n)) = n##. ##f## and ##g## do not have to have the same range and domain. In general: ##f## maps some set ##A## onto some set ##B##. It's inverse would be a function ##g## that maps ##B## onto ##A##. What it does on objects that are not in ##B## is irrelevant (or if you want, you can let ##g(x)## be undefined if ##x## is not in ##B##). In the case we are talking about, ##B## is the set ##0, 1, 5, 8, 17 ...##
In 2. I found this function to be injective ( maybe I am wrong? ) but then I was completely stumbled and don't know how to seek the inverse.

The fact that there are two lambdas is maybe a red herring. Just put it into words:

You have a function ##f## which when given another function ##g## returns a third function ##h## such that ##h(x) = g(x+1)##.

The inverse must be a function that given an ##h## returns the corresponding ##g##.
 
Last edited:
Okay I found the inverse for the first function:
Note that ## f = \lambda n \in \mathbb{N}. (-1)^n + n^2 ## can be written as ##
f = \lambda n \in \mathbb{N}.
\begin{cases}
n^2 - 1, & \text{for } n \in \mathbb{N_{odd}} \\
n^2 + 1, & \text{for } n \in \mathbb{N_{even}} \\
\end{cases}
##

And the Inverse is:
##
g = \lambda n \in Im(f).
\begin{cases}
\sqrt{n-1}, & \text{for } n \in \mathbb{N_{odd}} \\
\sqrt{n+1} , & \text{for } n \in \mathbb{N_{even}} \\
\end{cases}
##
You were right, I should've worked by looking at the image of f from the beginning instead of working with its range.
Right now I'm still trying to think about the second function's inverse.
 
Ok, I managed to find the second function's inverse, that is:
## f^{-1} = \lambda g \in \mathbb{R} \longrightarrow \mathbb{R}. \lambda x \in \mathbb{R} . g(x-1) ##
and so:
## f^{-1} \circ f = f\circ f^{-1} = \lambda g \in \mathbb{R} \longrightarrow \mathbb{R}. \lambda x \in \mathbb{R} . g(x) ##
 
  • Like
Likes stevendaryl
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top