Message Turncoat in a DM to get moderator attention

Users Online(? lurkers):
Posts: 2266
0 votes RE: Wanna study Category Theory?
Turncoat said:
And to be clear... Topology is the overall Construction of a shape rather than just it's display, like how 3D objects work in programs like Maya?

I am only familiar with the idea through Digital Art... so at best a rough hands-on understanding rather than an in-depth one. I've manipulated objects in a 3D space and adjusted variables until it looked as I wanted it to, but most of what goes on there is backend, the artist rarely has to think about it.

I know what you mean but some clarification. Topology is a subject in mathematics and a Topology  is a mathematical object. 

Topology studies the properties of geometric objects that are preserved under deformations of those geometric objects. An example is the deformation of a rubber band as you stretch it or bunch it up, despite those deformations the fundamental properties of the object stay the same and as such its still a rubber band. If that rubber band breaks during the deformation, it no longer preserves those properties. 

So it's more about capacity rather than shape?

Idk what you mean by capacity, but if you mean in the sense of potentials then yes. 

For instance squares and circles are considered equivalent in Topology because they can be deformed into one another, that is they are said to be homeomorphic. 

If the rubber band loses some of it's tensile strength, is it treated as different, or is it's resistance loss factored into it's capacity by the nature of it being a stretchy object? 

The tensile strength of the rubber band would not be accounted for in the first place, its just not an important property in this subject. 

The rubber band example is just to stress that deformations of topological spaces can be as extreme as stretching, bending, and twisting. 

How would this apply to something like a sponge, where it can grow in size from additions from the environment but cannot do it by itself? Would a 'Wet Sponge' be given it's own definition or would it be treated still as a Sponge when it comes to the Sponge's Laws? 

The volume and shape of the sponge can change and it will still be considered the same Topological Space. 

There are many ways to study Topology:

(1) Point-Set Topology which constructs geometric objects out of sets and then explores how the geometric properties connectedness, compactness, and separations are preserved under deformation

This one sounds more like how vectors are used for 3D modeling. 

Vectors are members of a kind of set called a Vector Space, that is the connection. However a Topological Space and a Vector Space are completely different mathematical objects. However, any vector space can be given a Topology, that is topologically structured. 

(2) Differential Topology which constructs geometric objects called Manifolds out of Euclidean Spaces and explores their differentiability under deformation

(3) Algebraic Topology which constructs a very general notion of Topological Spaces out of the geometric objects called Topologies and then explores the properties of invariance and equivalence of those topologies. 

Category Theory can generalize Topology. The key topological object, a Topological Space, can be formed into Categories called Sites, and continuous functions, another key object, can be formed into Sheafs. In that video from the Topos Institute sites and sheafs where the things being used to map different Topological geometries together.  The categorical generalization of Topology is called Homotopy Theory. 

You lost me at "Sites" and "Sheafs", what are those at a very basic level?

A sheaf is a category that allows for geometric embeddings. 

A site is a category which contains a small set of small objects such that each object is a colimit over objects in that set. 

Colimits define objects by sewing together objects. 

This would be a lot easier if you knew more basic category given that's how you define these terms. 

I'm winging it at "Space" and "Functions", but those at least are more conventional to try to imagine. 

In mathematics spaces are just structures that emerge from a collection of mathematical objects. 

Functions are are just maps from one collection of objects to another collection of objects based given a rule. 

Posts: 33413
0 votes RE: Wanna study Category Theory?

I know what you mean but some clarification. Topology is a subject in mathematics and a Topology  is a mathematical object. 

Topology studies the properties of geometric objects that are preserved under deformations of those geometric objects. An example is the deformation of a rubber band as you stretch it or bunch it up, despite those deformations the fundamental properties of the object stay the same and as such its still a rubber band. If that rubber band breaks during the deformation, it no longer preserves those properties. 

So it's more about capacity rather than shape?

Idk what you mean by capacity, but if you mean in the sense of potentials then yes. 

For instance squares and circles are considered equivalent in Topology because they can be deformed into one another, that is they are said to be homeomorphic. 

I think I remember the video lightly touching on that towards the end, and I can see why it'd need CT if it's going to try to generalize potentials without taking up a ton of space. 

If the rubber band loses some of it's tensile strength, is it treated as different, or is it's resistance loss factored into it's capacity by the nature of it being a stretchy object? 

