Skip to content

Adding new property hasFirstMember. Resolves #549. #667

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
May 26, 2022
Merged

Conversation

dylan-sa
Copy link
Contributor

@dylan-sa dylan-sa commented May 6, 2022

No description provided.

@dylan-sa dylan-sa added impact: minor New, backward-compatible functionality (does not change inferences; e.g., adding a term) topic: collections Issues related to collections, membership, and ordering labels May 6, 2022
@dylan-sa dylan-sa requested review from rjyounes and uscholdm May 6, 2022 16:12
@dylan-sa dylan-sa self-assigned this May 6, 2022
skos:prefLabel "has first member"^^xsd:string ;
skos:scopeNote "Given the open-world assumption, the absence of a predecessor does not entail that an ordered member is the first member of an ordered collection. This property is used to explicitly indicate the first member."^^xsd:string ;
.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks nearly perfect. We didn't mention this at the meeting, but it occurs to me you could also add a restriction on OrderedCollection to the effect that it is either empty or has a first member. (Note that due to OWA the first member doesn't have to be stated.)

A little nitpicky, but most commonly I see the OWA spelled "Open World Assumption" rather than the hyphenated lowercase version, though I know this is also used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For OrderedCollection, maybe something like the following would work? If so, should I go ahead and include in this PR?

gist:OrderedCollection
	a owl:Class ;
	owl:equivalentClass [
		a owl:Class ;
		owl:intersectionOf (
			gist:Collection
			[
				a owl:Restriction ;
				owl:onProperty gist:hasMember ;
				owl:allValuesFrom gist:OrderedMember ;
			]
			[
				owl:unionOf (
					[
						owl:complementOf [
							a owl:Restriction ;
							owl:onProperty gist:hasMember ;
							owl:someValuesFrom gist:OrderedMember ;
						] ;
					]
					[
						a owl:Restriction ;
						owl:onProperty gist:hasFirstMember ;
						owl:someValuesFrom gist:OrderedMember ;
					]
				) ;
			]
		) ;
	] ;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I follow; it looks like it is literally saying the following:

skos:definition "A collection that only has ordered members and either has a first member that is an ordered member or has no members that are ordered members."^^xsd:string ; 

Is this your intention? A slightly simpler alternative to complement would be to use max cardinality of 0

@rjyounes
Copy link
Collaborator

The complement is not correct: you need to use owl:Thing instead of gist:OrderedMember to say that the set has no members. Otherwise the complement includes things which have objects other than OrderedMembers as members.

Copy link
Collaborator

@rjyounes rjyounes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

@dylan-sa
Copy link
Contributor Author

@rjyounes Ah, that's right! I will go ahead and work the correct version into the PR.

@rjyounes
Copy link
Collaborator

Actually, my previous comment may be incorrect given the first restriction. However, why not reduce the nesting - and impro ve the comprehensibility - as follows?

	[

			a owl:Restriction ;
			owl:onProperty gist:hasMember ;
			owl:cardinality "0"^^xsd:nonNegativeInteger ;
	]

And since the range of hasFirstMember is OrderedMember, you can also use a cardinality restriction:

			[
				a owl:Restriction ;
				owl:onProperty gist:hasFirstMember ;
				owl:cardinality "1"^^xsd:nonNegativeInteger ;
			]

Or, if you prefer, since hasFirstMember is a functional property and thus the cardinality is inferred:

			[
				a owl:Restriction ;
				owl:onProperty gist:hasFirstMember ;
				owl:someValuesFrom owl:Thing
			]

Which makes me realize that hasFirstMember should be declared a functional property.

@uscholdm
Copy link
Contributor

Which makes me realize that hasFirstMember should be declared a functional property.

good point.

@dylan-sa
Copy link
Contributor Author

I have no objection to going the functional route, but in #549 it looks like we wanted to allow for "first-place ties," so to speak.

@rjyounes
Copy link
Collaborator

Good point, you're right, we do want first place ties, so not functional.

@rjyounes
Copy link
Collaborator

But it now occurs to me that it's an inverse functional property, since each OrderedMember belongs to a unique OrderedCollection and points to a unique object.

@uscholdm
Copy link
Contributor

I think that's right, given an ordered member is just the proxy for the real thing.

@dylan-sa
Copy link
Contributor Author

dylan-sa commented May 17, 2022

OK, I think the latest two commits get it right. hasFirstMember is now inverse functional, and I've tweaked the restriction for OrderedCollection in line with discussion above. (Namely, I went with the 'cardinality 0' construction over the clunky 'complement' construction.) If this looks good, I will rebase to catch up with the latest changes to develop.

Copy link
Collaborator

@rjyounes rjyounes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything you've done is perfect. Can you add one sentence to the scope note along the lines of "Since ordered collections may not be strictly ordered, there can be more than one first member."

After that it's good to go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact: minor New, backward-compatible functionality (does not change inferences; e.g., adding a term) topic: collections Issues related to collections, membership, and ordering
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants