I have a lemma
lemma (in th2) addMeaningF_2: "∀m. m ≤ n ⟹ (m = (len x + len y) ⟹ (evalBinNum_1 (addBinNum x y) = plus (evalBinNum_1 x) (evalBinNum_1 y)))"
evalBinNum and addBinNum are recursive functions.
Everytime I apply(induct n) Isabelle prompts that it is unable to figure out the induct rule. Why does this happen?
In your statement, m is only bound locally in the first premise, it is free in the second one.
Thus the bound m in the first premise is not forced to be of type nat, and therefore also n::'a::ord.
Since there is no general induction rule for orders, the induct method fails.
Maximilian Schaeffeler said:
In your statement,
mis only bound locally in the first premise, it is free in the second one.
Thus the boundmin the first premise is not forced to be of typenat, and therefore alson::'a::ord.
Since there is no general induction rule for orders, the induct method fails.
Thank you!
If I try to bind m over the whole expression (by simple enclosing everything after ∀m. within brackets) I get a parsing error. I was wondering if I'm missing something?
Either !!m. ... ⟹ ... or "∀m. (... --> ...)
The more natural version being no quantifiers and apply (induct n arbitrary: m)
Mathias Fleury said:
The more natural version being no quantifiers and
apply (induct n arbitrary: m)
It cannot quite recognize m in this case. Is it because it is bound?
yes, you have to remove the !!
Lekhani Ray has marked this topic as resolved.
Last updated: Nov 13 2025 at 08:29 UTC