The tensile strength of the rubber band would not be accounted for in the first place, its just not an important property in this subject. 

The rubber band example is just to stress that deformations of topological spaces can be as extreme as stretching, bending, and twisting. 

How would this apply to something like a sponge, where it can grow in size from additions from the environment but cannot do it by itself? Would a 'Wet Sponge' be given it's own definition or would it be treated still as a Sponge when it comes to the Sponge's Laws? 

The volume and shape of the sponge can change and it will still be considered the same Topological Space. 

Gotcha. 

There are many ways to study Topology:

(1) Point-Set Topology which constructs geometric objects out of sets and then explores how the geometric properties connectedness, compactness, and separations are preserved under deformation

This one sounds more like how vectors are used for 3D modeling. 

Vectors are members of a kind of set called a Vector Space, that is the connection. However a Topological Space and a Vector Space are completely different mathematical objects. However, any vector space can be given a Topology, that is topologically structured. 

Posted Image
Posted Image

So... Topology is moreso how they relate to one another in a single space..?

I get Vector Data, that description's wicked basic, but is Topology about the behavior or properties instead through interaction, like if something is bouncy, or is it more like a 3D graph of things within it? 

Edit: Okay no, Topology is the properties of the object regardless of it's current status, involving how it can change while still being the same thing. Vector Data for a Slinky would only define how it is like a freezeframe, but Topology would define how a Slinky works, right? 

(2) Differential Topology which constructs geometric objects called Manifolds out of Euclidean Spaces and explores their differentiability under deformation

(3) Algebraic Topology which constructs a very general notion of Topological Spaces out of the geometric objects called Topologies and then explores the properties of invariance and equivalence of those topologies. 

Category Theory can generalize Topology. The key topological object, a Topological Space, can be formed into Categories called Sites, and continuous functions, another key object, can be formed into Sheafs. In that video from the Topos Institute sites and sheafs where the things being used to map different Topological geometries together.  The categorical generalization of Topology is called Homotopy Theory. 

You lost me at "Sites" and "Sheafs", what are those at a very basic level?

A sheaf is a category that allows for geometric embeddings. 

So it's like a dictionary of shapes? 

A site is a category which contains a small set of small objects such that each object is a colimit over objects in that set. 

Colimits define objects by sewing together objects. 

This would be a lot easier if you knew more basic category given that's how you define these terms. 

Posted Image

I do feel functionally illiterate here. 

There's no ways around it, it needs crunch-time. Math-wise I didn't make it any further than Algebra 2 with some Geometry thrown in there,  the only thing that's helping me here at all's from my time working with computers. 

I'm winging it at "Space" and "Functions", but those at least are more conventional to try to imagine. 

In mathematics spaces are just structures that emerge from a collection of mathematical objects. 

Okay that's pretty much what I winged. 

Functions are are just maps from one collection of objects to another collection of objects based given a rule. 

"For example, the position of a planet is a function of time."

Okay this is roughly where my head went, but your description and the start of the wiki's began to make me doubt myself a little. 

It's effectively correlational data between variables, right? 

Ę̵̚x̸͎̾i̴͚̽s̵̻͐t̷͐ͅe̷̯͠n̴̤̚t̵̻̅i̵͉̿a̴̮͊l̵͍̂ ̴̹̕D̵̤̀e̸͓͂t̵̢͂e̴͕̓c̸̗̄t̴̗̿ï̶̪v̷̲̍é̵͔
last edit on 12/31/2022 5:25:23 AM
Posts: 2266
0 votes RE: Wanna study Category Theory?

 

I think I remember the video lightly touching on that towards the end, and I can see why it'd need CT if it's going to try to generalize potentials without taking up a ton of space.

Just to explain it further for the sake of clarity.

I will speak in terms of Point-Set Topology because that's really where we should start. 

In Topology we are not usually concerned with actually talking about specific shapes you encounter in euclidean geometry (this is the kind of geometry you are familiar with, but there are infinite geometries). We are concerned with very general notions of Space with specific properties and how deformations of those spaces maintain those spaces despite being deformed in radical ways. 

Hence, a circle and square are topologically the same because they are both deformations of the same space. 

