week 2 tutorial - stanford university

100
Week 2 Tutorial Set Theory and Proofwriting

Upload: others

Post on 26-Feb-2022

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Week 2 Tutorial - Stanford University

Week 2 TutorialSet Theory and Proofwriting

Page 2: Week 2 Tutorial - Stanford University

Outline for Today

● Tutorial Logistics● Welcome! How do these work?

● Set Theory Review● Making sense of a scramble of symbols.

● Proofs on Set Theory● How to go from a theorem to a proof.

● Words of Caution (ITA)● How not to write a set theory proof.

Page 3: Week 2 Tutorial - Stanford University

General Logistics● Welcome to your first tutorial session! Here’s

what to expect each week.● Tutorials are one-hour sessions every week.● It’s best if you choose the same session week to week,

but this is not required.● We will record one session per week. If you’re unable

to attend any tutorials, you may make up the exercises by Friday at noon Pacific time.

● You must attend or make up at least 7/9 tutorials for an A, at least 6/9 for a B, etc. (See the Course Information handout for more details.)

● Attending and making up are equivalent as far as grade calculations.

Page 4: Week 2 Tutorial - Stanford University

Tutorial Format● We’ll be walking through some problems

designed to solidify the concepts covered in this week’s assignment.

● These will focus on problem-solving techniques rather than teaching new content, so the expectation is that you’re caught up on lectures!

● We’ll periodically split off into breakout rooms, where you’ll get a chance to discuss in smaller groups.

Page 5: Week 2 Tutorial - Stanford University

Tutorial Exercises● Each tutorial has a corresponding

assignment in Gradescope consisting of a few short answer questions.

● During the live tutorial sessions, we’ll complete these questions together.

● If you are making up a tutorial, you will be responsible for watching the recording and submitting answers for the exercises on your own.

Page 6: Week 2 Tutorial - Stanford University

Things to Do Right Now● On Zoom, press the “Participants” button. You

should see these nine icons:

● The bottom row may be under the “More…”

option.● We’ll ask you to use these icons for informal

polling. To test it, let’s have everyone press the “coffee mug” icon.”

Page 7: Week 2 Tutorial - Stanford University

Things to Do Right Now● Go to Gradescope (www.gradescope.com)

and pull up “Tutorial Exercises Week 2.”● You’ll need this to be able to submit your

answers as we go.● Go to Canvas, select “Files,” choose

“Tutorial Sessions,” then pick “Tutorial Week 2 Slides.pdf.”● This will help you follow along and will be

necessary for breakout sessions.● Once you’re done, react with .✓

Page 8: Week 2 Tutorial - Stanford University

Introduction:How to Approach CS103

Page 9: Week 2 Tutorial - Stanford University

Mental Traps to Avoid

Page 10: Week 2 Tutorial - Stanford University

● “Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

● “A small minority of people are math geniuses and everyone else has no chance at being good at math.”

● “Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 11: Week 2 Tutorial - Stanford University

● “Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

● “A small minority of people are math geniuses and everyone else has no chance at being good at math.”

● “Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 12: Week 2 Tutorial - Stanford University

● “Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

● “A small minority of people are math geniuses and everyone else has no chance at being good at math.”

● “Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 13: Week 2 Tutorial - Stanford University

● “Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

● “A small minority of people are math geniuses and everyone else has no chance at being good at math.”

“Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 14: Week 2 Tutorial - Stanford University

Time

Ab

ilit

y

“A little slope makes up for a lot of y-intercept.” - John Ousterhout

Page 15: Week 2 Tutorial - Stanford University

Suppose you improve at some skill at a rate of 1% per day. How much better at that skill

will you be by the end of the year?

After one day, you're 1.01 times better.After two days, you're (1.01)2 times better.

After one year, you'll be (1.01)365 ≈ 37.8 times better!

Fun Math Question

Page 16: Week 2 Tutorial - Stanford University

Suppose you improve at some skill at a rate of 1% per day. How much better at that skill

will you be by the end of the year?

