# Re: [tlaplus] Proof by induction invoking the SequencesInductionTail theorem

Well, just to correct myself after trying to do the proof of my own example, the following alternative
currification of sum is needed to match the theorem form:

`Sum[n \in Nat] ==  IF   n = 0   THEN [m \in Nat |-> m]  ELSE [m \in Nat |-> Sum[n-1][m] + 1 ]  `

On Sunday, June 14, 2020 at 7:33:57 PM UTC-3, JosEdu Solsona wrote:
Ok, i see. Instead of writing something like

`Sum[n, m \in Nat] ==  IF   n = 0   THEN m  ELSE Sum[n-1,m] + 1`

we write it as:

`Sum[n \in Nat] ==  [m \in Nat |-> IF n = 0                  THEN m                 ELSE Sum[n-1][m] + 1 ] `

which has type [Nat -> [Nat -> Nat]] and apply the same theorems to prove is well defined.

Thank you.

On Sunday, June 14, 2020 at 9:58:54 AM UTC-3, Stephan Merz wrote:
Hello,

I guess that these useful theorems need adapted versions to be used for recursive functions defined on multiple parameters (e.g. Sum[n, m \in Nat]
where recursion is done on one parameter having the other fixed) because key theorems/definitions like RecursiveFcnOfNat and
NatInductiveDefConclusion are written assuming single parameter functions. I'm right?.

I recommend "currying" such functions, i.e. using functions of type [Nat -> [Nat -> S]] instead of [Nat \X Nat -> S] for TLAPS. Functions with several arguments are not or very badly supported at the moment (and this limitation has existed for far too long).

Sorry,
Stephan

--
You received this message because you are subscribed to the Google Groups "tlaplus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tlaplus+unsubscribe@xxxxxxxxxxxxxxxx.