Hudson (2010): An Introduction to Word Grammar #
This file formalizes the worked examples of Part I of [Hud10] on the default-inheritance
substrate DefaultInheritance. Default inheritance is the book's engine. An exemplar inherits every
property of the concepts above it in the isA taxonomy except those overridden lower down. So a
penguin exemplar inherits lays eggs from bird but doesn't fly from penguin (Figure 2.8,
inherited_flight_e2), and a diesel car exemplar runs on diesel rather than the default petrol
(Figure 3.18, inherited_fuel_e). The book's searcher climbs the taxonomy from the exemplar and
keeps the first answer it finds (Section 2.5.3). The substrate proves that this answer is an
inherited one for every climb that starts at the bottom
(DefaultInheritance.mem_inherited_of_find?_eq_some). Multiple inheritance can leave a conflict
with no recognized resolution, the Nixon diamond of Figure 2.7. Nixon inherits both accepts war
and rejects war as credulous conclusions and neither as a skeptical one (inherited_war_nixon,
not_entails_war_nixon), and the two climbs that visit his parents in opposite orders find
different answers (search_war_nixon). Nixon's own choice, a copy of accepts war at his node,
settles the conflict (nixon_resolved). Choice sets keep such conflicts from arising. No one is
both male and female, or both adult and child, so a property attached to the members of either
choice set is never inherited twice, although man, boy, woman and girl each inherit from two
concepts (Figure 3.9, subsingleton_inherited_sex, subsingleton_inherited_age).
Relational concepts are defined in terms of existing ones: parent merges mother and
father, grandmother is the mother of a parent, and ancestor is the recursive closure of
parent (Section 3.2.7, ancestor). The definition of grandmother is a relational
Triangle, one node's two relations converging on a third, and the same triangle is the
syntactic pattern of raising: an auxiliary's subject is also its valent's subject
(Figure 7.6). Closing the asserted subjects under the triangle along the valent chain
(raise) makes he the subject of every verb in He keeps seeming to have forgotten to go
(Figure 7.12, he_subject_of_go).
Implementation notes #
- A property is an attribute, a partial map from concepts to values, and two values compete when they are values of one attribute. The book's competition between links one of which isA the other (Section 3.5.3) is not modelled.
- Only exemplars inherit (Section 2.5).
DefaultInheritance.inheritedis defined at every concept, and the theorems query the exemplars. - Each taxonomy is declared by its immediate isA links, and its order is their reflexive
transitive closure (
partialOrderOfCovers). - The kinship system of Figure 8.16 is built from
motherandfatheron an arbitrary type of people, with sex as predicates; the compositions are mathlib'sRelation.CompandRelation.TransGen.
References #
Default inheritance #
Equations
- Hudson2010.instDecidableEqBird x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instFintypeBird = { elems := { val := ↑Hudson2010.Bird.enumList, nodup := Hudson2010.Bird.enumList_nodup }, complete := Hudson2010.instFintypeBird._proof_1 }
The concepts each concept of Figure 2.8 immediately isA.
Equations
Instances For
The depth of a concept below bird.
Equations
Instances For
Equations
How a bird moves.
Instances For
Equations
- Hudson2010.instDecidableEqFlight x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instDecidableEqReproduction x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Figure 2.8: birds fly, and penguins do not.
Equations
Instances For
Figure 2.8: birds lay eggs.
Equations
Instances For
A sparrow exemplar inherits the default of bird.
A penguin exemplar inherits doesn't fly, the lower of the competing properties (Section 2.5.3).
The override leaves the other defaults intact: the exceptional penguin still inherits what bird specifies about reproduction.
Equations
- Hudson2010.instDecidableEqCar x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instFintypeCar = { elems := { val := ↑Hudson2010.Car.enumList, nodup := Hudson2010.Car.enumList_nodup }, complete := Hudson2010.instFintypeCar._proof_1 }
The concepts each concept of Figure 3.18 immediately isA.
Equations
Instances For
The depth of a concept below car.
Equations
Instances For
Equations
Equations
- Hudson2010.instDecidableEqFuel x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Figure 3.18: petrol is the default car fuel and diesel the exception.
Equations
Instances For
The diesel car exemplar inherits the link to diesel before it reaches petrol.
The Nixon diamond #
Equations
- Hudson2010.instDecidableEqPerson x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instFintypePerson = { elems := { val := ↑Hudson2010.Person.enumList, nodup := Hudson2010.Person.enumList_nodup }, complete := Hudson2010.instFintypePerson._proof_1 }
The concepts each concept of Figure 2.7 immediately isA.
Equations
Instances For
The depth of a concept below person.
Equations
Instances For
Equations
Equations
- Hudson2010.instDecidableEqStance x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Figure 2.7: Republicans accept war and Quakers reject it.
Equations
Instances For
Nixon inherits both views of war, a conflict with no recognized resolution (Section 2.4.2): each view is a credulous conclusion, and neither is a skeptical one.
Neither view of war is a skeptical conclusion: Nixon's specifiers preferentially entail neither.
Climbing from Nixon through Republican first finds accepts war, and through Quaker first finds rejects war. Both climbs start at the bottom, so both answers are inherited.
Nixon's resolution: a copy of accepts war at his own node wins (Section 2.4.2).
Choice sets #
Equations
- Hudson2010.instDecidableEqHuman x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instFintypeHuman = { elems := { val := ↑Hudson2010.Human.enumList, nodup := Hudson2010.Human.enumList_nodup }, complete := Hudson2010.instFintypeHuman._proof_1 }
The concepts each concept of Figure 3.9 immediately isA.
Equations
- Hudson2010.Human.person.parents = []
- Hudson2010.Human.male.parents = [Hudson2010.Human.person]
- Hudson2010.Human.female.parents = [Hudson2010.Human.person]
- Hudson2010.Human.adult.parents = [Hudson2010.Human.person]
- Hudson2010.Human.child.parents = [Hudson2010.Human.person]
- Hudson2010.Human.man.parents = [Hudson2010.Human.male, Hudson2010.Human.adult]
- Hudson2010.Human.boy.parents = [Hudson2010.Human.male, Hudson2010.Human.child]
- Hudson2010.Human.woman.parents = [Hudson2010.Human.female, Hudson2010.Human.adult]
- Hudson2010.Human.girl.parents = [Hudson2010.Human.female, Hudson2010.Human.child]
Instances For
The depth of a concept below person.
Equations
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
The choice set sex of Figure 3.8.
Equations
Instances For
The choice set age of Figure 3.9.
Equations
Instances For
Only one member of a choice set may be chosen (Section 3.3.2): no concept isA both male and female.
No concept isA both adult and child.
A property attached only to the members of the choice set sex is inherited at most once (Section 2.4.3).
A property attached only to the members of the choice set age is inherited at most once.
Relational concepts #
Figure 8.16 (a): a person's parent is either their mother or their father.
Equations
- Hudson2010.parent mother father x p = (mother x p ∨ father x p)
Instances For
Figure 8.16 (b): a person's child is anyone whose parent they are.
Equations
- Hudson2010.child mother father x c = Hudson2010.parent mother father c x
Instances For
Figure 3.7: a grandmother is the mother of a parent, a relational triangle.
Equations
- Hudson2010.grandmother mother father = Relation.Comp (Hudson2010.parent mother father) mother
Instances For
Figure 3.17: a grandparent is a parent's parent.
Equations
- Hudson2010.grandparent mother father = Relation.Comp (Hudson2010.parent mother father) (Hudson2010.parent mother father)
Instances For
Figure 3.17: a great-grandparent is a grandparent's parent, and the Recycling Principle of Section 3.5.2 builds it on grandparent rather than as the parent of a parent of a parent, to which it is nonetheless equal.
Section 3.2.7: a person's ancestor is either their parent or an ancestor of their parent, the recursive definition.
Equations
- Hudson2010.ancestor mother father = Relation.TransGen (Hudson2010.parent mother father)
Instances For
A grandparent is an ancestor.
Figure 8.16 (c): brothers and sisters are the sons and daughters of a parent.
Equations
- Hudson2010.brother mother father male x b = (Relation.Comp (Hudson2010.parent mother father) (Hudson2010.child mother father) x b ∧ male b ∧ x ≠ b)
Instances For
Equations
- Hudson2010.sister mother father female x s = (Relation.Comp (Hudson2010.parent mother father) (Hudson2010.child mother father) x s ∧ female s ∧ x ≠ s)
Instances For
Figure 8.16 (d): uncles and aunts are the brothers and sisters of a parent.
Equations
- Hudson2010.uncle mother father male = Relation.Comp (Hudson2010.parent mother father) (Hudson2010.brother mother father male)
Instances For
Equations
- Hudson2010.aunt mother father female = Relation.Comp (Hudson2010.parent mother father) (Hudson2010.sister mother father female)
Instances For
A parent's brother is an uncle, though not conversely once Figure 8.16 (e) extends the relation to the husbands of aunts.
Triangles in kinship and in syntax #
The triangle of Figure 7.6: a node's r₁ value and r₂ value stand in r₃.
Equations
- Hudson2010.Triangle r₁ r₂ r₃ = ∀ (x y z : α), r₁ x y → r₂ x z → r₃ y z
Instances For
In kinship: a person's mother is their child's grandmother.
Raising, the syntactic triangle: a word's subject is also its valent's subject.
Equations
- Hudson2010.Raising valent subj = Hudson2010.Triangle valent subj subj
Instances For
The subjects derived from the asserted ones by closing under the triangle along the valent chain.
Equations
- Hudson2010.raise valent subj v s = ∃ (h : α), subj h s ∧ Relation.ReflTransGen valent h v
Instances For
Any subject relation containing the asserted subjects and closed under the triangle
contains the derived subjects: raise is the least closure.
Section 7.2.6: the subject is shared down a chain of valents, however long, the recursion of Figure 7.12.
Figure 7.12 #
Equations
- Hudson2010.instDecidableEqW x✝ y✝ = if h : x✝.ctorIdx = y✝.ctorIdx then isTrue ⋯ else isFalse ⋯
Equations
- Hudson2010.instReprW = { reprPrec := Hudson2010.instReprW.repr }
Equations
- Hudson2010.instReprW.repr Hudson2010.W.he prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.he")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.keeps prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.keeps")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.seeming prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.seeming")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.to₁ prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.to₁")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.have prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.have")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.forgotten prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.forgotten")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.to₂ prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.to₂")).group prec✝
- Hudson2010.instReprW.repr Hudson2010.W.go prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Hudson2010.W.go")).group prec✝
Instances For
The valent chain of Figure 7.12, each verb's valent the next.
Equations
- Hudson2010.valent Hudson2010.W.keeps Hudson2010.W.seeming = True
- Hudson2010.valent Hudson2010.W.seeming Hudson2010.W.to₁ = True
- Hudson2010.valent Hudson2010.W.to₁ Hudson2010.W.have = True
- Hudson2010.valent Hudson2010.W.have Hudson2010.W.forgotten = True
- Hudson2010.valent Hudson2010.W.forgotten Hudson2010.W.to₂ = True
- Hudson2010.valent Hudson2010.W.to₂ Hudson2010.W.go = True
- Hudson2010.valent x✝¹ x✝ = False
Instances For
The one asserted subject: he is the subject of keeps.
Equations
- Hudson2010.asserted Hudson2010.W.keeps Hudson2010.W.he = True
- Hudson2010.asserted x✝¹ x✝ = False