After one day, you're 1.01 times better.After two days, you're (1.01)2 times better.

After one year, you'll be (1.01)365 ≈ 37.8 times better!

Fun Math Question

Page 17: Week 2 Tutorial - Stanford University

Suppose you improve at some skill at a rate of 1% per day. How much better at that skill

will you be by the end of the year?

After one day, you're 1.01 times better.After two days, you're (1.01)2 times better.

After one year, you'll be (1.01)365 ≈ 37.8 times better!

Fun Math Question

Page 18: Week 2 Tutorial - Stanford University

Suppose you improve at some skill at a rate of 1% per day. How much better at that skill

will you be by the end of the year?

After one day, you're 1.01 times better.After two days, you're (1.01)2 times better.

After one year, you'll be (1.01)365 ≈ 37.8 times better!

Fun Math Question

Page 19: Week 2 Tutorial - Stanford University

Pro Tip:

Avoid an Ingroup/Outgroup Mindset

Page 20: Week 2 Tutorial - Stanford University

● “Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

● “A small minority of people are math geniuses and everyone else has no chance at being good at math.”

● “Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 21: Week 2 Tutorial - Stanford University

“Everyone else has been doing math since before they were born and there is no way I'll ever be as good as them.”

“A small minority of people are math geniuses and everyone else has no chance at being good at math.”

● “Being good at math means being able to instantly solve any math problem thrown at you.”

Mental Traps to Avoid

Page 22: Week 2 Tutorial - Stanford University

● Math is often driven by seemingly simple problems that no one knows the answer to.

● Example: the integer brick problem:

Is there a rectangular brick where all lines connecting two corners have integer length?

● Having open problems like these drives the field forward – it motivates people to find new discoveries and to invent new techniques.

Simple Open Problems

?

Page 23: Week 2 Tutorial - Stanford University

Getting Good at Math● It is perfectly normal to get stuck or be confused when learning math.

● Engage with the concepts. Work through lots of practice problems. Play around with new terms and definitions on your own time to see how they work.

● Ask for help when you need it. We're here to help you. We want you to succeed, so let us know what we can do to help!

● Work in groups. Get help from your problem set partner, the TAs, and your tutorial session buddies.

Page 24: Week 2 Tutorial - Stanford University

Set Theory Warmup

Page 25: Week 2 Tutorial - Stanford University

1. Answer each of the following questions:a) Which pairs of the above sets, if any, are equal to one another?b) Is D ∈ A? Is D ⊆ A?c) What is A ∩ C? How about A ∪ C? How about A Δ C?d) What is A – C? How about {A – C}? Are those sets equal?e) What is |B|? What is |E|? What is |F|?f) What is E – A? Express your answer in set-builder notation.g) Is 0 ∈ E? Is 0 ∈ F?

Fill in answer on Gradescope!

1. Answer each of the following questions:a) Which pairs of the above sets, if any, are equal to one another?b) Is D ∈ A? Is D ⊆ A?c) What is A ∩ C? How about A ∪ C? How about A Δ C?d) What is A – C? How about {A – C}? Are those sets equal?e) What is |B|? What is |E|? What is |F|?f) What is E – A? Express your answer in set-builder notation.g) Is 0 ∈ E? Is 0 ∈ F?

Fill in answer on Gradescope!

Consider the following sets:

A = { 0, 1, 2, 3, 4 }B = { 2, 2, 2, 1, 4, 0, 3 }C = { 1, {2}, {{3, 4}} }D = { 1, 3 }E = ℕF = { ℕ }

Page 26: Week 2 Tutorial - Stanford University

Proofs on Sets

Page 27: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Page 28: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 29: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 30: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Page 31: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Page 32: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Definition: The set S ∪ T is the set where, for any x:x ∈ S ∪ T when x ∈ S or x ∈ T (or both)

If you know that x ∈ S ∪ T: You can conclude that x ∈ S or that x ∈ T (or both).

To prove that x ∈ S ∪ T: Prove either that x ∈ S or that x ∈ T (or both).

