# Re: [isabelle] Feature suggestions: More useful output

```On Fri, 23 Nov 2012, Joachim Breitner wrote:

```
```Last on my list for today is a more interactive variant of print_cases.
When I currently write
lemma "n + 1 = 1 + (n::nat)"
proof(induct n)
I have
proof (state): step 1

goal (2 subgoals):
1. 0 + 1 = 1 + 0
2. ⋀n. n + 1 = 1 + n ⟹ Suc n + 1 = 1 + Suc n
and with
print_cases
it prints
cases:
0:
let "?case" = "0 + 1 = 1 + 0"
Suc:
fix n_
let "?case" = "Suc n_ + 1 = 1 + Suc n_"
assume Suc.hyps: "n_ + 1 = 1 + n_" and Suc.prems:

What I am missing is a combination of both that is ready to be used as
the structure of an Isar proof, e.g. either completely explicit:

show "0 + 1 = 1 + 0"
sorry
next
fix n
assume "n + 1 = 1 + (n::nat)"
show "Suc n + 1 = 1 + Suc n"
sorry
qed

or, depending on personal preference and number and complexity of the
hypotheses, using the provided case names (and using "case goal1..." if
there are no case names):

case 0
show ?case
sorry
next
case (Suc n)
show ?case
sorry
qed

From there I guess it would be a small step to allow the user to insert
the output of this command (say print_isar_structure) into the proof
document with one click, similar to how sledgehammer works.
```
```
```
'print_cases' is indeed a dinosaur from the TTY age. Producing proof outlines for induction proofs is the standard application for smart templating, I have it on my list for a long time already. This summer I got quite close to see how it can be implemented relatively easily, at least the abstract case / show ?case form, because printing of terms in a parsable way is still needs further investigation. It is unlikely to happen for the coming release, though.
```
```
Also note that goal1, ..., goal42 are not Isar-conformant at all: they produce fragile proofs with lots of funny indices. It is often better make an unstructured script in the traditional manner here.
```

Makarius```

This archive was generated by a fusion of Pipermail (Mailman edition) and MHonArc.
{"ft_lang_label":"__label__en","ft_lang_prob":0.85571766,"math_prob":0.9186114,"size":1952,"snap":"2020-10-2020-16","text_gpt3_token_len":580,"char_repetition_ratio":0.10626283,"word_repetition_ratio":0.06366048,"special_character_ratio":0.28893444,"punctuation_ratio":0.13691932,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.971564,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-03-31T02:56:01Z\",\"WARC-Record-ID\":\"<urn:uuid:7dbf4ff4-550b-4d38-83b2-bfcf14c0d097>\",\"Content-Length\":\"6706\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:778d711d-462d-4149-a54b-93b0489dfa67>\",\"WARC-Concurrent-To\":\"<urn:uuid:f40de12c-45f3-40ee-aa78-0819155c45b1>\",\"WARC-IP-Address\":\"131.111.8.15\",\"WARC-Target-URI\":\"https://lists.cam.ac.uk/pipermail/cl-isabelle-users/2012-November/msg00154.html\",\"WARC-Payload-Digest\":\"sha1:4PIBFG62ZHB7YBTGEBPUP4X7XYL5Y7H6\",\"WARC-Block-Digest\":\"sha1:RXKFKG2VMSZDALDX5P3DCUK4BHMWMPJZ\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-16/CC-MAIN-2020-16_segments_1585370499280.44_warc_CC-MAIN-20200331003537-20200331033537-00365.warc.gz\"}"}