<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="xsl-for-template-specification.xsl"?>
<TemplateSpecification xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="xml-schema-for-template-specification.xsd">
	<TemplateName>DifferenceOf2Classes</TemplateName>
	<defaultRdsId>R6B221433F52A45928C5055FAB58532BD</defaultRdsId>
	<Status>UPDATED MAR2023</Status>
	<TIPPredicate>coDifferenceOf2Classes</TIPPredicate><Description>The difference of two Classes results in a Class whose members were also member of one of both Classes.</Description>
	<Example><![CDATA[Assume Class x1 to be (A,B,C} and Class x2 to be {B,C,D}, where A, B, C, and D are members of those Classes. Then the enumerated set of those two classes is {{A,B,C},{B,C,D}}. The union of Classes 1 and 2 is (A,B,C,D) and the intersection is (B,C), so the Class x3 is the difference between union and intersection and has the members (A,D).]]></Example>
	<Notes>At instantiation of this template it is mandatory to add meta:valEffectiveDate with the dateTime that the represented information became effective.</Notes>
	<SubClassOf>TemplateForSetOperations</SubClassOf><Definition>All members of [hasClass1] and [hasClass2] that are not members of both classes are members of [hasClassDifference]</Definition><ScopeNote/><AdminNote/><LiftedAndLoweredGraph>CL-SETOP-080-20220125.png</LiftedAndLoweredGraph>
	<LiftedTemplate>
	    	<LiftedTemplateElements>
	    		<Ref>1</Ref>
	    		<URI>dm:Class</URI>
	    	</LiftedTemplateElements>
	    	<LiftedTemplateElements>
	    		<Ref>2</Ref>
	    		<URI>dm:Class</URI>
	    	</LiftedTemplateElements>
	    	<LiftedTemplateElements>
	    		<Ref>3</Ref>
	    		<URI>dm:Class</URI>
	    	</LiftedTemplateElements>
	<LiftedTemplateElements>
	    		<Ref>4</Ref>
	    		<URI>dm:EnumeratedSetOfClass</URI>
	    	</LiftedTemplateElements><LiftedTemplateElements>
	    		<Ref>5</Ref>
	    		<URI>dm:Classification</URI>
	    	</LiftedTemplateElements><LiftedTemplateElements>
	    		<Ref>6</Ref>
	    		<URI>dm:Classification</URI>
	    	</LiftedTemplateElements><LiftedTemplateElements>
	    		<Ref>7</Ref>
	    		<URI>dm:DiiferenceOfSetOfClass</URI>
	    	</LiftedTemplateElements></LiftedTemplate>
	<PropertiesOfLoweredTemplate>
    		
    		
    		
  	<TemplateSignature><RoleNo>1</RoleNo><RoleName>hasClass1</RoleName><RoleObjectType>dm:Class</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>2</RoleNo><RoleName>hasClass2</RoleName><RoleObjectType>dm:Class</RoleObjectType><RoleExample/></TemplateSignature><TemplateSignature><RoleNo>3</RoleNo><RoleName>hasClassDifference</RoleName><RoleObjectType>dm:Class</RoleObjectType><RoleExample>ID to be generated automatically</RoleExample></TemplateSignature></PropertiesOfLoweredTemplate>
	<LoweredTemplateOWLcode/>
	<LoweredTemplateFOLcode><![CDATA[DifferenceOf2Classes(hasClass1, hasClass2, hasClassDifference) <-> 
Class(hasClass1) &
Class(hasClass2) &
Class(hasClassDifference) &
exists u1(
      EnumeratedSetOfClass(u1) &
      ClassificationTemplate(hasClass1, u1) &
      ClassificationTemplate(hasClass2, u1) &
      DifferenceOfSetOfClassTemplate(u1, hasClassDifference)) .]]>
</LoweredTemplateFOLcode>

<LoweredTemplateInstanceListing>
<![CDATA[GENERIC DEFINITION
      
tpl:DifferenceOf2Classes
      rdfs:subClassOf dm:Template ;
      rdfs:isDefinedBy  tpl:CL-SETOP-080.xml ;
      tpl:hasClass1 dm:Class ;
      tpl:hasClass2 dm:Class ;
      tpl:hasClassDifference dm:Class ;
      meta:valEffectiveDate xsd:dateTime .

# EXAMPLE - The difference between a Class with members {A, B, C} and a Class with members {B, C, D} is a Class with members {A, D} .

ex:9c6c120a-7838-4126-946a-64011ae6513d
      rdf:type tpl:DifferenceOf2Classes ;
      tpl:hasClass1 ex:a832747b-f548-4c0f-b7ed-5c87a38dade2 ; # {A, B, C}
      tpl:hasClass2 ex:e46eb77e-4a7b-4203-a45f-e5f86804b95a ; # {B, C, D}
      tpl:hasClassDifference ex:2221961d-ddbc-4153-8bf2-d021dc1e244d ; # {A, D}
      meta:valEffectiveDate "2021-12-04T15:06:00Z"^^xsd:dateTime .
]]>
</LoweredTemplateInstanceListing>
</TemplateSpecification>