Definition: The set S ∪ T is the set where, for any x:x ∈ S ∪ T when x ∈ S or x ∈ T (or both)

If you know that x ∈ S ∪ T: You can conclude that x ∈ S or that x ∈ T (or both).

To prove that x ∈ S ∪ T: Prove either that x ∈ S or that x ∈ T (or both).

Page 33: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Definition: The set S ∪ T is the set where, for any x:x ∈ S ∪ T when x ∈ S or x ∈ T (or both)

If you know that x ∈ S ∪ T: You can conclude that x ∈ S or that x ∈ T (or both).

To prove that x ∈ S ∪ T: Prove either that x ∈ S or that x ∈ T (or both).

Definition: The set S ∪ T is the set where, for any x:x ∈ S ∪ T when x ∈ S or x ∈ T (or both)

If you know that x ∈ S ∪ T: You can conclude that x ∈ S or that x ∈ T (or both).

To prove that x ∈ S ∪ T: Prove either that x ∈ S or that x ∈ T (or both).

Definition: If S and T are sets, then S ⊆ T whenfor every x ∈ S, we have x ∈ T.

If you know that S ⊆ T: If you have an x ∈ S, you can conclude x ∈ T.

To prove that S ⊆ T: Pick an arbitrary x ∈ S, then prove x ∈ T.

Definition: If S and T are sets, then S ⊆ T whenfor every x ∈ S, we have x ∈ T.

If you know that S ⊆ T: If you have an x ∈ S, you can conclude x ∈ T.

To prove that S ⊆ T: Pick an arbitrary x ∈ S, then prove x ∈ T.

Page 34: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 35: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 36: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Page 37: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

Let’s Draw Some Pictures!

Page 38: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

A

Let’s Draw Some Pictures!

Page 39: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

A B

Let’s Draw Some Pictures!

Page 40: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

A B

Let’s Draw Some Pictures!

Page 41: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

A B

C

Let’s Draw Some Pictures!

Page 42: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C,if A ∪ B ⊆ C, then A ⊆ C.

A B

C

Let’s Draw Some Pictures!

Page 43: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 44: Week 2 Tutorial - Stanford University

Conventions

Intu

itionsD

efinit

ions

What terms are used in this proof?

What do they formally mean?

What does this theorem mean? Why, intuitively,

should it be true?

What is the standard format for writing a proof? What are the techniques

for doing so?

Page 45: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Page 46: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Page 47: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C.

Page 48: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C.

Page 49: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C. Want to

show A ⊆ C.

Want to show A ⊆ C.

Page 50: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C. Want to

show A ⊆ C.

Want to show A ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Page 51: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C. Want to

show A ⊆ C.

Want to show A ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. [...]

Page 52: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. [...]

Want to show A ⊆ C.

Want to show A ⊆ C.

Page 53: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. [...]

Want to show A ⊆ C.

Want to show A ⊆ C.

2. What is the general pattern for proving a

statementof the form S ⊆ T?

Fill in answer on Gradescope!

2. What is the general pattern for proving a

statementof the form S ⊆ T?

Fill in answer on Gradescope!

Page 54: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Want to show A ⊆ C.

Want to show A ⊆ C.

2. What is the general pattern for proving a

statementof the form S ⊆ T?

Fill in answer on Gradescope!

2. What is the general pattern for proving a

statementof the form S ⊆ T?

Fill in answer on Gradescope!

Page 55: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C. Assume

A ∪ B ⊆ C.

AssumeA ∪ B ⊆ C. Want to

show A ⊆ C.

Want to show A ⊆ C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Page 56: Week 2 Tutorial - Stanford University

For any sets A, B, and C, if A ∪ B ⊆ C, then A ⊆ C.

Pick any setsA, B, and C.

Pick any setsA, B, and C.

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

AssumeA ∪ B ⊆ C.

AssumeA ∪ B ⊆ C. Want to

show A ⊆ C.

Want to show A ⊆ C.

Page 57: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Page 58: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

