Skip to main content

What is Logic?

  I want to talk about the topic of logic in discrete mathematics and programming in general. Take these words as vaguely and loosely as possible.


What is logic?


I think that whenever the answers to these questions are present...

"What is happening?"

"Why is it happening?" and

"How is it happening?"

then we can say that logic is established.


Logic is the core of computer programming. The bit logic that tells a computer what to choose (1) and what to ignore (0) marks the beginning of any journey in advanced computer subjects.


"Logic in discrete mathematics is the study of valid reasoning and inference, focusing on the principles that govern the truth of statements. It includes concepts such as propositional logic, predicates, and the rules of inference, which are essential for mathematical proofs and computer science applications." (GeeksforGeeks, Wikipedia)


to me, logic is like postulates when forming an idea. "Logical Axioms" seem more appropriate to say. But if I want to hit the meaning behind logic itself, I would look at games of logic genre. Ever played games like "Monument Valley"? 

(or, Mekorama/Hocus/...)

https://www.youtube.com/watch?v=IdDaexqqXfQ

https://www.youtube.com/watch?v=HnLd1dM8_SM

https://www.youtube.com/watch?v=vaSJyEDmgWA



We know it's not real but somehow, we know that it works, and it should work; once we know the logic behind the world inside the game; the logic of "what is happening". When we play more and find out more through interactions, we know exactly "why" it seems "logical". And then we easily deduce a "how" behind this fictional reality.


Logical reasoning is just doing maths. You have a hypothesis or a given problem to solve, and you find your way to the end, which we name "conclusion" or "logical conclusion". The vague idea that separates "Logical Axioms" and "Logical Reasoning" is the part that we "don't care". Really. 


But generally, I think, by asking about logic, we look for answers to those 3 golden questions. Just like when we talk about computers and dumb them down to logic gates, we talk about how 1s and 0s represent true and false. That's "what is happening," apparently. 


But we must have also learned at some point that the reason as to "how it does that" runs even deeper. 1 represents the "presence" of voltages and 0 represents the "absence" of it. This part is not covered by the Logical Axioms; when we learn about boolean formulas and bit operations. This is exactly the part where you "relate" or "feel" the topic you are studying. This is where you feel "logic" itself.


Just like in Geometry, whenever we blindly accept the postulates to be true, and then find out that the 3 angles at each corner of a triangle sum up to 180, each and every one of us experiences a "Eureka" moment at the faintest corner of our heart. Then we look back in reminiscence and smile at the postulate that we choked on at the beginning, struggling to get how or why it even "should" work. But we now know that,


Level 1 is to accept it as is

Level 2 is to observe it's applications

Level 3 is to accept it again, but knowing it is true when applied

Level 4 is to be happy knowing that you learned something useful for your exams


"An axiom, postulate, or assumption is a statement that is taken to be true, to serve as a premise or starting point for further reasoning and arguments." (Wikipedia)


"The starting point" means that you need to move a few steps further to know what you started doing in the first place. It's like planting a seed and waiting for the tree to grow and bear fruit to know exactly what seed you planted at the beginning.


Logic is like the node between two branches of a circuit. and when current passes through those branches through the nodes, we crown it "logical". 


Because it is only logical to do so ¯⁠\⁠_⁠(⁠ツ⁠)⁠_⁠/⁠¯



Corrections / PS:

- “Logic is better understood in the context it is established in.”

- “Once you feel the logic in the game or in code, you can then extract the general principles that apply everywhere.”



 

Comments

Popular posts from this blog

Kiwix vs Aard2: in the pursuit of offline knowledge

I love projects that support the idea of archiving for offline accessibility. A year back, I think at the end of 2023, I Googled "How to make Wikipedia offline" and eventually came across the Aard2 Project that specializes in it. It's crazy to think about how the entierity of Wikipedia could be stored in just around 22GB file. Later in July 2024, it became more evident why we need more archiver projects like these. I tried to promote this project and learned that there were other projects beside it. One of them was the Kiwix Project. Between the two, I believe that they have their pros and cons, and that's what I will try to document here. #What I know so far: alternatives to offline wikipedia: Wikipedia Article, AlternativeTo Website. Kiwix uses .zim format and Aard2 uses .slob format for their respective archive files. Apparently .zim is larger than .slob because they store full webpages compressed. I could not verify .zim's quality ( no way I am downloading 100...

Agentic AI realization

figure out the best way to use multiple models in an agentic IDE. simple tasks should use cheaper models, and only complex ideas should use latest models. Basic changes like CSS should be done manually without the need to use AI at all. It all falls down to how you use your brain to reach efficiency. on which models to use and when.   using AI is like using frameworks. you are calling some simple looking builtin functions to do monstrously complex stuff behind the scene. the money is not on what you can do but how more efficiently you can do what has already been done. Some frameworks do things better than others. and much of your value is knowing the hidden gems in the tech industry. Better tools sometimes can do more than simply knowing some syntaxes, in the long run. we should focus on the ideas, and much less on how to implement them since humans are meant to do creative stuff and machines, the repetative stuff. so we should use AI as tools to get past the tedious delays in imp...