Finding inverses of two functions in Lambda Notation

Click For Summary

Homework Help Overview

The discussion revolves around finding the inverses of two functions expressed in lambda notation, specifically focusing on their injectivity and the challenges faced in deriving their inverses.

Discussion Character

  • Exploratory, Assumption checking, Problem interpretation

Approaches and Questions Raised

  • Participants explore the injectivity of the functions and attempt to derive their inverses. The original poster presents initial approaches and reasoning, questioning the validity of their findings. Others suggest considering the image of the functions rather than their range.

Discussion Status

Some participants have successfully identified the inverse for the first function and are now reflecting on the reasoning behind their approach. The second function's inverse has also been found, with participants discussing the implications of the derived expressions.

Contextual Notes

Participants note that the functions are defined over specific sets (natural numbers and real numbers) and discuss the implications of injectivity and the nature of inverses in relation to these sets.

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:
  • Like
Likes   Reactions: CGandC
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   Reactions: stevendaryl

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
3
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
Replies
2
Views
1K
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K