Isabelle: how to print result of 1 + 2? -


this beginner question.

i going through tutorial "programming , proving in isabelle/hol".

i want print result of "1 + 2".

so wrote:

value "1 + 2" 

which gives:

"1 + (1 + 1)"  :: "'a" 

i see result, i.e., "3". how can in isabelle? if normalize "1+2" in theorem prover, result 3 displayed. want same in isabelle.

please mind, started using isabelle yesterday.

this kind of question. 1 beginner another, how fortunate.

i don't know details, when don't specify type constants 1 , 2, you're working numeral, laid down in num.thy.

try , in output panel:

declare[[show_consts=true]] declare[[show_types=true]] declare[[show_sorts=true]] value "1 + 2" value "1 + (2::nat)"  theorem "1 + 2 = z"   apply simp   oops 

you'll see 1+2 numeral, , doesn't simplified automatically, or rather, get's simplified being expanded "successor" form of addition.

the value "1 + (2::nat)" simplified "preferred human form".

after simp, 1 + 2 simplified "preferred form" though it's numeral.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -