\A s1, s2 \in Seq(Nat) : SeqProduct[s1] * SeqProduct[s2] = SeqProduct[s1 \o s2]
SeqProduct[s \in Seq(Nat)] ==
IF s = <<>>
THEN 1
ELSE LET x == Head(s)
xs == Tail(s)
IN x * SeqProduct[xs]
LEMMA SomeLemma == \A s1, s2 \in Seq(Nat) : SeqProduct[s1] * SeqProduct[s2] = SeqProduct[s1 \o s2]
<1> DEFINE Prop(s) == \A s2 \in Seq(Nat) : SeqProduct[s] * SeqProduct[s2] = SeqProduct[s \o s2]
<1> SUFFICES \A s1 \in Seq(Nat) : Prop(s1) OBVIOUS
<1>1. Prop(<<>>) PROOF OMITTED
<1>2. \A s \in Seq(Nat) : (s # << >>) /\ Prop(Tail(s)) => Prop(s) PROOF OMITTED
<1> HIDE DEF Prop
<1>3. QED
BY <1>1, <1>2, SequencesInductionTail
ASSUME Prop(<<>>) ,
\A s \in Seq(Nat) : s # <<>> /\ Prop(Tail(s)) => Prop(s) ,
ASSUME NEW CONSTANT S,
NEW CONSTANT P(_),
P(<<>>) ,
\A s \in Seq(S) : s # <<>> /\ P(Tail(s)) => P(s)
PROVE \A s \in Seq(S) : P(s)
PROVE \A s1 \in Seq(Nat) : Prop(s1)
<1>3. QED
BY <1>1, <1>2, SequencesInductionTail, IsaM("blast")
--
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+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tlaplus/49d1f151-10fe-449d-9fd9-fa7abbf2a4e5%40googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tla...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tla...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to tla...@googlegroups.com.
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 andNatInductiveDefConclusion are written assuming single parameter functions. I'm right?.
Sum[n, m \in Nat] ==
IF n = 0
THEN m
ELSE Sum[n-1,m] + 1
Sum[n \in Nat] ==
[m \in Nat |-> IF n = 0
THEN m
ELSE Sum[n-1][m] + 1 ]
Sum[n \in Nat] ==
IF n = 0
THEN [m \in Nat |-> m]
ELSE [m \in Nat |-> Sum[n-1][m] + 1 ]