OpenLLM-France/wikimedia huggingface dataset:
# Practice Problems in LOLGraphics/Solution to Problem I
## Code

IMPORTANT: The subprograms minus and subtract are not the same! Minus is for subtraction operation, and subtract is used for division because division is broken in LOLGraphics.

## Explanation

This code can be easily divided into 3 parts:
* The first part of the code asks the user to enter 2 numbers and stores them in 2 4-byte variables called x and y. Note that LOLGraphics doesn’t have scopes - once you define a variable it exists forever until the program ends. That’s why there’s no problem in defining variables in the subprograms where they are first used.
* The second part of the code asks the user to enter the mathematical operation that he wishes to do. Because LOLGraphics doesn’t let you ask for string inputs - only number inputs, each one of the 4 basic arithmetic operations is given a number from 1-4.
* The third part of the code checks what operation the user entered using a switch/case structure and calculates the result of the arithmetic operation. Addition, subtraction, multiplication, and division are straight forward so I will focus on the division routine. Because division seems to be broken in LOLGraphics, I had to implement it myself. Ideally, the code would just keep subtracting Y from X in a loop while X>=Y but this simply isn’t possible. The code does it while X>0, but that means there’s a chance it will subtract to below 0, that’s why it after that has to check that X is not negative, and if it is correct the answer by subtracting 1 from Z, and Y to Z. After that, Z will store the integer part of the solution, and X the reminder, and both will be printed.

## Alternative ways

There are multiple things that can be done differently. For one, if you run this code you will see X=5. You can theoretically add spaces that it will be X = 5, by remember that since the LOLGraphics interpreter wastes spaces from the beginning and end of every line, so to print the second space you will need to use the command PLZ ADD A SPACE.
Also, it’s possible to print to the user what operation is calculating. Since the code is in any case running with conditions, and each operation has a subprogram, the best way would be to add in each such subprogram a print command. PLZ PRINT TEXT + for the addition subprogram, etc.
Also it’s possible to implement the division routine differently. This code will subtract Y from X while X>0. This means that it’s possible that it will stop at X=-2 for example and that the result will be of so there’s a subprogram that checks and corrects if necessary. You can also subtract Y from X while X>Y but take into account that if X can be evenly divided by Y, then your answer will be lower by 1 then the correct answer, so you will still need to run a correction subprogram.
# Practice Problems in LOLGraphics/Solution to Problem II
## Explanation

This code is pretty easy to understand. First it check is the number more than 8999 (which is the same as more than or equal to 9000 since LOLGraphics only supports integer numbers). If it is, it types “,Θ” to the screen since this is the Greek numeral for 9000 then subtracts 9000 from the number. Then it repeats the process for 8000, 7000, ..., 2000, 1000, 900, 800, ..., 200, 100, 90, 80, ..., 20, 10, 9, 8, ..., 2, 1. Notice that when it gets to 1, the code checks is the number greater than 0.
One more important thing to put attention on is the delay between two commands. The default is 100 milliseconds (0.1 sec) but since there are many checks, it was reduced to 1 millisecond (0.001 sec).

## Alternative ways

There is another more complex way to write the same code. First divide the number by 1000, then check if it’s a digit 1-9 (not 0), print the relevant character. Then divide the number by 100, but notice that then you will have to subtract 10 from the number until you get a number smaller than 10 which makes this way extremely inefficient. Notice though that since LOLGrapics only supports integer numbers the result of 9999/1000 will be 9 not 9.999 or 10 like you would expect. Readers familiar with programming will recall that other programming languages also take only the integer part when dividing integer variables.
# Structural Biochemistry/Enzyme/Isomerases/Triose Phosphate Isomerase
## Definition

Triose Phosphate Isomerase (TPI) is an isomerase that catalyzes the isomerization of dihydroxyacetone phosphate to and from D-glyceraldehyde 3-phosphate. It takes part in the glycolytic pathway, which is a biochemical pathway employed by many organisms. In the pathway, TPI's action takes its place directly after the splitting of fructose 1,6-biphosphate by aldolase. The objective of the glycolytic pathway is to metabolize glucose into two pyruvate molecules, also producing two ATP molecules. Hence, TPI is an enzyme that contributes to the production of ATP, the molecules used as an energy source by all organisms.
TPI is an example of a "kinetically perfect enzyme," which means that it catalyzes isomerization so quickly that the rate of reaction is determined by the diffusion rate of the substrate. This means it isomerizes essentially every molecule of TPI specificity that it encounters. TPI increases the rate of isomerization by ten degrees of magnitude. Part of TPI's kinetic perfection comes from it being an isomerase; the enzyme does not have to wait for multiple substrates to bind to the active site. Also, the mechanism (see below) involves few steps and involves the transfer of protons only.

