Finding inverses of two functions in Lambda Notation

  • Thread starter CGandC
  • Start date
  • #1
CGandC
285
24
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.
 

Answers and Replies

  • #2
stevendaryl
Staff Emeritus
Science Advisor
Insights Author
8,942
2,933
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:
  • #3
CGandC
285
24
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.
 
  • #4
CGandC
285
24
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

Suggested for: Finding inverses of two functions in Lambda Notation

Replies
1
Views
373
Replies
11
Views
466
  • Last Post
Replies
16
Views
799
Replies
13
Views
492
Replies
4
Views
580
  • Last Post
Replies
13
Views
496
Replies
6
Views
423
Replies
1
Views
451
Top