OpenLLM-France/wikimedia huggingface dataset:
# Geometry for Elementary School/The Side-Angle-Angle congruence theorem

In this chapter, we will discuss yet another congruence theorem, the Side-Angle-Angle congruence theorem, usually abbreviated as SAA(or AAS - Angle-Angle-Side , commonly used in India)

## The Angle-Side-Angle congruence theorem

Given two triangles $\triangle ABC$ and $\triangle DEF$ such that their sides are equal, hence:
* The angle $\angle CAB$ equals $\angle FDE$.(they have the same angle $x$)
* The angle $\angle ABC$ equals $\angle DEF$.(they have the same angle $z$)
* The side ${\overline {BC}}$ equals ${\overline {EF}}$.(they have the same side $y$)
Then the triangles are congruent and their other angles and sides are equal too.
# Geometry for Elementary School/Symmetry

In this section, we will talk about symmetry. Symmetry is when a figure has certain properties. There are many kinds of symmetry, but you only need to learn two in elementary school. Note that a figure with any kind of symmetry is called a symmetrical figure.

## Reflectional symmetry

A figure is considered to have reflectional symmetry when a half of the figure coincides with the other half when folded in half (an easier way to say it would be saying it looks exactly the same on both sides). The line produced by folding is called the axis of symmetry, also known as the line of symmetry. The line must be dotted and must reach outside the figure. Common figures with reflectional symmetry are the English letters A, C, D, E, H, I, K, M, O, and so on. Regular polygons always have reflectional symmetry. The square, for example, has four axes of symmetry. Reflectional symmetry is also known as line symmetry, since it is symmetrical across a line.

## Rotational symmetry

Rotational symmetry is when a figure returns to its original shape after rotating at a certain angle. The point around which it is rotated is called the centre of rotation, and is marked with an 'x'. The centre of rotation is also the centre of the shape, so you can find the centre of rotation easily. Many figures with reflectional symmetry have also rotational symmetry. Common figures with only rotational symmetry are the recycling sign and fan blades. If a figure coincides with the original twice in one full turn, it has two-fold rotational symmetry, or rotational symmetry order two. Regular polygons always have rotational symmetry. The square, for example, has four-fold rotational symmetry.

## Examples

* A figure with rotational symmetry. What should we add to its centre?
* We should add a cross.
# Geometry for Elementary School/The Angle-Side-Angle congruence theorem

In this chapter, we will discuss another congruence theorem, this time the Angle-Side-Angle theorem, usually shortened as ASA. The side in this theorem is called the included side.

## The Angle-Side-Angle congruence theorem

Given two triangles $\triangle ABC$ and $\triangle DEF$ such that their sides are equal, hence:
* The angle $\angle BAC$ equals $\angle EDF$.
* The side ${\overline {BA}}$ equals ${\overline {ED}}$.
* The angle $\angle ABC$ equals $\angle DEF$ (These are the angles between the sides, or the included angle).
Then the triangles are congruent and their other angles and sides are equal too. Note that the side must be the included side of the two angles.
# Geometry for Elementary School/Similarity

In this chapter, we will start the discussion of similarity and similarity theorems. We say the two figures are similar if they have the same shape but different size. Similar figures have three things in common: corresponding sides (corr. sides), corresponding angles (corr. ∠s) and corresponding points (corr. points). We will only talk about similar triangles.

## Congruent triangles

The triangles $\triangle ABC$ and $\triangle DEF$ are similar if and only if all the following conditions hold:
* The side ${\overline {AB}}$ is proportional to ${\overline {DE}}$. (Corresponding sides)
* The side ${\overline {BC}}$ is proportional to ${\overline {EF}}$. (Corresponding sides)
* The side ${\overline {AC}}$ is proportional to ${\overline {DF}}$. (Corresponding sides)
* The angle $\angle ABC$ equals $\angle DEF$. (Corresponding angles)
* The angle $\angle BCA$ equals $\angle EFD$. (Corresponding angles)
* The angle $\angle CAB$ equals $\angle FDE$. (Corresponding angles)
Note that the order of vertices is important. It is possible that $\triangle ABC$ and $\triangle ACB$ are not similar even though both refer to the same triangle. Remember that the place where corresponding points are must be the same on both triangles.
Similarity theorems give a set of the fewest conditions that are sufficient in order to show that two triangles are similar. They are 3 sides proportional, AAA and ratio of 2 sides, inc. ∠. We will talk about them later on.

## Finding the value of unknowns in triangles whose similarity is given

