简体   繁体   中英

Induction rule case names (Isabelle)

Some induction rules have case names: the default one has case 0 and case (Suc n) for example. Given a rule, eg int_induct , how do I find out its case names (if, indeed, it has these) without looking in the theory containing this lemma?

I'm not aware of any high-level way to do this. The case names are stored in the tags of a theorem that can be obtained with ML:

ML‹Thm.get_tags @{thm nat.induct}›

This prints:

val it = [("name", "Nat.nat.induct"), ("kind", "theorem"), ("case_names", "zero;Suc")]: Properties.T

As you can see, the case names are available under the key case_names .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM