feat: Notes for harmonic oscillator

This commit is contained in:
jstoobysmith 2025-02-26 11:03:29 +00:00
parent dad988f880
commit c21ce36eb1
9 changed files with 229 additions and 19 deletions

View file

@ -0,0 +1,105 @@
---
layout: default
---
<style>
body {
color: black;
}
</style>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/default.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script>
<script type="text/javascript" charset="UTF-8"
src="../assets/css/lean.min.js"></script>
<script>hljs.highlightAll();</script>
<!--- Toggle background color. -->
<script>
let isDefaultBackground = true;
function toggleDyslexiaMode() {
document.body.style.backgroundColor = isDefaultBackground ? '#f4ecd8' : '#ffffff';
isDefaultBackground = !isDefaultBackground;
}
</script>
<div style="text-align: right;">
<a href="#" onclick="toggleDyslexiaMode(); return false;" style="color: #2c5282; text-decoration: underline; cursor: pointer;">
Toggle background color
</a>
</div>
<!-- Note header (title, curators, notice etc.). -->
<center><h1 style="font-size: 50px;">{{ site.data.harmonicOscillator.title }}</h1></center>
<center><h2 style="font-size: 20px;">Note Authors: {{ site.data.harmonicOscillator.curators }}</h2></center>
<!-- -->
<style>
body {
font-family: "Times New Roman", Times, serif;
}
</style>
<br>
<div style="border: 1px solid black; padding: 10px;">
<p>
These notes are created using an interactive theorem
prover called <a href="https://lean-lang.org">Lean</a>.
Lean formally checks definitions, theorems and proofs for correctness.
These notes are part of a much larger project called
<a href="https://github.com/HEPLean/PhysLean">PhysLean</a>, which aims to digitalize
high energy physics into Lean. Please consider contributing to this project.
<br><br>
Please provide feedback or suggestions for improvements by creating a GitHub issue
<a href="https://github.com/HEPLean/HepLean/issues">here</a>.
</p>
</div>
<!-- Table of content. -->
<hr>
<center><h2 style="font-size: 30px;">Table of content</h2></center>
<p>
{% for entry in site.data.harmonicOscillator.parts %}
{% if entry.type == "h1" %}
<a href="#section-{{ entry.sectionNo }}" style="color: #2c5282;">{{ entry.sectionNo }}. {{ entry.content }}</a><br>
{% endif %}
{% if entry.type == "h2" %}
&nbsp;&nbsp;&nbsp;&nbsp;<a href="#section-{{ entry.sectionNo }}" style="color: #2c5282;">{{ entry.sectionNo }}. {{ entry.content }}</a><br>
{% endif %}
{% endfor %}
</p>
<hr>
<!-- Main body. -->
<br>
{% for entry in site.data.harmonicOscillator.parts %}
{% if entry.type == "h1" %}
<h1 id="section-{{ entry.sectionNo }}">{{ entry.sectionNo }}. {{ entry.content }}</h1>
{% endif %}
{% if entry.type == "h2" %}
<h2 id="section-{{ entry.sectionNo }}">{{ entry.sectionNo }}. {{ entry.content }} </h2>
{% endif %}
{% if entry.type == "p" %}
<p>{{ entry.content }}</p>
{% endif %}
{% if entry.type == "warning" %}
<div class="alert alert-danger" role="alert">
<b>Warning:</b> {{ entry.content }}
</div>
{% endif %}
{% if entry.type == "name" %}
<div style=" padding: 10px; border-radius: 4px;">
<b id="decl-{{ entry.declNo }}">
<a href="#decl-{{ entry.declNo }}" style="color: black;">
{% if entry.isDef %}Definition{% else %}
{% if entry.isThm %}Theorem{% else %}Lemma{% endif %}{% endif %} {{ entry.declNo }}</a></b>
(<a href = "{{ entry.link }}" style="color: #2c5282;">{{ entry.name }}</a>)<b>:</b>
{% if entry.status == "incomplete" %}🚧{% endif %}
<div style="margin-left: 1em;">{{ entry.docString | markdownify}}</div>
<details class="code-block-container">
<summary style="font-size: 0.8em; margin-left: 1em;">Show Lean code:</summary>
<pre style="background: none; margin: 0;"><code class="language-lean">{{ entry.declString }}</code></pre>
</details>
</div>
{% endif %}
{% if entry.type == "remark" %}
<div style="padding: 10px; border-radius: 4px; border: 1px solid #e8e6e6;">
<a href = "{{ entry.link }}" style="color: #2c5282;">Remark: {{ entry.name}} </a>
{{ entry.content|markdownify }}
</div>
<br>
{% endif %}
{% endfor %}