12.07.2015 Views

Tutorial on Isabelle/HOL

Tutorial on Isabelle/HOL

Tutorial on Isabelle/HOL

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

!!!!2.6 Some Basic Types 23The symbols > and ≥ are merely syntax: x > y stands for y < x and similaryfor ≥ and ≤.C<strong>on</strong>stant 1::nat is defined to equal Suc 0. This definiti<strong>on</strong> (see Sect. 2.7.2) isunfolded automatically by some tactics (like auto, simp and arith) but not byothers (especially the single step tactics in Chapter 5). If you need the full set ofnumerals, see Sect. 8.4.1. Novices are advised to stick to 0 and Suc.Both auto and simp (a method introduced below, Sect. 3.1) prove simplearithmetic goals automatically:lemma "[[ ¬ m < n; m < n + (1::nat) ]] =⇒ m = n"For efficiency’s sake, this built-in prover ignores quantified formulae, manylogical c<strong>on</strong>nectives, and all arithmetic operati<strong>on</strong>s apart from additi<strong>on</strong>. Inc<strong>on</strong>sequence, auto and simp cannot prove this slightly more complex goal:lemma "m ≠ (n::nat) =⇒ m < n ∨ n < m"The method arith is more general. It attempts to prove the first subgoalprovided it is a linear arithmetic formula. Such formulas may involve theusual logical c<strong>on</strong>nectives (¬, ∧, ∨, −→, =, ∀ , ∃ ), the relati<strong>on</strong>s =, ≤ and

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!