$\lbrace 2n+3m+1:n,m\in N\rbrace$ is the set of all positive integers except for $0$ and $2$. I need to know how to write its inductive definition.
This is part of the introduction on learning how to develop recursive functions using lambda calculus. I can do some of them but on others, such as this one, I get lost. How do you handle the multiple variables. Please explain how you got your answer as well since an answer doesn't do me much good if I don't know how to get it.
Here are two of the ones I know how to do.
$\lbrace 3n+2: n\in \mathbb N\rbrace$
Top Down: $n = 2; n - 3 \in S$
Bottom up: $2 \in S$; if $n \in S$, then $(n + 3) \in S$
Rule of Inference: $2 \in S$; if $n \in S$, then $(n+3) \in S$
$\lbrace(n,2n+1): n\in \mathbb N\rbrace$
Top Down: $(n,m)=(0,1);(n-1,m-2) \in S$
Bottom up: $(0,1) \in S$; if $(n,m) \in S$, then $(n+1,m+2) \in S$
A solution could be found by starting with $1$. Then, if $n\in S$, you require $n+f(n)\in S$ too, where $f(n)$ is 2 for $n=1$ and $1$ otherwise. One way to do this is to make use of the step function $\frac{x}{|x|}$, which is $-1$ for negative input and $+1$ for positive input. Inserting a horizontal shift so that the discontinuity is at $2$ rather than $0$, scaling down by 2 (since we want a span that's $1$ unit long, not $2$), inverting vertically since we want the larger jump to happen earlier, and shifting up by the proper amount ($\frac{3}{2}$)...
$$f(n) = \frac{3}{2}-\frac{n-2}{2|n-2|}$$
(Edited: I had it completely backwards the first time!)
So that means you can have: $1\in S$; if $n\in S$, then $n+\frac{3}{2}-\frac{n-2}{2|n-2|}\in S$.
EDIT: For moving down...
You just need a different step function: one with its discontinuity between $3$ and $4$. Also, it's negated from the one used for moving up.
$$g(n)= -\frac{3}{2}+\frac{n-3.5}{2|n-3.5|}$$
And then: $1\in S$; if $n\in S$, then $n-\frac{3}{2}+\frac{n-3.5}{2|n-3.5|}\in S$.