[CakeML] Set theory axioms

Peter Vincent Homeier palantir at trustworthytools.com
Sat Jul 9 01:20:52 UTC 2016


Hello Ramana!

Yes, in fact I modified the existing two files, setSpecScript.sml and
setModelScript.sml, to produce the versions I put in the "flame"
subdirectory. But actually, they could go right in place, as drop-in
replacements, for the original two.

I didn't do that because I didn't want to disturb any other files that
could have perhaps depended on the original versions. I try very hard to
not make trouble for other people. So I put these out publicly, hoping that
we could vet them safely, and as a community come to an agreement whether
or not we would like to see this extended version as the main version.

The two files should be backwards compatible in most things, simply
extended. For example, in setModelScript.sml there is a model presented
that satisfies most of the axioms except for the Axiom of Infinity. This
proof has been extended to now include the Axiom of Regularity and the
Axiom of Replacement, and to show they are satisfied by the model as well.

The major difference in the new version would be the use of the inductive
definition for the Axiom of Infinity instead of the prior version that was
based on the notion of infinity defined in standard HOL. But I suspect that
there may not be much in the rest of cakeml that depends meaningfully on
the Axiom of Infinity. Even if there is, setSpecScript.sml does prove a
theorem that the new axiom implies the prior version, so it shouldn't be
hard to patch broken proofs.

Someone should try an experiment of substituting the new versions in place
and trying to rebuild, just to see what breaks. But I was holding off on
this until people had some time to take a look at the formalization, and
make their own judgements and talk about what they prefer. The axioms of
set theory are not large, but they are very consequential, so it is
important to get them right.

So far, you and Konrad are the only ones who have responded. I'd love to
hear more people's opinions, especially Michael's and Rob Arthan's.

Cheers,
Peter


On Fri, Jul 8, 2016 at 7:22 PM, Ramana Kumar <Ramana.Kumar at cl.cam.ac.uk>
wrote:

> Hi Peter,
>
> This indeed looks very nice.
>
> One suggestion I would make: would it be possible to extend the existing
> theory, rather than making an extended copy?
> It seems to me that your additional definitions and proofs could go into
> the existing setSpecScript.sml without any problem.
> The only place of conflict is where you want to define is_set_theory with
> the additional axioms. Perhaps you could simply define a new constant
> is_full_set_theory or similar for that purpose?
>
> I am hoping to avoid diverging forks in the future, in case we make any
> updates to setSpecScript.sml (unlikely, but there may be a few little
> cleanups).
>
> Cheers,
> Ramana
>
> On 30 June 2016 at 12:48, Konrad Slind <konrad.slind at gmail.com> wrote:
>
>> Looks nice! Note that Michael has done an extensive development of the
>> ordinals in
>>
>>   <holdir>/examples/set-theory/hol_sets
>>
>> and transfinite induction is in there somewhere.
>>
>> Konrad.
>>
>>
>> On Wed, Jun 29, 2016 at 5:09 PM, Peter Vincent Homeier <
>> palantir at trustworthytools.com> wrote:
>>
>>> I've just made my first contribution to CakeML. This consists of two
>>> files within the subdirectory "flame/set-theory", which are modified
>>> versions of the corresponding files under "candle/set-theory".
>>>
>>> My primary reference for this work was "Set Theory, The Third Millennium
>>> Edition" by Thomas Jech, Springer, 2006.
>>>
>>> These files extend the existing specification of set theory to full ZFC.
>>> This includes two axioms that were previously omitted, the Axiom of
>>> Regularity and the Axiom Schema of Replacement:
>>>
>>> val regular_def = Define`
>>>   regular ^mem ⇔ ∀x. (∃y. mem y x) ⇒ ∃y. mem y x ∧ ∀z. ~(mem z x ∧ mem z
>>> y)`
>>>
>>> val is_functional_def = Define`
>>>   is_functional (R:'a -> 'b -> bool) ⇔ ∀x y z. R x y ∧ R x z ⇒ y = z`
>>>
>>> val replacement_def = Define`
>>>   replacement ^mem ⇔
>>>       ∀R. is_functional R ⇒
>>>           ∀d. ∃r. ∀y. mem y r ⇔ ∃x. mem x d ∧ R x y`
>>>
>>> val is_set_theory_def = Define`
>>>   is_set_theory ^mem ⇔
>>>     extensional mem ∧
>>>     (∃sub. is_separation mem sub) ∧
>>>     (∃power. is_power mem power) ∧
>>>     (∃union. is_union mem union) ∧
>>>     (∃upair. is_upair mem upair) ∧
>>>     regular mem ∧
>>>     replacement mem`
>>>
>>> In addition, I have modified the Axiom of Infinity,
>>>
>>> val is_infinite_def = Define`
>>>   is_infinite ^mem s = INFINITE {a | a <: s}`
>>>
>>> not really deleting it, but replacing it by the inductive property,
>>> taken from page 12 of "Set Theory, The Third Millennium Edition" by Thomas
>>> Jech, Springer, 2006, using the successor operator as defined (Definition
>>> 1.20) on page 19 of "Introduction to Set Theory" by J. Donald Monk, McGraw
>>> Hill, 1969.
>>>
>>> val suc_def = Define`
>>>   suc ^mem x = x ∪ Unit x`
>>>
>>> val _ = Parse.overload_on("Suc",``suc ^mem``)
>>>
>>> val is_inductive_def = Define`
>>>   is_inductive ^mem s ⇔
>>>       ∅ <: s ∧ ∀x. x <: s ⇒ Suc x <: s`
>>>
>>> val is_model_def = Define`
>>>   is_model ^s ⇔
>>>     is_set_theory mem ∧
>>>     is_inductive mem indset ∧
>>>     is_choice mem ch`
>>>
>>> There is included a proof that the inductive axiom implies the prior
>>> infinity axiom; this proof depends on the Axiom of Regularity.
>>>
>>>     inductive_set_infinite
>>>       |- is_set_theory mem ∧ is_inductive mem indset ⇒
>>>          is_infinite mem indset
>>>
>>> I also added several new set theory constants, such as binary
>>> intersection, inverse of a function, image of a function on a set,
>>> dependent function space, and dependent product space. The last three
>>> required the Axiom Schema of Replacement to define.
>>>
>>> I am hoping to stimulate some discussion and debate. It is necessary to
>>> extend the existing partial specification of set theory to support the
>>> construction of the set-theory model of HOL-Omega. Besides that, there will
>>> probably be other uses for ZFC set theory, and I felt we needed a more
>>> complete axiomatic basis.
>>>
>>> The next steps would presumably be the definition of the ordinals, with
>>> transfinite induction, and the cardinals.
>>>
>>> Enjoy, and please let me know what you think.
>>>
>>> Peter
>>>
>>>
>>> "In Your majesty ride prosperously
>>> because of truth, humility, and righteousness;
>>> and Your right hand shall teach You awesome things." (Psalm 45:4)
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at cakeml.org
>>> https://lists.cakeml.org/listinfo/users
>>>
>>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at cakeml.org
>> https://lists.cakeml.org/listinfo/users
>>
>>
>


-- 


"In Your majesty ride prosperously
because of truth, humility, and righteousness;
and Your right hand shall teach You awesome things." (Psalm 45:4)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cakeml.org/pipermail/users/attachments/20160708/2ee3e0ff/attachment-0001.html>


More information about the Users mailing list