Summary: Proof and proving are important components of school mathematics and have multiple functions in mathematical practice. Among these functions of proof, this paper focuses on the discovery function that refers to invention of a new statement or conjecture by reflecting on or utilizing a constructed proof. Based on two cases in which eighth and ninth graders engaged in proofs and refutations, we demonstrate that facing a counterexample of a primitive statement can become a starting point of studentsâ€™ activity for discovery, and that a proof of the primitive statement can function as a useful tool for inventing a new conjecture that holds for the counterexample. An implication for developing tasks by which students can experience this discovery function is mentioned.