author | Walther Neuper <neuper@ist.tugraz.at> |
Thu, 12 Aug 2010 15:03:34 +0200 | |
branch | isac-from-Isabelle2009-2 |
changeset 37913 | 20e3616b2d9c |
parent 16417 | 9bc16273c2d4 |
permissions | -rw-r--r-- |
haftmann@16417 | 1 |
theory Isar imports Sets begin |
nipkow@11235 | 2 |
|
nipkow@11235 | 3 |
section{*A Taste of Structured Proofs in Isar*} |
nipkow@11235 | 4 |
|
nipkow@11235 | 5 |
lemma [intro?]: "mono f \<Longrightarrow> x \<in> f (lfp f) \<Longrightarrow> x \<in> lfp f" |
nipkow@11235 | 6 |
by(simp only: lfp_unfold [symmetric]) |
nipkow@11235 | 7 |
|
nipkow@11235 | 8 |
lemma "lfp(\<lambda>T. A \<union> M\<inverse> `` T) = {s. \<exists>t. (s,t) \<in> M\<^sup>* \<and> t \<in> A}" |
nipkow@11235 | 9 |
(is "lfp ?F = ?toA") |
nipkow@11235 | 10 |
proof |
nipkow@11235 | 11 |
show "lfp ?F \<subseteq> ?toA" |
wenzelm@12815 | 12 |
by (blast intro!: lfp_lowerbound intro: rtrancl_trans) |
nipkow@13249 | 13 |
next |
nipkow@11235 | 14 |
show "?toA \<subseteq> lfp ?F" |
nipkow@11235 | 15 |
proof |
nipkow@11235 | 16 |
fix s assume "s \<in> ?toA" |
nipkow@11238 | 17 |
then obtain t where stM: "(s,t) \<in> M\<^sup>*" and tA: "t \<in> A" |
nipkow@11238 | 18 |
by blast |
nipkow@11235 | 19 |
from stM show "s \<in> lfp ?F" |
nipkow@11235 | 20 |
proof (rule converse_rtrancl_induct) |
nipkow@11235 | 21 |
from tA have "t \<in> ?F (lfp ?F)" by blast |
nipkow@11235 | 22 |
with mono_ef show "t \<in> lfp ?F" .. |
nipkow@13249 | 23 |
next |
nipkow@11238 | 24 |
fix s s' assume "(s,s') \<in> M" and "(s',t) \<in> M\<^sup>*" |
nipkow@11238 | 25 |
and "s' \<in> lfp ?F" |
nipkow@11235 | 26 |
then have "s \<in> ?F (lfp ?F)" by blast |
nipkow@11235 | 27 |
with mono_ef show "s \<in> lfp ?F" .. |
nipkow@11235 | 28 |
qed |
nipkow@11235 | 29 |
qed |
nipkow@11235 | 30 |
qed |
nipkow@11235 | 31 |
|
nipkow@11235 | 32 |
end |
nipkow@11235 | 33 |