Let's say we have two triangles, $\triangle ABC$ and $\triangle DEF$, and they are congruent. AB=3, BC=5, EF=10, ∠F=90° and ∠E=60°. We need to find DE and ∠A. Here's how:
${\begin{aligned}\angle F+\angle E+\angle D&=180^{\circ }{\text{}\angle {\text{ sum of }}\triangle {\text}}\\90^{\circ }+60^{\circ }+\angle D&=180^{\circ }\\\angle D&=180^{\circ }-90^{\circ }-60^{\circ }\\&=30^{\circ }\end{aligned}}$
${\begin{aligned}\because \triangle ABC&\sim \triangle DEF{\text{ (given)}}\\\therefore {\frac {DE}{AB}}&={\frac {EF}{BC}}{\text{ (corr. sides, }}\sim \triangle {\text{s)}}\\{\frac {DE}{3}}&={\frac {10}{5}}\\DE&={\frac {10}{5}}\times 3\\DE&=6\\\And \angle A&=\angle D{\text{ (corr. }}\angle {\text{s, }}\sim \triangle {\text{s)}}\\\angle A&=30^{\circ }\end{aligned}}$
# Geometry for Elementary School/The Side-Angle-Side congruence theorem

In this chapter, we will discuss another congruence theorem, this time the Side-Angle-Side theorem. The angle is called the included angle.

## The Side-Angle-Side congruence theorem

Given two triangles $\triangle ABC$ and $\triangle DEF$ such that their sides are equal, hence:
* The side ${\overline {AB}}$ equals ${\overline {DE}}$.
* The side ${\overline {CA}}$ equals ${\overline {DF}}$.
* The angle $\angle CAB$ equals $\angle FDE$ (These are the angles between the sides).
Then the triangles are congruent and their other angles and sides are equal too. Success!

## Proof

We will use the method of superposition – we will move one triangle to the other one and we will show that they coincide. We won’t use the construction we learnt to copy a line or a segment but we will move the triangle as whole.
* ${\text{Superpose }}\triangle ABC{\text{ on }}\triangle DEF{\text{ such that }}A{\text{ is placed on }}D{\text{ and }}{\overline {AB}}{\text{ is placed on }}{\overline {DE}}$
* $\because {\overline {AB}}={\overline {DE}}{\text{ (given)}}$
* $\therefore B{\text{ coincides with }}E$
* $\because \angle CAB=\angle FDE{\text{ (given)}}$
* $\therefore {\overline {CA}}={\overline {FD}}$
* $\because {\overline {CA}}={\overline {DF}}{\text{ (given)}}$
* $\therefore C{\text{ coincides with }}F$
* $\therefore {\overline {CB}}={\overline {EF}}$
* $\therefore \triangle ABC=\triangle DEF$
* $\therefore \triangle ABC\cong \triangle DEF$
# Muggles' Guide to Harry Potter/Places/Little Hangleton
## General Overview

Little Hangleton is a small village which is the ancestral home of Tom Riddle.

## Extended Description

Little Hangleton is a village where the Riddle family used to live, and where both Riddle Manor and the House of Gaunt are located. Riddle Manor is used by Lord Voldemort and Wormtail as a base for their activities at the beginning of Harry's fourth year.
At the end of that year, Harry and Cedric Diggory are transported to the cemetery in Little Hangleton by Portkey. The climax of the story occurs there, in the cemetery, as Voldemort returns, the Death Eaters are called to report to Voldemort, and Voldemort duels with Harry.

### Location

Its location is uncertain, however we are given one hint during the summer vacation before the fourth year: Two hundred miles away, the boy called Harry Potter woke with a start.

## Analysis

Little Hangleton is Tom Marvolo Riddle's "ancestral home;" while he was born in London, his mother Merope Gaunt and father, the muggle Tom Riddle, both lived in this area, and his father is buried here. This is part of the reason that Voldemort, as Tom Riddle was later known, set up his base of operations here; one of the necessary ingredients for the potion that restored Voldemort was "Bone of the father, unknowingly given", for which access to the graveyard in Little Hangleton was necessary. Magic being what it is, it is in fact possible that the spell would only work if it was in the immediate environs of Tom Riddle Sr.'s grave, meaning that Voldemort, his servant, his foe, and his father's grave would all have to be brought together in the same place.
Tom Marvolo Riddle feels no attachment for the place, however. Despite being the closest thing to an heir left by his father, Tom Riddle, and thus presumably the actual owner of the manor house, Riddle Jr. had previously only visited the house for long enough to murder his father and grandparents. For Voldemort, the house is a convenient place for headquarters, where he is unlikely to be disturbed (once he has murdered the Muggle gardener), with no claims on its ownership apart from his own.

## Questions

Study questions are meant to be left for each student to answer; please don't answer them here.

