How to Test a Definition With a Counterexample

Title card for testing both directions of a definition with counterexamples.

Try to find a case your definition admits by mistake, then a case it leaves out by mistake. Each one tests a different direction. Once you have a counterexample, change the part of the definition that let the error through and test the revised rule again.

Test a definition in both directions

Imagine a course accepts work submitted on time in PDF or DOCX format. Your first draft says, “A submission is eligible if and only if it is a PDF.” Test what that would do.

Test case Fits the draft definition? Eligible under the stated policy?
Late PDF Yes No
On-time DOCX No Yes
On-time PDF Yes Yes

The late PDF shows that the draft is too broad. Being a PDF is insufficient for eligibility because the file also has to arrive on time. The on-time DOCX shows that the draft is too narrow. PDF format is unnecessary because the policy also accepts an on-time DOCX. The on-time PDF is useful as a check that any change preserves a case that already works.

Repair the rule and run the cases again

Revise the rule to say that a submission is eligible if and only if it arrives on time and is a PDF or DOCX. The deadline rules out the late file. The broader format condition admits the on-time DOCX. The on-time PDF still qualifies.

The two directions have different jobs. Given a file that matches your definition, check whether it belongs in the category. Given a file that belongs, check whether it matches the definition. OpenStax’s guide to logical statements explains how to test those if-then claims with counterexamples.

Use a case that isolates the rule

A late image file is rejected by both the draft and the policy. A counterexample needs a case where they disagree. Start with the on-time PDF, which both accept. Make it late to get a PDF the draft wrongly admits. Keep it on time and change the format to DOCX to get a file the draft wrongly leaves out.

Write one counterexample of your own

Choose a definition from class and test one of its conditions. Write a case that exposes a problem, then say whether the definition admitted the case or left it out.

🚀 Join our affiliate program and earn 25% referral commission! 🚀 Earn 25% referral commission!