# Mechanism

The catalytic mechanism of TPI begins with the glutamate residue removing a hydrogen from one of the substrate's carbon atoms (see image), while the carbonyl oxygen deprotonates the nearby histidine residue, forming an enediol intermediate. The negatively charged histidine then deprotonates the original hydroxyl group, which yields an enolate-like product. The glutamic acid, now acting as an acid, adds a proton to the middle carbon to form the product, glyceraldehyde 3-phosphate. The net result is the original carbon-hydroxyl bond and carbon-oxygen double bond switching places.
One important aspect of the catalytic behavior is the restraining of the enediol intermediate shown in the upper-right portion of the image below. Under normal conditions this molecule loses its phosphate group, and this degradation occurs at a rate two orders of magnitude faster than the isomerization of the substrate. To counteract this undesirable decomposition, a small loop of residues closes over the active site while the reaction takes place. The reactive intermediate is enclosed in a conformation that does not favor its spontaneous decomposition.

## References

1. Berg, Jeremy M. 2007. Biochemistry. Sixth Ed. New York: W.H. Freeman. 310-323.
# Structural Biochemistry/Enzyme/Ground state
## Ground State

An electron is in its ground state meaning it is in its lowest energy state, in other words, an electron is in its excited state whenever it is not in its ground state. An excited state of a molecule is known to have higher energy levels than its ground state. The third law of thermodynamics states that the system is at its ground state when it is at absolute zero degree in temperature, which causes the entropy of the reaction to be determined by the degeneracy of that ground state. However, some systems will have zero entropy due to its physical/chemical properties.

## Pre-steady State

In the first moment after an enzyme is mixed with substrate, no product has been formed and no intermediates exist. The study of the next few milliseconds of the reaction is called pre-steady-state kinetics. Pre-steady-state kinetics is therefore concerned with the formation and consumption of enzyme–substrate intermediates (such as ES or E*) until their steady-state concentrations are reached.
This approach was first applied to the hydrolysis reaction catalysed by chymotrypsin. Often, the detection of an intermediate is a vital piece of evidence in investigations of what mechanism an enzyme follows. For example, in the ping–pong mechanisms that are shown above, rapid kinetic measurements can follow the release of product P and measure the formation of the modified enzyme intermediate E*. In the case of chymotrypsin, this intermediate is formed by an attack on the substrate by the nucleophilic serine in the active site and the formation of the acyl-enzyme intermediate.
In the figure below, the enzyme produces E* rapidly in the first few seconds of the reaction. The rate then slows as steady state is reached. This rapid burst phase of the reaction measures a single turnover of the enzyme. Consequently, the amount of product released in this burst, shown as the intercept on the y-axis of the graph, also gives the amount of functional enzyme which is present in the assay. File:Pre-steady-state.pdf

## Steady State

The steady state assumption was proposed by George Briggs and John Haldane in 1942. In this assumption, the concentrations of the intermediates of a reaction remain the same even when the concentrations of starting materials and products are changing. Steady state occurs when the rate of formation and breakdown of the intermediate are equal. The steady state assumption relies on the fact that both the formation of the intermediate from reactants and the formation of products from the intermediate have rates much higher than their corresponding reverse reactions. In other words, steady state assumes that k1>>k-1 and k2>>k-2.
# Structural Biochemistry/Enzyme/Gibbs free energy graph