## Greater Picture

While it is convenient in that he is unlikely to be disturbed there, the house at Little Hangleton is a bit too far away from the center of action for Voldemort once he starts taking an active role in events. Additionally, it is somewhat lacking in comforts, having been largely abandoned for some fifty years since Tom Riddle was murdered. It is almost certainly for these reasons that Voldemort moves his headquarters to Mr. Crouch's London house while controlling Mr. Crouch, and why he relocates to Malfoy Manor in Harry Potter and the Deathly Hallows.
# LMIs in Control/pages/LMI for Feasibility Problem

LMI for Feasibility Problem in Optimization
The feasibility problem is to find any feasible solutions for an optimization problem without regard to the objective value. This problem can be considered as a special case of an optimization problem where the objective value is the same for all the feasible solutions. Many optimization problems have to start from a feasible point in the range of all possible solutions. One way is to add a slack variable to the problem in order to relax the feasibility condition. By adding the slack variable the problem any start point would be a feasible solution. Then, the optimization problem is converted to find the minimum value for the slack variable until the feasibility is satisfied.

## The System

Assume that we have two matrices as follows:
${\begin{aligned}A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}\quad i=1,2,...,n\end{aligned}}$
${\begin{aligned}B(x)=B_{0}+B_{1}x_{1}+...+B_{n}x_{n}\quad i=1,2,...,n\end{aligned}}$
which are matrix functions of variables $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}\in \mathbb {R} ^{n}$.

## The Data

Suppose that the matrices ${\begin{aligned}A_{0},A_{1},...,A_{n}\quad \end{aligned}}$ and ${\begin{aligned}B_{0},B_{1},...,B_{n}\quad \end{aligned}}$ are given.

## The Optimization Problem

The optimization problem is to find variables ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ such that the following constraint is satisfied:
${\begin{aligned}A(x)<B(x)\end{aligned}}$

## The LMI: LMI for Feasibility Problem

This optimization problem can be converted to a standard LMI problem by adding a slack variable, $t$.
The mathematical description for this problem is to minimize $t$ in the following form of the LMI formulation:
${\begin{aligned}&{\text{min}}\quad t\\&{\text{s.t.}}\quad A(x)<B(x)+tI\\\end{aligned}}$

## Conclusion:

In this problem, $x$ and $t$ are decision variables of the LMI problem.
As a result, these variables are determined in the optimization problem such that the minimum value of $t$ is found while the inequality constraint is satisfied.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Feasibility-Problem-of-Convex-Optimization

## Related LMIs

LMI for Linear Programming

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools
# LMIs in Control/pages/LMI for Decentralized Feedback Control

LMI for Decentralized Feedback Control
In large-scale systems like a multi-agent robotic system, national economies, or chemical refineries, an actuator should act based on local information, which necessitates a decentralized or distributed control strategy. In a decentralized control framework, the controllers are distributed and each controller has only access to a subset of local measurements. We describe LMI formulations for a general decentralized control framework and then provide an illustrative example of a decentralized control design.

## The System

In a decentralized controller design, the state feedback controller $u=Kx$ can be divided into $n$ sub-controllers $u_{i}=K_{i}x_{i},\quad i=1,2,...,n$.

## The Data

A general state space representation of a linear time-invariant system is as follows:
${\begin{aligned}&{\dot {x}}=Ax+Bu\\&y=Cx+Du\end{aligned}}$
where $x$ is a $n\times n$ vector of state variables, $B$ is the input matrix, $C$ is the output matrix, and $D$ is called the feedforward matrix. We assume that all the four matrices, $A$, $B$, $C$, and $D$ are given.

## The Optimization Problem

We aim to solve the $H_{\infty }$-optimal full-state feedback control problem using a controller $u=Kx$.
In a decentralized fashion, the control input $u$ can be divided into sub-controllers $u_{1},u_{2},...,u_{j}$ and can be written as $u=[u_{1}\quad u_{2}\quad ...\quad u_{j}]_{1\times n}^{\text{T}}$.
For instance, let $j=3$ and $n=6$. Thus, there are three control inputs $u_{1}$, $u_{2}$, and $u_{3}$. We also assume that u_{1} only depends on the first and the second states, while $u_{2}$ and $u_{3}$ only depend on thrid to sixth states. For this example, the controller gain matrix can be described by:
$K={\begin{bmatrix}k_{1}&k_{2}&0&0&0&0\\0&0&k_{3}&k_{4}&k_{5}&k_{6}\\0&0&k_{7}&k_{8}&k_{9}&k_{10}\\\end{bmatrix}}$
Thus, the decentralized controller gain consists of sub-matrices of gains.

