Maybe I would try as follows, using the seq operator instead of recs, and the definition as an iterated 1-ary function:
Let's say F : NN0 --> NN0 is a function we want to apply repeatedly.
Then B = ( f e. _V |-> seq 0 ( ( g e.
_V , i e. _V |-> ( f o. g ) ) , _I ) ) should be the
n-th iterate of f: ( ( B ` f ) ` 3 ) = ( f
o. ( f o. f ) ) )
We can then define the Ackermann function as follows:
Ack = seq 0 ( ( f e. _V , i e, _V |-> ( n e. NN0 |-> ( ( ( B ` f ) ` n ) ` 1 ) ) , ( n e. NN0 |-> ( n + 1 ) ) )
That is, we would have:
Then I would derive the other definition of the Ackermann function as a property.
BR,
_
Thierry
--
You received this message because you are subscribed to the Google Groups "Metamath" group.
To unsubscribe from this group and stop receiving emails from it, send an email to metamath+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/metamath/a74a9fd3-8572-4a1f-8a2f-36d7d6e20172n%40googlegroups.com.
On 4/28/24 06:29, 'Thierry Arnoux' via Metamath wrote:
Maybe I would try as follows, using the seq operator instead of recs, and the definition as an iterated 1-ary function:
I didn't try to check every step, but this looks about right.
As for the larger question of how to formalize recursive
definitions, generally via seq
somehow. It can be a bit hard to get your head around how seq is being used in a particular
proof, but using seq is almost
always easier than trying to use recs or
rec directly.