The Gibbs free energy graph shows whether or not a reaction is spontaneous-- whether it is exergonic or endergonic. ΔG is the change in free energy. Generally, all reactions want to go to a lower energy state, thus a negative change is favored. Negative ΔG indicates that the reaction is exergonic and spontaneous.
Note that ΔG reveals nothing about the speed of the reaction. For example, diamond is supposed to be in a liquid state at room temperature, yet the rate of this reaction is so slow that this change does not seem to occur. Neither do peptide bonds spontaneously go through hydrolysis even though the reaction of such is highly exergonic. A positive ΔG indicates that the reaction is endergonic, or that it requires energy to go from reactants to products. The free energy graph can be used to determine whether the reaction will be spontaneous or not by evaluating the ΔG. ΔG can be found by subtracting the free energy of the reactants from the free energy of the products.
ΔG = G$_{products}$ - G$_{reactants}$
Therefore, if the reaction goes from higher free energy to lower free energy, there will be a negative ΔG, and the reaction will be spontaneous. However, if the reactants have a lower ΔG than the products, there will be an increase in free energy, and the reaction is nonspontaneous. In this situation, some form of energy (in the form of heat, light, etc.) will be required for the reaction to take place. It should be noted that a spontaneous reaction will not necessarily occur on its own. This is because an initial activation energy is needed in order to start the reaction and thus even a spontaneous reaction may need some form of energy input. A good example of this is the very exergonic combustion of octane, which still needs a flame in order to initiate.
Enzymes will affect this free energy graph by lowering the activation barrier, or the amount of energy needed for the reaction to occur, They do this by stabilizing the transition state, or the state of highest energy between reactants and products. Enzymes DO NOT affect the equilibrium constant in any way, shape, or form. File:Free energy diagram.jpg
# Structural Biochemistry/Enzyme/Group Specific Reagent
## Definition

Irreversible enzyme inhibitor that is for covalent modification that inactivates enzyme; or chemical that modifies by reaction with functional groups of enzyme.
Group specific reagents are enzyme inhibitors that can covalently bond to a particular amino acid residue on the enzyme and irreversibly modify it.It is less specific compared with affinity label and suicide inhibitor. It reacts with side chain of amino acid.
Two examples of group-specific reagents are diisppropylphosphoflouridate (modifies a serine residue) and iodoacetamide (modifies cystein residue)

## Applications

Group specific reagents are not only used to inhibit enzymes, but are also used to deduce if certain amino acid residues are very reactive and actually take on an important role in the catalysis of the product. For example, diisopropylphosphofluoridate (DIPF) modifies only one serine residue out of all the amino acid residues on the enzyme, chymotrypsin. By measuring the turnover rate before and after inhibition, one can determine if that serine residue is essential to the catalytic power of the enzyme. (The pink x in the figure has no meaning and should be ignored.)

## Transition State Inhibitors

Transition state inhibitors, much like group specific reagents, resemble the substrate of the enzyme. Transitions state inhibitors are molecules which are originally derived from the substrate of the enzyme. They very much resemble the transition state of the substrate but are not 100% identical. Because of this, the transition state inhibitor is able to bind to the active site. However because of its subtle difference that makes it unique from the original substrate, the enzyme is unable to carry out its catalytic effects. An example of a transition state inhibitor is the transition-state analog pyrrole-2-carboxylic acid. This substance mimics the binding properties of D-proline; however, unlike D-proline, pyrrole-2-carboxylic acid is a trigonal molecule, whereas D-proline is tetrahedral. This difference makes pyrrole-2-carboxylic acid an inhibitor that is bound 160 times more tightly to racemase than is D-proline. The ability of transition-state analogs to bind so well to enzymes draws attention to the fundamental nature of catalysis: selective binding of the transition state.
One use of transition state inhibitors is the ability to create antibodies from them. By experimentally injecting transition state analogs in a rabbits, these rabbits were able to produce antibodies to the transition state analog as well as its intended converted substrate. These antibodies, however, were found to be not as efficient those antibodies which actually were created as a result of being injected with the actual substrate.

## References

[1] Berg, Jeremy M., Tymoczko, John L., and Stryer, Lubert. Biochemistry. 6th ed. New York, N.Y.: W.H. Freeman and Company, 2007: 231, 232.
* ↑ 1
# Structural Biochemistry/Enzyme/Initial rate

The initial rate, V$_0$, is the rate of the reaction after almost no time has passed, t is approximately 0. It is the measure of moles of product formed per second (t cannot equal zero, because we cannot divide by zero) and can be approximated by finding the slope of the product versus reactant curve at the beginning. Near beginning, the reverse reaction is negligible, and thus the slope is a good approximation.
File:Vo10.jpg
$V_{0}=k_{2}[ES]$
$V_{0}={\frac {k_{cat}}{K_{M}}}[E][S]$
# Super Mario World/Forest of Illusion/Forest Fortress