## The LMI: LMI for decentralized feedback controller

The mathematical description of the LMI formulation for a decentralised optimal full-state feedback controller can be described by:
${\begin{aligned}&{\text{min}}\quad \gamma \\&{\begin{bmatrix}YA^{\text{T}}+AY+Z^{\text{T}}B_{2}^{\text{T}}+B_{2}Z&*^{T}&*^{T}\\B_{1}^{T}&-\gamma I&*^{T}\\YC_{1}^{T}+Z^{T}D_{12}&D_{11}&-\gamma I\end{bmatrix}}\end{aligned}}$
where $Y>0$ is a positive definite matrix and $Z$ such that the aforemtntioned constraints in LMIs are satisfied.

## Conclusion:

The controller gain matrix is defined as:
$K={\begin{bmatrix}0&0\\0&F\end{bmatrix}}$
where $F$ can be found after solving the LMIs and obtaining the variables matrices $Y$ and $Z$. Thus,
$F=ZY^{-1}$.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI_for_decentralized_feedback_controller/tree/master

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools
# LMIs in Control/pages/LMI for Linear Programming

LMI for Linear Programming
Linear programming has been known as a technique for the optimization of a linear objective function subject to linear equality or inequality constraints. The feasible region for this problem is a convex polytope. This region is defined as a set of the intersection of many finite half-spaces which are created by the inequality constraints. The solution for this problem is to find a point in the polytope of existing solutions where the objective function has its extremum (minimum or maximum) value.

## The System

We define the objective function as:
$c_{1}x_{1}+c_{2}x_{2}+...c_{n}x_{n}$
and constraints of the problem as:
$a_{11}x_{1}+a_{12}x_{2}+...+a_{1n}x_{n}<b_{1}$
$a_{21}x_{1}+a_{22}x_{2}+...+a_{2n}x_{n}<b_{2}$
$a_{m1}x_{1}+a_{m2}x_{2}+...+a_{mn}x_{n}<b_{m}$

## The Data

Suppose that $c_{j}\in \mathbb {R} ^{n}$, $a_{ij}\in \mathbb {R} ^{n}$, and $b_{i}\in \mathbb {R} ^{m}$ are given parameters where $i=1,2,...,m$ and $j=1,2,...,n$. Moreover, $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}$ is an $n\times 1$ vector of positive variables.

## The Optimization Problem

The optimization problem is to minimize the objective function, $c^{\text{T}}x$ when the aforementioned linear constraints are satisfied.

## The LMI: LMI for linear programming

The mathematical description of the optimization problem can be readily written in the following LMI formulation:
${\begin{aligned}&{\text{min}}\quad c^{\text{T}}x&\\&{\text{s.t.}}\quad a_{i}^{\text{T}}x\leq b_{i}x\\\end{aligned}}$

## Conclusion:

Solving this problem results in the values of variables $x$ which minimize the objective function. It is also worthwhile to note that if $m\geq n$, the computational cost for solving this problem would be $mn^{2}$.
There does not exist an analytical formulation to solve a general linear programming problem. Nonetheless, there are some efficient algorithms, like the Simplex algorithm, for solving a linear programming problem.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Linear-Programming

## Related LMIs

LMI for Feasibility Problem

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools
# LMIs in Control/pages/LMI for Eigenvalue Minimization

LMIs in Control/pages/LMI for Eigenvalue Minimization

## The System

    ${\begin{aligned}A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}\end{aligned}}$
Note that ${\begin{aligned}A_{i},\quad i=1,2,...,n\end{aligned}}$ are symmetric matrices.

## The Data

    ${\begin{aligned}A_{0},A_{1},...,A_{n}\quad {\text{are given matrices.}}\end{aligned}}$

## The Optimization Problem

