I suppose David Whitten is technically correct, i.e. you can roll your own function called genls-p. However, please be aware that there is already a function in SubL that does what you want genls-p to do (and it is likely much faster than a hand-rolled function).
That function is called "genls?".
Here are some examples:
If you put....
(genls? #$Automobile #$RoadVehicle)
...into some SubL interpreter (e.g. the SubL Interactor on the GUI), it will return...
T
....In other words, if you ask Cyc "Is automobile a subclass of the road-vehicle?" it will answer T meaning true, i.e. "yes".
Likewise, if you put something like...
(genls? #$Automobile #$BaseKB)
...into a SubL interpreter, it will return...
NIL
...In other words if you ask it "Is automobile a subclass of the BaseKB, i.e. the most general context that makes the weakest assumptions about the universe", then Cyc will answer NIL, i.e. False, i.e. "No".
Note that microtheories can sometimes cause confusing results. Consider the following illustrative examples:
(genls? #$Ghost #$SupernaturalBeing) ==> NIL
However, if you ask this question within a context with appropriate assumptions beliefs about the world you will get not NIL but T as the result. E.g.
(with-mt #$WorldMythologyMt (genls? #$Ghost #$SupernaturalBeing)) ==> T
...Whereas in a microtheory that is less superstitious, more scientific such as #$LinnaeanTaxonomyPhysiologyMt you will get NIL, not T as the result...
(with-mt #$LinnaeanTaxonomyPhysiologyMt (genls? #$Ghost #$SupernaturalBeing)) ==> NIL
...and if you ask this in that most general, weakest assumption microtheory known as BaseKB you will also get NIL....
(with-mt #$BaseKB (genls? #$Ghost #$SupernaturalBeing)) ==>
...Sometimes you will want to ignore the complexities of microtheories and collapse across microtheories. I think this is one way to do that...
(with-all-mts (#$genls? #$Ghost #$SupernaturalBeing)) ==> T
...although be forewarned that you may get self-contradictory results. E.g. If you had...
"The earth is a flat object" in a 'flat earth beliefs microtheory'
..and...
"The earth is a round object" in a 'general scientific consensus microtheory'
...you might get Cyc to return a self-contradictory answer that the earth was both a flat and a round object. In most practical applications. you can just get away with not worrying about such contradictions and thus with-all-mts is an okay bet.
I hope I haven't confused you.
To recap the most important point, if you want to achieve the kind of functionality you desire this SubL expression will serve you well...
(genls? #$Automobile RoadVehicle)