     @prefix doc: <http://www.w3.org/2000/10/swap/pim/doc#> .
     @prefix dc: <http://purl.org/dc/elements/1.1/> .
     @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .

@prefix contact: <http://www.w3.org/2000/10/swap/pim/contact#>.
@prefix rec: <http://www.w3.org/2001/02pd/rec54#>.
@prefix log: <http://www.w3.org/2000/10/swap/log#>.
@prefix v: <#>.

@forAll v:dated, v:generic, v:title,
	 v:date, v:date2, v:status,
	v:who, v:org, v:name,
	v:sub, v:previous.

{ v:dated doc:date v:date;
          doc:linkedFrom v:generic.
  v:generic dc:date v:date2; # dates are not constrained to match;
				# evidently /TR/ page dates are not
				# quite the same as title page dates. :-{
            dc:title v:title }

  log:implies
  { v:dated dc:title v:title;
            dc:date  v:date;
            doc:versionOf v:generic }.

#make up for extra level of symlinks; e.g. WCAG10
# this is a short-cut in stead of --think-ing
{ v:dated doc:date v:date;
          doc:linkedFrom [ doc:linkedFrom v:generic].
  v:generic dc:date v:date2; # dates are not constrained to match;
				# evidently /TR/ page dates are not
				# quite the same as title page dates. :-{
            dc:title v:title }

  log:implies
  { v:dated dc:title v:title;
            dc:date  v:date;
            doc:versionOf v:generic }.

#@@not found in filters?
#rec:NOTE a rec:Status.
#rec:WD a rec:Status.
#rec:PR a rec:Status.
#rec:CR a rec:Status.
#rec:REC a rec:Status.

{ v:dated doc:date v:date;
          doc:linkedFrom v:generic;
          a v:status.
#  v:status a rec:Status.
  v:generic dc:date v:date2.
 }
  log:implies {
  v:dated a v:status
 }.

{ v:dated doc:date v:date;
          doc:linkedFrom [doc:linkedFrom v:generic];
          a v:status.
#  v:status a rec:Status.
  v:generic dc:date v:date2.
 }
  log:implies {
  v:dated a v:status
 }.

{ v:dated doc:date v:date;
          doc:linkedFrom v:generic.
  v:generic dc:date v:date2;
            rec:editor v:who.
  v:who contact:fullName v:name.
 }
  log:implies {
  v:dated rec:editor v:who.
  v:who contact:fullName v:name.
  }.

{ v:dated doc:date v:date;
          doc:linkedFrom [doc:linkedFrom v:generic].
  v:generic dc:date v:date2;
            rec:editor v:who.
  v:who contact:fullName v:name.
 }
  log:implies {
  v:dated rec:editor v:who.
  v:who contact:fullName v:name.
  }.

{
  v:dated rec:editor v:who.
  v:who contact:affiliation v:org.
  v:org contact:name v:name
  } log:implies {
  v:who contact:affiliation v:org.
  v:org contact:name v:name
  }.

{
  v:dated doc:linkedFrom v:generic.
  v:generic rec:fromSubmission v:sub.
  v:sub dc:title v:name
  } log:implies {
  v:dated rec:fromSubmission v:sub.
  v:sub dc:title v:name.
  }.

{
  v:dated doc:linkedFrom v:generic;
          a rec:REC.
  v:generic rec:previousEdition v:previous.
  } log:implies {
  v:dated rec:previousEdition v:previous.
  }.

{ 
  v:dated a rec:REC, rec:FirstEdition;
          dc:date  v:date;
          dc:title v:name.
  } log:implies {
  v:dated a  rec:REC, rec:FirstEdition;
          dc:date  v:date;
          dc:title v:name.
  }.

{ 
  v:dated doc:linkedFrom v:generic;
          a rec:PR.
  v:generic rec:prReviewsDue v:date.
  } log:implies {
  v:dated rec:prReviewsDue v:date.
  }.

{ 
  v:dated doc:linkedFrom v:generic;
          a rec:CR.
  v:generic rec:implementationFeedbackDue v:date.
  } log:implies {
  v:dated rec:implementationFeedbackDue v:date.
  }.

{ 
  v:dated doc:linkedFrom v:generic;
          a rec:WD.
  v:generic rec:lastCallFeedBackDue v:date.
  } log:implies {
  v:dated rec:lastCallFeedBackDue v:date;
          a rec:WD, rec:LastCall.
  }.

{ 
  v:dated doc:linkedFrom v:generic;
          a rec:WD.
  v:generic a  rec:Retired.
  } log:implies {
  v:dated a rec:WD, rec:Retired.
  }.

{
  v:generic rec:formerShortname v:name.
  } log:implies {
  v:generic rec:formerShortname v:name.
  }.

{
  v:generic rec:superseds v:dated.
  } log:implies {
  v:generic rec:superseds v:dated.
  v:dated a rec:Superseded.
  }.

{
  v:generic rec:superseds v:dated.
  v:dated dc:date v:date;
          dc:title v:name;
          a v:status;
          rec:previousEdition v:previous.
  } log:implies {
  v:generic rec:superseds v:dated.
  v:dated dc:date v:date;
          dc:title v:name;
          a v:status, rec:Superseded;
          rec:previousEdition v:previous.
  }.

# when a doc is said to be a WD and a NOTE (bugs in detection), we assume it's a NOTE in fact (ok, this is not elegant)
{
  v:dated a rec:NOTE, a rec:WD.
} log:implies {
  v:dated a rec:NOTE.
}.