|
A new "gst-fixp" theory is created as a child of "gst-fun".
Probably
|
|
Definitions of the notion of a bounded monotonic function, and of the closure of a set under such a function.
|
|
The concepts fixed point, least closed, and a function yielding an intersection of closures are defined.
|
|
In this section lemmas are proven following Paulson's proof as closely as possible.
|
|
|
|
The Theory gst-fixp
The new theory is first created, together with a proof context which we will build up as we develop the theory.
|
xl-sml
open_theory "gst-fun";
force_new_theory "gst-fixp";
force_new_pc "gst-fixp";
merge_pcs ["xl_cs_∃_conv"] "gst-fixp";
set_merge_pcs ["basic_hol", "gst-ax", "gst-fun", "gst-fixp"];
|
|
|
|
Introduction
Larry Paulson does his fixed-point theory in Isabelle using "meta-level functions" rather than functional sets.
I am guessing that in GST the closest analogy is a HOL function over sets.
Certainly the transcription is entirely mechanical.
I am also following Paulson in proving the theorem relative to the lattice of subsets of some set, rather than an arbitrary
complete lattice.
It would also be possible to do this relative to a HOL property and its subproperties and this might be thought more general,
since it would then be applicable to arbitrary HOL types.
I think the pseudo-urelements in GST will mean that the results proven in set theory are easy to apply to other types, and
this avoids having to do the set theory used in the proofs for properties as well as for sets.
|
|
bnd_mono
The property of being a bounded monotonic function.
The first argument is the set whose powerset is the relevant lattice.
|
|
|
Closures
I have some reservations about the terminology used in Paulson's paper (though this may well be standard), so I am making
some adjustments which have very little impact on the proofs.
There are two problems.
The first is that he defines "lfp" to mean something which he later proves is the least fixed point.
I would prefer the definition of "lfp" to more directly state that the thing yielded us the least fixed point.
The second is that while he talks about fixed points, some of his formal material is really about closures.
So I'm going to talk about closures until I have proven the "fixed point" theorem, and then define "lfp" (actually as yielding
a fixed point which is the least closure, since this is slightly "stronger" than least fixed point).
Here you should first think of forming closures under certain operations.
This is hard to formalise in a general way because the signatures of the operations may vary.
So we suppose that we are doing an iterative process (like the iterative construction of the heirarchy of sets except that
that particular one never yields a closed).
At each step in this process new objects are formed from an existing set using the operations under which we are aiming for
closure, and these are added to the old objects to form a new set.
For the function doing this we usually use the name "h".
If we ever find a set closed under the operations then we find that the result of applying "h" to it is contained in the original
(no new objects result), and that is what the following definition of closed states:
|
xl-holconst closed : GS → (GS → GS) → BOOL
|
∀A h• closed A h ⇔ h(A) ⊆g A
|
|
|
|
Fixed Point
A fixed point of "h" is a set which h maps onto itself.
This is also a closed.
|
xl-holconst fixed_point : GS → (GS → GS) → BOOL
|
∀A h• fixed_point A h ⇔ A = h(A)
|
|
|
Least closed
We define here the property of being a least closed set under some function.
|
|
|
Intersection of closures
This is what Paulson defines as the least fixed point.
I'm going to call it "iclosed" for "intersection of closed sets", and then the proof shows that it is also the least fixed
point and justifies the subsequent definition of least fixed point.
|
xl-holconst iclosed : GS → (GS → GS) → GS
|
∀D h• iclosed D h = ⋂g (Sep (℘g D) λX• h(X) ⊆g X)
|
|
|
|
Motivation
I'm following Paulson's proof to get a feel for how much harder it is with ProofPower's less powerful proof automation (and
my limited competence driving it).
Also, I have no reason to be original, so far as I know.
|
|
bnd_monoI
This is an introduction rule for bnd_mono.
|
|
bnd_monoD1
|
xl-sml
set_goal([],⌜∀ D h •
bnd_mono D h ⇒ (h D) ⊆g D⌝);
a (rewrite_tac[get_spec ⌜bnd_mono⌝] THEN REPEAT strip_tac);
val bnd_monoD1 = save_pop_thm "bnd_monoD1";
|
|
|
bnd_monoD2
|
xl-sml
set_goal([],⌜∀ D h •
bnd_mono D h ∧ W ⊆g X ∧ X ⊆g D ⇒ (h W) ⊆g (h X)⌝);
a (rewrite_tac[get_spec ⌜bnd_mono⌝] THEN REPEAT strip_tac);
a (asm_fc_tac[]);
val bnd_monoD2 = save_pop_thm "bnd_monoD2";
|
|
|
bnd_mono_subset
|
|
bnd_mono_
|
|
|
lfp_lowerbound
|
|
lfp_subset
|
xl-sml
set_goal([],⌜∀ D h• iclosed D h ⊆g D⌝);
a (once_rewrite_tac[gst_relext_clauses]);
a (rewrite_tac[get_spec ⌜iclosed⌝, get_spec ⌜⋂g⌝]);
a (REPEAT strip_tac);
a (fc_tac [∈g⊆g_thm]);
a (asm_fc_tac[]);
val lfp_subset = pop_thm ();
|
|
|
def_lfp_subset
|
xl-sml
set_goal([],⌜∀ A D h• A = iclosed D h ⇒ A ⊆g D⌝);
a (REPEAT strip_tac THEN asm_rewrite_tac[lfp_subset]);
val def_lfp_subset = save_pop_thm "def_lfp_subset";
|
|
|
lfp_greatest
|
|
lfp_lemma1
|
|
lfp_lemma2
|
xl-sml
set_goal([],⌜∀ A D h• bnd_mono D h ⇒ h(iclosed D h) ⊆g iclosed D h⌝);
a (REPEAT strip_tac);
a (lemma_tac ⌜∀ X• h X ⊆g X ∧ X ⊆g D ⇒ h (iclosed D h) ⊆g X⌝);
(* *** Goal "1" *** *)
a (REPEAT strip_tac);
a (fc_tac [lfp_lemma1]);
a (REPEAT (asm_fc_tac[]));
(* *** Goal "2" *** *)
a (lemma_tac ⌜h D ⊆g D⌝ THEN1 (fc_tac[bnd_monoD1]));
a (fc_tac[lfp_greatest]);
a (asm_fc_tac[]);
val lfp_lemma2 = save_pop_thm "lfp_lemma2";
|
|
|
lfp_lemma3
|
|
|
lfp_Tarski
This is Paulson's version of Tarski's theorem, apart from my using the name "iclosed" instead of "lfp".
|
|
least_closed iclosed
Now we take a brief excursion from Paulson's path resulting from my eccentricities on the specificaton.
|
|
Fixed Point Theorem
|
|
Least Fixed Point Function
This asserts the existence of a function delivering least fixed points.
|
|
Least Fixed Point Clauses
We now need to carry forward some of the useful results about "iclosed" to "lfp".
|
|
|
Set is Closed
This lemma states that the induction hypothesis (couched in terms of h) imply that the set of elements having the property
is closed under h.
|
|
Induction
|
|
|
|
|
Proof Context
|
xl-sml
commit_pc "gst-fixp";
|
|
|