Lambda Calc, Peano Axioms, & Recreating Maths

I'm restricting it to ℕ so it will work, though you do have dividing by 2 in the proc.

U is essentially the Successor Function.

I know. I guess I was wrong, it's just NUMBER that has U built in. So, yeah, that's basically Church numerals only with named functions (which matters once you want to do recursion).

I'll follow along with the lambda calc.


I'm stuck on plus.... here's my project

For a given number n, to add number q, call the successor of n q times.

6 posts were split to a new topic: Ancient computers

That can't quite be right. The successor of n will be n+1 no matter how many times you call it. It's a good thought, though, but remember that a number is a function of functions.

Think about this:

Jens-Church-starter script pic

Yeah but HOW?

I mean, try plugging things into there and see what results you get. Like, what's 3(0)? What's 3(3)? What's 3(successor)? Etc.

Right. Thanks for the tip. I actually posted a reply to a post right as you moved it to a new topic. I was talking about the "Exploring how computers work" YT series. Sorry 'bout that.

I found that:
Jens-Church-starter 64

Jens-Church-starter 27

Jens-Church-starter script pic

I'm not quite sure what I'm doing, but I came up with
Jens-Church-starter plusMaybe

Though, it acts more like messed-up exponents.

Given F(x) = x+1, n plus q will be F(n) wrapped in F() q times, right?

2 + 3 = F(F(F(2))) = F(F(3)) = F(4) = 5

untitled script pic - 2023-12-13T194552.212

I think I may have misworded my claim.

Yes. It won't be F(n) repeatedly; it'll be, as you say, F(F(F(...(N)))). We don't have CASCADE in this game, so you (that is to say, @bluebaritone21) have to find a way to do that given the available tools.

Indeed. You seem to have solved the exercise after next. :~) You want a bigger hint?

Yes, please. I can't seem to figure this out, no matter how much random junk I try. I've tried adding the successor around the second item, but that didn't work. I tried hard-coding it, but that's cheating. I have no idea what I'm doing.

Okay. What does this do?


Don't just TRY it -- you won't learn anything from that. Actually plug SUCCESSOR into the input to THREE and see what function it reports.

I got this:
Jens-Church-starter (f)
Does successor go wherever f is? Like:
bubble

Or expanded out:
huge
(I see what you mean about ugly programs.)

This. So, tell me in words, what does that function do when you call it with a number. Let's say f(7)?

It plugs 7 into successor, then plugs THAT into successor, and finally, plugs that into Successor, aka S(S(S(7))) = 10

OH!

this(question mark)

would this work?

(Just tested it. YES! IT DOES!)

Thank You!!!!


I've almost got times:

almost times
(EDIT: No I didn't)

Cool! So, remember what 3(f) means, and we want to do 3*5=15, so how do you make 15(f) out of 3(f)?

3+3+3+3+3 (3+3 5 times)? So:

3+(3+(3+(3+(3))))

Hmm....

Remember, 3 is a function, so it's more like 3(3(3(3(3(something))))).