Page 59: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

Page 60: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A BA

C

Page 61: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C

x ∈ C BA

C

Page 62: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C BA

C

Page 63: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C BA

C

Page 64: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C

x ∈ C BA

C

Page 65: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C

x ∈ C BA

C

x

Page 66: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Because x ∈ A, we know that x ∈ A ∪ B. Then, since x ∈ A ∪ B and A ∪ B ⊆ C, we learn that x ∈ C, which is what we needed to show. ■

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C

x ∈ C BA

C

x

Page 67: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Because x ∈ A, we know that x ∈ A ∪ B. Then, since x ∈ A ∪ B and A ∪ B ⊆ C, we learn that x ∈ C, which is what we needed to show. ■

What I’m Assuming What I Need to Prove

A ∪ B ⊆ C

x ∈ A

A ⊆ C

x ∈ C BA

C

x

Page 68: Week 2 Tutorial - Stanford University

Theorem: For any sets A, B, and C, if A ∪ B ⊆ C,then A ⊆ C.

Proof: Let A, B, and C be sets where A ∪ B ⊆ C.We want to show that A ⊆ C. To do so, pick anx ∈ A. We will show that x ∈ C.

Because x ∈ A, we know that x ∈ A ∪ B. Then, since x ∈ A ∪ B and A ∪ B ⊆ C, we learn that x ∈ C, which is what we needed to show. ■

Page 69: Week 2 Tutorial - Stanford University

Why Write Things This Way?

Page 70: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 71: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

Slides by Amy Liu

Page 72: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

3. What’s wrong with this proof?

Fill in answer on Gradescope!

3. What’s wrong with this proof?

Fill in answer on Gradescope!

Slides by Amy Liu

Page 73: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

Slides by Amy Liu

Page 74: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

This is just repeating definitions and not making specific claims about

specific variables.

This is just repeating definitions and not making specific claims about

specific variables.

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

Slides by Amy Liu

Page 75: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

Why is this bad?Why is this bad?

Slides by Amy Liu

Page 76: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, thenC ⊆ A or C ⊆ B (or both).

⚠ Incorrect! ⚠ Proof: Consider arbitrary sets A, B, and C where C ⊆ A ∪ B.

This means that every element of C is in either A or B. If all elements of C are in A, then C ⊆ A. Alternately, if everything in C is in B, then C ⊆ B. In either case, everything inside of C has to be contained in at least one of these sets, so the theorem is true. ■

Did we cover every possible case?Did we cover every possible case?

Slides by Amy Liu

Page 77: Week 2 Tutorial - Stanford University

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 78: Week 2 Tutorial - Stanford University

A

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 79: Week 2 Tutorial - Stanford University

A B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 80: Week 2 Tutorial - Stanford University

A B

A ∪ B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 81: Week 2 Tutorial - Stanford University

A B

A ∪ B

Recall the intuition of a subset being “something I

can circle”

Recall the intuition of a subset being “something I

can circle”

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 82: Week 2 Tutorial - Stanford University

Recall the intuition of a subset being “something I

can circle”

Recall the intuition of a subset being “something I

can circle”

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

A

So C ⊆ A would mean that C is something I can circle in this region.

So C ⊆ A would mean that C is something I can circle in this region.

C

Slides by Amy Liu

Page 83: Week 2 Tutorial - Stanford University

Recall the intuition of a subset being “something I

can circle”

Recall the intuition of a subset being “something I

can circle”

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Likewise, C ⊆ B would mean that C is

something I can circle in this region.

Likewise, C ⊆ B would mean that C is

something I can circle in this region.

B

C

Slides by Amy Liu

Page 84: Week 2 Tutorial - Stanford University

A ∪ B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Slides by Amy Liu

Page 85: Week 2 Tutorial - Stanford University

A ∪ B

But when I look at A∪B, I can draw C as a circle containing elements

from both A and B

But when I look at A∪B, I can draw C as a circle containing elements

from both A and B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

C

Slides by Amy Liu

