What would you say is the difference between "fraction" and "rational number"?

(Context: teaching an intro programming course and we have an example class for...these things. The existing materials call it "Fraction", but somehow I feel like RationalNumber or Rational would be better, but I can't articulate why.)

(Further context: I haven't looked up *anything* about this. Taking a "ask the hivemind first, do actual thinking later" approach...)

@ddrake I would use the word "fraction" to denote a symbol consisting of two numerals and a fraction bar, whereas a rational number is the abstract thing that the fraction represents.

@mathematicalsynesthesia I think it'd be premature to say the rational numbers *are* the equivalence classes. At least, I don't think that's how most mathematicians think. (And we don't think of integers as equivalence classes of pairs of naturals either, and we don't think of naturals as finite transitive sets)

@aleph_omega_plus_four @ddrake i am a mathematician and that is how I think about it. Formally speaking that is how the integers and rational numbers are “understood”, if one wants to build the rational numbers via the Peano axioms.

The definition of rational number that I always use is: “a number is rational if it can be expressed as a/b with a an integer, b a positive integer and a and b coprime”. You need the coprime part to prove that square root of 2 is irrational via a simple contradiction, without using infinite descent

@mathematicalsynesthesia

BTW you don't need the coprime part to be part of the definition of rational number, because you can prove if q = a/b then there are a', b' coprime such that q = a'/b'. (Just divide both by HCF, which exists by the fundamental theorem of arithmetic/Euclidean theorem/however you want to prove it)

Then, if you want to prove that sqrt(2) is irrational, you are free to assume a and b are coprime.