Definitions and relations


#1

I know I can achieve what I want with more code, but I’m trying to make this a little more logically elegant. Can I define a value via a relation? Specifically, can I say:

Marital status is a kind of value. The marital statuses are single, married, widowed, and unknown. A person has a marital status.

Marriage relates people to each other. The verb to be wedded to means the marriage relation.

Definition: a person is married if it is wedded to someone.

Or rather, I know I can’t say this exactly because it gives me an error (“it looks as if you intend ‘The marital statuses are single, married, widowed, and unknown’ to be asserting something, but that seems to involve applying the adjective ‘married’ to a marital status - and I have no definition of it which would apply in that situation”), but is there something I can write to achieve the same result? So that I could say “A is wedded to B” and not need a separate line of code to say “A is married. B is married”, and so that I could concisely say that killing someone’s spouse makes them widowed?

(Hoo boy I don’t like the new forum)


(Hanon Ondricek) #2

I know it’s not what you asked, but re verb assertions and definitions:
Chapel is a room.

Marriage relates one person to another (called the spouse).
The verb to be married to implies the marriage relation.

Definition: a person is single if they are not married to anyone.
		
After examining a person (called A):
	if A is married to a person:
		say "[A] is the spouse of [the spouse of A].";
	else:
		say "[A] is single."
		
John is a man in chapel. Jane is a woman in chapel. John is married to Jane.
Irving is a man in chapel.
Poor Irving...

Chapel
You can see John, Jane and Irving here.

relations
Marriage relates one person to another ( called the spouse ):
John == Jane

x john
You see nothing special about John.

John is the spouse of Jane.

x jane
You see nothing special about Jane.

Jane is the spouse of John.

x irving
You see nothing special about Irving.

Irving is single.


(Hanon Ondricek) #3

Moreso:

Chapel is a room.

Marriage relates one person to another (called the spouse).
The verb to be married to implies the marriage relation.

Definition: a person is single if they are not married to anyone.

A person can be dead.
		
After examining a person (called A):
	if A is married to a person who is not dead:
		say "[A] is the spouse of [the spouse of A].";
	else if A is single:
		say "[A] is single.";
	else if A is married to a dead person:
		say "[A] is widowed. Poor [A]..."
		
John is a man in chapel. Jane is a woman in chapel. John is married to Jane.
Irving is a man in chapel. Irving is married to Beth.
Beth is dead.
Poor Beth...

Chapel
You can see John, Jane and Irving here.

relations
Marriage relates one person to another ( called the spouse ):
John == Jane
Irving == Beth

x john
You see nothing special about John.

John is the spouse of Jane.

x jane
You see nothing special about Jane.

Jane is the spouse of John.

x irving
You see nothing special about Irving.

Irving is widowed. Poor Irving…


#4

Ah, okay, so it shouldn’t be necessary to have the list of marital statuses declared separately at all, and the list of definitions should create them? Great, thanks.

(Also, why “implies” rather than “means”?)

Also relevant question: the worldbuilding allows for group marriages, so do I need to individually define all of them, or is there a way that “John is married to Jane and Irving” can automatically create the Jane-Irving marriage relation? (“John, Jane, and Irving are married to each other”, etc.)


(matt w) #5

You can say

Marriage relates people to each other in groups.

which will create marriage as an equivalence relation, so if A is married to B and B is married to C then A, B, and C are all married to each other.

I don’t think “John is married to Jane and Irving” will work here (could be wrong!) but

John is married to Jane. John is married to Irving.

should. See §13.7 of Writing with Inform.


(Hanon Ondricek) #6

I believe it’s a synonym. I’m just used to “implies”.

You just have to change the relation or make a new one.

Polyamory relates people to each other in groups.
The verb to be polyamorous with implies the polyamory relation.

relations
Marriage relates one person to another ( called the spouse ):
John == Jane
Irving == Beth
Polyamory relates people to each other in groups:
{ Mark, Ann and Chris }

You just can’t specify (called the spouse) as it’s not one-to-one and therefore undefined.


(Piergiorgio d'errico) #7

For now I concur and agree. It’s a nord and bert situation.