"She is opening her books."
Translation:Tá sí ag oscailt a leabhar.
So why isn't leabhar in the genitive here? Is it because of following a possessive pronoun?
That means "Her books are being opened by her". It describes an action that is being done to her books, whereas Tá sí ag oscailt a leabhar describes what she is doing.
Isn't "ag oscailt a cuid leabhar" in the genitive case? I'm guessing the bit duolingo doesn't like is the "cuid", but I'm not sure why...
ag verbal-noun usually causes the following noun to be in the genitive case - ag oscailt a leabhar - "opening books", where leabhar is the genitive plural. You would also get ag oscailt a coda - "opening her share".
a cuid also causes the following noun to be in the genitive case - a cuid leabhar - "her books".
But when you have two genitive nouns one after the other, the first one doesn't take the genitive form, instead staying in the nominative form but lenited, so you would have ag oscailt a chuid leabhar.
The form of the genitive is not used when two nouns in the genitive directly follow one another, to avoid a double genitive.
Instead the first is lenited in the nominative and only the second is in the genitive. This is the so-called "functional genitive", the first noun is "functional" in genitive relation, but keeps the nominative form and is lenited.
It should be "ag oscailt a cuid leabhar". Similarly, it would be "ag oscailt a chuid leabhar" and "ag oscailt a gcuid leabhar" for "his books" and "their books", respectively.
Although the functional genitive retains the nominative form, it is otherwise treated as a genitive, including for the purposes of initial mutation. It is not unconditionally lenited as GnaG appears to suggest.
I think the subject is covered more clearly, and with better examples, in the Christian Brothers' grammar (§§ 9.24-9.36). There are also a couple of directly relevant examples in the FGB: "Tá an bhó ag doirteadh a cuid bainne"; and "Ag sleamhnú a cuid gruaige".