-- IdRP: no difference between animate/inanimate
AllEngAbs: RelCN (UseN friend_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP everybody_NP (SlashV2a love_V2))))
AllEng: friend that everybody loves

AllEngAbs: RelCN (UseN computer_N) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash IdRP (SlashVP everybody_NP (SlashV2a love_V2))))
AllEng: computer that everybody loves


-- IdRP + possess_Prep, RelSlash
AllEngAbs: PredVP (RelNP (DetCN (DetQuant DefArt NumSg) (UseN boss_N)) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash (FunRP possess_Prep (MassNP (UseN computer_N)) IdRP) (SlashVP everybody_NP (SlashV2a love_V2))))) (UseComp (CompAdv here_Adv))
AllEng: the boss , computer of which everybody loves , is here

-- IdRP + part_Prep, RelSlash
AllEngAbs: RelNP (MassNP (UseN butter_N)) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash (FunRP part_Prep (DetCN (DetQuant IndefArt NumSg) (UseN stick_N)) IdRP) (SlashVP (UsePron i_Pron) (SlashV2a eat_V2))))
AllEng: butter , a stick of which I eat

-- GenRP + RelVP
-- NB. with GenRP, can't parse "teacher whose every friend runs", because GenRP takes only a CN
AllEngAbs: RelCN (UseN teacher_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP (GenRP NumSg (UseN friend_N)) (UseV run_V)))
AllEng: teacher whose friend runs

AllEngAbs: RelCN (UseN car_N) (UseRCl (TTAnt TPres ASimul) PPos (RelVP (GenRP NumSg (UseN oil_N)) (UseV run_V)))
AllEng: car whose oil runs

-- GenRP + RelSlash
AllEngAbs: PredVP (RelNP (DetCN (DetQuant DefArt NumSg) (UseN boss_N)) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash (GenRP NumSg (UseN computer_N)) (SlashVP everybody_NP (SlashV2a love_V2))))) (UseComp (CompAdv here_Adv))
AllEng: the boss , whose computer everybody loves , is here

AllEngAbs: PredVP (RelNP (DetCN (DetQuant DefArt NumSg) (UseN restaurant_N)) (UseRCl (TTAnt TPres ASimul) PPos (RelSlash (GenRP NumSg (UseN fruit_N)) (SlashVP everybody_NP (SlashV2a love_V2))))) (UseComp (CompAdv here_Adv))
AllEng: the restaurant , whose fruit everybody loves , is here

-- IdRP other, RelSlash
-- RelVP really doesn't make sense–the preposition in FunRP looks like an object complement?
-- e.g. "Paris , the best city *in* which *I have lived* -- gap: "I have lived *in Paris*
-- for RelVP, the noun is a subject:
-- e.g. "Paris , the best city ∅    which sleeps"     -- no gap: "Paris sleeps"

-- In fact, the structure "in which I have lived" is easier to make with another instance of ClSlash:
-- take any intransitive verb, and add preposition to it with  SlashPrep : Cl -> Prep -> ClSlash ;
-- This feels more natural, because now the preposition is a part of the ClSlash, not part of the RP.
-- Let's demonstrate both sentence structures.

-- Transitive verb + preposition in RP
-- The RP is the whole [the best city in which]
-- We can't even do "lived in", because because live_V is intransitive and RelSlash requires transitive.
-- So let's switch to love_V2 instead.
AllEngAbs: RelNP (UsePN paris_PN) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash (FunRP in_Prep (DetCN (DetQuantOrd DefArt NumSg (OrdSuperl good_A)) (UseN city_N)) IdRP) (SlashVP (UsePron i_Pron) (SlashV2a love_V2))))
AllEng: Paris , the best city in which I have loved

-- Intransitive verb + preposition in ClSlash
-- The RP is just [that]
AllEngAbs: RelNP (UsePN paris_PN) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashPrep (PredVP (UsePron i_Pron) (UseV live_V)) in_Prep)))
AllEng: Paris , that I have lived in

AllEngAbs: PredVP (UsePN paris_PN) (UseComp (CompNP (DetCN (DetQuantOrd DefArt NumSg (OrdSuperl good_A)) (RelCN (UseN city_N) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashPrep (PredVP (UsePron i_Pron) (UseV live_V)) in_Prep)))))))
AllEng: Paris is the best city that I have lived in

-- to get "… city I have lived in", use Extend.EmptyRelSlash in place of RelSlash

---------------------------------------
-- Now let's do complicated structures!

-- FunRP + ditransitive verb. The whole string is the RS, and the substring [the first car to which] is the RP.
AllEngAbs: UseRCl (TTAnt TPres AAnter) PPos (RelSlash (FunRP to_Prep (DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN car_N)) IdRP) (SlashVP (UsePron i_Pron) (Slash2V3 give_V3 (MassNP (UseN oil_N)))))
AllEng: the first car to which I have given oil

-- IdRP + ditransitive verb. The whole string is now a NP, and RS is just a small part of it: [[that]:RP I have given oil]:RS
AllEngAbs: DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (RelCN (UseN car_N) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (Slash2V3 give_V3 (MassNP (UseN oil_N)))))))
AllEng: the first car that I have given oil

-- IdRP + ditransitive verb, but the verb has an inherent preposition
AllEngAbs: DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (RelCN (UseN country_N) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (Slash2V3 sell_V3 (MassNP (UseN oil_N)))))))
AllEng: the first country that I have sold oil to

-- let's test with Slash3V3 for completeness' sake
AllEngAbs: DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (RelCN (UseN oil_N) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (Slash3V3 sell_V3 (DetCN (DetQuant IndefArt NumSg) (UseN country_N)))))))
AllEng: the first oil that I have sold to a country


-- FunRP + ditransitive verb, now in a context
-- Suppose that I have a car named John. Now the relative pronoun "which" is chosen after the noun "car".
AllEngAbs: RelNP (UsePN john_PN) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash (FunRP to_Prep (DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN car_N)) IdRP) (SlashVP (UsePron i_Pron) (Slash2V3 give_V3 (MassNP (UseN oil_N))))))
AllEng: John , the first car to which I have given oil

-- Suppose that I have a friend named John. Now the relative pronoun "who" is chosen after the noun "friend".
AllEngAbs: RelNP (UsePN john_PN) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash (FunRP to_Prep (DetCN (DetQuantOrd (PossPron i_Pron) NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (UseN friend_N)) IdRP) (SlashVP (UsePron i_Pron) (Slash2V3 give_V3 (MassNP (UseN beer_N))))))
AllEng: John , my first friend to who I have given beer


-- If I really wanted to describe "John , my first friend […]", I would prefer using Extend.ApposNP to get a tree that makes more sense
-- this doesn't linearise in core RGL, but here's the tree:
AllEngAbs: ApposNP (UsePN john_PN) (DetCN (DetQuantOrd DefArt NumSg (OrdNumeral (num (pot2as3 (pot1as2 (pot0as1 pot01)))))) (RelCN (UseN friend_N) (UseRCl (TTAnt TPres AAnter) PPos (RelSlash IdRP (SlashVP (UsePron i_Pron) (Slash2V3 give_V3 (MassNP (UseN beer_N))))))))
AllEng: John , the first friend that I have given beer