Page 86: Week 2 Tutorial - Stanford University

A ∪ B

But when I look at A∪B, I can draw C as a circle containing elements

from both A and B

But when I look at A∪B, I can draw C as a circle containing elements

from both A and B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

Do you see why this circle is in neither A nor

B?

Do you see why this circle is in neither A nor

B? C

Slides by Amy Liu

Page 87: Week 2 Tutorial - Stanford University

A ∪ B

Let’s Draw Some Pictures!Claim: If A, B, and C are sets and C ⊆ A ∪ B, then

C ⊆ A or C ⊆ B (or both).

C

4. Using this visual intuition, come up with a counterexample to this claim and write it up

as a disproof. Fill in answer on Gradescope!

4. Using this visual intuition, come up with a counterexample to this claim and write it up

as a disproof. Fill in answer on Gradescope!

Slides by Amy Liu

Page 88: Week 2 Tutorial - Stanford University

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

Slides by Amy Liu

Page 89: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B.

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

Slides by Amy Liu

Page 90: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

A

1

Slides by Amy Liu

Page 91: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

A

1

B

2

Slides by Amy Liu

Page 92: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}, and C = {1, 2}.

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

A

1

B

2

C

Slides by Amy Liu

Page 93: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}, and C = {1, 2}. Now notice that {1, 2} ⊆ A ∪ B so C ⊆ A ∪ B

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

A

1

B

2

C

Slides by Amy Liu

Page 94: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}, and C = {1, 2}. Now notice that {1, 2} ⊆ A ∪ B so C ⊆ A ∪ B, but C ⊆[ A because 2 ∈ C but 2 ∉ A

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

A

1

B

2

C

Slides by Amy Liu

Page 95: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}, and C = {1, 2}. Now notice that {1, 2} ⊆ A ∪ B so C ⊆ A ∪ B, but C ⊆[ A because 2 ∈ C but 2 ∉ A, and C ⊆[ B because 1 ∈ C but 1 ∉ B.

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

1

B

2

A

C

Slides by Amy Liu

Page 96: Week 2 Tutorial - Stanford University

Disproof: We will show that there are sets A, B, and Cwhere C ⊆ A ∪ B, but C ⊆[ A and C ⊆[ B. Consider the sets A = {1}, B = {2}, and C = {1, 2}. Now notice that {1, 2} ⊆ A ∪ B so C ⊆ A ∪ B, but C ⊆) A because 2 ∈ C but 2 ∉ A, and C ⊆[ B because 1 ∈ C but 1 ∉ B.

Thus we’ve found a set C which is a subset of A ∪ B but is not a subset of either A or B, which is what we needed to show. ■

Claim: If A, B, and C are sets and C ⊆ A ∪ B, then C ⊆ Aor C ⊆ B (or both).

Slides by Amy Liu

Page 97: Week 2 Tutorial - Stanford University

Proofwriting Advice

● Be very wary of proofs that speak generally about “all objects” of a particular type.● As you’ve just seen, it’s easy to

accidentally prove a false statement at this level of detail.

● Making broad, high-level claims often indicates deeper logic errors or conceptual misunderstanding (like code smell but for proofs!)

Page 98: Week 2 Tutorial - Stanford University

Proofwriting Advice

● Good Idea: After you’ve written a draft of a proof, run through all of the points on the Proofwriting Checklist.● This is a great exercise that you can

do with a partner!● In particular, focus on items like “make

specific claims about specific variables” and “scope and properly introduce your variables.”

Page 99: Week 2 Tutorial - Stanford University

Proofwriting Strategies

● Articulate a Clear Start and End Point● What are you assuming? What are you trying to

prove?● Much of this can be determined from the structure

of the theorem to prove.● Write Down Relevant Terms and

Definitions● The interplay of definitions, intuitions, and

conventions gets you your final answer. Knowing the definitions is the first step!

Page 100: Week 2 Tutorial - Stanford University

Thanks for Calling In!

Stay safe, stay healthy,and have a good week!

See you next time.