Beating this level will lead you to the Star Road. At the beginning of the level, dodge the falling pillars and the spiky wheels. Spin jump them if necessary; that will not hurt Mario. Having hit the colored switches will help you greatly in this level. You will fight the Reznors at the end of this level.

## Secrets

Near the end of the level, when you see the first big red door, jump up to the grey ledge and proceed to the right. It is extremely tricky, but if you can demonstrate top-notch flying skills by flying over the long lava pit to the right, you'll earn nine 1-ups!
If you touch the jumping flames, you'll fall in the lava and lose a life. The key to getting over the pit without hitting the jumping flames is to keep Mario as close to the ceiling as possible. Press the back key as soon as Mario's head dips downward to boost him up again. An alternate method is to use a flying spin and then while spinning bounce from fireball to fireball. You might need to experiment a little to get the timing just right. It's tricky, but you'll be rewarded!
# Super Mario World/Fire status
## Getting Fire Mario

* Mario becomes fire Mario if he grabs a fire flower.

## Abilities

Fire Mario is generally considered inferior to cape Mario. However he is considered superior to cape Mario for underwater levels
* Fire Mario can shoot bouncing fireballs by pressing X or Y.
* Fireballs can kill certain enemies, such as the Jumpin' Piranha Plants, that cannot be killed with jump.
* Enemies killed by fireballs, except Chargin' Chucks and Koopa Kids, turn into coins.
* However, no more than two fireballs can be on the screen at once.
* If fire Mario spin jumps (A), he will release fireballs (one fireball to the left and one to the right).
* Fire Mario can break yellow blocks using spin jump.
# Super Mario World/Forest of Illusion

The Forest of Illusion is a confusing area of the game filled with odd paths and other diversions finally culminating with your escape then fight through Roy's Castle.
* Forest of Illusion 1
* Forest of Illusion 2
* Blue Switch Palace
* Forest of Illusion 3
* Forest Ghost House
* Forest of Illusion 4
* Forest Secret Area
* Forest Fortress
* Roy's Castle
# Super Mario World/Forest of Illusion/Blue Switch Palace

This one is a walk in the park, not to worry, only spiny's here with 2 p switches, silver one makes the Spiny's into silver coins and the other turns the coins into blocks (as you see in most levels) Get all the coins, and you get an extra life! The Big Blue Switch found here creates blue blocks which help get three 1-up Mushrooms in forest secret area, and they are helpful in entering Special World.
# Super Mario World/Forest of Illusion/Forest of Illusion 1

In this level you can get up to 99 lives by waiting for the box that has the changing items in it to hit a feather and then it should be the star by the time it appears. then run as fast as you can and hit all the guys and you get get multiple lives. Use this trick often.
Also there is a key underneath the platform. all you have to do to get it is get to the end of the platform and there is yellow box with a question mark on it hit it and catch it because its a ballon with a P on it. and go underneath the platform until you see the key and then pick it up and put it in the keyhole. and it passes the next couple of levels and takes you straight to the ghost house.
# Super Mario World/Forest of Illusion/Forest of Illusion 2

When you are at this level and have beaten it, you can go back and get to the blue switch. What you need to do is to go about half way, to the part where there are two spikey fish that just move up and down on their own. (?)Little are when you get to that part there will be lots of sleepin fish. You have to menouver around them and move almost all the way down until you see a yellow box with an exclmation point. The box may be guarded by a sleeping fish. You have to just keep going straight to the left of the screen until you see a key and key hole. This will open the blue switch!
# Super Mario World/Forest of Illusion/Forest of Illusion 3

There are two ways to beat this level. One is to simply finish it the regular way which will make a path up to the ghost house. The second way which lets you move forward in the game, is by going down the last green tunnel (you need to be big) and getting the key.
# Super Mario World/Enemies/Wiggler

Wiggler is a yellow caterpillar. Jumping on it knocks the flower off its head, changes it red, and makes it angry. To kill red wiggler you can't stomp on it again, a Koopa shell or a fireball will do it.
# Super Mario World/Forest of Illusion/Forest Ghost House