Find
${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$
to minimize,
${\begin{aligned}J(x)=\lambda _{max}(A(x))\end{aligned}}$
According to Lemma 1.1 in [1] page 10, the following statements are equivalent
${\begin{aligned}\lambda _{max}(A(x))\leq t\iff A(x)-tI\leq 0\end{aligned}}$

## The LMI: LMI for eigenvalue minimization

Title and mathematical description of the LMI formulation.
       ${\begin{aligned}{\text{min}}\;\quad t:&\\{\text{s.t.}}\quad {\begin{bmatrix}A(x)-tI\end{bmatrix}}&\leq 0\end{aligned}}$

## Conclusion:

${\begin{aligned}x_{i},\quad i=1,2,...,n\quad {\text{and}}\quad t>0\end{aligned}}$ are parameters to be optimized

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Minimizing-the-Maximum-Eigenvalue-of-Matrix/blob/master/README.md

## Related LMIs

LMI for Matrix Norm Minimization
LMI for Schur Stabilization

## External Links

A list of references documenting and validating the LMI.
* - LMI in Control Systems Analysis, Design and Applications
# LMIs in Control/pages/LMI for Generalized eigenvalue problem

LMI for Generalized Eigenvalue Problem
Technically, the generalized eigenvalue problem considers two matrices, like $A$ and $B$, to find the generalized eigenvector, $x$, and eigenvalues, $\lambda$, that satisfies $Ax=\lambda Bx$. If the matrix $B$ is an identity matrix with the proper dimension, the generalized eigenvalue problem is reduced to the eigenvalue problem.

## The System

Assume that we have three matrice functions which are functions of variables $x=[x_{1}\quad x_{2}\quad ...\quad x_{n}]^{\text{T}}\in \mathbb {R} ^{n}$ as follows:
$A(x)=A_{0}+A_{1}x_{1}+...+A_{n}x_{n}$
$B(x)=B_{0}+B_{1}x_{1}+...+B_{n}x_{n}$
$C(x)=C_{0}+C_{1}x_{1}+...+C_{n}x_{n}$
where are $A_{i}$, $B_{i}$, and $C_{i}$ ($i=1,2,...,n$) are the coefficient matrices.

## The Data

The $A(x)$, $B(x)$, and $C(x)$ are matrix functions of appropriate dimensions which are all linear in the variable $x$ and $A_{i}$, $B_{i}$, $C_{i}$ are given matrix coefficients.

## The Optimization Problem

The problem is to find ${\begin{aligned}x=[x_{1}\quad x_{2}...x_{n}]\end{aligned}}$ such that:
$A(x)<\lambda B(x)$, $B(x)>0$, and $C(x)<0$ are satisfied and $\lambda$ is a scalar variable.

## The LMI: LMI for Schur stabilization

A mathematical description of the LMI formulation for the generalized eigenvalue problem can be written as follows:
${\begin{aligned}&{\text{min}}\quad \lambda \\&{\text{s.t.}}\quad A(x)<\lambda B(x)\\&\quad \quad B(x)>0\\&\quad \quad C(x)<0\end{aligned}}$

## Conclusion:

The solution for this LMI problem is the values of variables $x$ such that the scalar parameter, $\lambda$, is minimized. In practical applications, many problems involving LMIs can be expressed in the aforementioned form. In those cases, the objective is to minimize a scalar parameter that is involved in the constraints of the problem.

## Implementation

A link to Matlab codes for this problem in the Github repository:
https://github.com/asalimil/LMI-for-Schur-Stability

## Related LMIs

LMI for Generalized Eigenvalue Problem
LMI for Matrix Norm Minimization
LMI for Maximum Singular Value of a Complex Matrix

## External Links

* - LMI in Control Systems Analysis, Design and Applications

## Return to Main Page

LMIs in Control/Tools
# Music Theory/Cadences and Progressions

Perfect Cadence (Sounds finished like 'The End') - V to I
Plagal Cadence (Sounds finished like 'Amen') - IV to I
Imperfect Cadence (Sounds unfinished)- I to V
Interrupted Cadence (Sounds unfinished) - V to anything usually VI
# Music Theory/Celtic

Traditional Celtic music is played in various forms and can be classified variously as follows:

## Classification by context

* Set dances (dance solo) can be jig or reel. (Table dance:Footed on a tabletop).
* Group dances
* Listening pieces

## Classification by musical structure

* Reels: Tend to be played very fast and usually consist of continuous eighth notes written in 4/4 time
* Jigs: Much slower than reels, jigs usually have eighth notes in 6/8 time with accents falling on first and fourth beats.
** Doubkle jigs
** Slip jigs
* Hornpipe: Similar to reels but more slowly, They are usually written in 4/4 and often played without accents
* Waltzes: Played in a "waltz pace"; Written in 3/4 time and use triplet rhythmn.
* Strathspeys: Dotted rhythms; usually associated with Scottish playing, Cape Breton and Boston fiddle. Utilizes the "Scottish snap". Browns of Kincardie; Cummingses of Freuchie.
* Polkas
* Quadrilles
* Hornpipes: Derived form pipcorn (stockhorn) Chaucer mentions in Romaunt of the Rose, 1260. 3/2, originally, now 4/4
* Airs
* Marches
* Laments
<ref.Robin WIlliamson|Eng Welsh Scot & Irish Fiddle Tunes|oak Publ|197</ref> Sharp keys are favored but some tunes are in C/Aminor or Fmajor. D, G and A are quite popular, in that order.