an introduction to mathematical reasoningwebéducation.com/wp-content/uploads/2018/08/an... · an...

266

Upload: others

Post on 21-May-2020

12 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions
Page 2: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

AnIntroductionto

MathematicalReasoning

Page 3: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

AnIntroductionto

MathematicalReasoning

numbers,setsandfunctions

PeterJ.EcclesDepartmentofMathematicsUniversityofManchester

Page 4: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

CAMBRIDGEUNIVERSITYPRESSCambridge,NewYork,Melbourne,Madrid,CapeTown,Singapore,SãoPaulo,Delhi,MexicoCity

CambridgeUniversityPressTheEdinburghBuilding,Cambridge,CB28RU,UK

PublishedintheUnitedStatesofAmericabyCambridgeUniversityPress,NewYork

www.cambridge.orgInformationonthistitle:www.cambridge.org/9780521597180

©CambridgeUniversityPress2007

Thispublicationisincopyright.Subjecttostatutoryexceptionandtotheprovisionsofrelevantcollectivelicensingagreements,noreproductionofanypartmaytakeplacewithoutthewrittenpermissionofCambridgeUniversityPress.

Firstpublished199714thprinting2012

PrintedandboundbyCPIGroup(UK)Ltd,CroydonCR04YY

AcataloguerecordofthispublicationisavailablefromtheBritishLibrary

LibraryofCongressCataloginginPublicationdataEccles,PeterJ.,1945-

Anintroductiontomathematicalreasoning:lecturesonnumbers,sets,andfunctions/PeterJ.Eccles.p.cm.

Includesbibliographicalreferencesandindex.ISBN0521592690hardback–ISBN0521597188paperback

1.Prooftheory.I.Title.QA9.54.E231997

511.3–dc2197-11977CIP

ISBN978-0-521-59269-7hardbackISBN978-0-521-59718-0paperback

CambridgeUniversityPresshasnoresponsibilityforthepersistenceoraccuracyofURLsforexternalorthird-partyinternetwebsitesreferredtointhispublication,anddoesnotguaranteethatanycontentonsuchwebsitesis,orwillremain,accurateorappropriate.

Informationregardingprices,traveltimetablesandotherfactualinformationgiveninthisworkarecorrectatthetimeoffirstprintingbutCambridgeUniverstiyPressdoesnotguaranteetheaccuracyofsuchinformationthereafter.

Page 5: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ItoowillsomethingmakeAndjoyinthemaking;Altho’tomorrowitseemLiketheemptywordsofadreamRememberedonwaking.

RobertBridges,Shorterpoems.

Page 6: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Inlovingmemoryof

ElizabethBaronandJohnBaron

(AuntieLizzieandUncleJack)

andthoseWoodsideBanksummers

Page 7: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Contents

PrefacePartI:Mathematicalstatementsandproofs

1Thelanguageofmathematics2Implications3Proofs4Proofbycontradiction5TheinductionprincipleProblemsI

PartII:Setsandfunctions6Thelanguageofsettheory7Quantifiers8Functions9Injections,surjectionsandbijectionsProblemsII

PartIII:Numbersandcounting10Counting11Propertiesoffinitesets12Countingfunctionsandsubsets13Numbersystems14CountinginfinitesetsProblemsIII

PartIV:Arithmetic15Thedivisiontheorem16TheEuclideanalgorithm17ConsequencesoftheEuclideanalgorithm18LineardiophantineequationsProblemsIV

PartV:Modulararithmetic19Congruenceofintegers20Linearcongruences21Congruenceclassesandthearithmeticofremainders22PartitionsandequivalencerelationsProblemsV

PartVI:Primenumbers23Thesequenceofprimenumbers24CongruencemoduloaprimeProblemsVISolutionstoexercisesBibliography

Page 8: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ListofsymbolsIndex

Page 9: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Preface

ThisbookisbasedonlecturesgivenattheVictoriaUniversityof Manchester to first year Honours Mathematics studentsincludingthosetakingjointorcombineddegrees.Incommonwith most other British mathematics departments, theManchestermathematicsdepartmenthas thoroughlyreviewedits curriculum in recent years in the attempt to meet moreadequately the needs of students who have experienced theeffectsofthegreatchangesintheteachingofmathematicsinschools,aswellastheincreasednumbersof‘maturestudents’andstudentsfromnon-standardbackgrounds.

Itwasclear tousat theUniversityofManchester thatweshould completely rethink and broaden our curriculum,includingmaterialwhichwehadpreviouslyexpectedstudentstoknowonentrytothecoursebutalsoincludingintroductorymaterial on combinatorics, computer skills and numericalmathematics, as well as encouraging the development ofproblemsolvingskills.

A key ingredient of this new University of Manchestercurriculum is a module on Mathematical Reasoning whosepurpose is to introduce thebasic ideasofmathematicalproofandtodevelopskillsinwritingmathematics,helpingtobridgethegapbetweenschoolanduniversitymathematics.Thisbook

Page 10: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

isbasedonthiscoursemodule.Theabilitytowritecorrectandclear mathematics is a skill which has to be acquired byobserving experienced practitioners at work in lectures andtutorials,bylearningtoappreciatethedetailsofmathematicalexpositioninbooks,andbyagreatdealofpractice.Itisaskillreadily transferable tomanyotherareasand its acquisition islikelytobeoneofthemainbenefitsofamathematicsdegreecourseformoststudentswhomaywellmakenofurtheruseofmostofthespecificmathematicalcontentofthecourse!

There is no absolutelycorrectway ofwriting out a givenproof. For example, it is necessary to take into accountwhothe intended reader is. But, whoever the reader is, the proofshouldbeexpressedasclearlyaspossibleandtoachievethisthewriterneedstounderstandthelogicoftheproof.Writingaproofisnotseparatefromdiscoveringtheproofinthewaythatwritingupascientificexperimentisseparatefromcarryingouttheexperimentorperformingapieceofmusicisseparatefromcomposing it.Attempts towriteout aproof are an importantpartofthediscoveryprocess.AlisonLeonardhaswritteninatotallydifferentcontext:

Not only are human ideas conveyed by language, they areactuallyformedbythelanguageavailabletous.†

Soitisinmathematics,wherewefindaparalleldevelopmentofmathematicalideasandmathematicallanguage.

Thisisreflectedinthisbook.Theemphasisis‘onhelpingthe reader to understand and construct proofs and to learn to

Page 11: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

write clear and concise mathematics. This can only beachievedbyexploringsomeparticularmathematicaltopicsandthecontextschosenareset theory,combinatoricsandnumbertheory.Thesetopics

•providegoodexamplestoillustratearangeofbasicmethodsofproof,inparticularproofbyinductionandproofbycontradiction,•includesomefundamentalideaswhicharepartofthestandardtoolkitofanymathematician,suchasfunctionsandinverses,thebinomialtheorem,theEuclideanalgorithm,thepigeonholeprinciple,thefundamentaltheoremofarithmetic,andcongruence,•buildonideasmetinearlyschoolingillustratingwaysinwhichfamiliarideascanbeformulatedrigorously,forexamplecountingorthegreatestcommondivisor,•includesomeofthealltimegreatclassicproofs,forexampletheEuclideanproofsoftheirrationalityofroot2andtheinfinityofprimes,butalsoideasfromthroughoutmathematicalhistorysothatthereisanopportunitytopresentmathematicsasacontinuallydevelopingsubject.

Roughlyspeaking,thefirstthreepartsofthebookareaboutthebasiclanguageofmathematicsandthefinalthreepartsareabout number theory, illustratinghow the ideasof the earlierpartsareapplied tosomesignificantmathematics.Thereadermayfindthatthelaterpartscontainsomemorestraightforwardmaterial than the earlyparts simplybecause there ismaterial

Page 12: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

onproblemsolvingtechniqueswhichcanthenbepractisedonspecificnumericalexamples.Thetopicsselectedfortheselaterparts, theEuclidean algorithm,modular arithmetic andprimenumbers, include material from the whole of mathematicalhistoryfromclassicalGreektimestothepresentday.

Iwould encourage the reader inworking through the firstthreepartsnottoexpecttounderstandeverythingatfirst.PartIintroduces various forms ofmathematical statements and thestandardmethods of proof. Proof by contradiction and proofbyinductionareexplainedindetailandthesemethodsarethenusedagainandagainthroughouttheremainderofthebook:somanygreattheoremsareprovedbycontradictionandsomeareincludedinthisbook.PartIIcoversthebasicmaterialonsetsand functions which provides the language in which muchmathematics is best expressed. It includes a leisurelydiscussionofuniversalandexistentialstatementswhicharesoimportant in university mathematics, particularly analysis oradvanced calculus.This is not a book onmathematical logicbut inevitablysome ideas fromthebeginningsof thatsubjectareincludedinthesefirsttwoparts.ThereadermayfindsomeofthematerialoncountinginPartIIItobemoredifficultthanthe rest of thebook. It is best not to becomediscouragedbythisbutifnecessarytomoveontoPartIVwhichisprobablythe easiest part but also includes some very striking andattractive results, returning to Part III whenmore familiaritywiththelanguageofsetsandfunctionshasbeenacquired.Thismaterial on counting provides good practice in using the

Page 13: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

languageof sets and functions in avery familiar context andalso illustrates how a familiar process may be mademathematicallypreciseandhowthis thenenables theprocesstobeextendedtoalessfamiliarcontext,countinginfinitesets.

Thebookisdividedintotwentyfourchaptersandgrewoutofaseriesoftwentyfourlectures.However,thereisfarmorematerialinmostchaptersthancouldreasonablybecoveredina single lecture. A lecture course based on this book wouldneedtobeselectivecoveringeitherasubsetofthechaptersor,more likely, a subset of the material in most or all of thechaptersastheauthor’slecturecourseshavedone.

Thereisagreatrangeofability,experienceandknowledgeamongst students embarking on university mathematicscourses and a real attempt has been made here to providematerialmeeting theneedsofweakeror ill-preparedstudentswhilst at the same time providing something which willinterestandchallengethemostablestudents.Thisisachievedby includingmaterial and, in particular, problems of varyingdifficulty; many of the over 250 problems are routine andcomputational but others are quite demanding. In the laterstagesofthebooksomesignificantdevelopmentsoftheideasinthebookareapproachedintheproblems.

Eachchapterconcludeswithanumberofexercisesmanyofwhich are very closely related tomaterial in the chapter andintended to be relatively .straightforward and routine.Occasionallysomethingalittleharderis included.Thereaderis encouraged towork through all of these and full solutions

Page 14: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

forthemaregivenatthebackofthebook.Therearealsosixsets of problems, some similar to the exercises in order toconsolidate the techniques involved but others more wideranging and challenging. I hope that every reader will findsomeoftheexercisesandproblemstobefun.

Mathematicians are not good at encouraging students toreadaroundthesubjectbuttheintentionhereisthatmaterialinthis book not covered in a lecture course will provideadditional reading particularly for stronger students and,through the references given, lead to wider study in someareas. I have tried to write the book which I would havewelcomedformyownstudents.

Finally, Iamonly tooconscious thatanyonewhowritesabook about how to write mathematics well lays themselvesopen to ridiculewhen theproofs in thebookare found tobeconfusedor inadequate. If thereaderdoesfindfailings in theproofsinthisbookthenIhopethatacquiringtheabilitytoseethese failingswillbeseenasauseful step indeveloping thatself-criticismwhich is necessary for thewriting of clear andbeautifulmathematics.

Acknowledgements. The author is indebted to very many people whohaveknowingly or unknowingly influenced thematerial in this bookorwho have provided specific advice. I would in particular like toacknowledge the contributions of the following: Pyotr Akhmet’ev,MichaelBarratt,FrancisCoghlan,MarkEccles,MichaelEccles,PamelaEccles,DouglasGregory,BrianHartley,MartinHuxley,JohnKing-Hele,E. Makin, Mick McCrudden, Jeff Paris, Mike Prest, Nigel Ray, JohnReade, András , GrantWalker, GeorgeWilmers, J.R.Winn and Reg

Page 15: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Wood.InadditionIwishtothankthestaffofCambridgeUniversityPressfortheircarefuleditorialworkandananonymousrefereewhosereportonapreliminaryversionwasextremelyhelpful.

PeterJ.Eccles,Manchester,June1997.†SeeAlisonLeonard,Tellingourstories:wrestlingwithafreshlanguageforthespiritualjourney,Dorton,LongmanandTodd,1995.

Page 16: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartIMathematicalstatementsandproofs

Page 17: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

1Thelanguageofmathematics

Puremathematicsisconcernedwiththeexplorationofmathematicalconceptsarisinginitiallyfromthestudyof space andnumber. In order to capture and communicatemathematical ideaswemustmakestatements about mathematical objects and much mathematical activity can be described as theformulationofmathematicalstatementsandthenthedeterminationofwhetherornotsuchstatementsaretrueorfalse.Itisimportanttobeclearaboutwhatconstitutesitmathematicalstatementandthisisconsideredinthisfirstchapter.Webeginwithsimplestatementsandthenexaminewaysofbuildingupmorecomplicatedstatements.

1.1MathematicalstatementsItisquitedifficulttogiveapreciseformulationofwhatamathematicalstatementisandthiswillnotbeattempted in this book. The aim here is to enable the reader to recognize simple mathematicalstatements. First of all let us consider the idea of a proposition. A good working criterion is that aproposition is a sentencewhich is either true or false (butnotboth). For themomentwe are not soconcernedaboutwhetherornotpropositionsareinfacttrue.Considerthefollowinglist.

(i)1+1=2.(ii)π=3.(iii)12maybewrittenasthesumoftwoprimenumbers.(iv)Everyevenintegergreaterthan2maybewrittenasthesumoftwoprimenumbers.(v)Thesquareofeveryevenintegeriseven.(vi)nisaprimenumber.(vii)n2–2n>0.(viii)m<n.(ix)12–11.(x)πisaspecialnumber.

Ofthesethefirstfivearepropositions.Thissaysnothingaboutwhetherornottheyaretrue.Infact(i) is trueand (ii) is false.Proposition (iii) is truesince12=7+5and5and7areprimenumbers.†Propositions (iv) and (v) are general statements which cannot be proved by this sort of simplearithmetic. In fact it is easy to give a general proof of (v) (seeExercise3.3) showing that it is true.However,atthetimeofwriting,itisunknownwhether(iv)istrueorfalse;thisstatementiscalledtheGoldbach conjecture after Christian Goldbach who suggested that it might be true in a letter toLeonhardEulerwrittenin1742.

On the other hand the others on the above list are not propositions. The next two, (vi) and (vii),

Page 18: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

becomepropositionsonceanumericalvalueisassignedton.Forexampleifn=2then(vi)istrueand(vii) is false,whereas ifn = 3 then they are both true.The next, (viii), becomes a propositionwhenvaluesareassignedtobothmandn,forexampleitistrueform=2,n=3andfalseform=3,n=2.Sentencesof this type are calledpredicates.The symbolswhichneed to be givenvalues in order toobtainapropositionarecalledfreevariables.

Thewordstatementwillbeusedtodenoteeitherapropositionorapredicate.Sointheabovelistthefirst eight items are statements.Wewill use a single capital letterP orQ to indicate a statement, orsometimesanexpressionlikeP(m,n)toindicateapredicate,withthefreevariableslistedinbrackets.

Thelasttwoentriesintheabovelistarenotstatements:(ix)isnotevenasentenceand(x)doesn’tmean anything until we know what ‘special’ means. Very often mathematicians do give technicalmeaningstoeverydaywords(asin‘prime’numberusedin(iii)and(iv)aboveand‘even’numberusedin(v))andsoif‘special’hadbeengivensuchameaningasapossiblepropertyofanumberthen(x)wouldbeapropositionandsoastatement.Ofcoursethefactthat(i)to(viii)arestatementsreliesonanumber of assumptions about the meanings of the symbols and words which have been taken forgranted.

Inparticularitisquitecomplicatedtogiveaprecisedefinitionofthenumberπinstatement(ii).Thenumberπwasoriginallydefinedgeometricallyastheratiobetweenthelengthofthecircumferenceofacircle and the length of the diameter of the circle. In order for this definition to be justified it isnecessarytodefinethelengthofthecircumference,acurvedline,andhavingdonethattoprovethattheratio is independent of the size of the circle. Thiswas achieved by theGreeks in classical times.Aregularhexagoninscribedinacircleofunitdiameterhascircumference3andsoitisclearthatπ>3.†Archimedes showed by geometrical means in his book On the measurement of the circle that

andalsoprovidedabeautifulproofoftheformulaπr2fortheareaofacircleofradiusr,Themoderndefinitionofπisusuallyastwicetheleastpositivenumberforwhichthecosinefunctionvanishes,andthedetailsmaybefoundinanytextonanalysisoradvancedcalculus.‡

1.2LogicalconnectivesInmathematicsweareoftenfacedwithdecidingwhethersomegivenpropositionistrueorwhetheritisfalse.Manystatementsare reallyquite’ complicatedandarebuiltupoutof simpler statementsusingvarious‘logicalconnectives’.Forthemomentwerestrictourselvestothesimplestofthese:‘or’,‘and’and‘not’.Thetruthorfalsehoodofacomplicatedstatementisdeterminedbythetruthorfalsehoodofitscomponentstatements.Itisimportanttobeclearhowthisisdone.

Theconnective‘or’Supposethatwesay

Forintegersaandb,ab=0ifa=0orb=0.

Thestatement‘a=0orb=0’ is true ifa=0 (regardlessof thevalueofb)and isalso true ifb=0(regardlessofthevalueofa).Noticethatthestatementistrueifbotha=0andb=0aretrue.Thisiscalled the ‘inclusive’ use of ‘or’. Its meaning is best made precise by means of a truth table. Anystatementmaybeeithertrueorfalse:wesaythat‘true’and‘false’arethetwopossibletruthvaluesforthestatement.SogiventwostatementsPandQeachhastwopossibletruthvaluesgivingfourpossiblecombinations in all. The truth table for ‘or’ which follows specifies the truth value for ‘P or Q’

Page 19: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

corresponding toeachpossiblecombinationof truthvalues forPandforQ,one lineforeach. In thetableTindicates‘true’andFindicates‘false’.

Table1.2.1

Inthistable,thetruthvaluesinthesecondlineforexampleindicatethatifPistrueandQisfalsethenthestatement‘PorQ’istrue.

‘PorQ’iscalledthedisjunctionofthetwostatementsPandQ.Ineverydayspeech‘or’ isoftenusedintheexclusivesenseasinthefirstsentenceof thissection:

‘wearefacedwithdecidingwhethersomegivenpropositionistrueorwhetheritisfalse’,inwhichitisimplicitlyunderstood(andemphasizedbytheusesoftheword‘whether’) that it isnotpossibleforapropositiontobebothtrueandfalse.

Togiveanothereverydayexampleofthe‘exclusiveor’,whenwesay‘everyonewilltraveltherebybusorbytrain’thiswouldnormallybetakentomeanthateveryoneusesoneorotherformoftransportbut not both. Ifwewanted to allow for someone using bothwewould probably say ‘everyonewilltraveltherebybusorbytrainorbyboth’.Inpracticetheprecisemeaningof‘or’ismadeclearbythecontextor there issomeambiguity (butnotboth!).Themeaningofmathematicalstatementsmustbepreciseandsoweavoidtheseambiguitiesbyalwaysusing‘or’intheinclusivewaydeterminedbytheabovetruthtable.

Theconnective‘or’issometimeshiddeninothernotation.Forexamplewhenwewrite‘a b’whereaandbarerealnumbersthisisashorthandfor‘a<bora=b’.Thusboththestatements‘1 2’and‘22’aretrue.Similarly‘a=±b’isashorthandfor‘a=bora=–b’.Thereissomepossibilityofconfusionherefor

thetruestatementthat1=±1doesnotmeanthat1and±1areinterchangeable:‘ifx2=1thenx=±1’isatruestatementwhereas‘ifx2=1thenx=1’isafalsestatement!Itisnecessarytobeclearthata=±bisnotassertingthatasingleequalityistruebutisassertingthatone(orboth)oftwoequalitiesa=b,a≠bistrue.Thefollowingtruthtableillustratingthismayhelp.

Observe how the truth values in the final column may be read off from the truth values in theprevioustwocolumnsusingthetruthtablefor‘or’(Table1.2.1).

Infactthestatementa=±bcanbewrittenasasingleequation,namely|a|=|b|where|a|denotestheabsolutevalueofa(i.e.|a|=aifa 0and|a|=–aifa 0).

Theconnective‘and’Weusethiswhenwewishtoassertthattwothingsarebothtrue.Againthiswordcanbehiddeninotherwordsornotation.Thusifweassertthat

Page 20: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

πliesbetween3and4

orinsymbols

3<π<4

thenthismeansthat

π>3andπ<4

whichiscalledtheconjunctionofthetwostatements‘π>3’and‘π<4’.Youshouldconstructatruthtablefor‘and’.

Theconnective‘not’Finallywehavetheideaofthenegationofastatement.Thenegationofastatementis truewhentheoriginal statement is falseand it is falsewhen theoriginal statement is true.This isdescribedby thefollowingtruthtable.

Table1.2.2

Thenegationofastatementisusuallyobtainedbyincludingtheword‘not’inthestatementbutdoesrequirealittlecaresincethisisoftenusedverylooselyineverydayspeach.

Example1.2.3Considerthefollowingstatementaboutapolynomialf(x)withrealcoefficients,suchasx2+3orx3–x2–x.

(i)Forrealnumbersa,iff(a)=0thenaispositive(i.e.a>0).Whatisthenegationofthisstatement?Thefollowingpossibilitiesspringtomindfromtheeverydayuseof‘negation’.(ii)Forrealnumbersa,iff(a)=0thenaisnegative.(iii)Forrealnumbersa,iff(a)=0thenaisnon-positive.(iv)Forrealnumbersa,iff(a)≠0thenaispositive.(v)Forrealnumbersa,ifaispositivethenf(a)=0.(vi)Forrealnumbersa,ifaispositivethenf(a)≠0.(vii)Forrealnumbersa,ifaisnon-positivethenf(a)≠0.(viii)Forsomenon-positiverealnumbera,f(a)=0.Ifyouthinkaboutityouwillseethatnonebutthelastisthenegation.Forexample,iff(x)=x3–x=x(x+1)(x–1)thenstatement(i)iscertainlyfalsesince,fortherealnumber0,f(0)=0but0isnotpositive.Ontheotherhandsoarealltheotherstatementsapartfrom(viii)whichistruesince0isanon-positivenumbersuchthatf(0)=0.Wewillconsiderthenegationofstatementsofthisformmoreformallyinthenextchapter.

Exercises

Page 21: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

1.1Constructatruthtablefor‘and’asfollows.

1.2Constructtruthtablesforthestatements

(i)not(PandQ);(ii)(notP)or(notQ);(iii)Pand(notQ);(iv)(notP)orQ.

1.3Usingthetruthtablefor‘or’completethefollowingtruthtableforthestatementa b.

1.4Considerthefollowingstatement.

(i)Allgirlsaregoodatmathematics.Whichofthefollowingstatementsisthenegationoftheabovestatement?(ii)Allgirlsarebadatmathematics.(iii)Allgirlsarenotgoodatmathematics.(iv)Somegirlisbadatmathematics.(v)Somegirlisnotgoodatmathematics.(vi)Allchildrenwhoaregoodatmathematicsaregirls.(vii)Allchildrenwhoarenotgoodatmathematicsareboys.Canyoufindanystatementsinthislistwhichhavethesamemeaningastheoriginalstatement(i)?

1.5Provethat|a|2=a2foreveryrealnumbera.

†Apositiveintegerisaprimenumberifitisgreaterthan1andisdivisibleonlyby1anditself.Thusthefirstfewprimenumbersare2,3,5,7,11,….ThisdefinitionisdiscussedinChapter23.

†Some fundamentalistChristianshave claimed that 1Kingsvii 23, inwhich a roundobject of diameter 10 cubits is stated tohave acircumferenceof30cubits,‘proves’thatπ=3butmathematicaltruthcanneverbeamattersimplyoffaith(norcanreligioustrutheitherintheauthor’sexperience)andinanycasethereisnosuggestioninthebiblicalpassagethatthemeasurementswerehighlyaccurate!‡SeeforexampleR.Haggerty,Fundamentalsofmathematicalanalysis,Addison-Wesley,Secondedition1993.

Page 22: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

2Implications

In the first chapterweweremainly interested in themeaning ofmathematical statements.However,mathematicsisprimarilyconcernedwithestablishingthetruthofstatements.Thisisachievedbygivingaproofofthestatement,Thekeyideainmostproofsisthatofimplicationandthisideaisdiscussedinthischapter.

2.1Implications

A proof is essentially a sequence of statements starting from statements we know† to be true andfinishingwiththestatementtobeproved.Eachstatementistruebecausetheearlierstatementsaretrue.The justification for such steps usuallymakes use of the idea of ‘implication’; an implication is theassertionthatifoneparticularstatementistruethenanotherparticularstatementistrue.

Thesymbolusuallyusedtodenoteimplicationinpuremathematics‡is althoughthereareavarietyof forms of words which convey the same meaning. For the moment we can think of ‘P Q’ asassertingthat ifstatementP is truethenSQ isstatementQ,which isoftenreadas ‘P impliesQ’.Themeaningwillbemadeprecisebymeansofatruthtable.Beforedoingthisitisnecessarytoclarifywhatthismeaningshouldbeandtodothisweconsideranexampleconcerninganintegern.

SupposethatP(n)isthestatement‘n>3’andQ(n) is thestatement’n>0’,wheren isaninteger.ThenthestatementP(n) Q(n),i.e.

n>3 n>0,

is theassertionthat ifan integern isgreater than3 thenit isgreater than0,whichiscertainlya truestatement.Noticethatthisstatementistrueforeachintegerneventhoughthestatement‘n>3’istrueforsomevaluesofnandfalseforothersasisthestatement‘n>0’.Letusconsiderthepossibilities.

Thistabledemonstratesthatifitistruethatn>3thenitisindeedtruethatn>0.Butifn 3(i.e.P(n)isfalse)thenwemayhaven>0(soQ(n)istrue)forexamplewhenn=2,andwemayhaven 0(so

Page 23: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Q(n)isfalse)forexamplewhenn=–2.However,thereisnovalueofnforwhichP(n)istrueandQ(n)isfalse;andthisispreciselywhatwemeanwhenwesaythatifP(n)istruethenQ(n)istrue.Wecansummarizethisinthefollowingtruthtable.

Table2.1.1

InanimplicationP Q,thestatementPiscalledthehypothesisorantecedentandthestatementQiscalledtheconclusionorconsequent.

Hereisanotherillustration.Theassertion

n=1 (n–1)(n–2)=0(forintegersn)

iscertainlytrue,forifwesubstituten=1into(n–1)(n–2)weobtain(1–1)(1–2)=0×(–1)=0.IfwewriteP(n)forthestatement‘n=1’andQ(n)forthestatement‘(n–1)(n–2)=0’wecanconsiderthetruthorfalsehoodofthesetwostatementsfordifferentvaluesofnasfollows.

Thusn=1illustratesline1ofTable2.1.1,n=2illustratesline3,andn≠1,2illustratesline4.AgainthereisnovalueofnforwhichP(n)istrueandQ(n)isfalse.

It is important to realize that in mathematics we use the idea of implication in this particularlyprecise way (as defined by the truth table) extending everyday usage. Consider the followingstatements.

(i)(π<4) (1+1=2)(ii)(π<4) (1+1=3)(iii)(π<3) (1+1=2)(iv)(π<3) (1+1=3)

Fromthetruthtableitiseasilyseenthatthesecondofthesestatementsisfalsewhereastheotherthreeare true(since3<π<4).However, thesestatementsall seema littleoddfromaneverydaypointofviewsincethesizeofthenumberπreallyhasnothingtodowiththeeffectofaddingthenumber1toitself.IneverydayspeechwhenwesaythatPimpliesQ thissuggests that thestatementPcauses thestatementQtobetrue.Theideaofcausationisdifficulttomakepreciseandsoitiseliminatedfromthemathematical use of the word ‘implies’. This difference from everyday usage is clarified inmathematicallogicwhereastatementoftheformP Qisreferredtoasaconditionalstatementratherthananimplication.Inthisbookwehaveadoptedthelanguageusedbymostmathematicians.

Anotherwayofmotivatingouruseof implication is toconsider itsnegative, the statement thatPdoesnotimplyQ,usuallywrittenP Q.ThiswillbetruepreciselywhenP Qisfalseandfromthetruth table this is when P is true and Q is false. If you think about it these are precisely thecircumstanceswhenwewouldwish to say thatP does not implyQ.Notice that thismeans that the

Page 24: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

statements‘P Q’and‘Pand(notQ)’arelogicallyequivalent,i.e.havethesamemeaning(cf.thetruthtablefor‘Pand(notQ)’inthesolutiontoExercise1.2).

Usingthefactthat‘(notP)orQ’isthenegationof‘Pand(notQ)’wecansaythisinadifferentway:thestatements‘P Q’and‘(notP)orQ’arelogicallyequivalent(againseeExercise1.2).Thislogicalequivalencedoesariseineverydayspeech.Forexample,whenwesay‘Readthelecturenotesoryouwon’tunderstandthelecture’thishasthesamemeaningas‘Ifyoudon’treadthelecturenotesthenyouwon’tunderstand the lecture.’HereP is thestatement ‘youdon’t read the lecturenotes’andQ is thestatement‘youwon’tunderstandthelecture’.

UniversalimplicationsStrictlyspeakingthestatements‘n>3 n>0’and‘n=1 (n–1)(n–2)=0’arepredicatesandgivedifferentpropositionsforeachvalueofn.However,weoftenusestatementsofthisforminthewaywehavebeendoingtomeanthatthepredicateleadstoatruepropositionwhatevervalueisassignedtothefreevariablen–thisiscalledauniversalstatement.Thepossiblerangeofvaluesforthefreevariablesmaybeexplained in the textbyaphrase like‘for integersn’or‘wheren isan integer’,or itmaybeintendedtobeclearfromthecontext;itisusuallygoodpracticetomaketherangeofvaluesexplicit.

Astatementofthistypeisfalseifitisnotauniversalstatement,inotherwordsthereisatleastonepossiblevalueforthevariableforwhichitfails.Considerthestatement forrealnumbersx.Wecanconstructatruthtableasfollows.

Table2.1.2

Heretheentriesinthelastcolumnaredeterminedbytheentriesintheprevioustwocolumnsusingthetruthtableforimplication,Table2.1.1.Weseefromthisthattherearevaluesofxforwhichx>0and

,forexample ,sothatx>0 x 1isnotuniversallytrue.Thismeansthat,forrealnumbersx,x>0doesnotimplythatx 1,whichmaybewritten

Thisisanexistencestatement:itclaimsthatthereisavalueofxforwhichthehypothesisistrueandtheconclusionfalse.

TherewillbeafullerdiscussionofuniversalstatementsandexistencestatementsinChapter7.Noticethatintheseexampleswehaveadoptedthecommonpracticeofusinglettersinthemiddleof

thealphabet(suchasn)todenoteintegersandlettersattheendofthealphabet(suchasx)todenoterealnumbers.

IfwenowreconsiderExample1.2.3weseethatstatement(i)thereistheuniversalimplication

f(a)=0 a>0(forrealnumbersa).

Thenegationofthisistheassertionthattheimplicationisfalseforsomerealnumbera,inotherwordsf(a)=0anda 0forsomerealnumbera.Thisispreciselythestatement(viii)whichweidentifiedasthenegation.

Page 25: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ReadingimplicationsTherearemanydifferentwaysofreadingthestatementP Q,whichmayalsobewrittenQ⇐P,andsomeofthemostcommonarelistedbelow.

(i)IfPthenQ.(ii)PimpliesQ.(iii)QifP.(iv)PonlyifQ.(v)QwheneverP.(vi)PissufficientforQ.(vii)QisnecessaryforP.

TakecarewiththethirdandfourthoftheseandalsowiththelasttwoforitisimportanttoappreciatethedifferencebetweenP QandQ P.Itisquitepossibleforoneofthesetoholdwithouttheother.Forexample,letusreturntotheexamplesalreadyconsidered.Wehaveseenthat,forintegersn,n>3n > 0; butn > 0 n > 3 since, for example,whenn = 1, the hypothesisn > 0 is truewhereas theconclusionn>3isfalse.Similarly,n=1 (n–1)(n–2)=0but(n–1)(n–2)=0 n=1since,whenn=2,(n–1)(n–2)=0butn≠1.

ThestatementQ PiscalledtheconverseofthestatementP Q.Asanillustration,inExample1.2.3,statement(v)istheconverseof(i)(andinaddition(iv)and(vi)areconversetoeachother).

WhenbothimplicationsdoholdwewriteP Q.Thuswedefine

P Qmeans(P Q)and(Q P).

FromthetruthtablesweseethatthismeansthateitherPandQarebothtrueortheyarebothfalse(seeExercise2.3).

WereadP Qasfollows.

(i)PisequivalenttoQ.(ii)PisnecessaryandsufficientforQ.(iii)PifandonlyifQ(sometimeswrittenPiffQ).(iv)PpreciselywhenQ.

2.2ArithmeticThebasicprinciplesofmathematicalreasoningapplythroughoutmathematicsbutinthisbookwearegoingtoexplorethemmainlyinthecontextofnumbertheoryorarithmeticsincethebasicideashereare familiar fromearly schooldays.For themoment it is assumed that the reader is familiarwith theintegers, both positive and negative, i.e, the numbers … , –2, –1, 0, 1, 2, 3, … , and their basicarithmeticproperties(underadditionandmultiplication)andorderproperties.Wewillalsomakeuseofthe rational numbers (or fractions) and the real numbers (or infinite decimals) and these will bediscussedinmoredetailinChapter13.

Aswedomathematicsnewvocabularymaybeintroducedbymeansofadefinition.Quiteoftenthisgives a precisemeaning to an everydayword. Thenwhenwewish to understand themeaning of astatementinvolvingthatworditisnecessarytoinvokethedefinition.HumptyDumpty’sprinciplecouldwellstandattheheadofanypieceofmathematicalwriting.

Page 26: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

’WhenIuseaword,’HumptyDumptysaid,inratherascornfultone,‘itmeanswhatIchooseittomean–neithermorenorless.’LewisCarroll,ThroughthelookingglassandwhatAlicefoundthere.

This reminds us that when we meet a new word, or a familiar word in a new setting, we need todiscoverwhatthewritermeansbyit,nottodecidehowwemighthavedefinedit!

Hereisafamiliarideatoillustratethis.

Oddandevenintegers

Definition2.2.1Giventwointegersaandb,wesay that or tomean thatthereisanintegerqsuchthata=bq.

Thusforexample3divides6since6=3×2,–14divides28since28=(–14)×(–2),andbdivides0whateverthevalueoftheintegerbsince0=b×0.

Definition2.2.2Givenanintegerawesaythatais tomeanthat2dividesa.

Definition2.2.3Givenanintegerawesaythatais tomeanthatitisnoteven.

Noticehowthethirddefinitionmakesuseofthesecondandtheseconddefinitionmakesuseofthefirst.Itisverycommontogetchainsofdefinitions;youhavetoworkbackthroughthechaintomakeuseofthem.

Nowconsiderthefollowingstatement.

Proposition2.2.4101isanoddinteger.

Ofcourse,youknowthatthisistrue.Butwhatweareinterestedinhereishowwemightproveitfrom the arithmetic and order properties of the integers and our definition of theword ‘odd’. Ifwecannotproveitfromthedefinitionthenourdefinitionisn’tmuchuse.

Incidentally, theword‘Proposition’usedinthiswayindicates thatIamclaimingthat thisresult istrue. It is really a synonym for ‘Theorem’ but that word is usually restricted to results of greatersignificancethanthisone.

ProofFromDefinition2.2.3,‘101isodd’meansthesameas‘101isnoteven’whichfromDefinition2.2.2meansthat2doesnotdivide101.ByDefinition2.2.1,thismeansthatthereisnointegerqsuchthat 2q = 101. Now we clearly cannot prove this by exhausting all the possibilities one at a time.However,foranintegerq,eitherq 50orq 51.Henceeither2q 100or2q 102,sothat2q≠101.Hence101isnotevenandsoisoddasrequired.

The symbol at the end of this proof is there simply to mark the completion of the proof. Irecommendthatproofsareconcludedbystatingwhathasbeenprovedasoccurshere.

Noticethatthekeystepintheproofisprovidedbythetwouniversalimplications

q 50⇐2q 100(forintegersq)

and

q 51⇐2q 102(forintegersq).

Page 27: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thisproofmightseemover-elaborate,butifyouthinkaboutityouwillseethatitissimplyspellingoutasimplereasonwhy101isanoddnumber.Youmightliketotrytofindabetterproofbasedsimplyontheabovedefinitions.†

2.3MathematicaltruthItisreasonabletoaskhowwecangetstartedinestablishingthetruthofmathematicalstatementsiftheonlymethodofdoing this is toprove themstarting fromothermathematical statementsknown tobetrue.

Whenthedeductivemethodwasfirstused,forexampleintheElementsofEuclidwrittenabout300B.C.,proofsbeganfromcertain‘axioms’or‘postulates’whichwereviewedasself-evidenttruths.Forexample, Euclid’s Postulate 1 may be reformulated as ‘Given two distinct points, there is a uniquestraightlinepassingthroughthem’whichmostpeoplewouldconsidertobeobvious.Thisapproachseesmathematicsasabodyoffactsaboutrealobjects:points,lines,numbers.Thesefactsaredeterminedbyusingcertainacceptedself-evidentrulesofdeductionfromcertainacceptedobviousfacts,theaxioms.Thereareanumberofphilosophicaldifficultiesabout thispointofview.Forone thingmathematicalobjectsappeartobeidealabstractrepresentationsofobjectsintherealworld:forexampleyoucan’tseeapointandcanonlyseeablobhavingsomesize.Foranotherithasbeendiscoveredthatdifferentsetsof axioms are possible and give rise to different theories which appear to be equally validmathematically. This was first realized in geometry when in the early nineteenth century ‘non-Euclidean’geometrieswerediscovered.Wecanthenaskwhatisthe‘true’geometryoftheuniverse.

This is not a mathematical question but is one for physicists and astronomers. However, theawarenessthatthereismorethanonepossiblegeometrywasenormouslyliberatingandhasgivenriseto much interesting mathematics as well as physics. Without it the geometry which provides thelanguageusedingeneralrelativitytheorywouldnothavebeendiscovered.

Mostmathematiciansdoappeartotaketheviewthatmathematicsdealswithrealobjects.However,inthemodernaxiomaticapproachaxiomsareseennotnecessarilyas‘self-evidenttruths’butsimplyasstatementswhichweareassumingtobetrue.Wedomathematicsbyexploringwhatfollowsfromthetruth of these axioms using certain accepted rules of deduction. When we come to apply themathematics we must confirm that these axioms are ‘true’ in an appropriate sense in the area ofapplicationoracknowledgethat this isanassumptionthatwearemaking.Thereaderwillmeetgoodexamplesofthisaxiomaticmethodinthestudyofalgebra.

Since thisbook isprimarilyconcernedwith introducing the reader tomathematical reasoningandexpositionitseemsbesttokeepthemathematicalcontextveryfamiliarandsowewillmainlyrestrictourselvestoarithmetic.Mostmathematiciansprobablywouldconsiderthebasicpropertiesofnumberstobe‘self-evidenttruths’.Itwouldbecumbersometodevelopthesepropertiesformallyfromalistofaxiomsalthough thiscanbedone.†.Wewill simplyassume that the reader is familiarwith thebasicalgebraic properties of numbers (dealingwith addition, subtraction,multiplication and division) andtaketheseforgranted.Thesecanbesummarizedasfollows.

Properties2.3.1Giventworealnumbersaandbtheyhaveasuma+bandaproductab(sometimesdenotedbya·boraxb)whicharealsorealnumbers.Theoperationsofsum(oraddition)andproduct(ormultiplication)ofrealnumbershavethefollowingproperties.

(i) Commutativity. a + b = b + a and ab = ba. (This means that the order in which we writenumberstobeaddedormultiplieddoesn’tmatter.)

Page 28: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(ii)Associativity.(a+b)+c=a+(b+c)and(ab)c=a(bc).(Thismeansthatwecanwritea+b+eandabcwithoutbracketswithoutambiguity.)

(iii)Distributivity.a(b+c)=ab+acand(a+b)c=ac+bc.(Thistellsushowtoremovebrackets.)(iv)Zero.a+0=a=0+a.(v)Unity.a×1=a=1×a.(vi)Subtraction.Theequationa+x=0hastheuniquesolutionx=–aandsoa+x=b x=b+(–

a)=b–a.(Thismeansthatwecancancel:a+x1=a+x2 x1=x2.)(vii)Division.Ifa≠0,thenequationax=bhastheuniquesolutionx=b/a=ba-1.(Thismeansthat

wecancancel:ax1=ax2 x1=x2solongasa≠0.)

All the usual algebraic properties of numbers can be deduced from the above statements. Inparticularitfollowsthata×0=0=0×aandwecanalsodeduce theruleofsigns(–a)b=–(ab)=a(–b)and(–a)(–b)=ab(seeProblemsI,Question6).

Ifa andb are rational numbers (fractions) then so area +b, ab, b –a and (for a ≠ 0) b/a. ThedistinctionbetweenrationalnumbersandrealnumberswillbeconsideredinChapter13.Ifaandbareintegersthensoarea+b,abandb–a,butb/aisanintegeronlyifadividesb.Mostofthisbookwillbeconcernedwiththeintegers.

Wewillalsomakeuseof theorderpropertiesof the realnumbers (andhavealreadymadeuseoftheseintheproofofProposition2.2.4);thesemaybelessfamiliarandsoaformalsetofaxiomsaboutorder(inequalities)willbegivenanddiscussedinthenextchapter.

Exercises

2.1Whichofthefollowinguniversalstatementsaretrueandwhicharefalseforintegersn?

2.2Byconstructingatruthtableexhaustingthepossibilitiesofnandusingthetruthtablefor‘implies’,provethatn>0 n 1forintegersn.

2.3CompletethefollowingtruthtableforP Qusingthetablesfor‘ ’and‘and’.

2.4Byusingtruthtablesprovethat,forallstatementsPandQ,thefollowingstatementsaretrue.

(i)P (PorQ).(ii)(PandQ) P.

Page 29: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

2.5Byusingtruthtablesprovethat,forallstatementsPandQ,

(i)thestatements’P Q’and‘(notQ) (notP)’areequivalent,(ii)thestatements’PorQ’and‘(notP) Q’areequivalent.

2.6UsethemethodofproofofProposition2.2.4toprovethat7doesnotdivide100.

†Seethesectionon‘mathematicaltruth’attheendofthischapter.

‡Inmathematicallogicthesymbol→isusuallyusedinsteadof .Othersymbolsusedinmathematicallogicare for‘PorQ’,for‘PandQ’,and‘¬P’or‘~P’for‘notP’.

†Youmay feel that themost obvious argument is simply to state that which is not an integer. This is of course a validargumentbutassumesthepropertiesoftherationalnumbers.Forthepresentpurposeofillustratingtheuseofdefinitionsitisappropriatetoseekanargumentbasedsimplyontheintegers.

†FormallytherealnumbersandtherationalnumbershavethealgebraicstructureofafieldandtheintegershavethealgebraicstructureofanintegraldomainInaprecisesensetheintegersarecharacterizedbythestatementthattheyformanorderedintegraldomaininwhichthe positive elements satisfy the induction property (seeAxiom5.1.1). For details of such an axiomatic approach see for exampleG.BirkhoffandS.MacLaneAsurveyofmodernalgebra,Macmillan,Fourthedition1977.Thepositiveintegerscanbecharacterizedbyaparticularlysimplesetofaxioms,Peano’saxioms,andthesewillbedescribedinChapter9(seeAxioms9.4.2).

Page 30: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

3Proofs

Aproofofamathematicalstatementisalogicalargumentwhichestablishesthetruthofthestatement.Thestepsofthelogicalargumentareprovidedbyimplications.Oneofthemainaimsofthisbookistodescribe a variety ofmethods of proof so that you can follow these when youmeet them and alsoconstructproofsforyourself.

Nodoubt anyone reading this bookwill havebeen seeing andunderstandingproofs for years.Atuniversityyouareexpectedtobeabletoconstructyourownproofsand,asimportantly,towritethemout carefully so that other people can understand them – or even so that you can understand themyourselfwhenyoucometolookbackatyour.worksomemonthslater.Onerealdifficultyisthatwedonotnormallydiscoverproofsinthepolishedforminwhichtheyarepresented.Itisimportanttorealizethatyouwillusuallyspendtimeconstructingaproofbeforeyouthenwriteoutaformalproof.Youcanthinkofthisaserectingasortofscaffoldingforthepurposeofconstructingtheproof.Whentheproofhasbeenconstructedthescaffoldingisremovedsothattheproofcanbeadmiredinallitseconomicalbeautifulsimplicity!However,onedifficultyforthepersonencounteringtheproofforthefirsttimeisthatitcanbehardtomakesenseof.Toreadandunderstandtheproofwemayhavetoreconstructthescaffoldingforourselves fromthe formalproof.Thiscanbedifficult–butnotusuallyasdifficultasthinkingoftheproofinthefirstplaceunlesstheproofisverybadlywritten.Thisisaproblemnotjustforbeginningundergraduatesbutalsoforprofessionalmathematicianswhentheyreadmathematics.

Youmayaskwhythenthescaffoldingisnotretained.Thedifficultyisthatifeverydetailisgiventhenmathematicalargumentsbecomeenormouslylongandcluttered.Theaimistopitchyourwritingattheleveloftheexpectedreadersothatthereisjustenoughinformationtoenablethereconstructionofthescaffoldingifnecessarybutnotsomuchthatitwouldmasktheessenceoftheargument.Toomuchdetailcanmakeaproofbasedpossiblyononesimple ideaappearenormouslycomplicated.Toavoiddetailitisquitecommontousestatementslike‘itiseasytoshowthat[somestatement]istrue’or‘itnowreadilyfollowsthat[somestatement]istrue’andthenthereaderhastoconfirmthatthisisindeedthecase.Itis,however,importantnottousesuchphrasesasalazywayofavoidingthinkingaboutthedetails.

Itisalsothecasethatexcessivepedanticprecisioncansometimesmakemathematicshardtoread.Writingmathematicsisnotlikewritingacomputerprogram;whatiswrittenwillbereadbyahumanbeingwhohasmuch common experiencewith thewriter and so is able to anticipate to some extentwhatthewriterintends.AsGilaHannahaswritten,

Thestudentofmathematicshastodevelopatoleranceforambiguity.Pedantrycanbetheenemyofinsight.†

Putting this intopractice is amatter of fine judgement: ambiguous statements areonly acceptable incontextswhichresolvetheambiguityalmostimmediately.Whilelearningtowritegoodmathematicsit

Page 31: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

isprobablybettertoerronthesideofpedantry.In this book arguments will often be presented first with lots of scaffolding (as ‘constructing a

proof’) and thenwith the scaffolding removed (as ‘(formal)proofs’).Youshouldensure that ineachcase you do understand why the ‘proof’ does prove the result as claimed. When you read mostmathematicsbooksyouneed toworkwithpencil inhand reconstructing thedetailbehind theproofsprovided.Youcannotnormallyreadamathematicsbooklikeaconventionalnovel.

3.1DirectproofsLetusbeginbythinkingaboutoneofthesimplestformsofmathematicalresult.Verymanytheoremsare of the form P Q. How do we set about proving such a statement? Since the statement isnecessarily true ifP is false (rememberTable2.1.1)weonlyneed consider the casewhenP is true.ThenfromthetruthtableweseethatP QistruesolongasQisalsotrue.

SotoprovethatP Qistrue,itissufficienttoassumethatPistrueanddeduceQ.Thisisthedirectformofproof.Hereisanexample.

Proposition3.1.1Forpositiverealnumbersaandb,a<b a2<b2.

Constructing a proof.We can summarizewhat is needed in the followingway using a given–goaldiagram.†

Thedirectmethodofproofofanimplicationistoaddthehypothesistothegivenstatementsandtosetanewgoalofprovingtheconclusion.Thisleadstothefollowingnewgiven-goaldiagram.

Wenowstarttothinkhowwecanobtainsomethinglikethegoalfromthegivenstatements.Weseethatwewanta2andb2inthegoalandthissuggestsmultiplyingthegiveninequalitythroughbyaandbyb.Thus

and

usingthefactthataandbarebothpositive.Hence,ifwesupposethata<b,itfollowsthata2<abandab<b2.Butnowwerecognizethatthetwoinequalitieswehaveobtainedbothinvolveabandthat

sothatifa<bthena2<b2asrequired.Thereadermightwellaskwhere the threenumbered implicationshavecomefrom;whyare these

true?Theansweristhatthesestatementsfollowimmediatelyfromfundamentalpropertiesof,therealnumberswhichcanbeencapsulated in the inequality(ororder)axioms.Wehavealreadycommentedthatitwouldbeunwieldytoworkfromacompleteaxiomsysteminthisbookandreadersareunlikely

Page 32: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

tohavedifficultieswiththealgebraicpropertiesassumed.However,inequalitiesarelessfamiliarandsoitseemsusefultolistthebasicpropertiestobeassumed.

Axioms3.1.2(i) Trichotomy law. For each pair of real numbers a and b, one and only one of the threepossibilitiesa<b,a=b,a>bistrue.

(ii)Additionlaw.Forrealnumbersa,bandc,

(iii)Multiplicationlaw.Forrealnumbersa,bandc,

(iv)Transitivelaw.Forrealnumbersa,bandc,

Now statements (3.1) and (3.2) follow from the multiplication law and statement (3.3) from thetransitivelaw.

WecannowwriteoutaformalproofofProposition3.1.1asfollows.

ProofGivenpositiverealnumbersaandbsupposethata<b.Thena2<ab(multiplyingthroughbya>0)andab<b2(multiplyingthroughbyb>0).Hencea2<b2.Itfollowsthata<b a2<b2.

Notice that thisproof iswrittenasa sequenceof sentenceswithwords like ‘then’, ‘hence’and ‘itfollows’ indicating how the sentences are related.Of course some symbols are used but it is a goodpracticewhenwritingmathematics toreaditoutaloudtocheckthatwhenthesymbolsareconvertedintowords(‘aislessthanb’inthefirstsentenceoftheaboveproofforexample)whatyouhavewrittenisa sensiblepieceofprose.Wedosometimesusemoresymbolsso that theaboveproofmighthavebeenwrittenoutasfollows.

ProofForpositiveintegersaandb,a<b (a2<abandab<b2) a2<b2.Hencea<b a2<b2.

This presentation highlights the fact that in constructing a proof as a chain of implications werepeatedlyuse

whichisreadilycheckedbyusingatruthtable.†However,Iwouldencouragethereadertobewareofusingtoomanysymbolsinwritingoutproofsat

thisstageasitmakesitmuchhardertobeclearthatwhatyouarewritingisconveyingwhatyouintend.Noticehowthe‘and’statementwashandledinthisproof.Animplicationoftheform‘P (Qand

R)’islogicallyequivalentto‘(P Q)and(P R)’.Thus‘a<b (a2<abandab<b2)’isprovedbyproving(3.1)and(3.2).

Oneprobleminwritingoutproofsistodecidehowmuchdetailtogiveandwhatcanbeassumed.Thereisnosimpleanswertothis.Althoughtheaboveproofdidstartfromtheinequalityaxiomsthiswas not explicitly referred to in the formal proof.You always do have to start somewhere.But it iscumbersometoreduceeverythingtoasetofaxiomsandthereisusuallyawidebodyofresultswhichitis reasonable to assume. For example the result of Proposition 2.2.4 that 101 is an odd number issomethingwhichnormallywouldsimplybetakenforgranted.ItwasexploredinChapter2simplyto

Page 33: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

illustrate theroleofdefinitions.Oneveryusefulpieceofadvice isalways tobesceptical, for ifyourproofdoesn’tconvinceyou,thenitisunlikelytoconvinceanyoneelse.Noticethattheaboveproofdidrefer to the facts that a > 0 and b > 0 at the points where they were needed (in applying themultiplicationlawofinequalities).Itisgoodstyletoindicatewherethehypothesesintheresultbeingprovedareusedintheproof.Alsoifsomestepsintheargumentareonlyvalidundercertainconditionsthenyoushouldverifythattheseconditionsareindeedsatisfied.

ProofbycasesWhen proving universal implications it is often very difficult to consider together all the objectssatisfyingthehypothesis.Hereisaverysimpleexample.

Example3.1.3Ifa=1ora=2thena2–3a+2=0.

ProofIfa=1thena2–3a+2=1–3+2=0.Ifa=2thena2–3a+2=4–6+2=0.Hence,ifa=1ora=2thena2–3a+2=0.

Noticehowthe‘or’statementwashandledinconstructingthissimpleproof.Animplicationoftheform‘(PorQ) R’ is logicallyequivalent to thestatement ‘(P R)and(Q R)’ (this is commonusagebutcanbecheckedbyatruthtableargument)andsoisprovedbyprovingthetwoimplicationsinthis‘and’statement.

Inthisexamplethe‘cases’weresimplythetwonumberssatisfyingthehypothesis.Itcanbeviewedas ‘proofby enumeration’working through thepossibilities onebyone.This is not alwayspossible.RecalltheproofofProposition2.2.4onpage16.Theaimwastoprovetheuniversalimplication‘ifqisan integer then 2q ≠ 101’. It is impossible towork through the integers one by one. The proofwasachievedbyconsidering twocases: integersq such thatq 50and integersq such thatq 51.Thisargumentworksbecausethesetwocasesareexhaustive:foreveryintegerqeitherq 50orq 51.

Hereisanotherexamplederivingafamiliarpropertyoftheintegersfromtheinequalityaxioms.Proposition3.1.4Fornon-zerorealnumbersa,a2>0.Constructingaproof.Summarizingwhatisneededgivesthefollowing.

The trichotomy law is the only inequality axiomwhich refers to the equality of real numbers. Ifweapplythistotherealnumbersaand0itcanberewritten

However,fromthemultiplicationlaw,

and

Hence

Page 34: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Finally,puttingtogetherstatements(3.4)and(3.7)weobtain

asrequired.

Wecannowwriteouttheformalproofasfollows.

ProofSupposethataisanon-zerorealnumber.Then(bythetrichotomylaw)eithera>0ora<0.Ineithercase,fromthemultiplicationlaw,a2>0.Hence,ifa≠0thena2>0asrequired.

Againnoticehowthe‘or’statementwashandledinconstructingthisproof.Toprovestatement(3.7)wemustprovebothstatement(3.5)andstatement(3.6).†

3.2ConstructingproofsbackwardsThegrandthingistobeabletoreasonbackwards.

ArthurConanDoyle,Astudyinscarlet.

Theprocessofmathematicalinvestigationisextremelycomplex.Evenwhenyouknowwhatyouaretrying toprove it isquiteunusual inpractice tobeableconstructproofs in thedirectwaywhichhasbeenillustratedsofar.Oneanalogywhichmaybehelpfulisthatofcreatingordiscoveringarouteupamountain.Youmaysucceedbysimplyheadingofftowardsthetop.Butoftentherewillbeanumberoffalsestartsanditmaybehelpfultostandbackandtakeanoverviewofwhatispossible.Youmayfindthat for certain routes your technique is inadequate and you need to refine this on less ambitiousprojects.Onepossibleapproachistodevelopyourroutebymentallyworkingbackfromthesummit,inotherwords by planning the route backwards. This is frequently a sensible approach to constructingmathematicalproofs.

It may be worth remarking that this analogy seems useful when we ponder the nature ofmathematical invention: is mathematics discovered or created? A new route up a mountain is bothdiscovered and created; it is to some extent is rediscovered and recreated every time someonesubsequently uses it – itmay even be slightly different each time.But the route appears to have anobjectiveexistenceindependentofthosewhouseit.Thesameistrueofmathematicalideas.

Hereisanexamplerequiringalittlemorethoughtthantheresultsconsideredsofar.

Proposition3.2.1Forrealnumbersaandb,a<b 4ab<(a+b)2.

Constructingaproof.Wecansummarizewhatisneededforadirectproofasfollows.

Itisdifficulttoseehowtoproceed.Onedifficultyisthatthegoalismorecomplicatedthanthegivenstatement and it is not immediately clear how to reach this more complicated statement. In such asituation it is often best to startwith themore complicated statement and to simplify it. In this casesimplifyingthegoalleadstotheconstructionofaproofbackwards.

Page 35: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Hencea<b 4ab<(a+b)2.

Itisessentialfortheproofthattheseimplicationsgointhedirectionshown.Ofcourse,apartfromthelaststep,inthiscasetheydoinfactgoinbothdirections,anditwouldbeusualtowrite‘ ’insteadof‘⇐’inthosecases.Butthefactthattheimplications‘ ’aretrueisquiteirrelevantfortheproof.Theabovesequenceofimplicationsisperfectlysatisfactoryasaformalproofforitmakesitclearthatthetruthofthegoalisimpliedbywhatisgiven.Ifpreferredtheproofcanbepresentedasadirectproofasfollows.

Proofa<b a≠b a-b≠0 0<(a-b)2 0<a2-2ab+b2 4ab<a2+2ab+b2 4ab<(a+b)2.Hencea<b 4ab<(a+b)2.

However,presentingtheproofinthiswaydisguiseswhereithascomefrom.Whilstreadersoftheproofmayaccepteachofthestepsandsobeforcedtoaccepttheprooftheywouldprobablyfindtheearlierbackwardspresentationmoresatisfyingbecauseitdemonstrateshowtheproofwasfound.

Exercises

3.1Provethatforallrealnumbersa,bandc,

(i)(a+b–c)2=(a+b)2+(a–c)2+(b–c)2–a2–b2–c2,(ii)bc+ac+ab a2+b2+c2.

3.2Provethatforallintegersa,bandc,

(adividesb)and(bdividesc) adivides.c.

3.3Provethatthesquareofanevenintegeriseven.

3.4Provethat0dividesanintegeraifandonlyifa=0.

3.5Prove,fromtheinequalityaxioms,thatifa,bandcarerealnumberswitha>0,thenb c abac.

3.6Provethatfornegativerealnumbersaandb,a<b a2>b2.

3.7Proposition3.2.1statesthata<bisasufficientconditionfor4ab<(a+b)2.Isthisconditionalsonecessary?Ifso,proveit.Ifnot,findanecessaryandsufficientcondition.

3.8Provethatforallrealnumbersaandb,

Page 36: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

†InDavidTall(editor),Advancedmathematicalthinking,Kluwer,1991.

†The ideaofusing these ‘given–goaldiagrams’comes from thebookbyDaniel J.Velleman,How toprove it,a structuredapproach,CambridgeUniversityPress,1994.Itextendsusefullytheapproachtaughttotheauthoratschoolofstartingbystatingclearlywhatweare‘requiredtoprove’or‘requiredtofind’.Vellemanprovidesmanyillustrativeexamplesofdifferentmethodsofproofsomeofwhicharealsousedinthisbook.†Thisstepisknowninformallogicasa‘syllogism’:Pisthe‘minorterm’,Qthe‘middleterm’andR the‘majorterm’;P⇐Q is the‘minorpremise’andQ⇐Rthe‘majorpremise’.†Itisnecessarytobecarefulaboutthewaythewords‘and’and‘or’areusedinnormalspeech.Forexamplestatement(3.7)mightbeformulatedusingtheword‘and’as‘a>0anda<0(both)implythata2>0’.Thisisreallyashorthandfor‘a>0impliesthata2>0anda<0impliesthata2>0’.

Page 37: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

4Proofbycontradiction

Inthepreviouschapterweconsideredhowtoconstructsomesimpledirectproofs.However,thedirectmethodcanbe inconvenient anddoesnot alwayswork. In this chapterweconsider a logicallymoreelaboratebutverycommonandpowerfulmethodofproof:proofbycontradiction.

4.1ProvingnegativestatementsbycontradictionThedirectmethodofproofisoftenhardtousewhenweareprovingnegativestatements.Considerthefollowingexample.

Proposition4.1.1Theredonotexistintegersmandnsuchthat

14m+20n=101.

Thisisasimpleexampleofanon-existenceresultandresultsofthistypeareverycommoninmoreadvancedmathematics.

It isdifficult to seehow toproveProposition4.1.1directly forwe clearly cannot consider all thepossibilitiesformandnoneatatime.Themethodofproofbycontradictionistodemonstratethatifwhatweare trying toprovewerefalse then thiswould lead toastatementwhich isknownnot tobetrue,acontradiction.Acontradictionisastatementoftheform‘Pand(notP)’.Forexample,ifaisaninteger, the statement ‘a is even anda is odd’ is a contradiction since ‘odd’ is defined tomean ‘noteven’.Havingobtainedacontradictionweknowthatourinitialassumptionmusthavebeenwrongandsotheresultwearetryingtoprovemustbetrue.

ThismaysoundconfusingandsobeforeweconsideringeneralhowthismethodcanbejustifiedletusillustrateitbyconsideringtheproofofProposition4.1.1.

Constructingaproof.Thepropositionstatesthatwhateverintegersmandnwechoosethesewillnotsatisfytheequation,i.e,14m+20n≠101.Wecansumthisupasfollows.

A proof by contradiction is given by showing that if the goalwere false then thiswould lead tosomethingwhichweknownottobetrue,acontradiction.Thensincethisshowsthatthenegativeofthegoal is impossible it means that the goal must be true in accordance with the following precept ofSherlockHolmes’.

Page 38: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Whenyouhaveeliminatedtheimpossible,whateverremains,howeverimprobable,mustbethetruth.ArthurConanDoyle,Thesignoffour.

Themethodiscarriedoutbyaddingthenegativeofthegoaltothegivensandmakingthefindingofacontradictionthenewgoal.Inthiscasethisgivesthefollowingstrategy.

Herewecangetacontradictionbyusingtheideaofevenandoddnumbers.Noticethatboth14=2x7and20=2x10areevennumbersandsoanynumberoftheform14m+20n,wheremandnareintegers,isalsoevensince14m+20n=2(7m+10n).Thusif14m+20n=101thismeansthat101isanevennumber.But101isanoddnumber(seeProposition2.2.4foraformalproofbutwewouldusuallyassertthiswithoutproof)andsowehavetwocontradictorystatementsabout101givingacontradictionasrequired.

The proof is quite short when written out in final form. Notice that we include the phrase ‘forcontradiction’inthefirstsentenceinordertoindicatethemethodweareusing.

ProofSupposeforcontradictionthatmandnareintegerssuchthat14m+20n=101.Then,since14isevenand20 iseven,101=14m+20n=2(7m+10n) is even.But this isnot true since101 isodd.Hencesuchintegersmandncannotexist,asrequired.

Wecanjustifythismethodusingatruthtable.SupposethatwearetryingtoprovestatementP.Themethodofcontradictionistoprovethestatement(notP) QwhereQisafalsestatement.Nowlookatthefollowingtruthtable.

Ifweknowthat(notP) Q is trueandQ is false, then theonlypossibility in theabove table is thesecondline.ButthisshowsthatPistrue.

AtemplateforproofsbycontradictionItmaybeuseful topresenta templateforwritingout theseproofs.SupposethatwearewritingoutaformalproofofthestatementPusingthecontradictionmethod.Wewouldsetouttheproofasfollows.

ProofSuppose,forcontradiction,thatthestatementPisfalse.Then[presentsomeargumentwhichleadstoacontradictionofsomesort].HenceourassumptionthatPisfalsemustbefalse.ThusPistrueasrequired.

Acommon failing inwritingoutproofsbycontradiction is for it tobeunclearpreciselywhat thecontradictionis.Takecaretomakethisclear.

AsasecondexamplehereisanalternativeproofofProposition2.2.4usingthismethod.

Page 39: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Proposition2.2.4101isanoddinteger.

Constructingaproof. This appears to be a positive statement but since theword ‘odd’means ‘noteven’ittooisanon-existenceresultsinceitassertsthat101isnotamultipleof2.Wecandescribethisasfollows.

InChapter2thegoalwasachievedbyconsideringallthepossibilitiesforq.Althoughitisnotpossibletoconsidertheseoneatatimewecouldtakeaccountofallthepossibilitiesbyobservingthatforanyintegerqeitherq 50orq 51. Itwasobserved inChapter3 that this is anexampleofaproofbycases.

Asanalternativewecanapply themethodofproofbycontradictionwhich leads to thefollowingstrategy.

Wegetacontradictionifwerememberhowwediddivisioninourearlyschool-days.Thenwewouldhavedivided2into101giving50withremainder1.Thissuggests

andwehaveacontradictionsinceitiscertainlytruethat1<2.

ProofSupposeforcontradictionthat101isevensothat101=2qforsomeintegerq.Then1=2(q−50)whereq−50mustbeapositiveinteger.But2(q−50) 2sothat1 2contradictingthefactthat1<2.Hence101isnotevenandsomustbeodd.

4.2ProvingimplicationsbycontradictionWesometimes find that thedirectmethodofproofof statementsof the formP Q does notwork.Considerthefollowingresult.

Proposition4.2.1Ifa,b,careintegerssuchthata>b,then

Constructingaproof.Itisdifficulttoknowhowtomakeuseofthemultiplicativelawofinequalities(seeAxioms3.1.2)inadirectproofsincethisdependsonthesignofewhichiswhatwearetryingtodetermine.

Theeasiestthingtodointhiscaseisagainaproofbycontradiction.Noticefromthetruthtablefor‘implies’(Table2.1.1)thatifP QisfalsethenwemusthavePtrueandQfalse.SowecanprovethatP QistruebyshowingthatPtrueandQfalsetogetherimplyacontradiction.

WhatweareaskedforinProposition4.2.1maybesummarizedasfollows.

Page 40: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Anattemptatadirectproofofthepropositionleadstothefollowingstrategy.

Themethodofproofbycontradictionistoaddthenegativeofthedesiredconclusiontothe‘givens’andtoseekacontradiction.Thisgivesthefollowingstrategy.

Itiseasytoobtainacontradiction.Forbythemultiplicativelawofinequalities(Axioms3.1.2)

Hence,sinceourgivenstatementsincludethestatementac bc, theyimplythatac>bcandac bcwhichisacontradiction.

Theproofisquiteshortwhenwrittenoutinfinalformasfollows.

ProofForintegersa,bandc,witha>b,supposethatac bcbut,forcontradiction,thatc>0.Thenthegiven statement a > b implies that ac > bc, contradicting the statement that ac bc. Hence ourassumptionthatc>0mustbefalse,i.e,c 0.Thusac bc c 0.

4.3ProofbycontrapositiveIn the proof of Proposition 4.2.1 the contradiction we obtained involved the hypothesis in theproposition.This isaparticularformofproofbycontradiction. Itessentiallyuses thefact that,givenany statements P and Q, the statements ’P Q’ and its contrapositive ‘(not Q) (not P)’ areequivalent,ascanbeseenbyexaminingtheirtruthtables(seeExercise2.5).Thusifoneistruethensoistheother.NowProposition4.2.1isastatementaboutintegersa,bandcsuchthata>b,oftheformPQwhere

Pisthestatementac bc,Qisthestatementc 0.

Towritedownthecontrapositivenoticethat

(notP)isthestatementac>bc,(notQ)isthestatementc>0,

andsothestatement(notQ) (notP)reads

c>0 ac>bc,

Page 41: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

where a, b and c are integers such thata > b. But this is just themultiplicative law of inequalitiesincludedinAxioms3.1.2.HencewecouldhaveprovedProposition4.2.1bysimplyobservingthatitscontrapositiveistrue.Wewouldwriteoutthisproofasfollows.

ProofofProposition4.2.1Thecontrapositiveofthestatement

isthestatement

whichisjustthemultiplicativelawofinequalitiessincewearegiventhata>b.Thusthepropositionistrue.

4.4Proving‘or’statementsConstructingaproofforcompositestatementsinvolving‘or’usuallymakesuseofalogicalconstructionrather similar to proof by contradictionwhich it is convenient to consider at this point.Again let usconsideranexample.

Proposition4.4.1Ifaandbarerealnumbers,then

ab=0 a=0orb=0.

Constructingaproof.RecallfromChapter2thatthestatement‘P Q’means‘(P Q)and(Q P)’.Sotherearetwopartstotheproof:aproofofthe‘⇐’statementandaproofofthe‘ ’statement.Weconsidertheseinturn.‘⇐’:Thisstatementisarestatementofabasicpropertyofthenumber0,that0xb=0=ax0forrealnumbersaandb.ThispropertywasmentionedinthediscussionattheendofChapter2.†‘ ’:Adoptingthedirectstrategyforprovingtheconversestatementgivesthefollowingstrategy.

Nowrecallthat‘PorQ’islogicallyequivalentto‘(notP) Q’(seeExercise2.5)sothatthegoalmayberewritten‘a≠0 b=0’.Adoptingthedirectstrategyforprovingthisgivesthefollowing.

Sincea≠0,wecandividethroughbya(ormultiplythroughby1/a)sothatab=0 b=0asrequired.Aformalproofcouldbesetoutasfollows.

ProofItisabasicpropertyof0that0xb=0=ax0.Thereforea=0orb=0 ab=0.Fortheconverse,supposethataandbarerealnumberssuchthatab=0.Toseethatitfollowsthata

=0orb=0supposethata≠0.Thendividingab=0throughbyagivesb=0,asrequired.Henceab=

Page 42: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

0 a=0orb=0.

An alternative method of obtaining this result is by proof by cases. The trichotomy law ofinequalitiestellsusthat,foranyrealnumbera,a<0ora=0ora>0.Thisgivesthreepossibilitiesfora and similarly there are three possibilities for b, leading to nine possibilities in all. These can besummarizedinatableasfollows.

Thiscomesfromthemultiplicativelawofinequalitiesandthefactthatab=0ifa=0orb=0.NowsinceallpossibilitiesareincludedinthistablewecanreadoffProposition4.4.1andalsothe

followingusefulresults.

Proposition4.4.2Ifaandbarerealnumbers,thenab>0ifandonlyifaandbhavethesamesign,i.e.(a>0andb>0)or(a<0andb<0).

Proposition4.4.3Ifaandbarerealnumbers,thenab<0ifandonlyifaandbhaveoppositesigns,i.e.(a>0andb<0)or(a<0andb>0).

Formally the right to left implications in these results come from the multiplicative law ofinequalitiesandthe left toright implicationsareprovedbycontradictionusingtheabovetablewhichshows,forexample,thatifaandbdonothavethesamesignthenabisnotpositive.

Proposition4.4.1isusedwhenwesolvepolynomialequationsandinthesamewayweusetheothertworesultstosolvepolynomialinequalities(seeExercise6.2).

Exercises

4.1Provebycontradictionthattheredonotexistintegersmandnsuchthat14m+21n=100.

4.2Provebycontradictionthatforanyintegern

n2isodd nisodd.

4.3Provetheresultofthepreviousexercisebywritingdownitscontrapositive.

4.4Prove,usingthemethodgivenaboveforprovingan‘or’statement,thatifaisarealnumbersuchthata2 7athena 0ora 7.

4.5Provebycontradictionfromthetrichotomylawthat,foranyrealnumbersaandb,

a bandb a a=b.

4.6Writedown thecontrapositiveof the statementofExercise3.8(iv).Henceprove that, for all realnumbersaandb,

Page 43: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(i)|a|<|b|ifandonlyifa2<b2,(ii)|a|=|b|ifandonlyifa2=b2.

4.7Provethat,forallrealnumbersaandb,

|a+b| |a|+|b|.

Giveanecessaryandsufficientconditionforequality.

†ProblemsI,Question6asksforaformalproofofthisresultfromProperties2.3.1.

Page 44: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

5Theinductionprinciple

Theessenceofthenaturalnumberconceptis…closureunderthesuccessoroperation.†

RichardDedekind(1888)

In this chapter we discuss a special proof technique which is particularly useful when provingstatementsaboutthepositiveintegers.

5.1ProofbyinductionSupposethatwewishtoprovethatsomepropertyholdsforallthepositiveintegers1,2,3,4,.…Itisoftendifficult,orevenimpossible,toprovesuchstatementssimplyfrombasicrulesofarithmetic.Whatthese rules fail to capture is the fact that the positive integers come in a sequencewith any numberobtainablebystartingfromthenumber1andadding1toitenoughtimes.Theintegern+1iscalledthesuccessor of the integern. Thus, if we start with the integer 1 and form its successor, and then itssuccessor, and so on, then given any positive integer eventually itwill be reached.This idea can beformulatedmorepreciselyasfollows.

Axiom5.1.1(Theinductionprinciple)SupposethatP(n) isastatement involvingageneralpositiveintegern.ThenP(n)istrueforallpositiveintegers1,2,3,…if

(i)P(1)istrue,and(ii)P(k) P(k+1)forallpositiveintegersk.

Beforediscussingtheinductionprinciplefurther,hereisanexampleofhowitisused.

Proposition5.1.2Forallpositiveintegersnwehavetheinequalityn 2n.

Constructing a proof. When using the induction principle it is important to be clear about whatconstitutesthepredicateP(n).InthiscaseP(n)isthestatement

n 2n.

Letusbeginbycomparingthetwonumbersnand2ninsomeparticularcases.

Page 45: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Fromthiswecanseethattheresultcertainlyholdsforn=1,2,3,4,5and6anditseemshighlyplausiblethattheresultwillholdforallpositiveintegersn.However,testinganynumberofcasesdoesnotconstituteaproof that the resultwillalwayshold. In thisexample theabove tablesuggestsmorethanjustthattheresultholdsforcertainparticularvaluesofn.Itdemonstratesthatthenumbersinthesecondrowaregrowingmuchmorerapidlythanthenumbersinthefirstrowandifthiscontinuesthenitwouldbea strong indication that the resultP(n)holds for allpositive integersn.Theproof of theresultbyinductionmakesthisargumentprecise.

ReferringtoAxiom5.1.1,weseethatitassertsthattwostatementswillleadtotheproposition.

(i)ThestatementP(1)simplysaysthat1 2whichiscertainlytrue.Thisiscalledthebasecase.

(ii)Thesecondstatementthatisneedediscalledtheinductivestep.WearetoproveforeachpositiveintegerkthatP(k) P(k+1),inotherwordsthatifP(k)istruethensoisP(k+1).HerethestatementP(k)isoftenreferredtoastheinductivehypothesis,fortheaimistoproveP(k+1)underthehypothesisthatP(k)istrue.

Wecansumupwhatisneededforadirectproofoftheinductivestepinthiscaseasfollows.

Inordertoobtainthegoalwetrytorelateittotheinductivehypothesis.Sowestartwithonesideoftheinequality required and express it in terms of one side of the inequality of the hypothesis. Onepossibilityisthefollowing.

Alternativelywecanstartontheothersideasfollows.

Wewriteouttheformalproof(usingthesecondapproach)asfollows.

ProofWeuseinductiononn.Basecase:Forn=1,2n=2andso,since1 2,n 2n.Inductivestep:Supposenowasinductivehypothesisthatk 2kforapositiveintegerk.Then2k+1=2×2k(byinductivehypothesis)=k+k k+1andso2k+1 k+1asrequired.Conclusion:Hence,byinduction,n 2nforallpositiveintegersn.

The ideaof induction is that, sinceP(1) is true (explicitlychecked)andalsoP(1) P(2) (specialcaseofinductivestep),weknowthatP(2)istrue,andnowsinceP(2) P(3)weknowthatP(3)istrue,andsoon:P(3) P(4) P(5) ….EventuallythisprocesswillreachP(n)foranyspecifiedpositiveintegern.Itmightbethoughtthatthisis‘obvious’andinawayitis.Butthisisbecauseourintuitiveideas aboutwhat the integers are includemore than the fact that they can be added,multiplied andcompared in size. The induction principle is simply a formulation of something’ whichwe take for

Page 46: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

granted about the integers: thatwe can reach any positive integer by starting from 1 and repeatedlyadding1.Supposethatwethinkoftheintegerslineduplikedominoes.Theinductivesteptellsusthattheyarecloseenoughforeachdominotoknockoverthenextone,thebasecasetellsusthatthefirstdominofallsover,theconclusionisthattheyallfallover.†

Formally,theinductionprincipleisanotheraxiomabouttheintegers,inadditiontothealgebraicandorderaxioms.

ItisimportanttorealizethatwecannotprovearesultlikeProposition5.1.2byconsideringeachcaseinturn.Foranyspecificvalueofnwecanchecktheresultbycalculation.Forexample,considern=8:since28=256and8 256,thestatementP(8)istrue.Buthowevermanyindividualcaseswecheckednumericallywewouldnotknowthattheresultalwaysheld.Indeedtherearemathematicalstatements(suchasstatement(iv)inSection1.1)whichareknowntobetrueforahugenumberofspecialcasesbut which have not yet been proved. Proof by induction is not the only way of proving generalstatementsaboutthepositiveintegersbutitdoesprovideanenormouslypowerfultechnique.

Inwritingoutproofsbyinductionitisimportanttomakeitclearthatthisisthemethodbeingusedand to be absolutely clear what is the statement P(n) that is being proved. If you do no more indeveloping a proof before writing out a formal proof you should certainly write down what thestatementP(n)is.

AtemplateforproofsbyinductionItisagoodapproachforyourproofstofollowastandardpattern.FirstidentifythestatementP(n)andbeclearwhatthestatementsP(1),P(k),P(k+1)eachsay.Thenwhenyouwriteouttheformalproofusethefollowingtemplate.

ProofWeuseinductiononn.Basecase:[ProvethestatementP(1)]Inductivestep:Supposenowasinductivehypothesisthat[P(k)istrue]forsomepositiveintegerk.Then[deducethatP(k+1)istrue].Thisprovestheinductivestep.Conclusion:Hence,byinduction,[P(n)istrue]forallpositiveintegersn.

There are many variants of this layout. In particular, the conclusion line is often omitted andincludingthewords‘basecase’,‘inductivestep’and‘conclusion’isnotusual.However,asyoubegintoapplytheinductivemethod,usingthistemplatehelpstoemphasizewhatsuchaproofinvolves.Thefirsttwoparts(basecaseandinductivestep)areconcernedwithverifyingtheconditionsinAxiom5.1.1andthenthelastpart(conclusion)invokestheaxiom.

Here is another example with the proof laid out according to the above template [with a fewcommentsinbrackets].

Proposition5.1.3Forallpositiveintegersnthenumbern2+niseven.

ProofWeuseinductiononn.

[InthiscasethestatementP(n)tobeprovedforallpositiveintegersis‘n2+niseven’orequivalently‘2dividesn2+n’whichmeansthat‘n2+n=2qforsomeintegerq’(usingDefinitions2.2.1and2.2.2).]

Basecase:For anevennumber,asrequired.

Page 47: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Inductive step:Supposenowas inductivehypothesis thatk2 +k is even for somepositive integerk.Thenk2+k=2qforsomeintegerq.[NoticenowthatthestatementP(k+1)is‘(k+1)2+(k+1)iseven’.]Then (by inductive hypothesis) = 2(q+k+1)=2pwherepistheintegerq+k+1,andso isevenasrequired.Conclusion:Hence,byinduction,n2+nisevenforallpositiveintegersn.

Oftenthesymbolnisusedagainwhendealingwiththeinductivestepinsteadofintroducingthenewsymbol k, i.e, the inductive step reads for all positive integers n, The reason forintroducinganewletter is that it iseasiertowritedownP(k+1)bysubstitutingk+1forn inP(n).Substitutingn+1forntoobtainP(n+1)canleadtoconfusionandacommonerrorininductiveproofsisgettingP(k+1)wrong.Iwouldrecommendavoidingthedoubleuseofthesymbolnatleastuntilyouareveryfamiliarwithinductiveproofs.

Theexamplesgiveninthischapterarequitesimplesothatwecanconcentrateonthemethod.Therewillbemanymoreexamplesinthisbookandthemethodisverycommon.Quiteabitofingenuitymaybe required in proving the inductive step and even, on occasion, in formulating the statementP(n)properly.Thereaderwillsometimesmeetinductiveproofspresentedinformallyusingphraseslike‘andsoon’withacommentthataformalargumentcanbewrittenoutusinginduction;inthesecasesitcanbeusefulforthereadertotrytodothis.

5.2ChangingthebasecaseThe induction principle is used to prove a statement about positive integers by first proving thestatementfortheinteger1asthebasecaseandthenprovingthat if itholdsforsomepositiveintegerthenitnecessarilyholdsforitssuccessor.However,thesameideacanbeusedstartingfromanyintegerasthebasecase.Supposethatn0isaninteger,positive,negativeorzero.Inductioncanbeusedtoprovethat a statementP(n) is true for all integersn such that n n0. The base case is nowP(n0) and theinductivestepisP(k) P(k+1)(fork n0.Thebasictemplategivenabovebecomesthefollowing.

ProofWeuseinductiononn.Basecase:[ProvethestatementP(n0)]Inductivestep:Supposenowasinductivehypothesisthat[P(k)istrue]forsomeintegerksuchthatk n0.Then[deducethatP(k+1)istrue].Thisprovestheinductivestep.Conclusion:Hence,byinduction,[P(n)istrue]forallintegersn n0.

Thisisillustratedinthefollowingresultcomparingthesizesofn2and2n.Calculatingthesenumbersforlowvaluesofngivesthefollowingtable.

Thissuggeststhefollowingresult.

Page 48: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Proposition5.2.1Forallintegersnsuchthatn 4,wehavetheinequalityn2 2n.

Constructingaproof.Theinductivestepofaproofbyinductiononnreads

forintegersk 4.Wecanachievetheright-handsideof theconclusioninequalitybymultiplyingthehypothesisinequalityby2giving

Now,ifwecanprovethat thenwecancompletetheproofoftheinductivestepusing

Butthisinequalityisreadilyprovedfork 4byexpandingthebracketsandsimplifying.

ProofWeuseinductiononn.Basecase:Forn=4,n2=16and2n=16andson2 2n.Inductivestep:Supposenowasinductivehypothesisthatk2 2kforsomek 4.Then(by inductivehypothesis).Sowewillhaveproved that ifwecanprove thatBut and,sincek 4, so thatHence and sowehave deduced that as required to complete the inductivestep.Conclusion:Hence,byinduction,n2 2nforalln 4.

Noticethatinductionstartingfromabasecaseotherthan1isnotreallyanextensionoftheinductionprincipleinAxiom5.1.1.ConsiderthestatementthatP(n)istrueforalln n0Ifweputm=n-no+1thenn n0ifandonlyifm 1.Thus,sincen=m+n0-1,P(n)istrueforalln n0ifandonlyifp(m+n0-1)istrueform 1.TheinductiveproofofP(n)withbasecasen=n0isessentiallyidenticaltotheinductiveproofofP(m+n0-1)withbasecasem=1.Forexample,theresultofProposition5.2.1canbe”rewrittenas(m+3)2 2m+3form 1.Inthisform,theresultcanbeprovedbyinductionwithbasecasem=1andifthereaderwritesoutsuchaproofitwillbeclearthatitisalmostidenticaltotheproofgivenabove.

5.3DefinitionbyinductionConsiderthefollowingresult.

Proposition5.3.1Thesumofthefirstnpositiveintegers1+2+…+nisequalto

Whenever you see a line of dots indicating ‘and so on’ this indicates a definition by induction(sometimescalledadefinitionbyrecursion).Inthiscase,amoreprecisenotationforthesumofthefirst

npositiveintegersis .

Page 49: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Definition5.3.2Givenasequenceofnumbersa(1),a(2),…,thenumbers forpositiveintegersnaredefinedinductivelybythefollowingstatements:

Againwehaveabasecasewhichtellsuswhatthenotationmeansinthecasen=1andaninductivestepwhichtellsuswhat itmeansforn=k+1 in termsofwhat itmeansforn=k.Foranyspecificvalueofnwecanevaluatetheexpressionbyrepeateduseoftheinductivestep.Thus,forexample,

UsingthisnotationwecanrewriteProposition5.3.1asfollows.

Proposition5.3.1Forpositiveintegersn,

Inthiscase isdefinedusingDefinition5.3.2witha(i)=i.

Constructing a proof.We have to make use of the inductive definition in constructing a proof byinduction.InthiscasethestatementP(n)istheequationintheproposition.SoP(k)is

andP(k+1)is

Letusproceeddirectlytotheformalproof.

ProofWeuseinductiononn.

Basecase:For andthereforeInductivestep:Supposenowasinductivehypothesisthat

Page 50: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

forsomepositiveintegerk.Then

andso

asrequired.

Conclusion:Hence,byinduction, forallpositiveintegersn.Inductivedefinitionsareimplicitinthedefinitionsofseveralverycommonfunctionsinvolvingthe

non-negativeintegers.Herearesomefamiliarexamples.

Definition 5.3.3 For any real number x, the powers for non-negative† integers n are definedinductivelyby:

IfyoulookbacktotheproofofProposition5.1.2youwillseethatwemadeuseofthisintheform2k+1=2x2k.

Intheexpressionxn,thenumberniscalledtheindexortheexponentandthenumberxiscalledthebase.

Definition5.3.4Fornon-negativeintegersn,thenumbers ,written ,

aredefinedinductivelyby:

Noticethatn=0isthebasecaseinthisdefinition.Indeed, even the basic operations of addition and multiplication of integers can be defined

inductivelystartingfromthenotionofsuccessor(seeDefinition9.4.3).

5.4ThestronginductionprincipleFor completeness at this point we consider another variant of the inductive method although if the

Page 51: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

reader ismeetingthismethodofprooffor thefirst timetheremainderof thischapter(apart fromtheexercises)shouldbeomittedatfirstreading.ThemethodwillnotbeusedsubsequentlyuntiltheproofofProposition23.1.2.

SometimeswediscoverthatP(k+1)isnotimpliedbyP(k)alonebutisimpliedbythetruthofP(k)togetherwithsomeorallofP(1),P(2),…,P(k-1).Inthiscaseweworkwiththefollowingversionofinduction.

Axiom5.4.1(Thestronginductionprinciple)SupposethatP(n)

isastatementinvolvingageneralpositiveintegern.ThenP(n)istrueforallpositiveintegersnif

(i)P(1)istrue,and(ii)[P(n)holdsforallpositiveintegersn k] P(k+1),forallpositiveintegersk.

It is not difficult to see that this is equivalent to Axiom 5.1.1. In this case the basic template is asfollows.

ProofWeuse(strong)inductiononn.Basecase:[ProvethestatementP(1)]Inductivestep:Supposenowasinductivehypothesisthat[P(n)istrueforallpositiveintegersnk]forsomepositiveintegerk.Then[deducethatP(k+1)istrue].Thisprovestheinductivestep.Conclusion:Hence,byinduction,[P(n)istrue]forallpositiveintegersn.

AsanillustrationoftheuseofthisformofinductionweintroducetheFibonaccinumbers.

Definition5.4.2ForeachpositiveintegerndefinethenumberUninductivelyasfollows.

Thebeginningof this sequenceofnumbers is1,1,2,3,5,8,13,21,34,55,89,144,…,and thesequence isknownas theFibonacci†sequence.The importantobservationwhichconcernsusnow isthateachnumberisdeterminednotsimplybythepreviousoneasinasimpleinductivedefinitionbutbytheprevioustwonumbers.Thismeansthatwemustspecifythefirsttwonumbersasthebasecaseofthedefinition.

Proposition5.4.3(TheBinet†formula)TheFibonaccinumbersaregivenbythefollowingformula:

Itshouldbeobservedthatαandβaretherootsoftheequationx2-x-1=0andsoα2=α+1andβ2=β+1.The readermay find it remarkable that this formula for these integers involves which ismostcertainlynotan integer; in fact, aswewill see inChapter13, it isnot evena rationalnumber!There is in fact a general procedure for finding a general formula for sequences defined in thisway(these are called linear recursive sequences or linear difference equations) which bears a closeresemblance to elementarymethods for solving linear differential equations. Thismethod leads to aquadraticequationwheneachtermofthesequencedependsontheprevioustwoterms.

ThenumberαwascalledtheratiobytheGreeksandinthesixteenthcenturybecameknownasthe

Page 52: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

goldenratio.Arectanglewhosesidesareinthisratioiscalledagoldenrectangleandaconstructionforsucha rectangle isgiven inBookSixof theElementsofEuclid.Sucha rectanglewasconsidered tohaveidealproportions:itischaracterizedbythefactthatontheremovalfromtheendoftherectangleofasquarewithsidesequaltotheshortersidesoftherectangletheremainingrectangleissimilartotheoriginalrectangle(andsoisalsoagoldenrectangle).Asnincreases,theratioofsuccessiveFibonaccinumbers approachesthenumberα.

ProofTheaboveformulamaybeprovedbystronginductiononn.InthiscaseP(n)isthestatementintheproposition.Basecase:Forn=1,theformulagives(α-β)/√5=((1+√5)-(1-√5))/2√5=1=u1.

Since the inductive formula does not apply untilu3we have also to dealwith the casen = 2 bycalculation.Forn=2,theformulagives usingthefactsthatandInductivestep:Nowsupposeas inductivehypothesis that theformulaholdsforallpositiveintegersnsuchthatn kforsomepositiveintegerk 2.Then

asrequiredtoprovetheformulaforn=k+1.Conclusion:Hence,byinduction,theformulaholdsforallpositiveintegersn.

Exercises

5.1Provebyinductiononnthat,forallpositiveintegersn,n3-nisdivisibleby3.

5.2Provebyinductiononmthatm3 2mform 10.

5.3Provebyinductiononnthat,forallpositiveintegersn,n 1.

5.4Provebyinductiononnthat,foranyrealnumberx≠1andforintegersn 0,

5.5Provethat,foranyrealnumbersaandbandforintegersn 0,

5.6Fornon-negativeintegersndefinethenumberuninductivelyasfollows.

Page 53: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Provethatun=n3n-1forallnon-negativeintegersn.

5.7Provebyinductiononnthat,foranyrealnumbersxandyandfornon-negativeintegersmandn:

[Thesestatementsareknownasthelawsofexponentsorthelawsofindices.]†ThesignificanceofthisquotationwillbediscussedfurtherinSection9.4.

†Thefaultinthisanalogyisthatittakestimeforeachdominotofallandsoadominowhichisalongwayalongthelinewon’tfalloverforalongtime.Mathematicalimplicationisoutsidetime.†Thisdefinitionallowsx=0andn=0andsets00tobe1.ThisistheconventiononlyincertaincontextssuchasExercise5.4whereweusethenotation torepresentthegeometricprogression1+x+x2+…+xnevenwhenx=0.However,somecareisrequiredandincertainothercontextsitisnotpossibletoattachasensiblemeaningto00.AlittlemoreissaidaboutthisdifficultyinthesolutiontoExercise5.6andinafootnotetoExample9.2.4(b).

†LeonardoofPisa(ca.1180-1250),whopublishedhisbestknownbookLiberabaciin1202,wroteunderthenameofFibonacci.Hewaslargely responsible for introducing Hindu-Arabic algebra and numerals to Europe and is often considered the greatest Europeanmathematicianof theMiddleAges.Hisnamewasattached to thesenumbersby thenineteenthcenturynumber theoristEdouardLucasbecause of a problem in the Liber abaci concerned with the reproduction of rabbits whose solution involves them (see Problems I,Question24).Theearlynumbersoccurfrequentlyinnature,forexamplethenumberofpetalsinmostflowersisaFibonaccinumber.AlsothesequencehasmanybeautifulmathematicalpropertiesandthereisevenascholarlyjournalTheFibonacciQuarterlydevotedtoarticlesaboutthesequenceandrelatedtopics.†J.P.M.BinetwasaFrenchmethematicianoftheearlynineteenthcentury.

Page 54: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsI:Mathematicalstatementsandproofs

1. By using truth tables prove that, for all statements P and Q, the statement ‘P⇒ Q’ and itscontrapositive ‘(notQ)⇒ (notP)’ are equivalent. In Example 1.2.3 identify which statement is thecontrapositiveofstatement(i)(f(a)=0⇒a>0).Findanotherpairofstatementsinthatlistwhicharethecontrapositivesofeachother.

2.Byusingtruthtablesprovethat,forallstatementsPandQ,thethreestatements(i)‘P⇒Q’(ii)‘(PorQ)⇔Q’and(iii)‘(PandQ)⇔P’areequivalent.

3.Provethat thethreebasicconnectives‘or’,‘and’and‘not’canallbewrittenintermsof thesingleconnective‘notand’where‘PnotandQ’isinterpretedas‘not(PandQ)’.

4.Provethefollowingstatementsconcerningpositiveintegersa,bandc.

(i)(adividesb)and(adividesc)⇒adivides(b+c).(ii)(adividesb)or(adividesc)⇒adividesbc.

5.Whichofthefollowingconditionsarenecessaryforthepositiveintegerntobedivisibleby6(proofsnotnecessary)?

(i)3dividesn.(ii)9dividesn.(iii)12dividesn.(iv)n=12.(v)6dividesn2(vi)2dividesnand3dividesn.(vii)2dividesnor3dividesn.

Whichoftheseconditionsaresufficient?

6.UsethepropertiesofadditionandmultiplicationofrealnumbersgiveninProperties2.3.1todeducethat,forallrealnumbersaandb,

(i)a×0=0=0×a,(ii)(-a)b=-ab=a(-b),(iii)(-a)(-b)=ab.

7.Provebycontradictionthefollowingstatementconcerninganintegern.

n2iseven⇒niseven.

[Youmaysupposethatanintegernisoddifandonlyifn=2q+1forsomeintegerq.Thisisproved

Page 55: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

laterasProposition11.3.4.]

8.Provethefollowingstatementsconcerningarealnumberx.

9.Provebycontradictionthattheredoesnotexistalargestinteger.

[Hint:Observethatforanyintegernthereisagreaterone,sayn+1.Sobeginyourproof

Supposeforcontradictionthatthereisalargestinteger.Letthisintegerben.…]

10.Whatiswrongwiththefollowingproofthat1isthelargestinteger?

Letnbethelargestinteger.Then,since1isanintegerwemusthave1 n.Ontheotherhand,sincen2isalsoanintegerwemusthaven2 nfromwhichitfollowsthatn 1.Thus,since1 nandn 1wemusthaven=1.Thus1isthelargestintegerasclaimed.

Whatdoesthisargumentprove?

11.Provebycontradictionthattheredoesnotexistasmallestpositiverealnumber.

12.Provebyinductiononnthat,forallpositiveintegersn,3divides4n+5.

13.Provebyinductiononnthatn!>2nforallintegersnsuchthatn≥4.

14.ProveBernoulli’sinequality

forallnon-negativeintegersnandrealnumbersx>-1.

15.Forwhichnon-negativeintegervaluesofnisn! 3n?

16.Provebyinductiononnthat

forallpositiveintegersn.

17.Forapositiveintegernthenumberanisdefinedinductivelyby

Provebyinductiononnthat,forallpositiveintegers,(i)an>0and(ii)an<5.

18.Givenasequenceofnumbersa(1),a(2),…,thenumber isdefinedinductivelyby

Page 56: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProvethatWhathappensifx=1?

19.Provethat

forintegersn 2.

20. Prove that, for a positive integer n, a 2n × 2n square gridwith any one square removed can becoveredusingL-shapedtilesofthefollowing

shape: .

21.Supposethatxisarealnumbersuchthat isaninteger.Provebyinductiononnthatisanintegerforallpositiveintegersn.

[Fortheinductivestepconsider .]

22.Provethat

forpositiveintegersnandpositiverealnumbersxi.

[Itdoesnotseemtobepossibletogiveadirectproofofthisresultusinginductiononn.However,itcanbe proved forn = 2m form 0 by induction onm. The general result now follows by proving theconverseoftheusualinductivestep:iftheresultholdsforn=k+1,wherekisapositiveinteger,thenitholdsforn=k.]

23.Fornon-zero real numbersxwemay extendDefinition5.3.3 to a definitionof powersxn for allintegersnbydefiningx-m=1/xmforintegersm>0.Withthisdefinitionprovethelawsofexponentsforanynon-zerorealnumbersxandyandintegersmandn:

[Hint:StartfromExercise5.7.]

24.Fibonacci’srabbitproblemmaybestatedasfollows:

Page 57: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Howmanypairsofrabbitswillbeproducedinayear,beginningwithasinglepair,ifineverymontheachpairbearsanewpairwhichbecomeproductivefromthesecondmonthon?

Assuming that no rabbits die, express the number after n months as a Fibonacci number and henceanswertheproblem.UsingacalculatorandtheBinetformula(Proposition5.4.3)findthenumberafterthreeyears.

25.LetunbethenthFibonaccinumber(Definition5.4.2).Prove,byinductiononn(withoutusingtheBinetformulaProposition5.4.3),that

forallpositiveintegersmandn.Deduce,againusinginductiononn,thatumdividesumn.

26.Supposethatnpointsonacirclearealljoinedinpairs.Thepointsarepositionedsothatnothreejoininglinesareconcurrentintheinteriorofthecircle.Letanbethenumberofregionsintowhichtheinteriorofthecircleisdivided.Drawdiagramstofindanforn 6.

Provethatanisgivenbythefollowingformula.

[Here denotesthebinomialcoefficient discussedinmoredetailinChapter12.]

Page 58: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartIISetsandfunctions

Page 59: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

6Thelanguageofsettheory

The students’ task in learning set theory is to steep themselves in unfamiliar and essentially shallowgeneralitiestilltheybecomesofamiliarthattheycanbeusedwithalmostnoconsciouseffort.

PaulR.Halmos,Naivesettheory(adaptedslightly).

Thelanguageofsettheoryisusedthroughoutmathematics.Manygeneralresultsinvolve‘anintegern’ or ‘a real numbera’ and, to startwith, set theory notation provides a simplewayof asserting forexamplethatnisaninteger.However,itturnsoutthatthislanguageisremarkablyflexibleandpowerfulandinmuchmathematicsitisindispensableforaproperexpressionoftheideasinvolved.

In the second part of this book we introduce the basic vocabulary of the language of sets andfunctions.Thethirdpartofthebookwillthenprovidesomeexperienceinusingthislanguageasweuseittogiveapreciseformulationoftheideaofcounting,oneoftheearliestmathematicalconcepts.

6.1SetsAt this introductory level it is sufficient to define thenotionof set as anywell-defined collection ofobjects. We can think of a set as a box containing certain objects. In this section some ways ofspecifyingsetsareintroducedandalsosomefrequentlyusednotation.

We frequently use a single letter to denote a set. This represents a further stage ofmathematicalabstraction.Thereaderwillalreadyhaveacceptedtheabstractnotionofapositiveinteger,forexample‘two’ is abstracted from ‘two apples’ and ‘two chairs’. Nowwemove on to consider the set of allpositiveintegersasasinglemathematicalobject.Eachtimethereisfurtherstepofabstractionlikethisittakes time to become familiarwith new sorts of objects.At the end of this chapterwewillmake afurtherabstractionstepwhenweconsidersetswhicharecollectionsofsets!

Particular sets which are often used have standard symbols to represent them. In this book thefollowingwillbeused.

denotesthesetofallintegers.†denotesthesetofallpositiveintegers(natural‡orcountingnumbers):1,2,3,etc.denotesthesetofallnon-negativeintegers:0,1,2,3,etc.denotesthesetofallrationalnumbers(fractions).denotesthesetofallrealnumbers(i.e.numbersexpressibleasinfinitedecimals).denotesthesetofallpositiverealnumbers.denotesthesetofallnon-negativerealnumbers.denotesthesetofallcomplexnumbers.

Page 60: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Theobjectsinasetarecalledtheelements,membersorpointsoftheset.Wewrite

todenotethefactthattheobjectxisanelementofthesetE.Thusforexample isread‘a isanelementofthesetofrealnumbers’ormoresimplyjust‘aisarealnumber’.Thesymbol firstusedinthiswaybytheItalianmathematicianGiuseppePeanotowardstheendof thenineteenthcentury, isavariantof theGreekletterepsilonandcareshouldnormallybe takentodistinguish it fromthat letterwhichisusuallywritten However,somebooksdonotmakethisdistinctionanduseepsiloninplaceof Itiscommontouseuppercaseletterstorepresentsetsandlowercasetorepresentelementsbutthisisnotalwaysappropriate:ingeometryitisusualtouseuppercaseletterstorepresentpointsandlowercaseletters torepresent lines(whicharesetsofpoints);anotherexceptionoccurswhenaset isitselfconsideredasanelementofanotherset.

The negation of the statement iswritten Thus is the statement that is not arationalnumber.

Therearebasicallythreewaysofspecifyingaset:wecanlisttheelements,specifyaconditionformembership,orgiveaformulaoralgorithmconstructingtheelementsoftheset.

(a)ListingtheelementsofasetWhenwelisttheelementsofasetwedenotethesetbyenclosingtheelementsincurlybrackets.Thus

isthestatementthatAisthesetwhosefourelementsare1,3,πand-14.Inthiscasewehave andNotice that the order inwhich the elements are listed is unimportant and repeating an element

makesnodifference.Thus,fortheabovesetAwealsohave

On the face of it the listing notation is only practical for sets with a small number of elements.Howeveritcanbeextendedtolargeoreveninfinitesets.Forexamplewecanwrite

whereasusualthedotsareread‘andsoon’.

(b)TheconditionaldefinitionofasetAlternatively,asetmaybedescribedbyspecifyingsomeconditionwhichdetermineswhetherornotanobject is an element of the set.Let us illustrate thiswith an example.Consider the setB defined asfollows:

Herewewrite simplytoindicatethesortofobjectsthatweareconsidering.Thestatement0<n<6 is a predicate. The definition means that B is the set of integers which when substituted in thispredicategiveatrueproposition,i.e,givenanintegern,

Page 61: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Ofcoursewecouldhavedescribedthisparticularsetbylistingtheelements,

butinsomecasesthisisdifficultorimpossible.In the conditional definition of a set the vertical line† ‘|’ is read as ‘such that’ and so the above

definitionwouldbereadas‘Bisthesetofintegersnsuchthat0<n<6’orjust‘Bisthesetofintegersbetween0and6’.Thislastreading,whichmakesnoreferencetothevariable‘n’,demonstratesthatthesymbolninthisdefinitionrepresentsadummyvariable:itsonlyrôleistoindicatetheinternallogicofthedefinitionand itcanbe replacedbyanyothersymbol (notalready inuse)withoutanychange inmeaning.Thuswecouldequallywrite

Noticethat,although0<n<6isapredicateandsoamathematicalstatementinthesenseofChapter1, isnotastatement;itissimplyamathematicalobjectandcanbenomoretrueorfalsethanthenumber2canbetrueorfalse.However,wecanmakestatementsaboutthisobject,suchas whichistrue,or whichisequivalentto‘m and0<m<6’.

(c)TheconstructivedefinitionofasetTheothersystematicmethodofdescribingasetistogiveaformula(ormoregenerallyanalgorithm)constructingtheelementsoftheset.Forexample

is the setof integer squares,whichmeans that the formulan2 constructs theelementsof the set asntakesallpossible integervalues, i.e,anelement is in theset ifandonly if itcanbewrittenasn2 forsome integern. Notice that in this case all non-zero elements in the set arise twice. Thismakes nodifferencetothesetsothatforexample definesthesameset.

Similarly,

isthesetofevenintegers,and

isthesetofrationalnumbers, .Thislastexampleillustratestheconventionthatwhenmorethanoneconditionislistedafterthesymbol‘|’thismeansthatalltheconditionsmustbesatisfiedforanobjecttobeinthesetsothattheword‘and’isunderstood.

EqualityofsetsQuitecommonlyproblemsinmathematicstaketheformofseekingtopassbetweendifferentwaysofspecifying theelementsofaset.Forexamplewhenwelearnhowtosolvequadraticequationsof theformax2+bx+c=0,wherea,bandcaregivenrealnumbers,wearelearninghowtolisttheelements

Page 62: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

of the set or possibly the set if we allow complexsolutions.

Definition6.1.1TwosetsAandBare written if theyhavepreciselythesameelements,i.e.A=Bmeans

Toputitanotherway:asetisdeterminedbyitselements.NoticethatthismeansthattoshowthattwosetsAandBareequalitisnecessarytoprovetwothings(althoughtheycanoftenbedonetogetherinsimplecases):everyelementofAisanelementofBandconverselyeveryelementofBisanelementofA.

Example6.1.2

Constructingaproof.Thisisanotherwayofstatingthat,forxarealnumber,

Thisiseasilyprovedbythefactorizationmethod.

ProofForxarealnumber, (byProposition4.4.1)Hencex2–x–2=0ifandonlyifx=–1orx=2,asrequired.

Atthisstageitisconvenienttointroducetwootherideasfromsettheory.

Definition 6.1.3The is the unique set which has no elements at all. It is denoted by the

symbol .

Thusthestatementthatthequadraticequationx2+2x+2=0hasnorealsolutionsmaybewritten

Take care to distinguish ‘ ’ which is a variant of a Scandinavian letter from theGreek letter phiwritten‘ ’.

Definition6.1.4GivensetsAandBwesaythat ,written ,or ,wheneveryelementofAisanelementofB,i.e. IfAandBareinadditionunequalsothatBcontains

someelementnotcontainedinA,thenwesaythatAisa subsetofBandwrite .†Thus

Itisimportanttodistinguishbetweenthesymbols and althoughtheyarecloselyrelatedasfollows:

Ifsetsaredefinedbypredicatesthenthereisacorrespondencebetweenthenotionsof‘implication’and‘subset’:theuniversalstatementthat foralla Aisequivalenttothestatementthattheset isasubsetof

NoticethatifA BandB CthenA Csince and togetherimplythatFurthermore AforallsetsAwhereasA onlyifA= .

Page 63: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

6.2OperationsonsetsDefinition6.2.1GiventwosetsAandBwecartformthesetofelementswhichliebothinAandinB.

Thisiscalledthe ofAandBandisdenotedby .Thus

TwosetsAandBaresaidtobe ifA∩B= ,i.e.AandBhavenoelementsincommon.

Definition6.2.2GiventwosetsAandBwecanformthesetofelementswhichlieinAorlieinB.This

iscalledthe ofAandBandisdenotedby .Thus

Definition6.2.3GiventwosetsAandBwecanformthesetofelementswhichlieinAbutnotinB.This

iscalledthe ofAandBandisdenotedby† .Thus

NoticethatA∩A=A=A∪A,A∩ = ,A∪ =A,A–A= andA– =A.

Proposition6.2.4Givenany two setsAandB, the three setsA∩B,A–BandB–Aarepairwisedisjoint(i.e.eachpairofthesesetsisdisjoint)and

Probablythesimplestwaytoproveastatementlikethisisbymeansoftruthtablesasfollows.ProofConsiderthetruthtablesonthefollowingpage.

Thefactthatthefinaltwocolumnsofthesecondtablearethesametellsusthattheaboveequalityofsetsholds.ThefactthatnorowhasmorethanoneTinthethird,fourthandfifthcolumnsofthefirsttabletellsusthatthethreecorrespondingsetsaredisjoint.

Inthetruthtablesintheaboveproofthecolumnsareheadedbystatementsx A,x B,etc.whichcanbetrueorfalse,notsimplybythenamesofthesetsA,B,etc.whichwouldnotbestatements.

ThisproofillustratesthecloserelationshipbetweenthelogicalconnectivesintroducedinChapter1

Page 64: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

and theoperationson setsdefinedabove in termsof thoseconnectives.Proofsof theabove typeareusuallyillustratedbyaVenndiagram.WeindicateasetAbytheinteriorregionofsomecurvedrawnonthe page so that the elements of the set correspond to points in the region.Thus for example in thefollowingdiagramx Abuty A.

TwogeneralsetsAandBaredescribedbytwooverlappingregions.Considerthefollowingdiagram.

Heretheinterioroftheleft-handrhombus(regions1and2)denotesAandtheinterioroftheright-handrhombus(regions1and3)denotesB.Thenthefourrowsoftheabovetruthtablescorrespondtothefourregions in thediagram.Thusregion1corresponds toA∩B, region2corresponds toA–B,region3correspondstoB–Aandthethreeregions1,2and3togethergiveA∪B.Thefactthatregions1,2and3aredisjointcorrespondstothefactthatthethreesetsontheright-handsideofExample6.2.4aredisjointandthefactthatthesethreeregionstogethermakeupA∪Bcorrespondstotheequalityofsets inProposition6.2.4.From this point of view the result is essentially obvious.Care is needed inusingthissortofdiagrammaticproofinmoreelaborateexamplesbecauseunlesspropercareistakenitissometimespossibletodrawadiagramthatdoesnotincludeallpossibleregionsorsomefeatureofthediagramhasnothingtodowiththesettheory(seeforexamplethesolutiontoExercise6.6).Noticethatthisdiagramdoesnot imply thatA∩B isnon-empty for itmaybe that therearenoelements in theregion1.However,ifweweregiventhatA∩B= thenwecoulddenotethisbythefollowingVenndiagram.

WecanrepresentA Basfollows.

Page 65: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

6.3Thepowerset

Definition6.3.1The ofasetX,denotedby ,isthesetofallsubsetsofthesetX.ThusAP(X)isanotherwayofwritingA X.

Example6.3.2IfX={a,b,c}then

Noticethattheemptyset isanelementofthepowerset foranysetXsince X.Asetlike{a}withasingleelementiscalledasingleton.Itisimportanttodistinguishthesingletonset{a}fromtheelementa.Inparticularthesingleton{ }istobedistinguishedfromtheemptyset :aboxcontaininganemptyboxisnotanemptybox!

Itisoftenthecasethatallthesetsweareconsideringaresubsetsofsomefixedset,saythesetofrealnumbers.Wethenconsiderthistobetheuniversalset.

Definition6.3.3Oncewehave fixedauniversalsetUwecandefine the ofany ,

denotedby ,tobethedifferenceofUandA.Thus

Forexample,iftheuniversalsetis ,thesetofintegers,andEisthesetofevenintegers,thenthecomplementEcisthesetofoddintegers.

Theintersection,unionandcomplementofsubsetsofsomeuniversalsetUcorrespondtothelogicalconnectives‘and’,‘or’and‘not’.Therelationshipsbetweentheseoperationsmaybesummedupinthefollowingtheorem.

Theorem6.3.4LetA,BandCbesubsetsofsomeuniversalsetU(i.e.A,B,C ).Thenwehavethefollowingidentities.

(i)associativity:(ii)commutativity:(iii)distributivity: .(iv)DeMorganlaws.†(v)complementation:(vi)doublecomplement:

Thesecanbeprovedby truth tablesorVenndiagrams.Alternatively theycanbeprovedbyusing

Page 66: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

logicalargumentfromthedefinitions.Letusillustratethisbywritingouttheproofofonepart.

Proofof

Proofof‘ ’:Supposethat Thenx Aand Since or Ifx Bthen,sincex Aaswell,wehave andso asrequired.Ontheotherhand,ifxB,thenwemusthavex Candso,sincealsox A,wehave andso

Proofof‘ ’:Supposenowthat Then or .If ,thenx Aandx Bsothatx Aand whichgives asrequired.Ontheotherhandif then

andagainweget

We can now use these results to derive other set identities by algebraicmanipulation.Here is anexample.

Proposition6.3.5

ProofFirstnoticethatcommutativitymeansthatdistributivityononesideimpliesdistributivityontheothersidesothatTheorem6.3.4(iii)impliesthat

Theassociativityoftheunionoperationmeansthatwedonotneedanyadditionalbracketshere.

Exercises6.1 The following are standard subsets of the set of real numbers known as the real intervalswithendpointstherealnumbersaandb.

Theopeninterval:Theclosedinterval:Therighthalf-openinterval:Thelefthalf-openinterval:

(i)Provethat and(ii)Findtheelementsoftheset(iii)Provethat(a,b)= ifandonlyifa b.[Hint:Provethecontrapositive.]Findthecorrespondingresultsfortheotherrealintervalswithendpointsaandb.(iv)Provethat,ifa b,then[a,b] (c,d)ifandonlyifc<aandb<d.

6.2Provethat

Page 67: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

6.3Findpredicateswhichdeterminethefollowingsubsetsofthesetofintegers :(i){3},(ii){1,2,3},(iii){1,3}.

6.4Byusingatruthtableprovethat DrawaVenndiagramtoillustratetheproof.

6.5Provethat

6.6Provebycontradictionthat,if andx B,thenx A–C.[Workfromthedefinitionsof‘A∩B’,‘A–C’,and‘ ’.]

6.7 Using thefact thatan implication isequivalent to itscontrapositive,prove that, forsubsetsofauniversalsetU,A BifandonlyifBc Ac.†Thissymbolcomesfrom’Zahlen’,theGermanwordfor‘numbers’.

‡Somepeopleincludethenumber0inthesetofnaturalnumbersbutthisseemstomeunnaturalasweusuallystartcountingat1.Becauseofthisambiguity,inthisbookwewillnormallyreferto‘thenon-negativeintegers’or‘thepositiveintegers’dependingonwhetherornotthenumber0isincluded.† Alternative notations are to use a colon ‘:’ or a semi-colon ‘;’ here instead of ‘|’ as follows:

†Somemathematiciansuse⊂where isusedinthisbook.InfactwhenPeanooriginallyintroducedthisnotationheusedittheotherwayround,writingA⊃BtoindicatethatAisasubsetofB!† The reader should be aware that this notation is sometimes used in algebra to denote the set In this case thedifferenceofthetwosetsAandBisdenotedbyA\B.

†TheseresultswasobservedindependentlyinthenineteenthcenturybytheBritishmathematicianAugustusDeMorganandtheUnitedStatesmathematicianBenjaminPeirce(seeC.B.BoyerandU.C.Merzbach,Ahistoryofmathematics,Wiley,Secondedition1989).Theycorrespondtotheequivalenceofthestatements‘not(PandQ)’and‘(notP)or(notQ)’commentedoninthesolutiontoExercise1.2.

Page 68: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

7Quantifiers

In Chapter 1 a predicate was described as an expression containing one or more free variables; itbecomesaproposition,andsoistrueorfalse,whenaspecificvalueisassignedtoeachfreevariable.Ofcoursewhetherthispropositionistrueorisfalseusuallydependsonthevaluesselected.

However,wesaw in the lastchapter thatapropositioncanbecreated fromapredicate inanotherway–bymakinga statementabout the setofvaluesof the freevariableswhichmake it true.Manyresults inmathematics take the formof listing the values of this set, for examplewhenwe solve anequation.Butoftenresultssimplyaddressthequestionofwhetherthereisanychoiceofvaluesofthefree variables resulting in a true proposition and whether there is any choice resulting in a falseproposition.Statementsthatsuchvaluesexistareknownasexistentialstatements.Statementsthattheydo not can be thought of as universal statements. We met examples of universal statements whendiscussingimplicationsinChapter2.

Inthischapterwediscussgeneraluniversalandexistentialstatements.

7.1UniversalstatementsSupposethatP(a) isapredicatewithasinglefreevariableawithpossiblevalues inasetA.UsuallyP(a)istrueforsomeelementsofthesetAandfalseforothers,andinthelastchapterwedescribedhowsuch a predicate could be used to describe a subset ofA, denoted by {a A |P(a)}, the subset ofelementsofA forwhich thestatementP(a) is true. Incertaincases thissubset is thewholeofA; thestatementthatthisoccursisauniversalstatement.

Definition7.1.1Thenotation isanalternativewayofwriting

Itisread:‘foreachelementainthesetAthepropositionP(a)istrue’or‘P(a)istrueforeachainthesetA’.

Inthisnotation,thecommabetween‘∀a A’andthepredicate‘P(a)’isincludedsimplytoclarifytheexpression.Sometimesbracketsareused.Thesymbol‘∀’iscalledtheuniversalquantifiersymbolandisread‘foreach’,‘forevery’,‘forall’or‘forany’.Inthisbookwewilladopt thepracticeofputtingquantifiersbeforethepredicatestowhichtheyrefer.However,wewillusuallywritethesestatementsinwordsandinthiscaseshowmoreflexibilityabouttheorder.

AsanexampleconsiderProposition3.1.4whichassertsthat.a2>0foranynon-zerorealnumbera.Thisisastatementaboutthesetofnon-zerorealnumbers, –{0}.Thepredicateis‘a2>0’.Wemay

Page 69: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

writethestatementinsymbolsas

orequivalently

Athirdwayofwritingthestatementisastheuniversalimplication

andifyoulookbacktoChapter3youwillseethatthisishowweprovedthestatement.Noticethatinallthreeoftheseexpressionsaisa‘dummy’or‘bound’variableandcanbechangedto

anyothersymbolwithoutchangingthemeaning.Forexample

isequivalenttotheabovestatements.

7.2ExistentialstatementsWenow turn to thenegationof a universal statement: the statement that it is false. InChapter2weconsideredthestatement forrealnumbersxandexplainedthatthismeantthattheuniversalstatementx>0 x 1,whichisshorthandforthestatement x (x>0 x 1),isfalse.Table2.1.2describedthebehaviourfordifferentvaluesofxandofcourse,foranyxsuchthat0<x<1,x>0istrueandx 1isfalsesothatx>0 x 1isfalse.However,todemonstratethat x (x>0 x 1) isfalsewesimplyhavetoshowthatthereisasinglevalueofx forwhichx>0 x 1isfalse,i.e,x>0andx 1,inotherwordstheset{x |x>0andx 1}isnon-empty.Thesimplestwaytodothisistogiveaspecificelementintheset,suchas1/2:1/2>0and1/2 1.Suchastatement,thatthesubsetdefinedbyapredicateisnon-empty,iscalledanexistentialstatement.

Definition7.2.1Thenotation isanalternativewayofwriting

Itisread:‘forsomeelementainthesetAthepropositionP(a)istrue’or‘P(a)istrueforsomeainthesetA’.

Thesymbol‘∃’iscalledtheexistentialquantifiersymbolandisread‘forsome’,‘foratleastone’orsometimes‘thereexists…suchthat’.

Remarks7.2.2Noticethattheword‘any’sometimesindicatesauniversalstatementandsometimesanexistentialstatement.

The normalmeaning of ‘any’ is ‘every’ as in ‘a2 0 for any real numbera’. This is a universalstatementwhichcanbewrittensymbolicallyas‘∀a ,a2 0’.However,innegativeorinterrogativestatements‘any’isusedidiomaticallytomean‘some’.Forexample,‘Thereisnotanyrealrealnumberasuchthata2<0’isassertingthattheexistentialstatement‘∃a∈ ,a2<0’isfalse.And‘Isthereanyrealnumberasuchthata2=2?’isaskingwhethertheexistentialstatement‘;∃a∈ ,a2=2’istrue.

Page 70: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Fowler†givessomenon-mathematicalexamples:‘Haveyouanybananas?’withthepossibleanswers‘Nowehaven’tanybananas’and‘Yeswehavesomebananas’.

Realcareisrequiredwithquestionsinvolving‘any’.‘Isthereanyintegerasuchthata 1?’seemsclearenoughandisaskingwhether‘∃a∈ ,a 1’istrue.But‘Isa 1foranyintegera?’seemslesscleartomeandmightbetakentoaskingaboutthesamestatementasthefirstquestion,‘∃a∈ ,a 1’(whichistrue)butmightalsobetakentobeaskingabout‘ a∈ ,a 1’(whichisfalse).Greatcareisneededinusing‘forany’ininterrogativestatements.

7.3ProvingstatementsinvolvingquantifiersAn enormous number of results in advanced mathematics- take the form of asserting the truth orfalsehood of some universal or existential statement; this is one of the factors which distinguishesadvancedfromelementarymathematicsandmanyoftheresultsinthisbooktakethisform.Thissectionprovides an overview of themainmethods of proof but in effectmuch of thewhole book is aboutprovingsuchresults.

(a)ProvingstatementsoftheformWeusuallyprovestatementsofthisformbyrewritingthemintheform

AnexampleofthisistheproofofProposition3.1.4whichwehavealreadydiscussed.

(b)Provingstatementsoftheform∃a∈A,P(a)Weoftenprovestatementsofthisformbysimplyexhibitingaparticularelementa AforwhichP(a)istrue.Thisisproofbyexample.

Example7.3.1Toprove∃n ,n2=9.

SolutionObservethat3 and32=9andson=3providesanexampleprovingthisstatement.There are, however, less direct methods of proving existential statements such as the use of the

countingargumentswhichwillbeconsideredinChapter11.

(c)ProvingstatementsinvolvingbothquantifiersVerymanystatementsinvolvebothquantifiers.ConsidertheresultofExercise3.3.

Proposition7.3.2Forintegersn,ifniseventhenn2iseven.

Thisisauniversalimplication: n (niseven n2iseven).However,thehypothesisthatnisevenisanexistencestatement,whichmaybewritten Wecanuse thisbymakinguseofsomespecific integerq such thatn = 2q. Thuswe begin the proof of this result, by the directmethod, asfollows.

Supposethatnisaneveninteger.Thenn=2qforsomeintegerq.

Page 71: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Theconclusionwhichweareaimingforisthestatementthatn2iseven,whichmaybewritten,againspellingoutthedefinition,∃q ,n2=2q.Recall that insuchstatements thesymbol ‘q’ isadummyvariableand’itsonlyroleistogluethenotationtogether:inwordswecouldwritethisas‘n2istwicesome integer.’Wecould replaceq by any other symbol not already in use, for exampleIndeedinthiscaseweoughttodothissincethesymbolqisalreadyinuse:whenwewrote‘Thenn=2qforsomeintegerq’wewereusingqtodenotesomespecificintegerwiththepropertythatn=2q.Itisonlybydoingthisthatwecanmakeuseoftheexistencestatement.Wecannowproceedtofindanintegerpsuchthatn2=2pandcompletetheproofasfollows.

Thereforen2=(2q)2=4q2=2(2q2)andso,since2q2isaninteger,n2iseven.Hence,ifniseven,thenn2iseven.

Thisisactuallywrittenoutwithoutreferenceto‘p’althoughwecouldhavesaid‘n2=2pwherep=2q2isanintegerandson2iseven.’

Thereisagenuineambiguityaboutthestatement‘n=2qforsomeq ’.Itmaybetheexistentialstatementthattheintegerqexistsandthisiswhatismeantbythestatement Alternatively,itmaybethestatementthatqisaspecificintegersuchthatn=2qasoccursinthisproof.Thestatementwiththesecondmeaningispossiblebecauseofthestatementwiththefirstmeaning,andwecouldmakethisclearbywritingouttheproofasfollows.

Supposethatniseven.Then Soletq1beanintegersuchthatn=2q1.Then.Hence,since isaninteger, Thusn2iseven.

Hence,ifniseventhenn2iseven.

InpracticethisdistinctionisblurredandIwouldencouragethereadernottoworryaboutit–itisacasewhere ambiguity is better than pedantry.Most problems are avoided so long as a different dummyvariableisusedeachtimeadefinitioninvolvingaquantifierisusedintheproof.

7.4DisprovingstatementsinvolvingquantifiersTheideaofdisprovingstatementscanappearalittlestrangeatfirst,buttosomeextentthisisamatterofpresentation:disproving’P’isthesameasproving‘notP’.

(a)Disprovingstatementsoftheform a A,P(a)Wehavealreadyobservedthatthenegationofthisstatementisthestatement

andsowecandisprove itbygivingasingleexample forwhich it is false.This iscalleddisproofbycounterexampletoP(a).

Example7.4.1Todisprovethestatement x∈ ,x2>2.

SolutionAcounterexampleisprovidedbyx=1since1 and12=1 2.Great care is required in interpreting negatives of universal statements in everyday speech. For

exampleconsider thestatement‘All themembersof theclassarenothere’whichwouldnormallybetaken to be the negative of the universal statement ‘All themembers of the class are here’, in other

Page 72: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

words ‘Some member of the class is not here.’ This differs from our careful usage. Consider amathematicalstatementofthesamestructure:‘Allthenumbersinthesetarenoteven.’Thismustmeanthe same as ‘All the numbers in the set are odd’ since ‘odd’means the same as ‘not even’.But theeverydayusageindicatedabovewouldgive‘Somenumberinthesetisodd.’Takecaretouselanguageformswhicharenotopentomisunderstanding:ifwewishtoindicateanabsencefromaclassthenweshouldsay‘Notallthemembersoftheclassarehere.’Butthen,awayfrommathematics,onecanhavealotoffunwithambiguity!

(b)Disprovingstatementsoftheform∃a A,P(a)Thenegationofthisstatement,oftenwritten

isthestatement

andthisgivesonewayofdisprovingthestatement.WemadeuseofthisfactintheproofofProposition2.2.4.Hereisanotherverysimpleandfamiliarexample.

Proposition7.4.2Theredoesnotexistarealnumberxsuchthatx2=–1.

ProofWeknowthat,forallx ,wehavetheinequalityx2 0andsox2≠–1.Hencetheredoesnotexistx suchthatx2=–1.

The other way of disproving an existence statement is by contradiction. Here we show that thestatementP(a) where a A necessarily leads to a contradiction. Proposition 4.1.1 which is a non-existencestatementwasprovedusingthismethod.

7.5ProofbyinductionWe can reformulate themethod of proof by induction using the language of set theory.Recall fromChapter5thatinductionisusedtoprovestatementsoftheform Suchastatementcanbe.rewrittenas Thus inductioncanbe thoughtofasamethodforproving thatcertainsubsets of , the set of positive integers, are in fact thewhole set. From this point of viewwe canexpresstheinductionprinciple(Axiom5.1.1)asfollows.

Axiom 7.5.1 (The induction principle reformulated) Suppose that A is a subset of , the set ofpositiveintegers.ThenA= if

ThisstatementreducestoAxiom5.1.1ifweputA={n∈ |P(n)}.ItcanbededucedfromAxiom5.1.1ifwewriteP(n)forthepredicaten A.

Inductionisquiteoftenformulatedinthismoreformalway.

7.6Predicatesinvolvingmorethatonefreevariable

Page 73: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Wehavealreadymetanumberofuniversalandexistentialstatementsinvolvingmorethanonevariable.IfP(a,b) is apredicate involving two freevariablesa Aandb B thenwe can formpropositionsinvolvingquantifiersasfollows.

Themeaningofthefirsttwooftheseisfairlyclear.Examplesofthesewhichwehaveareadymetareasfollows.

Proposition3.1.1

Proposition3.2.1

Proposition4.1.1Itisnottruethat

Noticeintheseexamplesthat‘ a,b A’isashorthandfor‘ a A’,‘ b A’andsimilarlyfor‘∃’.Statements involving both quantifiers require some care in particular regarding the order of the

quantifiers.Considerforexamplethepredicate‘m<n’involvingpositiveintegersmandn.

Example7.6.1

Thisisthestatementthat orthat Noticehowtheuseofthesinglequantifier‘ ’leadstoapredicate‘ ,m<n’withasinglefreevariablem.Wecanthenconsiderforwhichvaluesofm thispredicateis true.Inthiscaseweareconsideringtheassertionthatitholdsforallpositiveintegersm.Thismeansthatforeachpositiveintegerm,thereexistsagreaterintegern.This isclearly thecaseandwecanprove itbyexample: taken=m+1.Wecanwriteoutaformalproofasfollows.

ProofThisresult is truebecause,givenapositive integerm, ifweputn=m+1 thenn isapositiveintegerandm<n.

Example7.6.2∃n , m ,m<n.

Thisisthestatementthattheset isnon-empty.Forapositiveintegerntobeinthissetwemusthave m ,m<n,inotherwordsitmustbegreaterthanallpositiveintegers.Butitcertainly isn’t greater than n itself and so we can disprove the statement m ,m < n by thecounterexamplem=n.Writingthisoutformallygivesthefollowing.

ProofThisresultisfalsebecause,foreachpositiveintegern,ifweputm=nthenmisapositiveintegerandm nsothatm=nprovidesacounterexampletothestatement m∈ ,m<nwhichisthereforefalse.

Alternatively, theproofmightbewrittenmorebrieflyas follows leaving thereader tosortout thequantifiers.

ProofThisresultisfalsebecause,foreachpositiveintegern,ifweputm=nthenmisapositiveintegerandm n.

Page 74: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Example7.6.3 n ,∃m ,m<n.

Letusconsidertheset{n |∃m ,m<n}.Thisisthesetofpositiveintegerswhicharestrictlygreaterthansomeotherpositiveinteger.Ifn>1thenndoeslieinthissetsincewecantakem=n–1butontheotherhand1isnotanelementofthissetsince m∈ ,m 1.Hence{n |∃m ,m<n}=−{1}since1doesnotlieinthissettheuniversalstatementisfalse.Allweneedsayisthefollowing.

ProofThisstatementisfalseandacounterexampleisn=1sincem 1forallpositiveintegersm.

Example7.6.4

Thisisthestatementthattheset isnon-empty.Forapositiveintegermtobeinthissetwemusthave inotherwordsitmustbesmallerthanallpositiveintegers.Butitcertainly isn’t smaller than itself and so we can disprove the statement by thecounterexamplen=m.Writingthisoutformallygivesthefollowing.

ProofThisresultisfalsebecause,foreachpositiveintegerm,ifweputn=mthennisapositiveintegerandm n so thatn =m provides a counterexample to the statement which is thereforefalse.

Thealternativemoreusualbrieferformisasfollows.

ProofThisresultisfalsebecause,foreachpositiveintegerm,ifweputn=mthennisapositiveintegerandm n.

Thereadershouldcarefullycompare theproofs inExample7.6.2andExample7.6.4.Although inbothcasestheimplicationusedisthatifm=nthenm n,inthefirstexamplewestartfromageneralpositiveintegernandthendefinembym=n,whereasinthesecondexamplewestartfromageneralpositiveintegermandthendefinenbyn=m.ThedistinctionmaybeclarifiedwhenthereaderdoesExercise7.2.

7.7TheCartesianproductoftwosetsAtthebeginningofthischapterweintroducedquantifiersintermsofpropertiesofthesubsetdefinedbya predicate involving one free variable. Predicates involvingmore than one free variable also definesubsets–ofasetknownastheCartesianproduct.Forsimplicitywerestrictattentiontothecaseoftwofreevariables.

Definition7.7.1GivensetsXandY,the ofXandY,denotedby ,isthesetofallorderedpairs(x,y)wherex XandY Y.Thus

Inreferring toan in thisdefinitionwemean that twosuchpairs, (x1,y1)and (x2y2),areequal, (x1,y1)= (x2y2), if and only if x1 =x2and y1 = y2.We say that the ordered pair (x, y) has

xandy.WhenY=XwewriteX×X=X2.

Wecanpicturepoints in theCartesianproductasfollowsusinglinestorepresent thesetsXandY

Page 75: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

andarectangletorepresentX×Y.Itiscustomarytouseahorizontallinetodenotethefirstsetandaverticallinetodenotethesecondset.

Examples7.7.2(a)ForX={a,b,c}andY={a,b},

X×Y={(a,a),(a,b),(b,a),(b,b),(c,a),(c,b)}

and

Y×X={(a,a),(a,b),(a,c),(b,a),(b,b),(b,c)}.

Noticethatthesetwosetsaredifferent.

(b) 2= × isthefamiliar2-dimensionalEuclideanplane.

NowgivenapredicateP(a,b) involvingfreevariablesa Aandb B,wecandefine thesubsetoftheCartesianproduct.Thisisfamiliarin 2fromthestudyofplanecurvesusing

themethodsofCartesiangeometry;wecandescribecertainsubsetsof 2bygivinganequation.Forexamplewesaythatthecirclewithcentre(0,0)andradius1hasequationx2+y2=1tomeanthatthesetofpointsin 2whichlieonthiscircleisgivenby

Example7.7.3To illustrate the relationship betweenuniversal and existential statements involving apredicatewithtwofreevariablesandthesubsetdefinedbythepredicatewelookagainattheexamplesconsideredintheprevioussection.Wecandrawpartofthepictureofthesubset

asinthediagramonthenextpage.Herethesoliddots(•)indicatetheelementsoftheCartesianproductforwhichthepredicatem<nis

trueandthecircles(°)thoseforwhich

Page 76: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

itisfalse.Thus(2,10)isinthesubsetdeterminedbythepredicatewhereas(9,3)isnot.Wenowconsidereachexampleinturn.

Example7.6.1 ThisistruebecauseeachverticallineofelementsintheCartesianproductcontainsanelement in the subset, forexample thevertical lineof pointswhose firstcoordinateism,containsthepoint(m,m+1).

Example7.6.2 Thisisfalsebecausenohorizontallineliesentirelyinthesubset,forexample thehorizontallineofpointswhosesecondcoordinateisn,containsthepoint(n,n)whichdoesnotlieinthesubset.

Example 7.6.3 This is false because there is a horizontal line containing noelementsofthesubset,namelytheline

Example7.6.4 This is falsebecauseeachvertical linecontainsapointnot in thesubset,forexample containsthepoint(m,m).

ToconcludethischapterherearesomestandardresultsrelatingtheCartesianproducttounionandintersection.

Proposition7.7.4ForallsetsA,B,CandDthefollowinghold:

Thesestatementsmaybeproveddirectlyfromthedefinitions.Asanillustrationhere isaproofofpart(ii).(Part(iv)appearsasExercise7.7andpart(iii)appearsinProblemsII,Question13.)

Proofofpart(ii)Aproofthattwosetsareequalrequiresustoprovetwosetinclusions.Inthiscasewecandothemtogetherasfollows.

Page 77: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Exercises7.1Determinethefollowingsets:

7.2Proveordisprovethefollowingstatements.

7.3Proveordisprovethefollowingstatements.

7.4Proveordisproveeachofthefollowingstatements.

7.5Provethefollowing:

7.6Writethefollowinguniversalstatementintermsofquantifiersandproveit.

Forintegersaandb,ifaandbareeventhensoisa+b.

7.7ForsetsA,B,CandDprovethat

andgiveanexampletoshowthatthesesetsarenotalwaysequal.

7.8Supposethattheset isgivenbythetriangularregionsinthediagrambelow.

Page 78: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Decidewhethereachofthefollowingstatementsistrueorfalse.

7.9FindareformulationofAxiom5.4.1(thestronginductionprinciple)asamethodofprovingthatsubsetsof arethewholeset(similartoAxiom7.5.1).†H.W.Fowler,AdictionaryofmodernEnglishusage(revisedbyErnestGowers),OxfordUniversityPress,Secondedition1968.

Page 79: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

8Functions

Thenotionof function is one of themost fundamental inmathematics. It is probably familiar to thereader in the contextof calculus, and it ishere that the conceptwas first clarifiedand thedifferencebetween a function and a formula properly understood in the early years of the nineteenth century.Today,thelanguageoffunctionsisusedthroughoutmathematics.

In thischapter the functionconcept is introduced.Wediscussvariouswaysofdefininga functionandconsiderthegraphofafunction.

8.1Functionsandformulae

Definition8.1.1SupposethatXandYaresets.A ,mapormappingfromthesetXtothesetYistheassignmentofauniqueelementofYtoeachelementofX.If f isafunctionfromXtoYwewrite

anddenote theelementofYassigned toanelementx∈Xby writing .Theelementf(x)∈Yiscalledthe offatx∈Xorthe ofxunderf.ThesetXiscalledthe

ofthefunctionfandthesetYiscalledthe .

Example8.1.2Themostbasicwayofdescribingafunctionisbylistingthevalues.Forexample,givenX={x1,x2,x3,x4}andY={y1,y2,y3,y4,y5},thefollowingtabledeterminesafunctionf:X→Y.

WedeterminethevalueofthefunctionatanelementofXbylocatingthatelementinthefirstrowandreadingdowntothesecondrow.NoticethateachelementofthedomainXoccurspreciselyonceinthefirstrowsothat this isawell-definedprocedure.OntheotherhandelementsofthecodomainYmayoccuronceinthesecondrow,buttheymayalsooccurmorethanonceornotatall:anelementofthecodomainmaybethevalueofthefunctionatseveralelementsofthedomainormaynotbeavalueatall.

Wecanpicturethisfunctionasfollows.

Page 80: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

HerewefindthevalueoffatanelementofthedomainXbyfollowingthearrowwhichbeginsatthatelement.Eachelementof thedomain liesat thebeginningof justonearrowso this isawell-definedprocedure.However,elements in thecodomainmaylieat theendofonearrow,severalarrowsornoarrowatall.

Yetanotherwayofdescribingafunctionisasfollows.Thinkoftheelementsofthecodomainsetasboxes. The function describes how to place the objects of the domain set in these boxes. Thus thefunctionunderconsiderationwouldbepicturedasfollows.

Againnotice that eachelementof thedomain setoccurspreciselyonce in thepicture.However, anygivenbox, corresponding to an element of the codomain,may contain oneobject, several objects ornoneatall.

Thereadermaywonderatthisvarietyofwaysofthinkingaboutafunction.Itisimportanttorealizethatmathematiciansdevelopavarietyofwaysofthinkingabouttheratherabstractconceptstheydealwith.Anygivenwaymaysuitonepersonbetterthananotherandeachleadstodifferentinsights:itcanbeusefultobeawareofseveral.

Example8.1.3SupposethatX={a,b,c}andY={d,e}.ThentherearepreciselyeightfunctionsfromthesetXtothesetYgivenasfollows.

Herethefunctionsf1andf8areexamplesofconstantfunctions.GivensetsXandYandanyelementy0∈YthereisaconstantfunctionCy0:X→Ygivenbycy0(x)=y0forallx∈X.

Ofcourseafunctioncanhavethesamesetasdomainandcodomainasinthenextexample.

Example8.1.4SupposethatZ={a,b}.ThentherearepreciselyfourfunctionsfromZtoZasfollows.

Inthiscasethefunctionsg1andg4areconstantfunctions.Thefunctiong2isanexampleofanidentityfunction.GivenasetX,theidentityfunctiononX,IX:X→X,isgivenbyIX(x)=xforallx∈X.

Page 81: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Describing a function by listing the values is only practical when the domain set is small andimpossibleifthedomainsetisinfinite.Themostcommonwayofdescribingafunctionfisbygivingaformulaforfwhichprovidesaprocedurefor finding thevalueof thefunctionateachelementof thedomain.Whendefiningafunctionusingaformulaitisimportanttobeclearaboutwhichsetsarethedomainandthecodomainofthefunction.

Example8.1.5Recallthat denotesthesubsetof ,thesetofrealnumbers,givenby .Considerthefollowingfourfunctions:

Notice that, although the formula fi (x) = x2 is the same for each of these four functions, they areconsideredtobefourdistinctfunctionssincethedomainandcodomainarepartofthedefinitionofthefunction.Wewillseelaterthatthesefourfunctionshavedifferentpropertieseventhoughtheyaregivenbythesameformula.

Weneedtotakecarethattheformulamakessenseforeachelementofthedomain.

Example8.1.6Theformula doesnotdefineafunction → sinceitgivesnovalueforx=1.Whenworkingwiththesetofrealnumbersitisquitecommonnottospecifythedomainandcodomainofafunctiongivenbyaformula.Theconventionisthat,ifthesearenotspecified,thenwetakeasthedomainthesubsetof consistingofthenumbersforwhichtheformulamakessenseandwetake asthecodomain.Usingthisconventiontheaboveformulaforf1definesafunctionf1: –{1}→.

If we really want a function with domain then in an example like this there are two basictechniquesforextendingf1.Rewriting the formula: We can rewrite the formula in such a way that it makes sense for all realnumbersxusing

forx≠1.Thenf2(x)=x+2doesdefineafunctionon ,i.e.withdomain ,extendingthefunctionf1.Explicitdefinition:Alternativelywe can explicitly specify the value of the function at the element 1wheretheformulaforf1doesnotwork.Thus

definesafunctionf3: → .Noticethatwemayspecifythevaluesatindividualpointsanywaywelike.Itdoesn’thavetorelate

inasensiblewaytothevalueselsewhere.Indefiningf3(1)weselectedthatvaluegivenbytheformulax+2sothatf2andf3areinfactthesamefunction.However,wecouldextendthefunctionf1tothewholeof inadifferentway.Forexample

Page 82: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

isanotherwayofextendingthefunctionf1tothewholeof .

Example8.1.7Insomecases,forexamplex 1/x,thereappearstobenowayofrewritingtheformulatoincludeinthedomainofdefinitionpointswhereitgivesnovalue(inthiscasex=0).But in thesecaseswecanstillusethesecondmethod.Forexample

isaperfectlyrespectablefunctiong: → .

Wecanusedifferentformulaefordifferentpartsofthedomainasinthefollowingexample.

Example8.1.8Themodulusfunctionx |x|isdefinedon by

Noticeherethatthevalueofthefunctionat0isgiventwice,since0 ;0and0 0.Thisisn’taproblemsince the two formulae (x x and x –x) give the same value (namely 0) for x = 0. But whenspecifyingafunctioninthiswaywedoneedtobecarefultocheckthatitiswell-defined(i.e.thereisauniquelyspecifiedvalue)ateachpoint.

Definition8.1.9Twofunctionsf:X→Yandg:X→Yare ,written ,when theyhave thesamevalueateachpointofthedomainX,i.e.f(x)=g(x)forallx∈X.Noticethatitisimplicitinthisdefinitionthattwoequalfunctionshavethesamedomainandthesamecodomain.

Example8.1.10The functions f2 and f3 ofExample8.1.6 are equal even though they are defined indifferentways.Thusitisnottheprocessleadingtothevalueswhichdeterminesthefunctionbutwhatthevaluesare.Ofcourse,indefiningf3thevalueoff3(1)wasselectedpreciselysothattheywouldbeequal.

We have seen in Example 8.1.6 how to extend the domain of a function.We can alsomake thedomainsmaller.

Definition8.1.11Supposethatf:X→YisafunctionandAisasubsetofX,i.e.A X.Thenwecandefineafunctiong:A→Ybyg(a)=f(a)foralla∈A.Thisfunctioniscalledthe of f toAandisdenotedby .

Examples8.1.12(a)InExample8.1.3f1|{a,b}=f2|{a,b}andistheconstantfunctiontakingthevalued.

(b)InExample8.1.5f2=f1| andf4=f3| .(c)InExample8.1.6f2|( –{1})=f4|( –{1})=f1.

Page 83: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

8.2CompositionoffunctionsSuppose that f:X→Yandg:Y→Z.Then,givenan elementx∈X, the function f assigns to it anelementy=f(x)∈Yandnowthefunctiongassignstothisanelementg(y)=g(f(x))∈Z.Thususingfandg an element ofZ has been assigned to x. This process defines a function with domainX andcodomainZcalledthecompositeoffandg.

Definition 8.2.1Given two functions f:X→Y and g:Y→Z the of f and g, denoted byorsimplygf:X→Z,isdefinedby

The order of the f andg in this definition should be carefully noted. Sincewe have adopted theconvention(usual†inmostareasofmathematics)ofwritingthesymbolforthefunctionontheleftofthe element where it is being evaluated (viz. f(x)) it is natural to denote the function obtained byapplying f and then applyingg by the symbol g o f which presents them (from left to right) in theoppositeordertotheirapplication.Wecanwritethefollowingtoindicatethis:

Examples8.2.2 (a)Thefunctionx (x+1)2 from to is thecompositeof thefunction f: →definedbyf(x)=x+1andthefunctiong: → definedbyg(x)=x2because

Noticethattheorderdoesmatterherebecause

compositionoffunctionsisnotingeneralcommutative.Itisnotusuallyagoodideatorefersimplyto‘thecompositeoffandg'whenbothordersarepossiblesincethereisnowell-establishedconventionaboutwhichorderthesewordsindicate.Itisbesttousethesymbolismgoforfoginordertobequiteclear.

(b)SupposethatAisasubsetofasetX.Thenwemaydefineafunctioni:A→Xbyi(a)=aforalla∈A.This function iscalled the inclusion functionofA intoX. Ifnow f:X→Y is a function, then thecompositefoi:A→Yisequaltotherestrictionf|A:A→YofftoA.

(c)Supposethatf: → isdefinedbyf(x)=x2+1andg: –{0}→ isdefinedbyg(x)=1/x.Thenstrictlyspeakingthecompositegofisnotdefinedsincethecodomainoffisnotthesameasthedomainofg.

However,everyvalueoffliesinthedomainofgsincex2+1≥1>0forallrealnumbersxsothatgcanbeevaluatedateachvalueoff.Inacaselikethiswecanstillattachameaningtothecompositegofasthefunctiongivenbygof(x)=g(f(x)).Thisgivesthefunction → determinedbygof(x)=1/(x2+1).

Proposition8.2.3Supposethatf:X→Y,g:Y→Zandh:Z→Warefunctions.Then

ProofTheseresultsareprovedsimplybyevaluatingthefunctions.Forexample,givenx∈X,boththe

Page 84: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

functionsin(i)assignh(g(f(x)))tothiselementandsothefunctionsareequal.NoticethatthefirstpartofProposition8.2.3meansthatwecanwritehogo fwithoutambiguity.

Compositionoffunctionsisassociative.

8.3Sequences

Definition8.3.1Afunction iscalleda inthesetA.

Thestudyofsequencesin or isofgreatimportanceinadvancedcalculusandnumericalanalysis.Sequencesmaybedefinedbyaformula,suchasn n2,n 1/n,n 2n,n (1+1/n)nandn 1/n!.Butmoreinterestingarethosesequencesdefinedinductively.WesawinChapter5thatstrictlyspeakingformulae involving the exponentn or the factorialn! really have to be defined inductively.AnotherexampleofaninductivelydefinedsequenceconsideredtherewastheFibonaccisequence.

It is common in advanced calculus to solve numerical problems by generating a sequence ofnumbers xn which provide increasingly good approximations to the solution as n increases – thesequenceconvergestoalimitwhichistherequiredsolution.†

Oneimportantreasonforbecomingadeptathandlingquantifiersistobeabletohandlethedefinitionofthelimitofasequence.Toillustratetheideasweintroducetheideaofanullsequence,asequencewithlimit0.

Definition8.3.2Givenasequence ofrealnumbers,wesaythatthesequenceis ,written

or ,when

Theuseof forageneralpositiverealnumberinthisdefinitionistraditional.Thisisnottheplacetoinvestigate the full implications of this definitionwhich involves three quantifiers!Here is a simpleexampleofitsuse.

Example8.3.3Thesequence isnull.

Constructingaproof.Wearerequiredtoprovethat

[Notice that ] So supposewe are given Then to demonstrate the existence of theintegerNweexaminewhen .

Hence so long as we choose a positive integer N such that we will haveasrequired.

Soforexample,if =1thenwemustchooseN>1,if =1/2thenwemustchooseN>4,andif =1/100 thenN > 10000. The smaller the number the greater the numberN is required to be. Butwhateverthepositiverealnumber isthecondition tellsushowlargeNhastobe.

ProofGivenapositiverealnumber , ifandonlyif Henceifwechoose thenn≥Nimpliesthat sothat isrequired.

Page 85: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

This typeofproof involvingmultiplequantifiers isquiteelaborateandthis is infactanextremelysimpleexample.Morecomplicatedexamplesarenotconsideredinthisbookbutaredealtwithindetailinbooksoninfinitesequencesandseries,advancedcalculusandanalysis.†

8.4TheimageofafunctionGivenafunction f:X→Y, it isnotnecessary thateveryelementofY isavalueof thefunction.Forexamplethefunction → givenbyx x2doesnothave–1asavalue.ThuswecanobtainasubsetofYbyconsideringthoseelementswhicharevalues.

Definition8.4.1Givenafunctionf:X→Y,thesubsetofthecodomainYconsistingofthoseelementswhicharevaluesoffiscalledthe offandisdenotedby .Thus

Thismeans that the function f provides a constructive definition of the set Im f, as discussed inChapter6.

8.5Thegraphofafunction

Definition8.5.1Supposethatf:X→Yisafunction.Thenwedefinethe offtobethesubsetoftheCartesianproductX×Ygivenby

Remarks8.5.2InthecasethatXandYaresubsetsof thisistheusualideaofthegraphofafunction.Workincalculusmakesitclearthatthegraphgivesagreatdealofinformationaboutthefunctionandthatitisusefultodevelopskillindrawinggraphs.

Example8.5.3Thegraphsofthefunctionsf1andf2ofExample8.1.3areasfollows.

Hereweindicatetheelementsofthegraphbysoliddots(•).

Thegraphofthefunctionf:X→YisaparticularexampleofasubsetoftheCartesianproductX×Ydeterminedbyapredicate:thepredicateisy=f(x).NoteverysubsetofX×Yarisesasthegraphofafunction.Eachcolumn{x0}×Ymustcontainasingleelement,namely(x0,f(x0)).However,thefunctionfisdeterminedbyitsgraphGf,for,givenx0∈X,thereisauniqueelement(x,y)=(x0,y0)∈Gf suchthatx=x0,andthenf(x0)=y0.†

Page 86: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Exercises8.1Definefunctionsfandg: by:

Provethatthefunctiongiswell-defined.Provethatf=g.

8.2Definefunctionsfandg: byf(x)=x3andg(x)=1–x.Findthefunctions(i)fof,(ii)fog,(iii)gof,(iv)gog.

Listtheelementsoftheset{x∈ |fg(x)=gf(x)}.

8.3Findfunctionsfi: → withimagesasfollows:

8.4Provethatthesequencen 1/nisnull.

8.5LetX={a,b,c,d}andY={w,x,y,z}.WhichofthefollowingsubsetsofX×Yisthegraphofafunctionf:X→Y?ForthosewhicharewritedownatableforthecorrespondingfunctionasinExample8.1.3.Explainwhytheothersarenotgraphsoffunctions.

Page 87: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

†Butnotuseduniversally.Insomebranchesofalgebraitisquitecommontowritethevaluef(x)asxforevenxf.

†AgoodexampleistheNewton-Raphsonmethodforsolvinganequation,describedinmostbooksonadvancedcalculus(seeforexampleG.B.ThomasandR.S.Finney,Calculusandanalyticgeometry,Addison-Wesley,Eighthedition1992).†See,forexample,R.Haggerty,Fundamentalsofmathematicalanalysis,Addison-Wesley,Secondedition1993.

†Ourdefinitionofafunction(Definition8.1.1)isusuallyconsideredratherinformalinmoreadvancedmathematics.Thereafunctionisdefinedtobeagraph:inotherwordsafunctionX→YisdefinedtobeasubsetofX×YinwhicheachelementofXoccursasthefirstcoordinate of an element precisely once (see for example Daniel J. Velleman,How to prove it, a structured approach, CambridgeUniversityPress,1994).

Page 88: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

9Injections,surjectionsandbijections

Indefiningafunctionf:X→YweinsistthatauniqueelementofYisassignedtoeachelementofX.However,wedonotrequirethateachelementofYisassignedtosomeelementofXnordowepreventthepossibilityofthesameelementofYbeingassignedtoseveral(orevenall the)elementsofX.Byimposing additional conditions concerning the number of elements ofX towhich elements ofY areassigned we get functions with particular properties. In this chapter we consider functions withparticularlygoodpropertiesandinparticularfunctionswhicharebijectionsforwhichwecandefineaninversefunction.

9.1PropertiesoffunctionsDefinition9.1.1Supposethatf:X→Yisafunction.

(i)IfnoelementofYisassignedtomorethanoneelementofX,i.e.thefunctiontakesadifferentvalueforeachpointofthedomain,thenwesaythatthefunctionfisan (orthatitisinjectiveorone-to-one).Insymbolswecanwritethis

orequivalentlyusingthecontrapositive

(ii)IfeachelementofYisassignedtosomeelementofX,i.e.eachpointofthecodomainisavalueof

thefunction,thenwesaythatthefunctionfisa (orthatitissurjectiveoronto).Insymbolswecanwritethis

(iii)If f isbothaninjectionandasurjectionthenwesaythatit isa (or that it isbijectiveorone-to-oneandonto).

Wecanreformulatethesedefinitionsusingthenotionofapre-image.

Definition9.1.2Forafunctionf:X→Y,givenanelementy Ya ofy(underf)isanelementxXsuchthaty=f(x).

SofisaninjectionifandonlyifeveryelementofYhasatmostonepre-image;fisasurjectionif

Page 89: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

and only if every element ofY has at least one pre-image; and f is a bijection if and only if everyelementofYhaspreciselyonepre-image.

These ideas are simply expressed in terms of the variousmodels for a function introduced in thepreviouschapter.IfafunctionisdescribedbylistingthevaluesofthefunctionasinExample8.1.2thenwefindthepre-imagesofanelementofthecodomainbylocatingitsoccurrencesinthelistofvaluesand reading up to the corresponding elements of the first row.Thus a function is injectivewhen noelementoccursmorethanonceinthelistofvalues,itissurjectivewheneveryelementofthecodomaindoesoccurinthelistofvaluesandbijectivewheneveryelementofthecodomainoccurspreciselyonceinthelistofvalues.

In termsof thepicture representing the functionbyarrows from thedomain to thecodomain (seepage90)wefindpre-imagesbyfollowingarrowsbackwards.Thus,forexample,afunctionisbijectiveifeverypointofthecodomainisattheendofpreciselyonearrow.

Finally, ifwethinkofafunctionasaprocedureforplacingtheelementsof thesetX intoasetofboxesY(seepage90)thenapre-imageofaparticularboxy Yissimplyanelementwhichisplacedinthatbox.Fromthispointofview,fisinjectivewhennotwoelementsareplacedinthesamebox,itissurjectivewhennoboxisleftempty,anditisbijectivewheneachboxcontainspreciselyoneelement.

Examples9.1.3 (a) InExample8.1.3all the functionsapart from theconstant functions f1and f8aresurjections.Noneofthefunctionsareinjections.

(b)InExample8.1.4thenon-constantfunctionsf2andf3arebijections.Noticethat,foranysetX,theidentityfunctionIXisabijection.

(c)InExample8.1.5thefunctionf1isneitheraninjection(since(–1)2=12=1)norasurjection(sincethereisnorealnumberxsuchthatx2=–1);thefunctionf2isaninjection(since )butnotasurjection;thefunctionf3isasurjectionbutnotaninjection;andthefunctionf4isabijection.Thisexampleillustratestheimportanceofthedomainandthecodomain.Forexample,ifaresulthasbeenprovedforinjectionsthenitcanbeappliedtof2andtof4butnottof1andf3.

Remarks 9.1.4 Notice that we can easily convert any function into a surjection by changing thecodomain.Recallthat,givenafunctionf:X→Y,theimageoff,denotedbyImf,isthesetofvaluesoff.Theassignmentdeterminingthefunctionfalsodeterminesafunctionf+:X→Im f(i.e.f+(x)= f(x))whichisasurjection.

Since the definitions of injectivity and surjectivity involve universal and existential statements,proofsanddisproofsofthesepropertiesusuallyfollowtheformatdiscussedinChapter7.

Example9.1.5Todeterminewhether thefunction f1: → givenby f1(x)=x+1 isan injection,asurjectionorabijection.

Forinjectivity,itisusuallyeasiesttousethesecondformulation:

Fillinginthedefinitionofthefunctionthisgives

whichiscertainlytruesothatf1isinjective.Forsurjectivity,werewritethedefinitionasusualasauniversalimplication:

Page 90: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

If we put the definition of the function into this then it easy to prove the existential statement byexample.For

whichtellsusthat,giveny ,theny=f1(x)ifx=y–1sothatydoeshaveapre-imageunderf1.Hencef1issurjectiveandsoabijection.

Infact,whatiswrittenaboveisratherinefficient;wecanoftenprovebijectivityinonefellswoop.The bestway to discoverwhether a function is injective or surjective can be to investigate the pre-imagesofageneralelementinthecodomainusingtheapproachusedaboveforsurjectivity.Inthiscaseifyisageneralelementofthecodomain then

Thisshowsthateachelementyof haspreciselyonepre-image,namelyy–1,sothatthefunctionisabijection.

Wecanwriteoutthesolutiontothisproblemquitebrieflyasfollows.

SolutionSincey= f1 (x) y =x+1 x =y – 1, forx,y ,we see that each element y of haspreciselyonepre-imageunderf1.Hencef1isabijection.

Example 9.1.6 To determine whether the function f2: +→ + given by f2(x) = x + 1 is injective,surjectiveorbijective.

This function is given by the same formula as the previous example. If we try the pre-imageapproachwegetalmostthesameargument:

The difference becomes clear when we ask whether the formula for the pre-image makes sense.Rememberthatifxistobeapre-imagethenitmustcertainlylieinthedomain +(otherwisef2(x)isn’tevendefined).But,giveny +,y–1 +ifandonlyify–1>0(bythedefinitionof +),i.e.y>1.Soweseethatyhasapre-imageifandonlyify>1.Thisprovesthattheimageoff2istheset{y +|y>1}and,sincethisisnotthewholeof +,f2isnotsurjective.Asusual,intheformalproofwegiveanexplicitcounterexample,anelementof +whichisnotavalueofthefunction.

However,thefunctionisinjectiveandtheproofisjustthesameasinthepreviousexample.

Solution The function is injective since, for x1,x2 +, f2(x1)= f2(x2) x1 + 1 = x2 + 1 x1 = x2.However,ifx +thenx>0sothatf2(x)=x+1>1.Thus1/2isnotavalueoff2whichisnotthensurjective.

Example9.1.7Todeterminewhetherthefunctionf3: → givenbyf3(x)=4x2–4x+2isinjective,surjectiveorbijective.

Page 91: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thistimethepre-imageapproachgives

Againwemustcheckwhetherourformulaforthepre-imagemakessense.Nowify<1theny–1hasno(real)squarerootandsointhatcasetheformulahasnomeaning.Lookingbackthroughthestepsaboveweseewhattheproblemis:y=(2x–1)2+1tellsusthatifyisavaluetheny 1.Thistellsusthatf3isnotsurjective.

Theotherthingwenoticeintheformulaforthepre-imageisthesymbol±.Thismeansthatx isapre-imageforyifandonlyifx= or .Inotherwordsif existsandisnon-zero,thenyhastwopre-images.Forexample,takingy=2forwhich ,†weobtainf3(x)=2 x=(1±1)/2,i.e.x=1orx=0.Sof3isnotinjective.

SolutionBecausef3(0)=f3(1)=2,thefunctionisnotinjective.

Forarealnumberx,f3(x)=4x2–4x+2=(2x–1)2+1 1.Thus0isnotavalueoff3andsoitisnotsurjective.

Notice that inpresentingthisproofnoindicationisgivenofhowwefoundthecounterexample toinjectivity.Formallythisisnotrequiredfortheproof.Inacaselikethisitisnotdifficulttospotsuchacounterexample(forexamplefromthegraphofthefunctionorfromrewritingtheformulaas(2x–1)2+1)butitisoftenagoodideatohelpthereaderbyindicatinghowyoufoundthecounterexample.

Example9.1.8Todeterminewhetherthefunctionf4: +→{x +|x 1}givenbyf4(x)=4x2–4x+2isinfective,surjectiveorbijective.

Thepre-imageapproachgivesjustthesameformulaasinthepreviousexample.However,ifyisinthecodomaintheny 1andsothesquarerootintheformulaforapre-imageelementdoesdetermineareal number. Furthermore and so this gives one pre-image for y showing that f4 issurjective.Fory>1,wehavea secondpre-imagepreciselywhen which occurswhen

i.e.y<2.Thisprovesthat f4 isnotinjectivesinceelementsy inthecodomainhavetwopre-images ify<2.However, it isprobablymoresatisfying togive twospecificelementsof thedomainwherethefunctiontakesthesamevalue;wecangetthesebytakingy=5/4whichhas andsothepre-images(1±1/2)/2,i.e.3/4and1/4.

Sketchingthegraphofthisfunctionisagreataidtoseeingwhatisgoingon.Thereadershoulddothis.

SolutionNoticethat .Thefunctionissurjectivesincegiveny 1,y=f4(x)for.Thefunctionisnotinjectivesincef4(1/4)=f4(3/4)=5/4.

9.2Bijectionsandinverses

Definition9.2.1Afunctionf:X→Yiscalled if†thereexistsafunctiong:Y→Xsuchthat

Page 92: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Inthiscasewecallgan offandwrite .

Thesymmetryofthedefinitionshowsthatinthiscasegisalsoinvertibleandfisaninverseofg.

ThismeansthenthatcorrespondingtotheassignmentofanelementofYtoeachelementofXthereisareverseassignmentofanelementofXtoeachelementofY.

Example9.2.2Supposethatf: → isdefinedbyf(x)=2x+1andg: → isdefinedbyg(x)=(x–1)/2.Then,forx,y ,

Thusfandgareinvertibleandeachistheinverseoftheother.

Theorem9.2.3Let f:X→Y.Then f is invertible ifandonly if it isabisection.Furthermore, if it isinvertible,thenitsinversefunctionisunique.

Constructingaproof.Intuitivelythisresultisprettyclear.ForexampleifwethinkofthemodelofthefunctiongivenbyplacingelementsfromthesetXinthesetofboxesYthenwehaveobservedthatifthefunctionisbijectivethereispreciselyoneelementofXineachbox.Inthiscasetheinversefunctionisgiven by associating to each box the element which it contains. Furthermore this procedure is onlypossibleifthereisonlyoneelementineachboxwhichmeansthatfisbijective.

The formal proof makes these ideas a bit more precise in terms of the formal definitions ofbijectivityand inverseand is constructedas sooftenby simply spellingout thesedefinitions. Itmayseemquitelong,butifyouareclearaboutwhatyouaretryingtodothereisreallyonlyonepossiblewayforwardateachstageandsotheproofmoreorlesswritesitself.

Thelastpartofthetheoremassertsthatfhasauniqueinverse.Thismeansthatfhasaninverse(forthisiswhatismeantbystatingthatitisinvertible)butonlyoneinverse.Uniquenessstatementsareverycommon.Theusualapproachtoprovingthemisillustratedinthiscase:wedemonstratethatifg1andg2areinversesofftheng1=g2.Argumentsofthistypehavealreadybeenmetinproofsoftheinjectivityofafunctionf,forthisassertsthateachvalueofthefunctionhasauniquepre-image:thisisprovedbydemonstrating that if x1 and x2 are pre-images of the same element then x1 = x2 (see for exampleExample9.1.5).

ProofForthefirststatementtwothingshavetobeproved.

(a) ‘f invertible f bijective’: Suppose that f is invertible. Then, by definition, there is an inversefunctiong:Y→Xsothat

Nowtoprovethatfisbijectivewemustprovethatfissurjectiveandthatitisinjective.Forinjectivity,supposethatx1,x2 Xaresuchthatf(x1)=f(x2);thenwemustprovethatx1=x2.Put

y0=f(x1)=f(x2).Theny0=f(x1) x1=g(y0)(fromthedefinitionoftheinverse)butontheotherhandy0=g(x2) x2=g(y0).Hencex1=g(y0)=x2asrequired.

Forsurjectivitysupposethaty0 Y.Wemustdemonstratethatthereexistsanelementx0 Xsuchthaty0=f(x0).Putx0=g(y0).Thenitisimmediatefromthedefinitionofaninversefunctionthaty0=f(x0)asrequired.

(b)‘fbijective finvertible’:Supposethatfisbijective.Toshowthatitisinvertiblewemustconstruct

Page 93: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

aninversefunctiong:Y→X.Supposethaty0 Y.Sincefisabijection,y0haspreciselyonepre-image,sayx0 X,suchthatf(x0)=y0.Sowecandefineafunctionbytherulethat,foreachy Y,g(y) is theuniqueelementx Xsuchthatf(x)=y.Itfollowsfromthisdefinitionthat

andsogisaninverseoff.

(c)‘finvertible ithasauniqueinverse’:Supposethatfisinvertibleandg1:Y→Xandg2:Y→Xareinversefunctionsforf.Todemonstratethatg1=g2wemustshowthatg1(y)=g2(y)forally Y.Lety0Y.Thenputx1=g1 (y0)andx2=g2(y0) so thatweare required toprove thatx1 =x2. This is easybecausex1=g1(y0) y0= f(x1)andx2=g2(y0) y0= f(x2) so that f(x1)= f(x2).But now, since f isinvertibleitisbijective(by(a))andsoinparticularinjective.Itfollowsthatx1=x2,i.e.g(y0)=g2(y0)asrequired.

Because of this theorem the words ‘bijective’ and ‘invertible’ are used interchangeably whenreferringtofunctions.Manystandardfunctionsarenotactuallybijectionsbutbysuitablerestrictionsofthedomainandcodomaincanbeconvertedintobijections.Herearesomeexamplesfromcalculus.

Examples9.2.4(a)Thefunctionsin: → isneitherinjective(since,forexample,sin0=sin )norsurjective (since, for example, there is no real number x such that sin x = 2). To define an inversefunctionsin−1werestrictthedomainandthecodomainofsinsothatitisbijective.Surjectivityiseasy:wesimplychangethecodomaintotheimageofsin,i.e.Im(sin),whichistheset[–1,1]={x |–1x l}(sinceweknowthateachnumberinthissetarisesasavalueofthesinefunctionon ).Injectivityisnotmuchharderforweknowthatasxvariesfrom– /2to /2 thevalueofsinx increasessteadilyfrom–1to1(sketchthegraph).Sowetakeasourdomain[– /2, /2]={x |– /2 x /2}.Tosumup,thefunction†

isabijection.Bytheabovetheoremithasaninverse

Inmakingthisdefinitionwehadtochooseasubsetof onwhichthesinefunctionwasinjective.Therearemanypossibilities,forexample[ /2,3 /2],andeachhasitsowninversefunction.Theabovechoiceisthemostnaturalandthefunctionitleadstoiscalledtheprincipalvalueoftheinverse.

Inthesamewaywecanrestrictthecosineandtangentfunctionstoobtaininversefunctions

and

(b)Givenn +,thefunctionx xnisabijection → fornoddandsointhiscasewedohaveaninversefunction → ,thenthrootfunction,denotedby‡x x1/nor .

Ontheotherhanditisneitheraninjectionnorasurjectionwhenniseven.[Thecasen=2istypicalandisdiscussedinExample9.1.3(c).]Inthiscasewerestrictthedomainandthecodomainto sothatwehaveabijection.Thustheinversefunction isafunction → .Theconventionisthatforevenntheexpressionsx1/nand representthenon-negativerootofanon-negativerealnumberx.

Page 94: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ThefollowingequivalentformulationofDefinition9.2.1isoftenuseful.

Proposition9.2.5Thefunctionsf:X→Yandg:Y→Xareinversesofeachotherifandonlyifg f=IXandf g=IY.

Proof‘ ’:Supposethatfandgareinversetoeachother.Then

Now,givenx0 X,puty0=f(x0)sothatx0=g(y0).Theng f(x0)=g(y0)=x0,i.e.g f=IX.Similarlyf g=IY.

‘ ’:Supposethatg f=IXandf g=IY.Supposethatyo=f(x0).Theng(y0)=g f(x0)=IX(x0)=x0.Thusy=f(x) x=g(y)forallx X,y Y.

Similarly,x=g(y) y=f(x)andsowehaveprovedthatfandgareinversesofeachother.

9.3Functionsandsubsets

Intheprevioussectionithasbeendemonstratedthatafunctionfhasaninversef−1ifandonlyifitisabijection.However, thereaderwilldiscover that thenotation f−1whichhasbeenused for the inversefunctionisusedevenwhenthefunctionfisnotabijection.Thischapterendswithabriefdescriptionofthismoregeneraluse.

Tobeginwithrecallthedefinitionofthepowerset(Definition6.3.1):thepowerset (X)ofasetXisthesetofsubsetsofXsothatA (X)meanssimplyA X.Wenowdescribehowgivenafunctionf:X→YwecanassociatetoittwofunctionsbetweenthepowersetsofXandY(oneineachdirection)eachofwhichcapturesthefunctionfinadifferentway.

Definition9.3.1Supposethatf:X→Yisafunction.

(i)Thefunction isdefinedby

forA (X).

(ii)Thefunction isdefinedby

forB (Y).

Remarks9.3.2Thenotations and arenon-standard.Mostwritersdenotethefunction simplybyfand denote the function by f−1. With experience this does not lead to confusion (and is anotherexampleofhowambiguitycanbebetterthanpedantry).However,inthisbookthenotations andwillbeusedsince it seemspotentiallyconfusing tohave twodifferent functionswith thesamenamewhenmeetingtheseideasforthefirsttime.

In the caseof notice that each elementx0 ofX corresponds to an element of (X), namely thesingletonsubset{x0},andsimilarlyforY.Sowecanthinkof asanextensionoffinthesensethat

Page 95: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Noticethat (X)istheimageoff,Im(f)(seeDefinition8.4.1).Inthecaseof ,

foreachy0 Y.Thus ({y0})givesthesetofpre-imagesofy0.Intheboxmodelofafunction(page90)thisgivesthesetofelementsintheboxy0.Now,iffisabijectionwithinversef−1,thenf(x)=y0ifandonlyifx=f−1(y0)sothat ({y0})={f−1(y0)}andwecanthinkof asanextensionoff−1.

Iffisnotabijectionthen ({y})willnotbeasingletonsubsetforsomeelementsofY:ifitisnotasurjection then itwill be empty for elements y not in the image, and if not an injection then itwillcontainmorethanoneelementforsomey.

9.4Peano’saxiomsforthenaturalnumbersThenotionofthesuccessorofanintegernwasintroducedinSection5.1.Chapter5washeadedbyaquotationfromRichardDedekindsuggestingthatthisideacapturedtheessenceofthenaturalnumbers(or positive integers). The necessary language is now available so that some indication of the ideasbehindtheDedekindquotationcanbegiven.

Definition9.4.1The , ,isdefinedbys(n)=n+1forn +.

Dedekind observed that the existence of the successor function together with the number 1completelycapturesthepropertiesofthenaturalnumbers.TheseideasarenowusuallyassociatedwiththenameoftheItalianmathematicianGiuseppePeano.†

Axioms9.4.2(Peano)Thesetofpositiveintegers +isasetwithafunctions: + +andanelement1 +suchthat

(i)sisaninjection,(ii)1isnotintheimageofs,and(iii)forA +,if1 A,andn A s(n) A,thenA= +.

Noticethat(iii)isjusttheinductionaxiomasreformulatedinAxiom7.5.1.It is not difficult to prove (by induction) that, given any setX with a function s :X X and a

distinguished element 1 X satisfying these axioms, there is a bijection X + under which thedistinguishedelements1andthesuccessorfunctionscorrespond.†Thisiswhatismeantbysayingthatthesestatementsprovideaxiomsforthepositiveintegers.

Wecanusestodefinealgebraicoperationson +inductivelyasfollows.

Definition9.4.3(Peano)Thesumm+nofpositiveintegersmandnmaybedefinedbyinductiononnby

(i)m+1=s(m),and(ii)fork +,m+s(k)=s(m+k).

Theproductofpositiveintegersrunorm×nisnowdefined(makinguseofaddition)byinductionon

Page 96: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

nby

(i)m×1=m,and(ii)fork +,m×(k)=m×k+m.

It is an interesting exercise to prove the basic algebraic properties of addition andmultiplicationstartingfromthesedefinitions,forexamplethecommutativityofadditionm+n=n+m.

Exercises9.1Determinewhethereachofthefollowingfunctions isinjective,surjectiveorbijective.

(i)f1(x)=2x+5.(ii)f2(x)=x2+2x+1.(iii)f3(x)=x2-2x.

(iv)

9.2Ineachoftheaboveexamplesconsidertheeffectofchangingthedomainandthecodomainto +.

9.3Findinversesforthefollowingfunctions:

(i)f1: givenbyf1(x)=3x+2;(ii)f2: givenbyf2(x)=x3+1.

9.4Supposethatf:X Yandg:Y Zareinjections.Provethatg f:X Zisaninjection.

9.5Supposethatf:X Yandg:Y Zarebijectionsofsets.Provethatthecompositeg f:X Zisalsoabijectionandthat

9.6 Let f: X Y be a function with graph Gf X × Y. Prove that f is surjective if and only if.

9.7Letf:X YbeafunctionandB1,B2 (Y).Provethat

Prove that the converse of the first of these statements is not universally true (by constructing acounterexample).†Weadopttheusualconventionthatifyisanon-negativerealnumberthen representsthenon-negativesquarerootofy,i.e. ifandonlyify=x2andx 0.†Thereadershouldnote theway that theword‘if’ isused in thisdefinition. It reallymeans‘ifandonly if’sincewearedefining themeaningoftheword‘invertible’.Sayingthatfisinvertiblemeanspreciselythesameassayingthatthereisafunctiongwiththepropertiesgiven.Thisusageindefinitionsisverycommonalthoughithasonthewholebeenavoidedsofarinthisbook.

Page 97: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

†Strictlyspeakingthisfunctionshouldhaveadifferentnameinordertoindicatethechangeofdomainandcodomain.However,itisusualtousethesamename.

‡Thenotationx1/n isselectedsothat thelawofexponentsholds:(x1/n)n=(xn)1/n=x1=x.With thisdefinition it ispossible togivesomeindicationoftheproblemindefining00referredtoinDefinition5.3.3.Noticethat01/n isdefinedtobe0.Furthermore,wehaveobserved(Exercise8.4)thatthesequence1/nisnull,lim1/n=0,whichsuggeststhatweoughttodefine00=0.However,ifthelawofindicesistoholdthenwemusthavex0=1fornon-zerox(seethesolutiontoExercise5.7)andthissuggeststhat00=1,theconventionadopted in this book. It is not possible to satisfy these conflicting demands. For (x, y) × – {(0,0)} it is possible to define xyextendingthedefinitionforintegerexponenentssothatthelawsofexponentsaresatisfiedandsothatthefunctionoftwovariables(x,y)xyis‘continuous’.Itisnotpossibletoextendthis‘continuous’functiontothepoint(0,0).Afullexplanationofthis,andthedefinition

of ‘continuous’, isbeyond thescopeof thisbook(see forexampleK.G.Binmore,Mathematicalanalysis,a straightforwardapproach,CambridgeUniversityPress,Secondedition1982).†ThefirstexpositionoftheseideaswasbyRichardDedekindinhisbookWassindundwassollendieZahlen?publishedin1888.PeanoformulatedhisaxiomsforthenaturalnumbersinhisbookArithmeticesprincipia,novamethodoexpositapublishedin1889.PeanodidnotseeDedekind’sworkuntilhisownbookwasinpressandPeano’sexpositionusingthelanguageofsettheoryisconsideredtohavebeenmuchmoreinfluential.Itwasinthisbookthatheintroducednotationsforsetmembership(themodernsymbol )andsetinclusion(heusedaninverted‘C’whichhealsousedforimplication-recallthatitwasobservedinSection6.1thatthereisastrongconnectionbetweenset inclusionand implication) andhe seems tohavebeen the first to clarify thedistinctionbetween setmembershipand set inclusion.Peanowasaremarkablemathematician.Itiscuriousthathis1889bookwaswritteninLatinratherthantheItalianorFrenchheusuallyused.InhisbookaboutPeano(Reidel,1980),HubertKennedydescribesitas‘theuniqueromanticactofhisscientificcareer’andsuggeststhatitreflectedPeano’sawarenessthathewasdoingsomethinghistoric-afterall,thegreatclassicssuchasIsaacNewton’sPrincipiahadbeenwritteninLatin.ThefollowingyearbroughtPeano’smoststrikingachievement,hisconstructionofaspace-fillingcurve;thisisacurveintheplane 2givenbycontinuousfunctionsx=f(t),y=g(t)suchthat,astvariesovertheinterval[0,1],(x,y)passes througheverypointoftheunitsquare[0,1]×[0,1].Thiswasperhapsthefirstindicationofthesubtletyofthenotionofdimension,confoundingintuition,whoseexplorationhasnowledtothemodernstudyoffractalsets.(SeeforexampleDonaldM.Davis,Thenatureandpowerofmathematics,PrincetonUniversityPress,1993.)

†SeeforexampleG.BirkhoffandS.MacLane,Asurveyofmodernalgebra,Macmillan,Fourthedition1977.

Page 98: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsII:Setsandfunctions

1Provethefollowingstatements:

(i){x |x2-3x+2=0}={x |0<x<3};(ii){x |x2-3x+2<0}={x |x<2} {x |x>1};(iii){x |x2-3x+2>0}={x |x>2} {x |x<1};

2.Byusingatruthtableprovethat,forsetsA,BandC,

DrawaVenndiagramtoillustratetheproof.

3.Provetheabsorptionlaws:

(i)A (A B)=A;(ii)A (A B)=A;

4.ProvebycontradictionorotherwisethatA B=A CandA B=A CifandonlyifB=C.

5.Usingtruthtables,provethatforsetsA,BandC,

(i)(A C)-B (A-B) C,(ii)(A C)-B=(A-B) C,

DrawVenndiagramstoillustratetheproofs.ProvethatthereisequalityinthefirstoftheseresultsifandonlyifB C= .Deducefromthesecondoftheseresultsthat

6.Usethedistributivitylawtoprovethat

7.ForsubsetsofauniversalsetUprovethatB Ac ifandonlyifA B= .By takingcomplementsdeducethatAc BifandonlyifA B=U.DeducethatB=AcifandonlyifA B= andA B=U.

8.GivensetsA,B (X),theirsymmetricdifferenceisdefinedby

Provethat(i)thesymmetricdifferenceisassociative, forall ,(ii)thereexistsauniquesetN (X)suchthatA N=AforallA (X)

Page 99: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

[Hint:GuesswhatNis!],(iii)foreachA (X),thereexistsauniqueA' (X)suchthatA A’=N,(iv)foreachA,B (X),thereexistsauniquesetCsuchthatA C=B.

9.Usingthenotationofthepreviousproblem,provethatforsetsA,B,C,D (X)

10.Wedefinehalf-infinite†intervalsasfollows:

Provethat

11.Giveaprooforacounterexampleforeachofthefollowingstatements:

12.SupposethatA .Writethefollowingstatemententirelyinsymbolsusingthequantifiers and .Writeoutthenegativeofthisstatementinsymbols.

ThereisagreatestnumberinthesetA.

GiveanexampleofasetAforwhichthisstatementistrue.Giveanotherexampleforwhichitisfalse.

13.Provethat,forsetsA,B,CandD,

(i)A×(B C)=(A×B) (A×C),(ii)(A×B) (C×D)=(A C)×(B D),

14.Definefunctionsfandg: byf(x)=x2andg(x)=x2–1.Findthefunctionsf f,f g,g f,g g.

Listtheelementsoftheset{x |fg(x)=gf(x)}.

15.GivenA (X)definethecharacteristicfunction A:X {0,1}by

SupposethatAandBaresubsetsofX.

Page 100: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(i)Provethatthefunctionx A(x) B(x)(multiplicationofintegers)isthecharacteristicfunctionoftheintersectionA B.

(ii)FindthesubsetCwhosecharacteristicfunctionisgivenby

16.Determinewhichofthefollowingfunctionsfi: areinjective,whicharesurjectiveandwhicharebijective.Writedownaninversefunctionofeachofthebijections.

(i)f1(x)=x-1;(ii)f2(x)=x3;(iii)f3(x)=x3-x;(iv)f4(x)=x3–3x2+3x–1;(v)f5(x)=ex;

(vi) .

17.Functionsf: andg: aredennedasfollows.

Find thefunctions f gandg f. Isg the inverseof thefunction f?Is f injectiveorsurjective?Howaboutg?Sketchandcomparethegraphsofthesefunctions.

18. Suppose that f:X Y andg:Y Z are surjections. Prove that the composite g f:X Z is asurjection.

19.Letf:X Ybeafunction.Provethatthereexistsafunctiong:Y Xsuchthatf g=IYifandonlyiffisasurjection.[giscalledarightinverseoff.]

20.Letf:X YbeafunctionandA1,A2 (X).

(i)Provethat .Provethattheconverseisnotuniversallytrue.Giveasimpleconditiononfwhichisequivalenttotheconverse.

(ii)Provethat .Provethatequalityisnotuniversallytrue.(iii)Provethat .

21.Letf:X Ybeafunction.Provethat

(i)fisinjective isinjective issurjective,(ii)fissurjective issurjective isinjective.

22.StartingfromPeano’saxiomsprovethatifn +andn 1thenn isasuccessor, i.e.s(a)=n for

Page 101: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

somea +.

[LetA=Im(s) {1}andprovethatA= +.]

23.StartingfromDefinition9.4.3provethatadditionofpositiveintegersis

(i)associative,i.e.(a+b)+c=a+(b+c)forpositiveintegersa,b,c,(ii)commutative,i.e.a+b=b+aforpositiveintegersa,b.

[For(ii),provefirstofallthata+1=1+abyinductionona.]†Thesymbol‘ ’usedinthenotationinthisquestiondoesnotrepresentanumber‘infinity’.Theexpression(a, ) isusedbyanalogywith(a,b),wherebisarealnumber,butthedefinitionsaredifferent(cf.Exercise6.1).Inthisbooknomeaningisattachedtothesymbol‘’onitsownanditisonlyusedinthenotationsinthisquestionandinDefinition8.3.2.Furtherdiscussionofthisuseofthesymbolcan

befoundinbooksonanalysis,forexampleR.Haggerty,Fundamentalsofmathematicalanalysis,Addison-Wesley,Secondedition1993.

Page 102: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartIIINumbersandcounting

Page 103: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

10Counting

One,two,bucklemyshoe;Three,four,knockatthedoor;Five,six,pickupsticks;Seven,eight,laythemstraight;Nine,ten,abigfathen.Eleven,twelve,diganddelve;Thirteen,fourteen,maidsa-courting;Fifteen,sixteen,maidsa-kissing;Seventeen,eighteen,maidsa-waiting;Nineteen,twenty,myplate’sempty.

Traditional.

Perhapstheoldestmathematicalactivityiscounting.Someoftheearliestwordswelearnaschildrenarethenamesof thefirst fewnaturalnumbersandcountinggamesareverycommon. In thischapter thecountingprocessisformulatedmathematicallyastheconstructingofabijectionfromastandardsetofpositiveintegerstothesetoftheelementsbeingcounted.Thisallowsustoconsiderpreciselywhatwemeanbythenumberofelementsinasetandwhatitmeansforasettobefinite.

10.1CountingfinitesetsRecallthatwehavesuggestedthatasetcanbethoughtofasaboxcontainingtheelementsoftheset.Theprocessofcountingtheelementsinthesetorboxcanbecarriedoutbyremovingtheminturnonebyonewhilerecitingthenamesofthepositiveintegersinorder:‘one’,‘two’,‘three’,andsoon.Whenwehaveexhaustedtheelements,wesaythatthelastnumberrecitedisthenumberofelementsintheset,orthecardinalityoftheset.Sometimes,insteadofremovingtheelementswesimplypointtotheminturnaswhenwecountthenumberofpeopleinaroom,buttheideaisthesame.Whatthisamountstoistheconstructionofabijectionfromthestandardset

thesetofthefirstnpositiveintegersforsomepositiveintegern,tothesetbeingcounted.AswecountasetX, the countingprocess effectivelydefines abijection f: →X by setting f(1) equal to the firstelementofXwhichwecount, f(2)equal to thesecondelementofXwhichwecount,andsoon.Thefunctionfisaninjectionbecausewedonotcountanyelementtwiceanditisasurjectionbecauseeveryelementiscounted.Whenwehaveconstructedthebijectionf: →XwecanlisttheelementsofthesetX={x1,x2,…,xn}wherewewritexi=f(i).Thusthefunctionfisdescribedbythefollowingtable.

Page 104: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

BecausefisabijectioneachelementofXoccurspreciselyonceinthesecondrow.Wecanformulatethisasamathematicaldefinition.It isnatural toextendthedefinitiontoinclude

theemptyset,thesetwithnoelements.†

Definition10.1.1GivenasetX,ifthereisabijectionf: →Xthenwesaythatthe ofX,orthenumberofelementsinX,isnandwrite

Thecardinalityoftheemptysetisdefinedtobe0,

Examples10.1.2(a)ThecardinalityofthesetA={k∈ |25<k 30}is5.Whenwelisttheelementsoftheset,say{29,26,30,27,28},weareessentiallyconstructingabijection Thebijectioncorrespondingtothislistingisgivenbythefollowingtable.

This is not themost obvious way of counting this set. The bijection corresponding to theobviouswayofcountingitisgivenbythefollowingtable.

(b)The cardinality of the set isn for the identitymap provides a bijection → .Anotherbijectionf: → isgivenbyf(i)=n–i.

Thereisonerathersubtledifficultyaboutthisdefinition:weneedtobesurethatifwecountasetintwodifferentwaysthenwegetthesameanswer.Forexample,inExample10.1.2(a),wegavetwowaysofcountingtheset{k∈ |25<k 30}andthereareothers.However,whateverorderweusetolistthissetofintegerswefindthatthefifthelementisthelastone.

Itiscommontocountasetmorethanonceifwewanttobesureaboutthenumberofelementsinit.Ifasetiscountedtwice,forexamplewhencountingthenumberofpeopleinaroom,andtheanswersdiffer thenwe assume either that amistakewasmade on one or both occasions (in otherwords thepersoncountingfailedtoconstructabijection;itcanbedifficulttobesurethatyouhaveaninjectionandthatyouhaveasurjectionifpeoplekeepmovingabout!)orthatitwasn’tthesameset(somebodyentered or left the room and sowas counted on one occasion but not the other). In otherwordsweassumethatifmistakesareavoidedthentheanswerwillbethesameeventhoughwedonotassumethatthebijectionswillbethesame.Wecanformulatethisassumptionasfollows.

Proposition10.1.3Supposethat and arebijectionswiththesamecodomain.Thenm=n.

Weneedtoknowthisinorderthattheabovedefinitionofthenumberofelementsinasetgivesawell-defined number. Very often in mathematics definitions are made which involve some choices.Demonstratingthatthenotiondefinediswell-definedamountstoprovingthatitisindependentofthesechoices,inotherwordsdifferentchoicesleadtothesameanswer.Thenotionofcardinalityprovidesagoodexampleofsuchadefinition.

At this point the reader may consider that the author has taken leave of his senses. Surely it is

Page 105: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

absolutelyobviousthatthenumberofelementsinasetisawell-definednotionandtwodifferentordersofcountingcannotleadtoadifferentanswer.Thismaybeso,althoughourexperienceisonlybasedonrelativelysmallsetsandmodernphysicssuggeststhatcaremaybeneededwhenwecometodeal,say,withasetofelectrons.InChapter14wewilllookbrieflyatinfinitesetsandseetherehowmisleadingour intuitioncanbe. It isoften thecase inmathematics thatweknowwhatpropertieswewantsomenotiontohave.Therealquestionishowtodefinethenotionmathematically.IfwewereunabletoproveProposition10.1.3thenthiswouldcall intoquestionwhetherDefinition10.1.1 is therightone. Ithasoftentakenmanyyearstogetadefinitionright,givinganappropriatemathematicalformulationofthemeaningof awordwhich successfully captures the intuitive concept.For example the search for themostusefuldefinitionofcontinuitywhenappliedtofunctions → tookoverahundredyears.

ConstructingaproofofProposition10.1.3.Inspiteofbeingintuitively‘obvious’thisisanotaneasyresult; itwouldberemarkableforastudent tofindaproofwithoutsomeassistance.Onedifficulty isthat it involves a setX about which we know very little. Let us summarize what we are trying toachieve.

Toproceed,noticethatthegoaldoesnotinvolvethesetX.However,sincefandgarebijectionstheyareinvertiblewithinversesf-1:X→ andg-1:X→ whicharealsobijections.Sothecomposite

isalsoabijection(withinversef-1og).Thuswecanusethebijectionsfandgtoconstructabijection→ .NowthestatementthatsuchabijectionexistsdoesnotinvolvethesetX.Thissuggeststhe

followingstrategyforprovingtheproposition.

Ifwecanprovethisthenwewillbehomesincethegivenstatementfollowsfromthehypothesesintheproposition.NoticethatthisimplicationisjustaspecialcaseoftheresultwearetryingtoprovewithX= for we then automatically have a bijection g: → given by the identity map. It is quitecommontoproveageneralresultbyreducingittosomespecialcase.

Nowtotacklethisimplicationwelookbacktothedefinitionofabijection:afunctionisabijectionifandonlyifitisaninjectionandasurjection.Sowemightbeginbyexaminingwhatcanbededucedsimply from the injectivityofa function → . Intuitively this implies thatm n, suggesting thefollowingfirststep.

Infactthisimplicationonitsownwouldbesufficientforourneeds.Forabijectionh: → isaninjectionandhasaninverseh-1: → which isalsoabijectionandsoan injection.Applying theimplicationtohgivesm nandapplyingittoh-1givesn m.Butm nandn monlyifm=n(seeExercise4.5).

Thisprocessofreducingaresulttobeprovedtosuccessivelysimplerormoreconcretestatementsiscommoninconstructingproofs.Tokeeptrackofwhatwearedoingitcanbeusefultoformulatetheseother statementsaspropositionsor theorems in theirownright; sometimes theword ‘lemma’ isused

Page 106: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

instead, indicating that a result’s primary interest is as a stepping stone in the proof of somemorestrikingresultorresults.

In this case it turns out that the implicationwe have reached is of sufficient interest to be statedformallyasalemma.SowedothisnowandwriteouttheformalproofthatProposition10.1.3followsfromit.Wewillthenreturntotheproofofthelemmainthenextchapter.

Proof of Proposition 10.1.3 This result follows from the following result to be proved in the nextchapter.

Lemma10.1.4Ifthereexistsaninjection → thenm n.

For,givenbijectionsf: →Xandg: →X,theyareinvertiblewithinversesf-1:X→ andg-1:X→ whicharealsobijections.Sothecompositeg-1of: → isabijection,andsoaninjection.Itfollowsfromthelemmathatm n.

Butnowwecanreversetherôlesoffandg.Thecompositef-1og: → isaninjectionandsoagainbythelemman m.Sincewehaveprovedthatm nandn mitfollowsthatm=nasrequired.

Ofcoursenotallsetscanbecounted.Forexampleifwestartcountingthepositiveintegersintheobviouswaywenevercometoanend. It isuseful todistinguishsets forwhich thecountingprocessdoesendfromthosewhichdonot;todistinguishfinitesetsfrominfinitesets.

Definition10.1.5GivenasetX,if|X|=nforsomenon-negativeintegernthenwesaythatthesetisIfthisisnotthecasethenwesaythatthesetis

ThussayingthatasetXisfinitemeansthateitheritisemptyorthereexistsabijection →Xforsomepositiveintegern.

10.2TwobasiccountingprinciplesThereare twobasic countingprincipleswhichare frequentlyusedandextremelypowerful.The firstseemsalmosttoosimpletostate.

Theorem10.2.1(Theadditionprinciple)SupposethatXandYaredisjointfinitesets.ThenX∪Yisfiniteand|X∪Y|=|X|+|Y|.

Constructing a proof. The form of words used in the conclusion of this result sometimes causesconfusion.Because it isan ‘and’statement the readermight imagine that it isnecessary toprove thefirststatementandthentoprovethesecondstatement.But infact thefirststatement isan immediateconsequenceofthesecondand,withwhatwehavedonesofar,theonlywaytoprovethatasetisfiniteistoprovethatithascardinalityequaltosomenon-negativeinteger.SinceXandYarefinitesets, |X|and |Y| arenon-negative integersand thusso is |X|+ |Y|.Weobtain the resultbysimplyproving thatX∪Yhascardinalityequalto|X|+|Y|.

NoticethatsincethesetX isfinite theneitherX isemptyorthereisabijectionNn→X forsomepositiveintegern.ItisnecessarytoconsiderthesetwocasesseparatelyandsimilarlyforY.ThecaseswhenXorYhascardinality0are trivial. In theothercases theresultseemsobvioussincewesimplycounttheelementsinthesetX,sayn,andthencounttheelementsofYstartingatn+1.Thefollowingproofsimplytranslatesthisintuitiveideaintothelanguageofbijections,usingthebijectionstoXandY

Page 107: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

togiveabijectiontoX∪Yasindicatedinthediagramonthenextpage.

ProofLet|X|=nand|Y|=m.Wearerequiredtoprovethat|X∪Y|=n+m.Ifn=0thenXistheemptysetandsoX∪Y=Ysothatautomatically|X∪Y|=|Y|=m=0+m.Similarlytheresultisclearifm=0.Soletusconsiderthecasewhennandmarebothpositive.

Since|X|=nand|Y|=mtherearebijectionsf: →Xandg: →Y.Wecannowdefineabijection→X∪Yasfollows.

Thisshowsthat|X∪Y|=m+n.NoticethathisaninjectionbecausefandgareinjectionsandX∩Y=;hisasurjectionbecausefandgaresurjections.Attheendofthisproofsomedetailshavebeenomitted.Thereadermightliketoconsiderhowto

supply these details justifying the last sentence of the proof. This sentence does indicate how thehypothesesinthetheoremarebroughtintoplayintheproof;itisimportantwhenwritingoutaprooftoindicateatwhichpoint(s)hypothesesareused.

Corollary 10.2.2For a positive integer n, suppose that X1, X2,…, Xn is a collection of n pairwisedisjointfinitesets(i.e.i≠j Xi∩Xj= ).

Then isafinitesetand

ProofThisisaneasyinductionproofusingthetheorem.Thedetailsareleftasanexercise.

Thesecondbasiccountingprincipleisaconsequenceofthefirst.

Theorem10.2.3(Themultiplicationprinciple)SupposethatXandYarefinitesetssuchthat|X|=nand|Y|=m.ThentheCartesianproductX×Yisafinitesetand|X×Y|=mn.

ProofIfeitherofXandYisemptythensoisX×Yandtheresultfollows.Sosupposethatbothsetsarenon-empty.

Letf: →Xbeabijectionandwritexi=f(i).Then

andso

Butnow,ifg: →Yisabijection,theni (xk,g(i))givesabijection →{xk}×Ysothat|{xk}×Y|=m.Itfollowsfromthepreviouscorollarythat|X×Y|=mn.Examples10.2.4(a)Anelementof isanorderedpairofpositiveintegerseachnogreaterthan9.

Page 108: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thenumberofsuchpairsis9×9=81bythemultiplicationprinciple.(b)Whatthenisthenumberoforderedpairsofdistinctpositiveintegersnogreaterthan9?Thefunctionn (n,n)providesabijection →{(n,n)|n }showingthattherearenineorderedpairsofequalintegers.Thissetoforderedpairsiscalledthediagonalsetin andisdenotedby( Weareinterestedinthecardinalityofthecomplementofthediagonalset, .However, isthedisjointunion andso,bytheadditionprinciple,

sothatthenumberoforderedpairsofdistinctpostiveintegersnogreaterthan9, ,is81-9=72.

Thereareofcourseotherwaysofobtainingthesameresult.Forexample,thereareninepossibilitiesforthefirstcoordinateandforeachofthesetherearetheneightpossibilitiesforthesecondcoordinatesothatthenumberofordereddistinctpairsis9×8=72.

Fromthisresultwecandeducethatthenumberofunordereddistinctpairsis72/2=36sinceeachpairmaybeorderedintwoways.

10.3Theinclusion-exclusionprincipleThe addition principle in the last section leads on to an extremely powerful combinatorial techniqueknownastheinclusion–exclusionprinciple.Thisisconcernedwithasituationwherewehaveafinitenumberoffinitesetsofknowncardinality(notingeneraldisjoint)andwewishtoknowthenumberofelementswhichlieintheirunion.Letusconsiderthesimplestexample,twosets.

Proposition10.3.1SupposethatXandYare(notnecessarilydisjoint)finitesets.ThenX∪Yisafinitesetand

ProofRecallfromProposition6.2.4thatX∪Y=(X–Y)∪(Y–X)∪(X∩Y),aunionofdisjointsets,sothatbytheadditionprinciple

Similarly,X=(X–Y)∪(X∩Y)isaunionofdisjointsetsandso

Similarly|Y|=|Y–X|+|X∩Y|.Thus

asrequired.ThisresultisreallyobviousfromthefollowingVenndiagram.

Page 109: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

RecallthatA∪Bconsistsofregions1,2and3;Aconsistsofregions1and2;Bconsistsof1and3;andA∩B consists of region 1. Ifwe countA and then countB giving |A| + |B| thenwewill havecountedtheelementsinA∩Btwiceandsowetakeaccountofthisbysubtracting|A∩B|.

Theinclusion–exclusionprincipleisthegeneralizationofthisresulttoanarbitraryfinitecollectionofsets.Considerthecaseofthreesets.

Proposition10.3.2SupposethatX,YandZarefinitesets.ThenX∪Y∪Zisafinitesetand

ProofWeapplyProposition10.3.1 toX∪Y∪Z= (X∪Y)∪Z and thenapply it again to the setswhicharise.

Substitutingfromequations(10.2)and(10.3)intoequation(10.1)givestheresult.The general inclusion-exclusion principle is given as Problems III, Question 4. This proposition

illustratestheinductivestepintheproof.Anumberofapplicationsappearlaterinthebook.

Exercises

10.1SupposethatXisanon-emptyfinitesetofcardinalityn.ProvethatasetYhas|Y|=nifandonlyifthereexistsabijectionX→Y.

10.2ProveCorollary10.2.2.

10.3LetX={a,b,c}andY={d,e}.WhatisthecardinalityoftheCartesianproductX×Y?Writedownanexplicitbijection →X×Ywheren=|X×Y|.

10.4Eachofacollectionof144tilesiseithertriangularorsquare,eitherredorblue,andeitherwoodenorplastic.Giventhatthereare68woodentiles,69redtiles,75triangulartiles,36redwoodentiles,40triangular wooden tiles, 38 red triangular tiles, and 23 red wooden triangular tiles, howmany blueplasticsquaretilesarethere?

†InfactwecoulddefineNotobetheemptysetsothatthecaseofcardinality0iscoveredbythebijectiondefinition.However,thereadermeetingsettheoryforthefirsttimemaybeworriedbythebijectionbetweentwoemptysets(itisthefunctionwhosegraphistheemptysubsetof × = !)andsoitseemsbesttokeepthiscaseseparate.

Page 110: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

11Propertiesoffinitesets

Thereareanumberof special techniquesavailable forproving resultswhich involve finite sets. It isclearly possible to determinewhether or not a finite set contains an elementwith a certain propertysimplyby trying each element in turn.More interestingly it is possibleonoccasion touse ‘countingarguments’todemonstratetheexistenceofanelementwithacertainpropertywithoutconsideringthepropertiesofindividualelementsatall.Weconsiderthesetechniquesinthischapter.

11.1ThepigeonholeprincipleWebeginbyrecallingthekeystepusedinthelastchaptertoprovethatthecardinalityofafinitesetisawell-definedconcept.Weleftforthischaptertheproofofthefollowingresult.

Lemma10.1.4Ifthereexistsaninjection m nthenm n.

Constructing a proof. Since this is a statement involving natural numbers a proof by induction issuggested.Therearetwonaturalnumbersmandninthestatementandsothereisachoice:inductiononm or induction on n? The following proof is by induction on n. The task of constructing analternativeproofbyinductiononmislefttothereader(seeProblemsIII,Question8).

ThepredicateP(n)inthiscaseisthefollowinguniversalimplication.

Sothestepsoftheinductiveproofareasfollows.Basecase:Itisnotdifficulttoprovebycontradictionthatifthereexistsaninjection m 1thenm=1.(Notethatm 1 m=1forapositiveintegerm.)Inductivestep:Foreachk 1wemustproveanimplicationwhichmaybesummarizedasfollows.

Thevariablemisa‘dummy’variableinboththegivenstatementandthegoal.Toavoidconfusionitisbetterasusualtoreplacembysomeothersymbol,saym1,inthegoalstatementsothatitbecomes m1+( injection ).Thedirectmethodofprovingthisistosupposethat isaninjectionandthentoseektodeducethatm1 k+1.Thismaybesummarizedasfollows.

Page 111: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Itisnotpossibletoapplythegivenuniversalimplicationdirectlytotheinjectionfsinceitscodomainisk+1: to apply the given implication we need an injection into k and this may require a change ofdomain.Thedetailsoftheprooffollow[withadditionalcommentsinbrackets].

ProofWeproveLemma10.1.4byinductiononn.Basecase:Thisstatementistrivialforn=1since,iff: m 1,wemusthavef(i)=1foralli mandthisisnotaninjectionifm>1sincethen,forexample,f(1)=f(2)=1.Thusiffisaninjectionthenm=1=n.

[Noticethatthisisreallyaproofbycontrapositive.Whatisactuallyprovedis‘m>1 f: m 1isnotaninjection’whosecontrapositiveis‘f: m 1isaninjection m 1’.]

Inductivestep:Suppose,forsomek 1,thattheresultistrueforn=k.Wemustdeducethatitholdsforn=k+1sosupposethat isaninjection.

[Theaimnowistoconstructaninjectionf1: m kforsomem towhichwecanapplytheinductivehypothesis.]

Weconsidertwocases.

(i)Suppose that f(i)<k + 1 for al i m. Thenwe can restrict the codomain and define a function.Thefunctionf1isalsoaninjectionandso,byinductivehypothesis,m1 kand

socertainlym1 k+1asrequired.

[Thefunctionf1isaninjectionsincef1(i1)=f1(i2) f(i1)=f(i2) i1=i2sincefisaninjection.]

(ii)Ontheotherhand,supposethatk+1isavalueoff,sayf(i0)=k+1wherei0 m1.Inthiscasewecandefineaninjectiong: m1–1 m1by

andthendefine .

Page 112: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

[Noticethatifi i0thenf(i) f(i0)=k+1sincefisaninjectionsothatf(i) k.]

Thenthisfunctionf1isalsoaninjection(sinceitisthecompositeoftwoinjections)andso,byinductivehypothesis,m1–1 k,i.e.m1 k+1,asrequired.

Sinceoneorotherof these casesmustbe true for each function f thiscompletes theproof of theinductivestep.

Conclusion:Hence,byinductiononn,iff: m nisaninjectionthenm n.

Wecanimmediatelyextendthislemmatogeneralfinitesets.

Corollary11.1.1Suppose thatXandYarenon-empty finitesets. If thereexistsan injection f:X Ythen|X| |Y|.

Soforexampleifagroupofpeopleareallsittinginaroom(ohseparatechairs)thenthenumberofpeopleisnogreaterthanthenumberofchairs.

Constructingaproof.Thehypothesis tellsus that therearebijectionsg1: m Xandg2: n Y forsomepositiveintegersmandn.Then|X|=mand|Y|=nandwecanobtaintheresultbyapplyingthelemmatothecomposite

sincethisisaninjection(becauseitisacompositeofinjections).Thisisagoodexampleofhowwecandeducearesultaboutgeneralfinitesetsfromthespecialcase

aboutthemodelsets nofthesamecardinality.

ProofByhypothesis|X|=mand|Y|=nforpositiveintegersmandn.Hencetherearebijectionsg1: mXandg2: n Y.Theng–1 f g1: m nisaninjection.Hence,byLemma10.1.4,m n,i.e.|X|

|Y|,asrequired.

This result is usually stated in the following form. It was first formulated in the first half of thenineteenthcenturybyLejeuneDirichletwhocalleditthe‘drawerprinciple’.

Page 113: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Theorem11.1.2 (Thepigeonholeprinciple)Suppose that f:X Y is a function between non-emptyfinitesetssuchthat|X|>|Y|.Thenfisnotaninjection,i.e.thereexistdistinctelementsx1andx2 Xsuchthatf(x1)=f(x2).

ProofThisisthecontrapositiveofCorollary11.1.1andsofollowsfromthatresult.

Examples11.1.3 (a)Therearemanysimpleapplicationsof this result.Forexample, inanygroupofmorethantwelvepeopletheremustbetwopeoplewithbirthdaysinthesamemonth.

(b)Foraslightlymoreelaborateapplicationconsiderthefollowing.SupposethatXisasetofatleasttwopeople.Then it canbe shown thatwithin this set thereare twopeoplewith the samenumberoffriendsintheset.(Hereweareassumingthatifx1isafriendofx2thenx2isafriendofx1.)

Tosee this let |X|=n anddefinea function f:X {0,1,2,…,n–1}by setting f(x) equal to thenumberoffriendsofxinX.Nownoticethatifn–1isavalueoffthenthereexistsx0 Xsuchthatf(x0)=n–1.Thismeansthatthepersonx0isafriendofeveryoneelseandsonooneisfriendless,i.e.0isnotavalueoff.Hencethenumbers0andn–1(distinctsincen 2)cannotbothbevaluesoff.HencetheimageImfhascardinalitylessthannandsobythepigeonholeprinciplefcannotbeaninjection,i.e.thereexistdistinctelementsx1andx2suchthatf(x1)=f(x2)asclaimed.

Somemoremathematicalapplicationswillcomelater.

WecanmimictheproofofLemma10.1.4toprovethefollowingmoregeneralresult.Thedetailsarelefttothereader(seeProblemsIII,Question9).(AsimilarresultappearsasExercise11.1.)

Proposition11.1.4Supposethatf:X nisaninjection.ThenXisafinitesetand|X| n.

Thishasthefollowingconsequencewhichisintuitivelycompletelyobvious.However,aproofofithastobebasedonourdefinitions.

Corollary11.1.5SupposethatX YwhereYisafiniteset.ThenXisalsoafinitesetand|X| |Y|.

ProofSupposethat|Y|=nsothatthereisabijectionf: n Y.Leti:X Ybetheinclusionfunctioni(x)=x. This is clearly an injection and so the composite f–1 i:X Y n is an injection.Hence, byProposition11.1.4,Xisfiniteand|X| n,asrequired.

Intheabovewehaveconcentratedonthepropertyofinjectivity.Itisnotdifficulttodeducesimilarresultsaboutsurjectivitysuchasthefollowing.

Theorem11.1.6Suppose that f:X Y is a functionbetweennonempty finite sets such that |X| < |Y|.Thenfisnotasurjection,i.e.thereexistsanelementofYwhichisnotavalueofthefunction.

Thiscanbeprovedbysimilarmethodstothepigeonholeprinciple.Alternativelyitcanbededucedfromthepigeonholeprinciplebyobservingthat fromasurjectionX Y it ispossible toconstructaninjectionY X(seeforexampleProblemsII,Question19).

Iftwofinitesetsareknowntohavethesamesize,thenitbecomeseasiertocheckwhetherafunctionbetweenthemisabijection.

Theorem11.1.7SupposethatXandYarenon-emptyfinitesetsofthesamecardinality.ThenafunctionX Y isan injection ifandonly if it isa surjection.Thus toprovebijectivity it isonlynecessary to

Page 114: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

checkoneofinjectivityandsurjectivity.

Theproofofthisresultislefttothereader(ProblemsIII,Question11).

11.2FinitesetsofrealnumbersOneadvantageofworkingwithfinitesetsisthatwhenweareseekinganobjectwithacertainpropertyeachoftheelementscanbetestedinturnandthistaskwillterminate.Asanexampleofthisconsidertheproblemofseekingthegreatestelementinasetofrealnumbers.Ofcoursetherearesetsofnumberswithoutagreatest,forexamplethesetofintegers(seeProblemsI,Question10).Itwillnowbeshownthatanyfinitenon-emptysetofrealnumbersdoeshaveagreatestelement.

Definition11.2.1LetAbeasetofrealnumbers,i.e.A .Thenbisa orwhen

(i)bisanelementofA,i.e.b A,(ii)bislessthanorequaltoeveryelementofA,i.e.a A b a.

Similarly,cisa or when

(i)cisanelementofA,i.e.c A,(ii)cisgreaterthanorequaltoeveryelementofA,i.e.a A c a.

Notice that if a set of real numbers,A, has amaximum then thismaximum is unique so that thenumbermaxA is well-defined.Writing out a formal proof of this uniqueness is left as an exercise(Exercise11.2).Similarlytheminimumisuniqueifitexists.

Examples11.2.2(a)ForA={–1,17,12,–78,8},minA=-78andmaxA=17.

(b)Theset +ofpositiveintegershasmin +=1butthereisnomaximumelement.

(c)Anynon-emptysetofpositive integershasaminimumelement.Thisresult isknownas thewell-ordering principle and is equivalent to the induction principle (see Exercise 11.6 and Problems III,Question15).

(d)Theset +={x |x>0}ofpositiverealnumbershasnominimumelementandnomaximumelement.Noticethat,givenanyelementa +thereisasmallerone,forexamplea/2 +(seeProblemsI,Question11).

Proposition11.2.3LetAbeafinitenon-emptysetofrealnumbers.ThenAhasaminimumelementandamaximumelement.

Whenthis result isapplied it isalways important tocheck that thesetunderconsideration isnon-empty. The empty set is finite but does not have a minimum or maximum element since it has noelementsatall!

Constructingaproof.Ifwethinkwhythisisintuitivelyobviouswecomeupwiththefollowingideas.Supposethat|A|=n +.(ThismakesuseofthefactthatAisfinite.)ThenwecanwriteA={a1,a2,

…,an}.To find themaximumelementwe trya1 andbegin successivelycomparing itwith theotherelementsa2,a3andsoon. Ifwehitsomethinggreaterwestartusing that inplaceofa1andcarryon

Page 115: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

workingthroughthelistrepeatingthereplacementprocesswheneverwereachagreaterelement.Whenwehavecompletedthelist,theelementwehaveisthemaximumelement.

Towriteoutthisargumentmoreformallywenoticethatthephrase‘andsoon’suggeststhatthisisreallyaninductionargumenteventhoughthestatementofthepropositiondoesnotexplicitlyrefertoapositiveinteger.However,thereisanimplicitinteger,namelythecardinalityofthesetA.

ProofWewriteout theproof for ‘maximumelement’ leaving theproof for ‘minimumelement’asanexercise.

Weprovebyinductiononnthat,forallpositiveintegersn,allnonemptyfinitesetsofrealnumberswithcardinalitynhaveamaximumelement.Thisisclearlyequivalenttothepropositionbecauseanynonemptyfinitesethascardinalitynforsomepositiveintegern,bydefinitionof‘finite’.Basecase:Forn=1,thesingleelementofthesetisthemaximum(andtheminimum)element!Inductivestep:Supposethatforsomek +theresultholdsforn=ksothatallsetsofrealnumbersofcardinality k have a maximum element. Let A = {a1, a2,…, ak, ak+1} be a set of real numbers ofcardinalityk+1.Byinductivehypothesis,thesetA'={a1,a2,…,ak}hasamaximumelement,saya'.Ifa' ak+1,thena'isthemaximumelementofA.Ifa’<ak+1,thenak+1isthemaximumelementofA.IneithercaseAhasamaximumelementandsowehavededucedtheresultforn=k+1,completingtheinductivestep.Hencebyinductiontheresultholdsforalln +andthepropositionisproved.

11.3TwoapplicationsoffinitenessThegreatestcommondivisor

InDefinition 2.2.1we introduced the notion of one integer dividing another. Recall that a non-zerointegerddividesawhenthereisanintegerqsuchthata=dq.Inthiscasewesaythatdisadivisororafactorofa.Alternativelywesaythataisamultipleofd.

Everynon-zerointegerdivides0(sincewecantakeq=0).However,ifaisnon-zerothen,ifa=dq,qisalsonon-zeroandso,since|q| 1,wehave|a| |d|.Thusthesetofdivisorsofa,

isfiniteifaisnon-zerowithminD(a)=–|a|andmaxD(a)=|a|.Ifnowwearegiventwointegersaandb,notbothzero,thenthesetofcommondivisorsofaandbis

givenbytheintersectionD(a) D(b).Noticethat1 D(a) D(b)so thatD(a) D(b) isanon-emptyfinitesetandsomustthenhaveamaximumelement:thegreatestcommondivisor.

Definition 11.3.1 Let a and b be two integers, at least one of which is non-zero. Then theorhighestcommonfactorofaandbistheuniquepositiveintegerdsuchthat

(i)disacommondivisor,i.e.ddividesaandddividesb,(ii)disgreaterthaneveryothercommondivisor:

Wedenotethegreatestcommondivisorofaandbby †orincaseofpossibleambiguity .

Definition11.3.2Twointegersaandb,notbothzero,arecalled orrelativelyprimewhen(a,b)=1,inotherwordstheironlycommonfactorsare1and–1.

Page 116: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Example11.3.3Thesetofdivisorsof30is

andthesetofdivisorsof72is

Hencethesetofcommondivisorsis

Thusthegreatestcommondivisor(30,72)=6.

OddandevenintegersWecanusetheseideastoprovearesultwhichwasusedinProblemsI,Question7.ItisaspecialcaseofthedivisiontheoremwhichwillbereachedinChapter15.

Proposition11.3.4Anintegeraisoddifandonlyifa=2q+1forsomeintegerq.

Recallthatwehavedefined‘odd’tomeannotdivisibleby2(seeDefinition2.2.3).Sincethisresultisan‘ifandonlyifstatementwehavetwothingstoprove:thattheconditiona=2q+1forsomeqisbothnecessaryandsufficientforatobeodd.TheproofofsufficiencyisageneralizationoftheproofofProposition2.2.4inSection4.1soletusgetthatoutoftheway.

Proofof the sufficiencyof a=2q+1Suppose thata=2q + 1whereq . To prove thata is odd,supposeforcontradictionthataiseven.Thena=2pforsomep .Butthen2p=a=2q+1sothat1=2(p–q)whichimplies1 2givingtherequiredcontradiction.

Hence2q+1isnotevenandsoisoddbydefinition.

Constructingaproofofthenecessityofa=2q+1.Thedifficultyoftheproofofnecessityisthatwesomehow have to get our hands on the elementq. One commonway of constructing an element inresults of this type is to define it in terms of some set – in this casewe define it as themaximummemberofafiniteset.Ifyouthinkofhowyouwouldinpracticefindthisnumberqyourealizethatyouwouldkeepdoubling integersuntil yougot as close toa as possible.Whenwe formalize this into amathematicalargumentitgivestheproof.Itiseasiertoworkwithpositiveintegersfirstandthenextendtonegativeones.

Proofofthenecessityofa=2q+1(a)Supposethataisapositiveoddinteger.Set

Thisisanon-emptysetsince0 Aanditisafinitesetsincek A 2k a k a.Sowecandefineq=maxA.

Toprovethata=2q+1noticefirstofallthat,sinceq A,a 2qand,sinceqisodd,a 2qandsoa2q+1.Ontheotherhand,sinceq=maxA,q+1 Asothata<2(q+1)=2q+2,i.e.a 2q+1.Thuswehaveprovedthata 2q+1anda 2q+1fromwhichitfollowsthata=2q+1asrequired.

(b)Tocompletetheproofsupposethataisanegativeoddinteger.Then–aisapositiveoddintegersothatfromwhatwehaveproved–a=2q1+1.Butthena=–2q1–1=2(–q1–1)+1=2q+1asrequiredifweputq=–q1–1.

Page 117: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Exercises11.1Supposethat n→Xisasurjection.Prove,byinductiononn,thatXisafinitesetandthat|X| n.[ThisissimilartoProposition11.1.4.]

11.2 UseDefinition 11.2.1 to prove that if a set of real numbers has amaximum element then thiselementisunique.[Hint:Supposethatc1andc2aretwomaximumelementsofasetAandusethedefinitiontoprovethatc1=c2.]

11.3Findthegreatestcommondivisorof88and136.

11.4Provethat,ifaandbarenon-zerointegerswithgcd(a,b)=d, thentheintegersa/dandb/darecoprime.

11.5SupposethatXandYarefinitesetssuchthatX Y.Provethat

(i)X=Y |X|=|Y|,(ii)X Y |X|<|Y|.

11.6ProvebyinductiononnthatifAisasetofpositiveintegerswithoutaleastelementthen n +–AforeverynsothatAistheemptyset.

Deducethewell-orderingprinciple:everynon-emptysetofpositiveintegershasaleastelement.†Thereadershouldbeaware(andbeware)ofthewayinwhichsomenotationisusedinavarietyofways.Hereweareusing(a,b)forthegreatestcommondivisoroftwointegers,butwehavepreviouslyusedthisnotationtodevoteanelementoftheCartesianproduct ×andtodenotetheopeninterval{x |a<x<b}.Itisusuallyclearfromthecontextwhichofthesemeaningsisintended.Thereaderjusthastogetusedtothissortofambiguity.

Page 118: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

12Countingfunctionsandsubsets

Verymanycountingproblemscanbeformulatedintermsofcountingthenumberoffunctionsbetweentwo sets (possibly satisfying certain properties) or counting the number of subsets of a given set(possiblysatisfyingcertainproperties).Inthischapterwegiveabriefintroductiontotheseideas.Theynaturally lead to the binomial coefficients, one of the most important families of numbers in allmathematics.

12.1CountingsetsoffunctionsSuppose thatXandY are finite sets. It is natural to askhowmanydifferent functions there arewithdomainXandcodomainY.Forexample,ifXisasetofpeopleandYisasetofdishesonamenu,theneachfunctionX→Yrepresentsachoiceof(one)dishforeachperson,sothatthenumberoffunctionsrepresentsthenumberofpossibleordersbythesetofpeople.IfSisasetofstudentsandTisasetoftutorsthenafunctionS→Tisanassignmentofatutorforeachstudent.

Thereisanotherincreasedlevelofabstractionhere.Theideaoftreatingaset,forexamplethesetofintegers, as a single mathematical object is one stage of abstraction. A further stage is viewing afunction fromoneset toanotherasa singlemathematicalobject.Butnowweare forminganewsetwhoseelementsarethefunctionsfromonesettoanotherandaskingquestionsaboutthisset.

Letusreturntotheproblemweareconsideringtogiveanexample.

Example12.1.1LetX={a,b,c}andY={d,e}.ThentheeightfunctionsX→YarelistedinExample8.1.3.Inordertodefineafunctionf:X→Y,wemustlisttheelementsf(a),f(b)and f(c). Intuitively,sincef(a)canbechosenintwoways(dande),f(b)canbechosenintwowaysandf(c)canbechosenintwo ways, f can be chosen in 2 × 2 × 2 = 8 ways and so there are eight functions. This exampleillustratesthefollowinggeneralresult.

Proposition12.1.2SupposethatXandYarenon-emptyfinitesetswith|X|=mand |Y|=n.Then thenumberoffunctionsX→Yisgivenbynm.

Constructing a proof.We can generalize the above argument as follows. By the hypotheses in thepropositionwecanlisttheelementsofthesets:X={x1,x2,…,xm}andY={y1,y2,...,yn}.Afunctionf:X→Yisdeterminedbylistingthevaluesf(x1),f(x2),andsoonuptof(xm).Therearenpossibilitiesforf(x1),npossibilitiesforf(x2),andsoon.Hencethenumberoffunctionsisn×n×…×n(mfactors)=nm,asrequired.

Page 119: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thephrase‘andsoon’inthisargumentindicatesthatitisreallyanargumentbyinduction–inthiscaseaninductiononm.Thisisagoodexampleofaresultwithaconvincinginformalproof,asgivenabove,forwhichtheformalproof israthercomplicated.Thereadershouldendeavourtoseehowthesimple idea in the informal proof underpins the formal proof.Whenwriting out a formal proof it isconvenienttohaveanameforthesetoffunctionsX→Y.

Definition12.1.3GivensetsXandYwedenotethesetoffunctionsfromXtoYby

ProofofProposition12.1.2Theproofisbyinductiononthepositiveintegerm.Basecase:Form=1supposethatX={x1}.ThenforanysetYthereisabijectionFun(X,Y)→Ygivenby .Hence|Fun(X,Y)|=|Y|=nasrequired.Inductivestep:Supposethat,forsomek 1,theresultholdsform=k.Todeducetheresultform=k+1supposethatX1andYarenon-emptyfinitesetswith|X1|–k+1and|Y|=n.LetX1={x1,x2,…,xk+1}andY={y1,y2,•••,yn}.Thentherearenpossibilitiesforf(xk+1)and

adisjointunion.Wecandeterminethecardinalityofeachofthesetsintheunionusingthebijection

definedby .[Noticethatifweknowthatf(xk+1)=yithenfisdeterminedbyitsvaluesonx1,…,xk.]Forthen,byinductivehypothesis,

Hence,bytheadditionprinciple,

asrequiredtodeducetheresultform=k+1andsocompletingtheinductivestep.Conclusion:Hence,byinductiononm,theresultholdsforallpositiveintegersm.

Forcertainapplicationswedonotwishtoknowthetotalnumberoffunctions,butjustthenumberwhichhavesomespecificproperty.Quitecommonlywewanttoknowthenumberofinjections.

Proposition12.1.4SupposethatXandYarenon-emptysetswith|X|=mand|Y|–n.ThenthenumberofinjectionsX→Yisgivenbyn(n–1)…(n–m+1).

Thenumbern(n – 1)…(n –m + 1) is usually called a falling factorial and is denoted by (n)m inbooksoncombinatorics.Whenm=nitisjusttheusualfactorialdenotedbyn!.Whenm>nthefallingfactorialvanishessinceoneofthefactorsis0:thisshowsthatProposition12.1.4isageneralizationofthepigeonholeprinciplewhichassertsthatinthiscasetherearenoinjections.Ifm n,then(n)m=n!/(n–m)!.

TheproofofthisresultisalmostidenticaltothatofProposition12.1.2exceptthataswechoosethevalues f(x1), f(x2) and so on we must avoid elements of the codomain Y which have already beenselected.Towriteitoutitisagainusefultohaveanameforthesetwearecounting.

Definition12.1.5GivensetsXandYwedenotethesetofinjectionsfromXtoYby

Page 120: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProofofProposition12.1.4Theproofisbyinductiononthepositiveintegerm.Basecase:Form=1supposethatX={x1}.ThenforanysetYthereisabijectionInj(X,Y)=Fun(X,Y)→Ygivenby .Hence|Inj(X,Y)|=|Y|=nasrequired.Inductivestep:Supposethat,forsomek 1,theresultholdsform=k.Todeducetheresultform=k+1supposethatX1isasetofk+1elements.LetX1={x1,x2,…,xk+1}andY={y1,y2,…,yn}.Then

adisjointunion.Wecandeterminethecardinalityofeachofthesetsintheunionusingthebijection

definedby . [Notice that if f is an injection and f{xk+1)=yi then none of the valuesf(x1),…,f(xk)canbeyi.]Forthen,byinductivehypothesis,

Hence,bytheadditionprinciple,

asrequiredtodeducetheresultform=k+1andsocompletingtheinductivestep.Conclusion:Hence,byinductiononm,theresultholdsforallpositiveintegersm.

Inthecasewhenm=n,aninjectionisnecessarilyabijection(seeTheorem11.1.7).Bijectionswiththesamedomainandcodomainareofparticularinterest.

Definition12.1.6GivenasetX,abijectionX→Xiscalleda ofthesetX.

Corollary12.1.7Givena finitenon-emptysetXofcardinalityn, thenumberofpermutationsofX isgivenbythefactorialn!.

Proof This is just the special case of Proposition12.1.4whenm =n for in this case an injection isautomaticallyabijection(byTheorem11.1.7).

12.2CountingsetsofsubsetsRecallfromDefinition6.3.1thatthepowersetofXisthesetofsubsetsofX,i.e.

Proposition12.2.1Suppose thatX isasetofcardinalityn.Then thepowerset (X) isa finitesetofcardinality2n:

Constructingaproof.AsubsetA XisdeterminedbydecidingwhethereachofthenelementsofXisin thesubset: thereareclearly twopossibilities foreachelementx,namely and Hence the

Page 121: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

totalnumberofpossibilitiesforthesubsetAisgivenby2×2×…×2=2n.Thisratherinformalargumentcanbemadeprecisebyusingtheideaofthecharacteristicfunctionof

asubsetwhichappearedinProblemsII,Question15.

Definition 12.2.2 For any set X, we can associate to each subset A of a

definedby

Lemma12.2.3Thefunction →Fun(X,{0,1})givenby isabijection.ProofTheinverseisgivenby ProofofProposition12.2.1Usingtheresultoncountingfunctionsinthelastsection,

asrequired.

Definition12.2.4Given a set X and a non-negative integer r, an of X is a subset ofcardinalityr.Wedenotethesetofr-subsetsofXby i.e.

Wedefinethe orbinomialnumber (read ‘nchooser’) tobe thecardinalityoftheset when|X|=n.

The reason for this name will be apparent when we come to the binomial theorem later in thischapter.NoticethatgiventwofinitesetsX1andX2ofthesamecardinality,thereisabijectionf:X1→

X2.Suchabijectionwillinduceabijection (seeDefinition9.3.1)andsothebinomialcoefficientsarewell-defined.

Example12.2.5SupposethatX={a,b,c,d};then

ThusThisexampleillustratesthefollowinggeneralresults.

Proposition12.2.6Fornandrnon-negativeintegers

Page 122: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

.

ProofSupposethatXisafinitesetwith|X|=n.(i)Xhasnosubsetsofcardinalitygreaterthannandso forr>n.(ii) and so and so . If X = {x1, x2,…, xn} then

andso .(iii)There is a bijection given bymapping each subset to its complement

Hence .

Proposition12.2.7

ProofThisisimmediatefromDefinition12.2.4usingProposition12.2.1andProposition12.2.6(i).

EvaluatingbinomialcoefficientsThe method used in Example 12.2.5, calculating binomial coefficients by enumerating subsets, isextremelyinefficient.Thereisanancientinductivemethodforevaluatingthesenumbersandthekeytothisisthefollowingresult.

Proposition12.2.8Forpositiveintegersnandrsuchthat1 r n

Proof Let X be a set of cardinality n and choose x1 X. Then we may define a bijectionasfollows.Let Then

Wecanprovethatthisisabijectionbywritingdowntheinverse

asfollows:

Theresultnowfollowsbytheadditionprinciple(Theorem10.2.1).Remarks12.2.9 This relation gives an inductivemethod for calculating binomial coefficientswhichappearstohavebeenfirstdiscoveredinChinabytheendoftheeleventhcenturybutisnowknowninthewestasPascal’striangleaftertheFrenchmathematicianBlaisePascal(1623–1662)whoconnectedthestudyofprobabilitywiththebinomialcoefficientsandmadeuseofthismethodofcalculatingthem.

Wemaydisplaythebinomialcoefficientsinatrianglebeginningasfollows.

Page 123: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Herethenumbersinthe(n+1)strowarethebinomialcoefficients forr=0,1,2,…,n.ByProposition12.2.6theborderconsistsentirelyofthenumber1.ByProposition12.2.8eachnumberisthesumofthetwoadjacentnumbersintherowabove.Thisisnotaveryconvenientmethodofworkingoutasinglebinomialcoefficientbutthereisanexplicitformulaasfollows.

Theorem12.2.10Fornon-negativeintegersnandrsuchthatr n,

Constructingaproof.ThemostdirectproofofthisformulaisbyinductionusingProposition12.2.8.Thedetailsofthisargumentaregivenbelow.However,althoughthisisprobablythesimplestargumenttowriteoutclearlyitisnotthemostenlighteningargument:itgivesnoindicationwhytheresultistrue.Mathematicianspreferproofswhichgivesomeunderstandingalthoughthisisnotalwaysachieved.†

Inthiscasewecanfindanalternativeand,Iwouldargue,abetterargumentbasedonthedefinitionofthebinomialnumberasthecardinalityofasetofsubsetsofagivencardinalityandintuitiveideasabouthowwechoosesuchasubset.

Suppose thatX is a set ofn elements.Each elementA of may be specified by listing the rdistinctelementsofXwhichbelongtoA.Forr>0thisamountstoconstructinganinjection sothatIm(f)=A.Thusthefunction

givenby (f)=Im(f)isasurjection.However,itisnotabijectionsincedifferentinjectionsmayhavethesameimage:wemaylisttheelementsofasubsetAinavarietyoforders.EachorderingoftheelementsofAcorrespondstoanelementoftheset and,byProposition12.1.4,thissethascardinalityr!.Hence,sincethecardinalityof isn!/(n–r)!(alsobyProposition12.1.4),itfollowsthatthecardinalityof is(n!/(n–r)!)/r!=n!/r!(n–r)!asclaimedinthetheorem.

ProofTheproofisbyinductiononn.Basecase:Ifn=0thentheonlypossibilityforrisr=0andweknowthat fromProposition12.2.6.Whenn=0andr=0,n!/r!(n–r)!=0!/0!0!=1(recallthat0!=1)andsotheresultistrueforn=0.Inductive step:Suppose as inductivehypothesis that, for somek 0, the result is true forn =k. Todeduceitforn=k+1,firstobservethat,forr=0andr=k+1, (byProposition12.2.6)and(k+1)!/r!(k+1–r)!=(k+1)!/0!(k+1)!=1andsotheresultholdsinthesecases.Nowsupposethat1r k.Then,byProposition12.2.8,

Page 124: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

asrequiredtodeducetheresultforn=k+1.Thisprovestheinductivestep.Hencetheresultistrueforallpositiveintegersn.

12.3Thebinomialtheorem[ProfessorMoriarty] is…endowedbynaturewithaphenomenalmathematicalfaculty.Attheageoftwenty-onehewrotea treatiseupon thebinomial theorem,whichhashadaEuropeanvogue.On thestrength of it he won the mathematical chair at one of our smaller universities, and had, to allappearances,amostbrilliantcareerbeforehim.

ArthurConanDoyle,MemoirsofSherlockHolmes(Thefinalproblem).

Thename‘binomialcoefficients’forthefamilyofnumbersconsideredintheprevioussectioncomesfrom its role in the binomial theorem. This theorem describes how to remove the brackets from anexpressionoftheform(a+6)n.Abinomialisthesumoftwotermsandsoa+bisabinomial.

Theorem12.3.1(Thebinomialtheorem)Forallrealnumbersaandbandnon-negativeintegersn,

Thistheoremisonlythesimplestformofthebinomialtheorem.Thereareversionsofthetheoremwhentheexponentisanegativeintegeroranon-integerbutinthesecasesthefinitesumisreplacedbyaninfiniteseries.†

Examples12.3.2Using the binomial theoremwe can read off the following identities fromPascal’striangle:

ProofofthebinomialtheoremRecall(fromDefinition5.3.3)thatwehaveadoptedtheconventionthatx0=1forallnon-zerorealnumbersx(includingx=0).

Theproofisbyinductiononn.LetP(n)bethestatementwearerequiredtoprove.Basecase:Forn=0thisstatementreads whichistruesince .Inductivestep:Supposenowasinductivehypothesisthat,forsomenon-negativeintegerk,P(n)holdsforn–k.Then,forallaandb,

Page 125: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

asrequiredtoproveP(k+1).Conclusion:HencebyinductionP(n)holdsforallpositiveintegersn.

ThisprovidesanalternativeproofofProposition12.2.7.

Corollary12.3.3

ProofSimplyputa=b=1inthebinomialtheorem.

Exercises

12.1WritedownthenextthreerowsofPascal’striangle(page151)andhencefindthecoefficientofa3b7in(a+b)10.

12.2Findthecoefficientofa98b2in(a+b)100.

12.3 Three people each select a different card from a single pack of 52 distinct cards.Howmanychoicesarepossible(i)ifwerecordwhoselectedwhichcard,and(ii)ifweforgetwhoselectedwhichcard?

12.4Threepeopleeachselectamaindishfromamenuoffiveitems.Howmanychoicesarepossible(i)ifwerecordwhoselectedwhichdish(asthewaitershould),and(ii)ifweignorewhoselectedwhichdish(asthechefcould)?

12.5Byequatingthecoefficientsofxnin(1+x)2n=(1+x)n(1+x)nprovethat

Page 126: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

12.6Provethattheproductofanynconsecutivepositiveintegersisdivisiblebyn!.

12.7Use(1+i)ntoprovethat

Obtainasimilarresultfor

[Thisquestionusescomplexnumbers.Thebinomialtheorem,Theorem12.3.1,holdsalsoforcomplexnumbersaandb,withthesameproof.]

†TheeminentmathematicianPierreDeligneoncewroteattheendofaveryformalproofofhisown‘Iwouldbegratefulifanyonewhohasunderstood thisproofwouldexplain it tome’, ‘Je serais reconnaissant à toutepersonneayant compris cettedémonstrationdemel’expliquer'(seeThéoriedestoposetcohomologieétaledesschémas,Tome3,LectureNotesinMathematics,305,Springer-Verlag,1973,page584).ThisisquotedinD.AlibertandM.Thomas,‘ResearchintomathematicalproofinDavidTall(editor),Advancedmathematicalthinking,Kluwer,1991.

†ThemoregeneraltheoremwasdiscoveredbytheEnglishmathematicianIsaacNewtonintheseventeenthcentury.Detailscanbefoundinbooks on advanced calculus ormathematical analysis - see for example the excellent bookR.Courant andF. John, Introduction tocalculusandanalysis,VolumeI,Wiley,1965.NodoubtProfessorMoriarty’streatisewasonthismoregeneraltheorem.

Page 127: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

13Numbersystems

Numbers originally arose for the purpose of counting. This makes use of the positive integersoftencalledthenaturalorcountingnumbers.Inordertowritedownnumbersweneed

somesystemofnumerals, a systemof symbols to represent numbers.At first the notation usedwassimplysomesortoftallyorrepeatedmarkbutintimemoreelaboratesystemsofnumeralsweredevisedleading eventually to our present Hindu-Arabic decimal system of numerals which makes use of‘cypherization’(i.e.differentsymbols1,2,3,4,5,6,7,8,9fordifferentnumbers)anda‘placevaluesystem’(e.g.in121thefirst‘1’denotes100,the‘2’denotes2×10=20,andthesecond‘1’denotes1sothatthenumberrepresentedisthesum100+20+1).

Aneffectiveplacevaluesystemrequiresasymboltodenotetheabsenceofapositivedigitanditisforthispurposethatasymbollike‘0’firstappeared(sothat,forexample,102and12representdifferentnumbers).Induecoursezerowasrecognizedasanumberinitsownrightandthenmuchlaternegativeintegerswereintroducedgivingthecompletesystemofintegers inwhichanytwoelementsmaybeaddedorsubtracted.

However,numbersarealsousedforpurposesofmeasurement,originallyoflengthsbutthenofmanyotherquantities.Before1800B.C. theBabylonianshaddeveloped a systemof sexagesimal fractionsratherlikeourmoderndecimalsbutusingabaseof60ratherthan10.Thesewereuseduntilrelativelymodern times, particularly in astronomy, and indeed are still used in themeasurement of angles bydegrees,minutesandsecondsandtimebyhours,minutesandseconds.Forexampleifwestatethatthe

size of an angle is 18°15’53” we are saying that it is degrees. Other ancientcultureshaddifferenttechniquesfordealingwithfractions.

The classical Greek mathematicians took the view that the numbers were simply the positiveintegers.†Indeed,theytooktheviewthattheessenceofallthingsisexplainableintermsofthepositiveintegers and their ratios.ThePythagoreans (foundedbyPythagoras about500B.C.) assumedat firstthat any two lengthswerecommensurable,meaning that, given any two line segments, someunit oflengthcouldbefoundsothatthelengthofeachofthelinesisawholenumbertimesthisunit.Ifthenthefirstlineismunitsandthesecondisnunitsforpositiveintegersmandn,thismeansthattheratioofthelengthsofthetwolinesism/nforsomepositiveintegersmandn,i.e.itisarationalnumber.

A simple consequence of Pythagoras’s theorem (’the square on the hypotenuse of a right-angledtriangle is thesumof thesquareson theother twosides’) is that the lengthof thediagonalofaunitsquareisanumberwhosesquareis2.Sometimearound400B.C.thePythagoreansdiscoveredthatthediagonal and sideof a square are incommensurable or, equivalently, that there is no rational numberwhosesquareis2.Thisunderminedtheirviewoftheplaceofthepositiveintegersintheworldandwaskepta secret; there isa story that thepersonwhoeventually revealed this secretof thePythagoreanswas executed by drowning. In due course an elegant way round this dilemma was discovered by

Page 128: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Eudoxuswhosetheoryofproportion‡appearsinBookFiveoftheElementsofEuclid(about300B.C.).This involved a separation of the concepts of ‘number’ (which meant a positive integer) and‘magnitude’ (whichmeant the length of a line). It was not until the nineteenth century that the twoconceptsweresatisfactorilybroughtback togetheragain through theworkofmathematicianssuchasRichardDedekindinGermany.

Thisbookisnot theplace togointofurtherdetailsabout these laterdevelopments.However, it isimportant that thereaderrealizes that therearerealdifficulties indevelopingasatisfactorysystemofnumbersandnumerals.

Inthischapterwereviewwhatisinvolvedinthealgebraofrationalnumbersandgoontoprovetheclassic result that there is no rational square root of 2. A numeral system sufficient to measure alllengths is provided by infinite decimals andwe conclude the chapter by discussing this system andindicatingsomeofitssubtleties.

Further extensions of the number system are possible. The readermaywell be familiarwith onepossibility:thesystemofcomplexnumberswhichfirstaroseinsixteenthcenturyItalyinthesolutionofcubic and quartic equations (but was not explained properly until the nineteenth century). Complexnumbersarenotdescribedinthisbookalthoughafewproblemsmakeuseofthem.Thereaderwillmeettheminthecourseofthestudyofalgebraoradvancedcalculus.

13.1TherationalnumbersTherationalnumbersystemprovidesasetofnumberswhichcanbeaddedandmultipliedandwhichsatisfyallthebasicalgebraicpropertiesofnumbersaslistedinProperties2.3.1.Thedifficultywiththeintegers is thatwe cannot always do division. For integersb ≠ 0 andawe can only find an integersolutionoftheequationbx=aifbdividesa.However,thereisalwaysauniquerationalnumberwhichis a solution.Furthermore the set of rational numbersprovide just enoughnumbers for this purpose:givenarationalnumberq,thereareintegersb≠0andasuchthatbq=a.

Asatisfactorydefinitionofrationalnumbersinvolvesideaswhichwillbediscussedlaterinthisbook-suchadefinitionwillbeindicatedinChapter22(seeExample22.3.5).Forthemomentthereaderisaskedtoacceptthatasystemofrationalnumberswiththepropertiesdescribedaboveexists.Wenowconsiderhow theseproperties lead to thedescriptionof thenumbers and theirproperties in termsoffractions.While doing this it is convenient to make a distinction between a rational number and afraction: each rationalnumber is representablebya fractionbutdifferent fractionsmay represent thesamerationalnumber.

Definition13.1.1Wewillusetheword todenoteanexpressionoftheforma/bwhereaandb

areintegersandbisnon-zero;aisthe andbthe ofthefraction.

Givenintegersaand(non-zero)bwesaythatthefractiona/brepresentsthe qwhichhasthepropertythatbq=a.

Asatemporarynotationweindicatethattherationalnumberqisrepresentedbythefractiona/bbywriting

Theequation1x=a,foraaninteger,hasanintegersolution,namelya,andsotheintegerscanbethoughtofasasubsetoftherationalnumbers:anintegeracanberepresentedasafractionby .

Page 129: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Proposition 13.1.2 Two fractions a1/b1 and a2/b2 represent the same rational number q,ifandonlyifa1b2=a2b1.

ProofThefractiona1/b1 represents therationalnumberq1 such thatb1q1=a1, and the fractiona2/a2represents q2 such that b2q2 = a2. Using the basic properties of multiplication (commutativity,associativityandcancelling)itfollowsthat

Hence

ThusforexampleBymultiplyingnumeratoranddenominatorby–1ifnecessary,wecanrepresentanyrationalnumber

by a fractionwith positive denominator. Then, by dividing the numerator and denominator by theirgreatestcommondivisor,weseethateveryrationalnumbermaybewrittenintheform ,whereb>0andthegreatestcommondivisor(a,b)=1(seeExercise11.4).

Definition13.1.3Thefractiona/bis whenbispositiveandaandbarecoprime.

Thuseveryrationalnumbermayberepresentedbyafractioninlowestterms.Toseehowtodescribethesumoftworationalnumbersintermsoffractionssupposethat

and sothatbq1=aanddq2=c(wherea,b,canddareintegerswithbanddnon-zero).Thenbdq1=adandbdq2=bcsothat(usingdistributivity)bd(q1+q2)=ad+bcwhichmeansthatq1+q2isrepresentedby(ad+bc)/bd.Similarly,sincebdq1q2=ac,q1q2 isrepresentedbyac/bd.Thisdiscussionmotivatesthefollowingdefinition.

Definition13.1.4Wedefine and oftwofractionsby

Nowit isnecessary tocheck that thesedefinitions lead towell-defineddefinitionsofadditionandmultiplication of rational numbers. This procedure is always necessary when we have differentexpressionsforthesameobjectandthenmakeadefinitionusingtheseexpressions.Inthiscaseweneedtocheckthatifdifferentfractionsareusedtorepresenttherationalnumbersthenaddingormultiplyingthefractionsleadstofractionsrepresentingthesamerationalnumber.

Proposition 13.1.5 Addition and multiplication of rational numbers are well-defined by the aboveformulae.

Constructingaproof.Wedealsimplywithaddition.Theproofformultiplicationissimilarandeasier.Letuslookatwhatwehavetodo.

Page 130: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Whenwespelloutwhatthesevariousstatementsmean,thisleadstothefollowing.

Butnowwecanobtainthegoalfromthegivenstatementsbysomesimplealgebraicmanipulationasfollows:

Proof Suppose that and so that a1b2 = a2b1 and c1d2 = c2d1. Thenisthesameas since(a1d1+b1c1)b2d2

=(a2d2+b2c2)b1d1(usingthemanipulationshownabove).Thisshowsthatadditioniswell-defined.Theproofthatmultiplicationiswell-definedissimilar.Noticethatif then andsothisdefinitionofmultiplicationis

consistentwithDefinition13.1.1.Fromnowonweabandonthenotation andsimplywritea/bfortherationalnumberrepresented

bythefractiona/basusual.Thusa1/b1=a2/b2ifandonlyifa1b2=a2b1.Thesetofrationalnumbersisdenotedbythesymbol .

Theabovediscussionhasdescribedhowadditionandmultiplicationaredefinedin .Butofcoursesubtractionofanyelementanddivisionbynon-zeroelementsarealwayspossiblein since

13.2TheirrationalityofTheprevioussectionhasdescribedtherationalnumbersandtheirfamiliararithmetic.Itwassuggestedabove that a good number system should enable us to represent the length of any line. Pythagoras’stheoremtellsusthatthelengthofthediagonalofaunitsquareisanumberwhosesquareis2,usuallydenotedby .Thenextresulttellsusthatthereisnosuchrationalnumber.

Theorem13.2.1Theredoesnotexistarationalnumberwhosesquareis2.

Constructingaproof.Sinceeverynon-zerorationalnumbercanbewrittenintheforma/bwhereaandbarenon-zerointegerswecanwritetheresultwearetryingtoproveasfollows:

Page 131: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Whenever a result takes the form of stating that something does not happen it is very difficult toenvisageadirectproofandthissuggestsverystronglythatweneedaproofbycontradiction.Rememberthatthisrequiresustosupposethatourgoalisfalseandthentoseekacontradiction.Thenegationofthegoalis

Weusethisexistentialstatementbyselectingelementsaandbsothatthepredicateistrue.Thisgivesthefollowingstrategy.

Wecanrewritethisasfollows.

Thuswe see that the theoremwe are trying to prove is really one about the integer solutions to anequation:

Theonlyintegersolutiontotheequationm2=2n2isthetrivialonem=0,n=0.

Theonemethodwehaveusedforprovingthatanequationhasnointegersolutions(seeforexampleProposition4.1.1)istousetheideaofdivisibility.Soletustrythathere.Giventhata2=2b2thenweknowthata2mustbeanevennumber.Whatdoesthistellusabouta?

Weknowthataiseitherevenoroddanditfollowsbyaproofbycontradictionthatinfactamustbeeven(seeProblemsI,Question7).

Returningtoourargument,wehaveseenthata2=2b2impliesthataiseven.Hencewecanwritea=2a1.Substitutingthisintoa2=2b2weget4 =2b2sothat2 =b2.Henceb2 isevenandsoby thesameargumentbiseven.Sowehaveconcludedthat,ifa2=2b2,thenthenumbersaandbmustbothbeeven.

Sowhat?Thisinitselfisnocontradictionbutitdoessuggesthowwemightgetone,forifaandbarebotheven thismeans that thefractiona/bwhichwebeganwith isnotwritten in its lowest termssinceaandbhavethecommonfactor2.Butweknowthateveryrationalnumbercanberepresentedbyafractioninlowestterms.Sohadwethoughttostartbyinsistingthata/bbethelowesttermsfractionrepresentingasquarerootof2thenwewouldnowhaveobtainedacontradiction.Sowegobackandplacetherequirementthat(a,b)=1onaandb.

Thisgivesthefollowingeffectivestrategyforprovingthetheorembycontradiction.

ProofSupposeforcontradictionthatthereisarationalnumberqsuchthatq2=2.Writeqasafractioninlowestterms,q=a/b,sothataandbareintegerssuchthat(a,b)=1.Nowq2=2 a2/b2=2 a2=

Page 132: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

2b2 a2 iseven a iseven a=2a1 forsomea1 .But then iseven b iseven.Hence2dividesaand2dividesb implyingthat(a,b)≠1.But thiscontradicts thechoiceofaandbandsoprovidestherequiredcontradiction.

Hencetheredoesnotexistarationalnumberwhosesquareis2.

13.3RealnumbersandinfinitedecimalsThe result in the previous section demonstrates that the rational number system is not adequate torepresentalllengthsintermsofsomestandardunitlengthsincethesquareofthelengthofthediagonalofaunit square is2and there isno rationalnumberwhose square is2.Therealnumbers provide afurtherextensionofthenumbersystemwhichisadequatetorepresentthelengthsofalllinesegments.A real number which is not a rational number is said to be irrational. So Theorem 13.2.1 can bereformulatedasthestatement‘ isirrational’.

ThedefinitionofarealnumberisbeyondthescopeofthisbooksinceitrequiresafulltreatmentofthetheoryoflimitsofsequencesreferredtobrieflyinChapter8.Thismaterialcanbefoundinanybookoninfinitesequencesandseriesormathematicalanalysis.†

Thenotationusedtodescriberealnumbersisthatofinfinitedecimals.Thuseverynon-negativerealnumbermayberepresentedbyaninfinitedecimal

andevery infinitedecimal represents a realnumber.Theaim in this section is describe how the realnumberrepresentedbyaninfinitedecimalmaybespecified.

Firstofall,noticethatafinitedecimala0.a1a2…an(i.e.aninfinitedecimalwithai=0fori>n)isequaltoarationalnumber:

Sothesetoffinitedecimalsisasubsetofthesetofrationalnumbers.The intuitive ideaof an infinitedecimal is that aswe takemore andmoredecimalplacesweget

finitedecimalswhichprovideabetterandbetterapproximationtothenumber.Beforewegiveaprecisedefinitionletusconsideranexample.

Example13.3.1We have already proved that there is no rational numberwhose square is 2.Let usconsiderhowtofindaninfinitedecimalrepresentingthepositiverealnumberwhosesquare is2.Weconstruct the integersa0,a1,…makingup thedecimalbyan inductiveprocess.Thekeyobservationwhichenablesustodothisisthat,fornon-negativerealnumbersaandb,a<bifandonlyifa2<b2(seeExercise4.6).

Step0:Tofindtheintegerpartwefindthelargestintegerwhosesquareislessthan2.Since12=1<2<22=4weknowthat1< <2andsoweputa0=1.

Step1:Tofindthefirstentryafterthedecimalpointwesquareeachofthenumbers1.0,1.1=11/10,1.2=12/10,…,1.9=19/10inturnandfindthelargestofthemwhosesquareislessthan2.(Noticethatwecannotgetequalitysince2isnotarationalsquare).Since

Page 133: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

weknowthat1.4< <1.5andsoputa1=4.

Step2:Fortheseconddecimalplace,since

sothat1.41< lt;1.42weputa2=1.This process continues indefinitely giving an infinite decimal whose first few decimal places are1.41421356237309504880–whichmeansthat

However,thereisnoapparentpatterntothenumberswhichemerge.ByStepnwehavefoundafinitedecimala0.a1a2…ansuchthat

whichmeansthat

Forexample,sayingthatthefirstsevendecimalplacesof aregivenby1.4142135meansthat

and,ifwedothearithmetic,wefindthatitisindeedthecasethat

Thisexampleillustratestheformaldefinition.

Definition13.3.2Givenaninfinitedecimala0.a1a2…ai…,wesaythatitrepresentsarealnumbera,writtena=a0.a1a2…ai…,when

Noticethatweuse ratherthan‘<’inthisdefinition.Thisisnecessarysothatallrationalnumbersmayberepresentedbyaninfinitedecimal(possiblywithai=0fori>n,somen).

The statement that every infinite decimal represents some real number is one version of thecompletenessorcontinuityaxiomfortherealnumbers.

Toseethataninfinitedecimalisequaltoauniquerealnumberweobservethattheinequalitiesinthedefinitionuniquelyspecifythenumbera.Giventwodistinctrealnumbersaanda’wehavea–a’≠0.Nowwechooseanintegernsothat bytaking (forthen[ThefactthatforeachrealnumberthereisagreaterintegerissometimescalledtheArchimedeanaxiomfortherealnumbers.]Thismeansthatinfinitedecimalsrepresentingaanda’willcertainlydifferbythenthdecimalplace.

Example13.3.3Letusconsiderwhichrealnumberisrepresentedbytheinfinitedecimal0.999…99…

Page 134: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

eachofwhoseentriesafterthedecimalpointis9.Aninfinitedecimallikethisiscalledarecurringorrepeatingdecimal,andweusethenotation torepresentitwithadotovertheintegerwhichrecurs.Recurring decimalsmay have a block of digits recurring, for example 7.320008140081400814…. Inthiscaseweindicatetherepeatingblockbyplacingadotoverthefirstandlastdigitsintheblock,viz.

Thefinitedecimals0.99…9arecertainlylessthan1.Indeed,

Intuition may suggest that this means that the infinite decimal 0.9 is also less than 1 and this is acommonmisconception. Ihaveknownpeoplebecomequitebelligerent in theirdefenceof thisview.Thisisnotaneffectivewayofdefendinganypointofviewbutemotionisparticularlyinappropriateinamathematicalargument!Asalways,ifindoubtapplyHumptyDumpty’sprincipleandexaminewhatthewordshavebeendeclaredtomean.Sowereturntothedefinition.Leta= Fromthedefinition,

forallpositiveintegersn.

Thus1–a>0or1–a=0.Weeliminatethefirstof thesepossibilitiesbycontradiction.Ifxisapositivenumberthenasabovewecanfindapositiveintegerksuchthat1/(10)k<xbytakingk>1/x.Applyingthistox=1–ademonstratesthatif1–a>0then1–adoesnotsatisfythecondition(13.1)forn–k,givingacontradiction.Theconclusionmustbethat1–aisnotpositiveandso1–a=0orinotherwordsa=1.Thisprovesthat

Ifthisresultstillworriesyou(andafterallwhynot,sinceitisbasedonDefinition13.3.2which israther sophisticated?) then you may feel happier when you remember the most familiar recurringdecimal,1/3= ,whichyouprobablyarecomfortablewith.Multiplyingby3gives1= .

Recurringdecimalsandrationals

Thearithmeticofinfinitedecimalsisquitecomplicated.†However,multiplicationby10iseasyfor

Somultiplicationofafinitedecimalby10corresponds tomoving thedecimalpointoneplace to theright.Thismeansthatthesameistrueofinfinitedecimalssince

Thisobservationenablesustoprovethefollowingresult.

Theorem13.3.4Arecurringinfinitedecimalisequaltoarationalnumber.

Page 135: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

The idea of the proof of this result is very simple butwriting out a general proof leads to greatnotationalcomplexity.Theproofconsistsofanalgorithm(orprocedure)forfindingtherationalnumber.Ifthelengthoftherecurringblockiskwemultiplythroughby10kandsubtractthenumberwestartedwith. The result is a finite decimal and so a rational number. This enables us towrite the recurringdecimalasarationalnumber.Ratherthanwritingoutageneralproofthemethodisillustratedbygivinganexample.

Example13.3.5Tofindtherationalnumber12.79317317317317...=

SolutionLetx= Sincethelengthoftherecurringpartis3wemultiplythroughby103giving1000x = (since the decimal point moves three places to the right) = From thedefinitionofthevalueofaninfinitedecimalwecansplitoffaninitialfinitedecimal:

Subtractingweobtain

999x=12793.17-12.79=12780.38=1278038/100

andsox=1278038/99900,arationalnumberasrequired.Wewillseelateronthattheconverseofthistheoremisalsotrue(seeProblemsIV,Question5).This

meansthattherationalnumberscorrespondpreciselytotherecurringdecimals(afinitedecimalcanbethoughtofasarecurringinfinitedecimal:

Exercises13.1Provethattheredoesnotexistarationalnumberwhosesquareis3.[Youmayassumethata2isdivisibleby3ifandonlyifaisdivisibleby3(provedlaterasProposition15.2.1).]

13.2Findthefirsttwodecimalplacesofaninfinitedecimalrepresenting

13.3 Try tomimic theproofofTheorem13.2.1 toshowthat theredoesnotexista rationalnumberwhosesquareis4.Wheredoesthisgowrong?

13.4ProvefromDefinition13.3.2that

13.5Findtherationalnumberequaltotherecurringinfinitedecimal

†Tobeprecise, theGreeksdidnotregard1asanumber.Euclid(BookSevenoftheElements)refersto1asaunitandthendefinesanumbertobeamultitudecomposedofunits.‡See,forexample,C.B.BoyerandU.C.Merzbach,Ahistoryofmathematics,Wiley,Secondedition1989.

†SeeforexampleR.Haggerty,Fundamentalsofmathematicalanalysis,Addison-Wesley,Secondedition1993.†Alternatively,weplaceadotovereachdigitwhichrecurs, oralineovertherepeatingblock,

†Anexcellentdiscussionofthearithmeticofinfinitedecimals,atopicbypassedinmosttreatmentsofinfinitedecimals,maybefoundin

Page 136: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

A.Gardiner,Infiniteprocesses,backgroundtoanalysis,Springer-Verlag,1982.

Page 137: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

14Countinginfinitesets

InChapter10anon-empty setXwasdefined tohavecardinalityn,wheren is a positive integer,when there isabijection n X from the standard set n={1,2,…,n}.Such sets, togetherwith theemptyset,weredefinedasfiniteandallothersasinfinite.

Wesaw(Exercise10.1)that,givenafinitesetX,anothersetYisalsofiniteofthesamecardinalityifandonlyifthereisabijectionX Y.InthiscasewesaythatXandYareequipotent.AbijectionX YguaranteesthatXandYhavethesamecardinality.

These ideas may be extended to infinite sets.We can think of any two sets as having the samecardinality if theyareequipotentso that there isabijectionbetween them.Wecan thendescribe thiscardinalitybyintroducingadditionalstandardsets.Forexample,whenweembarkoncountingasetXweassignadistinctelementof theset toeachpositive integer in turn. Ifweexhaust theelementsonreaching the integer n then we have constructed a bijection n X and so the set is finite withcardinalityn. If we never exhaust the elements wemay nevertheless reach each element of the seteventuallysothatwehaveabijection + X.Inthiscasethesetisequipotenttothestandardset +andwesaythattheset,althoughinfinite,isdenumerable.

Inthischapterwewillexplorethepropertiesofinfinitesets,consideringwhichpropertiesoffinitesetscanbeextendedtosuchsets. Itwillbecomeclear thatnotalldosoandthisshouldhelpexplainwhysuchcarewasneededindevelopingthetheoryoffinitesets.Thefactthatwhenwecometoinfinitesetsvarious‘obvious’resultsarenolongertruesuggeststhattheseresultsmaynotbequitesoobviousafterall!Inparticularwewillseethatcaremustbetakenwhencomparingthe‘size’ofinfinitesetsbutthatitispossibletodothis.Itisevenpossibleincertaincasestouse‘countingarguments’withinfinitesets.

Thematerial in this chapter is somewhat harder thanmost of the rest of the book. It is not usedsubsequentlyinthebookbutisincludedtoprovideacontextfortheearliermaterialonfinitesetsandbecausetheideasaresostrikingandshouldbepartofanygeneralmathematicaleducation.

14.1Countablesets

Definition14.1.1TwosetsXandYare ifthereisabijectionX Y.ThusXisfiniteofcardinalityn +ifandonlyifXisequipotentto n.

Definition14.1.2AsetXissaidtobe orenumerableifthereisabijection + X,sothatitisequipotentto +.Asetis ifeitheritisfiniteoritisdenumerable.Asetis ifitis

Page 138: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

notcountable.

IfthesetXisdenumerablethenitissaidtohave andthisiswritten

ThenotationforthecardinalityofadenumerablesetusestheHebrewletteralephand‘ o’isusuallyread‘alephnull’.

Conventions vary a little and in some books the word ‘countable’ is used where we are using‘denumerable’orconversely.

If a setX is denumerable thenwe can list the elementsof the set, but the list is infinite.Given abijectionf: + X,

wherewewritexn=f(n).

Examples14.1.3(a) +isdenumerablebytakingtheidentityfunction + +.Thisgivesthelisting +

={1,2,…,n,…}.(b)Thesetofnon-negativeintegers isdenumerablesinceabijection + isdefinedbyn n–1.Thisgivesthelisting ={0,1,…,n–1,…}.(c)Thesetofallintegers isdenumerable,forabijection + maybedefinedby

Thisgivesthelisting ={0,1,–1,2,–2,…,n,–n,…}.

(d)ThesetofpositiveevenintegersX={2n|n +}isdenumerable,forabijection + Xmaybegivenbyn 2n.Thisgivesthelisting{2,4,…,2n,…}.(e)ThesetofpositiveperfectsquaresX={n2|n +}isdenumerable,forabijection + Xmaybegivenbyn n2.ThisgivesthelistingX={1,4,…,n2,…}.

’Paradoxes’oftheinfiniteRecallfromExercise11.5thatafinitesetcanneverhavethesamecardinalityasapropersubset: thecardinality of a proper subset of a finite set is necessarily smaller. However, the above examplesdemonstratethatadenumerablesetcanhaveequipotentpropersubsets.Example14.1.3(d)showsthatthesetofpositiveintegersandthepositiveevenintegersareequipotentandso,inthatsense,therearethe ‘samenumber’of even integers as integers even though it appears thatonlyhalf the integers areeven!

Thefirstreferencetothis‘paradox’appearsintheworkofGalileoGalilei.†Heobservesthat,despitethefact that thefurtheryougoalongthesequenceofpositiveintegers thescarcer theperfectsquaresbecome, we must say that there are as many squares as there are positive integers because of thecorrespondencebetweenthepositiveintegersandthesquaresgivenbythebijectionn n2 (Example14.1.3(e)).Hesuggeststhattheideaofoneinfinitequantitybeinggreaterthananotherhasnomeaning.

Theseideasseemnottohavebeendevelopedfurtheruntil1850whenabookbytheunconventionalCzech priest Bernhard Bolzano was published posthumously.‡ He showed that there were manyexamples of bijections between infinite sets and proper subsets.He also suggested that neverthelesscertaininfinitesetsareinarealsensebiggerthanothers,anticipatingtheworkofCantorwhichwewillcometoshortly.

In 1872 theGermanmathematician RichardDedekind defined an infinite set to be onewhich is

Page 139: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

equipotent to a proper subset of itself.†We now observe that this is equivalent to our definition ofinfiniteset.

Theorem14.1.4(Dedekind)AsetXisinfiniteifandonlyifitisequipotenttoapropersubsetofitself.

ProofIfXisequipotenttoapropersetthen,byExercise11.5,Xisnotfiniteandsomustbeinfinite.Fortheconverse,firstofallweprovethataninfinitesetXmustcontainadenumerablesubset.We

definethissetA={a1,a2,…,an…}inductively.Basecase:ChooseanyelementofthesetXasa1.Inductivestep:Supposethat,forsomek 1,asubsetofkdistinctelementsAk={an|1 n k}hasbeendefined.Choose anyelementofX –Ak [non-empty sinceAk is finite andX is infinite] asak+1.ThisdefinesadenumerablesubsetA={a1,a2,…,an,…} X.

Wemaynowdefineabijectionf:X X–{a1}ontoapropersubsetofX,asrequired,by

HenceXandthepropersubsetX–{a1}areequipotent.

14.2DenumerablesetsFortwofinitesets,theircardinalitydetermineswhetherornottheyareequipotent,i.e.whetherornotthere is a bijection between them (Exercise 10.1). This property extends to sets of cardinality 0,denumerablesets,asfollows.

Proposition14.2.1GivenadenumerablesetX,asetYisalsodenumerableifandonlyifitisequipotenttoX.

ProofSinceXisdenumerablethereisabijectionf: + X.

SupposethatYisalsodenumerable.Thenthereisabijectiong: + Y.SinceabijectionisinvertiblewecannowdeducethatXandYareequipotentbywritingdownthebijectiongof–1:X + Y.

Conversely, ifXandY are equipotent then there is abijectionh:X Y.We can deduce thatY isdenumerablebywritingdownthebijectionhof: + X Y.

Whenweformunionsorproductsoffinitesetswenormallyobtainbiggersets.Oneaspectof theunexpectedbehaviourofinfinitesetsisthatforthemthisisnotthecase.

Proposition14.2.2IfAandBaredenumerablesetsthensoistheirunionA B.

Thisisleftasanexercise.

Proposition14.2.3IfAandBaredenumerablesetsthensoistheirCartesianproduct,A×B.

Constructingaproof.SinceAandBaredenumerablewecanlisttheirelements:A={a1,a2,…,am,…}andB={b1,b2,…,bn,…}.UsingtheselistingswecandisplaytheelementsofA×Binadoublearray.

Page 140: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Ifwestarttocounttheseelementsbygoingalongtherows,whichwouldbethenormalwayofcountingafinitearray(considerforexamplethesolutiontoExercise10.3)thenwewillnevergettotheendofthefirstrowandsonoelementinthesecondrowwillbereached.Onewayofensuring† thatwedoeventuallyreacheveryelementistocountalongthediagonalsinthefollowingpattern.

Ifwecountinthiswaytheelement(am,bn)willoccurasthenthelementindiagonalnumberm+n–1.So(sincetherearekelementsinthekthdiagonal)itwillbeelementnumber

(usingProposition5.3.1).

Proof LetA = {a1,a2,…,am…}andB = {b1,b2,…,bn,…}.Then a bijectionA ×B +may bedefinedby

Corollary14.2.4IfAisadenumerablesetthensoisAnforeverypositiveintegern.

ProofThisisaneasyinductionproof.Thepropositiongivestheinductivestep.

Proposition14.2.5Asubsetofadenumerablesetiscountable(i.e.eitherfiniteordenumerable).

Constructingaproof.Aswithfinitesetswecanprovestatementsaboutgeneraldenumerablesetsbyfirstprovingthemforthestandarddenumerableset +.

Theconclusionofthisresultisan‘or’statementandsoweusethestandardstrategyintroducedinChapter4:wetakeanon-finitesubset,A,of +inotherwordsaninfinitesubset,andverifythatitmustbedenumerable.Wecanconstructabijection + AinductivelyessentiallybylistingtheelementsofAinincreasingorderstartingwiththeleast.

Proof(a)Webeginbyconsideringsubsetsof +,thesetofpositiveintegers.SupposethatAisainfinitesubsetof +.ThentoprovethatA isdenumerablewemustconstructabijectionf: + A.Wedefinef(n)inductivelyasfollows.Basecase:Let f(1)be the least elementof the setA. [Recall that by thewell-orderingprinciple (seeExample11.2.2(c))anynon-emptysetofpositiveintegershasaleastelement.]Inductivestep:Supposethatf(k)hasbeendefinedforsomek 1.Letf(k+1)betheleastelementoftheset{a A|a>f(k)}.[Thissetisnon-emptysinceAisinfinite.]

Page 141: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thisdefinesafunctionf: + A.Thisfunctionisaninjectionsincef(k)<f(k+1)forallk 1.Toseethatfisasurjectionnoticethatf(n) n(easilyprovedbyinduction).Givenanelementa A

then letm be the least integer such that f(m) a [wemust havem a since f(a) a]. Then by thedefinitionoffwehavef(m)=a.

Thuswehaveconstructedabijectionf: + AshowingthatAisdenumerable.Henceeachsubsetof +isfiniteordenumerable.

(b)Nowconsiderthegeneralcase.LetAbeasubsetofadenumerablesetX.SinceX isdenumerablethere is a bijection g: + X. Then (A) is a subset of + and so finite or denumerable. But therestrictionofggivesabijection (A) AandsoAisfiniteordenumerable.

Theorem14.2.6(Cantor(1874))Thesetofrationals isdenumerable.

ProofWemaydefineafunction

by f(q)=(m,n)wherem/n is the fraction representingq in its lowest terms (i.e.q =m/n,n > 0 andgcd(m,n)=1).Thisisclearlyaninjection.Itsimageisaninfinitesubsetofthedenumerableset × +

andsodenumerable.Hence,sincefdefinesabijectionontoitsimage, isdenumerable.

14.3UncountablesetsIntheprevioussectionwehaveseenthatsurprisinglymanyinfinitesetsaredenumerableandindeedtheexamples there supportGalileo’s suggestion thatwecannever say that one infinite set is larger thananother. However, this is not the case. There are uncountable sets and we can givemeaning to thestatementthatthesearelargerthanthecountablesets.

In 1874,GeorgCantor published a remarkable paper inwhich he proved not only that the set ofrationalnumbers isdenumerablebut also that there is ahierarchyof infinite setsorderedby size (orcardinality).

Theorem14.3.1(Cantor(1874))Thesetofrealnumbers isuncountable.

Constructingaproof. Notice that the statement that is uncountable is a non-existence statement:theredoesnotexistabijection + .Themethodistoshowhowgivenanyfunction + wecanconstructanelementof whichisnotintheimageofthefunction,notavalue,sothatthefunctionisnotasurjectionandsonotabijection.

Eachelementx mayberepresentedasaninfinitedecimal

whereai and,fori 1,0 ai 9.Somenumbers(suchas havetwodecimalexpansions,oneending in recurring 0’s (and so a finite decimal) and one ending in recurring 9’s (see Problems III,Questions26and27).Forthesewealwaysusethefirstrepresentation.

Themethodisnowtostartwithafunction + and to list thevaluesof thefunctionas infinitedecimals.Havingdone thiswehaveabeautifullysimple,but ingenious,method(knownas‘Cantor’sdiagonalprocess’)forwritingdownaninfinitedecimalnotinthelistandnotrepresentingthesamerealnumberasanymemberofthelist.Thisinfinitedecimalrepresentsarealnumberwhichisnotavalueof

Page 142: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

thefunction.

ProofSupposethatf: + isafunction.Let

asaninfinitedecimal(notendinginrecurring9’s).Putb=b.b1b2…bn…where

Noticethatthisinfinitedecimalrepresentingbcertainlydoesnotendinrecurring9’s.Furthermore,foreach n, the nth decimal place of b, namelybn, certainly differs from the nth decimal place of f(n),namelyann.Sob f(n).Sincewehaveconstructedanelementof whichisnotavalueoffthisshowsthatfisnotasurjection.Hence isnotdenumerable.

Thisresultshowsthatthesetofrealnumbersisinarealsenselargerthanthesetofintegers(orthesetofrationals).Wecanmakethispreciseasfollows.

Definition14.3.2TwosetsXandYhavethesamecardinality,written ,iftheyareequipotent,

i.e.thereisabisectionX Y.IfthereisaninjectionX Ythenwewrite .Wewritetomeanthat|X| |Y|and|X| |Y|andsaythatXhassmallercardinalitythanY.

ThusTheorem14.3.1maybestatedas | |> | +| or | | > 0.Onenatural questionnow iswhetherthereisasetintermediateinsizebetween +and .In1878,Cantorconjecturedthatsuchsetsdidnotexist, a statementwhich became known as the continuum hypothesis.Here theword ‘continuum’ issimplyanameforthesetofrealnumbers .

Thecontinuumhypothesis.Everyuncountablesetofrealnumbershasthesamecardinalityasthesetofallrealnumbers:

In1963theUnitedStatesmathematicianPaulCohenprovedtheremarkableresultthatitisnotpossibleeithertoproveortodisprovethishypothesisstartingfromthegenerallyacceptedassumptions(axioms)of set theory. This means that there are two alternative versions of set theory, one in which thecontinuumhypothesisistrueandoneinwhichitisfalse.

TheothernaturalquestionarisingfromTheorem14.3.1iswhetherthereisasetlargerthan .Cantorwas able to show that there is such a set and indeed that, given any set, its power set is necessarilylarger.

Theorem14.3.3ForanysetX,|X|<| (X)|.

Constructingaproof.Recallthat (X), thepowersetofX, is thesetofall subsetsofX (Definition6.3.1).

It is easy todefinean injectionX (X) by sending each element to the corresponding singletonsubset.Theinterestingpart is inprovingthat thereisnobijectionX (X).Themethod issimilar tothatofTheorem14.3.1:startingfromanyfunctionf:X (X)weconstructanelementof (X),inotherwordsasubsetofX,whichisnotavalueoff.Itiseasytodescribesuchanelementbutthereasonwhy

Page 143: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

itisnotavalueisquitesubtle.

ProofAninjectionX (X)maybedefinedbyx {x}andso|X| | (X)|.We prove that there is no bijection X (X) by showing that any function X (X) is not a

surjection.Supposethatf:X (X)isafunction.Weprovethatthisfunctionisnotasurjectionandsonotabijectionbyexhibitinganelementof (X)whichisnotavalue.Define

[Noticethat,foreachx X,f(x) (X)isasubsetofXandsoeitherx f(x)orx f(x).Thus‘x f(x)’isapredicatewithafreevariabletakingvaluesinX.ThesetofelementsofXforwhichthispredicateistrueisawell-definedsubsetofX:thisisthesetA.]

ToprovethatAisnotintheimageofthefunctionfwesupposeforcontradictionthatitis,sayA=f(a)forsomea X.ThenAisasubsetofXandaisanelementofX,andsoeithera Aora A.Weconsiderthepossibilitiesinturn.

Ifa A then, referring back to the predicate defining A, a f(a), which can be written a Acontradictingourassumptionthata A.

Ontheotherhand,ifa A,thenitdoesnotsatisfythepredicatedefiningAandsoa f(a),whichcanbewrittena Acontradictingourassumptionthata A.

So ineithercasewehaveacontradictionandsoour initialassumption thatA is in the imageof fmustbefalseandsofisnotasurjection.

Hence,sincethereisnobijectionX (X)butthereisaninjection,|X|<| (X)|.

Thisisprobablythemostsubtleproofinthisbook.However,onceyouhaveunderstoodit,itappearstohavethesamegloriousinevitabilityasthegreatEuclideanproofsbycontradiction.

Themostimportantresultonfinitesetswasthepigeonholeprinciple(Theorem11.1.2).Thisresultdoesstillholdforinfinitesets.

Theorem 14.3.4 (Cantor–Schröder–Bernstein theorem)Suppose that X and Y are non-empty setssuchthat|X|>|Y|.Thenanyfunctionf:X Yisnotaninjection,i.e.thereexistdistinctelementsx1andx2 Xsuchthatf(x1)=f(x2).

Theproofisomitted.†

Thismaterialoncountinginfinitesetsmayappearveryabstractandobscureandindeeditwasmanyyears before it gained general acceptance. To give some idea of its power we will conclude bydescribingoneresultwhichCantorobtainedusinghisideas.

Definition14.3.5Arealnumberiscalled ifitsatisfiesapolynomialequation

withthecoefficientsaiallrational.Itiscalled ifitisnotalgebraic.

Thusallrationalnumbersarealgebraic(sincem/nsatisfiesnx–m=0)and isalgebraic(sinceitsatisfiesx2=2). In1844 theFrenchmathematicianJosephLiouvillegaveanexplicit constructionofcertaintranscendentalnumbers‡butitremainedaproblemtodeterminewhetherspecificnumbersaretranscendental.In1873,CharlesHermite(French)provedthate,thebaseofthenaturallogarithms,istranscendental, and these ideasweredevelopedbyFerdinandLindemann (German) toprove in1882

Page 144: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

that is transcendental. This result finally proved that the ancient search for a ruler and compassconstructiontogiveasquareofthesameareaasagivencirclehasnosolutionsinceitcanbeshownthat any lengthwhich can be constructed from a given length is an algebraicmultiple of the givenlength§.Theseargumentsaboutspecificnumbersarequitedelicateandit isstillnotknownwhether,forexample, +eistranscendental.

Cantor’sremarkableresultwasthatmostrealnumbersaretranscendental!Heproved,usingsimilarmethodstotheaboveproofofTheorem14.2.6,thatthesetofofalgebraicnumbersisdeniunerable(seeProblems III, Question 28). It follows from Theorem 14.3.1 and Exercise 14.2 that the set oftranscendentalnumbersisuncountableanditisinthatsensethatmostrealnumbersaretranscendental.

Exercises14.1ProvethatifAisfiniteandBisdeniunerablethenA Bisdeniunerable.

14.2ProvethatifAandBaredeniunerablethenA B isdeniunerable.Henceprovebycontradictionthat,ifXisuncountableandasubsetAisdenumerable,thenX−Aisuncountable.

14.3Provethatif{An|n +}isadenumerablesetofpairwisedisjointdenumerablesetsthentheunion

isalsodenumerable.

14.4UsetheCantor-Schröder-Bernsteintheoremtoprovethatif|X| |Y|and|Y| |X|then|X|=|Y|.†Inhis1638bookDiscorsiedimostrazionimatematicheintornoàduenuovescienze(written,remarkablyfortheperiod,inItalianratherthanLatinandoftenreferredtobyitsEnglishtitleThetwonewsciences).‡ParadoxiendesUnendlichenpublishedinEnglishasParadoxesoftheinfinite(editedbyD.A.Steele)in1950.

†InhisbookStetigkeitundirrationaleZahlen.†Thisshouldbecontrastedwiththesituationforfinitesets.Forafinitesetitdoesn’tmatterhowwestart:theadditionprincipleensuresthatwewillcompletethecountandProposition10.1.3ensuresthattheanswerwillalwaysbethesame.

†AproofmaybefoundinD.J.Velleman,Howtoproveit,astructuredapproach,CambridgeUniversityPress,1994.‡AdescriptionofthisconstructionmaybefoundinR.CourantandH.Robbins,Whatismathematics?OxfordUniversityPress,1941.

§SeeR.CourantandH.Robbins,op.cit.

Page 145: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsIII:Numbersandcounting

1.Ofthe182studentswhoaretakingthreefirstyearcoreMathematicsmodules(Reasoning,AlgebraandCalculus),129likeReasoning,129likeAlgebra,129likeCalculus,85likeReasoningandAlgebra,89 like Reasoning andCalculus, 86 likeAlgebra andCalculus, and 54 like all threemodules. Howmanyofthestudentslikenoneofthecoremodules?

2.Ofthe170studentswhotookallthefirstyearcoremoduleslastyear,124likedReasoning,124likedAlgebra,124likedCalculus,10likedonlyReasoning,nobodylikedonlyAlgebra,4likedonlyCalculusand2likednoneofthemodules.Howmanystudentslikedallthreecoremodules?

3. At an international conference of 100 people, 75 speak English, 60 speak Spanish and 45 speakSwahili(andeveryonepresentspeaksatleastoneoftheselanguages).

(i)Whatisthemaximumpossiblenumberofthesepeoplewhocanspeakonlyonelanguage?InthiscasehowmanypeoplespeakonlyEnglish,howmanyspeakonlySpanish,howmanyspeakonlySwahili,andhowmanyspeakallthree?

(ii)WhatisthemaximumnumberofpeoplewhospeakonlyEnglish?InthiscasewhatcanbesaidaboutthenumberwhospeakonlySpanishandthenumberwhospeakonlySwahili?

(iii)Provethatthegreaterthenumberofpeoplewhospeakallthreelanguages,thegreaterthenumberofpeoplewhospeakonlyonelanguage.

4.Prove(byinductiononn)thegeneralinclusion-exclusionprinciplewhichmaybestatedasfollows.

LetA1,A2,…,Anbefinitesets.ForI={i1,i2,…,ir} n,write

Then

summingoverallnon-emptysubsetsof n.

5.Provethatafinitenon-emptysetofrealnumbershasaminimumelement.[ThisisthepartoftheproofofProposition11.2.3leftasanexercise.]

6.SupposethatAandBarenon-emptyfinitesetsofrealnumberssuchthatA B.Provethat

7.Whatiswrongwiththefollowingargumentpurportingtoprovethatforeverynon-emptyfinitesetA

Page 146: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ofrealnumbersminA=maxA?

ProofWeprovebyinductiononnthatif|A|=nthenminA=maxA.Basecase:If|A|=1thenAisasingletonsetA={a1}andminA=a0=maxA.Inductivestep:Supposethatforsomepositiveintegerktheresultistrueforn=k.LetAbeasetofrealnumberswith|A|=k+1.Leta1=minAanda2=maxA.Then

Hencea1 a2andsinceclearlya1 a2thisprovesthata1=a2asrequiredtodeducetheresultforn=k+1andsoprovingtheinductivestep.Conclusion:Hencebyinductiononn,minA=maxAforasetofcardinalitynforallpositiveintegersn,andsoforallfinitesets.

8.ProveLemma10.1.4byinductiononm.

9.ProveProposition11.1.4:ifX nisaninjection,thenXisfiniteand|X| n.

10. ProveTheorem11.1.6: given non-empty finite setsX andYwith |X| < |Y| there does not exist asurjectionX Y.

11.UsethepigeonholeprincipleandproofbycontradictiontoproveTheorem11.1.7:givennon-emptyfinitesetsXandYwith|X|=|Y|,afunctionX Yisaninjectionifandonlyifitisasurjection.

12.Supposethatthereisaninjectionf: + X.ProvebycontradictionthatXisaninfiniteset.

[UseCorollary11.1.1notingthat,foranyn 1,frestrictstogiveaninjection n+1 X.]

13.Findallthedivisorsof126and180andhencefindthegreatestcommondivisor(126,180).

14.Forn +,supposethatA N2nand|A|=n+l.ProvethatAcontainsapairofdistinctintegersa,bsuchthatadividesb.

[Letf(a)bethegreatestoddintegerwhichdividesaandapplythepigeonholeprincipletof.]

15.Provetheinductionprinciplefromthewell-orderingprinciple(seeExample11.2.2(c)).

[ProvetheinductionprincipleintheformofAxiom7.5.1bycontradiction.]

16.Usetheinclusion–exclusionprinciple(Question4)toprovethatthenumberofsurjections m nisgivenby

Page 147: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

[Foreachi n,letAi={f:Nm n|iisnotavalueoff}.]

Deducethat

17.Aderangementof nisabijectionf: n nwithnofixedpoints,i.e.f(i) iforalli n.Use theinclusion–exclusionprincipletoprovethatthenumberofderangementsof nis

[Thismeansthattheproportionofallpermutationsof nwhicharederangementsis1/2!−1/3!+1/4!−…+(−1)n1/n!=1−1/1!+1/2!−1/3!+1/4!−…+(−l)nl/n!.Thereadermayrecognizethisasthefirstpart of the series fore−1. It follows that for large values ofn the probability that a permutation is aderangementisapproximately1/e.]

18.SupposethatXandYaredisjointsets.Provethatthefunction

definedby(A,B) A Bisabijection.Deducethat

GiveanalternativeproofofthisresultbyinductiononnusingProposition12.2.8.

19.ProveLeibniz’sruleforhigherorderderivativesofproducts,

byinductiononn.

20.Usethepigeonholeprincipletoprovethat,giventendistinctpositiveintegerslessthan107,thereexisttwodisjointsubsetswiththesamesum.

21.Definethenotionofinequalitybetweentwofractionsby

Prove that this definition leads to awell-defined notion of inequality between two rational numberssatisfyingAxioms3.1.2.

22.Forapositiverealnumberxandarationalnumberq=m/n(wheremandnareintegers),definethepowerxqtobe(xl/n)m.InthisexpressiontheintegralpowerisdefinedinProblemsI,Question23andx1/nisdefinedinExample9.2.4(b).

Provethat thisdefinitionofrationalpowers iswell-defined.With thisdefinitionprovethe lawsofexponentsforanypositiverealnumbersxandyandrationalnumberspandq:

Page 148: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(i)xqyq=(xy)q;(ii)xp+q=xpxq;(iii)(xp)q=xpq.

23.Provethattheredoesnotexistarationalnumberwhosesquareis10.

24. Find the first four decimal places of the infinite decimal representing (without using acalculator!).

25.Findtherationalnumberequaltotherecurringinfinitedecimal .

26.Provethateachfinitedecimalmaybewrittenasaninfinitedecimalintwodistinctways:

wherean>0ifn>0.

27.Provethateachrealnumberisrepresentedbyauniqueinfinitedecimalunlessitisrepresentablebyafinitedecimal,inwhichcaseitisrepresentablebypreciselytwoinfinitedecimalsasdescribedinthepreviousproblem.

[Hint:Supposethattwoinfinitedecimalsrepresentthesamenumber:a0.a1a2…an…=b0.b1b2…bn….Attempttoprovebyinductionthatan=bnforalln 0.]

28.Provethatthenumberofpolynomialsofdegreenwithrationalcoefficientsisdenumerable.Deducethatthesetofalgebraicnumbers(seeDefinition14.3.5)isdenumerable.

[Recallthatapolynomialequationxn+a1xn−1+…+an−1x+an=0hasatmostnrealroots.]

Page 149: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartIVArithmetic

Page 150: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

15Thedivisiontheorem

Theremainderofthisbookillustrateshowthemethodsofproofandthelanguageofsetsandfunctionsintroduced so far are applied in arithmetic, the theory of numbers. We begin in this chapter bydiscussing theelementary ideasofdivisionandremainderswhichweallmetatanearlystageofourschooling.TheformaltreatmentofthisgeneralizesthediscussionofoddandevenintegersinSection11.3.

15.1ThedivisiontheoremThemainresultofthischapteristhefollowing.

Theorem15.1.1 (Thedivision theorem)Let a andb be integerswith b>0.Then there are uniqueintegersqandrsuchthat

Thisresultshouldbeveryfamiliarfromearlyschooldays.There,inthecaseofpositivea,wemeettheideaof‘sharing’aobjectsequallyamongstbpeople:theyeachreceiveqobjectswithr‘leftover’.Thenumberqiscalledthequotientandthenumberriscalledtheremainder.

Inpracticewhenwearegiventwonumbersaandbwecanfindqeitherbydivisionusingvarioustrickswelearntatschoolormorecommonlythesedaysbymeansofacalculator.Thecalculatorwillgiveusafinitedecimalwhichapproximatestherationalnumbera/b.Thequotientqisthenthegreatestintegerlessthanorequaltoa/bwhichisgivenbytheintegerpartofa/bwhenaispositive.Wecanthenfindrasa–bq.

Example15.1.2Tofindthequotientandremainderwhena=1781293andb=1481.For these numbers a calculator gives a/b ≈ 1202.7637 (or possibly 1202.7636 depending on the

roundingsystem).Thusq=1202andsor=1781293−1481×1202=1131.

Example15.1.3Tofindthequotientandtheremainderwhena=−7856123andb=9812.Forthesenumbersacalculatorgivesa/b≈–800.66480.Thusq=–801(noticethatweincreasethe

absolutevalueofanegativenumberwhenwerounddown to thenext integer)andsor=a–bq=–7856123+9812×801=3289.

These examples demonstrate only that the division theorem is true in these specific numericalexamples. We cannot base a general proof on this method since the construction of a decimalcorresponding to a rational number depends in general on repeated use of the division theorem, the

Page 151: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

resultwearetryingtoprove(seeExercise15.6)!Theproofofthetheoremrequiressomecare,ifonlybecausetheresultseemssoobvious.Itisnotnecessarytohaveacompleteunderstandingoftheproofinordertoapplythetheorem.Itiscommoninlearningmathematicstogainexperienceinhowatheoremisusedbeforefullyunderstandingtheproof;seeinghowthetheoremisusedcanhelptoclarifythefullmeaningofthetheoremandsohelpinexploringtheproof.

In thecaseofb=2wehavealreadyprovedTheorem15.1.1asProposition11.3.4 forwe provedtherethatanumberaisoddifandonlyifa=2q+1forsomeintegerq.Sincebydefinitionaisevenifandonlyifa=2qforsomeintegerqand‘odd’isdefinedtomean‘noteven’,thisresultmeansthateachintegeracanbewrittenuniquelyintheforma=2q+rwherer=0orr=1.Thenumberisevenifandonlyifr=0andthenumberisoddifandonlyifr=1.

Themethodofproofof thedivision theorem isadirectgeneralizationof theproofofProposition11.3.4.

Constructingaproof.Noticethattherearereallytwoseparatethingstoprove:thatthenumbersqandrexist(thisisanexampleofanexistencetheorem)andthattheyareunique(auniquenesstheorem).Itiscommonforstudentstoomittheuniquenesspartwhenaskedtostatethedivisiontheorembutaswillbeseenthisisaveryimportantpartoftheresultformanyapplications.

Butletusstartwithexistence:itisnecessarytoshowthatgivenaandbasinthetheoremthereexistintegersqandrsuchthata=bq+rand0 r<b.

Firstofallnoticethatqandrdetermineeachotherandinparticularr=a–bq.Sowecanremoveallreferencetorbyrestatingthecondition0 r<bas0 a–bq<borequivalentlybq a<b(q+1).Thuswecandescribewhatweneedasfollows.

AsintheproofofProposition11.3.4itisconvenienttodealfirstwiththecaseofanon-negative.Inthis case as in the earlier proofwe canget holdof the elementq by defining it to be themaximumelementofacertainfiniteset.

Observethat,ifaisnon-negative,thenthereisnodifficultyinfindinganintegerksuchthatbk aforwecansimplytakek=0.Infactifa<bthenwecansimplytakeq=0givingr=a.Otherwise,wetrythenon-negativeintegers,0,1,2,…,inturnuntilwereachthefirstintegerqsuchthata<b(q+1).(This is more or less what we do in practice when performing division although the long divisionmethodswelearntatschoolgivesometrickssothatwedonothavetotryeverynumber.)Thepointoftheexistencepartofthetheoremisthatthisprocesswilleventuallysucceed.

Toseethisweintroducetheset

Thisisanon-emptysetsince0 Aanditisafinitesetsincek A bk a k a.HenceAwillhaveamaximumelementsothatwecandefineq=maxA.

Toensurethat thisq is thenumberwewantwemustprovethatbq a<b(q+1).Letussumupwherewehavegotto.

The first goal is immediate sinceq =maxA implies thatq A. The second goal is a littlemoreelusive.However,whenwerewriteitintheformb(q+1) aweseethatitisactuallythestatementthatq+1 A.Sowecanrewriteourstrategyforthissecondgoalasfollows.

Page 152: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thisisreallyobviousfromthedefinitionofwhatismeantbythemaximumelementofasetandthisisnormally all thatwouldbe said to complete theproof.For a formalproofnotice that thenegativereformulationofthegoalstronglysuggeststryingaproofbycontradictiongivingthefollowingstrategy.

Nowobservethatifq+1 Athenq+1 maxA=q,providingtherequiredcontradictionsinceweknowthatq+1>q.

Tocompletetheproofitisnecessarytoconsiderthecasewhena isanegativeinteger.†Asinthecaseofb=2 inProposition11.3.4wecanprove the result fornegativea byusing the result for –awhichispositive.

Wenowwritethisproofoutformally.

ProofofexistenceSupposethata 0.Considertheset

Thissetisnon-emptysince0 Aandisfinitesincek A 0 ka.Soitcontainsamaximumelement,q=maxA.

Nowputr=a–bqsothata=bq+r.Toprovethatqandrareasclaimedinthetheoremitremainstoprovethat0 r<b. It isclear thatr 0since,by thedefinitionofq,bq a.Toprove thatr<bsupposeforcontradictionthatr b.Thena–bq bsothatb(q+1) a,i.e.q+1 Acontradictingthemaximalityofq.Hencer<basrequiredtocompletetheproofofexistence.

Tocompletetheproofsupposethataisanegativeinteger.Then–aispositivesothatfromwhatwehaveproved–a=bq1+r1forintegersq1andr1with0 r1<b.Thusa=b(–q1)–r1.Wenowconsidertwocases.

(i)Ifr1=0,thena=b(–q1)andsowehaveanexpressionoftherequiredformwithq=–q1andr=0.(ii)Ifr1>0,thena=b(–q1)–r1=b(–q1–1)+(b–r1)andsowehaveanexpressionoftherequiredformwithq=–q1–1andr=b–r1.Noticethat,since0<r1<b,wealsohave0<b–r1<b.

Constructingaproofofuniqueness.Theotherpartofthetheoremisuniqueness.Thissaysthatifwehaveintegersq1,q2,r1,r2suchthat

thenq1=q2andr1=r2.Asbefore,qideterminesriandsoq1=q2 r1=r2whichmeans that it issufficienttoprovethatq1=q2.Wecanreorderthepairsifnecessarysothatq1 q2whichmeansthatr1=a–bq1 r2=a–bq2.Thisleavesuswiththefollowingstrategy.

Butthisiseasysincea–bq1anda–bq2differbyamultipleofbandthereisn’troomfortwodistinctnon-negativeintegersdifferingbyamultipleofbwithinthesetofnon-negativeintegerslessthanb.Letuswritetheproofoutproperlystraightaway.

Page 153: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProofofuniquenessSupposethata=bq1+r1=bq2+r2with0 r1,r2<b.Wemustprovethatq1=q2,r1=r2.Todothissuppose,withoutlossofgenerality,thatq1 q2.Then0 r1=a–bq1 r2–a–bq2<b.Thismeansthat0 (a–bq2)–(a–bq1)<bsothat0 b(q1–q2)<bwhichimpliesthat0 q1–q2<1.Butsinceq1–q2isanintegeritfollowsthatq1–q2–0,i.e.q1=q2fromwhichitfollowsalsothatr1(=a–bq1)=r2(=a–bq2).

15.2SomeapplicationsThedivisiontheoremwillbefundamentalforthenumbertheoryintheremainderofthisbook.Inthischapterwecontentourselveswithacoupleofapplicationsconcerningsquares.

FirstofallweprovearesultwhichwasassertedwithoutproofinExercise13.1.

Proposition15.2.1Letabeaninteger.Thena2isdivisibleby3ifandonlyifaisdivisibleby3.

Constructingaproof.Theproofof‘3dividesa 3dividesa2’iseasy.Whatisrequiredfortheconversecanbesummarizedasfollows.

Ifwetryadirectargumentwegetsomethinglike:since3dividesa2,a2=3qforsomeintegerqsothata=3(q/a).Tocompletetheproofweneedtoknowthatadividesqwhichseemstobenoeasierthanwhatwearetryingtoprove.Theproblemisthatitisdifficulttogetbacktoafroma2andthissuggeststryingaproofbycontradiction.Thisgivesthefollowingstrategy.

Nowtheuniquenesspartofthedivisiontheoremenablesustoreformulatethenegativestatementthat3doesnotdivideaasthepositivestatementthattheremainderafterdividingaby3is1or2,i.e.a=3q+1ora=3q+2forsomeq .Fromthisiteasilyfollowsthata2isnotdivisibleby3givingtherequiredcontradiction.

Itmay be useful to formulate theway inwhichwe are using the uniqueness part of the divisiontheoremasanexplicitcorollary.

Corollary15.2.2Letaandbbeintegerswithb>0andsupposethata=bq+r forintegersqandrwith0 q<r.Thenbdividesaifandonlyifr=0(orequivalently,bdoesnotdivideaifandonlyifr>0).

Constructingaproof.Thepointhereisthatifbdividesathen,forsomeintegerq1,a=bq1=bq+r1withr1=0.Soifa=bq+rwith0<r<qthen(q,r)and(q1,0)wouldbetwodistinctsolutionstothedivisionproblem,contradictingtheuniquenesspartofthedivisiontheorem.

ProofThisfollowsimmediatelyfromtheuniquenesspartofthedivisiontheorem,forbdividesaifandonlyifa=bqforsomeintegerqifandonlyifr=0.

Page 154: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProofofProposition15.2.1Firstofallnoticethat,ifaisdivisibleby3,thena=3qandsoa2=9q2=3(3q2)isdivisibleby3.

Fortheconversesupposethata2isdivisibleby3and,forcontradiction,thataisnotdivisibleby3.Then,bythedivisiontheorem,a=3q+1ora=3q+2.However,

andsimilarly

Henceineithercasetheremainderisnon-zeroandso,bythedivisiontheorem,a2isnotdivisibleby3,givingtherequiredcontriadiction.Hence,ifa2isdivisibleby3thensoisaasrequired.

Ifweexaminetheaboveproofweseethatitcontainsthedemonstrationthat,forallintegersa,theintegera2hasremainder0or1afterdivisionby3,i.e.itneverhasremainder2.Wecanusethisfacttorecognizethatanintegerisnotasquare.

Proposition15.2.3Ifn +isaperfectsquare(i.e.thesquareofaninteger)thenn=3qorn=3q+1forsomeq .

ProofIfnisaperfectsquarethenn=a2forsomea .Bythedivisiontheorema=3q0ora=3q0+1ora=3q0+2forsomeq0 .Hence or or sothatn=3qorn=3q+1asrequired.

Example 15.2.4 The integer 11111111111 is not the square of an integer. For 11111111111 = 3 ×3703703703+2sothat11111111111hasremainder2afterdivisionby3.Hencebythepropositionitisnotaperfectsquare.

Exercises15.1Foraandbasfollowswritedownqandrsuchthata=bq+rand0 r<b.

(i)a=100,b=3;(ii)a=3,b=100;(iii)a=100,b=7;(iv)a=−100,b=7;(v)a=−105,b=7;(vi)a=–3,b=105;(vii)a=7684,b=4148;(viii)a=−7684,b=4148;(ix)a=1234567,b=1357;(x)a=0,b=17.

15.2Provethatanintegeraisdivisibleby5ifandonlyifa2isdivisibleby5.

15.3Provethat,forintegersa,a2isdivisibleby3ifandonlyifitisdivisibleby9.

15.4Provethat98765432isnotthesquareofaninteger.

Page 155: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

15.5Provethatifnisaperfectsquarethenn=4qorn=4q+1forsomeq .Deducethat1234567isnotaperfectsquare.

15.6Byrepeateduseofthedivisiontheoremfindtheinfinitedecimalrepresentingtherationalnumber5/7.

†Theargumentgivenfornon-negativeacanbeamendedtoincludethecaseofnegativeabyreplacingAby ,inotherwordsallowingnegativeintegersinthesetA′.Wecanthendefineq=maxA′onceweareclearthatA′hasamaximumelement.InthiscasethesetA′ isnota finiteset for itcontainsall largenegative integersbut itcanstillbeshowntohaveamaximumusing thewell-orderingprinciple.Itseemssimplerinthisbooktodealonlywithmaximumvaluesoffinitesetsandtoprovethisresultfornegativeabymakinguseoftheresultfor–asinceinpracticethiswouldbethewayinwhichqandrwouldbefound,asillustratedinExample15.1.3.

Page 156: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

16TheEuclideanalgorithm

In this chapter we return to the idea of the greatest common divisor introduced in Chapter 11,introducinganextremelyefficientwayofcalculatingthisnumberknownastheEuclideanalgorithm.Aswellasbeinganefficientmethodofcalculationthismethodhasquitefar-reachingconsequencessomeof which will be considered in subsequent chapters. This approach can be applied in several othersituationsinalgebraandnumbertheorywhichthereaderwillmeetiftheseareasareexploredfurther.

16.1FindingthegreatestcommondivisorFirstofallrecallthefollowingdefinition.

Definition 11.3.1 Let a and b be two integers, at least one of which is non-zero. Then theofaandbistheuniquepositiveintegerdsuchthat

(i)disacommondivisor,i.e.ddividesaandddividesb,(ii)disgreaterthaneveryothercommondivisor:

Wedenotethegreatestcommondivisorofaandbby orsimplybyInChapter 11 we showed how to find the greatest common divisor by finding all the common

divisors. Thismethod is extremely tedious if the numbers are at all large.Amore efficient process,involving repeated application of the division theorem, is given in Book Seven of the Elements ofEuclidandwasdiscoveredindependentlyinChina.ItisnowknownastheEuclideanalgorithm.

Tobeginwithnoticethatddividesaifandonlyifddivides–aandsoitissufficienttodealwiththegreatestcommonfactorof twonon-negative integers.Furthermore, ifa ispositive thengcd(a,0)=aandsowemayaswellrestrictattentiontostrictlypositiveintegers.Thusweconsiderhowtofindthegreatestcommondivisoroftwopositiveintegersaandb.

Themethodisbasedontwokeyobservations.Thefirstoftheseisverysimple.

Lemma16.1.1Ifapositiveintegerbdividesathenbmustbethegreatestcommondivisorofaandb,i.e.gcd(a,b)=b.

ProofIf6dividesa,thenbisacommondivisorsinceitclearlyalsodividesb.However,nothinglargerthanbcandividebandsoitmustbethegreatestcommondivisor.

Ontheotherhand,ifbdoesnotdividea,thenthedivisiontheoremenablesustowrite

Page 157: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thesecondkeyobservationisthefollowingresult.

Lemma16.1.2Fornon-zerointegersaandbsupposethat

Thengcd(a,b)=gcd(b,r).

Beforeconsideringtheproofofthisresultletusconsideranexampleofhowthesetwoobservationsmaybeusedtofindgreatestcommondivisors.

Example16.1.3Tofindthegreatestcommondivisorof72and30(Example11.3.3again).Webeginbydividing30into72whichgives

andso,byLemma16.1.2,

Nowwecanrepeattheprocessdividing12into30:

givingFinally,since6divides12,wehave byLemma16.1.1.Puttingallthistogetherweget

andsothegreatestcommondivisorof72and30is6.

This calculation is an example of the Euclidean algorithm in action. The Euclidean algorithm isstatedbelowasTheorem16.2.1.ButbeforecomingtothisweproveLemma16.1.2.

ConstructingaproofofLemma16.1.2.Given

Thedifficultyhere is that thedefinitionofgreatestcommondivisor isquitecomplicatedanddoesnotgive(a,b)asasimpleformulaintermsofaandb.Infactthisisoneofthosecaseswheniteasiertoprovesomethingslightlystrongerthanneeded.Recallthat

thesetofcommondivisorsofaandb,andsimilarly

thesetofcommondivisorsofbandr.IfwecanprovethatD(a,b)=D(b,r)thenwearehomebecausegcd(a,b)isthegreatestelementofthefirstsetandgcd(b,r)isthegreatestelementofthesecondset.

Butthisiseasy.Recall thatprovingtwosetsequalamountstoprovingthateachisasubsetofthe

Page 158: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

other, in thiscase and Toshow that weneed toprove thatWecansummarizewhatthisinvolvesasfollows.

Oneof thegoals,c dividesb, is alreadygiven.For theotherweneed to remember thedefinitionof‘divides’.

Thisisimmediatesince andsowecantakek=q1−q2q.Theproofthat isalmostidentical(seeExercise16.4).Whenwecometowriteoutaformalproofitisquiteshort.

ProofIfcdividesaandcdividesbthena=cq1andb=cq2forsomeintegersq1andq2.Inthiscaser=a−bq=q1c−cq2q=c(q1−q2q)sothatcdividesr.Thuscisacommondivisorofaandbimpliesthatcisacommondivisorofbandr.Conversely,ifcisacommondivisorofbandrthencisacommondivisorofaandb.Hencethecommondivisorsofaandbarethesameasthecommondivisorsofbandrandsotheirgreatestcommondivisorsarethesame.WehavenowjustifiedthecalculationinExample16.1.3.Sowegoontodescribethemethodingeneralasanalgorithm.

16.2TheEuclideanalgorithm

Theorem16.2.1(TheEuclideanalgorithm)Supposethataandbarepositiveintegers.Thefollowingproceduredefinesafinitesequenceofpositiveintegersa0,a1,…,ansuchthatan=(a,b),thegreatestcommondivisorofaandb.

Puta0=a,a1=b.Stepk:Fork≥1,supposethata0,a1,…,akhavebeendefined.Usingthedivisiontheoremwrite

Ifrk=0,stop.Otherwise,putak+1=rkandcontinuewithstepk+1.

Remarks 16.2.2 An algorithm† is a sequence of steps necessarily leading to a desired conclusion.Noticethatsinceb=a1>a2>…>an>0theEuclideanalgorithmnecessarilyterminatesafteratmost

Page 159: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

6steps.Iftherewereexampleswherethenumberofstepswasasmanyasthisthenitwouldbeapooralgorithm.However,itisknown‡thatthenumberofstepsrequiredtofindthegreatestcommondivisorofaandbusingtheEuclideanalgorithmdoesnotexceedfivetimesthenumberofdecimaldigitsinthesmallerofaandb.

Numericalalgorithmsareverywellsuited tobeingprogrammedonacomputer.WecanformulatetheEuclideanalgorithmasaBASICprogramasfollows.

NoticethatBASIChaswithinitacommandINTwhichgivesthequotientinthedivisiontheorem.Ifwedidnothavethiscommandthenitwouldbeeasytowriteasubprogramtoachievethat(seeProblemsIV,Question9).Evenifyouareunfamiliarwithprogrammingyoushouldbeabletoworkthroughthisprogram.Whenyourunitthefirsttwolinesaskyoutoinputthetwonumberswhosegreatestcommondivisorissought.Thenlines30to50describeasinglestepofthealgorithm.Line50examineswhetherthelastremainderiszeroinordertodecidewhetherthealgorithmiscomplete:ifitisthentheprogramgoestoline90andprintsouttheanswer;ifitisnotthenlines70and80redefinethenumbersAandBbeforeapplyingthedivisionalgorithmagaininordertoobtainthenextremainder.RatherthanusingallthosesubscriptsthatappearinthestatementofthetheoremwechangethemeaningofA,B,QandRwitheachstepofthealgorithm.Forexample,inline60‘A=B’means‘defineAtobethenumberB’.Asa result thepreviousmeaningofA is forgotten– this is a specialuseof the symbol ‘=’ in computerprograms†.

Intermsofthisprogramthetheoremstatessimplythatiftheprogramisrunthenoninputtinganytwopositivenumberstheprogramwillterminatebyprintingthegreatestcommondivisor.

Notice that Example 11.3.3 illustrates an alternative algorithm for the greatest common divisor:simplytryallthepositiveintegerslessthanorequaltothesmallerofaandbinturn.However,thisisessentiallyuseless forallbut thesmallestnumbers: imagineusing it for twosix figurenumbers.TheEuclideanalgorithmcandealwithsixfigurenumbersquiteeasilybyhand(seeExercise16.2).

Example16.2.3Tofind thegreatestcommondivisorof232and136.TheEuclideanalgorithmgivesthefollowing.

Hence(232,136)=8.Inthiscasea0=232,a1=136,a2=96,a3=40,a4=16,a6=8.Inpracticewhenweareapplyingthedivisiontheoreminthesecalculationswecanuseacalculator

Page 160: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

tofindanapproximatevaluefora/b.Thenthequotientqisthegreatestintegerlessthanorequaltoa/bandr=a–bqasillustratedinExamples15.1.2and15.1.3.

Observethatitissufficienttowritedownsimplythenumbersakinacolumn.Ateachstagewesimplysubtract enoughmultiples of the last number written down from the previous one in order to get asmallernumber.Thus for theaboveexamplewecouldwrite the following (where the information inbracketsistheresimplytoindicatewhathasbeendone).

Ormorebrieflywecouldwrite

wherethenumbersinbracketsindicatewhatmultipleofeachnumberissubtractedfromtheoneaboveinorder to obtain thenext number–namely thequotientwhenyoudivide that number into theoneabove.

Ifwedowriteoutthecalculationinthisway,aswewillinthisbook,itisimportanttorealizethatitmaybemeaninglesstoareaderwhohasnothadtheconventionsexplained.Inalmostallmathematicalwriting there is a lot of convention, if only about themeanings of symbols, andHumptyDumpty’sprinciple applies here. In a case like this it is useful to at least indicate what we are doing, say byprefacingthecalculationbystating‘ApplyingtheEuclideanalgorithmgivesthefollowingsequenceofremainders.’

ConstructingaproofofTheorem16.2.1.Theaboveexampleillustratesthegeneralproof.NoticehowrepeateduseofLemma16.1.2impliesthat8isthegreatestcommondivisor:

Turningtothegeneralcase,firstofallnoticethatrepeatingthestepsinthetheoremdoesleadtoafinitesequenceofpositiveintegersa0,a1,…,anwheren≤bsinceak+1<ak.

Now,for1≤k<n,ak−1=akqk+ak+1.Hence,justasintheexample,byLemma16.1.2,(ak−1,ak)=(ak,ak+1).Furthermore,sincean−1=anqn,itfollows(Lemma16.1.1)that(an−1,an)=an.Hence(a,b)=(a0,a1)=(a1,a2)=…=(an−1,an)=an.Thedotsinthisproofindicating‘andsoon’shouldalertustothefactthatstrictlyspeakingthisproofismakinguseoftheinductionprinciple.Thestyleofpresentationusedintheaboveparagraphisnormallyconsideredacceptablebutwecouldwritethisoutasaformalproofbyinductionasfollows.

Page 161: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Proof of Theorem 16.2.1. Let P(n) be the statement that, given any sequence of positive integersnumbers a0, a1, …, an generated by n − 1 steps of the Euclidean algorithm (but not necessarilyterminatingafternsteps),(a0,a1)=(an−1,an).Weprove thatP(n) is true for all positive integersn by inductiononn.Basecase:P(1) simply says(a0,a1)=(a0,a1)whichiscertainlytrue!Inductivestep:Supposenowthatforsomek≥1theresultistrueforn=k.Then,givenasequenceofnumbersa0,a1,…,ak+1generatedbykstepsoftheEuclideanalgorithm, ak−1 = akqk + ak+1 and so by Lemma 16.1.2 (ak−1,ak) = (ak,ak+1). But, by inductivehypothesis,(ak−1,ak)=(a0,a1)andso(ak,ak+1)=(a0,a1)asrequiredtoprovetheresultforn=k+1.Hence,byinductionthestatementP(n)istrueforallpositiveintegersn.

Nowtocompletetheproof,usingthenotationofthetheoremitfollowsthat(a,b)=(a0,a1)=(an−1,an).Butsincern=0itfollowsthatandividesan−1andso(an−1,an)=an,i.e.(a,b)=an.

Exercises

16.1UsetheEuclideanalgorithmtofindthegreatestcommondivisorof7684and4148.

16.2UsetheEuclideanalgorithmtofindthegreatestcommondivisorof11033442and1102246.

16.3WhatdifferencedoestheorderofthetwonumbersaandbmakewhenwecalculatetheirgreatestcommondivisorusingtheEuclideanalgorithm?

16.4Supposethata,b,qandrareintegerssuchthata=bq+r.Provethat

† This word devices from the name of the ninth century arabic scholor Mohammed ibn-Musa al-Khowarizmi whose two books onarithmeticandalgebrawereveryinfluentialinthespreadoftheHindu-ArabicnumeralsystemtoEurope.Theword‘algebra’alsocomesfromthissamesource,fromthetitleofhisbookAl-jbrwal'l throughwhicharabricalgebrapassedtoEurope(seeC.B.BoyerandU.C.Merzback,Ahistoryofmathematics,Wiley,Secondedition1989).

‡ThisresultwasprovidedbyGabrielLaméin1845(seeProblemsIV,Question8).†Itisevencorrecttowrite‘A=A+1’inacomputerprogram,meaningthatthevalueofAshouldbeincreasedby1.Itisnotcorrecttowrite‘puta=a+1’whenwritingmathematics–althoughsuchbarbarismsaresometimesused.

Page 162: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

17ConsequencesoftheEuclideanalgorithm

In thepreviouschapter itwasexplainedhowtheEuclideanalgorithmprovidesanextremelyefficientmethodforcalculatingthegreatestcommondivisoroftwointegers.However,itdoesmuchmorethanthis.Inparticularitenablesustoseehowtowritethegreatestcommondivisorintermsofthenumberswestartedwithasanintegrallinearcombination.Wewillseethatthisresultisofbothnumericalandtheoreticalinterest.

17.1IntegrallinearcombinationsTheorem17.1.1Leta,bbe integersat leastoneofwhich isnon-zerowithgreatest commondivisorgcd(a,b).Thenthereexistintegersmandnsuchthat

Definition17.1.2Given integersaandb,wesay thatan integerc isan ofaandbifthereexistintegersmandnsuchthat

ThusTheorem17.1.1asserts that thegreatestcommondivisorof two integers isan integral linearcombinationofthetwointegers.Beforegivingthegeneralproofweillustratetheresultbyconsideringanexample.

Example17.1.3ConsiderExample16.2.3inwhichitwasshownthatgcd(232,136)=8.ThefulldetailsoftheEuclideanalgorithmwereasfollows.

Ifweexaminetheseequationsweseethatwecanusethemtoprovideanexpressionsforeachterminthe sequence of remainders generated by the algorithm as a linear combination of the previous twoterms.

Page 163: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Now if we substitute each of these equations in the next we get an expression for 8 as a linearcombinationof232and136.

Therearetwowaysoforganizingthiscalculation.

Method1:Theusualmethodistoworkupthroughtheequationsasfollows.

Personally I find this method rather cumbersome. Whatever method is used care with signs isrequiredbutIfindthatslipsarelesslikelyusingasecondmethod.

Method2:ThismethodistowriteeachofthenumbersgeneratedbytheEuclideanalgorithminturnasan integral linear combinationof the required formworkingdown through the above equations.Thenumberswestartwith,inthiscase232and136,areeasytodealwithsince

and

Step1oftheEuclideanalgorithmgivesthefollowing.

Step2givesthefollowing.

Andcontinuinginthiswayweobtainthefollowingsequenceofequations.

Page 164: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Hence, an expression as required is 8 = 232 × (−7) + 136 × 12.We stop the calculation at Step 4becausewehaveobtainedwhatwewant.

Rememberthatthenumbersinbracketstellwhatmultipleofeachlinemustbesubtractedfromthepreviouslineinordertogetthenext.Ifwesetoutthecalculationinthiswaythenateachstepwedojustthesamecalculationwiththemultipliersof232and136.Soforexample,forStep2,wesimplyget0−1=−1asthemultiplierof232and1−(−1)=2asthemultiplierof136;and,forStep3,1−(−1)×2=3and−1−2×2=−5.

Just as the first column of figures was all that it was necessary to write downwhen finding thegreatest common divisor, this list of equations is all that is neededwhen finding the integral linearcombinationcoefficients.

Noticethatyoucanreadilycheckwhetheryouhavesuccessfullymanoeuvredyourselfthroughthecalculationbycheckingthatthevaluesyouhaveobtainedformandnactuallywork.Inthiscase232×(−7)+136×12=−1624+1632=8.Thisillustratesthefactthatthebestwayofprovingthatyouhaveasolution to an equation is by substituting in the values you have found and confirming that they dosatisfytheequation.

In this book Iwill use the secondmethod.Whatevermethod you use it is importantwhen doingnumericalexamplesalwaystocheckthatyoursolutionsworksincenumericalslipsaresoeasy.

ConstructingaproofofTheorem17.1.1Thesecondmethodoforganizingtheabovecalculationcanbeused toprove that eachof thenumbers in the sequencea0,a1,…,an generatedby theEuclideanalgorithm(andinparticularthegreatestcommondivisor)isanintegrallinearcombinationofaandb.AsintheproofoftheEuclideanalgorithmitselftheproofisbyinductiononthelengthofasequenceofnumbersgeneratedbytheEuclideanalgorithm.

ProofofTheorem17.1.1Wefirstofallprovetheresultinthecasewhenaandbarenon-negative.Weprovebyinductiononnthatasequenceofpositiveintegersa0,a1,…,angeneratedbythefirstn

−1stepsoftheEuclideanalgorithmareintegrallinearcombinationsofaandb.Basecase:Thenumbersaoanda0havethisformsincea0=a=a×1+b×0anda1=b=a×0+b×1.Inductivestep:Nowsupposeasinductivehypothesisthat,forsomek 1,theresultholdsforn=k sothat,for0 i k,ai=ami+bniwheremi,ni .Toprovetheresultforn=k+1observethat

expressingak+1asanintegrallinearcombinationofaandbandcompletingtheinductivestep.Hencebyinductiontheresultistrueforallpositiveintegersn.Inparticularthegreatestcommondivisor,thefinalterminthecompletesequenceofnumbersgenerated

Page 165: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

bytheEuclideanalgorithm,isanintegrallinearcombinationofaandb.Toobtainthegeneralresultobserveforexamplethatifaisnegativeandbnon-negativethenbythe

aboveargument,since−aispositive,thereareintegersm1andn1suchthat

This means that the required integers are given bym = −m1, n = n1. Similar methods work for bnegativeoraandbbothnegative.

17.2AnalternativedefinitionofthegreatestcommondivisorThedefinitionofgreatestcommonfactorwhichwasintroducedinChapter11isnotentirelystandard.Itreads(essentially)asfollows.

Definition 11.3.1 Let a and b be two integers, at least one of which is non-zero. Then theofaandbistheuniquepositiveintegerdsuchthat

(i)disacommondivisor,i.e.ddividesaandddividesb,(ii)disgreaterthaneveryothercommondivisor:

cdividesaandcdividesb c d.

Wedenotethegreatestcommondivisorofaandbby orsometimes .Itisusualtohavethefollowingstrongerconditioninplaceof(ii)intheabove:

(ii)’disamultipleofanyothercommondivisor:

cdividesaandcdividesb cdividesd.

This definition is not used in this book because it is not immediately obvious from it that twointegerswillhaveagreatestcommondivisor.Italsoseemssimplesttohaveadefinitionwhichreflectsascloselyaspossiblewhatthewords‘greatestcommondivisor’mightreasonablybeexpectedtomean!

In fact these two definitions are equivalent since the apparently more stringent condition (ii)’ isautomaticallysatisfiedbyanumberdwhichsatisfiesourdefinitionofagreatestcommondivisor.ThisisasimpleconsequenceofTheorem17.1.1asfollows.

Corollary17.2.1Letd=gcd(a,b)bethegreatestcommondivisoroftheintegersaandb.Thencisacommondivisorofaandbifandonlyifcdividesd,i.e.D(a,b)=D(d).

Example17.2.2RecallfromExample11.3.3thatthesetofcommondivisorsof30and72is

D(30,72)={−6,−3,−2,−1,1,2,3,6}

ThisispreciselyD(6),thesetofdivisorsofthegreatestcommondivisor(30,72)=6.

ProofofCorollary17.2.1Notice that the statement ‘if andonly if indicates that two separate resultsmustbeproved.

Proofof‘if’:Supposethatcdividesd.Bydefinitionddividesaandddividesb.Butcdividesdwhichdividesaimmediatelyimpliesfromthedefinitionof‘divides’thatcdividesa(seeExercise3.2)andin

Page 166: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

thesamewaycdividesbsothatcisacommondivisorasrequired.Proofof‘onlyif’:ByTheorem17.1.1,d=am+bnforsomem,n .Nowifcisacommondivisorofaandbthencdividesaandcdividesbsothata=cq1andb=cq2forsomeintegersq1andq2.Inthiscased=(cq1)m+{cq2)n=c(q1m+q2n)sothatcdividesdasrequired.

17.3CoprimepairsRecallthefollowingdefinition.

Definition11.3.2Two integers a and b, not both zero, are called when (a, b) = 1, in otherwordstheironlycommonfactorsare1and−1.

Proposition17.3.1Twonon-zerointegersaandbarecoprimeifandonlyifthereexistintegersmandnsuchthat

am+bn=1.

Constructingaproof.ThenecessityoftheexistenceofmandnisaspecialcaseofTheorem17.1.1.In theotherdirectionwearestartingfromanexistencestatement.Thesimplestwaytousesucha

statementistotakeparticularelementswhichsatisfythepredicate.Sointhiscaseweuseintegersm0andn0suchthatam0+bn0=1−wearesupposingthatsuchintegersexist.ItwasexplainedinChapter7thatitisusualtousethesamesymbolsasintheexistencestatementforspecificelementsforwhichthepredicate is true, in this casem andn rather than thenew symbolsm0 andn0, but here it seemsclearertousedifferentsymbolsforspecificelements.

Thisleadstothefollowingsummaryofwhatisrequired.

Toproceedweneedtounpackthedefinitionofcoprime.Toshowthat(a,b)=1wemustshowthattheonlycommondivisorsofaandbare±1,i.e.

cdividesaandcdividesb c=±1forintegersc.

Ifwenowtrythedirectmethodofproofthisgivesthefollowingstrategy.

Havinggotthisfarwecanmoveontotheformalproofwhichisconstructedeasilybyspellingoutthedefinitionof‘divides’.

Proof Ifa andb are coprime then the existence of integersm andn as required is a special case ofTheorem17.1.1.

Page 167: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Fortheconversesupposethatm0andn0areintegerssuchthatam0+bn0=1.Suppose thatc isacommondivisorofaandb.Then,sincecdividesa,a=cq1forsomeq1 and,sincecdividesb,b=cq2forsomeq2 .Hence

Thuscdivides1whichimpliesthatc=±1.Thustheonlycommondivisorsofaandbare±1andsothegreatestcommondivisoris1,asrequiredtoprovethataandbarecoprime.Theorem17.3.2Supposethata,bandcarepositiveintegerswithaandbcoprime.Then

adividesbc adividesc.

Constructing a proof. This innocuous appearing result is the key to many basic results in numbertheory.It issurprisinglydifficult toprove.Althoughin thisbookIamattemptingtodemonstrate thatmanyproofsarisenaturallyfromthedefinitions,thisisnotthecasewithallproofs:someproofsarejustclever and although we can suggest that the steps arise naturally this is only with the benefit ofhindsight.Althoughthisparticularproofisnotdifficulttounderstanditisratheringenious:anexampleofaproofwhichwemightbesurprisedthatanyonewasabletothinkofinthefirstplace!

Whatwearelookingforcanbesummarizedasfollows.

Itisnotclearhowtoproceed.So,asalwaysinsuchasituation,wegobacktothedefinitionstosimplifythestatementsinvolved.The‘divides’statementsaresimpleenoughbut,aswehavenotedbefore,thedefinitionofthegreatestcommondivisorisrathercomplicatedanddifficulttouse.Itturnsout(andthisisthefirstcleverstep)thatagoodwaytoproceedwhichgivesusalogicallymuchsimplerstatementistousethepreviousresultwhichcharacterizedcoprimeintegers.Sinceaandbarecoprime,am0+bn0=1forsomem0,n0 .Thisgivesusthefollowingstrategy.

Evennowitisnotabsolutelyobviouswhattodo.Thesecondcleverstepistomultiplythefirstgivenstatementbycwhich,ifyouthinkaboutit,istheonlywayofgettingcoutofthegivenstatementsusingaddition or multiplication (division is no use because it may not lead to integers). This gives thefollowingsteps:

Thusk=cm0+qn0givesustheintegerweneed.Thisremarkableproofisveryshortwhenwrittenoutformally.

ProofSupposethatadividesbcsothatbc=aqforsomeq .Since(a,b)=1,byProposition17.3.1

Page 168: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

thereareintegersm0andnosuchthat1=am0+bn0.Butthenc=(am0+bn0)c=acm0+bcn0=acm0+aqn0=a(cm0+qn0)sothatadividescasrequired.

Exercises

17.1FromExercise16.1,gcd(7684,4148)=68.Findintegersmandnsuchthat68=7648m+4148n.

17.2Findintegersmandnsuchthat68=7648m−4148n.

17.3FromExercise16.2,gcd(11033442,1102246)=578.Findintegersmandnsuchthat11033442m+1102246n=578.

17.4Letgcd(a,b,c)denotethegreatestcommondivisorofthethreenon-zerointegersa,bandc.UseCorollary17.2.1toprovethat

gcd(a,b,c)=gcd(gcd(a,b),c).

Hencefindthegreatestcommondivisorof11033442,1102246and6035.

17.5Findintegersm,nandpsuchthat

11033442m+1102246n+6035p=gcd(11033442,1102246,6035).

17.6Supposethata1,a2,b1,b2arepositiveintegerssuchthata1andb1arecoprimeanda2andb2arecoprime.Provethat

Page 169: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

18Lineardiophantineequations

InthischapterwepresentastrikingapplicationoftheEuclideanalgorithm.Thefollowingveryancientproblemwillbesolved.

Problem18.0.1Givenintegersa,bandc,findallintegersmandnsuchthat

NoticethatProposition4.1.1showsthatforcertainchoicesofa,bandctherearenosolutionsatallsinceitwasprovedtherethat therearenosolutionsfora=14,b=20,c=101.Thefirstpartof thesolutiontotheproblemistogiveanecessaryandsufficientconditionforasolutiontoexist.Itturnsoutthat the idea used in proving Proposition 4.1.1 gives such a condition although the proof that thiscondition is sufficientmakes use of thematerial on theEuclidean algorithm.The secondpart of thesolutionistodescribeallthesolutionswhentheconditionissatisfied.

18.1DiophantineequationsProblem18.0.1isanexampleofadiophantineequation.Thistermreferstoanequationinoneormoreunknowns which is to be solved in the integers. The study of such problems is one of the oldestbranches of mathematics and examples are to be found in extremely ancient documents. They arenamedafter theGreekmathematicianDiophantus†who lived in the third centuryA.D.; his book theArithmeticaisusuallyconsideredtobethehighpointofclassicalGreeknumbertheory.Diophantuswasusuallycontenttofindonlyonesolutionanddidnotallownegativesolutions.AcompletesolutiontoProblem18.0.1wasapparentlyfirstobtainedbytheIndianmathematicianBrahmaguptaintheseventhcentury.†

Oneofthemostfamousofallproblemsinmathematicstakestheformofadiophantineequation.ItwaswhenreadingDiophantus’sArithmetica(whichhadbeenrecentlyrediscoveredandtranslatedintoLatinbyBachet)in1637thatPierredeFermat(1601–1665)madethefollowingnote(inLatin)inthemarginofhiscopy.

Ontheotherhand,itisimpossibleforacubetobewrittenasasumoftwocubesorafourthpowertobewrittenasasumoftwofourthpowersor,ingeneral,foranypowerwhichisapowergreaterthanthesecondtobewrittenasasumoftwolikepowers.Ihaveatrulymarvellousdemonstrationofthispropositionwhichthismarginistoonarrowtocontain.‡

Tounderstandthisassertionrecallthat,byPythagoras’stheorem,thelengthsofthesidesofaright-angledtrianglesatisfytheequationx2+y2=z2.Itiseasytofindintegerswhichsatisfythisequation,forexamplex=3,y=4,z=5,orx=5,y=12,z=13,andacompletedescriptionofall thesolutions,

Page 170: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

knownasPythagoreantriples,hasbeenknownsincethetimeofEuclid.Fermat’snotewaswrittennextto Book II, Problem 5 theArithmetica which askswhich squares can bewritten as the sum of twosquaresandsocanbesolvedusingknowledgeofPythagoreantriples.

Fermatconsideredtheequationxn+yn=znforintegersn 3andhisnoteassertsthatinthiscasetherearenopositiveintegers§whichsatisfytheequation.Fermathimselfdidprovideelsewhereaproofof this result in the case thatn = 4.A proof for n = 3was first given by the SwissmathematicianLeonhardEulerin1770(bywhichtimeattheageof63hehadalreadybeenblindforfouryears);thiswas incomplete butAdrien-MarieLegendre (French) plugged the gap.A proof forn = 5was foundaround1825byLejeuneDirichlet(alsoofFrenchdescent)andbyLegendre.Sincethen,muchmodernalgebra has been developed in attempting to prove Fermat’s last theorem andmanymathematicianshaveworkedonit.Recentlycomputercalculationshavebeenusedandbythesemeansthetheoremwasshowntobetrueforvaluesofnlessthan25000.Butthereisnohopeofprovingthegeneraltheorembycheckingintegersnonebyone.

However, in 1993 the BritishmathematicianAndrewWiles of PrincetonUniversity announced aproofofFermat’slasttheorem.Therewasintenseinterestinthisworkandattheendoftheyearagapwasfoundintheproof.ByOctober1994thisgaphadbeenbridgedandtheproofisnowpublished.†Itappearsthatthismostfamousmathematicalproblemhasatlastbeensolved.

NoticethatTheorem13.2.1,whichassertedthatthereisnorationalnumberwhosesquareis2,isastatement about a diophantine equation: it is equivalent to the assertion that the only solution to thediophantineequationm2=2n2isthetrivialonem=0,n=0.

18.2AconditionfortheexistenceofsolutionsWenowbeginthediscussionofProblem18.0.1statedatthebeginningofthechapter.

Forsimplicitywesuppose thata,b,carepositive. It iseasy toextend themethods to thegeneralcase(seeExercise18.2).

Theorem18.2.1Forpositiveintegersa,bandc,thereexistintegersmandnsuchthat

ifandonlyifthegreatestcommondivisorgcd(a,b)dividesc.

Constructingaproofofthenecessityofthedivisibilitycondition.Itisalwaysagoodideatothinkaboutaspecificnumericalexample.InProposition4.1.1weshowedthattherearenointegersmandnsuchthat14m+20n=101byobservingthat,since2divides14and2divides20,foranyintegersmandn,2divides14m+20n.Injustthesameway,inthegeneralcase,ifddividesaandddividesbthenddividesam+bnandinparticulargcd(a,b)dividesam+bn.Thedetailsfollow.

ProofofthenecessityofthedivisibilityconditionSupposethatm0andn0areintegerssuchthatam0+bn0=c.Letd=gcd(a,b).Sinceddividesa andd dividesb,a =dq1 andb =dq2 for some naturalnumbersq1andq2.Thereforec=(dq1)m0+(dq2)n0=d(q1m0+q2n0)sothatddividescasrequired.

Constructingaproofofthesufficiencyofthedivisibilitycondition.Thisistheinterestingpart.Itisoften helpful to think about one particular simple case. For this problem the easiest case of gcd(a,b)dividingciswhenc=gcd(a,b).Inthiscaseweneedtoshowthatthereareintegersmandnsuchthat

Page 171: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ButTheorem17.1.1ispreciselythestatementthatsuchintegersexist.Nowinthegeneralcaseofgcd(a,b)dividingcwehavec=(a,b)qforsomeq .Butifam0+bn0

=(a,b)thena(m0q)+b(n0q)=(a,b)q=candsowehavetherequiredintegersolutionofam+bn=c.

ProofofthesufficiencyofthedivisibilityconditionIf(a,b)dividescthenc=(a,b)qforsomeq .ByTheorem17.1.1wecanchooseintegersm0andn0suchthat

Hence

Thusweseethatasolutionisprovidedbym=m0q,n=n0q.

Example18.2.2Provethatthediophantineequation

hasasolutionandwritedownonesuchsolution.

SolutionWeapply theEuclidean algorithm to thenumbersa=140,b = 63, obtaining the followingsequenceofremainders.

Thisshowsthat(140,63)=7.Since7divides35theequationhasasolution.Tofindasolutionwewritethesequenceofremaindersasintegrallinearcombinations.

Thisgives140×(−4)+63×9=7andsomultiplyingthroughby35/7=5weobtain140×(−20)+63×45=35.Thusasolutionisgivenbym=−20,n=45.

18.3Findingallthesolutions−thehomogeneouscaseSofarwehaveseenhowtodecidewhetherthediophantineequation

has a solution and, if it has, how theEuclidean algorithm enables us to find one solution.However,thereisnoreasontobelievethatthereisonlyonesolutionandwenowconsiderhowwecanfindallthesolutionstotheequation.Wewillseethatiftheequationhasonesolutionthenithasinfinitelymany.

Westartwiththespecialcaseofc=0forwhichtheequationcertainlydoeshaveasolution,namelym=0,n=0.

Thediophantineequation

Page 172: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

iscalledahomogeneousequation.Equation(18.2)issaidtobethehomogeneousequationassociatedwiththeequation(18.1)(whichiscalledinhomogeneousifc 0).

The method of finding all the solutions to a homogeneous linear diophantine equation is bestillustratedbymeansofanexample.WetakethehomogeneousequationassociatedwiththeequationofExample18.2.2.

Example18.3.1Findallthesolutionstothediophantineequation

SolutionRecallfromExample18.2.2thatgcd(140,63)=7.Sowecanbeginbydividingthroughby7.Then,form,n ,

since it is clear that −9n= 9(−n) is divisible by 9. Prom thiswe can deduce that 9 dividesm usingProposition17.3.2since9and20arecoprime.[Noticethat,byExercise11.4,itisalwaysthecasethatdividingam+bn=0bygcd(a,b)leadstoanequationwithcoprimecoefficients.]

Itnowfollowsthatm=9qforsomeq .Substitutingthisbackintoequation(18.3)weget20×9q=−9nwhichgivesn=−20q.Soweseethatthesolutionstothediophantineequationaregivenby

Thereisonesolutionforeachintegerq.Noticethatasolutionisapairofintegers(m,n),inotherwordsanelementoftheset × = 2.

Thefollowingtablegivessomeexamples.

Thekeypartofthisargumentcanbeabstractedintothefollowingresult.

Proposition18.3.2Supposethataandbarecoprimenon-zerointegers.Then,for(m,n) 2,

ProofWeusethesameargumentasintheexample.Theproofof‘ ’issimplybysubstitution:

To prove ‘ ’ observe that am + bn = 0 implies that am = − bn so that b divides am. By invokingProposition17.3.2itfollowsthatbdividesmsinceaandbarecoprime.Hencem=bqforsomeintegerqandsubstitutingthisbackintotheequationgivesn=−aq,asrequired.

Page 173: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Example18.3.3UsingthisresultwecouldwriteoutthesolutiontoExample18.3.1asfollows.

SolutionForm,n ,

since9and20arecoprime.

However,whenusingProposition18.3.2,caremustbetakentogetthenumbersaandbthecorrectwayroundandthesignscorrect.Itisusuallybesttocheckthatthesolutionsyouareclaimingactuallyaresolutions–simplybysubstitutingintotheequation.

18.4Findingallthesolutions–thegeneralcaseNowwereturntothegeneralcaseofequation(18.1).Onceweknowthatsuchanequationhasasinglesolution then we can write down all the solutions by solving the associated homogeneous equation(18.2).Thefollowingresultsumsupwhythisisthecase.

Proposition18.4.1Supposethat(m,n)=(m0,n0) 2isasolutiontothediophantineequationam+bn=c,i.e.am0+bn0=c.Then,for(m,n) 2,

Proof

Letusillustratehowthisisusedbyconsideringanexample.

Example18.4.2Findallthesolutionstothediophantineequation

SolutionInExample18.2.2wefoundtheparticularsolutionm=−20,n=45.Thus

Thefollowingtablegivessomesolutions.

Page 174: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Noticethathadwestartedwithadifferentparticularsolution,saym=−2,n=5,thenwewouldhaveobtainedthatthesolutionsare(m,n)=(−2+9q,5−20q)forq .Butputtinginsomevaluesforqillustratesthatwegetjustthesamesolutionset.

ThisproblemisconsideredagainasExample20.2.4whereanalternativemethodisexplained.

Exercises18.1Solvethediophantineequation

18.2Solvethediophantineequation

18.3Solvethediophantineequation

Provethatthereareuniquepositiveintegerssatisfyingthisequationandfindtheseintegers.†Exercise (from the fourthcentury):Diophantuspassedone sixthofhis life in childhood,one twelfth inyouth, andone seventhas abachelor.Fiveyearsafterhismarriagewasbornasonwhodiedfouryearsbeforehisfather,livinghalfaslongashisfather.HowlongdidDiophantuslivefor?†SeeC.B.BoyerandU.C.Merzbach,Ahistoryofmathematics,Wiley,Secondedition1989.

‡Variousversionsofthisnoteappearintheliterature.ThisonecomesfromH.M.Edwards,Fermat’slasttheorem,ageneticintroductiontoalgebraicnumbertheory,Springer-Verlag,1977.Theactualbookcontainingthemarginnotehasbeenlost.WhenFermat’sson,SamueldeFermat,wentthroughhisfather’spapershefoundtheannotatedcopyofDiophantus’sbookandin1670publishedaneweditionoftheBachettranslationwithFermat’smarginalnotesasanappendixof48Observations.The‘lasttheorem’wasObservation2.Another excellent and less advanced source of information about the problem isD.M.Burton,Elementary number theory, Allyn andBacon,1976.

§Actually,Diophantusworkedentirelywith rationalnumbersandso,strictlyspeaking,Fermatwasasserting that therearenopositiverationalsolutions.However, it issufficient toconsideronly integersolutionsbecause ifonehada rationalsolution thenanappropriatemultipleofitwouldbeanintegersolution(seeProblemsIV,Question19).†TheproofappearsinAndrewWiles,ModularellipticcurvesandFermat’slasttheorem,AnnalsofMathematics,secondseries,volume141, PrincetonUniversity Press, 1995 (pages 443–551). This is a highly technical paper beyond the reach even ofmost professionalmathematicians, but books have now appeared attempting to make the background to the proof and some of its ideas more widelyavailable: A.D.Aczel,Fermat’s last theorem, unlocking the secret of an ancient mathematical problem, Viking, 1997, and S. Singh,Fermat’slasttheorem,thestoryofariddlethatconfoundedtheworld’sgreatestmindsfor358years,FourthEstate,1997.

Page 175: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsIV:Arithmetic

1.Provethatifanintegernisthesumoftwosquares(n=a2+b2fora,b )thenn=4qorn=4q+1orn=4q+2forsomeq .Deducethat1234567cannotbewrittenasthesumoftwosquares.

2.Letabeaninteger.Provethata2isdivisibleby5ifandonlyifaisdivisibleby5.

3.UsetheresultofQuestion2toprovethattheredoesnotexistarationalnumberwhosesquareis5.

4.Provethatthereisnorationalnumberwhosesquareis98.

5. Prove that every infinite decimal representing a rational number is recurring (the converse ofTheorem13.3.4)andfurthermorethatifthefractioninlowesttermsrepresentingafractionisa/bthenthenumberofrecurringdigitsinitsdecimalrepresentationislessthanb.

[SeeExercise15.6.]

6.UsetheEuclideanalgorithmtofindthegreatestcommondivisorsof(i)165and252,(ii)4284and3480.

7.LetunbethenthFibonaccinumber(forthedefinitionseeDefinition5.4.2).ProvethattheEuclideanalgorithmtakespreciselynstepstoprovethatgcd(un+1,un)=1.

8. Suppose that a andb are two positive integerswith a b. Leta0,a1,…,an be the sequence ofintegersgeneratedbytheEuclideanalgorithmsothatan=gcd(a,b).Provebyinductiononkthatan−kuk+2whereumisthemthFibonaccinumber.Deducethatb un+1.

HenceproveLamé’stheorem:ifbhasrdecimaldigitsthenn 5r.

[Provethatlog10α>1/5where .]

9.Describeanalgorithmtooutputtheniunbersqandrinthedivisiontheorem(Theorem15.1.1)givenpositiveintegersaandb.

[Thediscussiononpage193mayhelp.]

10.IneachcaseofQuestion6writethegreatestcommondivisorasanintegrallinearcombinationofthetwonumbers.

11.Givenpositiveintegersaandb,supposethatapplyingtheEuclideanalgorithmleadstoasequenceofpositiveintegersa0,a1,…,aN.SupposethattheprocedureoftheproofofTheorem17.1.1leadstoexpressionsoftheform

Page 176: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

forintegersmkandnk.Provethatmknk−1−mk−1nk=(−1)kfor1 k N.Deducethatthenumbersmkandnkarecoprime.

12.WiththesamedataasinthepreviousquestionsupposethattheprocedureoftheproofofTheorem17.1.1iscontinuedforonemoresteptogive

ProvethattheintegersmN+1andnN+1determinethesolutionsetofthediophantineequationam+bn=0:

13.Theleastcommonmultipleoftwonon-zerointegersaandbistheuniquepositiveintegerm suchthat

(i)misacommonmultiple,i.e.adividesmandbdividesm,(ii)mislessthananyothercommonmultiple:

Wedenotetheleastcommonmultipleofaandbby[a,b]or1cm[a,b],Giveaproofbycontradictionthatifapositiveintegernisacommonmultipleofaandbthen[a,b]

dividesn.

[Usethedivisiontheorem.If[a,b]doesnotdividenthenn=[a,b]q+rwhere0<r< [a,b].Nowprovethatrisacommonmultipleofaandb.}

Thismeansthatab/[a,b]isaninteger.Provethatthisintegerisacommondivisorofaandb.Deducethatab/[a,b] (a,b),thegreatestcommondivisorofaandb.

Provethatab/(a,b)isacommonmultipleofaandb.Deducethat(a,b)[a,b]=ab ifaandbarepositive.

Hencefindlcm[612,696].

14. Let a and b be positive integers. By the well-ordering principle the non-empty set of positiveintegers

hasaminimumelementc.ProvebycontradictionthatcisacommondivisorofaandbandhencegiveanalternativeproofofTheorem17.1.1.

15.Solvethelineardiophantineequations

16.Solvethelineardiophantineequation

Prove that there is a unique pair of positive integersm and n satisfying this equation and find thissolution.

Page 177: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

17.Findallpositiveintegerswhichsatisfythediophantineequation

18.Solvethelineardiophantineequation

19.Provethatif therearenonon-zerointegersolutionstotheequationxn+yn=zn thentherearenonon-zerorationalsolutions.

[Provethecontrapositive:showhowarationalsolutionleadstoanintegersolution.]

Page 178: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartVModulararithmetic

Page 179: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

19Congruenceofintegers

Oneof themost useful distinctions amongst the integers is that between even andoddnumbers.Wehavealreadyseenanumberofmathematicalargumentswhichmakeuseofthis.Thedistinctionbetweenthesetwotypesofnumbercanbeexpressedintermsoftheremainderwhenthenumberisdividedby2:theremainderis0inthecaseofanevennumberand1foranoddnumber.Theideaofcongruenceisageneralization of this: we classify integers according to the remainder after division by some fixedpositiveinteger,notnecessarily2.

Tobemoreprecise,supposethatmisapositiveinteger.Twointegersaandbarecongruentmodulomiftheyhavethesameremainderafterdivisionbym.Thisdividestheintegersintomdifferentsubsetseachconsistingofthesetofintegershavingacertainremainder.ThesesubsetsarecalledcongruenceclassesofintegersandtheywillbeinvestigatedmorefullyinChapter21.

Thisideaisfamiliartoeveryoneinthemeasurementoftime.Forexamplewhenweusethedaysoftheweekwearecountingdaysmodulo7.MostcalendarslistdaysincolumnswiththeSundaysinthefirst column, theMondays in the second and so on up to theSaturdays in the seventh column.Thismeansthattwodaysareinthesamecolumnifandonlyiftheyareonthesamedayoftheweeksothatwhenwecountthedayssuccessivelyfromsomefixedstartingpointthenthenumbersofthetwodaysare congruentmodulo 7. Thus the columns form the congruence classes.Many of our activities aredeterminedbywhich column a day lies in, by the day of theweek: think of timetables (of trains orlectures)andshopopeninghours.

As an illustration, 1 January 1998 is a Thursday. If we want to find the day of the week of 6September1998thenwecalculatewhatdayoftheyearitis:31×5+30×2+28×1+6=155+60+28+6=249.Applyingthedivisiontheorem,249=7×35+4.Hence249iscongruentmodulo7to4so that6September1998 is thesamedayof theweekas thefourthdayof theyear,4January1998,namelySunday.Wewillseeshortlyhowtosimplifythiscalculation.

19.1BasicdefinitionsIt is convenient to phrase the formal definition of congruence in a slightly different way from thatdescribedabove.Thisformulationofthedefinitionusesonlytheideaofdivisibilityanddoesnotrelyonthedivisiontheorem.

Definition19.1.1Twointegersaandbare whena−b isdivisiblebym, i.e. there

Page 180: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

exists an integer q such that a − b =mq.Wewrite . If themodulusm is clearwemaysometimesomititandjustwritea≡b.

This definition (and the notation )was introduced by theGermanmathematicianCarl PriedrichGauss inhisbookDisquisitionesarithmeticae published in1801whenhewasonly24.Thisbook isconsidered to have laid the foundations of modern number theory. It is available in an Englishtranslation†andisbeautifullywrittenandreadilyunderstoodbyamodernreader.

Toillustratethedefinitionobservethat14 2mod3since14−2=12=3×4,and14 −10mod3since14−(−10)=24=3×8.Ontheotherhand,14 1mod3since14−1=13isnotamultipleof3.Givenanytwointegerstheyarecongruentmodulo1sinceeveryintegerisdivisibleby1.Becauseofthisitisusualtotakem>1.

Noticethata=0modmisanotherwayofsayingthatmdividesa,orequivalentlyaisamultipleofm.

Therelationofcongruencehasmanypropertieswhicharesimilartothoseofequality.

Proposition19.1.2(i)Reflexiveproperty.Forallintegersa,a amodm.(ii)Symmetricproperty.Ifaandbareintegerssuchthata bmodm,thenb amodm.(iii)Transitiveproperty.Ifa,bandcareintegerssuchthata bmodmandb cmodm,thena c

modm.

Weusuallyusethesepropertieswithoutcomment.

Proof(i)Thisisimmediatesincea−a=0=m×0.

(ii)Ifa bmodm,thenmdivides(a−b)andsoa−b=mqforsomeq .Butthenb−a=−mq=m×(−q)sothatmdivides(b−a),i.e.b amodm.

(iii)Ifa bmodmthena−b=mq1forsomeq1 .Similarlyb cmodm b−c=mq2forsomeq2.Butthena−c=(a−b)+(b−c)=mq1+mq2=m(q1+q2)andso,sinceq1+q2 ,mdividesa−c,i.e.a cmodm.

Therealpowerofthenotionofcongruencearisesfromthefactthatitrespectsthebasicoperationsofarithmetic,addition,subtractionandmultiplication,asfollows.

Proposition19.1.3(Modulararithmetic)Supposethata1,a2,b1andb2areintegerssuchthata1 a2modmandb1 b2modm.Then

(i)a1+b1=a2+b2modm,(ii)a1−b1 a2−b2modm,(iii)a1b1 a2b2modm.

ProofSupposethata1−a2=mq1andb1−b2=mq2.Thenwehavethefollowing.

(i)(a1+b1)−(a2+b2)=(a1−a2)+(b1−b2)=mq1+mq2=m(q1+q2).Thereforemdivides[(a1+b1)−(a2+b2)],i.e.a1+b1 a2+b2modmasrequired.

(ii)Leftasanexercise(Exercise19.2).

(iii)Sincea1=a2+mq1andb1=b2+mq2,a1b1=(a2+mq1)(b2+mq2=a2b2+a2mq2+mq1b2+m2q1q2

Page 181: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

=a2b2+m(a2q2+q1b2+mq1q2).Hencea1b1−a2b2=m(a2q2+q1b2+mq1q2)sothata1b1−a2b2 isdivisiblebym,i.e.a1b1 a2b2modm.

Thisresultmeansthatifweconsidertwointegerstobeinterchangeableiftheyarecongruentthenasfarasaddition,subtractionandmultiplicationareconcernednoproblemswillarise.Division ismorecomplicatedandwewillbegintolookatthisattheendofthischapter.

Modular arithmetic leads to chains of congruences just as ordinary arithmetic leads to chains ofequalities.

Examples19.1.4(a)Workingmodulo5,97 2since97−2=95=5×19and144 4since144−4=140=5×28.Hence973+1442 23+42 8+16.Butnow8 3and16 1andso8+16 3+1 4.Theconclusionisthat973+1442 4mod5.

(b)Foralln 1,4n+5 1n+2 1+2 0mod3so that3divides4n+5.ThisprovidesamuchsimplerproofoftheresultofProblemsI,Question12.

(c)Thecalculation in the introduction to this chapter leading to thedayof theweekof6September1998canbemuchsimplifiedusingmodulararithmetic.Thedayoftheyearof6September1998is31×5+30×2+28×1+6 3×5+2×2+0×1+6=15+4+6=25 4mod7.Hencethedayoftheweekisthesameasthatof4January1998,namelySunday.

19.2TheremaindermapWehadbetternowconfirmthattheideausedtomotivatetheconceptofcongruenceintheintroductionto thischapterdoesagreewith theformaldefinition.Therewestated that two integersarecongruentmodulomiftheyleadtothesameremainderafterdivisionbym.

Definition19.2.1Thesetofintegers

iscalledthesetof or,altentatively,thesetofresiduesmodulom.

Proposition19.2.2Givenanintegera,thereisauniquer Rmsuchthata rmodm.

ProofThisisanimmediateconsequenceofthedivisiontheorem(Theorem15.1.1)sincea rmodmifandonlyifa=mq+rforsomeintegerq.

Definition19.2.3Wedefine by

Thisiswell-definedbyProposition19.2.2.

Noticethatsinceweareheregivingaconditionaldefinitionofthevaluesofafunctionitisnecessaryto confirm that the condition determines a unique element of the codomain for each element of thedomain.Thisiswhatismeantbytheassertionthatthefunctionis‘well-defined’.

IntermsofthisnotationwecanstatetheequivalenceofthedefinitionofcongruenceinDefinition19.1.1andtheideaofcongruencediscussedintheintroductionasfollows.

Page 182: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Proposition19.2.4Twointegersaandbarecongruentmodulomifandonlyifrm(a)=rm(b).

ProofSupposethatrm(a)=r′andrm(b)=r″.

‘ ’:Bydefinitionofrm,a r′modmandb r″modm.Henceifr′=r″thena r′ r″ bmodmsothata bmodm.

‘ ’:Similarly,ifa=bmodmthenr′ a b r″modmsothatr′ r″modm.Butclearlyr′ r′modm.Hence,bytheuniquenesspartofProposition19.2.2,r′=r″.

Thelaststepinthisproofisanexampleofhowuniquenessresultsareoftenused:giventhatthereisonlyoneobjectwithsomeproperty,ifyouknowthattwoobjectshavethispropertythentheymustbeequal.

We now illustrate how the language of congruence can simplify the presentation of some earlierproofs.

Example 19.2.5 Prove that, for an integer a, a is even if and only if a2 is even. [Exercise 3.3 andProblemsI,Question7]

SolutionAn integern is even if and only ifn 0mod 2. The set of least non-negative remaindersmodulo2isjustR2={0,1}andson 0mod2ifandonlyifn 1mod2.Frommodulararithmetic,

Thecontrapositiveofthesecondstatementis

Hencea 0mod2 a2 0mod2,i.e.aisevenifandonlyifa2iseven.

Example19.2.6Provethattheredonotexistintegersaandbsuchthata2+b2=1234567.[ProblemsIV,Question1]

Solution The set of remainders modulo 4,R4, is {0,1,2,3} and so workingmodulo 4 we have fourpossibilitiestoconsider.Frommodulararithmetic,

Thusforanya ,a2=0or1mod4.Thereforegiventwointegersaandb,a2+b2 0or1or2mod4,i.e.a2+b2 3mod4.

Supposenowforcontradiction thataandbare integerssuch thata2+b2=1234567.Then, since1234567 3mod4,wehavea2+b2 3mod4givingtherequiredcontradiction.Hencesuchintegerscannotexist.

Inneithercase is thisessentiallyanewproof. It is just that thecongruencenotationsimplifies thepresentation of the old proof. This demonstrates one way in which introducing a new concept likecongruenceisuseful:ithelpstosimplifyandunifyearlierarguments.However,evenmoreimportantly,

Page 183: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

whenwebecomefamiliarwiththenewconceptitcanthenleadtonewideas;thefinalchapterofthebook will include some proofs which seem to arise from a good understanding of the concept ofcongruence.

19.3DivisionincongruencesIn stating Proposition 19.1.3 we observed that congruences work well with respect to addition,subtractionandmultiplication.However,morecareisneededwithdivision.

Asanillustrationobservethat30 2mod4.Ifnowwedividebothsidesby2weobtain15and1,whicharenotcongruentmodulo4;15 1mod4since15−1=14isnotdivisibleby4.Letuslookforwhathasgonewrong.Wehavethecongruence30 2mod4because30−2=4×7.Ifwedividethisequationby2weobtain15−1=4×(7/2)andwedonotgetacongruencemodulo4between15and1because7/2isnotaninteger.Wecan,however,write15−1=(4/2)×7=2×7whichshowsthatwedohaveacongruencemodulo2:15 1mod2.

This example showshowwedo divisionwhen the divisor also divides themodulus.The generalresultisasfollows.

Proposition19.3.1Supposethataisanintegerwhichdividesm(i.e.m/aisaninteger).Then

ProofFromthedefinitionofcongruence,ab1 ab2modm a(b1−b2)=mqforsomeq b1−b2=(m/a)qforsomeq b1 b2mod(m/a).[Noticethatwemakeuseofthefactthatm/aisanintegerwhenwewrite‘mod(m/a)’.]

Attheotherextreme,divisionbynumberswhicharecoprimetothemodulusisalsoeasy.

Proposition 19.3.2 Suppose that a is an integer such that a and m are coprime (i.e. the greatestcommondivisor(a,m)=1).Then

Proof‘ ’:ab1 ab2modm mdividesa(b1−b2) mdivides(b1−b2)[byTheorem17.3.2usingthefactthat(a,m)=1] b1=b2modm.‘ ’:ThisisaspecialcaseofProposition19.1.3(iii).

Divisioninordinaryarithmeticfirstariseswhenwetrytosolvethelinearequationax=b.Divisioninmodulararithmeticariseswhenwetrytosolvethelinearcongruenceax bmodm, inotherwordsseekallintegerswhichsatisfythiscongruence.

Wecangoquitealongwaybysimplyusingtheaboveresultsinturn.Weusethefirstuntilwerunoutofdivisorsofmandthenmoveontothesecond.

Example19.3.3Solvethecongruence4x 12mod14,i.e.findallintegersxsuchthat4x 12mod14.

SolutionWesimplysay

Thus4x 12mod14 x 3mod7.

Page 184: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Notice that as in solving equations it is important to have ‘ ’ in the conclusion. In this case thepredicate x 3 mod 7 provides a necessary and sufficient condition for an integer x to satisfy thecongruence.

Wenormallyleavethesolutioninthisformwhichprovidesaconditionaldescriptionofthesolutionset,S={x |x 3mod7}.Asanalternativewecouldgiveaconstructivedescriptionof thesetbyspellingoutthenotionofcongruencewhichgives4x 12mod14 x=3+7q forsomeq ; thisshowsthatthesolutionsetS={3+7q|q }.

However, thequestionwascouched in termsof themodulus14andso itmightbeappropriate togivethesolutionintermsofthismodulus.Ifweconsidertheelementsofthemodulo14remainderset,R14,weseethatforr R14,r 3mod7ifandonlyifr=3orr=10.Soweconcludethatx 3mod7ifandonlyifx 3mod14orx 10mod14.Thus4x 12mod14 x 3or10mod14.

Example19.3.4Solvethecongruence6x 15mod21.

SolutionThistimeweobtain

Hence6x 15mod21 x 6mod7.Sinceforr R21,r 6mod7 r=6,13or20,wecanstatethissolutionas6x 15mod21 x 6,13or20mod21.

Theadhocmethodsused in these twoexamplesareadequate forproblemsof this type involvingonlysmallnumbersbutifthenumbersarelargethensomethingmoresystematicisneeded.Inthenextchapterwewillconsiderageneralmethodforsolvinglinearcongruences.

Exercises19.1Whatdayoftheweekis6September2045?

19.2Provethata1 a2modmandb1 b2modm a1−b1 a2−b2modm.

19.3Supposethatapositiveintegeriswrittenindecimalnotationasn=akak−1…a2a1a0where0 ai9.Provethatnisdivisibleby3ifandonlyifthesumofitsdigitsak+ak−1+…+a1+a0isdivisibleby3.

19.4Solvethefollowingcongruences:

(i)6x 24mod45;(ii)10x 15mod45.

Statetheresultsintermsofthemodulus45.Describethesolutionsetswithoutusingthenotionofcongruence.

19.5Provethat

Page 185: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

[Here(a,m)denotesthegreatestcommondivisorofaandmwhichnecessarilydividesmsothatm/(a,m)isaninteger.]†C.F.Gauss,Disquisitionesarithmeticae(translatedbyA.A.Clarke),Springer-Verlag,1986.

Page 186: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

20Linearcongruences

Inthischapterwediscussthefollowingproblem.

Problem20.0.1Givenapositiveintegermandintegersaandb,solvethecongruence

i.e.findallintegersxwhichsatisfythiscongruence.

Such a problem is called a linear congruence and examples have already been considered in theprevious chapter. In this chapter we will discuss the general solution.Wewill make use of a closerelationshipbetweenthisproblemandthelineardiophantineequationproblemdiscussedinChapter18.

20.1AcriterionfortheexistenceofsolutionsWeconsideredsomeexamplesoflinearcongruencesinthepreviouschapter.Theresultsweusedtherewereasfollows.

Proposition19.3.1Ifadividesm,then

Proposition19.3.2If(a,m)=1,then

Theseresultsenableustodividethroughthelinearcongruenceax≡bmodmbycommonfactorsofaandb.ExamplesofthisweregiveninExample19.3.3andExample19.3.4.Thefirstresulttellsuswhattodoifthiscommonfactorisalsoafactorofthemodulusm.Anaturalquestionwhicharisesiswhathappens if a andm have a common factor which does not divide b. In fact this tells us that thecongruencehasnosolutionsatallaswewillnowexplainbeginningwithanexample.

Example20.1.1Provethatthelinearcongruence6x≡14mod21hasnosolutions.

Constructingaproof.Wecansummarizewhatisrequiredasfollows.

Page 187: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Sincethegoalhereisnegativeaproofbycontradictionissuggested.

Thisisnotadifficultargumenttoconstructoncewemakeuseofthedefinitionofcongruence.If6x≡14mod21then6x–14=21qforsomeintegerq.Hence14=6x–21q.Butnowourworkonlineardiophantineequationsenablesustoseeimmediatelyhowtoobtainacontradictionusingdivisibilityby3forwecanrewritethisequationas14=3(2x–7q)implyingthat3divides14whichiscertainlynotthecaseandsogivesthenecessarycontradiction.

ThereadershouldwriteoutthisargumentasaformalproofbycontradictionusingthetemplateofChapter4.

Theideausedinthisexamplemaybestatedgenerallyasfollows.

Proposition20.1.2Letaandbbeintegers.Ifthereexistsacommondivisorofaandmwhichdoesnotdivideb,thenthelinearcongruenceax=bmodmhasnosolutions.

Theproofofthisresultisbycontradictionfollowingthepatternofthepreviousexample.

Proof Suppose that c is a common divisor of a and m which does not divide b. Suppose forcontradictionthatthereisanintegerx0whichisasolutiontothecongruence,i.e.ax0≡bmodm.Thenax0–b=mqforsomeq .Henceb–ax0–mq.Butcdividesasothata=ca1forsomea1 and,sincecdividesm,m=cm1forsomem1 .Henceb=ax0–mq=ca1x0–cm1q=c(a1x0–m1q)sothatcdividesbcontradictingthegivenstatementthatcdoesnotdivideb.Henceourassumptionmustbefalseandsothereisnointegersolutiontoax≡bmodm.□

Example20.1.3Provethatthelinearcongruence

hasnosolutions.

SolutionTherearenosolutionsbecause3isacommondivisorof12468and48732butdoesnotdivide34567.[UseExercise19.3.]

Wewould likeacriterion for theexistenceof solutions, inotherwordsanecessaryandsufficientcondition.Proposition20.1.2providesuswithanecessarycondition: if there isasolution theneverycommondivisorofaandmmustdivideb.This is in factanecessaryandsufficientconditionbut inorder to state an efficient criterion it is useful to restate the proposition in amore specificway: thereferenceto‘everycommondivisor’suggeststhatthereisalottocheck.RecallthatbyCorollary17.2.1all the commondivisorsofaandm divide thegreatest commondivisor gcd(a,m). So the necessaryconditionforsolutionsgiveninProposition20.1.2canbeentirelycapturedbyconsideringdivisibilitybythegreatestcommondivisor.

Corollary20.1.4Anecessaryconditionfortheexistenceofsolutionsof thelinearcongruenceax=bmodmisthatthegreatestcommondivisorgcd(a,m)dividesb.

ProofThisisjustaspecialcaseofthepropositionfor,bydefinitionofthegreatestcommondivisor,(a,m)dividesaand(a,m)dividesm.

Page 188: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

TheconditioninCorollary20.1.4isalsosufficientfortheexistenceofsolutions.Thekeytoprovingthisisthespecialcasewhenaandmarecoprime,inwhichcase,sincegcd(a,m)–1,theconditionisautomaticallysatisfied.

Theorem20.1.5Letmbeapositiveinteger.Supposethataandbareintegerssuchthataandmarecoprime.Thenthelinearcongruence

hasasolution.Thissolutionisuniqueuptocongruencemodulom.

Wewilldefertheproofofthisresult tothenextsection.Toseethesignificanceoftheuniquenesspart of this theorem observe that if x0 is a solution of the linear congruence then so is any integercongruenttox0for,bymodulararithmetic,ifx≡x0modmthenax≡ax0modm.Themeaningofthestatementthatthesolutionisuniquemodulomisthatthesearetheonlysolutions:givenanysolution,x0, an integer x is a solution if and only if it is congruent to x0. This is illustrated in the followingexamples.

Examples20.1.6(a)InExample19.3.4itwasobservedthat2x≡5mod7 x=6mod7.(b)InSolution19.4(ii)itwasobservedthat2x≡3mod9 x≡6mod9.(c)Thelinearcongruence3x=8mod11hasauniquesolutionmodulo11bythetheorem.TofindthesolutionwemaysimplytryinturntheelementsR11.Thefollowingtableliststhevaluesofr11(3x).

Fromthisweseethat3x=8mod11 x≡10mod11.Inthiscaseitmighthavebeenquickertoobservethat8≡–3mod11sothat3x=8mod11 3x≡–

3mod11 x≡–1mod11(since3and11arecoprime) x≡10mod11.

(d)Considerthelinearcongruence290x=5mod357.Applying theEuclidean algorithmwediscover that 290 and357 are coprime and so according to

Theorem20.1.5thiscongruencehasauniquesolutionmodulo357.Itisabitdauntingtogothroughallthepossibilitiesanditisalsohardertoseeanytrickswiththeselargernumbers.Forthissortofexampleweneedsomethingwhichissystematicbutismoreefficient.SuchamethodwillbeconsideredinthenextsectionandwillprovideamethodforprovingTheorem20.1.5.

(e)InExample19.3.3itwasprovedthat4x≡12mod14 x≡3orx≡10mod14.Inthiscasea=4andm=14arenotcoprimeandthesolutionisnotuniquemodulo14:therearetwosolutionsmodulo14.

IfweputtogetherTheorem20.1.5,Proposition19.3.1andCorollary20.1.4weobtainthefollowingresultwhichprovidesthedesiredcriterionfortheexistenceofsolutionstoalinearcongruenceandalsoameasureofhowmanysolutionsthereare.

Theorem20.1.7Thelinearcongruenceax≡bmodmhasasolutionifandonlyifthegreatestcommondivisor(a,m)dividesb.Inthiscasethenumberofdifferentsolutionsmodulomisgcd(a,m).

Constructingaproof.Theproofthatthedivisibilitycriterionisnecessaryandsufficientfollowseasilyfrompreviouslystatedresults.

InordertounderstandtheresultaboutthenumberofsolutionsthereadermayfinditusefultolookbacktoExample19.3.4whichillustratesit.Therewefoundthatthecongruence6x≡15mod21hasauniquesolutionmodulo7,namelyx≡6mod7.Toobtainaresultformulatedintermsofthemodulus

Page 189: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

21weobservedthattheremaindersmodulo21whicharecongruentto6modulo7are6+7qforq=0,1and2,i.e.6,13and20.Thesameideaworksingeneral.

ProofThenecessityofthedivisibilityconditionisCorollary20.1.4.Forsufficiencysupposethatgcd(a,m)dividesb.Thensince(a,m)dividesaandm

byProposition19.3.1.Nowthenumbersa/(a,m)andm/(a,m)arecoprime(Exercise11.4)andsobyTheorem20.1.5thiscongruencehasa(unique)solutionmodulom/(a,m)andsocertainlyasolution.

Nowwedeterminethenumberofincongruentsolutions.Putm1=m/(a,m),anintegersince(a,m)dividesm.Supposethattheuniquesolutiontothelinearcongruencemodulomiisrepresentedbyr1Rm1sothatanintegerxisasolutionifandonlyifx≡r1modm.Supposethatanintegerxiscongruentmodulomtor Rm.Thenxisasolutionifandonlyifr≡r1modm1.Thismeansthatr=r1+m1q.Nowr Rm 0 r m r1+m1q m1(a,m) 0 q (a,m).Soxisasolutionifandonlyifx≡r1+m1qmodmfor0 q (a,m),givingtherequired(a,m)solutionsmodulom.

20.2LinearcongruencesanddiophantineequationsWenowpresentasystematicmethodoffindingthesolutionsofalinearcongruencewhichwillenableustoproveTheorem20.1.5.Thekeyideaistorelatelinearcongruencestolineardiophantineequations.

Letusgobacktothedefinitionofcongruencemodulom.Recallthatax≡bmodmifandonlyifb–axisamultipleofmwhichmeansthatthereissomeinteger,sayy,suchthatb–ax=my,i.e.ax+my=b.Thismeansthatsolvingthelinearcongruenceax=bmodmisequivalenttosolvingthediophantineequationax+my=b.

We can make this more precise in the following way. Notice that a solution to the diophantineequationax+my=bconsistsofanorderedpairofintegers(x0,y0)suchthatx=x0,y=y0satisfiestheequation.SowecanthinkofasolutionasbeinganelementoftheCartesianproduct × or 2.Thesolutionsetofthediophantineequationisthenthesubsetof 2givenby{(x,y) 2|ax+my=b}.Ofcourse,iftherearenosolutions,thenthisistheemptyset.

Similarly,thesolutionsetofthelinearcongruenceax≡bmodmisthesubset{x |ax≡bmodm}oftheintegers.

Proposition20.2.1Forintegersa,b,andpositiveintegersm,thereisabijection

givenbyf(x,y)=x.

ProofSupposethatax0=bmodm.Then,for(x,y) 2suchthatax+my=b,f(x,y)=x0ifandonlyifx=x0whichmeansthaty=(b–ax0)/m).[Noticethat(b–ax0)/m sinceax0≡bmodm.]Thismeansthatx0hastheuniquepre-image(x0,(b–ax0)/m)andsofisabijectionwithinversemapgivenbyg(x)=(x,(b–ax)/m).

In Chapter 18 a systematic way of finding solutions to linear diophantine equations using theEuclidean algorithmwasdescribed.Using the above correspondence this canbeused to solve linear

Page 190: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

congruences.

Example20.2.2Solvethelinearcongruence290x=5mod357.

SolutionWesolvethediophantineequation290x+357y=5.ApplyingtheEuclideanalgorithmwegetthefollowingsequenceofremainders.

Thus290and357arecoprimesothatthediophantineequationhasasolution.TofindasolutionweusetheEuclideanalgorithmtowrite1asanintegrallinearcombinationof290and357.

Thusasolutiontothediophantineequationisgivenbyx=(–16)×5=–80,y=13×5=65.Hencex=–80isasolutiontothelinearcongruence.

Finally,toseethatthisistheuniquesolutionmodulo357observethat

since290and357arecoprime(usingProposition19.3.2).Nowsince–80≡277mod357weconcludethat290x=5mod357ifandonlyifx≡277mod357.

(Itiscustomarytoexpressthesolutionintermsoftheleastnon-negativeremainders.)

IfweareonlyinterestedinsolvingthecongruencewecanworkwithcongruencesthroughoutintheEuclidean algorithm. For example we could set out the calculation in the above proof as followsworkingmodulo357.

Thus290x=5mod357ifx≡(−16)×5=−80≡277mod357.Theproofofuniquenessnowgoesasbefore.

Example20.2.3Solvethelinearcongruence255x≡15mod621.

Thisisanexamplewhereaandmarenotcoprime.However,themethodofworkingisverysimilartothepreviousexample.

SolutionApplyingtheEuclideanalgorithmto255and621givesthefollowingsequenceofremainders.

Page 191: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Sogcd(255,621)=3and,sincethisdivides15,solutionstothelinearcongruencewillexistaccordingtoTheorem20.1.7.TofindthemwewriteeachelementintheEuclideanalgorithminturnasamultipleof255modulo621.

Thus255x≡15mod621ifx≡−56×5=−280≡341mod621.Tofindallthesolutionsobservethat

since85and207arecoprime(aswehavedividedthroughby3,thegreatestcommondivisorof255and621).Ifdesiredwecanwritethesolutionsmodulo621as

This process can be reversed andwe can use techniques for solving linear congruences to solvelineardiophantineequations.

Example20.2.4 Solve the diophantine equation 140x + 63y = 35. [Thiswas considered in Example18.4.2.]

SolutionFromProposition20.2.1thereisabijection

givenby(x,y) x.However,

Substitutingbackintotheequationweseethatx=7+9q y=–15–20qandsothesolutionstothediophantineequationaregivenby(x,y)=(7+9q,–15–20q)forq , thesamesolutionsetaswasobtainedinExample18.4.2,butexpresseddifferently.

If the numbers are small this is usually the bestmethod of solving linear congruences and lineardiophantineequations.WhentheyarelargertheEuclideanalgorithmmethodisusuallybest.

Page 192: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

UsingtheideasoftheseexamplesitisnoweasytoderiveTheorem20.1.5frompreviousresultsonlineardiophantineequations.

Proof of Theorem 20.1.5 Suppose that a andm are coprime integers. Then by Theorem 18.2.1 thediophantineequationax+my=bhasasolution. It follows that thecongruenceax≡bmodmhasasolution.

Foruniquenessmodulom,supposethatasolutionisgivenbyx=x0.Thenax≡bmodm ax≡ax0modm x≡x0modmsinceaandmarecoprime(Proposition19.3.2).

Thenextchapterwillincludeanalternativeandverydifferentproofofthisresult.

Exercises20.1Solvethefollowinglinearcongruences:

(i)3x≡5mod11;(ii)10x≡16mod35;(iii)10x≡5mod35;(iv)10x≡13mod21.

20.2Solvethefollowinglinearcongruences:

(i)341x=15mod912;(ii)341x=15mod913;(iii)345x=15mod912.

20.3InterpretTheorem20.1.7inthecasewhena=0.

Page 193: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

21Congruenceclassesandthearithmeticofremainders

Thereaderwillbefamiliarwiththeideathatthesetofintegersisthedisjointunionoftwosubsets:thesetofevenintegersandthesetofoddintegers.Inthiscasetwointegerslieinthesamesubsetifandonlyiftheyarecongruentmodulo2.Inthesameway,givenanypositiveintegermwecandividethesetofintegersintomdisjointsubsets,calledthecongruenceclassesmodulom:twointegerslieinthesameclassifandonlyiftheyarecongruentmodulom.

Forsomepurposes,ratherthanusingcongruenceofintegersitismoreconvenienttouseequalityofcongruenceclassesofintegers.Thisisatypicalprocessofmathematicalabstraction:thesetofallevenintegers is a more abstract notion than an even integer. In principle everything that is said aboutcongruence classes can be reformulated in terms of congruent integers. However, as so often inmathematicstheprocessofabstractionisenormouslypowerfulbecauseofthewayinwhichitliberatesour thinking. In this case one benefit of working with congruence classes is that they are finite innumber so thatwe canmake use of counting arguments like the pigeonhole principle introduced inChapter11.Thepowerof thisapproachwillbe illustratedbygivinganalternativeproofofTheorem20.1.5whichdemonstratesthatfromanappropriatepointofviewtheresultisessentially‘obvious’.Afurther application with far-reaching results known as Fermat’s little theorem will be described inChapter24.

Anecessaryingredientofthisproofistheideaofaddingandmultiplyingcongruenceclasseswhichcan be thought of as describing an arithmetic of remainders. The idea ofworking in thisway usingcongruenceclassesaroseintheworkofRichardDedekind(whoseworkoninfinitesetswasreferredtoinChapter14)in1857.

21.1Congruenceclasses

Definition21.1.1Givenanintegera,the modulomisthesetofintegerswhichare

congruenttoamodulom.Wedenotethiscongruenceclassby Thus

Examples21.1.2(a)Inthecasewhenm=2,

Page 194: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thustherearejusttwocongruenceclassesmodulo2:thesetofallevenintegersandthesetofalloddintegers; thecongruenceclassofanevennumber is the setofall evennumbers, and thecongruenceclassofanoddnumberisthesetofalloddnumbers.(b)Inthecasewhenm=6,therearesixcongruenceclasses:

Ifwelisttheintegersinorderinrowsofsix–

–thenweseethatthesixcolumnsformthesixcongruenceclassesmodulo6.Theseexamplesdemonstratethatthemcongruenceclassesofintegersmodulomprovideapartition

of thesetof integers.This is formulatedprecisely in thenextresult.Thesignificanceof thisresult isthat,giventwointegersaandb,thecongruenceclasses[a]mand[b]mareeitherequalordisjoint.Hencethesetofintegersisthedisjointunionofthemcongruenceclassesmodulom.

Proposition21.1.3Forintegersa,b,

(i)a≡bmodm⇔[a]m=[b]m,(ii)a≢bmodm⇔[a]m∩[b]m=θ.

Thustwocongruenceclassesmodulomareeitherequalordisjoint

Constructingaproof.Noticethat,sincethecongruenceclasses[a]mand[b]maresubsetsofthesetofintegers,thestatementthat[a]m=[b]mistheassertionthattwosubsetsareequal:

orequivalently

Thestatementthat[a]m∩[b]m=θisanon-existencestatementanda≢bmodmisanegativestatementand therefore it is natural to attempt proofs by contradiction for both implications in part (ii) of theproposition.

Proof(i)‘⇒’:Supposethata≡bmodm.Thenx [a]m⇒x≡amodm⇒x≡bmodm(byProposition19.1.2(iii))⇒x [b]msothat[a]m⊆[b]m.Similarly,[b]m⊆[a]mandso[a]m=[b]m.‘⇐’:Supposethat[a]m=[b]m.Then,sincea [a]m,wehavea [b]msothata≡bmodm.

(ii)‘⇒’Supposethata≢bmodm.Supposealso,forcontradiction,that[a]m∩[b]m≠ .Thenwecanchoose x0 [a]m∪ [b]m. But then a ≡ x0 ≡ b mod m so that a ≡ b mod m contradicting our

Page 195: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

hypothesis.Henceourassumptionmustbefalseand[a]m∩[b]m= .’⇐’:Supposethat[a]m∪[b]m= and,forcontradiction,thata≡bmodm.Thena [a]m∪[b]mandso[a]m∪[b]m≠ givingtherequiredcontradiction.Hencea≢bmodm.

Thereadermayfindanalternativepictureofthecongruenceclassesmodulomuseful.Recallfrompage90 theboxmodel of a function.Theboxmodel of the remaindermap rm: →Rm (Definition19.2.3)maybepicturedasfollows.

Table21.1.4

Heretheboxesarelabelledbythemremainders0,1,2,…,m–1.Thecontentsoftheboxr Rmformtheset which is just thecongruenceclass [r]m.Thus thispictureshows thepartitionofthesetofintegers intothemcongruenceclassesmodulom,generalizingthepictureform=6attheendofExample21.1.2(b)orthelayoutofacalendarinthecasem=7.Forageneralintegera,thecongruenceclass[a]misequalto[r]mifandonlyifrm(a)=r.

Definition21.1.5Wewrite forthesetofcongruenceclassesmodulom.

Noticethatanelementoftheset misasubsetofthesetofintegers.

Proposition21.1.6Thesetofcongruenceclassesmodulom, m,isafinitesetofcardinalitym.Themelementsaregivenby[r]mforintegersrsuchthat0 r<m.

Constructingaproof.Wecan simplycount theboxes in theabovepicture. Ifwework from left torightthenwegetthefunctiongiveninthefollowingproof.ProofWemaydefineabijectionf: – mbyf(i)=[i–1]m.Thisisabijectionbecauseithasaninversegivenbyg([a]m)=rm(a)+1.

Thismeansthat

Thereadershouldconsiderwhatisinvolvedintheassertionsthatthisfunctiongiswell-definedandisaninversetof–seeExercise21.6.

21.2ThearithmeticofcongruenceclassesThereaderisprobablyfamiliarwiththefollowingpropertiesoftheadditionandmultiplicationofeven

Page 196: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

andoddintegers.

Thesetablesdescribethewayoddandevenintegersbehaveunderadditionandmultiplication.Wecanseethemasawayofaddingandmultiplyingcongruenceclassesmodulo2,adescriptionofarithmeticintheset 2asfollows.

Thefirsttabledescribeshowtheparity(congruenceclassmodulo2)ofintegersaandbdeterminestheparityoftheirsuma+bandthesecondgivesthesameinformationfortheproduct.Wecanthinkofthisasdefiningadditionandmultiplicationintheset 2.

We are nowgoing to consider arithmetic in the set of congruence classes m.Remember that theelementsofthissetaresubsetsoftheintegers,themsubsetsformingthecolumnsinTable21.1.4.Todoarithmeticweneed toknowhowtoaddandmultiply twocolumns together.Themethodused toaddtwocolumnsistochooseanyelementfromeachcolumn,addtheelementsandlookwhichcolumntheresultliesin.Itturnsoutthatwhateverchoicesaremadetheirsumwilllieinthesamecolumnandsowe can define the resulting column as the sum of the two columns to be added. The definition ofsubtractionandmultiplicationissimilar.Hereistheformaldefinition.

Definition21.2.1 ofelementsof maredefinedby

Proposition21.2.2Addition,subtractionandmultiplicationin marewell-defined.

Letusillustratethisinthecaseofmultiplicationin 8.Theeightcongruenceclassesmodulo8aregivenbythecolumnsinthefollowingpicture.

Wecandescribethethirdcolumnas[2]8oras[10]8.Wecandescribetheeighthcolumnas[7]8oras[31]8.Multiplyingthefirstrepresentivesgives2×7=14whichliesintheseventhcolumn.Multiplyingthesecondrepresentativesgives10×31×310=8×8×1+6whichalsoliesintheseventhcolumn.

Page 197: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thereadermightliketoexperimentalittlemore:whateverelementsarechosenfromthethirdcolumnandtheeighthcolumntheirproductwilllieintheseventhcolumn.Thisiswhatismeantinthiscasebyassertingthatthedefinitionofmultiplicationiswell-defined.

Thisprocedureleadstothefollowingmultiplicationtableinwhichasusualcongruenceclassesarerepresentedbytheleastnon-negativeremaindersmodulo8.

ConstructingaproofofProposition21.2.2.Wheneveradefinitioninvolveschoicesitisnecessarytocheckthattheoutcomeisindependentofthechoice.Weindicatetheproofformultiplicationandleavetheproofsforadditionandsubtractionasexercises(seeExercise21.1).Toprovethatmultiplicationiswell-defineditisnecessarytodemonstratethat

UsingProposition21.1.3thiscanberewritten

ThisisoneofthepartsofProposition19.1.3andsotheresultholds.

Notice that addition and multiplication in m inherit the good properties of addition andmultiplication in the integers described in Properties 2.3.1: they are commutative, associative andmultiplicationisdistributiveoveraddition.Noticealsothattheelement[0]mplaystherôleof0inthisarithmeticsinceitisanadditiveidentity:

Inthesamewaytheelement[1]mplaystherôleof1sinceitisamultiplicativeidentity:

21.3ThearithmeticofremaindersItispossibletoviewthearithmeticofcongruenceclassesinaslightlydifferentwaywhichthereadermayfindmoreacceptable–asthearithmeticofremainders.Considerthefollowingdefinitions.

Definition21.3.1 ofelementsofRmaredefinedby

Page 198: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

fora,b Rm.

Thustoperformadditionofremainders,forexample,wesimplyperformordinaryadditionandthentaketheremaindermodulom.

WecanthenwriteoutadditionandmultiplicationtablesforRm.Forexampleinthecaseofm=10wegetthefollowingmultiplicationtable.

Arithmeticmodulo10isveryfamiliarsincetheremainderofapositiveintegermodulo10issimplythelast(right-hand)digitwhenitiswrittenintheusualdecimalnotation.

Itiseasytoseetherelationshipbetweenthisremainderarithmeticandthearithmeticofcongruences.Ifwerepresentthecongruenceclassesmodulomas[a]mfora RmasdescribedinProposition21.1.6thenthereisacompletecorrespondence.

Proposition21.3.2Foraandb Rm,

This shows that the tables foraddition, subtractionandmultiplication in m canbeobtained fromthoseforRm simplyby replacinga Rm by [a]m m. This provides an example of two isomorphicalgebraicstructures.Thereaderwillmeetthegeneralconceptofisomorphism(meaning‘sameform’)whengoingontostudyabstractalgebra.

ProofTheadditionresultfollowsimmediatelyfromthefactthata+b a+mbmodmandsimilarlyforsubtractionandmultiplication.(SeeExercise21.2.)

21.4LineardiophantineequationsTherearetwobigdifferencesbetweenarithmeticin morRmandarithmeticin .Firstly,thesetRm isfinite and sowecan always find all the solutions to equations simplyby tryingout thepossibilities.Secondly,divisionisratherdifferent.Intheintegers,theonlynumbersbywhichwecanalwaysdivide

Page 199: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

are1and–1.ButinRmthereareothernumberswhichwecanalwaysdivideby.Thesedifferencesmaybeillustratedbyrevisitingthelineardiophantineequationproblem.

Recallthemainresultguaranteeingtheexistenceofsolutions.

Theorem20.1.5Suppose that a and b are integers such that a andm are coprime. Then the linearcongruence

hasasolution.Thissolutionisuniqueuptocongruencemodulom.

Thisresultcanbereformulatedinthelanguageofcongruenceclassesasfollowssinceax=6modmifandonlyif[ax]m=[b]m.

Theorem21.4.1Supposethataandbareintegerssuchthataandmarecoprime.Thentheequation

hasasolutionin m.Thissolutionisunique.

This reformulationenablesus to illustrate thepowerof thecongruenceclass approach for, in thisformulation,sincethesetofcongruenceclassesisfiniteitispossibletogiveaproofusingacountingargument.

Constructing a proof. Let Row(a) be the set of elements in the row corresponding to [a]m in themultiplicationtablefor m.Noticethefollowing.

•Equation(21.2)hasasolutionifandonlyifthecongruenceclass[b]moccursinRow(a).•IftheelementsinRow(a)arealldistinct(sothattherearemofthem)thenRow(a)= m(andsocertainly[b]m Row(a)).[Thisisaconsequenceofthepigeonholeprinciple–seeExercise11.5.]

•TheelementsinRow(a)arealldistinctif(a,m)=1(byProposition19.3.2).

Thesethreestatementstakentogetherprovethatequation(21.2)hasasolutionifaandmarecoprime.Thedistinctnessoftheelementsintherowimpliesthatthesolutionisunique.

Inwritingouttheformalproofwegobacktothepigeonholeprinciple(Theorem11.1.2).Tousethisweneedafunctionbetweenfinitesets.

ProofDefineafunctionf: m– mbyf([x]m)=[a]m×[x]m.Now,byProposition19.3.2,since(a,m)=1,thefunctionfisaninjection,for

Wecannow see that it is a surjectionusing thepigeonholeprinciple (as inTheorem11.1.7). Forsupposeforcontradictionthatitisnotasurjection.Thenthereissomeelement[y0]m mwhichisnota

Page 200: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

valueoffandsofisaninjection m– m–{[y0]m}fromasetofcardinalitymtoasetofcardinalitym–1whichcontradictsthepigeonholeprinciple.Hencefisasurjectionandsoabijection.

Thus there is a unique element [x0]m m such that f([x0]m) = [b]m, i.e. such that [a]m × [x0]m =[b]m.

Notice that this proof is non-constructive, in otherwords it does not give ameans of finding thesolutionstothecongruencebutsimplyguaranteesthattheseexist.Thisisacommonfeatureofproofsinvolvingcountingarguments.Ofcoursesincethereareonlymcongruenceclassesmodulomwecantrytheminturnandthiswillinevitablyleadtothesolution.However,ifmislargethismaynotbeveryefficient;thentheEuclideanalgorithmmethoddescribedinthepreviouschaptercanbeused.

ThereadermayfeelthattheproofbasedontheEuclideanalgorithmispreferable,particularlysinceit does give an algorithm for finding the solution. However, it can be argued that the proof usingcongruenceclassesmakes it clearerwhy the result is true. In the endbothproofshave something toofferintheexplorationoftheideaofcongruence.Thisillustratesthewayinwhichaproofisnotsimplyalogicalargumentdemonstratingthataclaimistrue:agoodproofilluminatestherelationshipsbetweenthemathematicalideasinvolvedanddifferentproofscanprovidedifferentillumination.

Example21.4.2Ifwelookattherowcorrespondingto7inthemultiplicationtableforR10thenweseethateveryremaindermodulo10occurspreciselyonceinthisrow.Thismeansthatwecanalwaysdivideby7:theequation7×10x=bforb R10,orequivalentlytheequation[7]10×[x]10=[b]10,alwayshasauniquesolution.Ifweexamineforwhichrowsthisistruewefindthatitistherowscorrespondingto1,3,7,9andthesearepreciselytheelementsofR10whicharecoprimeto10.

Furthermorethesearetheonlyrowscontainingtheelement1.Wenowshowthatthisisalwaysthecase.Anelementiscalledinvertiblewhenthecorrespondingrowinthemultiplicationtablecontains1.

Definition21.4.3Theelement[a]m miscalled (ora isinvertiblemodulom)ifthereisanintegera′ suchthat[a]m×[a′]m=[1]m(orequivalentlyaa′ 1modm).[a′]m miscalledthe

of[a]mandwewrite .Alternatively,wesaythata′isan

Forexample,in 10theinvertibleelementsare[1]10,[3]10,[7]10and[9]10andtheinversesaregivenby([1]10)–1=[1]10,([3]10)–1=[7]10,([7]10)–1=[3]10and([9]10)–1=[9]10.

Proposition21.4.4Theintegeraisinvertiblemodulomifandonlyifeverylinearcongruenceax≡bmodmhasauniquesolutionmodulom.

Notice that thismeans thatRow(a)= m in themultiplication table for m: eachcongruenceclassoccurspreciselyonceintherow.Thisresultisanimmediateconsequenceofthenextresult.

Proposition21.4.5Supposethata′isaninverseofamodulom.Then

ProofSincea′isaninversemodulomofa,aa′=1modm.Thus

and

Page 201: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

asrequired.Noticethatthismeansthatoncewehavefoundaninversemodulomtoathenwecancomputethe

solutiontoanylinearcongruenceax≡bmodmbymultiplication.ThisisillustratedinExercise21.5.

Exercises21.1 Use Proposition 19.1.3 to confirm that addition and subtraction in m are well-defined byDefinition21.3.2.

21.2Provethata+mb≡a+bmodm,a–mb≡a–bmodmanda×mb=abmodm.[ThiswasusedintheproofofProposition21.3.2.]

21.3 Write down the multiplication table for R12. From the table identify the invertible elementsmodulo12andtheirinverses.

21.4Provethataisinvertiblemodulomifandonlyifaandmarecoprime.

21.5Provethat290isinvertiblemodulo357andfinditsinverse.Hencesolvethelinearcongruences:

(i)290x=2mod357;(ii)290x=5mod357;(iii)290x=355mod357.

21.6Provethatthefunctiong: m→NmusedintheproofofProposition21.1.6iswell-definedandaninversetothefunctionf.

Page 202: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

22Partitionsandequivalencerelations

In thepreviouschapterwesaw thatcongruenceof integerscanbeviewed in twoways:asa relationbetweencertainintegersandasapartitionofthesetofintegers.Thisisanexampleofaverygeneralconcept, known as an equivalence relation, which the reader will encounter frequently in moreadvancedpuremathematics.

An equivalence relation on a set corresponds to a partition of the set. In this chapter thiscorrespondenceisexplainedandanumberofexamplesdiscussed.

22.1PartitionsWesawinChapter21thattherelationofcongruencemodulompartitionsthesetofintegers intomdisjoint congruence classes (see Proposition 21.1.3). Let us make the notion of a partition of a setprecise.

Definition22.1.1LetXbeasetRecallthatthepowersetofX,denoted (X),isthesetofallsubsetsofX.A ofthesetXisasubset of (X),i.e.asetofsubsetsofX,suchthat

(i)thesubsetsin arenon-empty,i.e.A A ,(ii)thesubsetsin aredisjoint,i.e.

A1,A2 ,(A1 A2 A1 A2= ),(iii)thesubsetsin coverX: x X, A ,x A.

Examples22.1.2(a)ByProposition21.1.3,thesetofcongruenceclassesmodulom,

isapartitionof intomsubsets.(b)Asetofpeoplemaybepartitionedaccordingtotheyearoftheirbirth.(c)Apartitionoftheset 10isgivenby

(d)Apartitionoftheset isgivenby

(e)Thesetofsubsets

Page 203: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

isnotapartitionof 9sincetheelement5liesinbothsubsets.(f)Thesetofsubsets

isnotapartitionof 9sincetheelement5liesinneithersubset.

Wehave already seen that congruence classesmodulom are obtainedbypartitioning the integersaccordingtotheremainderafterdivisionbym.Itiscommontodescribeapartitionbymeansofsomeproperty of the elements such as the remainder after division bym which can be used for Example22.1.2(a),orthedateofbirthusedinExample22.1.2(b).Thisamountstopartitioningaccordingtothevalueofsomefunctionateachpoint.

Proposition22.1.3Letf:X→Ybeasurjection.ThenXmaybepartitionedaccordingtothevalueofthefunctionfgivingthepartition

RecallfromDefinition9.3.1that .

ProofTheproofofthisresultisimmediatefromthedefinitions:thesetsofthepartitionarenon-emptysincefisasurjection,theyaredisjointbecausethefunctionfiswell-defined,andtheycoverXbecausefhasavalueinYateachpointofX.

Examples22.1.4(a)Thepartitionoftheintegersbycongruenceclassesmodulomcorrespondstotheremaindermaprm: →RmdiscussedinChapter19.(b)ThepartitionoftheintegersofExample22.1.2(d)correspondstothefunction

definedby

22.2EquivalencerelationsTheideaofapartitiontakesasitsstartingpointthesettobepartitionedordividedup.Wecanviewthesameideafromthepointofviewoftheelements.Ifasetofpeopleisphysicallypartitionedintosubsetswithpossiblyeachsubsetputinaseparateroom,eachpersonmaynothaveagoodideaoftheoverallpicturebuttheyareabletoseewhoisinthesamesubsetasthemselvesbylookingroundtheroom.Apartitionofa setXdeterminesarelation on the set: twoelements are related if theyare in the samesubsetofthepartition.

ArelationonasetXisdeterminedbyapropertywhichmayormaynotbesatisfiedbyeachorderedpairofelementsoftheset.Ifanorderedpairofelementsaandbsatisfiesthepropertythenwesaythattheelementsarerelatedandwritea~btoindicatethis.Wewrite todenotethefactthattheorderedpair(a,b)doesnotsatisfythepropertyandsotheelementsarenotrelated.

Proposition22.2.1Supposethat isapartitionofthesetX.ThenwemaydefinearelationonthesetXasfollows.ForelementsaandbofX,aisrelatedtob,writtena~ b,ifandonlyifaandbbelongtothesamesubsetofthepartition.Thenthisrelationhasthefollowingproperties.(i)Reflexiveproperty.Foralla X,a~ a.

Page 204: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(ii)Symmetricproperty.IfaandbareelementsofXsuchthata~ b,thenb~ a.(iii)Transitiveproperty.Ifa,bandcareelementsofXsuchthata~ bandb~ c,thena~ c.This resultshouldbecomparedwithProposition19.1.2.Startingfromthepartitionof the integers

intocongruenceclassesmodulomweobtaintherelationofcongruencemodulom.ProofTherelationisclearlyreflexiveandsymmetric.Fortransitivity,supposethata~ bandb~ c.ThenaandbbelongtosomeA1 andbandcbelongtosomeA2 .Nowb A1 A2andso thesetwosubsetsarenotdisjoint.ThusA1=A2andsoa~ c.

A relation with these three properties is called an equivalence relation. In order to clarify thesignificanceofthepropertiesweconsideravarietyofrelations.

Examples22.2.2(a)Therelation‘ ’on thesetofintegers.(b)Therelation‘ ’on .(c)Therelation‘=’on .(d)Wecandefinearelationon bya~b ab 0.(e)Wecandefinearelationon bya~b ab=0.(f)Wecandefinearelationontheset ×( –{0})by(a1,b1)~(a2,b2) a1b2=a2b1.(g)Foreachpositiveintegerm,congruencemodulomdefinesarelationontheset .

We now consider the particular features of relations arising from a partition of a set described inProposition22.2.1.

Definition22.2.3Supposethat~isarelationonasetX.(i)Therelationissaidtobe when,forallx X,x~x.(ii)Therelationissaidtobe when,forallelementsx,yofX,x~y y~x.(iii)Therelationissaidtobe when,forallelementsx,y,zofX,x~yandy~z x~z.

An onthesetXisarelationwhichisreflexive,symmetricandtransitive.

Letuslookattheaboveexamples.

Examples22.2.4(a)Therelation‘ ’on isreflexive(since a ,a a),isnotsymmetric(since1 2but2 1)andistransitive(sincea bandb c a c).(b)Therelation‘ ’onZisnotreflexive(since1 1),isnotsymmetric(since1 2but2 1),andistransitive(a bandb c a c).(c)The relation ‘=’on is reflexive ( a ,a =a), is symmetric ( a,b ,a = b b =a) and istransitive( a,b,c ,a=bandb=c a=c).Thisisanequivalencerelation.(d)Therelationa~b ab>0on isnotreflexive(0 0since02=0 0),issymmetric(ab>0 ba>0)andistransitive(sinceab>0andbc>0 ab2c>0 ac>0).(e)Therelationa~b ab=0on isnotreflexive(1 1since12=1 0),issymmetric(sinceab=0ba=0)andisnottransitive(since1~0and0~1but1 1).

(f)Therelation(a1,b1)~(a2,b2) a1b2=a2b1on ×( –{0})isreflexive,symmetricandtransitive(since(a1,b1)~(a2,b2) a1/b1=a2/b2 )andsoanequivalencerelation.(g) Proposition 19.1.2 asserts that congruence modulo m is an equivalence relation on the set ofintegers.(h)Moregenerally,Proposition22.2.1assertsthattherelation~ arisingfromapartition ofthesetXisanequivalencerelation.Wewilldemonstrateinthenextsectionthateveryequivalencerelationarises

Page 205: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

fromapartition.

Noticethatthesepropertiesofarelationareuniversalstatementsandsotoprovethatonefailsitisonlynecessarytogiveasinglecounterexample.

22.3EquivalencerelationsandpartitionsWesawinChapter21thatthepartitionofthesetofintegersintocongruenceclassesmodulomarisesfromtherelationofcongruencemodulom(seeProposition21.1.3).Thisisaquitegeneralphenomenon.Anyequivalence relationona setX determines apartitionof the setX towhich it corresponds.TheconstructionofthepartitionisanimmediategeneralizationofProposition21.1.3.

Definition22.3.1Suppose that~ isanequivalencerelationonanonemptysetX.Foreacha Xwedefinethe tobethesetofelementsofXwhichareequivalenttoa.Wedenotethisclassby .Thus

Observe thateachequivalenceclass isasubsetofX.Wedenote thesetofallequivalenceclassesbyX/~,i.e.

This is a straightforward generalization of the idea of congruence class; when the equivalencerelationiscongruencemodulomonthesetofintegersthentheequivalenceclassesarethecongruenceclassesmodulom.WecannowgeneralizeProposition21.1.3anditsproof.

Theorem22.3.2Supposethat~isanequivalencerelationonthesetX.Then,fora,b X,

(i)a~b [a]=[b],(ii)a b [a] [b]= .

Proof(i)‘ ’:Supposethata~b.Thenx [a] x~a x~b(bytransitivity) x [b]sothat[a] [b].Similarly,sincea~b b~a(symmetry),[b] [a]andso[a]=[b].‘ ’:Supposethat[a]=[b].Then,sincea [a](byreflexivity),a [b]sothata~b.(ii)‘ ’Supposethata b.Supposeforcontradictionthat[a] [b] .Thenwecanchoosex0 [a] [b].Butthenx0~aandx0~b a~x0andx0~b(bysymmetry) a~b(bytransitivity)contradictingourhypothesis.Henceourassumptionmustbefalseand[a] [b]= .‘ ’:Supposethat[a] [b]= and,forcontradiction,thata~b.Thena [a](byreflexivity)anda [b](byassumption)sothata [a] [b]andso[a] [b] givingtherequiredcontradiction.Hencea b.

Corollary 22.3.3 Suppose that ~ is an equivalence relation on a nonempty set X. Then the set ofequivalenceclasses =X/~isapartitionofX.Therelationarisingfromthispartitionis~.

ProofThetheoremshowsthatdistinctequivalenceclassesaredisjoint.TheycoverXbecause,foreachxX,x [x](reflexivity).Theyarenon-emptybecausebydefinitionanequivalenceclassis[a]forsomea Xandagainreflexivityensuresthata [a].

Part(i)ofthetheoremisthestatementthat~isequalto~ therelationarisingfromthepartition.

Page 206: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ThisistheconversetoProposition22.2.1anddemonstratesthatthenotionsofanequivalencerelationonthesetXandapartitionofthesetXcorrespondandaresimplydifferentwaysofthinkingaboutthesameconcept.

WesawearlierthatasurjectionwithdomainXgivesrisetoapartitionofX.Asafinalresultinthischapterwereformulatethisintermsofequivalencerelations.

Proposition22.3.4Letf:X→Ybeasurjection.DefineanequivalencerelationonXbyx1~x2 f(x1)=f(x2).ThenthemapfinducesabisectionX/~→Yby[x] f(x).

ProofDefineF:X/~→Y byF{[x])= f(x) for eachx X.Wemust check that this function iswell-defined.Supposethatx1,x2 X.Then

ThefunctionFisasurjectionsincefisasurjection.Theproofthatitisinjectiveisasfollows.Supposethat[x1],[x2] X/~.Then

ThusFisabijection.

Example22.3.5Defineafunction–f: ×( –{0})→ byf(a,b)=a/b.Thenf(a1,b1)=f(a2,b2) a1/b1=a2/b2 a1b2=a2b1andsotheequivalencerelation~on × –{0}inducedbythefunctionfasinTheorem22.3.4istheequivalencerelationofExample22.2.2(f).ItfollowsthatthereisabijectionF:(×( –{0}))/~→ .

ThisformalizestherelationshipbetweenfractionsandrationalsdiscussedinChapter13.Thereweobserved that two fractionsa1/b1anda2/b2 represent the same rationalnumber if andonly ifa1b2 =a2b1,i.e.(a1,b1)~(a2,b2).Wecanthinkofthesetoffractionsas ×( –{0})with(a,b)writtenasa/b.

Now with hindsight we can see how to recast the material in Section 13.1 in the language ofequivalencerelations.Westartwiththeequivalencerelationontheset ×( –{0}):

Thenwedefinethesetofrationalnumberstobethesetofequivalenceclassesof ×( –{0})underthisequivalencerelation.Nowitcanbeseen that thenotation indicating that thefractiona/brepresents the rational q simply anticipated the notation q = [(a, b)] indicating that the pair (a, b)representstheequivalenceclassq.

Additionandmultiplicationofrationalnumbers(thatisequivalenceclasses)maynowbedefinedby

andasinProposition13.1.5theseoperationsarewell-defined.Thesetofintegersmaybeembeddedinthesetofrationalsbylettinga correspondto[(a,1)].Itis

nowpossibletocheckthattheabovedefinitionsofadditionandmultiplicationofrationalsextendthedefinitionsforintegersandsatisfyallthebasicalgebraicpropertiesofnumbersdiscussedinChapter2.It follows that [(0,6)] is theunique rational solution to theequationbx=a.Thenotionof inequalitybetweenintegerscanalsobeextendedtotherationals(seeProblemsIII,Question21).

Page 207: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Havingdonethiswecanagreetousethefractiona/btorepresenttheequivalenceclass[(a,b)]andsoobtaintheusualnotationfortherationalnumbers.

Exercises

22.1 For eachof the following relationson the setX determinewhether it is reflexive,whether it issymmetric and whether it is transitive. For those which are equivalence relations, describe theequivalenceclasses.

(i)ForX= ,puta~b +biseven.(ii)ForX= ,puta~b a+bisodd.(iii)ForX= ,puta~b a+bisdivisibleby3.(iv)ForX= ,puta~b a2=b2.(v)ForX={1,2},puta~b a=1andb=1.(vi)ForX={1,2},puta~b a=1orb=1.(vii)ForX= × ,(a1,a2)~(b1,b2) a1=b1.(viii)ForX= × ,(a1,a2)=(b1,b2) a12+a22=b12+b22.

22.2Describetheequivalencerelationon determinedbythepartition ={A,B,C}whereA= +,B=–andC={0}.

22.3Defineafunctionf: +× +→ byf(x1,x2)=x1–x2.Provethatthisisasurjection.Identifytheequivalenceclassesoftheequivalencerelationdefinedby(x1,x2)~(y1,y2) f(x1,x2)=f(y1,y2).

Page 208: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsV:Modulararithmetic

1.Prove,forpositiveintegersn,that7divides6n+1ifandonlyifnisodd.

2.Provethat,forallintegersaandb,a2+b2≡0,1,2,4or5modulo8.Deducethattheredonotexistintegersaandbsuchthata2+b2=12345790.

3.Supposethatapositiveintegeriswrittenindecimalnotationasn=akak-1…a2a1a0where0 ai 9.Provethatnisdivisibleby9ifandonlyifthesumofitsdigitsak+ak–1+…+a1+a0isdivisibleby9.

4.Supposethatapositiveintegeriswrittenindecimalnotationasn=akak–1…a2a1a0where0 ai 9.Provethatn isdivisibleby11ifandonlyif thealternatingsumofitsdigitsa0–ai+…+(–1)kak isdivisibleby11.

5.Findatestsimilartothoseinthepreviousquestionsfordivisibilityby99.

6. Prove that the diophantine equation 3x2 + 4y2 = 5z2 has no non-trivial (i.e. (x, y, z) (0,0,0))solutions.

[Giveaproofbycontradiction.Obtainacontradictionbyprovingthatifthereisanon-trivialsolutionthenthereisasolution(x1,y1,z1)withx1 0mod5ory1 0mod5.]

Deducethattheequation3x2+4y2=5hasnorationalsolutions.

7.Whatisthelastdigitof21000?

8.ProvethattheFibonaccinumberun(seeDefinition5.4.2)isdivisibleby3ifandonlyifnisdivisibleby4.

9.Solvethefollowinglinearcongruences:

(i)3x 15mod18;(ii)3x 16mod18;(iii)4x 16mod18;(iv)4x 14mod18.

10.Solvethefollowinglinearcongruences:

(i)23x 16mod107;(ii)234x 20mod366;(iii)234x 6mod366;(iv)234x 36mod366.

Page 209: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

11.UsingtheresultofQuestion10(iv),solvethediophantineequation

12.WritedownthemultiplicationtableforR15.Fromthetableidentifytheinvertibleelementsmodulo15andtheirinverses.

13.ProvethateachrowinthemultiplicationtableforRmeitherincludestheelement1orincludestheelement0morethanonce(butnotboth).

14.Usingacountingargument,provefromthemultiplicationtableforRmthat,foreachintegera,thereexistsanintegerb1suchthatax b1modmhasnosolutionifandonlyifthereexistsanintegerb2suchthatax b2modmhasmorethanonesolutionmodulom.

15.Provethat245isinvertiblemodulo666andfinditsinverse.Hencesolvethelinearcongruences:

(i)245x 3mod666;(ii)245x 656mod666.

16.Identifytheinvertibleelementsof 18andwritedowntheirinverses.

17. For each of the following relations on the setX determinewhether it is reflexive, whether it issymmetric and whether it is transitive. For those which are equivalence relations, describe theequivalenceclasses.

(i)ForX= ,puta~b ab 0.(ii)ForX= ,puta~b ab 0.(iii)ForX= +,puta~b ab 0.(iv)ForX= –{0},puta~b ab 0.(v)ForX= +,puta~b ab 0.(vi)ForX= –{0},puta~b ab 0.

18.Whichofthefollowingformulaedefinea(well-defined)function ?

(i)f(a/b)=a2/b2.(ii)f(a/b)=a2/b3.(iii)f(a/b)=b/a.(iv)f(a/b)=a+b.(v)f(a/b)=(a–b)/2b.

19.Whichofthefollowingformulaedefinea(well-defined)functionf: 6→ 4?

(i)f([a]6)=[a+1]4.(ii)f([a]6)=[2a]4.(iii)f([a]6)=[a2]4.

Page 210: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

PartVIPrimenumbers

Page 211: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

23Thesequenceofprimenumbers

Toconcludethisbookwenowspendsometimeexploringthetheoryofprimenumbers,oneofthemostfascinatingandoldestareasofnumbertheoryandoneinwhichsomeapparentlyverysimplequestionsstill remainunanswered. It is abranchofmathematicswhichuntil recently seemed remote fromanyapplicationsbutthishasnowchanged.Inthischapterweconsiderthesequenceofprimenumbersandfactorizationintoprimes.

23.1Definitionandbasicproperties

Definition23.1.1Apositiveintegernissaidtobe whenn 1andtheonlypositivedivisorsofnare1andn.Ifanintegern 1isnotprimethenitissaidtobe .

Thusn 1iscompositeifandonlyifitcanbewrittenasaproductn=abofintegersaandbsuchthat1 a nand1 b n.Ifaprimenumbern is theproductoftwopositiveintegers,n=ab, theneithera=1andb=nora=nandb=1.

Tosomeextentitisamatterofconventionwhetherwecallthenumber1primebutitisconvenientto exclude it for reasonswhichwill become clear in the next chapter.Thus the positive integers arepartitionedintothreesubsets:thesetofprimes,thesetofcomposites,andthesetofunits(whichjustconsistsof1).

Thefirstfewprimenumbersareasfollows:

Proposition23.1.2Everyintegergreaterthan1canbewrittenasaproductofprimenumbers.

Herewe think of a prime number as a product of a single prime number, namely itself!We canextendthisresulttoinclude1byadoptingtheconventionthattheproductofnonumbersatallisequalto1(rememberthatx0=1).

TheproofofProposition23.1.2 is theclassicexampleofaproofbystrong induction(seeSection5.4).

ProofTheproof isbyinduction.Weprovebystronginductiononn thestatement that, forn 2, thenumbernmaybewrittenasaproductofprimes.Basecase:2isaprimenumberandsoaproductofasingleprime.Inductivestep:Supposenowas inductivehypothesis that, forsomek 2, if2 n k thennmaybewrittenasaproductofprimes.Thenifthenumberk+1isprimeitisaproductofa(single)prime.If

Page 212: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

thenumberk+1isnotprimethenitiscompositeinwhichcasewecanwritek+1=abwhere2 a,bk.Butthenbyinductivehypothesisaandbmaybewrittenasproductsofprimessothatbycombiningtheseproductswewritek+1asaproductofprimes.Henceinbothcasesk+1isaproductofprimesasrequiredtoprovetheinductivestep.Conclusion:Hence,byinduction,nisaproductofprimesforalln 2.

The key property of prime numbers is the following result which appears in Book Seven of theElementsofEuclid.

Theorem23.1.3Supposethatpisaprimenumberandpdividesabforpositiveintegersaandb.Thenpdividesaorpdividesb.

Constructingaproof.Thisisanexampleofaresultwheretheconclusionisan‘or’statement.Whatisrequiredcanbesummarizedasfollows.

Recall fromSection4.4 thatweprovean ‘or’ statementbyproving that if the first statement is falsethenthesecondmustbetrue.Thisgivesthefollowingstrategy.

Thisiseasytoachieveoncewerecognizethat,whenpisprime,itsonlydivisorsare 1and pandsothesearetheonlycandidatesforcommondivisorsofpandanotherintegera.Soifwearetoldthatp(and so –p) does not divide a the only common divisors are 1 and so the numbers are coprime.Theorem17.3.2nowgivestheresult.

ProofSupposethatpdividesab.Nowifpdoesnotdivideathen,sincepisaprimenumber,pandaarecoprime. It follows fromTheorem17.3.2 thatp dividesb. Thus eitherp dividesa orp dividesb asrequired.

This property of prime numbers is usually taken as the definition of a prime number in moreadvanced work. Notice that if an integer n greater than 1 is not prime then it does not satisfy thisproperty.Fortherearethenintegersaandbsuchthat1 a,b nandn=ab.Butnowndividesabbutndoesnotdivideaandndoesnotdivideb.ThisshowsthatthepropertyofprimenumbersdescribedinTheorem23.1.3characterizesprimenumbersamongsttheintegersgreaterthan1.

23.2ThesieveofEratosthenesThe problem of determining whether or not a positive integer is prime and the factorization ofcompositenumbersintoprimeshasalwaysintriguedmathematicians.Recentlymethodsofpublic-keycryptography†havebeendiscoveredwhichmakeuseoftheproductoftwolargeprimes.Itisrelativelyeasytofindlargeprimenumbersbutif thentheyaremultipliedtogetherrecoveringtheprimefactors(whichaswewillseeinthenextsectionareunique)isanenormouslytimeconsumingtaskevenwiththe help of a computer and is impractical using known techniques if the prime numbers are largeenough.The codes are public in the sense that the knowledge of how to encode amessage ismadepublic. The coding technique uses remainders modulo a product of two large primes. To decode a

Page 213: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

message it is necessary tomakeuseof theprime factorswhich arenotmadepublic.So anyone canencodeamessagebutonlysomeoneknowingtheprimenumberscandecodeit.

In this book we restrict attention to a basic and ancient method for listing primes named afterEratosthenesofCyrene(ca.276–ca.194B.C.)whowasdirectorofthelibraryinAlexandria.

Themost obvious approach to decidingwhether a positive integern is prime is to try all smallerpositiveintegersonebyone.Ifnone(except1)dividesn thenitmustbeprime.Assoonasonedoesdividenthenweknowthatnmustbecomposite.Thistaskisshortenedoncewerealizethatwedonothavetotryeveryintegerlessthann.

Proposition23.2.1Ifn 2isacompositenumber,thenithasaprimefactornotexceeding .

ProofSinceniscompositewecanwriten=abwhereaandbareintegerssuchthat1 a,b n.Ifa ,thenwechooseaprimefactorofatoobtainaprimefactorofnwhichislessthanorequalto .On

theotherhand,ifa ,thenb=n/a< andsowecantakeaprimefactorofb.

Sotodecidewhethernisprimeorcompositeitissufficienttotryallprimenumbersnotexceeding.Wecanorganizethisintoasystematicmethodforfindingalltheprimenumbersnotexceedingsome

given number, an algorithm called the ‘Sieve of Eratosthenes’. The simplest way to explain thealgorithmistogiveahexample.

Example23.2.2Tofindallprimenumbersnotexceeding100.

Firstofallwriteoutthesequenceofintegersfrom2to100asfollows.

The first number in the list, thenumber2, is necessarilyprimebut allmultiplesof2 arenecessarilycompositesowecrossthemout.

Thenext of the remainingnumbers is 3,whichmust also be prime.Again, allmultiples of 3 arenecessarilycompositeandsowecrossoutthosewhichremain.

At each stage thenext remainingnumber isnecessarilyprime since allmultiplesof lowerprimeshavebeencrossedout.Wethencrossoutallmultiplesofthisnumber.Sohereweproceedto5andthen7.

Now, since therearenomoreprimesnotgreater than , thepositive integerswhich remainmustallbeprimebyProposition23.2.1andsowehavefoundalltheprimeslessthan100,namelythoseintegersnotcrossedoutbelow.

Page 214: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thustheprimeslessthan100are2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89and97(25inall).

23.3ThefundamentaltheoremofarithmeticWehaveshown(Proposition23.1.2)thateverypositiveintegergreaterthan1isprimeoraproductofprimes.Inthissectionitisdemonstratedthatthisfactorizationisessentiallyunique,aresultknownasthe fundamental theoremof arithmetic. It is a curiosity of history that, although all the results aboutprimenumbersprovedsofarareveryancient,thefundamentaltheoremisarelativelymoderntheoremanditsfirstclearstatementandproofonlyappearedinthenineteenthcenturyinGauss’sDisquisitionesarithmeticae.

Theorem23.3.1(Fundamentaltheoremofarithmetic)Everypositive integergreater than1canbewrittenuniquelyasaproductofprimenumberswith theprime factors in theproductwritten innon-decreasingorder.

Thepointofthefinalpartabouttheorderofthefactorsissimplythatingeneraltheexpressionasaproductofprimesisclearlynotuniquebecausewecanreorderthefactors.Forexamplewehave12=2×2×3=2×3×2=3×2×2givingthreewaysofwriting12asaproductofprimes.However,theseexpressions are obtained simply by reordering the factors and we can uniquely specify an order byrequiringthefactorstobeinnon-decreasingorder,inthiscasegivingthefirstexpression.

We can write the theorem more symbolically by saying that each in teger n 1 can be writtenuniquelyintheform

wherer 1,ki +andeachpiisaprimenumberwithp1 p2 … pr.Wecallthisthestandardprimefactorizationofn.Ifweallowr=0wecanincludethenumber1inthisbyadoptingtheconventionthatitis’theproductofnoprimenumbers.

Wehavealreadyprovedtheexistenceoftheprimefactorization(Proposition23.1.2)andsoourtasknowistoproveuniqueness.TodothiswegeneralizeTheoremTheorem23.1.3.

Proposition23.3.2Supposethatpisaprimenumberandpdividesaproductofpositiveintegersa1a2…am.Thenpdividesaiforsomeisuchthat1 i m.

ProofTheproofisbyinductiononm.Basecase:Form=1thisresultsayspdividesa1 pdividesa1whichiscertainlytrue.Inductivestep:Supposethat,forsomek 1,theresultistrueform=k.Thenwecandeduceitform=k+1asfollows.

Page 215: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thisprovestheinductivestep.Conclusion:Hencetheresultistrueforallpositiveintegersm.

ProofofTheorem23.3.1Wehavealreadyprovedthatfactorizationintoprimesispossible(Proposition23.1.2).Weproveuniquenessbycontradiction.Sosuppose,forcontradiction,thatthereissomeintegern 1whichhastwodifferentfactorizationsintoprimes:

wherethepiSandtheqjSareallprimesandp1 p2 … pr,q1 q2 … qs.Wecannowcancelanycommonprimesfromthetwofactorizationssothatwegetanequalityasabovewithpi qjforalliandj. [Notice that not all the primes will cancel since we were supposing that the factorizations weredifferent.]However, this contradicts Proposition23.3.2 since clearlyp1 dividesp1p2….pr and sop1divides q1q2… qs whereas p1 does not divide any qj since qj is prime and different from p1. Thiscontradictionshowsthatouroriginalhypothesisisfalseandsowehaveprovedthetheorem.

23.4ApplicationsofthefundamentaltheoremofarithmeticAdirectapplicationofthefundamentaltheoremofarithmeticistofindallthedivisorsofanumber.

Proposition23.4.1Supposethat isthestandardprimefactorizationofapositiveintegera.Thenbisadivisorofaifandonlyifitcanbewrittenintheform where0 li kifor1 ir.

Example23.4.2Thestandardprimefactorizationof72is72=23×32.Hencethedivisorsof72arewhere0 l1 3and0 l2 2.Thisgives20×30=1,21×30=2,22×30=4,23×30=8,20×31

=3,21×31=6,22×31=12,23×31=24,20×32=9,21×32=18,22×32=36and23×32=72.

ProofofProposition23.4.1Recallthatbisadivisorofaifandonlyifthereisanintegerqsuchthata=bq. Now the standard prime factorizations of b and q must combine to give the standard primefactorizationofa,bytheuniquenesspartofthefundamentaltheorem.Itisclearthenthatifa=bqthestandardprimefactorizationofbmustobtainedfromthestandardprime factorizationofabysimplyomittingsomefactors.Thusbhasthegivenform.

Converselyifbhasthegivenformthenbdividesasincewecantake .

Corollary 23.4.3Given positive integers a and b suppose that p1 p2 … pr are the primesoccurring in theprime factorizationof aor in theprime factorizationofb so that and

wherekiandliarenon-negativeintegers.Thenthegreatestcommondivisorofaandbisgivenby wheremiistheminimumofthetwonumberskiandli.

ProofThisisimmediatefromtheproposition.

Page 216: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Example23.4.4Considerthegreatestcommondivisor(72,30)(Example11.3.3).Thestandardprimefactorizationsare72=23×32=23×32×50,30=2×3×5=21×31×51.Hencethegreatestcommondivisoris21×31×50=6.

Itisimportanttorealizethatthisisnotapracticalwayoffindingthegreatestcommondivisoroftwonumbersofsubstantialsizesincefactorizationintoprimesisingeneralverytime-consuming.

Wecanalsousethefundamentaltheoremtogiveanalternativeproofoftheirrationalityof .

Theorem13.2.1Theredoesnotexistarationalnumberwhosesquareis2.

ProofThisproofisalsobycontradiction.Supposeforcontradictionthatthereisarationalnumberq suchthatq2=2.Sinceq2=(–q)2wemaysupposethatqispositive.Writeq–a/bwherea,b +.Thena2=2b2.Let2 p2 … prbetheprimesoccurringasfactorsofaorofb.Then and

where ki and li are non-negative integers. This means that and. But by the fundamental theorem these expressions must be the same and so in

particular2k1=2l1+1whichis impossiblefor integersk1andl1.Thisprovides thenecessarycontradiction demonstrating that our hypothesis that there exists a rational square root of 2 is false and soprovingthetheorem.

23.5ThedistributionofprimenumbersThesequenceofprimesisveryirregularanditisextrememlydifficulttoseeanypatterninit.Wecan,however,provethatthereareinfinitelymanyprimes.ThefollowingresultisalsofromtheElementsofEuclid(BookNine)andisoneofthegreatclassicproofsbycontradiction.

Theorem23.5.1Thereareinfinitelymanyprimenumbers.

ProofTheproofisbycontradiction.SupposeforcontradictionthatthesetPofprimesisfinite,sayofcardinalityn.ThenwecanlisttheelementsofP:

Nowconsiderthepositiveintegerm=p1p2…pn+1.Thisnumberisnotdivisiblebypifor1 i nsincetheremainderis1.But,byProposition23.1.2,mmaybewrittenasaproductofprimesandsoisdivisiblebysomeprimepwhichmustthennotbeanelementofP.However,Pwasthesetofallprimesandsothisisacontradictionshowingthatourassumptionthatthesetofprimesisfinitemustbefalse.Hencethesetofprimesmustbeinfinite.

IfwecarryonwiththeSieveofEratostheneswefindthatthenumberofprimesgraduallythinsout.Itisnaturaltoaskwhetheritispossibletogiveaformulaforthenthprimenumberorlessambitiouslyfor an estimate for the number of primes at each stage. Mathematicians carried out enormouscalculationsbyhandintheinvestigationofthedistributionofprimenumbers.Attemptsweremadetofindsimpleexpressionswhichtookprimevalues;forexampleLeonhardEulerprovedthatn2–n+41isprimefor1 n 40.Gaussinvestigatedthedistributionoftheprimesupto3000000andfound216745ofthem!Thereareinfact216817butafewslipswereinevitableinsuchanenormoushandcalculation.

Definition23.5.2Forn +wewrite forthenumberofprimesnotexceedingn.

Page 217: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thus (2)=1, (10)=4, (100)=25andcalculationshowsthat (1000)=168, (106)=78498.Oneofthemostremarkabletheoremsofthenineteenthcenturygivesanestimatefor (n)forlargevaluesofn.

Theorem23.5.3 (Primenumber theorem)The ratio of (n)and n/ logen approaches 1 as n growswithoutbound.

Here logen is thenatural logarithmofnwhich is theareaunder thegraphof the functionx 1/xbetweenx=1andx=n.

Thetheoremsaysthat (n)andn/logenareasymptotic.TheprecisestatementrequirestheideaofanullsequenceintroducedinDefinition8.3.2:itisthestatementthatthesequencen ( (n)logen)/n–1isnull.Thismeansthatn/logengivesagoodestimatefor (n)ifnislargeenough.Togetsomeideaofhowgoodanestimateconsiderthefollowingtable.†

The first person to suggest publicly that a result along these lines was true was the Frenchmathematician Adrien-Marie Legendre who suggested in 1798 that (n) is approximately equal ton/(logen – 1.08366) on the basis of extensive calculations. Gauss had already in 1793 reached theconclusionthat (n)isasymptoticton/logenaccordingtounpublishedworkfoundamongsthispapers.However,hefoundanevenbetterapproximation.Asaresultofhiscalculationsheestimatedthat the

numberofprimes in the interval froma tob is approximately .The agreement is striking: for

example between 2600000 and 2700000 Gauss found 6762 primes whereas . Hediscussesthisestimateinaletterhewrotein1849.‡

Theprimenumbertheoremwasfinallyprovedin1896independentlybytheFrenchmathematicianJacquesHadamard and by theBelgianmathematicianC.J. de laVallée-Poussinmaking use of ideasfrom advanced calculus.†. De la Vallée-Poussin showed in addition that (n) is more accurately

representedbythe‘logarithmicintegral’li(n)= (whichcanbegivenawell-definedvalueinspiteof the fact that loge 1 = 0) than by any expression of the form n/(logen–A) whereA is a constant,confirmingconjecturessuggestedbyGauss’scalculations.

Before leaving this topic it is worth remarking on a remarkable theorem proved the BritishmathematicianJ.E.Littlewood in1914.Heshowed that,althoughforallvaluesofn forwhich ithasbeencalculatedli(n)– (n)ispositive,thisdifferencetakespositiveandnegativevaluesinfinitelyoftenasnrunsthroughthepositiveintegers.Thisisanexampleofa‘pureexistence’resultandtheproofgavenoindicationatallhowtofindavalueofnforwhichthedifferenceisnegative.In1933,Littlewood’sstudentS.Skewesproved that therewasavalueofn forwhich thedifference isnegativebeforeyoureachexpexpexpexp79(usingtheexponentialfunctionexp(x)=ex inversetothenatural logarithmloge).Thisreducesthesearchfornforwhichthedifferenceisnegativetoafinitesearch-butillustrateshowknowingthata taskisfinitemaybenohelpatall incarryingitout.Thenumberarisinghere isnormallyconsideredtobelargerthananynumberwhichhadpreviouslyariseninapuremathematicalargument.SubsequentworkbySkewesin1955marginallyreducedthebound-toanumberwithabout1010

1000decimalplaces!

Page 218: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Exercises

23.1UsetheSieveofEratosthenestofindalltheprimenumberslessthan200.

23.2Write4148and7684asproductsofprimenumbers.Hencefindgcd(4148,7684).

23.3Provethatthereexistsanintegernsuchthatn2–n+41(Euler’sformula)isnotprime.

23.4Provethatforeachpositiveintegernthereisasequenceofnconsecutiveintegersallofwhicharecomposite.[Hint:Consider(n+1)!+i]

23.5Euler’stotientfunction : + +isdefinedbyputting (n)equaltothenumberofpositiveintegersnotexceedingnwhichareco-primeton.Provethatifpisprimethen (pk)=pk–pk–1.

23.6Usethemethodofproofofthischaptertoprovethattheredoesnotexistarationalnumberqsuchthatq3=2.

23.7Considerthesetofpositiveintegersoftheform4q+1.Noticethatthissetofnumbersisclosedundermultiplication.Callanelementnofthissetapseudo-primewhenn 1andtheonlydivisorsofninthissetare1andn.

Prove that every n 1 in the set can be written as a product of pseudo-primes but that thisfactorizationisnotalwaysunique.Sotheanalogueofthefundamentaltheoremofarithmeticisfalseinthissetofnumbers.†AccessibleaccountsofsomeofthebasicideasmaybefoundinD.M.Davis,Thenatureandpowerofmathematics,PrincetonUniversityPress,1993,andJ.F.HumphreysandM.Y.Prest,Numbers,groupsandcodes,CambridgeUniversityPress,1989.

†ExtractedfromKennethRosen,Elementarynumbertheoryanditsapplications,Addison-Wesley,1988.Thevaluesof (n)forlargenarenotfoundbythemethodsdescribedinthisbookwhichinvolvetestingallthenumbersuptonbutbyevaluatingsomeapproximateformulafor (n)toanaccuracyofahalf-whichdetermines (n)sinceitisobviouslyaninteger.‡ An account of Gauss’s work on the distribution of primes including a translation of this letter is to be found in an article by L.J.Goldstein,Ahistoryoftheprimenumbertheorem,AmericanMathematicalMonthly,volume80,MathematicalAssociationofAmerica,1973(pages599–615).

†AbeautifulargumentmotivatingtheprimenumbertheoremandusingonlythebasicideasofthecalculusmaybefoundinR.CourantandH.Robbins,Whatismathematics?OxfordUniversityPress,1941(pages482–486).

Page 219: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

24Congruencemoduloaprime

In this finalchapterweconsideranumberof resultsconcerningexpressionswhichareautomaticallydivisible by some given prime number. The results given here have their origins in the seventeenthcenturybutitisconvenienttoformulateandprovethemusingtheideaofcongruence.

Althoughtheresultsmayappearonlytobeoftheoreticalinteresttheseideasdoinfactprovideanimportant ingredient in the techniquesofpublic-keycryptographyusingprimenumbersreferredto inthepreviouschapter.Furthermoretheideasintroducedinthischapterledtothedevelopmentofgrouptheory, thestudyofsymmetry,whichisnowanenormouslyrichsubjectwithmanyapplicationsbothwithinmathematicsandinmanybranchesofscience.

24.1Fermat’slittletheoremWefirstconsiderastrikingresultknownasFermat’s‘little’theoremtodistinguishitfromhis‘great’or‘last’theoremwhichwasdiscussedinChapter18.AssooftenwithFermat’sresultsitisnotknownhowheprovedtheresultalthoughhementionedthathehadfoundaproofinaletterdated18October1640.Eulerwas the first to publish a proof, in 1736, and a variant of this proof appears as ProblemsVI,Question 17. Apparently this proof also appears in an unpublishedmanuscript by Gottfried Leibnizsometimebefore1683.

InChapter21weintroducedoperationsofaddition,subtractionandmultiplicationontheset mofcongruence classes of the integersmodulom andobserved that an element [a]m m has a (unique)multiplicativeinverse[a′]m(i.e.[a]m×[a′]m=[1]morequivalentlyaa'=1modm)ifandonlyifa iscoprimetom.Forexample,whenm=10wesawthat[1]10,[3]10,[7]10and[9]10areinvertiblein 10.

Inthecasewhenthemodulusisaprimenumber,sayp,theneverynon-zeroclassin pisinvertiblebecauseallnumbersasuchthat0<a<parecoprimetop.Thismakesarithmeticmodulop,orin p,particularlysimple.ThisfactcanbeusedtoprovesomestrikingresultsinnumbertheoryandFermat’slittletheoremisanexample.

Theorem24.1.1(Fermat’slittletheorem)Ifpisaprimenumberandaisapositivenumberwhichisnotamultipleofp,thenap–1 1modp.

Equivalentlywecanassertthatap–1–1isdivisiblebyp.TheproofwhichfollowswasfirstgivenbytheScottishmathematicianJamesIvoryin1806.†

ProofWemakeuseof the function f: p p used in theproofofTheorem21.4.1.Sincea is not a

Page 220: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

multipleofp,aandparecoprime.Wedefinef: p pbyf([x]p)=[a]p×[x]p=[ax]p.AsintheproofofTheorem21.4.1,since(a,p)=1,thisfunctionisaninjectionsothat,bythepigeonholeprinciple,itisabijection.

Nowf[0]p=[0]pandsothe(p–1)classes[a]p,[2a]p,…,[(p–1)a]paresimplytheclasses[1]p,[2]p,…,[p–1]pinadifferentorder.Hence

Thismeansthat

or

Butnow, sincep isprime, (p – 1)! andp are coprime, and so, byProposition19.3.2,we can dividethroughby(p–1)!toobtainap–1 1modpasrequired.

Corollary24.1.2Ifpisprimethen,forallintegersa,ap amodp.

ProofTherearetwocases.Ifa isamultipleofp thensoisapandsoap 0 amodp. Ifa isnotamultipleofpthenitisimmediatefromthetheoremthatap amodp.

Thistheoremcanbeusedtodeterminethecongruenceclassofahighpowermoduloaprime.

Example24.1.3Todeterminethecongruenceclassof3203modulo11.

SolutionByFermat’slittletheorem310 1mod11.Hence3203=(310)20×33 1×27 5mod11.

It should be observed that Fermat’s little theorem does not necessarily give theminimal positivepowerofawhichiscongruentto1modulopandthismaybelessthanp–1.Thisisclearwhena=1.Foramoreinterestingexampleconsiderp=7.Here23 1mod7.

Thesmallestpositiveintegernsuchthatan 1modp iscalled theorderofamodulop. It isnotdifficulttodeducefromFermat’stheoremthattheorderofanyelementdividesp–1(seeProblemsVI,Question14).

It isalso true,butharder toprove, that foreachprimep there issomenumberawithorderp–1modulop.Suchanumberiscalledaprimitiverootmodulop.Theproofisanothercountingargument.†

24.2Wilson’stheoremAnotherattractiveresultconcerningdivisibilitybyaprimepisthefollowing.

Theorem24.2.1(Wilson’stheorem)Ifpisprime,then(p–1)! –1modp.

Equivalently,(p–1)!+1isdivisiblebyp.Thetheoremisnamedafter theEnglishmathematicianJohnWilsonwho conjectured it on the basis of numerical calculations.Hewas a student ofEdwardWaringwhoincludeditinhisbookMeditationesalgebraicaein1770suggestingthatitwouldbeveryhardtoprove.ThefollowingyeartheFrenchmathematicianJosephLagrangepublishedaproof.

Example24.2.2Considerthecaseofp=11.Then10!=10×9×8×7×6×5×4×3×2.Wecoulddetermine the remainder after dividing by 11 by a direct calculation.However, notice the following

Page 221: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

congruencesmodulo11:

10 –1;9×5=45 1;8×7=56 1;6×2=12 1;4×3=12 1.

Usingtheseweseethat10!=10×(9×5)×(8×7)×(6×2)×(4×3) (–1)×1×1×1×1=–1asclaimed.

In this calculationwe paired off each number between 2 and 9with its inversemodulo 11. Thismethodworksforanyprimemodulusandprovidesageneralproof.

ProofofTheorem24.2.1Forp=2,(p–1)!=1!=1 –1mod2andsotheresultistrue.

Supposenowthatpisprimeandp 3.Theneachintegerasuchthat1 a p–1iscoprimetop(sincepisprime)andsobyTheorem20.1.5thereisauniqueintegera′ Rpsuchthataa' 1modp.UsingthelanguageofDefinition21.4.3,a’isaninverseofamodulop.

Ifa=1ora=p–1thena′=a.Forothervaluesofa,a′ a.Toseethisobservethat

Thusthep–3integers2,3,…,p–2maybedividedintopairsaanda′suchthataa′ 1modp.Thismeansthattheirproduct2×3×…×(p–2) 1modpandso(p–1)! p–1 –1modpasrequired.

InfactWilson’stheoremprovidesacriterionforanumbertobeprime:anintegern>1isprimeifandonlyif(n–1)! –1modn(seeExercise24.4)butthisisnotausefulcriterionsincethecalculationof(n–1)!isverytime-consumingifnislarge.

24.3LookingforprimesFermat’s little theoremgives some indication of how itmight be possible to prove that a number isprimewithout tryingallpossible factorsor that it iscompositewithoutactually factorizing it.Noticethatthetheoremcanberestatedinthefollowingway.

Corollary24.3.1Givenapositiveintegern,ifan amodnforsomeintegera,thennisnotprime.

ProofThisissimplythecontrapositiveofCorollary24.1.2.

Example24.3.2Forexample,takingn=63,263=260×23=(26)10×23=(64)10×8 110×8=8mod63andso263 2mod63.Hence63isnotprime.

Itisofcourseeasiertoprovethat63iscompositebyobservingthat63=7×9andthisparticular

Page 222: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

resultisnotanefficientwayofprovingthatanumberiscomposite.Itdoes,however,pointthewaytoseekingmoreefficienttestswhichshowthatnumbersarecomposite.

It isnatural toaskwhetherwecandosomethingsimilar toprove thatanumber isprime. Is theresomesortofconversetoCorollary24.3.1?

Apparently,atonetimetheChinesebelievedthat,if2n 2modn,thennisprime,butinfactthisisfalseascanbeseenbythefollowing.

Example24.3.32341 2mod341but341=11×31isnotprime.

Toseethisobservethat,byFermat’stheorem,210 1mod11.Also25=32 1mod31sothat210 1mod31.Thismeansthat210–1isdivisibleby11andby31andsotheseprimesareamongstitsprimefactorization.Thus210–1isamultipleof11×31=341,i.e.210 1mod341.Itfollowsthat2340 1mod341sothat2341 2mod341.

Thisconjecturewasperhapsabitoptimistic.Morerealisticmightbetohopethat,ifan−1 1modnforalla whicharecoprimeton,thennisprime.Infactthisfailstoo.

Example24.3.4Wehavea560 1mod561forallintegersacoprimeto561but561=3×11×17isnotprime.

Firstof all notice that ifa is coprime to 561, then (a, 3)=1, (a, 11)=1 and (a, 17)= 1.Then, byFermat’stheoremwehavea2 1mod3sothata560 1mod3,a10 1mod11sothata560 1mod11anda16 1mod17sothata560 1mod17.Thismeansthata560–1isdivisibleby3,by11andby17andso,asinExample24.3.3,itisdivisibleby561=3×11×17,i.e.a560 1mod561.

Nevertheless,theseideascanbedevelopedtogivetestsforprimalityandthisisanimportantareaofactivemathematicalresearch.†

Exercises

24.1Findtheremainderafter21000000isdividedby17.

24.2Supposethatpisanoddprime.Provethata2p–1 amod2p

24.3UseFermat’stheoremtofindtheinverseof7modulo17inR17,thesetofremaindersmodulo17.

24.4Provethat,foranintegern>2,if(n–1)! –1modnthennisprime.

24.5Provethat,ifpandqaredistinctprimenumbers,then

†AccordingtoH.Davenport,Thehigherarithmetic,anintroductiontothetheoryofnumbers,CambridgeUniversityPress,Sixthedition1992.†SeeforexampleD.M.Burton,Elementarynumbertheory,AllynandBacon,1976.

†SeeK.H.Rosen,Elementarynumbertheoryanditsapplications,Addison-Wesley,Secondedition1988.

Page 223: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

ProblemsVI:Primenumbers

1. Find the prime factorizations of of 3480 and 4284 and hence find their greatest common divisor.ComparetheamountofworkwiththesolutionofProblemsIV,Question6(ii).

2.Provethatthereareinfinitelymanyprimenumberswhicharecongruentto3modulo4.

3.LetE bethesetofevenintegers.CallanevenintegerE-primeifitisnottheproductoftwootherevenintegers.Provethat60canbewrittenastheproductofE-primesintwoquitedistinctways.

4.Re-proveCorollary17.2.1usingthefundamentaltheoremofarithmetic.

5.Re-provetheresultofProblemsIV,Question13that(a,b)[a,b]=abforpositiveintegersaandbusingthefundamentaltheoremofarithmetic.

6. Find the number of positive divisors of the number (where p1, p2, …, pr are distinctprimes).

7.Provethatifaandbarecoprime,andaandcarecoprime,thenaandbearecoprime.

8.Provethat,ifaandbarecoprime,thenabisaperfectsquareifandonlyifaandbarebothperfectsquares.

9.Provethat,ifm1andm2arecoprimepositiveintegers,then

10.Usetheinclusion–exclusionprinciple(ProblemsIII,Question4)todeducefromExercise23.5thatifnhasthestandardprimefactorization then

where isEuler’stotientfunction.

11.Use the inclusion–exclusionprinciple to find thenumberofpositive integersnogreater than100whichareperfectpowers (n=mr forpositive integersmandrwithr 2).Check the result of yourcalculationbylistingthesenumbers.Dothesamecalculationforpositiveintegersnogreaterthan1000.

12. Prove that if the polynomial equationanxn +…+a1x +a0 = 0 (with integer coefficients) has arationalsolutionx=r/s(initslowestterms)thenrdividesa0andsdividesan.

Deducethateveryrationalsolutionofxn+an–1xn–1+…+a1x+a0=0isaninteger.Henceshowthattheequationx3–8x+a=0hasnorationalsolutionsifa≡±1mod5.

Page 224: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

13.Recall that, given a primep, the ordermodulop of an integera 0modp is the least positiveintegernsuchthatan≡1modp.Findtheordersmodulopofallthenon-zeroelementsofRpforp=5andp=11.

14.UseFermat’slittletheoremtoprove,bycontradiction,thatforaprimeptheordermodulopofeachintegera 0modpdividesp–1.

[Tryaproofbycontradictonusingthedivisiontheorem.]

15. Suppose that p is prime and does not divide the integer a. Prove that in the infinite decimalrepresention of the rational number a/p the number of recurring digits is given by the order of 10modulop(andsobythepreviousquestiondividesp–1.

16.Findtheremainderswhen

(i)29!isdividedby31,(ii)18!isdividedby23,(iii)18!isdividedby437.

17.[Euler’sproofofFermat’slittletheorem.]Supposethatpisaprimenumber.Provethat,for0<i<

p,thebinomialcoefficient isamultipleofp.

[ByTheorem12.2.10 .Nowusethefundamentaltheoremofarithmetic]

Deduce that (a+b)p≡ap+bpmodp.Henceprove,by inductionona, thatap ≡a for alla .DeduceFermat’slittletheorem.

18.[Gauss’sproofofFermat’slittletheorem.]Letpbeaprimeandaanon-zeroelementofRp.

(i)Provethatthereexistsapositiveintegermsuchthatam≡1modp(andsothereisaleastsuch,theorderofamodulop).

[Noticethattheset{[ak]p|k p}isasubsetof pandsofinite.]

(ii)ProvethatanequivalencerelationmaybedefinedonRp–{0}byx1~x2 x1≡x2akforsomek +.

(iii)Provethatthenumberofelementsineachequivalenceclassisn,theorderofa.

(iv)Provethatndividesp–1(provingtheresultofQuestion14withoutusingFermat’stheorem).

(v)DeduceFermat’stheorem.

Page 225: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Solutionstoexercises

Thereadershouldnotimaginethatthesolutionswhichfollowaretheonlypossiblecorrectsolutionsoftheexercises.Ofcourseforsome,suchascompletingthetruthtablesinExercises1,thereisaunique‘rightanswer’andanythingelseiswrong.Butmostexercisesaskforaproofandforthesetheremaybemorethanonepossibleproofandinanycasethesameproofmaybesetoutinavarietyofways.Ifthereader’s solution is different from the author’s then the reader should pause and checkwhether bothsolutionsarecorrect.

Exercises1(page8)

Noticethatthefinalcolumnsofthefirsttwotablesarethesame.Thistellsusthatthestatements‘not(PandQ)’and‘(notP)or(notQ)’arelogicallyequivalent,orhavethesamemeaning.

1.4Theeasiestwayofthinkingaboutthisquestionistoimaginefillinginatableasfollows.

Page 226: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

The idea is thateachchildwillbeplaced in this tableaccording tosexandmathematicalability (weassumethattheassessmentofabilitydoesnotpresentanyproblems).Thusinregion1isthelistofboyswho are good atmathematics, in region 2 is the list of girlswho are good atmathematics, region 2togetherwithregion4providesthelistofgirlswhoarenotbadatmathematics,andsoon.Wecannowinterpreteachofthegivenstatementsasstatementsaboutthistable.

(i)Regions4and6areempty.(ii)Regions2and4areempty.(iii)Region2isempty.(iv)Region6isnotempty.(v)Regions4and6arenotbothempty.(vi)Region1isempty.(vii)Regions4and6areempty.

From this we see that statement (v) is the negation of statement (i) whereas statement (vii) islogicallyequivalenttostatement(i).1.5Recallthat |a|isdefinedby|a|=aifa 0and|a|=–a ifa 0.Soweconsider these twocasesseparately.

Ifa 0,then|a|2=a2bydefinition.Ifa 0,then|a|2=(−a)2=a2.Sinceforeveryrealnumbera,a 0ora 0wehaveprovedthat|a|2=a2.Noticethatifa=0thena 0anda 0.Thisisnotaproblemsinceinthiscasebothdefinitions(a

and−a)give0.Wesaythatthemodulusofarealnumberiswell-defined(seeExample8.1.8).

Exercises2(page19)2.1 (i)True,(ii)False, (iii)True,(iv)False, (v)False, (vi)True.(vii)True,(viii)True,(ix)False, (x)True,(xi)True.

Noticethatstatement(viii)istruebecausethestatement‘n=2andn=–1’isfalseforallintegersn.

[Infactthereisacertainambiguityaboutthelastthreepartsofthisquestion.Considerstatement(ix).Asexplainedinthetext,thestatementn2–n–2=0 n=2isstrictlyspeakingapredicategivingadifferentpropositionforeachvalueofn.Itisusualtointerpretsuchapredicateasauniversalstatementmeaning that the implication is truewhatevervalue isassigned to the freevariablen.This particularuniversalimplicationisfalsesince,whenn=–1,n2–n–2=0butn 2.Inthesamewaytheuniversalimplicationn2–n–2=0 n=–1isfalse.Thisleadstotheconclusionthatstatement(ix)isfalseandthiswouldbethenormalinterpretation.

However the reader should be aware that statement (ix) can be viewed differently. The wholestatementcanbeviewedasapredicatewithfreevariablenandwecanconsiderwhetherthispredicateistruewhateverintegervalueisassignedton.Thisisindeedthecasefor,althoughthefirstimplicationisfalsewhenn=–1andthesecondoneisfalsewhenn=2,oneorotherofthemistruewhatevervalueisassignedton.

Theprecisemeaningofmorecomplicateduniversalstatementssuchas thismaybemadeclearby

Page 227: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

usingthequantifier‘ ’tobediscussedinChapter7:thesymbols‘ n’areread‘foralln’Statement(ix)isfalseifitisinterpretedas

Itistrueifitisinterpretedas

Statements(x)and(xi)aretruewhicheverwaytheyareinterpreted.]

2.2Noticethatifn-isanintegertheneithern 0orn 1.

Here the last column follows from the previous two using the truth table for ‘implies’. Since bothentriesinthelastcolumnare‘T’wehaveprovedtheuniversalimplicationn>0 n 1forintegersn.

Fromthediscussioninthechapter,thecorrespondinguniversalimplicationforarealnumberisfalse(seeTable2.1.2).Thisillustratestheimportanceofbeingclearabouttherangeofvaluesofthevariablesinapredicate.

Sinceallentriesinthefinaltwocolumnsare‘T’thesestatementsaretrueregardlessofthetruthvaluesofthestatementsPandQ.

Sincetheentriesinthethirdandsixthcolumnsareidenticalthecorrespondingstatementsarelogicallyequivalent:animplicationisequivalenttoitscontrapositive.

Sincetheentriesinthethirdandfifthcolumnsareidenticalthecorrespondingstatementsarelogically

Page 228: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

equivalent.

2.6Wemustprove that there isno integerk such that7k=100.Forany integerk,k 14ork 15.Hence7k 98or7k 105sothat7k 100.

Exercises3(page29)3.1(i)Wesimplifyeachsidebymultiplyingout.

Therefore(a+b–c)2=(a+b)2+(a–c)2+(b–c)2–a2–b2–c2.

(ii) As with Proposition 3.2.1 we start with the goal and work backwards taking care to get theimplicationsintherightdirection.

andthisfinalstatementiscertainlytrueforallrealnumbersa,bandc.Hencebc+ac+ab a2+b2+c2.

3.2Thisisacaseofspellingoutthedefinitions.Supposethatadividesbandbdividesc.Thenb=aqforsomeintegerqandc=bpforsomeintegerp.[Noticethatwecannotusethesameletterqinbothcasessincethereisnoreasontoexpectthatthesetwonumberswillbeequal.]Hencec=bp=(aq)p=a(qp)sothatadividescsinceqp,theproductoftwointegers,isaninteger.Thus,ifadividesbandbdividescthenadividesc.

3.3Thiscanbeproveddirectlyfromthedefinitionsasfollows.Supposethatnisaneveninteger.Thenn=2qforsomeintegerq.

Thereforen2=(2q)2=4q2=2(2q2)andso,since2q2isaninteger,n2iseven.Hence,ifniseventhenn2iseven.†

Alternatively,thismaybededucedfromthepreviousresultsince,foranyevenintegera,2dividesaandadividesa2.

3.4Againfromthedefinitions,if0dividesa,thenthereisanintegerqsuchthata=0×q.Since0×q=0thismeansthata–0.

Conversely,0=0×0andso0divides0.

3.5Rememberthatb cisshorthandforb>corb=csowemustprovethatb>c ab acandb=cab ac.Thefirstfollowsfromtheinequalityaxioms:b>c ab>ac(sincea>0) ab ac.The

secondiseveneasier:b=c ab–ac ab ac.

Page 229: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

[Noticeherethemethodsforusingandproving‘or’statements.Tousean‘or’statementitisnecessaryto show that each component statement separately leads to the desired conclusion. To prove an ‘or’statement it is sufficient to prove one of the component statements. Proofs of ‘or’ statements areconsideredfurtherinthenextchapter.]

3.6Givennegativerealnumbersaandbsupposethata<b.Thena2>ab(multiplyingthroughbya<0)andab>b2(multiplyingthroughbyb<0).Hencea2>b2.Itfollowsthata<b a2>b2.

[ThisproofmimicstheproofofProposition3.1.1.WecouldhavededucedtheresultfromProposition3.1.1byobservingthatifaandbarenegativethen–aand–barepositiveandthata<b –b<–a.Thereadershouldwriteoutthedetailsofthisproof.]

3.7Theconditionisnotnecessary.Toprovethat4ab<(a+b)2 a<bitissufficienttogiveasingleexampleofnumbersaandbforwhichtheimplicationfails,saya=2,b=1forwhich4ab=8<(a+b)2=9buta b.OnexaminingtheproofofProposition3.2.1wefindthateachimplicationisreversibleapart from the last step. Thismeans that 4ab < (a +b)2 a b and so a necessary and sufficientconditionisa b.

3.8(i)Supposethataandbarerealnumberssuchthat0 a<b;theneithera=0ora>0.Ifa>0thenwehavealreadyproved(Proposition3.1.1)thata2<b2.Ifa=0thena2=0andsinceb>0impliesthatb2>0weagainhavea2<b2.Soineithercasea2<b2.Hence0 a<b a2<b2.

(ii)Bydefinitionthemodulusofanyrealnumberisnon-negative.Hence,if|a|<|b|then0 |a|<|b|andsobythefirstpart|a|2<|b|2.But(byExercise1.5)|a|2=a2and|b|2=b2sothata2<b2asrequired.

(iii)|a|=|b| a2–|a|2=|b|2=b2(usingExercise1.5again).

(iv)If|a| |b|then|a|<|b|or|a|=|b|.Inthefirstcasea2<b2by(ii)andinthesecondcasea2=b2by(iii)andsoineithercasea2 b2.Thus|a| |b| a2 b2asrequired.

Exercises4(page37)4.1Supposeforcontradictionthatmandnareintegerssuchthat14m+21n=100.Then7divides14and7divides21sothat,since100=7(2m+3n),7divides100.But7doesnotdivide100[byExercise2.6ifaproofisinsistedupon]andsowehaveacontradiction.Hencesuchintegersmandndonotexist.

4.2Given thatn is an integer such thatn2 isodd, suppose for contradiction thatn is even.Then,byExercise3.3,n2iseven,contradictingthestatementthatn2isodd.Henceourassumptionthatnisevenmustbefalse,i.e.nisodd.Thusn2isodd nisodd,asrequired.

4.3Thecontrapositiveoftherequiredresultreads

ThisistruebyExercise3.3andsotherequiredresultistrue.

4.4Supposethataisanintegersuchthata2 7a.Toseethatitfollowsthata 0ora 7supposethata0.Thena>0sothata2 7a a 7bydividingthroughbythepositivenumbera.Hencea2 7a a

Page 230: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

0ora 7.

4.5 Suppose that a and b are real numbers such that a b and b a. Suppose in addition, forcontradiction, thata b. Then, by the trichotomy law (Axioms 3.1.2(i)) a < b ora > b. Buta < bcontradictsourhypothesisthatb aanda>bcontradictsourhypothesisthata bandsoineithercasewe have a contradiction as required. Thus our assumption thata bmust be false and so a = b asrequired.

4.6ThecontrapositiveofExercise3.8(iv)reads

(i)Interchangingaandb thisgivesa2<b2 |a|< |b|andsocombining thiswithExercise3.8(ii)wehaveproved|a|<|b| a2<b2asrequired.

(ii)Wehavealreadyproved(Exercise3.8(iii))that|a|=|b| a2=b2.Fortheconverse,supposethata2=b2and,forcontradiction,that|a| |b|.Then,bytrichotomy,either|a|<|b|inwhichcasea2<b2givingacontradiction,or|a|>|b|inwhichcasea2>b2givingacontradiction.Sincewenecessarilyobtainacontradictionourassumptionthat|a| |b|mustbefalseandso|a|=|b|asrequiredtoprovethata2=b2|a|=|b|.

4.7Usingthepreviousquestion,|a+b| |a|+|b| (a+b)2 (|a|+|b|)2 a2+2ab+b2 a2+2|ab|+b2 ab |ab|whichisalwaystrue.Fromasimilarargumentwith‘ ’replacedby‘=’throughout,weseethatequalityholdsifandonlyifab=|ab|andsoifandonlyifab 0.

[This result is known as the ‘triangle inequality’ because when generalized to complex numbers itcorrespondstothegeometricfactthatthesumofthelengthsofanytwosidesofatriangleisnotlessthanthelengthofthethirdside.]

Exercises5(page51)

5.1InthiscaseP(n)isthestatement‘3divides(n3–n)’or‘n3–n=3qforsomeintegerq’.Forthebasecase,thestatementP(1)simplysaysthat3divides0whichiscertainlytruesince0=3

×0.Wecansumupwhatisneededfortheinductivestepasfollows.

Ifwespelloutwhatdivisibilitymeansthisbecomesthefollowing.

[Notice here that we should not use the letter q in both the given and the goal statements aboutdivisibilityby3,sincethereisnoreasontoexpectthattheywillbethesameinteger(infacttheycan’tbe).Sotheletterpisusedinthegoalstatement.]

Page 231: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thissuggeststhatweletqbeanintegersuchthatk3–k=3qandtrytofindthepwewantintermsofit.Sowemanipulate(k+1)3–(k+1)inthehopethatwecanrelateittok3–k.

Thisshowsthatthenumberwerequireisgivenbyp=q+k2+k.Wenowwritethisoutformallyusingthetemplateofsection3.1.

ProofWeuseinductiononn.Basecase:Forn=1,n3–n=1–1=0=3×0andso3dividesn3–n.Inductivestep:Supposenowasinductivehypothesisthat3dividesk3–kforsomepositiveintegerk.Thenk3–k=3qforsomeintegerq.Hence(k+1)3–(k+1)=k3+3k2+3k+1–k–1=(k3–k)+3(k2+k)=3(q+k2+k)andso3divides(k+1)3–(k+1),asrequired.Conclusion:Hence,byinduction,ndividesn3–nforallpositiveintegersn.

5.2Sofarstatementsprovedbyinductionhaveusedthesymbol‘n’forthefreevariableinthepredicate.This is themost common symbol for an integer free variable but other symbols can be used – thisquestionusesthesymbol‘m’.

Theinductivesteprequiresustoprovethat,fork 10,

Toprovethisnoticefirstofallthatk3 2k 2k3 2k+1givingusonesideofthedesiredinequality.Thedesiredconclusionwillfollowifwecanprovethat(k+1)3 2k3.Nowstartingfromtheothersidewecanexpand:(k+1)3=k3+3k2+3k+1.Hence

Butifk 10,3k2+3k+1 3k2+3k2+k2=7k2 k3.

ProofWeuseinductiononm.Basecase:Form=10,m3=1000and2m=1024andsom3 2m.Inductivestep:Supposeasinductivehypothesisthatk3 2kforsomek 10.Then(k+1)3=k3+3k2+3k+1 k3+3k2+3k2+k2(sincek 1)=k3+7k2 k3+k3(sincek 7)=2k3 2×2k(byinductivehypothesis)=2k+1andsotheresultholdsform=k+1asrequired.Hence,byinduction,m3 2mforallm 10.

[Weonlyneededk 7inprovingtheinductivestep.Doesthismeanthattheresultholdsforallm 7?Whynot?]

5.3Weuseinductiononn.Basecase:Forn=1,n 1.Inductivestep:Supposeasinductivehypothesisthatk 1forsomepositiveintegerk.Thensincek+1kitfollowsthatk+1 1provingtheinductivestep.Hencebyinductiononn,n 1forallpositiveintegersn.

[The readermay find this a curious exercise.However, althoughwe havemade use of this result in

Page 232: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

examples several times as if itwere a ‘self-evident truth’ itwas not included in the basic propertiesgivenearlier.Itcanbededucedfromthesebasicproperties,andthisishowtodoit.]

5.4InthiscasethestatementP(n)tobeprovedforallintegersn 0isThus P(k) reads , and P(k + 1) reads or,

simplifying,

ProofWeuseinductiononn.Basecase:Forn=0, and(1–xn+1)/(1–x)=(1–x)/(1–x)=1andsotheresultholds.Inductivestep:Supposenowasinductivehypothesisthat forsomek 0.Then

(byinductivehypothesis)=(1–xk+1+xk+1–xk+2)/(1–x)=(1–xk+2)/(1–x)asrequired.Conclusion:Hence foralln 0.

[Thissumisknownasageometricprogressionwithratiox].

5.5Weprovethisresultbyinductiononn.Basecase:Forn=0, andsotheresultholds.Inductivestep:Supposeasinductivehypothesisthat forsomek 0.Then

asrequiredtoprovetheresultforn–k+1.Conclusion:Hencetheresultholdsforalln 0.

Alternatively,thisresultcanbededucedfromProposition5.3.1asfollows.

[Thissumisknownasanarithmeticprogressionwithdifference6.]

5.6Wecanprovethisbyinductiononnstartingatn=0.InthiscaseP(n)issimplythestatement‘un=n3n–1’.Basecase:Forn=0theformulagives0×3−1=0agreeingwiththedefinitionofu0.Inductivestep:Nowsupposethatuk=k3k-1forsomenon-negativeintegerk.Thenuk+1=3uk+3k (bydefinitionofthesequence)=3k3k−1+3k(byinductivehypothesis)=k3k-1+3k=(k+1)3kasrequiredtoprovetheformulaforn=k+1.Conclusion:Hence,byinduction,un=n3n−1forallnon-negativeintegersn.

5.7(i)TheproofisbyinductiononnusingtheinductivedefinitionofxninDefinition5.3.3.Basecase:Forn=0,xnyn=1=(xy)nasrequired.Inductivestep:Supposeasinductivehypothesisthatxkyk=(xy)kforsomenon-negativeintegerk.Then,bytheinductivestepsinthedefinitionsofxn,ynand(xy)n,xk+1yk+1=(x·xk)(y·yk)=(xy)(xy)k=(xy)k+1asrequiredtoprovetheresultforn=k+1.

Page 233: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Conclusion:Hence,byinduction,xnyn=(xy)nforanyrealnumbersxandyandnon-negativeintegersn.

(ii)Basecase:Forn=0,xm+n=xm=xmx0=xmxnasrequired.Inductivestep:Supposeas inductivehypothesis thatxm+k=xmxk some somenon-negative integerk.Thenxm+k+1=xxm+k(bytheinductivestepinthedefinition)=xxmxk(byinductivehypothesis)=xmxxk=xmxk+1(bytheinductivestepinthedefinition)asrequiredtoprovetheresultforn=k+1.Conclusion:Hence,byinductiononn,xm+n=xmxnforanyrealnumberxandnon-negativeintegersmandn.

[Noticethatinorderforthisidentitytoholdform=1andn=0itisnecessarytodefinex0=1forx 0.Theidentitydoesnotrequireanyparticularvalueforx0whenx=0.]

(iii)Basecase:Forn=0,(xm)n=1=x0=xmnasrequired.Inductivestep:Supposeasinductivehypothesisthat(xm)k=xmkforsomenon-negativeintegerk.Then(xm)k+1=xm(xm)k(bytheinductivestepinthedefinitionof(xm)n)=xmxmk(byinductivehypothesis)=xm+mk(bypart(ii)ofthequestion)=xm(k+1)asrequiredtoprovetheresultforn=k+1.Conclusion:Hence,byinductiononn,(xm)n=xmnforanyrealnumberxandnon-negativeintegersmandn.

Exercises6(page72)6.1(i)0 0andso0 (0,1).0 0 1andso0 [0,1].0 0<1andso0 [0,1).0 0andso0 (0,1].(ii)[a,b]–(a,b)={a,b}.(iii)Since(a,b)= isanon-existencestatementitishardtoworkwithdirectly.Soweprovethisresultbyprovingtheequivalentcontrapositivestatement:

‘ ’:Supposethat(a,b) .Thenwemaychooseanelementx (a,b).Thismeansthata xandx bwhichimpliesthata b.‘ :Supposethata b.Then2a a+b 2bsothata (a+b)/2 bwhichmeansthat(a+b)/2 (a,b)sothat(a,b) .Theequivalentstatementsfortheotherintervalsare:

(iv)Supposethat[a,b] (c,d).Thensincea [a,b]wemusthavea (c,d)andsoinparticularc a.Similarlyb [a,b] b (c,d) b d.Conversely,ifc aandb dthenx [a,b] a x b c x d x (c,d)andso[a,b] (c,d).

6.2(i)Forarealnumbera,a {x |x2+x–2=0} a2+a–2=0 (a–l)(a+2)=0 a–1=0ora+2=0 a=1ora=–2 a {1,–2}.

Page 234: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Hence{x |x2+x–2=0}={1,–2}.

(ii)Fora ,a {x |x2+x–2 0} a2+a–2 0 (a–1)(a+2) 0 (a–1 0anda+2 0)or(a–1 0anda+2 0) (a 1anda –2)or(a 1anda –2) a 1anda –2[Noticethattherearenorealnumberswhicharebothlessthan–2andgreaterthan1] a (–2,1).Hence{x |x2+x–2 0}=(–2,1).

Analternativeproofwouldbetoconstructatableasfollows–

–fromwhichitisimmediatethatx2+×–2 0 2 x 1.

(iii)This is immediate from the above tableorby trichotomy fromparts (i) and (ii).Alternatively, aproofmaybeconstructedbywritingdownachainofequivalencesasinparts(i)and(ii).6.3(i){3}={x |x=3}.(ii){l,2,3}={x |0 x 4}.(iii){1,3}={x |0 x 4andxisodd}.

6.4

Nowsincethefinalcolumnsarethesameweseethatthetwosetscontainthesameelements,i.e.areequal.

TheVenndiagram for this result is shownon the next page; region i corresponds to line i in theabovetables.Weeasilyseethatbothsetscorrespondtoregions1,2and3.

6.5Itisbesttoprovethetheimplications‘ ’and‘ ’separatelyineachcase.(i)‘ ’:BydefinitionB A Bsincex B x Aorx B.Conversely,giventhatA B,x A x Bsothatx Aorx B x B,i.e.A B B.‘ ’:ThisfollowsimmediatelyfromA A B.(ii)‘ ’:BydefinitionA B Asincex Aandx B x A.Conversely,giventhatA B,x A x Bsothatx A x Aandx B,i.e.A A B.‘ ’:ThisfollowsimmediatelyfromA B B.

Page 235: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Alternatively,thisresultfollowsfromProblemsI,Question2.

6.6Letusstartbysummarizingwhatisneeded.

Sincethegoalisanegativestatementthissuggestsaproofbycontradictionasfollows.

Nowifwerememberthedefinitionofthedifferenceoftwosetsthisbecomesthefollowing.

Nowtheproofisapparentforx Bandx A x A B x C(usingA B C)whichcontradictsxC.Thiscanbewrittenoutformallyasfollows.

ProofSupposethatA B Candx B.Supposeforcontradictionthatx A–C.Thenx Aandso,sincealsox B,wehavex A Bwhichimpliesthatx C.Butx A–Cimpliesthatx Candsowehaveacontradiction.Henceourassumptionmustbefalseandx A–Casrequired.

AVenndiagramillustratingthisresultisgivenbelow.

InthediagramthesetA–Cisgivenbyregion3whichclearlycontainsnopointsofB(regions1,4and5).

Page 236: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Noticethatalthoughthisseemsthenaturalwayofdrawingthisdiagramtworegions6and7togethermakeupC–(A B)andthereisnologicaldistinctionbetweenthem.Thisisacasewherethegeometryof thediagramdoesnotcorrespond toanything in theset theory. It indicateswhyproofsusingVenndiagramsarenotreallyentirelysatisfactoryandthebestproofofthisresultisthatgivenabove.

6.7RecallthatA Bisdefinedtomean

HenceBc Acmeans

orequivalently

Thetwostatements(1)and(2)arecontrapositivesofeachotherandsoequivalent.HenceA B BcAc.

Exercises7(page86)

7.1(i){m +| n +,m n}= +:givenm +taken=mtoprovethat n +,m n.(ii){m +| n +,m n}={1}:itistruethat n Z+,1 nbutform 1acounterexampleto n +,m nisprovidedbyn=1sincem 1;(iii){n Z+| m +,m n}=Z+:givenn Z+takem=ntoprovethat m +,m n.(iv){n +| m Z+,m n}= :givenn Z+acounterexampleto m +,m nisprovidedbym=n+1sincen+1 n.

7.2(i)False:acounterexampleism=2,n=1.(ii)True:anexampleism=n=1.(iii)True:see7.1(i).(iv)True:see7.1(ii).(v)True:see7.1(iii).(vi)False:see7.1(iv).

7.3(i)False:acounterexampleism=2,n=1.(ii)True:anexampleism=n=1.(iii)True:givenm putn=m.(iv)False:foreachm acounterexampleisgivenbyn=m 1.(v)True:givenn putm=n.(vi)False:foreachn acounterexampleisgivenbym=n+1.

7.4(i)True:foreachx ,takey=–x.(ii)False:foreachy ,thepredicateisfalseforx=1–y.(iii)True:takey=0.(iv)True:takey=0.(v)False:takex=0.(vi)False:takex=0.(vii)True:since‘odd’means‘noteven’.

Page 237: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(viii)False:‘ n,niseven’isfalse,e.g.n=1,and‘ n,nisodd’isfalse,e.g.n=0.

7.5Supposethatn +issuchthat q +,n=2q+1.Thenwecantakeq +suchthatn=2q+1.Thismeansthatn2=(2q+1)2=4q2+4q+1=2(2q2+2q)+1andson2=2p+1wherep=2q2+2qsothatp +,n2=2p+1asrequired.

[Thisproofillustrateshowweuseastatementinvolving simplybyusinganelementwiththestatedpropertyandthatweproveastatementinvolving byconstructinganelementwiththestatedproperty.]

7.6Wecanwritethestatementasfollows.

Supposethataandbareeven.Then,bydefinition,a=2q1andb=2q2forintegersq1andq2.Thereforea+b=2q1+2q2=2(q1+2q2)andsoa+bisevensinceq1+q2isaninteger.Hence,ifaandbareeventhena+biseven.

7.7Supposethat(x,y) (A×B) (C×D).Then(x,y) A×Bor(x,y) C×D.Wenowexamine thesetwocasesinturn.

If(x,y) A×B,thenx Aandy B.Thusx A Candy B D.Hence(x,y) (A C)×(B D>)asrequired.Ontheotherhand,if(x,y) C×Danalmostidenticalargumentdemonstratesthat(x,y) (AC)×(B D).

Thus(x,y) (A×B) (C×D) (x,y) (A C)×(B D)asrequired.Togiveacounterexample to theequalityof thesesetswe tryacaseofsmallsets just toseewhat

happens–anditworks.Supposethatallfoursetsconsistofjustasingleelement:A={a},B={b},C={c}andD={d}.ThenA×B={(a,b)}andC×D={(c,d)} so that the left-handside (A×B) (C ×D)= {(a, b), (c,d)}.However,A C={a,c}andB D={b,d}sothat(A C)×(B D)={(a,b),(a,d),(c,b),c,d)}.Thus(AC)×(B D)isnotasubsetof(A×B) (C×D)sinceitcontainstheelement(a,d).

7.8(i)False,(ii)False,(iii)True,(iv)False.

7.9SupposethatAisasubsetof +,thesetofpositiveintegers.ThenA= +if

(i)1 A,and(ii) k +((1 n k n A) k+1 A).

Exercises8(page99)

8.1Given(x,y) 2,bythetrichotomylawpreciselyoneofx y,x=yandx y is true.Thereisnoambiguityinthedefinitionofg(x,y)inthefirstandthelastcases.Ifx=ythenx yandx yandsotwodefinitionsaregiven,y in the first case andx in the second; these values are the same sincewe areconsideringthecasex=y.Hencegiswell-defined.

Ifx y,thenx–y 0sothat|x–y|=x–y.Thus,inthiscase,f(x,y)=(x+y)/2+(x–y)/2=x=g(x,y).Ontheotherhand,ifx y,thenx–y 0sothat|x–y|=–(x–y)=y–x.Thisimpliesthat,inthiscase,f(x,y)=(x+y)/2+(y–x)/2=y=g(x,y).Since,foreach(x,y) 2,x yorx ythisproves

Page 238: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

thatf=g.

[Strictlyspeakingthevaluesofthefunctionfshouldbewrittenf((x,y))(andsimilarlyforg)sincethefunction isevaluatedat thepoint (x,y) 2. It isusual towrite thevalues simplyas f(x,y) and it iscommontodescribefasafunctionoftwovariablesxandy.]

8.2Thefourcompositefunctionsaregivenby

(i)f○f(x)=(x3)3=x9,(ii)f○g(x)=(1–x)3,(iii)g○f(x)=1–x3,(iv)g○g(x)=1–(1–x)=xsothatg○g=I ,theidentityfunction.

Fortheset,fg(x)=gf(x) (1–x)3=1–x3 1–3x+3x2–x3=1–x3 x(x–1)=0 x=0orx=1.Hence{x |fg(x)=gf(x)}={0,1}.

8.3Therearelotsofpossibilitieshere.Thefollowingfunctionsareasrequired:

(i)f1=I ,theidentityfunction;

(ii)anotherexampleisgivenbyf2(x)=ex(theexponentialfunction);

(iii)(iv)f4(x)=n ifn x n+1.

8.4Supposethatwearegiven +.Then

andsoifwechooseanintegerN 1/ wehaven N n 1/ |1/n]=1/n asrequiredtoshowthat1/nisnull.

8.5(i)Thisisthegraphofthefunctionwhosevaluesaregivenbythefollowingtable.

(ii)Thisisnotthegraphofafunctionsincenoelementisspecifiedforthevalueatc.(iii)Thisisnotthegraphofafunctionsincetwoelementsarespecifiedforthevalueatb.(iv)Thisisthegraphofthefunctionwhosevaluesaregivenbythefollowingtable.

Exercises9(page113)

Page 239: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

9.1(i)y=f1(x) y=2x+5 x=(y–5)/2.Sof1isabijectionandtheinverseisgivenby.(ii)y=f2(x) y=x2+2x+1=(x+1)2.Sothefunctionisnotinjective(forexamplef2(–2)=f2(0))=1)anditisnotsurjective(since(x+1)2 0forallrealx).(iii)y=f3(x) y=x2–2x=(x–1)2–1.Soagainthisisnotinjective(forexamplef3(0))=f3(2)=0)andisnotsurjective(since(x–1)2–1 –1forallrealx).(iv)y=1/x x=1/yandy=0 x=0andsof4isabijectionwhichisitsowninverse.Sketchingthegraphsisquiteahelpindoingthesequestions.

9.2(i)Noticethattheinversefunctionisnotdefinedforx 5sincethen(x–5)/2 +.Sof1 +→ +isaninjectionbutnotasurjectionsince,forexample,5isnotavalue.(ii) . Here so we need y 1 and must take the positivesquare root. Thus the function +→ + is not a surjection (for example 1 is not a value) but is aninjection.(iii)Thisexampledoesnotrestricttoafunction +→ +since,forexample,f3(1)=–1.(iv)Thisisstillabijectionwhichisitsowninversesince1/x 0 x 0.

9.3(i)Supposethatx,y .Then

Hence .(ii)Supposethatx,y .Then

Hence .

9.4Supposethatgf(x1)=gf(x2)forelementsx1,x2 X.Sincegisaninjection,f(x1)=f(x2).Sincefisaninjectionx1=x2asrequiredtoprovethatg○fisaninjection.

9.5Wecanverify theconditionsofProposition9.2.5toprovethatg○ fand f–l○g–1are inversesofeachotherasfollows.

andsimilarly(f–1○g–1)○(g○f)=Ix.Thusg○fisinvertible(orequivalentlyabijection)withinversef–1○g–1.

[Thisresultshowsthatcompositesofbijectionsareveryeasytodealwith.Noticethereversaloforderwhenwritingdowntheinverse.]

9.6Supposethatfisasurjection.Then,giveny○ Ythereexistsx0 Xsuchthatf(x0)=y0.But then(x0,y0) X×{y0} Gfandso .

Conversely,supposethat y Y,(X×{y}) Gf .Thentoshowthatfisasurjectionwemustshowthat,giveny0 Y,thereexistsanelementx0 Xsuchthatf(x0)=y0.(X×{y0}) Gf sowecanchoose(x1,y1) X×{y0} Gf.Butthen(x1,y1) X×{y0}sothatx1 Xandy1==y0.Also(x1,y1) Gfandsoy1=f(x1).Itfollowsthaty0=f(x1)andsowecantakex0=x1.Hencefisasurjection.

Page 240: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

9.7(i)SupposethatB1 B2.Thenx (B1) f(x) B1 f(x) B2 x 7 (B2).Hence (B1) (B2).(ii)Theresultfollowsfromx (B1 B1) f(x) B1 B2 f(x) B1andf(x) B2 x (B1)andx (B2) x (B1) (B2).(iii)Theresultfollowsfromx (B1 B1) f(x) B1 B2 f(x) B1orf(x) B2 x (B1)orx (B2) x (B1) (B2).Whenweconsidertheconverseof(i)werealizethatwehavenocontroloverelementsofB1whicharenotvaluesofthefunction.Togiveaverysimpleexampleconsiderthefunctionf:{a}→{a,b}definedbyf(a)=a.TakeB1={b}andB2={a}.Then (B1)= (B2)={a}whereasclearly .Thus

[Theimplicationdoesholdiffisasurjectionandthereadershouldconsiderhowtowriteouttheproofofthis.]

Exercises10(page132)10.1SinceXisfiniteofcardinalitynthereexistsabijectionf: n→X.SupposethatYisalsofiniteofcardinalityn.Thenthereisabijectiong: n Y.Sinceabijectionisinvertiblewecannowwritedownabijectionasrequired,g f–1:X nY.

Conversely, given a bijectionh:X YweCan deduce that |Y| is finite of cardinalityn bywritingdownthebijectionh f: n X Y.

10.2ThestatementP(n)tobeprovedbyinductionis:‘GivenanycollectionX1,X2,...,Xnofpairwisedisjointfinitesets,theirunionisfiniteand|X1 X2 ... Xn}=|X1|+|X2|+...+|Xn|.’Basecase:Forn=1thisjustsays|X1|=|X1|whichisclearlytrue.Inductivestep:Supposethattheresultholdswhennissomepositiveintegerk.Todeducethattheresultholdsforn=k+1,supposethatX1,X2,...,Xk+1issomecollectionofk+1finitesets.Then,byinductivehypothesistheunionofthefirstkofthesesetsisfiniteand

Hence,bytheadditiontheorem,(X1 ... Xk) Xk+1isafinitesetand

sothattheresultholdsforn=k+1.Hencebyinductiontheresultholdsforallpositiveintegersn.

10.3ThecardinalityofX×Yis3×2=6.Anexplicitbijectionf: 6 X×Yisgivenbythefollowingtable.

10.4 This sort of question is probably best answered using aVenn diagram.LetT denote the set oftriangular tiles,Rdenote thesetof red tilesandWdenote the setofwooden tiles.Thenwehave the

Page 241: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Venndiagramonthenextpage.Thetotalnumber in thewholesquare is144andwewish toknowthenumber in theouterregion

representing(W R T)c.Thereareeightdisjointregionsandwecancalculatethenumbersintheothersevenregionsfromthegivendataasfollows.Wearegiventhat|W R T|=23.Sincewearegiventhat|W R|=36wesee,fromtheadditiontheorem,that|(W R)–(W R T)|=13.Continuinginthiswaywe can fill in the numbers as shown.Nowwe can calculate |W R T| = 121. So again using theadditiontheoremweget|W R T)c|=144–121=23.Hencethereare23blueplasticsquaretiles.

Alternativelywecanuse the inclusion–exclusionprinciple (Proposition10.3.2)withoutdrawingadiagram.Thisgives

whichgivesthesameresultasbefore.

Exercises11(page143)11.1Theproofisbyinductiononn.Basecase:Forn=1,iff: 1 XisasurjectionthenwemusthaveX={f(1)}andso|X|=1.Inductivestep:Supposethatforsomek 1theresultholdsforn=k.Todeducetheresultforn=k+1,supposethatf: k+1 Xisasurjection.Therearetwocases.

(i)Supposethatf| k: k Xisasurjection.Then,byinductivehypothesis,Xisfiniteand|X| ksothatcertainly|X| k+1,asrequiredfortheinductivestep.(ii)Otherwise andsowemaydefineafunctionf1: k X–{f(k+1)}byf1(i)=f(i).Thistooisasurjectionandso,byinductivehypothesis,|X–{f(k+1)}| k.Hence,bytheadditiontheorem,|X| k+1,asrequiredfortheinductivestep.

Thiscompletestheproofoftheinductivestep.Hence,byinduction,theresultistrueforallpositiveintegersn.

11.2 Suppose that c1 andc2 aremaximum elements ofA, a set of real numbers. Then, since c1 is a

Page 242: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

maximumandc2 A,c1 c2,andsincec2isamaximumandc1 A,c2 c1.Hencec1 c2andc1 c1sothatc1=c2asrequired.

11.3Checkingthepossibilitiesgives:

HenceD(88) D(136)={±1,±2,±4,±8}sothatthegreatestcommondivisor(88,136)=8.

11.4Supposethatcisacommondivisorofa/dandb/d.Then,sincecdividesa/d,a/d=cqforsomeq so thata =cdq and thus cd dividesa. Similarly, since c divides b/d then cd dividesb [fill in thedetails].Hencecdisacommondivisorofaandbandsocd dbythedefinitionofd.Butifcd dthenc 1(sinced ispositive).Thuseverycommonfactorofa/dandb/d is lessthanorequal to1andso(a/d,b/d)=1asrequired.

11.5ByCorollary11.1.5,|X| |Y|.Thus thestatementsweareaskedtoprovearecontrapositives.Weprove the statements and the implications in the other directions follow since they are thecontrapositives.

(i)Clearly,ifX=Ythen|X|=|Y|.

(ii)SupposenowthatX Y(inotherwordsXisapropersubsetnotcontainingeveryelementofY).Lety0 Ybeanelementsuchthaty0 X.ThenX–{y0}isafiniteset(Corollary11.1.5again)andbytheadditiontheorem|X–{y0}|=|X|–1.HencebyCorollary11.1.5|Y| |X|–1andso|Y|<|X|.

11.6LetAbeasetofpositiveintegerswithoutaleastelement.Weprovethat n +–Aforallnbyinduction.Basecase:If1 Aitwouldbetheleastelement,whichisimpossible.Hence1 +–A.Inductivestep:Supposeasinductivehypothesisthat k +–Aforsomepositiveintegerk.Thenifk+1 Aitwouldbetheleastelementbyinductivehypothesis,whichisimpossible.Hencek+1 +–Aandso,usingtheinductivehypothesisagain, k+1 +–A,completingtheinductivestep.Hence n +–Aforallnsothatinparticularn Aforalln,whichmeansthatAistheemptyset.

This proves that if a set of positive integers does not have a least element then it is empty. Thecontrapositiveofthisstatementisthewell-orderingprinciple,whichisthereforealsoproved.

Exercises12(page155)12.1ContinuingPascal’strianglefromthelastlineonpage151weobtainthefollowing.

Fromthiswecanreadoffthat andbythebinomialtheoremthisistherequiredcoefficient.

Page 243: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

12.2Bythebinomialtheoremtherequiredcoefficientis andtheformulaevaluatesthisas100!/2!98!=(100×99)/(2×1)=4950.

12.3 (i) Let X be the set of three people and Y the pack of 52 cards. Then each group selectioncorrespondstoaninjectionX Y.ByProposition12.1.4thenumberofpossibilitiesis(52)3=52×51×50=132600.

(ii)Eachsetofthreecardsisanelementof 3(Y).ByDefinition12.2.4thenumberofpossibilitiesis.

12.4 (i) Let X be the set of three people and Y the set of five dishes. Then each group selectioncorrespondstoafunctionX Y(sincetwoormoremayselectthesamedish).ByProposition12.1.2thenumberofpossibilitiesis53=125.

(ii)CalculatingthenumberofpossibleordersforthechefiscomplicatedbythefactthattwoormorepeoplemayselectthesamedishsothatwearenotsimplycountingsubsetsofY.Thepossibilitiesareasfollows.Ifthethreedishesaredistinctthenthepossibilitiesaretheelementsof 3(Y)andsothenumberis .Ifonlytwodistinctdishesareselectedthenonemustbeselectedonceandtheothertwicesothatthepossibilitiescorrespondtoinjections 2 Yandthenumberis(5)2=5×4=20.Ifallthree people select the same dish then the number of possibilities is 5. So the total number ofpossibilitiesis10+20+5=35.

[Thisapproachtotheproblemisrathercumbersomeandwouldbedifficulttoapplyifthenumberswerea little larger– thinkaboutapplying it to find thenumberofpossibleordersbyfivepeopleselectingfromamenuofeightitems.Alessdirectapproachgivesasimplercalculation.LetY={y1,y2,y3,y4,y5}.Theneachordercorrespondstoatriple(yi1,yi2,yi3)wherei1 i2 i3.Abijectionfromthissetoftriplesto 3( 7)isgivenby(yi1,yi2,yi3) {i1,i2+1,i3+2}.Hencethenumberofordersis.This argument can be used to show that the number of possible selections ofk objects (repetitionspermitted)fromnobjectsisgivenby .So,forexample,iffivepeopleselectfromamenuofeightitemsthenumberis .]

12.5Thecoefficientofxnin(1+x)2nis .

Intheproduct(1+x)n(1+x)nthetermscontributingtox2nhavetheform .Hence

asrequired.

12.6Supposethatthenconsecutiveintegersarek+1,k+2,...,k+n.Thebinomialcoefficient isgivenby(k+n)n/n!.Sincethisisanintegerbydefinition,itfollowsthatn!divides

theproductofthegivensetofintegers.

12.7Bythebinomialtheorem,

Page 244: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

separatingouttherealandimaginarypartsandusingi2=–1.However, andso(1+i)n=2n/2exp(in /4).Thegivenresultfollowsonequatingthereal

partsofthesetwoexpressionsfor(1+i)nusingthefactthat

Similarly,byequatingtheimaginarypartsweobtain

Exercises13(page169)

13.1Supposeforcontradictionthatthereisrationalnumberqsuchthatq2=3.Writeqasafractioninlowestterms:q=a/bsothataandbareintegerssuchthat(a,b)=1.Nowq2=3 a2/b2=3 a2=3b2a2isdivisibleby3.Itfollowsthatamustbedivisibleby3.Thuswecanwritea=3a1forsomea1 .Butthen isdivisibleby3

bisdivisibleby3,asabove.Hence3isacommonfactorofaandbsothat(a,b) 1,contradictingthechoiceofaandbandgivingtherequiredcontradiction.

Hencetheredoesnotexistarationalnumberwhosesquareis3.

13.2Calculationgives

Hence ....

13.3Thesameargumentfor leadstoq2=4 a2/b2=4 a2=4b2 a2isdivisibleby4.However,itdoesnotnowfollowthataisdivisibleby4,e.g.wecanhavea=2.Allwecanproveisthat4dividesa22dividesabutthisdoesnotleadtoacontradictionsince .Ofcoursetheredoesexistarationalnumberwhosesquareis4,namely2=2/1.

13.4Fromthedefinition,

Page 245: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

whichiscertainlytrue.

13.5Let .Then fromwhichit followsthat9999x=17782.345–1.778=17780.567=17780567/1000.Itfollowsthatx=17780567/9999000.

Exercises14(page181)14.1TheresultistrivialifAisemptysincethenA B=B.

Supposeotherwisethat|X|=n +.Thenthereisabijectionf: n A.SinceBisdenumerablethereisabijectiong: + B.WecannowcountA BbyfirstcountingthefinitesetAandthencountingB(wecannotdoittheotherwayroundorwewouldnevergettoA).Thisgivesafunctionh: + A Bdefinedby

Thisfunctionisasurjectionsincefandgaresurjections.ForittobeaninjectionweneedA B= forotherwiseanycommonelementswillbecountedtwice.ButsolongasA B= thenitisaninjectionsincefandgare.ThushisabijectionasrequiredtoproveA Bdenumerable.

IfAandBarenotdisjoint,replaceAintheaboveargumentbythefinitesetA–B.

[ThisargumentshouldbecomparedwithTheorem10.2.1andProposition10.3.1.]

14.2InthesamewayasinthepreviousresultwemayassumethatAandBaredisjointbyreplacingAbyA–B.ByProposition14.2.5,A–Biseitherfinite(inwhichcasewecanquotethepreviousresult)ordenumerable.

Tocounttwodisjointdenumerablesetswecannotcountoneandthentheothersincewewillnevergettotheelementsinthesecond.Weovercomethisbyalternatingbetweenthesetsaswecount.Letf:+ Xandg: + Ybebijections.Thenwecandefineabijectionh: + X Yby

Suppose thatX isuncountableandA X isdenumerable.Suppose for contradiction thatX –A iscountable, i.e. finite or denumerable. Then, by what has just been proved, X – A (X – A) isdenumerable,contradictingtheuncountabilityofX.HenceX–Aisuncountableasrequired.

14.3Usinginductionwecandeducefromthepreviousresultthatanyfiniteunionofdenumerablesetsisdenumerable.However,thismethodwillnotdealwithadenumerablesetofsets.Toseehowtodothis,usethefactthatAnisdenumerabletolisttheelements:

Page 246: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Wecannowdisplayalltheelementsintheunionofthesetsinadoublearrayasshownatthetopofthenextpage.ThislooksverysimilartothearrayintheproofofProposition14.2.3andsowecanusethesamediagonalmethodofcountingasindicated.

Thisgivesthebijection :

[Theconditionthatthesetsaredisjointisnotnecessaryforthisresult.Thereadermightliketoconsiderhowtodeducethegeneralcasefromthespecialcaseofdisjointsets.]

14.4 Suppose thatX andY are two sets such that |X| |Y| and |Y| |X|.We prove that |X| = |Y| bycontraction.Suppose,forcontradiction,that|X| |Y|.Then,since|X| |Y|,wehave|X|<|Y|and,since|Y||X|,wehave|Y|<|X|.But,bydefinition,if|X|<|Y|thereexistsaninjectionX Yand,bytheCantor-Schröder-Bernsteintheorem,if|Y|<|X|,theredoesnotexistaninjectionX Y.Thuswehaveobtainedacontradictionsothatourassumptionthat|X| |Y|isfalse.Hence|X|=|Y|asrequired.

[The statement proved in this exercise is themore usual statement of theCantor-Schröder-Bernsteintheorem.]

Exercises15(page197)15.1(i)100=3×33+1 q=33,r=1.(ii)3=100×0+3.(iii)100=7×14+2.(iv)–100=7×(–15)+5.(v)–105=7×(–15)+0.(vi)–3=105×(–1)+102.(vii)7684=4148×1+3536.(viii)–7684=4148×(–2)+612.(ix)1234567=1357×909+1054.(x)0=17×0+0.

15.2Firstofallnoticethat,ifaisdivisibleby5,thena=5qandsoa2=25q2=5(5q2)isdivisibleby5.Fortheconversesupposethata2isdivisibleby5and,forcontradiction,thataisnotdivisibleby5.

Then,bythedivisiontheorem,a=5q+1,a=5q+2,a=5q+3ora=5q+4.However,

Page 247: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Henceineachcasetheremainderisnon-zeroandso,bythedivisiontheorem,a2isnotdivisibleby5,givingtherequiredcontradiction.Hence,ifa2isdivisibleby5thensoisaasrequired.

15.3Firstofallnoticethatifa2isdivisibleby9thenitiscertainlydivisibleby3.Fortheconverse,ifa2isdivisibleby3then,byProposition15.2.1,aisdivisibleby3,i.e.a=3qandsoa2=9q2isdivisibleby9.

15.498765432=3×32921810+2hasremainder2afterdivisionby3andsobyProposition15.2.3itisnotaperfectsquare.

15.5Supposethatnisaperfectsquare,sayn=a2forsomeintegera.Thenaiseitherevenorodd,i.e.a=2q0ora=2q0+1forsomeintegerq.Hence .sothatn=4q(where

)orn–4q+1(where )asrequired.However, 1234567=4× 308641+3 has remainder 3 after divisionby4 and so is not a perfect

square.

15.6Tofindthefirstdecimalplacea1observethat50=7×7+1sothat7/10<5/7<8/10anda1=7.Continuinginthiswayweobtainthefollowing.

Atthispointthecalculationgoesbacktothebeginningandsothedecimalplacesbegintorecurgiving.

Exercises16(page206)16.1ApplyingtheEuclideanalgorithmgivesthefollowingsequenceofremainders.

Page 248: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Thus(7684,4148)=68.

16.2ApplyingtheEuclideanalgorithmgivesthefollowingsequenceofremainders.

Thus(11033442,1102246)=578.

16.3Intheexampleswehavedonewehavealwaysputa>b,writingdownthelargernumberfirst.Ifwechangetheorderofthenumberssothata0=b<a1=athenthefirststepoftheEuclideanalgorithmwillread

and so (using thenotationofTheorem16.2.1)a2 = r1 =a0. Sincewe nowhavea1 =a,a2 = b, theremaining steps of the algorithm are identical to the stepswhich arise fromwriting down the largernumberfirst.

Sotheorderofthenumbersdoesnotreallymatter.Ifthesmallernumberiswrittendownfirstthenthefirststepsimplyswitchestheordersothatthereisthisoneextrastep.

16.4Supposethatc D(b,r).Then,sincecdividesb,b=cq1forsomeintegerq1,and,sincecdividesr,r=cq2.Itfollowsthata=bq+r=c(q1q+q2)sothatcdividesaandc D(a,b).ThusD(b,r) D(a,b).

Exercises17(seepage215)17.1 Extending the table of Solution 16.1 to keep track of the linear combinations we obtain thefollowing.

Fromthisweseethat68=7684×27+4148×(–50)andcheckingthisdoesgive207468–207400=68.

Henceonepossiblesolutionism=27,n=–50.

17.2Fromtheprevioussolutiononepossiblesolutionism=27,n=50.

17.3ExtendingthetableofSolution16.2weobtainthefollowing.

Page 249: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Hence11033442×803+1102246×(–8038)=578andsoonepossiblesolutionism=803,n=–8038.

[Itisnotsoeasytocheckthissolutiononacalculatorsinceratherlargenumbersarise!]

17.4AsintheproofofLemma16.1.2weprovethisresultbyprovingthatthesetofcommondivisorsofa,bandcisequaltothesetofcommondivisorsofgcd(a,b)andc.Wecanprovethisasfollows:

Now, since the two sets of common divisors are equal theymust have the same greatest element asrequired.

From this and Exercise 16.2 we obtain gcd (11033442, 1102246, 6035) = gcd (578, 6035). TheEuclideanalgorithmappliedtothesetwointegersgivesthefollowingsequenceofremainders.

Hencegcd(11033442,1102246,6035)=gcd(578,6035)=17.

17.5Extendingthetableintheprevioussolutiontokeeptrackofthelinearcombinationsweobtainthefollowing.

Hence

Henceonesolutionism=75482,n=–755572,p=–9.

17.6 Ifa1b2=a2b1 thena2 dividesa1b2.But then, ifa2 andb2 are coprime,a2 dividesa1 and so in

Page 250: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

particulara2 a1.Butbysymmetrythesameargumentcanbeusedtoprovethata1 a2sothata1=a2.Itfollowsfromaa1b2=a2b1thatb1=b2.

Notice that this resultproves that the fraction in lowest terms representinga rationalnumber (seeDefinition13.1.3)isuniquesincea1b2=a2b1 a1/b1=a2/b2.

Exercises18(page224)18.1FromExercise16.1,(7684,4148)=68.Nowsince272=68×4weseethat68divides272sothatthediophantineequationsdoeshavesolutions.

FromExercise 17.1, 7684 × 27 + 4148 × (–50) = 68.Multiplying through by 4we see that onesolutiontotheequationisgivenbym=27×4=108,n=(–50)×4=–200.

Thus,form,n ,

Thusthesolutionstothediophantineequationaregivenby

18.2Noticethat7684m–4148n=272 7684m+4148(–n)=272.Sothesolutionsaregivenby

18.3Applying theEuclidean algorithm to the integers 516 and 564 gives the following sequence ofremaindersexpressedasintegerlinearcombinationsof516and564.

Since12divides6432therearesolutions.Since6432/12=536asolutionisgivenbym=–12×536=–6432andn=11×536=5896.Thus,tofindthegeneralsolution,

Page 251: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Tofindpositivesolutionsnoticethatm>0 –6432+47q>0 47q>6432 q>6432/47=136+40/47 q 137.Similarly,n>0 5896–43q>0 43q<5896 q<5896/43=137+5/43 q 137.Thustheonlysolutionwithmandnbothpositivearisesfromq=137.Thisgivestheuniquepositivesolution(m,n)=(7,5).

[If we are only seeking positive solutions to this particular problem then it is quicker to try thepossibilitiessincenecessarilyn<6432/564,i.e.n 11.Wesimplytryeachpositiveintegerlessthan12inturntoseewhether6432–564nisdivisibleby516.]

Exercises19(page239)19.1From1998to2045thereare12leapyears.Hencethedaynumberof6September2045is366×12+365×35+31×5+30×2+28×1+6.Workingmodulo7inordertoobtaintheremaindermodulo7gives2×5+1×0+3×5+2×2+0×1+6=10+15+4+6 3+1+4+6=14 0.Hencethedayoftheweekisthesameas7January1998,namelyWednesday.

[IntheGregoriancalendarwhichisatpresenttheinternationallyacceptedcalendar,yearnisaleapyearwhennisdivisibleby4butnotby100,ornisdivisibleby400.Thus2000willbealeapyearbut1900wasnot‡.]

19.2a1 a2andb1 b2modm a1–a2=mq1andb1–b2=mq2(forsomeintegersq1andq2) (a1–b1)–(a2–b2)=(a1–a2)–(b1–b2)=mq1–mq2=m(q1–q2) a1–b1 a2–b2modm.

19.3Ifn=akak–1...a2a1a0indecimalnotation,then

since10 1mod3sothat10i 1forpositiveintegersi.Sinceanintegermisdivisibleby3ifandonlyifm 0mod3weseethatnisdivisibleby3ifandonlyifak+ak–1+...+a2+a1+a0isdivisibleby3.

19.4(i)6x 24mod45 2x 8mod15 x 4mod15since(2,15)=1.Hence6x 24mod45 x 4mod15,i.e.6x 24mod45 x 4,19or34mod45.Wecandescribethesolutionsetas{4+15g|q }.

(ii)10x 15mod45 2x 3mod9 2x 12mod9 x 6mod9since(2,9)=1.Hence10x 15mod45 x 6mod9,i.e.10x 15mod45 x 6,15,24,33or42mod45.Wecandescribethesolutionsetas{6+9q|q }.

19.5ab1 ab2modm mod by Proposition 19.3.1 b1 b2 mod byProposition19.3.2,sincea/(a,m)andm/(a,m)arecoprime(byExercise11.4).

Exercises20(page249)20.1(i)Since(3,11)=1thereisauniquesolutionmodulo11.Eithertrytheintegers0to10inturnorsay3x 5 –6mod11. x –2 9mod11toseethatthesolutionsaregivenbyx 9mod11.

Page 252: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

(ii)Since(10,35)=5whichdoesnotdivide16therearenosolutions.

(iii)Since(10,35)=5divides5therearesolutions.Tofindthem:10x 5mod35 2x 1 8mod7x 4mod7.

(iv)Since(10,21)=1thereisauniquesolutionmodulo21.Tryingtheintegersfrom0to20inturnwefindthatthesolutionisx 16mod21.

Alternatively,wecansaysomethinglike10x 13mod21 10x 13+147=160mod21 x 16mod21.

20.2(i)ApplyingtheEuclideanalgorithmto341and912andwritingeachremainderasamultipleof341modulo912givestheequationsatthetopofthenextpage.

Thus341and912arecoprimesothatthecongruencehasauniquesolutionmodulo912.Since341×(–115) 1mod912,theuniquesolutionisgivenbyx –115×15=–1725 99mod912.

Hence341x 15mod912 x 99mod912.

(ii)ApplyingtheEuclideanalgorithmto341and913givesthefollowingsequenceofremainders.

Hencegcd(341,913)=11andsothecongruence341x 15mod913hasnosolutionssince15isnotdivisibleby11.

(iii)ApplyingtheEuclideanalgorithmto345and912andwritingeachremainderasamultipleof345modulo912givesthefollowing.

Hencegcd(345,912)=3whichdivides15sothatsolutionstothelinearcongruenceexist.Since15/3=5onesolutionisgivenbyx –37×5=–185mod912.

Tofindallthesolutionsobservethat

Page 253: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

since115and304arecoprime(becausewehavedividedthroughbythegreatestcommondivisor).Thus345x 15mod912 x=119mod304or, if it isdesired towrite thesolutionmodulo912,

345x 15mod912 x 119,423or727mod912.

20.3Whena 0modmthelinearcongruencebecomessimply0 bmodmandsohasnothingtodowithx.Itwillbesatisfied(forallvaluesofx)whenbisamultipleofmandwillnotbesatisfied(foranyvalueofx)whenbisnotamultipleofm.

ThisispreciselywhatTheorem20.1.7reducestointhiscase.Forifa=0thengcd(a,m)=msothatthereisasolutionifandonlyifmdividesb.Inthiscasetherearemdifferentsolutionsmodulomwhichmeansthateverythingisasolution.

[AtfirstglanceTheorem20.1.7makesnosenseatallwhena=0butaftercarefulconsiderationweseethatitdoesmakessensebuttellsussomethingratherobvious.Thisphenomenonisquitecommon.Ifwehave obtained some general result then it can beworthwhile thinkingwhat itmeans in particularlysimplecases.Ifitdoesn’tworkinsuchcasesthenthiscanindicatethatsomethinghasbeenmissedinthegeneralsituation.]

Exercises21(page261)21.1Supposethat[a1]m=[a2]mand[b1]m=[b2]m.Thena1 a2and,b1 b2modmsothata1+b1 a2+b2modmanda1–b1 a2–b2modm(byProposition19.1.3).Hence[a1+b1]m=[a2+b2]mand[a1–b1]m=[a2–b2]msothatadditionandsubtractionin marewell-defined.

21.2Theseresultsareimmediatesincebydefinition(Definition19.2.3)rm(c) cmodmforallintegerscandsoinparticularfora+b,a–bandab.

21.3ThemultiplicationtableforR12isgivenbelow.Fromthis,lookingwhichrowscontain1,weseethat1,5,7and11aretheinvertibleelementsand

thateachisitsowninverse.

[Noticethatthesearepreciselythepositiveintegerslessthan12whicharecoprimeto12illustratingtheresultofthenextexercise.]

21.4The integera is invertiblemodulompreciselywhen the linearcongruenceax 1modm has asolution.ByTheorem20.1.7,thiscongruencehasasolutionifandonlyifaandmarecoprimeandsothisisacriterionforatobeinvertiblemodulom.

Page 254: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

21.5 FromExample20.2.2we see that 290 and357 are coprime and tha290× (–16) 1mod 357.Hence([290]357)–1=[–16]357=[341]357.

(i)290x 2mod357 x –16×2=–32 325mod357 x 325mod357.

(ii)290x 5mod357 x –16×5=–80 277mod357 x 277mod357.

(iii)290x 355mod357 x –16×355 –16 (–2)=32mod357 x 32mod357.

21.6Toprovethatthefunctiongiswell-definedsupposethat[a1]m=[a2]m.Thena1 a2modmsothatrm(a1)=rm(a2)modm(byProposition19.2.4).Itfollowsthatrm(a1)+1=rm(a2)+1asrequired.

Toseethatgistheinverseoffobservethat,fori m,[a]m=f(i) [a]m=[i–1]m a i–1modrm(a)=i–1(sincei–1 Rm) rm(a)+1=i g([a]m)=i.

Exercises22(page269)22.1 (i) This is the same as congruencemodulo 2 and so is an equivalence relation. There are twoequivalenceclasses:theoddintegersandtheevenintegers.

(ii)Thisisnotreflexive(0 0),issymmetric(sincea+b=b+a)andnottransitive(since0~1and1~0but0 0).

(iii)Thisisnotreflexive(1 1),issymmetric(sincea+b=b+a)andnottransitive(since1~2and2~1but1 1).

(iv)Thisisanequivalencerelation.Theequivalenceclassesare{0},{1,–1},{2,–2},{3,–3},....

(v)Thisisnotreflexive(2 2),issymmetrica~b a=1andb=1 b~a)andistransitive(a~bandb~c a=b=c=1 a~c).

(vi)Thisisnotreflexive(2 2),issymmetricandisnottransitive(2~1and1~2but2 2).

(vii)Thisisanequivalencerelation.Theequivalenceclassesarelinesparalleltothey-axis.

(viii)Thisisanequivalencerelation.Theequivalenceclassesarecircleswithcentretheorigin.

22.2Theequivalencerelationmaybedescribedbya~b ab>0ora=b=0.

22.3Toseethatfisasurjectionsupposethata .Ifa>0thenf(a,0)=a;ifa=0thenf(1,1)=0;andifa<0thenf(0,–a)=a.Thusfisasurjection.Theequivalencerelationisgivenby(x1,x2)~(y1,y2)x1–x2=y1–y2.Theequivalenceclasseshavetheform{(x1,x2)|x1–x2=k}forsomek .

[This example gives one method of defining the set of integers starting from the set of positiveintegers +:wemaydefine tobethesetofequivalenceclassesoftheaboveequivalencerelationon+.]

Exercises23(page287)23.1ApplyingthesieveofErastosthenesgivesthearrayonthenextpage.

Thustheprimeslessthan200are2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,

Page 255: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199(46inall).

23.24148=22×17×61.7684=22×17×113.Hencegcd(4148,7684)=22×17=68.

[ThisisthesameresultasobtainedinExercise16.1bytheEuclideanalgorithm.EvenwithnumbersofthissizethemethodusedinChapter16ismoreefficient.]

23.3Forn=41,n2–n+41=412–41+41=412.

23.4For2 i n+1 the integer (n+1)!+ i is divisible by i and so is composite.This provides asequenceofnconsecutivecompositenumbers.

23.5 By the fundamental theorem of arithmetic an integer is not coprime topk if and only if it is amultipleofp.Butnow1 pq pkifandonlyif1 q pk–1andsotherearepk–1positiveintegersnotexceedingpkwhicharenotcoprimetopk.Hencethenumberwhicharecoprimetopkispk–pk–1.

23.6Supposeforcontradictionthatthereisarationalnumberq suchthatq3=2.Writeq=a/bwherea,b +.Thena3=2b3.Let2<p2< ...<prbe theprimesoccurringas factorsofaorofb. Then

and wherekiandliarenon-negativeintegers.Thismeansthatand .Butby the fundamental theorem these expressionsmustbe the sameand so inparticular 3k1 = 3l1 + 1 which is impossible for integers k1 and l1. This provides the necessarycontradictiondemonstratingthatourhypothesisthatthereexistsarationalcuberootof2isfalseandsoprovingthatnosuchrationalnumberexists.

23.7Theproofthateveryinteger4q+1forq +isaproductofpseudo-primesisbystronginductiononq.Basecase:5(q=1)isaprimeandsoapseudo-prime.

Page 256: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Inductivestep:Supposeasinductivehypothesisthateachnumber4q+1isaproductofpseudo-primesfor1 q k.If4(k+1)+1isapseudo-primethenitisaproductofa(single)pseudo-prime.Otherwisewecanwrite4(k+1)+1=abwherea>1andb>1anda b 1mod4.But then,by inductivehypothesisaandbmaybewrittenasproductsofpseudo-primessothat,bycombiningtheseproducts,wewrite4(k+1)+1asaproductofpseudo-primes.Henceinbothcases4(k+1)+1isaproductofpseudo-primes,provingtheinductivestep.Hencebyinduction,4q+1isaproductofpseudo-primesforallq 1.

Noticethataproductoftwoprimescongruentto3modulo4isnecessarilyapseudo-prime.Soforexample3×3=9,3×7=21and7×7=49arepseudo-primes.Thus9×49=21×21=441hastwodistinctexpressionsasaproductofpseudo-primes(andthisisthesmallestsuchnumber).

Exercises24(page294)

24.1ByFermat’stheorem216=1mod17.Hence21000000 1mod17since16divides1000000andsotheremainderafter21000000isdividedby17is1.

24.2ByFermat’stheorem,ap–1 1modpandap amodpsothata2p–1 amodp.Thismeansthatpisaprimefactorofa2p–1–a.However,a2 amod2andso,byinductiononn,an amod2forallpositiveintegersn.Inparticular2isaprimefactorofa2p–1–a.Sincepisodd,itfollowsthat2pisadivisorofa2p–1–a,i.e.a2p–1 amod2p.

24.3ByFermat’stheorem,716 1mod17andsoaninverseof7modulo17isgivenby715.Now72=49 –2,so74 4,78 16 –1sothat715 –1×4×(–2)×7=56 5.Hence5istheinverseof7modulo17.

24.4Theproofisbycontradiction.Supposethatn>2,(n–1)! –1modnbutthat,forcontradiction,nisnotprime.Thenthereisanintegerasuchthat1<a<nwhichdividesn.

(i)Since1<a<n,itfollowsthat1<a n–1andso(n–1)! 0moda.

(ii)Sinceadividesnand(n–1)! –1modnitfollowsthat(n–1)! –1modaandso,sincea>1,(n–1)! 0moda.

Thisgivesthenecessarycontradiction.Henceourassumptionthatnisnotprimemustbefalseandsonisprimeasrequired.

24.5Firstofallnoticethatpq–1+qp–1 qp–1 1modpbyFermat’stheoremsincepandqarecoprimebeingdistinctprimes.Similarlypq–1+qp–1 1modq.Thuspandqareamongsttheprimesintheprimefactorizationofpq–1+qp–1–1whichmustthereforebedivisiblebypq.Hencepq–1+qp–1 1modpq.‡ThisproofisdiscussedinmoredetailinChapter7(Proposition7.3.2).†ForadiscussionofdifferentcalendarsandaformulaforthedayoftheweekofanydateseeK.H.Rosen,Elementarynumbertheoryanditsapplications,Addison-Wesley,Secondedition1988.

Page 257: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Bibliography:suggestionsforfurtherreading

G.BirkhoffandS.MacLane,Asurveyofmodernalgebra,Macmillan,Fourthedition1977.CarlB.BoyerandUtaC.Merzbach,Ahistoryofmathematics,Wiley,Secondedition1989.VictorBryant,Yetanotherintroductiontoanalysis,CambridgeUniversityPress,1990.DavidM.Burton,Elementarynumbertheory,AllynandBacon,1976.HaroldDavenport,Thehigherarithmetic,anintroductiontothetheoryofnumbers,Cambridge

UniversityPress,Sixthedition1992.DonaldM.Davis,Thenatureandpowerofmathematics,PrincetonUniversityPress,1993.KeithDevlin,Sets,functionsandlogic,anintroductiontoadvancedmathematics,Chapmanand

Hall,Secondedition1992.A.Gardiner,Infiniteprocesses,backgroundtoanalysis,Springer-Verlag,1982.CarlFriedrichGauss,Disquisitionesarithmeticae(translatedbyArthurA.Clarke),Springer-

Verlag,1986.RodHaggerty,Fundamentalsofmathematicalanalysis,Addison-Wesley,Secondedition1993.J.F.HumphreysandM.Y.Prest,Numbers,groupsandcodes,CambridgeUniversityPress,1989.KennethH.Rosen,Elementarynumbertheoryanditsapplications,Addison-Wesley,Second

edition1988.AlanTucker,Appliedcombinatorics,Wiley,1995.DanielJ.Velleman,Howtoproveit,astructuredapproach,CambridgeUniversityPress,1994.

Page 258: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Listofsymbols

P(n),P(m,n)predicates4pi5a b,a=±b6|a|modulusofa7,93implies10doesnotimply12endofproof17a(i)sum46

xnpower48,56,109,186n!factorial48a(i)product55, +, integers62rationals62,162, +, reals62complexnumbers62, setelements62emptyset65, subset66A Bintersection67A Bunion67A–Bdifference67(X)powerset70Accomplement70(a,b),[a,b],[a,b),(a,b]realintervals72forall75forsome76(x,y) X×YCartesianproduct83cyconstantfunction91Ixidentityfunction91f|Arestrictionoff94gofcomposite94limflimitofsequence96Imfimageoff98,103squareroot105

f–1inversefunction106,111x1/n, nthroot109, 111

A Bsymmetricdifference116[a, ),(a, )realintervals116infinity116Acharacteristicfunction117

n={1,2,...n}124|X|cardinalityofX124,178D(a)divisors140(a,b),gcd(a,b)141Fun(X,Y)functions145(n)mfallingfactorial146Inj(X,Y)injections146Acharacteristicfunction148

Page 259: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

r(X)r-subset149

binomialcoefficient1490alephnull171ebaseofnaturallogarithms180[a,b],lcm[a,b]227a bmodmcongruence232Rmremainders234rm: Rmremainderfunction235[a]mcongruenceclass251mcongruenceclasses253

a~b,a brelation264a~ bpartitionrelation264[a]equivalenceclass267X/~setofequivalenceclasses267(n)primes285

logenaturallogarithm286li(n)logarithmicintegral287(n)Euler’stotientfunction288

Page 260: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Index

absolutevalue7absorptionlaws115abstraction61,144,250addition18,113,161,255,256

additionlawforinequalities24additionprinciple128

alephnull171algebra203algebraicnumber180,187algebraicnumberproperties18,159,256

algebraicstructure18algorithm203,280al-Khowarizmi,Mohammedibn-Musa203all75ambiguity22,141analysis97and7,25antecedent11any75,76Archimedes5

Archimedeanaxiom166arithmetic15,191

arithmeticmoduloaprime290arithmeticofcongruenceclasses254arithmeticofremainders256

arithmeticprogression309arrowpictureofafunction90associativity19,71,96,119asymptotic286axiom17

axiomaticmethod18Babylonians157base48basecase40,44BASIC203Bernoulli’sinequality55bijection102,107,147bijective108Binet,J.P.M.80

Binetformula50binomialcoefficients57,149

binomialtheorem153Bolzano,Bernhard172boundvariable75boxpictureofafunction90calendar231,336Cantor,Georg177

Cantor–Schröder–Bernsteintheorem180,329Cantor’sdiagonalprocess177

cardinality123,178Cartesianproduct83,98,245cause12

Page 261: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

characteristicfunction117,148closedinterval72codes279codomain89Cohen,Paul178commensurable158commondivisor140commutativity18,71,95,119complementofaset70completenessaxiom166complexnumber62,156,159,306compositenumber277compositionoffunctions94conclusion11conditionalstatement12

conditionaldefinitionofset63congruence231,232

congruenceclass231,250,251,262conjunction7consequent11constantfunction91constructivedefinitionofset64continuityaxiom166continuumhypothesis178contradiction30contrapositive34convergence96converse14coordinate83coprimeintegers141,212,242cosinefunction5,109countableset171counterexample79counting123,144,157,170,325

countingargument133,170,250cryptography279cypherization157daysoftheweek231decimal164

decimalarithmetic168delaVallée-Poussin,C.J.286DeMorgan,Augustus71

DeMorganlaws71Dedekind,Richard39,112,158,173,251definition15

inductive45recursive45

Deligne,Pierre152denominator159denumarableset171,174derangement185diagonalset130differenceofsets67Diophantus216

diophantineequation216,245Dirichlet,Lejeune136,218disjointsets67disjunction6disproofbycounterexample79disproofofstatementsinvolvingquantifiers79distributivity19,71divides16

3divisibilityby2399divisibilityby271

Page 262: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

11divisibilityby271division19,159,162,237divisiontheorem141,191,226divisor140,283

domain89dummyvariable64,75e180each75element62emptyset65enumerableset171equalfunctions93equalsets65equipotentsets171equivalenceclass266equivalencerelation265equivalent15,300ErastosthenesofCyrene280

sieveofErastosthenes280Euclid17,50,158,200,217,278,285

Euclideanalgorithm200,202,225,245Euclideanplane84

Eudoxus158Euler,Leonhard4,218,285,289,297

Euler’stotientfunction288,296eveninteger16,142,231,235,250,251,254every75exhaustivecases26existence13,192,287

existentialquantifier76existentialstatement75

exponent48,56,109,186lawsofexponents52,56,186exponentialfunction287

factor140factorial48fallingfactorial146false6Fermat,Pierrede217,289

Fermat’slasttheorem217Fermat’slittletheorem290,297

Fibonacci49Fibonaccinumber49,57,225,272Fibonacci’srabbitproblem57

field18finitedecimal165,186finiteset128,133,136formula91fraction159,268freevariable4,74function89,99,144

oftwovariables317fundamentaltheoremofarithmetic282GalileoGalilei172Gauss,CarlFriedrich232,281,285,297geometricprogession309geometry17given–goaldiagram23Goldbach,Christian4

Goldbachconjecture4goldenratio50graph98greatestcommondivisor(gcd)140,199,207,211,225,227,295grouptheory289

Page 263: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Hadamard,Jacques286half-infiniteinterval116half-openinterval72Hermite,Charles180highestcommonfactor140Hindu–Arabicnumerals157homogeneousequation221HumptyDumpty’sprinciple15hypothesis11identityfunction91if14,106

ifandonlyif15iff15

imageofanelement89imageofafunction97,103,111implication10

implies14inclusionfunction95inclusion–exclusionprinciple131,182,296incommensurable158index48,56,109,186

lawsofindices52,56,186inductionprinciple39,139,184

stronginduction48,88inductivedefinition45

inductivehypothesis40inductivestep40

inequalityaxioms23infinity116

infinitedecimal164,166,186,198,225,296infiniteset128,170infinitesequence97

inhomogeneousequation221injection101,146integer15,62integraldomain18intersectionofsets66intervalofrealnumbers72,116

closed72half-infinite116half-open72open72

inversefunction106,320rightinverse118

inversemodulom260invertiblefunction106invertiblemodulom260irrationalnumber164isomorphism257Ivory,James290Lagrange,Joseph291Lamé,Gabriel203

Lamé’stheorem226leastcommonmultiple(1cm)226,295Legendre,Adrien-Marie218,286Leibniz,Gottfried289

Leibniz’srule185lemma127LeonardoofPisa49limit96Lindemann,Ferdinand180linearcombination207linearcongruence238,240lineardiophantineequation216,258

Page 264: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

Liouville,Joseph180listingelements63,89Littlewood,J.E.287logarithm286

logarithmicintegral287logicalconnectives5lowestterms160magnitude158map89mathematicalinvention27mathematicalstatement3mathematicaltruth17maximum138measurement157minimum138modulararithmetic233

modulus231modulusfunction7,93multiple140,116multiplication18,113,161,255,256

multiplicationlawforinequalities24multiplicationprinciple130

naturallogarithm286naturalnumber62,123necessary14

necessaryandsufficient15negation7negativeinteger157Newton,Isaac153non-constructiveproof259non-existenceresult30not7nullsequence96number123,157

numbertheory15numerator159oddinteger16,32,142,231,250,251,254one-to-onefunction101onlyif14ontofunction102openinterval72or5,25,27,35,304orderaxioms23ordermoduloaprime291,296orderedpair83paradox172partition252,262,266Pascal,Blaise151

Pascal’striangle151Peano,Giuseppe18,62,112

Peano’saxioms112Pearce,Benjamin71perfectsquare197,198permutation147pi5pigeonholeprinciple133,136,146,180,250,259placevaluesystem157positiveintegers62,112powerset70,148,178,262powers48,56,109,186

powersmoduloaprime291predicate4,74,81pre-image102,111primenumber4,277

Page 265: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

primalitytest293primefactor280primefactorization282primenumbertheorem286

primitiveroot291principalvalueofinversecircularfunctions109product55,113proof10,21,77

backwards27bycases25bycontradiction30,163,285bycontrapositive34bycounterexample79byenumeration26byexample77byinduction39,80construction22direct21non-constructive259ofstatementsinvolvingquantifiers77template32,42,44,49

propersubset66proposition3,16,74public-keycryptography279,289Pythagoras158

Pythagoras’stheorem158,161Pythagoreantriples217Pythagoreans158

quantifiers74quotient191rationalnumber62,159,176,268realnumber62,164,166recurringdecimal166,225,296reflexivity233,264relation264relativelyprime141remainder191,231,234

remaindermap235residue234restriction94rightinverse118root109sequence96set61sexagesimalfraction157sinefunction108singletonset70Skewes,S.287solutionset65,245some76squareroot105

squarerootof2irrational162,165,284squaringthecircle180statement3stronginduction48,88,278subset66,148subtraction19,162,255,256successor39,112

successorfunction112sufficient14sum46,113sumofsquares225,236surjection102,184syllogism25

Page 266: An Introduction to Mathematical Reasoningwebéducation.com/wp-content/uploads/2018/08/An... · An introduction to mathematical reasoning: lectures on numbers, sets, and functions

symbols24symmetricdifference116symmetry233,264tangentfunction109then14transcendentalnumber180transitivity24,233,264triangleinequality306trichotomylaw24true6

truthtable6,67truthvalue6

uncountableset171,176unionofsets67uniqueness192,235,243unit277unity19universalquantifier75universalset70universalstatement13,74,301

universalimplication13value4,89Venndiagram68Waring,Edward291well-defined93,125,161,186,235,255,268,273,301well-orderingprinciple139,143,184Wiles,Andrew218Wilson,John291writingmathematics22zero19,157