This 'space' is a collection of objects with emergent properties, as stated previously. In Point-Set Topology, a Topological space is a set of points and so it so happens to be the case that the same set of points can be deformed into both squares, circles, and a lot of the other shapes you're familiar with from Euclidean Geometry. The same can be said about Spheres and Cubes, the same set of points can be deformed into both of those 3d shapes without the fundamental properties of connectedness, compactness, and seperation being violated.

The set of points that can be deformed into a sphere cannot be deformed into a circle while conserving its properties. 

This is really messy with set theory, so as you point out using CT makes things not only easier but also elucidates a lot of cool algebraic properties of Topologies. Having said that, learning Topology from a set theoritical perspective is also useful. 

Edit: Okay no, Topology is the properties of the object regardless of it's current status, involving how it can change while still being the same thing. Vector Data for a Slinky would only define how it is like a freezeframe, but Topology would define how a Slinky works, right?

 Typically, at least in pure topology as a subject in itself, a slinky would not be an object in itself.

However, topology can be used in physics which is now what we are talking about. If we consider a slinky as the thing with all the fun dynamical properties we consider it to have, and we consider those properties to be what makes the slinky a slinky then we can do some Topology.

Topology would not explain how the slinky works because when the slinky does what it does we call that a dynamical system, that would involve the use of vectors. Instead, Topology could tell us the set of all deformations the slinky could undergo without the slinky breaking. 

A sheaf is a category that allows for geometric embeddings.

We should leave this be for now. To really understand this you need all the basics of CT under your belt, so its better to focus on acquiring the language that makes sense of that concept.

The same goes for colimits.

Okay this is roughly where my head went, but your description and the start of the wiki's began to make me doubt myself a little.

 Functions are a perfect starting point given the most basic thing in CT is the notion of a morphism which is just a function. 

As the wiki says a function assigns each element from a set X to a set Y, this is a general statement about functions. Below is a an example showing how members of a set X are assigned to members of a set Y. 

 Posted Image

Two key things to notice:

(1) ALL members of X are mapped to some members of Y. By definition all members of the domain set X must be mapped to some or all of the codomain set Y. 

(2) We can assign any two sets of members given a rule, evens ones where the domain set X is numbers and the codomain set Y are letters. 

"For example, the position of a planet is a function of time."

 The previous example is an abstract notion of set, while this one is a physical example. 

You can a imagine a set T whose members are times {t_1, t_2, t_3}  and a set Y whose members are all positions in space {y_1, y_2, y_3}. Then there is some function that maps each member from T to members of Y, that function describes how a particle changes position across time. 

Now compare this to a morphism in CT, 

 Posted Image

It is literally the same idea, i could have used the previous image. Here this collection of people are mapped to their favorite breakfast.

A category is constructed out of morphisms.

Posts: 4519
0 votes RE: Wanna study Category Theory?

When using coding examples, I request for Haskell ones as well, please. :)

Thrall to the Wire of Self-Excited Circuit.
Posts: 2266
0 votes RE: Wanna study Category Theory?

When using coding examples, I request for Haskell ones as well, please. :)

Sure...I love programming using a polymorphic lambda calculus with lazy evaluation, algebraic data types, and type classes. 

Posts: 4519
0 votes RE: Wanna study Category Theory?

When using coding examples, I request for Haskell ones as well, please. :)

Sure...I love programming using a polymorphic lambda calculus with lazy evaluation, algebraic data types, and type classes. 

 Posted Image

Thrall to the Wire of Self-Excited Circuit.
Posts: 2266
0 votes RE: Wanna study Category Theory?

When using coding examples, I request for Haskell ones as well, please. :)

Sure...I love programming using a polymorphic lambda calculus with lazy evaluation, algebraic data types, and type classes. 

 Posted Image

 I use arch btw

Posts: 4519
0 votes RE: Wanna study Category Theory?

I've only toyed a little with Linux much on my Raspberry Pi.  However, I'd like to dual boot with Manjaro.  Although, maybe I'll use up that spare desktop I have...

Why do you prefer Arch?  (I know Manjaro is Arch-adjacent.)

Thrall to the Wire of Self-Excited Circuit.
Posts: 2266
0 votes RE: Wanna study Category Theory?

I've only toyed a little with Linux much on my Raspberry Pi.  However, I'd like to dual boot with Manjaro.  Although, maybe I'll use up that spare desktop I have...

Why do you prefer Arch?  (I know Manjaro is Arch-adjacent.)

 It’s a meme. 
 Arch users are often very proud of be Arch users. 

