We are learning math.
Whether "writing" is called a main verb or not depends on the kind of analysis adopted. There are two kinds: the dependent-auxiliary analysis where the core auxiliary verbs are dependents of the following lexical verb, and the catenative-auxiliary analysis, where the core auxiliaries are verbs taking non-finite complements.
Under the dependent-auxiliary analysis, your example is a simple clause. Core auxiliaries are contrasted with main verbs, so that "are learning" is a syntactic unit in which "learning" is called the main (i.e. head) verb head and the core auxiliary "are" is a dependent. The core auxiliaries are thus never heads in the dependent-auxiliary analysis.
By contrast, under the catenative-auxiliary analysis, "learning math" is a non-finite complement of "are". The tree structure therefore has "learning" as a lexical verb and "are" as an auxiliary. On this view, there is no contrast between auxiliary verbs and main verbs. "Are" is just as much a main verb as "learning": both are heads of their respective clauses.
Modern grammar tends to favour the catenative-auxiliary analysis.