1.5M ratings
277k ratings

See, that’s what the app is perfect for.

Sounds perfect Wahhhh, I don’t wanna
just-evo-now
cauchyfeelings

This might get me crucified by mathblr but the truth is when I was first introduced to sets i thought of them as python lists.

strokes-theorem

Honestly, not a bad frame of reference for understanding it at all. Like I knew Python long before I learned any kind of proof mathematics and the nesting and tuples are concepts that fit.

Also, people use metaphors and models to learn things all the time, I don't see how this is different.

complex-variable

Well one of them is a collection of objects, or at least an abstracted representation of a collection of objects, and the other is a collection of objects, or at least an abstracted representation of a collection of objects.

So, assuming that all Python lists can be represented by a set and vice versa, and any operation that you can do with sets you can do with Python lists, they appear pretty analogous to me.

Seems a legit point of view to me, and I suspect that this is an angle shared by an increasing number of people who get into coding and computer science casually before hitting the respective level of mathematics in their formal education.

just-evo-now

but... Python has sets??? That's a pretty significant thing. Like I get where you're coming from here but Python very much does have sets

complex-variable

My relative lack of coding knowledge has been brutally exposed here so I did actually have a quick look online about the difference between lists and sets in Python.

It is interesting that they both, in different ways, do not actually always behave like sets would in mathematics.

Python lists are ordered, whilst a mathematical set does not care about the order (but this is behaviour that Python sets get right). So, for example, my understanding now is that Python would determine the list [1, 2, 3, 4] to be different from the list [1, 2, 4, 3], which is obviously not good form for mathematical sets.

Meanwhile, Python sets contain and actually only permit unique elements, with duplicates automatically removed. But Python lists are fine with duplicates and indeed, the mathematical set representing, say, exam scores of {50, 75, 75, 62} should definitely retain the multiplicity that a Python set would otherwise remove.

I am led to conclude that in order to fully replicate the behaviour of “real-world” mathematical sets in Python, one would need to employ some subset of the union of the behaviours of Python sets and Python lists. Which is all a little embarrassing really.

just-evo-now

mathematical sets don't have multiplicity, that's why we need multisets.

complex-variable

Fair - and I was wrong to outright say that they do.

Colloquially, I maintain that the set {50, 75, 62} is abstractly the same as the ‘set’ {50, 75, 75, 62}, and that doing so does not cause us to make mistakes when we are applying set-theoretic operations because we know to remove the duplicates implicitly.

It is in that pragmatic (lazy? wrong?) sense above that I feel comfortable calling the latter a set and not a multiset, and claiming that sets ‘allow multiplicity’ - when push comes to shove we know to chuck out the extras.

I presume that in Python if I construct the list [75, 75, {50,62}] I would now have the best of both worlds, where I care about having two discernible yet otherwise visually identical instances of ‘75’ whilst also not caring what order the other two appear in. That discernment coming at the cost of forcing an order on the duplicates.

But to eliminate all ambiguity in the set-theoretic scenario I would be obliged to introduce an identifier that makes the each ‘75’ physically appear different, such as calling them 75a and 75b.

just-evo-now
cauchyfeelings

This might get me crucified by mathblr but the truth is when I was first introduced to sets i thought of them as python lists.

strokes-theorem

Honestly, not a bad frame of reference for understanding it at all. Like I knew Python long before I learned any kind of proof mathematics and the nesting and tuples are concepts that fit.

Also, people use metaphors and models to learn things all the time, I don't see how this is different.

complex-variable

Well one of them is a collection of objects, or at least an abstracted representation of a collection of objects, and the other is a collection of objects, or at least an abstracted representation of a collection of objects.

So, assuming that all Python lists can be represented by a set and vice versa, and any operation that you can do with sets you can do with Python lists, they appear pretty analogous to me.

Seems a legit point of view to me, and I suspect that this is an angle shared by an increasing number of people who get into coding and computer science casually before hitting the respective level of mathematics in their formal education.

just-evo-now

but... Python has sets??? That's a pretty significant thing. Like I get where you're coming from here but Python very much does have sets

complex-variable

My relative lack of coding knowledge has been brutally exposed here so I did actually have a quick look online about the difference between lists and sets in Python.

It is interesting that they both, in different ways, do not actually always behave like sets would in mathematics.

Python lists are ordered, whilst a mathematical set does not care about the order (but this is behaviour that Python sets get right). So, for example, my understanding now is that Python would determine the list [1, 2, 3, 4] to be different from the list [1, 2, 4, 3], which is obviously not good form for mathematical sets.

Meanwhile, Python sets contain and actually only permit unique elements, with duplicates automatically removed. But Python lists are fine with duplicates and indeed, the mathematical set representing, say, exam scores of {50, 75, 75, 62} should definitely retain the multiplicity that a Python set would otherwise remove.

I am led to conclude that in order to fully replicate the behaviour of “real-world” mathematical sets in Python, one would need to employ some subset of the union of the behaviours of Python sets and Python lists. Which is all a little embarrassing really.

strokes-theorem
cauchyfeelings

This might get me crucified by mathblr but the truth is when I was first introduced to sets i thought of them as python lists.

strokes-theorem

Honestly, not a bad frame of reference for understanding it at all. Like I knew Python long before I learned any kind of proof mathematics and the nesting and tuples are concepts that fit.

Also, people use metaphors and models to learn things all the time, I don't see how this is different.

complex-variable

Well one of them is a collection of objects, or at least an abstracted representation of a collection of objects, and the other is a collection of objects, or at least an abstracted representation of a collection of objects.

So, assuming that all Python lists can be represented by a set and vice versa, and any operation that you can do with sets you can do with Python lists, they appear pretty analogous to me.

Seems a legit point of view to me, and I suspect that this is an angle shared by an increasing number of people who get into coding and computer science casually before hitting the respective level of mathematics in their formal education.

strokes-theorem
strokes-theorem

Is it just me, or is mathblr slow during the summer?

strokes-theorem

My theory is people's brains are overheating...substantiated by my own.

complex-variable

Maths will resume once the rain has returned.

I could have sworn that I lived in the UK, but it has not rained here for over a month and I cannot sleep without sweating buckets.

All logic and reasoning capabilities have been slowly cooked off from the brain, to the point where I am considering appeasing the gods by purchasing a text on percolation theory.

argumate
argumate

huh my classical education is so poor I didn't realise that Syracuse is actually in Sicily, how embarrassing! Carthage being in Tunisia makes sense, and Antioch in Turkey near Syria, Tyre in Lebanon, Caesarea in Judea, no idea where I thought Syracuse was supposed to be, it was just free floating around the Mediterranean somewhere.

complex-variable

my classical education is so poor I thought Carthage was that stuff in your knees and nose.