I use linux but stick to Debian and Mint because I don’t want to think to much about managing my system. 

Posts: 2266
0 votes RE: Wanna study Category Theory?

First round of notes on the basic Building blocks of Category Theory.

For each example I have provided code in Haskell and Python, you will notice outputs are the mappings themselves. I have kept the code simple enough that a beginner should be able to figure them it out with some googling, that is no use of special methods or packages. 

If you want copies of notes and code going forward hmu on discord. If you have formatting suggestions point them out. 

Sets, Maps, Composition

Preliminary Remark :
A Map of Sets is a Process for getting from one set to another.

The primary investigation in Category Theory is that of the Composition of Maps, which is a process following a second process, along the Algebra of Compositions.

The Algebra of Compositions resembles that of the Algebra of Multiplication of Numbers.

Category of Finite Sets and Maps

Object :: Sets/Collections

Ex.
The set of all students
The set of all desks in a classroom
The set of all twenty-six letters of the English alphabet

Every Category contains objects, it is natural that the object contained in the Category of Finite Sets are finite sets.

A finite set is denoted as {John, Mary, Sam}

In this finite set John, Mary, and Sam are its members.

A finite set is defined by the shared properties of its members.

We can also represent this finite set via a circle containing the members in question as follows,

Posted Image

We call such a representation an Internal Diagram as it reveals the explicitly the members of the set.

Map :: A Function/Morphism which the following properties
(1) a set A, called the Domain of the map
(2) a set B, called the codomain of the map
(3) a rule assigning to each element in the domain A an element from the codomain B.

Ex. Let A = {John, Mary, Sam} and B = {eggs, oatmeal, toast, coffee}, and let the mapping f assign to each person in A his or her favorite breakfast in B.

Posted Image

Note the following:
(a) From each dot in the domain, their is exactly one arrow leaving.
(b) To a dot in the codomain, there is any number of arrows point at it.

Functional notation,
f(John) = eggs
f(Mary) = coffee
f(Sam) = coffee

Coded examples, 

morphism.hs said:
import Data.Map (Map, (!), fromList)

-- Set A
type A = [String]

-- Set B
type B = [String]

-- Map from elements of A to their favorite breakfast in B
favoriteBreakfast :: Map String String
favoriteBreakfast = fromList [("John", "eggs"), ("Mary", "coffee"), ("Sam", "coffee")]

-- Morphism from A to B
morphism :: A -> B
morphism xs = map (\x -> favoriteBreakfast ! x) xs

main :: IO()
main = do
-- Test morphism
let input = ["John", "Mary", "Sam"]
let output = morphism input
print output

-- output : ["eggs", "coffee", "coffee"] 
morphism.py said:
# set A
A = ['John', 'Mary', 'Sam']

# set B
B = ['eggs', 'toast', 'oatmeal', 'coffee']

# map from element of A to favorite breakfast in B
favBreakfast = {'John':'eggs', 'Mary':'coffee', 'Sam':'coffee'}

# morphism from A to B
def morphism(xs):
    return [favBreakfast[x] for x in xs]

# test morphism
output = morphism(A)
print(output) 
# output = ['eggs', 'coffee', 'coffee']

An Map whose domain is the same as the codomain is called an Endomap

Ex. For the set A we have a morphism g that maps each member in A to their favorite member in A. 

Posted Image

functional notation,
g(John) = Mary
g(Mary) = John
g(Sam) = Mary

coded examples,

endomap.hs said:
-- Set A
type A = [String]

-- Endomorphism on Set A
endomorphism :: String -> String
endomorphism x
| x == "John" = "Mary"
| x == "Mary" = "John"
| otherwise = "Mary"

-- Test the endomorphism
input :: A
input = ["John", "Mary", "Sam"]
output :: A
output = map endomorphism input
main :: IO ()
main = print output
-- Output: ["Mary","John","Mary"]

endomap.py said:
# Set A
A = ['John', 'Mary', 'Sam']

# Endomorphism on Set A
def endomorphism(x):
    if x == 'John':
        return 'Mary'
    elif x == 'Mary':
        return 'John'
    else:
        return 'Mary'

# Test the endomorphism
output = [endomorphism(x) for x in A]
print(output)
# Output: ['Mary', 'John', 'Mary']

 

This site contains NSFW material. To view and use this site, you must be 18+ years of age.