<?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>RelativeComplementOf2Classes</TemplateName>
	<defaultRdsId>R928DBFDA3FB441608C6CA2DC68E9011D</defaultRdsId>
	<Status>UPDATED MAR2023</Status>
	<TIPPredicate>co2RelativeComplementClasses</TIPPredicate><Description>The relative complement of two Classes with [P, Q] and [Q, R]  as members, is a Class with R as member.</Description>
<Example>Let C be a Pipe Class that allows the use of P and Q, so C = {P,Q}; Let N be a Piping Network that must be a member of C, but requires the use of Q and R, so N = {Q,R}. Then the relative complement of C in N is R: NC = {R}. In other words: R is required in the Piping Network N but is not (yet) part of the applicable Pipe Class C.</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 [hasClass2] that are not members of [hasClass1] are members of the relative complement [hasRelativeComplement] of [hasClass1] in [hasClass2]</Definition><ScopeNote/><AdminNote/><LiftedAndLoweredGraph>CL-SETOP-480-20220126.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:DifferenceOfSetOfClass</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>8</Ref><URI>dm:Class</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>9</Ref><URI>dm:EnumeratedSetOfClass</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>10</Ref><URI>dm:Classification</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>11</Ref><URI>dm:Classification</URI></LiftedTemplateElements><LiftedTemplateElements><Ref>12</Ref><URI>dm:IntersectionOfSetOfClass</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>hasRelativeComplement</RoleName><RoleObjectType>dm:Class</RoleObjectType><RoleExample>ID to be generated automatically</RoleExample></TemplateSignature></PropertiesOfLoweredTemplate>
	<LoweredTemplateOWLcode>
    		<![CDATA[
		]]>
 	 </LoweredTemplateOWLcode>
	<LoweredTemplateFOLcode><![CDATA[RelativeComplementOf2Classes(hasClass1, hasClass2, hasRelativeComplement) <->
Class(hasClass1) &
Class(hasClass2) &
Class(hasRelativeComplement) &
exists u1 exists u2 exists u3(
      EnumeratedSetOfClass(u1) &
      ClassificationTemplate(hasClass1, u1) &
      ClassificationTemplate(hasClass2, u1) &
      DifferenceOfSetOfClassTemplate(u1, u2) &
      Class(u2) &
      EnumeratedSetOfClass(u3) &
      ClassificationTemplate(hasClass1, u3) &
      ClassificationTemplate(u2, u3) &
      IntersectionOfSetOfClassTemplate(u3, hasRelativeComplement)) .]]>
</LoweredTemplateFOLcode>

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

# EXAMPLE - Let C be a Pipe Class that allows the use of P and Q, so C = {P,Q}; Let N be a Piping Network that must be a member of C, but requires the use of Q and R, so N = {Q,R}. Then the relative complement of C in N is R: NC = {R}. In other words: R is required in the Piping Network N but is not (yet) part of the applicable Pipe Class C.

ex:2e0d651c-bcad-41ee-b128-8b8ef04193cb
      rdf:type tpl:RelativeComplementOf2Classes ;
      tpl:hasClass1 ex:b7c376c6-6750-41ea-8bb0-61c320c7e3e6 ; # C = {P,Q}
      tpl:hasClass2 ex:9f6a9b6b-48c5-4163-8875-8a1716dbd270 ; # N = {Q,R}
      tpl:hasRelativeComplement ex:53881d08-d989-41b5-8193-48a389cb7e94 ; # R
      meta:valEffectiveDate "2021-12-10T14:21:00Z"^^xsd:dateTime .
]]>
</LoweredTemplateInstanceListing>
</TemplateSpecification>
