View Source

{toc}
{color:red}*Do not edit this page in Rich Text mode, edit only in Wiki mode*{color}

h1. Introduction
TODO:
- copy more from my email to Martin
- consider checking types as early as possible to eliminate useless inferences
- Define FRs and sub-FRs usign [SPARQL Property Paths|http://www.w3.org/TR/sparql11-property-paths/#path-language]

h2. OWLIM Rules and Reasoning Dialect
RS3.1 FRs were implemented using reasoning dialect "OWL RL (optimized)", i.e. builtin_owl2-rl.pie.
We used constructs owl:PropertyChainAxiom, owl:TransitiveProperty, owl:ReflexiveProperty, and rdfs:subPropertyOf (which amounts to disjunction).
But as described in [OWLIM Rules vs OWL RL#Less Expressive], OWL RL is less expressive than OWLIM Rules, since one cannot define a property by conjunction.
We are pretty sure the full FR set will require conjunction, so we'll go with OWLIM Rules. See [OWLIM Rules documentation|http://owlim.ontotext.com/display/OWLIMv43/OWLIM-SE+Reasoner#OWLIM-SEReasoner-RuleFormatandSemantics].

We'll use the RDFS reasoning dialect as a basis, by weaving our rules into builtin_RdfsRules.pie. That file is part of the OWLIM distribution, in my case
c:\my\Onto\proj\OWLIM\software\owlim-se-4.2.3924\builtin_RdfsRules.pie

h2. Weaving for Production
This page is used to generate OWLIM artefacts for production. We "weave" them from \{code} blocks in the page, following [Literate Programming|http://en.wikipedia.org/wiki/Literate_Programming]. We weave several files based on code block titles:
||Title ||Weaved into||
|Turtle | (x) (not yet implemented) FR.ttl, The old file RF.ttl will be deleted from svn|
|Prefices| builtin_RdfsRules.pie, at the beginning of section Prefices (after the opening brace)|
|Axioms | builtin_RdfsRules.pie, at the beginning of section Axioms (after the opening brace)|
|Rule | builtin_RdfsRules.pie, at end of file (before the closing brace)|
|Rules | same place, but these are shorthand rules (see below)|
- the weaver automatically generates rule identifiers in the form "Id: fr$n" where $n is a counter
- "Rule" includes one rule per code block in the OWLIM notation, eg:
{code}
premise1 [Constraint ...]
premise2 [Cut]
-------------------
corollary1
corollary2
{code}
- "Rules" includes one rule per line in a shorthand notation, eg:
{code}
premise1 [Constraint ...]; premise2 [Cut] => corollary1; corollary2
{code}
The shortcut notation is translated to the OWLIM notation. This shortcut form is very useful for shorter rules

h2. Modularity and Naming
A very important aspect of our implementation is modularity: we define appropriate sub-FRs and use them when defining FRs.
We use the Erlangen CRM (ECRM) naming variant (underscores instead of dots), and the following naming conventions:
- crm: Enn_entity_name, crm: Pnn_property_name: CRM entities and properties
- rso:FRnn_name: property representing an FR
-- rso stands for "RS ontology"
-- nn is a number that we try to keep the same as a related CRM property number (eg FR7_thing_from_place is numbered after P7_took_place_at)
- rso:FRXnn_name: property representing a sub-FR
-- if the sub-FR is a disjunction of several CRM properties, we mention all numbers
FRX_62_67 := P62_depicts or P67_refers_to
- rso:FRTnn_name: transitive closure of crm: Pnn_name
-- we denote this as FRTnn_name := Pnn_name+
- rso:FRSTnn_name: symmetric-transitive closure of crm: Pnn_name
-- we denote this as FRSTnn_name := (Pnn_name or Pnni_inverse_name)+
- rso:FCnn_name: Fundamental Concept or another class used in defining FRs

h2. Prefixes
This adds prefixes to FR.ttl:
{code:title=Turtle}
@prefix crm : <http://erlangen-crm.org/current/> .
@prefix owl : <http://www.w3.org/2002/07/owl#> .
@prefix rdf : <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs : <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rso : <http://www.researchspace.org/ontology/> .
{code}

This adds prefixes to the rules file (it already has: rdf rdfs owl xsd):
{code:title=Prefices}
crm : http://erlangen-crm.org/current/
rso : http://www.researchspace.org/ontology/
{code}

h2. Transitive Properties
ECRM declares appropriate CRM properties as owl:TransitiveProperty.
For some reason it doesn't declare P9,P46 transitive, though it does it for other "part of" properties, eg P106,P148. I posted a bug to CRM SIG and fix it here:
{code:title=Axioms}
<crm:P9_consists_of> <rdf:type> <owl:TransitiveProperty>
<crm:P9i_forms_part_of> <rdf:type> <owl:TransitiveProperty>
<crm:P46_is_composed_of> <rdf:type> <owl:TransitiveProperty>
<crm:P46i_forms_part_of> <rdf:type> <owl:TransitiveProperty>
{code}

The full list of transitive properties is:
- P9_consists_of, P9i_forms_part_of (ADDED)
- P10_falls_within, P10i_contains
- P46_is_composed_of, P46i_forms_part_of (ADDED)
- P86_falls_within, P86i_contains
- P88_consists_of, P88i_forms_part_of
- P89_falls_within, P89i_contains
- P106_is_composed_of, P106i_forms_part_of
- P114_is_equal_in_time_to
- P115_finishes, P115i_is_finished_by
- P116_starts, P116i_is_started_by
- P117_occurs_during, P117i_includes
- P120_occurs_before, P120i_occurs_after
- P127_has_broader_term, P127i_has_narrower_term
- P148_has_component, P148i_is_component_of

h2. Inverse Properties
Most CRM properties have an inverse, eg P110i_was_augmented_by is inverse of P110_augmented (Symmetric properties are their own inverse). ECRM declares all inverse properties as owl:inverseOf.

We use the RDFS reasoning dialect as a basis, which implements rdfs:subClassOf and rdfs:subPropertyOf reasoning.
But it's very useful in FR definitions to rely on general Transitive and Inverse reasoning, which frees you from dependencies on how exactly data is asserted.
So we copy the relevant rules from builtin_owl2-rl.pie:
{code:title=Rules}
p <rdf:type> <owl:TransitiveProperty>; x p y; y p z => x p z
p1 <owl:inverseOf> p2; x p1 y => y p2 x
p1 <owl:inverseOf> p2; x p2 y => y p1 x
{code}

h2. Symmetric Properties
ECRM declares all CRM symmetric properties as owl:SymmetricProperty. ECRM always declares them as owl:inverseOf itself, so we don't need to treat them separately. Eg:
{code}
crm:P122_borders_with rdf:type owl:SymmetricProperty.
crm:P122_borders_with owl:inverseOf crm:P122_borders_with.
{code}

The full list of symmetric properties is:
- P69_is_associated_with
- P114_is_equal_in_time_to
- P121_overlaps_with
- P122_borders_with
- P132_overlaps_with
- P133_is_separated_from

h2. No Reflexive Closure
FR definitions are full of reflexive-transitive sub-FRs. In FRThing.docx they are denoted (Pnnn)(0,n), and below we denote them as Pnn*. Eg
- x from z := x P74 y AND y P89* z

But I think it's bad style to use reflexive closure in the implementation since it generates lots of trivial facts (self-loops) in the semantic repository. Instead of reflexive closure, we use disjunction: the iterated property is applied 0 times in the first disjunct, and n times in the second, eg:
- x from z := x P74 z OR (x P74 y AND y P89+ z)

h2. FR Notes
FR design in the following sections is based on FRThing.docx by M.Doerr and K.Tzompanaki, after clarifications and corrections by V.Alexiev.
- We don't implement FRs:
-- for which there is no data in neither Rembrandt nor BM collections
-- that are interesting for history/archaeology but not museum collections (eg Destroyed at)
-- that use the CRM Digital (CRMdig) extensions
- We omit composite FR such as "Was created/produced by person from" since they are treated separately
- In many cases we don't check types, since these are implied by the domain/range of a property. Eg in:
-- E24.Physical_Man-Made_Thing -- P128F.carries -> E73.Information_Object
the property P128 implies that the source and target have the indicated types

h1. Fundamental Concepts

h2. Thing

h3. FC70_Thing in General
"Thing" is defined as the following (was called C1.Object):
- FC70_Thing := E70_Thing NOT E21_Person NOT E55_Type NOT E30_Right NOT E41_Appellation

The concept of "NOT subclass" is not expressible with OWLIM rules:
- OWLIM rules can check != class, but not subclasses
- <owl:complementOf> and <owl:disjointWith> are used only for consistency checking (to infer a contradiction), not to define classes
TODO: says who? Prove this

I tried enumerating negative classes:
{code:title=Rule-WRONG}
x <rdf:type> t [Constraint t!=<crm:E21_Person>, t!=<crm:E55_Type>, t!=<crm:E30_Right>, t!=<crm:E41_Appellation>]
t <rdfs:subClassOf> <crm:E70_Thing>
--------------------
x <rdf:type> <rso:FC70_Thing>
{code}
But that doesn't work (even if I enumerate all negative subclasses), since an E21_Person (negative) is also an E19_Physical_Object (positive), and we want E19.
Enumerating positive classes doesn't work either, for the same reason.

So FC70 would need to be implemented in SPARQL, eg
{code:sql|title=SPARQL}
?x rdf:type crm:E70_Thing.
NOT (?x rdf:type crm:E21_Person, etc)
{code}

h3. FC70_Thing for RS

In RS we search only for Man-Made Objects so the rule is simpler.
- RKD data includes sub-objects (eg related/n is a related work, part/n is a frame that is part of a painting) that we can't display, so we introduced an extension sub-class rso:E22_Museum_Object
- BM data uses crm:E22_Man-Made_Object, and we use an additional criterion "the current keeper or owner is the BM". (Objects which have been loaned to the BM have a different owner)

{code:title=Rules}
x <rdf:type> <rso:E22_Museum_Object> => x <rdf:type> <rso:FC70_Thing>
x <rdf:type> <crm:E22_Man-Made_Object>; x <crm:P50_has_current_keeper> <http://collection.britishmuseum.org/id/the-british-museum> => x <rdf:type> <rso:FC70_Thing>
x <rdf:type> <crm:E22_Man-Made_Object>; x <crm:P52_has_current_owner> <http://collection.britishmuseum.org/id/the-british-museum> => x <rdf:type> <rso:FC70_Thing>
{code}

h1. Fundamental Relations

h2. Thing-Place

h3. Thing refers to or is about Place: FR67_refers_to_or_is_about
Thing depicts or refers to a place or feature located in place, or is similar in features or composed of or carries an information object that depicts or refers to a place
{section}{column}
As defined in FRThing.docx:
!FR67_refers_to_or_is_about.png!
{column}{column}
Corrected definition:
!FR67_refers_to_or_is_about-fixed.png!
{column}{section}

Fixes:
# At beginning: does not allow paths of mixed properties (eg P130-P130i, P106-P148),
or with P46,P106,P148 preceding P130,P130i
#- Resolved: we mix all these properties freely: any path of the indicated properties, in any order, of any length
# At E73: does not allow P106_is_composed_of, P148_has_component which are legitimate for E73 (being a subclass of both E89_Propositional_Object and E90_Symbolic_Object)
#- Resolved: we add P128 into the mix.
Did we mix it up too much? I think it's ok: not all allowed paths are correct, but all correct and relevant paths are allowed
# At E26: does not allow P130,P130i,P46
#- Resolved by adding the mix at E26 too
# At end: is it really appropriate to use part-transitivity for this FR? If a thing is about Knossos, is it also about every little village, house and room in Knossos?
It was established this FR is not [co-variant|http://en.wikipedia.org/wiki/Covariance_and_contravariance_(computer_science)] (not appropriate to loop using P89*)
#- (?) PENDING: but is it contra-variant (appropriate to loop using P89i*)?

Implementation
- FRT_46_106_148 := (P46|P106|P148)+
{code:title=Rules}
x <crm:P46_is_composed_of> y => x <rso:FRT_46_106_148> y
x <crm:P106_is_composed_of> y => x <rso:FRT_46_106_148> y
x <crm:P148_has_component> y => x <rso:FRT_46_106_148> y
{code}
{code:title=Axioms}
<rso:FRT_46_106_148> <rdf:type> <owl:TransitiveProperty>
{code}

- FRT_46_106_148_128 := (FRT_46_106_148|P128)+
{code:title=Rules}
x <rso:FRT_46_106_148> y => x <rso:FRT_46_106_148_128> y
x <crm:P128_carries> y => x <rso:FRT_46_106_148_128> y
{code}
{code:title=Axioms}
<rso:FRT_46_106_148_128> <rdf:type> <owl:TransitiveProperty>
{code}

- FRT_46_106_148_128_130 := (FRT_46_106_148_128|P130|P130i)+
{code:title=Rules}
x <rso:FRT_46_106_148_128> y => x <rso:FRT_46_106_148_128_130> y
x <crm:P130_shows_features_of> y => x <rso:FRT_46_106_148_128_130> y
x <crm:P130i_features_are_also_found_on> y => x <rso:FRT_46_106_148_128_130> y
{code}
{code:title=Axioms}
<rso:FRT_46_106_148_128_130> <rdf:type> <owl:TransitiveProperty>
{code}

- FRX_62_67 := P62_depicts or P67_refers_to
{code:title=Rules}
x <crm:P62_depicts> y => x <rso:FRX_62_67> y
x <crm:P67_refers_to> y => x <rso:FRX_62_67> y
{code}

- FRX_62_67_E26 := FRX_62_67 and check type E26
{code:title=Rules}
x <rso:FRX_62_67> y; y <rdf:type> <crm:E26_Physical_Feature> => x <rso:FRX_62_67_E26> y
{code}

- FRX67_refers_to_or_is_about := paths from FC70 to E53, with no loops nor type check at start & end
{code:title=Rules}
x <rso:FRX_62_67> y => x <rso:FRX67_refers_to_or_is_about> y
x <rso:FRX_62_67_E26> y; y <crm:P53_has_former_or_current_location> z => x <rso:FRX67_refers_to_or_is_about> z
x <rso:FRX_62_67_E26> y; y <rso:FRT_46_106_148_128_130> z; z <crm:P53_has_former_or_current_location> t => x <rso:FRX67_refers_to_or_is_about> t
{code}

- FRT67_refers_to_or_is_about := add loops at start & end
(Note: ECRM defines P89i_contains as transitive)
{code:title=Rules}
x <rso:FRX67_refers_to_or_is_about> y => x <rso:FRT67_refers_to_or_is_about> y
x <rso:FRT_46_106_148_128_130> y; y <rso:FRT67_refers_to_or_is_about> z => x <rso:FRT67_refers_to_or_is_about> z
x <rso:FRT67_refers_to_or_is_about> y; y <crm:P89i_contains> z => x <rso:FRT67_refers_to_or_is_about> z
{code}

- FR67_refers_to_or_is_about := add type check at start & end
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT67_refers_to_or_is_about> y; y <rdf:type> <crm:E53_Place> => x <rso:FR67_refers_to_or_is_about> y
{code}

h3. Thing is referred to at Place: WONTDO

h3. Thing from Place: FR7_from_place
Thing has former, current or permanent location at place, or was created at place, or was created by someone born at place, or part of a group having residence at place, or moved to/from, or acquired at place
{section}{column}
As defined in FRThing.docx (without C2.Finding which is undefined):
!FR7_from_place.png!
{column}{column}
Corrected definition:
!FR7_from_place-fixed.png!
{column}{section}

Fixed problems:
# At beginning: does not allow paths of mixed properties (eg P46i,P106i)
#- Resolved by "mixing" as FRT_46i_106i_148i
# At E9: does not allow a loop P9i* (Move forms part of a bigger event)
#- Resolved by merging all Event nodes (E8, E9, second E63) and allowing P9i*
#- Allowed P10_falls_within in addition to P9i_forms_part_of
#- Note that P26,P27 are subproperties of P7, so we don't need to use them
#- (We could even merge both E63, but then we'd have a back-link and before traversing P14 must check that the event is the production/creation of a Thing: E12, E65, E81)

Implementation:
- FRT_46i_106i_148i := (P46i or P106i or P148i)+
{code:title=Rules}
x <crm:P46i_forms_part_of> y => x <rso:FRT_46i_106i_148i> y
x <crm:P106i_forms_part_of> y => x <rso:FRT_46i_106i_148i> y
x <crm:P148i_is_component_of> y => x <rso:FRT_46i_106i_148i> y
{code}
{code:title=Axioms}
<rso:FRT_46i_106i_148i> <rdf:type> <owl:TransitiveProperty>
{code}

- FRX_53_54_current_location := P53 or P54
{code:title=Rules}
x <crm:P53_has_former_or_current_location> y => x <rso:FRX_53_54_current_location> y
x <crm:P54_has_current_permanent_location> y => x <rso:FRX_53_54_current_location> y
{code}

- FRT9i_10 := (P9i_forms_part_of | P10_falls_within)+
{code:title=Rules}
x <crm:P9i_forms_part_of> y => x <rso:FRT9i_10> y
x <crm:P10_falls_within> y => x <rso:FRT9i_10> y
{code}
{code:title=Axioms}
<rso:FRT9i_10> <rdf:type> <owl:TransitiveProperty>
{code}

- FRT92i_9i := P92i / (P9i|P10)*
{code:title=Rules}
x <crm:P92i_was_brought_into_existence_by> y => x <rso:FRT92i_9i> y
x <crm:P92i_was_brought_into_existence_by> y; y <rso:FRT9i_10> z => x <rso:FRT92i_9i> z
{code}

- FRT107i_member_of := P107i+
{code:title=Rules}
x <crm:P107i_is_current_or_former_member_of> y => x <rso:FRT107i_member_of> y
{code}
{code:title=Axioms}
<rso:FRT107i_member_of> <rdf:type> <owl:TransitiveProperty>
{code}

- FRX_P92i_P14_P107i := FRT92i_9i then P14 then P107i*
{code:title=Rules}
x <rso:FRT92i_9i> y; y <crm:P14_carried_out_by> z => x <rso:FRX_P92i_P14_P107i> z
x <rso:FRT92i_9i> y; y <crm:P14_carried_out_by> z; z <rso:FRT107i_member_of> t => x <rso:FRX_P92i_P14_P107i> t
{code}

- FRX_FC70_key_event := paths from FC70 to E8,E9,E63 (a "key event")
{code:title=Rules}
x <crm:P24i_changed_ownership_through> y => x <rso:FRX_FC70_key_event> y
x <crm:P25i_moved_by> y => x <rso:FRX_FC70_key_event> y
x <rso:FRX_P92i_P14_P107i> y; y <crm:P92i_was_brought_into_existence_by> z => x <rso:FRX_FC70_key_event> z
{code}

- FRT_FC70_key_event_P9i_10 := FRX_FC70_key_event / P9i_10*
{code:title=Rules}
x <rso:FRX_FC70_key_event> y => x <rso:FRT_FC70_key_event_P9i_10> y
x <rso:FRX_FC70_key_event> y; y <rso:FRT9i_10> z => x <rso:FRT_FC70_key_event_P9i_10> z
{code}

- FRX7_from_place := paths from FC70 to E53, with no loops nor type check at start & end
{code:title=Rules}
x <rso:FRX_53_54_current_location> y => x <rso:FRX7_from_place> y
x <rso:FRT_FC70_key_event_P9i_10> y; y <crm:P7_took_place_at> z => x <rso:FRX7_from_place> z
x <rso:FRX_P92i_P14_P107i> y; y <crm:P74_has_current_or_former_residence> z => x <rso:FRX7_from_place> z
x <rso:FRT92i_9i> y; y <crm:P7_took_place_at> z => x <rso:FRX7_from_place> z
{code}

- FRT7_from_place := add loops at start & end
{code:title=Rules}
x <rso:FRX7_from_place> y => x <rso:FRT7_from_place> y
x <rso:FRT_46i_106i_148i> y; y <rso:FRX7_from_place> z => x <rso:FRT7_from_place> z
x <rso:FRX7_from_place> y; y <crm:P89_falls_within> z => x <rso:FRT7_from_place> z
x <rso:FRT_46i_106i_148i> y; y <rso:FRX7_from_place> z; z <crm:P89_falls_within> t => x <rso:FRT7_from_place> t
{code}

- FR7_from_place := add type check at start
-- TODO: do this check earlier, so as not to generate unneeded sub-FR triples
-- (No need to check at end since all relations are to E53_Place)
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT7_from_place> y => x <rso:FR7_from_place> y
{code}

h3. Thing used at Place: WONTDO
No such in BM data

h3. Thing created at Place: WONTDO
This is very similar to "from", which in addition has a part "created by person born at".
But RKD Person thesaurus doesn't have birth details, and I don't know whether BM Person exported to SKOS has such details.

h3. Thing found or acquired at Place: WONTDO
C2.Finding is not defined

h3. Thing is/was located in Place: FR53_is_was_located_in
Thing has former or current location at place.
This is a very simple subset of [#Thing from Place: FR7_from_place]
!FR53_is_was_located_in.png!

Implementation:
- FRT53_is_was_located_in := FRT_46i_106i_148i* then P53 then P89*
{code:title=Rules}
x <crm:P53_has_former_or_current_location> y => x <rso:FRT53_is_was_located_in> y
x <rso:FRT_46i_106i_148i> y; y <crm:P53_has_former_or_current_location> z => x <rso:FRT53_is_was_located_in> z
x <crm:P53_has_former_or_current_location> y; y <crm:P89_falls_within> z => x <rso:FRT53_is_was_located_in> z
{code}

- FR53_is_was_located_in := add type check at start
(No need to check at end since the relation is to E53_Place)
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT53_is_was_located_in> y => x <rso:FR53_is_was_located_in> y
{code}

h2. Thing-Thing

We don't have any info about top-level Thing-Thing relations in Rembrandt nor BM data.
- In Rembrandt there is part composition info, but we don't display other than top-level objects
- In one case "<painting> P130i_features_are_also_found_on <sketch>", but these relate to sub-objects, eg
{code}<obj/2926> crm:P130i_features_are_also_found_on <obj/2926/related/1>{code}

h3. Thing has met Thing: WONTDO
h3. Thing refers to or is about Thing: WONTDO
h3. Thing is referred to by Thing: WONTDO
h3. Thing from Thing: WONTDO
h3. Thing is part of Thing: WONTDO
h3. Thing was made from Thing: WONTDO
h3. Thing has part Thing: WONTDO
h3. Thing is similar or same with Thing: WONTDO

h2. Thing-Actor

h3. Thing has met Actor: FR12_has_met
Thing (or another thing it is part of) has met actor in the same event (or event that is part of it)
{section}{column}
As defined in FRThing.docx:
!FR12_has_met.png!
{column}{column}
Corrected definition:
!FR12_has_met-fixed.png!
{column}{section}

Fixed Problems:
# At beginning: why consider part composition only of E18_Physical_Thing (P46i) but not of Symbolic/Propositional Objects (P106i,P148i)?
Note: P12 is applicable to any E77_Persistent_Item
#- Resolved by adding P106i,P148i: do you agree (?)

Further discussion:
- We consider carefully the directions of the "part" relations. Here's an example where we have 3 levels of nested Things, Events and Actors and the relation is made at level2:
-- Jewel1 is part of Necklace2 is part of Treasure3
-- AuctionLot1 is part of Auction2 is part of AuctionSeries3
-- Dealer1 is part of JewelSellers2 is part of Corp3
-- Necklace2 was sold at Auction2 by JewelSellers2
- I think we can infer these relations:
-- (Jewel1,Necklace2) was sold at (Auction2,AuctionSeries3) by (JewelSellers2,Corp3)
- However, FRThing.docx dismisses the "Actor member of Group" inference because "it is not so probable that the Group has also been in the same event as the Actors".
- Ok, agreed

Implementation:
We reuse [#Thing has met Event: FR12_was_present_at] as the initial sub-FR from FC70 to E5.
- FR12_has_met := FR12_was_present_at / P12 / E39
{code:title=Rules}
x <rso:FR12_was_present_at> y; y <crm:P12_occurred_in_the_presence_of> z; z <rdf:type> <crm:E39_Actor> => x <rso:FR12_has_met> z
{code}

h3. Thing is referred to by Actor: WONTDO
A related example in RKD data is: <Gertruidenberg> (Place) P67i_is_referred_to_by <Bathing Susana> which is created by <Rembrandt>,
which would map to <Gertruidenberg> "is referred to by" <Rembrandt>, except that Place is not a Thing.

h3. Thing refers to or is about Actor: TODO

h3. Thing by Actor: FR14_by
Thing (or part thereof) was created, measured, modified, acquired or used for activity performed by actor (or group it is member of)
{section}{column}
As defined in FRThing.docx:
!FR14_by.png!
{column}{column}
Corrected definition:
!FR14_by_fixed.png!
{column}{section}

Fixed Problems:
# At beginning: allow paths of mixed properties
# At E8: allow a hierarchy of Acquisition events (not that it'll happen often)
# Note: we don't need to check the types E7, E8 since the properties P24i, P14, P22 ensure them.

Implementation:
- FRX_92_16_39_31_24i := P92i_was_brought_into_existence_by | P16i_was_used_for | P39i_was_measured_by | P31i_was_modified_by | P24i_changed_ownership_through
{code:title=Rules}
x <crm:P92i_was_brought_into_existence_by> y => x <rso:FRX_92_16_39_31_24i> y
x <crm:P16i_was_used_for> y => x <rso:FRX_92_16_39_31_24i> y
x <crm:P39i_was_measured_by> y => x <rso:FRX_92_16_39_31_24i> y
x <crm:P31i_was_modified_by> y => x <rso:FRX_92_16_39_31_24i> y
x <crm:P24i_changed_ownership_through> y => x <rso:FRX_92_16_39_31_24i> y
{code}

- FRX_14_22 := P14_carried_out_by | P22_transferred_title_to
{code:title=Rules}
x <crm:P14_carried_out_by> y => x <rso:FRX_14_22> y
x <crm:P22_transferred_title_to> y => x <rso:FRX_14_22> y
{code}

- FRX_46_106_148_92_16_39_31_24i := FRT_46_106_148* / FRX_92_16_39_31_24i
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRX_92_16_39_31_24i> y => x <rso:FRX_46_106_148_92_16_39_31_24i> y
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148> y; y <rso:FRX_92_16_39_31_24i> z => x <rso:FRX_46_106_148_92_16_39_31_24i> z
{code}

- FRX14_by := FRX_46_106_148_92_16_39_31_24i / (P9i|P10)*
{code:title=Rules}
x <rso:FRX_46_106_148_92_16_39_31_24i> y => x <rso:FRX14_by> y
x <rso:FRX_46_106_148_92_16_39_31_24i> y; y <rso:FRT9i_10> z => x <rso:FRX14_by> z
{code}

- FR14_by := FRX14_by / FRX_14_22 / P107i*
{code:title=Rules}
x <rso:FRX14_by> y; y <rso:FRX_14_22> z => x <rso:FR14_by> z
x <rso:FRX14_by> y; y <rso:FRX_14_22> z; z <crm:P107i_is_current_or_former_member_of> t => x <rso:FR14_by> t
{code}

h2. Thing-Event

h3. Thing refers to or is about Event: FR67_about_event
Thing depicts or refers to event, or carries information object that is about event, or bears similarity with a thing that is about event
- The beginning is the same as [#Thing refers to or is about Place: FR67_refers_to_or_is_about] so we reuse properties FRT_46_106_148_128_130 and FRX_62_67. TODO: optimize this reuse, by carefully thinking where to put the type check
- The ending is way simpler.
- TODO: harmonize FR names (this says "_event" but "about Place" doesn't say "_place")

{section}{column}
As defined in FRThing.docx:
!FR67_about_event.png!
{column}{column}
Corrected definition:
!FR67_about_event-fixed.png!
{column}{section}

Fixed Problems:
# At beginning: does not allow paths of mixed properties
# At E73: does not allow P106,P148. Resolved by adding P128 into the mix

Implementation:
(i) We reuse a lot of properties from above, so we don't need to define any auxiliary sub-FRs here
- FR67_about_event := (FC70) / FRT_46_106_148_128_130* / FRX_62_67 / (E5)
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRX_62_67> y; y <rdf:type> <crm:E5_Event> => x <rso:FR67_about_event> y
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148_128_130> y; y <rso:FRX_62_67> z; z <rdf:type> <crm:E5_Event> => x <rso:FR67_about_event> z
{code}

h3. Thing is referred to at Event: WONTDO

h3. Thing has met Event: FR12_was_present_at
Thing was present at (has met, is from) event.
- (FRThing.docx refers to this variously as "has met" or "from", but we use FR12_has_met for Actor.
So we use FR12_was_present_at for this. The name is derived from the name of the key constituent CRM property.)

As defined in FRThing.docx:
{noformat}
FC70_Thing -- FR12_was_present_at -> E5_Event :=
FC70_Thing -- (P46i_forms_part_of* | P106i_forms_part_of* | P148i_is_component_of*) -> FC70_Thing:
FC70_Thing -- P12i_was_present_at -> E5_Event:
E5_Event -- P9i_forms_part_of* -> E5_Event
{noformat}

Graphical form (slightly modified: allows mixed paths of P46i, P106i, P148i):
!FR12_was_present_at.png!

h4. BUG
The FR "Thing from Event" has a serious bug that goes like this:
- An acquisition is a E79_Part_Addition event (amongst other event types, see below for details)
- Assume Thing1 and Thing2 are part of the BM_collection.

THEN
{noformat}
Thing2(E22_Man-Made_Object) -- P46i_forms_part_of -> BM_Collection (E78_Collection). # given
Thing1_Acquisition(E79_Part_Addition) -- P110_augmented -> BM_Collection. # given
BM_Collection -- P12i_was_present_at -> Thing1_Acquisition. # P110i is sub-property of P12
Thing2 -- FR12_was_present_at -> Thing1_Acquisition. # by the FR definition
{noformat}

This causes *all* BM objects to be present at all Acquisition events *of each other*, which is wrong:
- If Thing2 was added to BM after Thing1, it's causally impossible for Thing2 to be present at the acquisition of Thing1
- If Thing2 was added to BM before Thing1, you *could* say that while sitting in BM, it quietly observed the addition of Thing1, but that is silly and not useful.

This also causes quadratic growth of the repository, and seemingly exponential growth of load times.

h4. Details of Representation of Acquisitions
(These details are not relevant to the bug described above, but are given as background information).
An acquisition by the BM is modeled as an event having all these classes:
- E8_Acquisition: change of ownership
- E10_Transfer_of_Custody: in most cases but not always
- E80_Part_Removal: optional, if we know which collection it came from
- E79_Part_Addition: thing is added to the BM collection

The following entities are present at an acquisition; linked by properties appropriate for the indicated event classes:
- the thing itself: E8, E10, E80, E79
- the seller: E8, E10
- the seller's collection: E80
- the buyer: E8, E10
- the buyer's collection: E79

h4. How to fix it?
Following the partOf hierarchy is a fundamental feature of FRs. If a Thing is part of Another, it's (often?) useful to conclude that Thing was present at each Event of Another.
- Except if Thing was added to Another after the Event
- And except that when Another is a collection, we hit this nasty bug

If you're thinking of fixing it by adding "Another is not E78_Collection", consider this:
- Class negation causes much higher inferencing complexity in OWL
- I'm sure there are other twisted cases, eg "each part of a building observed all modifications that added other parts to that building"

We had some discussions about following partOf:
- for some FRs it's appropriate to follow the other direction P46 ("contravariant" not "covariant" FRs)
- for some FRs it's appropriate to follow neither P46i, nor P46 (eg for Thing *about* Entity)

But this is none of these cases, and I don't know how to fix it cleanly.

h4. Implementation
For now I'll just remove P46i, P106i, P148i from the FR (BM doesn't have parts of objects, so there's no loss)
- FR12_was_present_at := FC70 / -FRT_46i_106i_148i*- / P12i / (P9i|P10)*
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <crm:P12i_was_present_at> y => x <rso:FR12_was_present_at> y
x <rdf:type> <rso:FC70_Thing>; x <crm:P12i_was_present_at> y; y <rso:FRT9i_10> z => x <rso:FR12_was_present_at> z
{code}
{code:title=REMOVED}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46i_106i_148i> y; y <crm:P12i_was_present_at> z => x <rso:FR12_was_present_at> z
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46i_106i_148i> y; y <crm:P12i_was_present_at> z; z <rso:FRT9i_10> t => x <rso:FR12_was_present_at> t
{code}

h2. Thing-Concept

h3. Thing is made of Material: FR45_is_made_of
Thing (or part thereof) consists of material

{section}{column}
As defined in FRThing.docx:
Includes P33_used_specific_technique/P68_foresees_use_of, but I think that is far-fetched: P33 should refer to an explicitly defined procedure, and if P68 then it stands to reason the material was actually P126_employed!
{column}{column}
Corrected definition:
!FR45_is_made_of-fixed.png!
{column}{section}

Implementation
- FRX45_is_made_of := P45 | (FRT92i_9i / P126)
{code:title=Rules}
x <crm:P45_consists_of> y => x <rso:FRX45_is_made_of> y
x <rso:FRT92i_9i> y; y <crm:P126_employed> z => x <rso:FRX45_is_made_of> z
{code}

- FR45_is_made_of := (FC70) / FRT_46_106_148* / FRX45_is_made_of
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRX45_is_made_of> y => x <rso:FR45_is_made_of> y
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148> y; y <rso:FRX45_is_made_of> z => x <rso:FR45_is_made_of> z
{code}

h3. Thing is/has Type: FR2_has_type
Thing has Type (or has shape, is of kind, is about subject, etc)
(FRThing.docx calls this "has type" but I think "is/has" matches the general usage "is Weapon", "has shape Vertical Rectangle", etc)

{section}{column}
{column}{column}
Corrected definition:
!FR2_has_type-fixed.png!
{column}{section}

Fixes:
- added P67 (E55_Type), since some types are attached using P67_refers_to (or P129_is_about),
eg these RS extension properties: rso:P129_has_iconclass, rso:P129_has_keyword
- added P128_carries (E73_Information_Object) to move from physical to conceptual, eg
{code}
<obj/2926> crm:P65_shows_visual_item <obj/2926/image>.
<obj/2926/image> crm:P129_is_about rst-iconclass:_71P412.
{code}
- added "P127_has_broader_term" to search by type hierarchy

Implementation:
- FRX2_has_type := (P2|P67) / (E55_Type)
{code:title=Rules}
x <crm:P2_has_type> y => x <rso:FRX2_has_type> y
x <crm:P67_refers_to> y; y <rdf:type> <crm:E55_Type> => x <rso:FRX2_has_type> y
{code}

- FR2_has_type := (FC70) / FRT_46_106_148_128* / FRX2_has_type / P127_has_broader_term*
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRX2_has_type> y => x <rso:FR2_has_type> y
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148_128> y; y <rso:FRX2_has_type> z => x <rso:FR2_has_type> z
x <rdf:type> <rso:FC70_Thing>; x <rso:FRX2_has_type> y; y <crm:P127_has_broader_term> z => x <rso:FR2_has_type> z
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148_128> y; y <rso:FRX2_has_type> z; z <crm:P127_has_broader_term> t => x <rso:FR2_has_type> t
{code}

Notes:
- Martin also adds here FR45_is_made_of. This would be easy to add with this clause:
{code}
x <rso:FR45_is_made_of> y => x <rso:FR2_has_type> y
{code}
but our search UI currently has a restriction that the many-to-many relation "FRs-thesauri" should split both FRs and thesauri into equivalence classes.

h3. Thing used technique: FR32_used_technique
The production of Thing (or part thereof) used general technique
Extension defined by me:
!FR32_used_technique-fixed.png!
(I think P32_used_general_technique is more useful than P33_used_specific_technique, see [#Thing is made of Material: FR45_is_made_of] above)

Implementation:
- FR32_used_technique := (FC70) / FRT_46_106_148* / FRT92i_9i / P32
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT92i_9i> y; y <crm:P32_used_general_technique> z => x <rso:FR32_used_technique> z
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148> y; y <rso:FRT92i_9i> z; z <crm:P32_used_general_technique> t => x <rso:FR32_used_technique> t
{code}

h3. Thing identified by Identifier: FR1_identified_by
Thing (or part thereof) has Identifier (exact-match string).
Extension defined by me:
!FR1_identified_by.png!

Implementation:
- FR1_identified_by := (FC70) / FRT_46_106_148* / P1 / P3
{code:title=Rules}
x <rdf:type> <rso:FC70_Thing>; x <crm:P1_is_identified_by> y; y <crm:P3_has_note> z => x <rso:FR1_identified_by> z
x <rdf:type> <rso:FC70_Thing>; x <rso:FRT_46_106_148> y; y <crm:P1_is_identified_by> z; z <crm:P3_has_note> t => x <rso:FR1_identified_by> t
{code}
TODO: it may be better to stop at P1 so the identifier type can also be examined