In my intro to proofs (and discrete mathematics) class, I see a common mistake where students make nonsensical statements because, for lack of a better term, they confuse the types of the mathematical objects they work with. Some examples:

  • In a proof that a function $f: A \to B$ is onto, a student will say "Let $x \in f$" instead of "Let $x \in B$". Thinking of sets and functions as distinct objects would make a student realize this is not what they meant (we technically define a function as a set, but this is not what students are thinking of)

  • When learning induction, students often define a predicate as being equal to an expression, such as $P(x) := 2^x + 5$, when thinking of expressions and predicates as distinct types would catch this error.

  • In relations, students often say: "The pairs $(1,1), (2,2), (3,3)$ are reflexive" when we define reflexive as a property of a relation, not a property of individual elements.

My questions are:

  1. Is there an established name for this type of error other than "type disagreement", and
  2. How do you steer students from this type of mistake, and teach them to think about the "types" of the objects they work with?
  • 5
    $\begingroup$ I don't know of a name for this, but it's definitely less problematic then what one might call "not even wrong", and is more along the lines of a naive category mistake. $\endgroup$ Jan 2, 2023 at 7:11
  • 3
    $\begingroup$ Frankly, all typing errors clearly indicate that the students were not taught proper logical reasoning. You may be interested in what I wrote about this before (and its linked posts. $\endgroup$
    – user21820
    Jan 2, 2023 at 18:31
  • 1
    $\begingroup$ If you follow the definitorial expansion rule in that linked system, an example would be "Let Q(k) ≡ ¬∃x∈ℤ ( 2^k+5 = 17·x ), for each k∈ℕ.". This is a complete definition of a (fresh) predicate-symbol "Q" (where ℕ,ℤ,+,·,^ are inbuilt or have been defined). You can also see that if you fastidiously follow the rules in that system, you are forced to think about what every object type is, and will never write the kind of nonsense listed in this question. $\endgroup$
    – user21820
    Jan 2, 2023 at 18:45
  • 1
    $\begingroup$ I don't think the error is the same. if you say functions and sets are different the first student will just write "Let $x \in \textrm{the set of }f$" and nothing really changes. $\endgroup$ Jan 2, 2023 at 22:07
  • 2
    $\begingroup$ @Daniel In my first comment I suggest that resolving the type thing won't actually solve the issue. You will say "$f$ isn't a set", the student will correct themselves by saying "oh I meant the set of $f$" but it will still be wrong and what will be learnt isn't "I meant the range of $f$" but rather "Daniel is picky about 'type casts'". $\endgroup$ Jan 3, 2023 at 0:06

6 Answers 6


I personally use terms like "type disagreement" and "type error". This agrees with the notion of types within computer science (https://en.wikipedia.org/wiki/Type_system).

When I taught linear algebra, I would give students a list of problems of the form "given that $\vec{x}, \vec{y}$ are vectors and $a, b,c$ are scalars, identify each of the following formulas as:

  • Representing a vector
  • Representing a scalar
  • Doesn't make sense"

These sorts of problems isolate this specific skill and encourage students to see it as an important skill. This is an unfamiliar type of problem, so you'll need to demonstrate this skill for students in lecture. Keep a list of type errors you see happening to populate these problems.

  • 9
    $\begingroup$ If you have this written up as a handout, I'd love to be able to see/borrow/steal it. $\endgroup$
    – Sue VanHattum
    Jan 2, 2023 at 17:21
  • 3
    $\begingroup$ I believe Lay has questions exactly like this. They're tedious at the time, but they really do help a lot. I have often asked the same thing in multivariable calculus classes...I think such questions are in Gulick's book but I'm less confident about that. I might have just made the questions up myself. $\endgroup$
    – Ian
    Jan 2, 2023 at 18:44
  • 16
    $\begingroup$ trkern.github.io/230homework1.pdf $\endgroup$
    – TomKern
    Jan 2, 2023 at 19:40
  • 11
    $\begingroup$ It is not only about students. I often catch this type of error (I also call it "type mismatch") when proofreading papers, including my own. Learning a decent programming language that has variable types, not just "var" for everything, so you never know for sure whether 12+34 results in 46 or 1234 (an actual bug in one of my javascript programs that took me an hour to catch), helps a lot. I agree that it is a specific skill that may need separate training. $\endgroup$
    – fedja
    Jan 2, 2023 at 19:45
  • $\begingroup$ @TomKern I was reading your assignment pdf and I disagree with c) DNE: cannot multiply vectors. But the scalar product exists! Being pedantic the one on the left should be transposed, but still vector multiplication does exist. $\endgroup$
    – Caridorc
    Jan 12, 2023 at 21:40

For me, I use "type error" or "typing error". I would avoid "type disagreement" because it suggests that you actually have types that disagree. But that's not correct; any expression is only meaningful only when it does not have any type error! If there is a type error, it would be more accurate to say that the expression is meaningless!

As for how to make sure students do not make this mistake, in my experience typing errors clearly indicate that the students were not taught proper logical reasoning. I have written before about what I think needs to be taught for students to actually be capable of logical reasoning, and I also think that trying to find a shortcut will be terrible for most students in the long run. 1% of them will somehow figure out how to do logical reasoning on their own, but 99% of them will never be 100% sure of their own reasoning in the absence of a proper deductive system.

Once you have taught a proper deductive system, all typing errors will completely and permanently vanish. Also see below for some remarks about the teaching process specific to definitions.

I also want to elaborate on some of my comments. I said:

Predicates are not objects and actually cannot be objects in some foundational systems. They are meta-objects. To truly understand what defining a predicate means, you need to have a solid grasp of basic FOL (e.g. using a Fitch-style system such as this one), and you need to know the distinction between ∃elim and definitorial expansion for new predicate/function-symbols. If you follow the definitorial expansion rule in that linked system, an example would be "Let Q(k) ≡ ¬∃x∈ℤ ( 2^k+5 = 17·x ), for each k∈ℕ.". This is a complete definition of a (fresh) predicate-symbol "Q" (where ℕ,ℤ,+,·,^ are inbuilt or have been defined). You can also see that if you fastidiously follow the rules in that system, you are forced to think about what every object type is, and will never write the kind of nonsense listed in this question.

I know from experience that the only way to truly impart understanding is to be 100% precise. You must clearly distinguish between predicates and predicate-symbols. Taking my earlier example, "¬∃x∈ℤ ( 2^[1]+5 = 17·x )" (where the "[1]" is a place-holder for the 1st input parameter) is a predicate, whereas the symbol "Q" in "Let Q(k) ≡ ¬∃x∈ℤ ( 2^k+5 = 17·x ), for each k∈ℕ." is a predicate-symbol. Under "Definitorial expansion" in that linked post you can find the deductive rules supporting definitions, plus a link to an explanation of why we want definitions. This motivation tells us that we want to be able to express predicates without having to write it again and again. To support this, we allow defining new predicate-symbols. Make very clear to students this motivation as well as the fact that "Q(E)" can be substituted for the definition of Q with every "[1]" replaced by "E". This is the true meaning of definitions.

Regarding the first point, make sure you never call predicates or predicate-symbols "objects"; neither of them are objects. And avoid talking about their "type", because that would be a meta-type. For your own reference (don't tell beginning students about it), Russel's paradox concerns the fact that we can define R(x) ≡ x∉x, for each set x, but in ordinary set theories we cannot have an object that captures this predicate R. That is, we cannot have a set S such that ∀x∈set ( x∈S ⇔ R(x) ), otherwise we would get a contradiction.

Regarding the second point, notice that if students truly understand the meaning of definitions (i.e. using symbols to denote a longer expression), then automatically they will not write nonsense such as "If P(k) = 2^k+5" when "P" has been declared to denote a predicate. Technically, this problem should never even occur in the first place, because students ought to be taught to correctly use a deductive system before even using definitions! In my experience, none of my students who learnt my deductive system ever made typing errors...

But if students had been taught in the wrong order, then you can help to get rid of the problem quickly by simply asking them to substitute the "P(k)" for its exact definition to show the 'meaning' of what they wrote. They should get something like "If f(k) = 2^k+5 = 2^k+5", and realize why their original is not sensible.

If you really want to comment on types, as per my explanation above, make sure you do not say "The type of P is ...". But you can say the following:

Whenever you want to reason about a conditional scenario, you would say "If something, then ...". What can that something be? It can be anything with a boolean value (true/false). You cannot say "If elephant, then ...". You can say "If elephants are cute, then ...". You cannot say "If elephants are cute are cute, then ...".

And if we write "Let P(k) ≡ ( f(k) = 2^k+5 ), for each k∈ℕ.", from then on "P" is a predicate-symbol we can use, and "P(E)" is boolean for any expression "E" that is natural. Keep in mind that "P" cannot be used by itself; it is simply ungrammatical (i.e. syntax error).

So if we want to reason about the scenario in which "P(k)" is true, then we would say "If P(k), then ...". We cannot say "If P(k) = 2^k+5, then ...". We also cannot say "If 2^k+5, then ...". They are simply ungrammatical.

  • 4
    $\begingroup$ I have often used "not mathematically grammatical", to avoid scaring off students who feel that they understand less, not more, when the conversation includes the technical meaning of words like "type". $\endgroup$
    – LSpice
    Jan 4, 2023 at 21:50
  • 2
    $\begingroup$ @LSpice: I agree; I use as little technical terms as possible. Regarding talking about types, I do something like this: "2 and 5 are naturals. If k is a natural, then 2^k is also a natural. Then 2^k+5 is also a natural. If f is a function from naturals to naturals, then f(k) is also a natural. What about ( f(k) = 2^k+5 )? This denotes the result of an equality-test between two objects, which is true or false, so this is a boolean." If I use the word "type", I do so in the standard English sense: "What type of object is 2^k+5?". $\endgroup$
    – user21820
    Jan 5, 2023 at 4:50
  • 1
    $\begingroup$ By the way, I find it best to treat booleans as objects too, so that we can uniformly ask "What type of object is ...?" even when the expression denotes an equality-test. This is different from the usual separation of terms and well-formed formulae in formal logic, but I don't see any problem with this more uniform approach for students. (And booleans are on par with 'integers' in most programming languages too.) $\endgroup$
    – user21820
    Jan 5, 2023 at 4:54

I don't think the three examples are instances of the same error.

1. In a proof that a function f:A↦B is onto, a student will say "Let x∈f" instead of "Let x∈B"

Whatever misunderstanding results in this would probably not be cleared up by telling the student that functions are not sets. I think the student will probably add a "typecast" like "Oh, I meant x∈the set of f" which is still just as wrong but now it says it's a set so your complaint is invalid.

I think the actual problem here is there are several sets relating to a particular function (such as its domain, range, codomain, and the set of input/output ordered pairs which is often defined as the function itself) and the student hasn't said which one they're talking about.

2. When learning induction, students often define a predicate as being equal to an expression, such as P(x):=2x+5

The only immediate problem here is that you're assuming P is a predicate. Now, supposing the student actually does use P as a predicate, I would be very curious to know what they thought it meant. If the student writes $P(x)\lor Q(x)$ what do they think that means? It's the same as writing $(2^x + 5) \lor (3x + 1)$ for example. What does that mean? The error depends on what they think it means.

3. In relations, students often say: "The pairs (1,1),(2,2),(3,3) are reflexive" when we define reflexive as a property of a relation, not a property of individual elements.

I don't see why, in the context of relations, a pair shouldn't be defined as reflexive if the two sides are equal. The intention is clear. Your complaint is that it's a non-standard definition in your class. If you are trying to teach strict adherence to definitions, then point that out; otherwise, I see no problem with calling these pairs reflexive as the meaning is quite obvious.


These are examples of metonymy.

"Let x∈f" instead of "Let x∈B"." This is totum pro parte synedoche. And aspect of the function (the range) is being confused with the function itself. Here, it might help to get your students to think of a function as a verb rather than a noun. $f$ refers to what you do to things in $A$, not the things you get after you've done it. This sort of metonymy is very common in language. For instance, "smoke" can mean the process of turning things into a gas, or the gas that results. In math, we can square a number, or say that a number is "square".

"In relations, students often say: "The pairs (1,1),(2,2),(3,3) are reflexive" when we define reflexive as a property of a relation, not a property of individual elements." This is the fallacy of division: a property of the whole is being treated as applying to the parts. This is a common fallacy.

  • 2
    $\begingroup$ The example you gave in the original version of your answer is, in my opinion (and in the opinions of several others), needlessly inflammatory and provocative. The example has been edited out. $\endgroup$
    – Xander Henderson
    Jan 6, 2023 at 15:19

Excellent question. The lingo, as best as I have witnessed it practiced is:

In philosophy, they can be called abstract objects (SEP). In mathematics and mathematical philosophy, they are indeed called mathematical objects. In computer science, they are types which essentially are a differentiated set used in hierarchies of various sorts to avoid the Russellian paradox at a theoretical level.

As a former high school teacher who used to provide universities and colleges students, I'll make the following statements:

  1. The crux of the problem is that there is a difference between syntax and semantics and we do not explicitly teach navigating the dichotomy. Schools overwhelming allow students to process syntax with little grasp of semantics and yet, due to grade inflation and other pressures, consider them educated. To be honest, it's a problem with the system. Students are excellent at regurgitating syntax, but they never quite figure out what it means; I certainly didn't have many insights until I taught math and had to think in depth about it. The real question is what to do about it.

  2. If you really want to help students, and you take responsibility for it, then the best way to do it is to design a preliminary of unit of instruction that explicitly teaches the skills. If you're familiar with Dunning-Kruger's work, which has distinct epistemological overtones with practical pedagogical implications, most students don't even REALIZE they don't know things. What happens in math traditionally, is that mathematics teachers don't realize they have the skill and don't teach it explicitly, and then they promote a series of students who figure it out implicitly who then become teachers never realizing that mastery of mapping semantics onto syntax is an explicit skill. It's a vicious cycle. If you're teaching math, there's a good chance that your intuitions in math are good, and so you also have never explicitly had discussions or lessons about the skill of mapping. You just "get it". That happened to me until I taught in urban education.

What I've said has been said before more pithily. Gauss's quote on teaching is one half (buried in my MathEdSE answer here). Joseph Joubert's witty quote "To teach is to learn twice" is the other.

Here's what you do. You design a diagnostic to specifically test for the sorts of errors in terms of decoding and encoding mathematical syntax and administer it very first day of class. Then, for each category of the mapping this is a function, this is a tuple, this is a real, this is a mapping, this is a relation, ad nauseum, you simply provide a refersher of some sort, and then assign practice. If you do it right, you do it all in natural language. My mid-term and final always had 50 questions in plain English, and my students would wail it wasn't math. And to be fair, they had gone years without anyone actually trying to determine if they could understand the mathematics in depth.

Mathematical comprehension certainly entails a sophistication of syntax, but it is a necessary condition, it is not sufficient. The semantics of math is the backbone of comprehension. Most students can find c given a Pythagorean theorem, but can they have a discussion about why the hypotenuse is equal to the positive root of the sum of the square of the legs? The former is plug and chug, the latter is mathematical discourse and sadly, the string of teachers that furnished you your students probably rushed though content to meet district requirements dealing with large batches of irregularly educated students. In the US, at least, mastery in mathematics at the elementary and secondary levels isn't a thing except for the gifted.

If that's too much work for you, then that is what it is. But if you're contemporary in your pedagogy, you can easily use software to automate the grading and tracking, and could easily make it a regular feature of your instruction. I would give my midterm and final questions in natural language at the start of the semester to be worked on and reflected upon, and students would still struggle with answering the questions. The lengths you go to bend over backwards to teach helps determine whether you shake out as a mathematician just teaching math or are actually a math educator.


Instead of using $f: A \to B$ from the start, it might be more instructive to formally write $\forall x: [x \in A \implies f(x) \in B]$. Then you cannot infer from this that $x \in f$. This, of course, would require some familiarity with basic predicate logic.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.