{"title":"集合构造函数、有限集合和逻辑语义","authors":"Bharat Jayaraman, Devashis Jana","doi":"10.1016/S0743-1066(98)10012-2","DOIUrl":null,"url":null,"abstract":"<div><p>The use of sets in declarative programming has been advocated by several authors in the literature. A representation often chosen for finite sets is that of <em>scons</em>, parallel to the list constructor <em>cons</em>. The logical theory for such constructors is usually tacitly assumed to be some formal system of classical set theory. However, classical set theory is formulated for a general setting, dealing with both finite and infinite sets, and not making any assumptions about particular set constructors. In giving logical-consequence semantics for programs with finite sets, it is important to know exactly what connection exists between sets and set constructors. The main contribution of this paper lies in establishing these connections rigorously. We give a formal system, called <em>SetAx</em>, designed around the <em>scons</em> constructor. We distinguish between two kinds of set constructors, <em>scons(x, y)</em> and <em>dscons(x, y)</em>, where both represent {<em>x</em>} ∪ <em>y</em>, but <em>x</em> <em>ϵ</em> <em>y</em> is possible in the former, while <em>x</em> ∉ <em>y</em> holds in the latter. Both constructors find natural uses in specifying sets in logic programs. The design of <em>SetAx</em> is guided by our choice of <em>scons</em> as a primitive symbol of our theory rather than as a defined one, and by the need to deduce non-membership relations between terms, to enable the use of <em>dscons</em>. After giving the axioms <em>SetAx</em>, we justify it as a suitable theory for finite sets in logic programming by (i) showing that the set constructors indeed behave like finite sets; (ii) providing a framework for establishing the correctness of set unification; and (iii) defining a Herbrand structure and providing a basis for discussing logical consequence semantics for logic programs with finite sets. Together, these results provide a rigorous foundation for the set constructors in the context of logical semantics.</p></div>","PeriodicalId":101236,"journal":{"name":"The Journal of Logic Programming","volume":"38 1","pages":"Pages 55-77"},"PeriodicalIF":0.0000,"publicationDate":"1999-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://sci-hub-pdf.com/10.1016/S0743-1066(98)10012-2","citationCount":"19","resultStr":"{\"title\":\"Set constructors, finite sets, and logical semantics\",\"authors\":\"Bharat Jayaraman, Devashis Jana\",\"doi\":\"10.1016/S0743-1066(98)10012-2\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"<div><p>The use of sets in declarative programming has been advocated by several authors in the literature. A representation often chosen for finite sets is that of <em>scons</em>, parallel to the list constructor <em>cons</em>. The logical theory for such constructors is usually tacitly assumed to be some formal system of classical set theory. However, classical set theory is formulated for a general setting, dealing with both finite and infinite sets, and not making any assumptions about particular set constructors. In giving logical-consequence semantics for programs with finite sets, it is important to know exactly what connection exists between sets and set constructors. The main contribution of this paper lies in establishing these connections rigorously. We give a formal system, called <em>SetAx</em>, designed around the <em>scons</em> constructor. We distinguish between two kinds of set constructors, <em>scons(x, y)</em> and <em>dscons(x, y)</em>, where both represent {<em>x</em>} ∪ <em>y</em>, but <em>x</em> <em>ϵ</em> <em>y</em> is possible in the former, while <em>x</em> ∉ <em>y</em> holds in the latter. Both constructors find natural uses in specifying sets in logic programs. The design of <em>SetAx</em> is guided by our choice of <em>scons</em> as a primitive symbol of our theory rather than as a defined one, and by the need to deduce non-membership relations between terms, to enable the use of <em>dscons</em>. After giving the axioms <em>SetAx</em>, we justify it as a suitable theory for finite sets in logic programming by (i) showing that the set constructors indeed behave like finite sets; (ii) providing a framework for establishing the correctness of set unification; and (iii) defining a Herbrand structure and providing a basis for discussing logical consequence semantics for logic programs with finite sets. Together, these results provide a rigorous foundation for the set constructors in the context of logical semantics.</p></div>\",\"PeriodicalId\":101236,\"journal\":{\"name\":\"The Journal of Logic Programming\",\"volume\":\"38 1\",\"pages\":\"Pages 55-77\"},\"PeriodicalIF\":0.0000,\"publicationDate\":\"1999-01-01\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"https://sci-hub-pdf.com/10.1016/S0743-1066(98)10012-2\",\"citationCount\":\"19\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"The Journal of Logic Programming\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://www.sciencedirect.com/science/article/pii/S0743106698100122\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"The Journal of Logic Programming","FirstCategoryId":"1085","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0743106698100122","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Set constructors, finite sets, and logical semantics
The use of sets in declarative programming has been advocated by several authors in the literature. A representation often chosen for finite sets is that of scons, parallel to the list constructor cons. The logical theory for such constructors is usually tacitly assumed to be some formal system of classical set theory. However, classical set theory is formulated for a general setting, dealing with both finite and infinite sets, and not making any assumptions about particular set constructors. In giving logical-consequence semantics for programs with finite sets, it is important to know exactly what connection exists between sets and set constructors. The main contribution of this paper lies in establishing these connections rigorously. We give a formal system, called SetAx, designed around the scons constructor. We distinguish between two kinds of set constructors, scons(x, y) and dscons(x, y), where both represent {x} ∪ y, but xϵy is possible in the former, while x ∉ y holds in the latter. Both constructors find natural uses in specifying sets in logic programs. The design of SetAx is guided by our choice of scons as a primitive symbol of our theory rather than as a defined one, and by the need to deduce non-membership relations between terms, to enable the use of dscons. After giving the axioms SetAx, we justify it as a suitable theory for finite sets in logic programming by (i) showing that the set constructors indeed behave like finite sets; (ii) providing a framework for establishing the correctness of set unification; and (iii) defining a Herbrand structure and providing a basis for discussing logical consequence semantics for logic programs with finite sets. Together, these results provide a rigorous foundation for the set constructors in the context of logical semantics.