At first it begins very compact as you wind your way through the corridor and then through the door at the end. After that there is a simple area which is guarded with flying ghosts. Now the temptation is to get the flying boxes and indeed if you do you can collect a feather or sunflower but BEWARE! the ghosts tend to swarm round you too fast and result in you getting hit. My advice is to leave them. Now the powerpack is resting on an easy to reach ledge but DO NOT jump on it yet... first continue going past the yellow door and into a small area with a line of coins above it. As long as you collect at least one coin then it means the level is completeable. NOW you can jump on the powerpack, turning all the coins into blocks, and travel through the silver door.
Now this is the easy bit, just continue along the corridor but when you see the first yellow door, don't enter it. If you do it will just lead you out of the ghost house without any freebies! Continue past it then open the next yellow door you will see. It is the same exit but it has a cute little moon resting on the floor. The moon will give you an extra three lives! Then cut the tape and you've finished. TA DA!
# Super Mario World/Forest of Illusion/Forest Secret Area

A walk in the park level, just stay on the floating platforms and all is done, but at the end, if possible, jump over the finish line to get 3 or 4 additional lives.
# Set Theory/Zorn's Lemma and the Axiom of Choice/Well-founded

A binary relation R is well-founded iff for every set A
$A\subseteq R[A]\Rightarrow A=\emptyset$
Theorem: A binary relation R is well-founded iff for every binary relation S
$S\circ R\subseteq R\circ S\Rightarrow R\cap S^{-1}=\emptyset$
Proof: Let R be a well founded relation and let S be a relation such that
$S\circ R\subseteq R\circ S$
Let
$X=field(R)$
and let
$A=dom(R\cap S^{-1})$
Then
$A=dom(R\cap S^{-1})=dom((S\circ R)\cap I_{X})\subseteq dom((R\circ S)\cap I_{X})=dom(S\cap R^{-1})=ran(R\cap S^{-1})\subseteq R[A]$
It follows that A is empty, and therefore $R\cap S^{-1}=\emptyset$
Conversely, suppose that for every relation S we have
$S\circ R\subseteq R\circ S\Rightarrow R\cap S^{-1}=\emptyset$
Let A be a set such that
$A\subseteq R[A]$
Let $B=field(R)$ and let $S=BxA$. Then
$S\circ R=R^{-1}[B]\times A\subseteq B\times R[A]=R\circ S$
It follows that
$R\circ I_{A}=R\cap (A\times B)=R\cap S^{-1}=\emptyset$
and so
$R[A]=\emptyset$
and consequently $A=\emptyset$
# Set Theory/The Language of Set Theory

Recall that a language consists of an alphabet (i.e., a collection of symbols), a syntax (i.e., rules to form formulas), and semantics (i.e., the interpretation of the formulas).
The Language of Set Theory, denoted as ${\mathcal {L}}$, is the language of first-order logic with the symbol $\in$.
Our alphabet includes variable symbols $v,w,\ldots$, and the symbols $\vee \;\wedge \;\Rightarrow \;\Leftrightarrow \;\neg \;\forall \;\exists \;\bot \;=\;\in$.
We will not worry too much about the formal semantics in this book; however, our intended interpretation of the symbol $\in$ is as a set membership relation, i.e., $x\in y$ means set $x$ is a member of set $y$.
Our syntax is (informally) described by the following
* if $x$ and $y$ are variable symbols, then $(x=y)$ and $(x\in y)$ are formulas
* if $\varphi$ is a formula, then so is $(\neg \varphi )$
* if $\varphi$ and $\psi$ are formulas, then so are $(\varphi \Leftrightarrow \psi )$, $(\varphi \Rightarrow \psi )$, $(\varphi \wedge \psi )$, and $(\varphi \vee \psi )$
* if $\varphi$ is a formula and $x$ is a variable symbol, then $\forall x:\varphi$ and $\exists x:\varphi$ are formulas
* finally, we have $\bot$ is also a formula
Note that to formally define the syntax, we need to use the notion of `recursion'. However, recursion is soon to be defined within the theory (ZF theory), so we will refrain from using theorems in ZF as meta-theorems for ZF.
Also note that we quantify over the universal set, i.e., the set of all sets. (Fun fact: the universal set is not a set, ipso facto by two axioms we will soon see.)
← Introduction · Zermelo-Fraenkel (ZF) Axioms →