flag-algebra 0.1.9

An implementation of Razborov's flag algebras
Documentation
<!DOCTYPE html><html><head>
<meta charset="UTF-8">
<title>Report</title>
<script>
MathJax = {
  tex: {
    inlineMath: ['\\[', '\\]', ['$','$']],
  }
};
</script>
     <script type="text/javascript" id="MathJax-script" async
     src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js">
     </script>
<style>

:root {
    --color1: #a3bbdc;
    --color2: #dae4f1;
    --color3: #edf2f8;
    --color4: #ffe8d6;
    --darkcolor4: #ff971d;
}
h2 {
    color: var(--darkcolor4);
}
body {
    background-color: #133454;
}
.flags {
    background-color: var(--color3);
    margin: 5px 10px;
}
details[open] > summary {
    background-color: var(--color1);
}
details {
    background-color: var(--color2);
}
details[open] {
    padding-bottom: 5px;
    margin-bottom: 5px;
}
div.qflag_item {
    display: inline-block;
    margin: 10px;
    text-align: center;
}
.qflag_item > span {
    display: block;
}
div.inequality {
    border-left-style:solid;
    border-color: var(--darkcolor4);
    border-width: thick;
    background-color: var(--color4);
    margin: 10px 0px 10px;
    padding: 10px;
}
div.obj {
    border-radius: 25px;
    background-color: var(--color4);
    margin: 10px 0px 10px;
    padding: 10px;

}
svg.inline-flag {
    width: 60px;
    top: 20px;
    position: relative;
}

</style></head><body>
<h2>Objective:</h2>
<div class="obj">
<p>Minimize: flag(3:3) + flag(0:3)</p>
<p>\[F_{3}^{3} + F_{0}^{3}\]</p>
<p>where $F_{0}^{3}=$ <svg class="inline-flag" viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg> and $F_{3}^{3}=$ <svg class="inline-flag" viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg>.</p>
<details><summary>Flag expression of the objective.</summary><div>
<div class="flags">
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>1</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>1</span></div>
</div>
</div></details>
</div>
<h2>Inequalities</h2>
<div class="inequality">
<p>Σ F	= 1</p>
<p>\[\sum_{F\in S_1\subseteq\mathcal{F}_{3}}F = 1\]</p>
<details><summary>See the definition of $S_1$.</summary>
<p>$S_1$ contains the following flags:</p>
<div class="flags">
<svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg>
<svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg>
<svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg>
<svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg>
</div>
</details>
<math><mfenced><mtable><mtr>
<mtd>0.24999999916695548</mtd>
</mtr></mtable></mfenced></math>
<details><summary>Contribution.</summary>
<div class="flags">
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.24999999916695548</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.24999999916695548</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.24999999916695548</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.24999999916695548</span></div>
</div>

 is at least 0.24999999916695548.</details>
</div>
<h2>Cauchy-Schwarz</h2>
<div class="inequality">
<h4>Mul. and unlabel: 2x2; Type { size: 1, id: 0 } -> Type { size: 0, id: 0 } (id 0) invariant</h4><p>
<svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="50" cy="50" fill="black" r="6" stroke="black"/>
</svg></p>
<math><mfenced><mtable>
<mtr>
<mtd>0.12500000013884016</mtd>
<mtd>-0.12499999986115685</mtd>
</mtr>
<mtr>
<mtd>-0.12499999986115685</mtd>
<mtd>0.12500000013884005</mtd>
</mtr>
</mtable></mfenced></math>
<details><summary>Eigenvalue decomposition</summary>
<math><mfenced><mtable>
<mtr>
<mtd>0.00000000027768325139287953</mtd>
<mtd>0.24999999999999695</mtd>
</mtr>
</mtable></mfenced></math>
<math><mfenced><mtable>
<mtr>
<mtd>-0.7071067811865474</mtd>
<mtd>-0.7071067811865477</mtd>
</mtr>
<mtr>
<mtd>-0.7071067811865477</mtd>
<mtd>0.7071067811865474</mtd>
</mtr>
</mtable></mfenced></math>
</details>
<details><summary>Eigenvectors</summary>
<h>λ = 0.24999999999999695</h><p>
<div class="flags">
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="91" cy="50" fill="none" r="8.5" stroke="black" stroke-width="1.5"/>
<circle cx="9" cy="50.00000000000001" fill="black" r="6" stroke="black"/>
</svg></span>
<span>-0.7071067811865477</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="9" x2="91" y1="50.00000000000001" y2="50"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="91" cy="50" fill="none" r="8.5" stroke="black" stroke-width="1.5"/>
<circle cx="9" cy="50.00000000000001" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.7071067811865474</span></div>
</div>
</p>
</details>
<details><summary>Contribution.</summary>
<div class="flags">
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.750000000833041</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>-0.24999999916694732</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>-0.2499999991669471</span></div>
<div class="qflag_item">
<span><svg viewBox="0 0 100 100" width="100" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="4" x1="29.50000000000001" x2="91" y1="85.50704155516199" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="91" y1="14.492958444838024" y2="50"/>
<line stroke="black" stroke-width="4" x1="29.499999999999982" x2="29.50000000000001" y1="14.492958444838024" y2="85.50704155516199"/>
<circle cx="91" cy="50" fill="black" r="6" stroke="black"/>
<circle cx="29.50000000000001" cy="85.50704155516199" fill="black" r="6" stroke="black"/>
<circle cx="29.499999999999982" cy="14.492958444838024" fill="black" r="6" stroke="black"/>
</svg></span>
<span>0.7500000008330403</span></div>
</div>
</details>
</div>
</body></html>