repo
stringlengths 26
115
| file
stringlengths 54
212
| language
stringclasses 2
values | license
stringclasses 16
values | content
stringlengths 19
1.07M
|
---|---|---|---|---|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/math/linebreak_07.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Verify empty rows are handled ok.
$ $\
Nothing: $ $, just empty.
|
https://github.com/MatheSchool/typst-g-exam | https://raw.githubusercontent.com/MatheSchool/typst-g-exam/develop/docs-shiroa/g-exam-doc/page1.typ | typst | MIT License | #import "mod.typ": *
#show: book-page.with(title: "Página 1")
= Página 1
== Prueba de pagina 1
#lorem(100)
== Prueba de página 2
#lorem(100)
#let t = cross-link("/page2.typ")[Página 2]
En lace a #t muy bonito.
*Ejemplo*:
```typ
= Página 1
== Prueba de pagina 1
#lorem(100)
== Prueba de página 2
#lorem(100)
```
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/closure-13.typ | typst | Other | // Parameter unpacking.
#let f((a, b), ..c) = (a, b, c)
#test(f((1, 2), 3, 4), (1, 2, (3, 4)))
#let f((k: a, b), c: 3, (d,)) = (a, b, c, d)
#test(f((k: 1, b: 2), (4,)), (1, 2, 3, 4))
// Error: 22-23 duplicate parameter: a
#let f((a: b), (c,), a) = none
// Error: 8-14 expected identifier, found array
#let f((a, b): 0) = none
// Error: 10-19 expected identifier, found destructuring pattern
#let f(..(a, b: c)) = none
// Error: 10-16 expected identifier, found array
#let f(..(a, b)) = none
// Error: 10-19 expected identifier, found destructuring pattern
#let f(..(a, b: c)) = none
|
https://github.com/soul667/typst | https://raw.githubusercontent.com/soul667/typst/main/PPT/typst-slides-fudan/themes/polylux/book/src/diy/hello-world.typ | typst | #import "../../../polylux.typ": *
#set page(paper: "presentation-16-9")
#set text(size: 25pt)
#polylux-slide[
Hello, world!
]
|
|
https://github.com/T1mVo/shadowed | https://raw.githubusercontent.com/T1mVo/shadowed/main/README.md | markdown | MIT License | # shadowed
Box shadows for [Typst](https://typst.app/).
## Usage
```typ
#import "@preview/shadowed:0.1.2": shadowed
#set par(justify: true)
#shadowed(radius: 4pt, inset: 12pt)[
#lorem(50)
]
```

## Reference
The `shadowed` function takes the following arguments:
- **blur: Length** - The blur radius of the shadow. Also adds a padding of the same size.
- **radius: Length** - The corner radius of the inner block and shadow.
- **color: Color** - The color of the shadow.
- **inset: Length** - The inset of the inner block.
- **fill: Color** - The color of the inner block.
## Credits
This project was inspired by [Harbinger](https://github.com/typst-community/harbinger).
|
https://github.com/han0126/MCM-test | https://raw.githubusercontent.com/han0126/MCM-test/main/2024亚太杯typst/chapter/appendix.typ | typst | #import "../template/template.typ": *
#let code1 = ```python
import matplotlib
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
matplotlib.rcParams['font.family']='Microsoft YaHei'
file_path = r"C:\Users\典总\Desktop\train.xlsx"
data = pd.read_excel(file_path)
plt.figure(figsize=(10, 8))
correlation_matrix = data.corr()
sns.heatmap(correlation_matrix, annot=True, cmap='coolwarm',
fmt='.3f',linewidths=.5)
plt.title('相关矩阵热图')
plt.show()
sns.pairplot(data)
plt.suptitle('散点图矩阵', y=1.02)
plt.show()
```
#let code2 = ```python
import pandas as pd
from sklearn.cluster import KMeans
from sklearn.preprocessing import StandardScaler
import numpy as np
import xgboost as xgb
from sklearn.metrics import accuracy_score
from sklearn.model_selection import GridSearchCV
from sklearn.model_selection import StratifiedKFold
import matplotlib.pyplot as plt
import seaborn as sns
df = pd.read_csv('E:/python/train.csv', encoding='GBK')
columns_to_analyze=['季风强度', '地形排水', '河流管理', '森林砍伐',
'城市化', '气候变化', '大坝质量', '淤积', '农业实践', '侵蚀', '无效防
灾','排水系统', '海岸脆弱性', '滑坡', '流域', '基础设施恶化', '人口得
分', '湿地损失', '规划不足', '政策因素', '洪水概率']
sc = StandardScaler()
df_sc = sc.fit_transform(df[columns_to_analyze])
kmeans = KMeans(n_clusters=3, random_state=1,
n_init=10).fit(df_sc)
df['risk_cluster'] = kmeans.labels_
cluster_features = df.groupby('risk_cluster')
[columns_to_analyze].mean()
cluster_centers = kmeans.cluster_centers_
cluster_centers = sc.inverse_transform(cluster_centers)
cluster_probabilities = df.groupby('risk_cluster')['洪水概率'].
mean()
sorted_clusters = np.argsort(cluster_probabilities)
risk_levels = ['C', 'B', 'A']
select_features_count = 4
for i, cluster_idx in enumerate(sorted_clusters):
select_features =
cluster_features.columns[np.argsort(cluster_features.loc[cluste
r_idx].values)[-select_features_count:]]
print(f"风险等级:{risk_levels[i]}")
print(cluster_features.loc[cluster_idx,
select_features].to_string(), "\n")
X = df[columns_to_analyze]
y = df['risk_cluster']
model_train = xgb.DMatrix(X, label=y)
params = {
'max_depth': 3,
'eta': 0.1,
'objective': 'multi:softmax',
'num_class': 3,
'eval_metric': 'mlogloss'
}
bst = xgb.train(params, model_train, num_boost_round=100)
predict = xgb.DMatrix(X)
y_predict = bst.predict(predict)
df['predicted_risk_cluster'] = y_predict
accuracy = accuracy_score(df['risk_cluster'],
df['predicted_risk_cluster'])
print(f"模型准确率:{accuracy:.3%}")
```
#let code3 = ```python
import pandas as pd
from sklearn.neural_network import MLPRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_percentage_error
from sklearn.preprocessing import StandardScaler
df = pd.read_csv('E:/python/9.csv', encoding='GBK')
columns_to_analyze = ['季风强度', '地形排水', '河流管理', '气候变化',
'大坝质量', '淤积', '基础设施恶化', '人口得分', '洪水概率']
X = df[columns_to_analyze[:-1]]
y = df['洪水概率']
X_train, X_test, y_train, y_test = train_test_split(X, y,
test_size=0.2, random_state=0)
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
model = MLPRegressor(hidden_layer_sizes=(200, 100, 50),
activation='tanh',
learning_rate_init=0.01, max_iter=500,
alpha=0.0001, random_state=1, early_stopping=True)
model.fit(X_train, y_train)
y_predict = model.predict(X_test)
error_rate = mean_absolute_percentage_error(y_test, y_predict)
accuracy = 100-error_rate
print(f"准确率为:{accuracy:.2f}%")
```
#let code4 = ```python
import pandas as pd
from sklearn.neural_network import MLPRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_percentage_error
from sklearn.preprocessing import StandardScaler
df = pd.read_csv('E:/python/5.csv', encoding='GBK')
columns_to_analyze = ['季风强度', '地形排水', '河流管理', '大坝质量',
'基础设施恶化', '洪水概率']
X = df[columns_to_analyze[:-1]]
y = df['洪水概率']
X_train, X_test, y_train, y_test = train_test_split(X, y,
test_size=0.2, random_state=0)
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
model = MLPRegressor(hidden_layer_sizes=(200, 100, 50),
activation='tanh',
learning_rate_init=0.01, max_iter=500,
alpha=0.0001, random_state=1,
model.fit(X_train, y_train)
y_predict = model.predict(X_test)
error_rate = mean_absolute_percentage_error(y_test, y_predict)
accuracy = 100-error_rate
print(f"准确率为:{accuracy:.2f}%")
```
#let code5 = ```python
import pandas as pd
from sklearn.neural_network import MLPRegressor
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_percentage_error
from sklearn.preprocessing import StandardScaler
df = pd.read_csv('E:/python/5.csv', encoding='GBK')
columns_to_analyze = ['季风强度', '地形排水', '河流管理', '大坝质量',
'基础设施恶化', '洪水概率']
X = df[columns_to_analyze[:-1]]
y = df['洪水概率']
X_train, X_test, y_train, y_test = train_test_split(X, y,
test_size=0.2, random_state=0)
scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
model = MLPRegressor(hidden_layer_sizes=(200, 100, 50),
activation='tanh',
learning_rate_init=0.01, max_iter=500,
alpha=0.0001, random_state=1, early_stopping=True)
model.fit(X_train, y_train)
y_predict = model.predict(X_test)
error_rate = mean_absolute_percentage_error(y_test, y_predict)
accuracy = 100-error_rate
print(f"准确率为:{accuracy:.2f}%")
new_data = pd.read_csv('E:/python/test.csv', encoding='GBK')
new_data = new_data[columns_to_analyze[:-1]]
new_data_scaled = scaler.transform(new_data)
new_predictions = model.predict(new_data_scaled)
new_data['洪水概率'] = new_predictions
new_data.to_csv('E:/python/predict.csv', index=False)
```
#let code6 = ```matlab
clc,clear,close all
data = table2array(readtable("predict.csv",'Range' ,'F2:F1048576'));
[h_ks,p_ks]=kstest(data);
disp(h_ks);
disp(p_ks);
```
#let codeZip=(
"问题一相关矩阵热图":code1,
"问题二聚类及预警模型构建":code2,
"问题三洪水概率预测模型构建":code3,
"问题三简化模型指标为5":code4,
"问题四概率预测":code5,
"正态分布检验":code6
)
= 附录
#for (desc,code) in codeZip{
codeAppendix(
code,
caption: desc
)
v(2em)
} |
|
https://github.com/spidersouris/touying-unistra-pristine | https://raw.githubusercontent.com/spidersouris/touying-unistra-pristine/main/README.md | markdown | MIT License | # touying-unistra-pristine
> [!WARNING]
> This theme is **NOT** affiliated with the University of Strasbourg. The logo and the fonts are the property of the University of Strasbourg.
**touying-unistra-pristine** is a [Touying](https://github.com/touying-typ/touying) theme for creating presentation slides in [Typst](https://github.com/typst/typst), adhering to the core principles of the [style guide of the University of Strasbourg, France](https://langagevisuel.unistra.fr) (French). It is an **unofficial** theme and it is **NOT** affiliated with the University of Strasbourg.
This theme was partly created using components from [tud-slides](https://github.com/typst-tud/tud-slides) and [grape-suite](https://github.com/piepert/grape-suite).
# Features
- **Focus Slides**, with predefined themes and custom colors support.
- **Hero Slides**.
- **Gallery Slides**.
- **Admonitions** (with localization and plural support).
- **Universally Toggleable Header/Footer** (see [Configuration](#Configuration)).
- Subset of predefined colors taken from the [style guide of the University of Strasbourg](https://langagevisuel.unistra.fr/index.php?id=396) (see [colors.typ](colors.typ)).
# Example
See [example/example.pdf](example/example.pdf) for an example PDF output, and [example/example.typ](example/example.typ) for the corresponding Typst file.
# Installation
These steps assume that you already have [Typst](https://typst.app/) installed and/or running.
## Import from Typst Universe
```typst
#import "@preview/touying:0.5.3": *
#import "@preview/touying-unistra-pristine:1.1.0": *
#show: unistra-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [_Subtitle_],
author: [Author],
date: datetime.today().display("[month repr:long] [day], [year repr:full]"),
),
)
#title-slide[]
= Example Section Title
== Example Slide
A slide with *important information*.
#lorem(50)
```
## Local installation
### 1. Clone the project
`git clone https://github.com/spidersouris/touying-unistra-pristine`
### 2. Import Touying and touying-unistra-pristine
See [example/example.typ](example/example.typ) for a complete example with configuration.
```typst
#import "@preview/touying:0.5.3": *
#import "src/unistra.typ": *
#import "src/settings.typ" as settings
#import "src/colors.typ": *
#import "src/admonition.typ": *
#show: unistra-theme.with(
aspect-ratio: "16-9",
config-info(
title: [Title],
subtitle: [_Subtitle_],
author: [Author],
date: datetime.today().display("[month repr:long] [day], [year repr:full]"),
),
)
#title-slide[]
= Example Section Title
== Example Slide
A slide with *important information*.
#lorem(50)
```
> [!NOTE]
> The default font used by touying-unistra-pristine is "Unistra A", a font that can only be downloaded by students and staff from the University of Strasbourg. If the font is not installed on your computer, Segoe UI or Roboto will be used as a fallback, in that specific order. You can change that behavior in the [settings](#Configuration).
# Configuration
The theme can be configured to your liking by editing the [settings.typ](settings.typ) file.
A complete list of settings can be found in the [wiki](https://github.com/spidersouris/touying-unistra-pristine/wiki/Settings).
|
https://github.com/WinstonMDP/knowledge | https://raw.githubusercontent.com/WinstonMDP/knowledge/master/vector_space.typ | typst | #import "cfg.typ": cfg
#show: cfg
= Векторное пространство
$(V, +, *)$ - векторное пространство над полем F:
- $(V, +)$ - абелева группа
- умножение на скаляр замкнуто
- $lambda(a + b) = lambda a + lambda b$
- $(lambda + mu)a = lambda a + mu a$
- $(lambda mu)a = lambda (mu a)$
- $1a = a$
где $a, b in V, lambda, mu in F$.
Элементы соответствующего поля иногда называют числами, даже когда поле не является
числовым.
Пространство геометрических векторов евклидовой плоскости обозначается через $E^2$.
Это векторное пространство над полем $RR$.
$b = lambda_1 a_1 + ... + lambda_n a_n$ - линейная комбинация векторов $a_1, ..., a_n$.
Вектор $b$ линейно выражается через векторы $a_1, ..., a_n$.
${e_1, e_2, ..., e_n} subset.eq V$ называется базисом векторного пространства $V <->$
каждый вектор $v in V$ единственным образом линейно выражается через $e_1, ..., e_n$.
Коэффициенты этого выражения называются координатами вектора $v$ в базисе ${e_1, e_2,
..., e_n}$.
Всякое векторное пространство $V$ над полем $F$, имеющее базис из $n$ векторов,
изоморфно просранству $K^n$.
|
|
https://github.com/angelcerveraroldan/notes | https://raw.githubusercontent.com/angelcerveraroldan/notes/main/abstact_algebra/notes/groups/free_groups.typ | typst | #import "../../../preamble.typ" : *
#import "@preview/fletcher:0.5.1" as fletcher: diagram, node, edge
== Free Groups
#def(title: "Free Group", columns(2, gutter: 11pt)[
Given some set $X$, the group $F_X subset.eq X$ is called the free group of $X$ if for any $f : X -> G$ (where $G$ is any group), there exist a unique homomorphism $tilde(f)$ (epimorphism!) st the following diagram.
The function $pi$ can be thought of as the identity function, but it can really be any injective function. (containment function)
#colbreak()
#align(center, diagram(cell-size: 15mm,
$
X
edge(f, ->)
edge("d", pi, "hook->")
&
G
\
F_X
edge("ur", tilde(f), "-->")
$
))
])
One example of a free group (sometimes used to define them) is the group $W(X union inv(X))$, where, $W(X)$ is the words monoid of $X$, or the set of finite sequences (called words) of elements in $X$, along with the operation of concatonation
$
(a_1, a_2, ..., a_n) dot (b_1, b_2, ..., b_m) := (a_1, a_2, ..., a_n, b_1, b_2, ..., b_m)
$
Also, $inv(X)$ is a helper set ${inv(x) | x in X}$ (note that $x$ need not have an inverse, we are just defining a new set, another maybe better way to think of $inv(X)$, is as another set of the same cardinality as $X$, along with a bijection $X -> inv(X)$, if $x |-> a$, then we will think of $a$ as the inverse of $x$. Imagine if $X$ was the english alphabet).
We can show that this now forms a group of equivalence relations. Given some word, we can replace $x inv(x)$ with nothing. We can do this to simplify words, $a b inv(b) c ~ a c$, thus forming the equivalence relation. Conacatonation as defined for the monoid will actually be a group operation, meaning $W(X union inv(X))$ is not just a monoid, but also a group.
We can show that this group is a free group, since we can construct the unique homomorphism.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-A490.typ | typst | Apache License 2.0 | #let data = (
("YI RADICAL QOT", "So", 0),
("YI RADICAL LI", "So", 0),
("YI RADICAL KIT", "So", 0),
("YI RADICAL NYIP", "So", 0),
("YI RADICAL CYP", "So", 0),
("YI RADICAL SSI", "So", 0),
("YI RADICAL GGOP", "So", 0),
("YI RADICAL GEP", "So", 0),
("YI RADICAL MI", "So", 0),
("YI RADICAL HXIT", "So", 0),
("YI RADICAL LYR", "So", 0),
("YI RADICAL BBUT", "So", 0),
("YI RADICAL MOP", "So", 0),
("YI RADICAL YO", "So", 0),
("YI RADICAL PUT", "So", 0),
("YI RADICAL HXUO", "So", 0),
("YI RADICAL TAT", "So", 0),
("YI RADICAL GA", "So", 0),
("YI RADICAL ZUP", "So", 0),
("YI RADICAL CYT", "So", 0),
("YI RADICAL DDUR", "So", 0),
("YI RADICAL BUR", "So", 0),
("YI RADICAL GGUO", "So", 0),
("YI RADICAL NYOP", "So", 0),
("YI RADICAL TU", "So", 0),
("YI RADICAL OP", "So", 0),
("YI RADICAL JJUT", "So", 0),
("YI RADICAL ZOT", "So", 0),
("YI RADICAL PYT", "So", 0),
("YI RADICAL HMO", "So", 0),
("YI RADICAL YIT", "So", 0),
("YI RADICAL VUR", "So", 0),
("YI RADICAL SHY", "So", 0),
("YI RADICAL VEP", "So", 0),
("YI RADICAL ZA", "So", 0),
("YI RADICAL JO", "So", 0),
("YI RADICAL NZUP", "So", 0),
("YI RADICAL JJY", "So", 0),
("YI RADICAL GOT", "So", 0),
("YI RADICAL JJIE", "So", 0),
("YI RADICAL WO", "So", 0),
("YI RADICAL DU", "So", 0),
("YI RADICAL SHUR", "So", 0),
("YI RADICAL LIE", "So", 0),
("YI RADICAL CY", "So", 0),
("YI RADICAL CUOP", "So", 0),
("YI RADICAL CIP", "So", 0),
("YI RADICAL HXOP", "So", 0),
("YI RADICAL SHAT", "So", 0),
("YI RADICAL ZUR", "So", 0),
("YI RADICAL SHOP", "So", 0),
("YI RADICAL CHE", "So", 0),
("YI RADICAL ZZIET", "So", 0),
("YI RADICAL NBIE", "So", 0),
("YI RADICAL KE", "So", 0),
)
|
https://github.com/prettyroseslover/CV_July_24 | https://raw.githubusercontent.com/prettyroseslover/CV_July_24/main/resume.typ | typst | #import "data.typ": data
#import "style.typ"
#import "@preview/fontawesome:0.2.0" as fa
#let data = data(sys.inputs.at("lang", default: "ru"))
#set text(size: 13pt, font: ("Roboto Mono"))
#show raw: set text(font: "Roboto Mono")
#show link: it => underline(offset: 2pt, stroke: 1.5pt, extent: 1pt, it)
#let upper = {
set text(fill: style.light)
set underline(stroke: style.light)
grid(
columns: (1fr, auto),
gutter: 2em,
pad(left: 10mm, top: 10mm, bottom: 5mm)[
#grid(columns: (1fr), rows: (auto, auto, 1fr), row-gutter: 12pt, text(
size: 24pt,
weight: "bold",
tracking: 1pt,
data.name,
), {
line(length: 100%, stroke: style.light)
}, {
show raw: set text(weight: "semibold")
style.link_list(2, data.links)
})
],
)
}
#let lower = {
pad(
x: 10mm,
bottom: 10mm,
top: 2mm,
grid(columns: (50%, auto), column-gutter: 2em, {
style.list_block(data.experience)
parbreak()
style.list_block(data.skills)
parbreak()
style.list_block(data.projects)
parbreak()
}, {
style.list_block(data.education)
parbreak()
style.list_block(data.courses)
parbreak()
style.list_block(data.languages)
parbreak()
}),
)
}
#style.resume_page(color: style.color_4, upper_height: 6cm, upper: upper, lower) |
|
https://github.com/chamik/gympl-skripta | https://raw.githubusercontent.com/chamik/gympl-skripta/main/anj.typ | typst | Creative Commons Attribution Share Alike 4.0 International | #import "helper.typ": *
Ústní maturita z angličtiny je docela bolest, protože je zhruba 50% šance, že dostanete otázku na zeměpis/osobnost, která se anglicky jenom tváří. Ostatní otázky jsou spíše o vlastních názorech, proto pro tebe moje výpisky pravděpodobně nebudou moc relevantní. Následují poznámky ke všem tématům, které lze nalézt na #link("https://www.gjp-me.cz/maturity/", "gjp-me.cz/maturity").
Nevím jak u ostatních témat, ale pokud si stejně jako já vytáhnete Londýn, dostanete hromadu pamfletů, ze kterých toho lze hodně vykoukat.
== British literature
todo: Shakespeare, <NAME>, <NAME>, <NAME> (and beef with Herbert)
== American literature
todo: <NAME>, <NAME> (studied in england though), <NAME>, <NAME> (and beef with Tolkien), <NAME>
== <NAME>
see also @romeo[Romeo a Julie]
<NAME>, often regarded as the greatest playwright in the English language, lived during the late 16th and early 17th centuries. Here's a brief historical background of Shakespeare and the time in which he lived:
1. Elizabethan England (1558-1603): Shakespeare was born in 1564 in Stratford-upon-Avon, England, during the reign of Queen Elizabeth I. This was a time of great cultural flourishing in England, known as the Elizabethan era. It was marked by exploration, artistic achievement, and the rise of English nationalism.
2. Theater and Society: Theater was a popular form of entertainment in Elizabethan England, and it played a significant role in society. Plays were performed in public theaters, such as The Globe, where audiences from all social classes could attend.
3. Renaissance: Shakespeare lived during the Renaissance, a period of intellectual and cultural rebirth that spread across Europe. This era saw a renewed interest in classical learning, literature, and the arts.
4. Political Climate: England during Shakespeare's time was marked by political intrigue, religious conflict, and social change. Queen Elizabeth's reign was relatively stable, but there were tensions between Catholics and Protestants, as well as power struggles within the royal court.
5. Literary Influence: Shakespeare was influenced by classical literature, particularly the works of ancient Greek and Roman writers such as Ovid, Seneca, and Plutarch. He also drew inspiration from contemporary English poets and playwrights.
6. Shakespeare's Career: Shakespeare began his career as an actor and playwright in London, where he quickly gained recognition for his talent. He wrote and staged numerous plays, including tragedies like "Hamlet" and "Macbeth," comedies like "A Midsummer Night's Dream" and "Twelfth Night," and histories like "Henry IV" and "Richard III."
7. Legacy: Shakespeare's works have had a profound and enduring impact on literature, theater, and the English language. His plays continue to be performed worldwide, and his words have become an integral part of the literary canon. Shakespeare's influence can be seen in countless adaptations, references, and homages in popular culture.
source: CHATGPT
== <NAME> <hemingway>
_<NAME>_ (1899--1961) was an American novelist and journalist born in Illinois. His work influenced many authors of the 20th century. He enjoyed fishing and drinking a lot; both influences of his father.
He began his career as a journalist. The style guides of _The Kansas City Star_ influenced his later writing: _"Use short sentences. Use short first paragraphs. Use vigorous English. Be positive, not negative."_
When WWI happened he was rejected by the U.S. Army for poor eyesight. Instead he became an ambulance driver in Italy. (He was 18 at this time.) There he was seriously wounded by mortar fire, but still managed to help his peers. Later he had this to say: _"When you go to war as a boy you have a great illusion of immortality. Other people get killed; not you ... Then when you are badly wounded the first time you lose that illusion and you know it can happen to you."_
He fell in love with many women over the years; married and divorced a lot of them.
Ernest worked as a war corresponded in WW2 and was awarded for that. This also influenced his work.
He liked hunting (Green hills of africa), fishing (old man... he wrote in when he was in Cuba)
He was apart of the "Lost generation" -- wrote works such as _A Farewell to Arms_ (Sbohem armádo), or _For Whom the Bell Tolls_ (Komu zvoní hrana).
His most famous book is titled _The Old Man and the Sea_ (Stařec a Moře @starec[]). For this book he was awarded the Pulitzer Prize in 1953 and the Nobel Prize in Literature in 1954. #underline["A man can be destroyed, but not defeated"]
Hemingway killed himself with his fathers shotgun -- mental health issues.
== Festivals, tradition
*31. October -- Halloween*
Children dress up in scary costumes and go "trick-or-treating". They either get sweets or prank people. Decorating houses. Halloween parties. Carving pumpkins.
Celtic end of year. They believed that the veil between life and death is the thinnest; ghost could come to their houses and they were scared. Jack 'o Lantern. Stinky Jack was a criminal. Before he died he tricked the devil in cards and made a deal so he couldn't go to hell. He can't go to heaven as well so he is stuck in between. He was given a lantern with coal so he wouldn't get lost.
*5. November -- Bonfire night*
"gunpowder plot", because of religion, bomb under the parlament (Westminster Palace), <NAME>ox, in the period of James I.
*fourth Thursday of November -- Thanksgiving*
Half of the first settlers in America died through the first winter. Native Americans (Squanto tribe) helped these settlers to make food. After the first successful harvest they invited natives to celebrate the occasion.
Biggest tradition in US. A family reunion. Stuffed turkey, pumpkin pies, mashed potatoes, watching football. Black friday (start of christmas shopping season) -- because of black numbers as opposed to red (negative, losses).
*24/25 December -- Christmas*
In US: opening presents morning of 25.
Boxing day (26th) -- giving gifts to postmans etc. (people who work whole year)
*14th February -- Valentine's day*
priest Valentine...
Valentine cards are (usually) anonymous.
*17th March -- St. Patric's Day*
* -- Easter*
is a significant Christian holiday celebrating the resurrection of Jesus Christ from the dead, three days after his crucifixion. It is observed on a Sunday in spring, following Good Friday. Easter marks the end of a 40-day period of fasting, prayer, and penance. Traditions include attending church services, sharing festive meals, and participating in activities like egg decorating and Easter egg hunts, symbolizing new life and rebirth.
*4th July -- Independence day*
commemorates the adoption of the Declaration of Independence in 1776, when the Thirteen Colonies declared their independence from British rule. The holiday is marked by patriotic displays, including fireworks, parades, concerts, barbecues, and public and private events celebrating American history, culture, and freedom.
== Meals, eating out, fast food
_do we eat to live or live to eat?_
*cooking at home $times$ eating out*
#table(
columns: 2,
[at home], [eating out],
[requires effort and time], [you just have to order something],
[usually cheaper], [can get expensive],
[usually healthier], [can be "junk food"],
)
- cooking is uniquely human -- no other species prepares its food like we do
- bread is one of the most important inventions of humankind -> it allowed us to store large amount of energy and travel large distances
- favorite foods to cook at home: sushi, pancakes, guacamole
- favorite foods to take out: chinese/vietnamese, pizza
- i don't enjoy eating liver
- celiac disease (gluten intolerance but you can die)
- zabijačka -- pig-slaughter (?)
- cocking on a summer camp
== Education, future plans, careers, professions
1. kindergarten (2--6, last year is obligatory)
- soft skills
2. elementary school (6--15, obligatory)
- counting, writing and reading, basics of sciences and history
- first second language (english)
- *second level of primary education* (can switch to grammar school)
- teachers are specialized
3. secondary education
- entrance exams
- grammar school (gympl), vocational school (apprentices), specialized schools
- "maturita exam", graduation/secondary school-leaving exam
4. university
- entrance exam (or not)
- Bachelors (3 years) or Masters (5 years)
- thesis and state exam
The British school system:
- Early Years Foundation Stage (EYFS): Ages 3-5, includes Nursery and Reception.
- Primary Education: Ages 5-11, includes Key Stage 1 (ages 5-7, Years 1-2) and Key Stage 2 (ages 7-11, Years 3-6).
- Secondary Education: Ages 11-16, includes Key Stage 3 (ages 11-14, Years 7-9) and Key Stage 4 (ages 14-16, Years 10-11), culminating in General Certificate of Secondary Education (GCSE) exams.
- Post-16 Education: Ages 16-18, includes Key Stage 5, with options for A-Levels, vocational qualifications, or apprenticeships.
- Higher Education: Typically begins at age 18, includes universities and colleges offering undergraduate and postgraduate degrees.
== Culture -- music, fine arts, politics, religion
- culture is different for everyone
- favorite music -> changes all the time
- are memes culture
- AVU visit with Vladimír
- museum of literature
- i like theater: Kytice
- FILMS! Tenet (<NAME>), Dune (<NAME>)
- BOOKS!!! The Three Body Problem, maturita books... #underline[#link("https://knih.chamik.eu/", [knih.chamik.eu])]
== Exceeding boundaries -- holidays, travelling, transport
- Discover EU
- wish list
- trad climbing
- urban climbing
- solo track (in a foreign country)
- how i travel
- public transport: bus and train (Prague is the best)
- by car -- i don't drive much and i am worried that i will forget it
== Learning languages, English as a world language <worldlang>
why to learn english? -- #underline[colonization], world powers, it's simple\
"Kolik jazyků umíš, tolikrát jsi člověkem."
work, studying, resources online (especially about programming).
standard (royal/queens) english $times$ colloquial (spoken, Cockney)
Cockney -- non-educated folk, comes from australian english prisoners, Pygmalion
#table(
columns: 2,
[American], [British],
[color], [colour],
[traveling], [travelling],
[center], [centre],
[do you have], [have you got],
[elevator], [lift],
[theater], [cinema],
[subway], [underground]
)
- it's hard to learn a language when you don't use it often (German)
- english is the default when it comes to international collaboration
- English-Chinese as a world language in future, Liou Cch'-Sin
== Health and diseases, healthy lifestyle, food, stress, prevention
#linebreak()
*healthcare system in the Czech Republic $times$ USA*
#table(
columns: 2,
[CZ], [USA],
[public healthcare paid from taxes], [private healthcare],
[students, retirees exempt from paying social insurance], [everyone has to pay]
)
- paying thousands of dollars for an ambulance ride
- costs of insulin (medicaments in general)
- prescribing fentanyl for everything because of lobbying -> addiction
*conventional $times$ alternative medicine*
#table(
columns: 2,
[conventional], [alternative],
[based on science and research], [based on old teachings and traditions],
[serious illnesses], [stress relief, etc.],
[covered by insurance companies], [not covered by insurance, usually expensive]
)
- Goop -- Gwyneth Paltrow, frequency stickers
- "healthy" radioactive pendants sold on Amazon
- #underline["snake oil"]
*anti-vaccine movement*
- inoculation observed as early as 200 BCE
- variolation against small pox in 15th century
- (first and only) eradication of a disease -- small pox -- 1970 vaccines
*healthy lifestyle*
- 20% of teenagers in the USA are considered obese (and it's being normalized)
- diet and exercise should be balanced
== London
*History*:
1. Roman London (Londinium): Founded around AD 43, became a significant Roman city.
2. Medieval London: Grew as a trade and political center, witnessed events like the Norman Conquest (1066) and the construction of the Tower of London.
3. Tudor and Stuart Periods: Expansion under the Tudors; suffered the Great Plague (1665) and the Great Fire of London (1666).
4. 18th and 19th Centuries: Industrial Revolution; became the world's largest city; developments in infrastructure, such as railways and the London Underground (1863).
5. 20th Century: Faced bombings during World War II; post-war rebuilding and modernization; cultural and economic boom in the 1960s (Swinging London).
6. 21st Century: Continued growth and diversity; hosted the 2012 Olympics; ongoing development and global influence.
*City*:
The Waterloo bridge divides the main two parts of London. _The City_ and _Westminster_
- _The City_
- mix of the oldest and most modern buildings
- sky scrapers, big business, the Shard
- William the Conqueror (gothic)
- the Tower
- the Monument (of the great fire)
- st. Paul's Cathedral
- burial place
- A. Fleming -- inventor of penicilin
- generals, painters, musicians, monarchs...
- rebuilt after 1666
- The Tower
- used to be a prison
- traitors gate: entrance through the river
- middle tower is called "White tower" and the king used to live there
- king's guards -- beefeaters, tudor uniforms
- nowadays ceremonial role and tour guides
- 7 ravens
- if even one flies away, it would mean the end of monarchy
- they are fat so they can't lol
- the crown jewels
- execution
- Tower bridge
- museum inside
- can be opened for big ships
- _Westminster_
- Westminster Palace
- houses of parlament: house of commons and house of lords
- Elizabeth tower
- Big Ben
- Westminster bridge
- Buckingham Palace
- seat of monarchs
- Victoria memorial
- Trafalgar square
- biggest square in London
- Nelsons column (fight with Napoleon near Trafalgar)
- National gallery
- Whitehall street, ministries
- Downing street 10, prime minister
- Tate gallery, modern art
- Globe theater, Shakespeare
- Piccadilly Circus, "Times square"
- Hyde Park, speakers corner
- British museum, stolen stuff
- Madame's Tussaud's, wax figurines museum
St. Paul's má kopuli, Westminster Abbey má věžičky. Both are burial places.
== Great Britain
- where?
- symbols
- scottish flag -- blue field, white diagonal cross (Andrew's cross)
- english flag -- white fields, red cross ??
- nothern islad -- white field, red diagonal cross
- england -> red rose
- scotland -> thistle
- wales -> daffodil, dragon,
- ireland -> shamrock
\
- 68 million people
- 6th largest economy
- NATO, G7, OECD
- 2020 -- Brexit
- Most populous cities
- London, Manchester, Birmingham, Leeds, Glasgow
- Political systém
- Constitutional monarchy with parlament democracy
- Charles III.
- Main power -- prime minister
- Two parlamentary chambers -- House of Commons, House of Lords
- Two parties -- Conservative, Labour
United Kingdom -- 4 historical parts, monarchy (nowadays king Charles the IV.), seat of monarchs in Buckingham Palace (though the palace is owned by the state).
Parlament -- two chambers, house of lords (gold, red) and house of commons (green, brown, wood). Westminster Palace. Second oldest parlament in the world (Iceland was first).
House of lords -- appointed by King or you have inherited the title ("In contrast to the House of Commons, membership of the Lords is not generally acquired by election. Most members are appointed for life, on either a political or non-political basis.")\
House of commons -- elected\
Government -- departments (ministerstva)
Two main political parties -- Labour party, Conservative party
They don't have a written constitution, #underline[uncodified constitution].
60 million inhabitants, mostly protestant christians (Church of England founded by Herny the VIII), a lot of nationalities, a lot of dialects (@worldlang[])
Economy:
services -- banks, insurance, stock exchange
resources -- oil and gas in northern sea (BP -- British Petrol)
food -- whiskey, beer, tabbaco, spice
british airways, Easy Jet, Airbus
agriculture -- sheep, beef
Weather? xd
Festivals
- Brockford -- running after a block of cheese
- Bonfire night 5. November (treason with barrels of gunpowder under the Parlament)
== Chapters from British History
- War of roses
- the Tudor family
- period of Henry the eighth
- Protestants
divorced, beheaded, died, \
divorced, beheaded, survived
pomoc
== The USA
1. Geography and Landscape: Discuss the diverse geography of the United States, including its vast plains, towering mountains (like the Rockies and the Appalachians), deep canyons (such as the Grand Canyon), and expansive coastlines along the Atlantic, Pacific, and Gulf of Mexico.
2. Demographics: Talk about the multicultural nature of the United States, with people from diverse ethnic backgrounds, religions, and cultures living together. Highlight major cities like New York City, Los Angeles, and Chicago as melting pots of different cultures.
3. History: Briefly cover key moments in American history, such as the American Revolution, the Civil War, and the Civil Rights Movement. Mention iconic figures like <NAME>, <NAME>, and <NAME> Jr.
4. Government and Politics: Discuss the United States government structure, including the separation of powers between the executive, legislative, and judicial branches. Talk about the President, Congress, and the Supreme Court.
5. Economy: Highlight the USA's status as one of the world's largest economies, driven by industries such as technology, finance, entertainment, and manufacturing. Discuss major companies like Apple, Google, and Walmart.
6. Culture: Explore American cultural exports, such as Hollywood movies, TV shows, music (including genres like jazz, blues, rock, and hip-hop), literature, and art. Discuss the influence of American culture globally.
7. Sports: Mention popular American sports like baseball, basketball, American football, and soccer. Discuss major leagues such as the NFL, NBA, MLB, and MLS, as well as iconic athletes like <NAME>, <NAME>, and <NAME>.
8. Education: Highlight the importance of education in the United States, including its prestigious universities like Harvard, MIT, and Stanford. Discuss the education system, including primary, secondary, and higher education.
9. Technology and Innovation: Talk about the USA's role as a global leader in technology and innovation, with companies like Silicon Valley giants (such as Google, Facebook, and Tesla) driving advancements in fields like artificial intelligence, biotechnology, and renewable energy.
10. National Parks and Landmarks: Mention iconic landmarks and national parks in the United States, such as the Statue of Liberty, Mount Rushmore, Yellowstone National Park, and the Everglades.
== Canada
_Basic info_
- North America
- 40 million people
- Capital: Ottawa
- Bordered with USA (Alaska in west, 12 states in south)
- Atlantic, Pacific and Arctic ocean
- 2nd largest country by total area (land plus water)
- 10 provinces. 3 territories (Northwest territories, Yukon, Nunavut)
_Geography_
- 80 % of land uninhabited
- North not suited for living -- cold, rocks, snow
- Mountain ranges: Rocky Mountains, Coast Mountains, St. Elias Mountains
- Highest peak: Mount Logan (5 959 m, Yukon)
- Rivers: Mackenzie -- longest, Yukon, St, Lawrence, Columbia, Saskatchewan
- Lakes -- Erie, Superior, Huron, Ontario, Michigan
- Peninsula: The Ontario Peninsula
- Islands: Baffin Island, Victoria Island, Ellesmere Island, Devon Island
- Lowest point: Great Slave Lake Bottom -- Northwest territories
_Politics_
- Federal constitutional monarchy
- Parliamentary democracy
- Head of the state: monarch of UK; represented by governor general in Canada
- Head of the government: prime minister
- Parlament
- Senate (105 members, appointed by governor general)
- House of Commons (338 members, elected by citizens)
- Fixed election dates for every four years on the third Monday of October
_Economy_
- Currency: Canadian dollar
- Service sector (75 %)
- Sub-sectors, health care, finance, education, food, retail
- Farmers -- provinces of Alberta, Saskatchewan, Manitoba
- Wheat, corn, oilseed, cattle, pigs
- Manufacturing -- Ontario, Quebec
- Trade -> Most with USA
- Energy resources (oil, chemical fuels, electricity, natural gas), raw natural resources (aluminium, gold, nickel)
- NATO, G7, APEC, OECD
_History_
- Indegineous people (Inuits)
- Late 15th century -- European exploration
- Cartier clamed the land for France
- New France -- Quebec city was founded in 1608
- British Conquest -- The Seven Years War (1756--63) -- Treaty of Paris -> Britain in control
- American Revolution -- 1791 -- Lower and Upper Canada (French and English speaking population)
- War of 1812 -- battleground of war between US and Britain
- Dominion -- 1867
- Canadian Pacific Railway -- 1885, coast to coast
- Ofiicial Languages Act -- 1969 -- English and French the official languages of federal government
- Constitution -- 1982, power over its constitution
_Sports_
- Ice hockey -- NHL, Montreal Canadians
- Canadian football
- Inspired by american football
- CFL
- Lacrosse, baseball, curling, football
_Cities_
- Toronto
- Ontario
- Most populous and famous
- International centre pf business, finance, art, culture
- Atlantic shipping through the Great Lakes -- trading centre with USA
- Montreal
- Quebec
- French-speaking city + French culture
- Old-town -- 17th century architecture
- Quebec city
- Quebec
- French-speaking
- Saint Lawrence river
- One of the oldest European settlements in North America
- Ottawa
- Capital
- Borders between french and english area
- Most important government institutions
- Calgary
- Center of oil and gas industry
- Vancouver
- British Columbia
- Vancouver international airport
- Trading hub with Asia
- Sights
- Stanley Park (Vancouver)
- Niagara Falls
- CN Tower -- Toronto
- Personalities
- The Weekend
- <NAME>
== Australia
- Commonwealth of Australia
- criminal background, poor conditions, 1800
- Aboriginals -> murders, slavery, taboo history, now live in cities, reservations are shrinking, the traditions are dying out
- mount Uluru, you can't climb it anymore, sacred for aboriginals
- australian English
- last discovered continent (New Zealand discovered after that), duch marines first, <NAME> made in an english colony
- flag -> union jack, southern cross constellation, 6 states & 1 territory
- nature
- north -> tropical rain forest, dry, tropical, dryest continent
- endemic animals -> kangaroos, #underline[marsupials], black widow
- problems with rabbits -> no natural predators
- dingos
- sharks -> great, white, tiger
- great barrier coral reef
- deadly jellyfish
- economy
- deal with Japan -> Australia has a lot of natural resources
- oil, coal
- biggest exporters of beef
- wheat, wool
- biggest exporter of opals -> funny fields with holes where no one will find you if you fall in
- villages similar to America -- one farm (station) with fields
- home schooling
- flying doctors
== Our town and district (Mělník)
Founded by the tribe of Pšovans. Located in the #underline[fertile lowlands] at the #underline[confluence] of the two main Czech rivers, Elbe and Vltava.
First settlement by #underline[Pšovans] at the top of the hill.
It used to be a #underline[dowry town] (a wedding gift) given by Charles IV. Czech queens used to live here.
*Places of interest*:
- St. Peter and Paul church
- #underline[ossuary] (kostnice) by Matiegky (škola na pražský se jmenuje podle něj)
- the tower is not part of the church
- the tower is about the same height as the depth of the well
- #underline[cloister] in Kapucín church (nowadays a museum)
- Prague gate (used to be part of city walls)
- well (widest in ČR)
- underground (used for storage or shelter)
- Vladimírovo vokno, Cihelna
- <NAME> -- used to be a library, now the local art school
- houses with #underline[gables] (blue star)
*People*:
- <NAME> (denáry)
- St. Ludmila (babička sv. Václava)
- Charles IV. (brought wine from Burgundy)
- <NAME> (má tu bustu)
- <NAME> (Obříství)
- Straka (veslař??)
*Schools, culture, sports*
- there used to be a cinema
*Traditions*
- farmer's markets
- wine fest
- wine night
- tasting wine
== Prague
- General information
- The capital and biggest in CR
- The heart of Europe
- The seat of goverment
- Population: over 1 000 000
- The highest point: Teleček
- The Vltava river
- 22 administrative districts
- Mayor
- Central Bohemian region
- Politics
- President: The Prague Castle
- Goverment: The Straka Academy
- Senate: Wallenstein Pallace
- Parliament (Chamber of Deputies): Thun Palace
- History
- Legend -- mythical Libuše -- predicted
- 14th century -- Charles IV.
- Rudolf II.
- Ferdinand II.
- Economy
- 90 % services
- Food industry: Staropramen, Vitana, Delta bakeries
- Mechanical industry: ČKD, Avia
- Chemical + constraction industry: Astrid, Zentiva, Druchema
- Film industry: Barrandov
- Textil: Blažek
- Transport
- PID
- Metro
- Main Train Station, Airport
- Sights
- The town of hundred spires
- Prague Castle
- St. Vitus Cathedral -- crown jewels, gothic
- Lesser Town
- The Lesser Town Square
- St. Nicholas Church
- Lennon´s wall
- Charles Bridge
- Charles IV.
- Old Town
- St. Nicholas Church
- Orloj -- medieval astronomic clock
- Statue of Jan Hus
- Church of Our Lady before Týn
- Christmas Markets
- Josefov -- Jewish quater
- Old Jewish Cemetary
- Maisel Synagogue
- Vyšehrad
- Cemetery Slavín
- Petřín Tower
- Charles University
- Entertainment
- Theatres -- Semafor
- Prague ZOO
- Prague botanical garden
- Parks -- Letná, Stromovka
- Important personalities
- <NAME>, <NAME>, <NAME>, <NAME>
== The Czech Republic
- Geography
- Central europe
- Landlocked country
- Bordered by Germany, Austria, Slovakia, Poland
- Highest mountain: Sněžka (1603 m)
- Longest river: Vltava
- Biggest river: Elbe
- Major mountain ranges: Krkonošské mountains, Šumava, Jeseníky
- 14 regions, 3 lands
- 4 NPs (Krkonoše, Šumava, Podyjí, Czech Switzerland)
- Basic info
- Also known as Czechia
- Continental and oceanic climate
- Capital and largest city: Prague
- Over 10,5 million people
- Currency: Czech crown
- Official language: Czech
- Atheist country
- Political systém
- Parliamentary representative democracy
- Bicameral parliament
- Chambre of deputies
- Senate
- The president = formal head of state
- Limited powers
- Appoints the prime minister
- <NAME>
- Prime minister: <NAME>
- Specific features and symbols
- Beer
- <NAME>, Budweiser Budvar, Staropramen
- Symbols -- coat od arms
- National anthem: Kde domov můj
- National flag
- Czech cuisine heavy and meaty
- Industries
- Glass, ceramics, cars -- "assembly line of Europe"
- Culture
- Art
- Alfons Mucha
- Architecture
- Centre of Prague -- Astronomical Clock, Prague Castle
- UNESCO sights
- Literature
- Seifert -- The Nobel Prize
- Kafka
- Music
- <NAME>, <NAME>, <NAME>
- History
- 6th century -> Slavs in Bohemia
- Samo's empire
- 12th century -> Přemyslid dynasty
- Charles IV. -> The father of the country
- Hussite Revolution -> Jan Hus
- The Habsburg Monarchy
- Transport
- Václav Havel international Airport
- Prague metro -- 3 lines (4)
- Public transport in every city
- Sports
- Football and hockey
- Basketball, volleyball, handbal, athletics, floorball
- Ice hockey -- olympic gold Nagano 1998
- Significant personalities
- <NAME>
- <NAME>
- <NAME>
== Problems of the world I. -- environment
1. Climate Change:
Causes: greenhouse gas emissions, deforestation, fossil fuel consumption.
Effects: rising global temperatures, melting polar ice caps, sea-level rise, extreme weather events.
Solutions: renewable energy sources, international agreements (e.g., Paris Agreement), individual actions (e.g., reducing carbon footprint).
2. Pollution:
Types: air pollution, water pollution, soil contamination, plastic pollution.
Sources: industrial emissions, vehicle exhaust, agricultural runoff, improper waste disposal.
Consequences: health issues (respiratory problems, waterborne diseases), ecosystem damage, loss of biodiversity.
3. Deforestation:
Causes: logging, agricultural expansion, urbanization.
Impact: loss of habitat for species, disruption of water cycles, contribution to climate change.
Mitigation: reforestation, sustainable forestry practices, conservation efforts.
4. Loss of Biodiversity:
Causes: habitat destruction, pollution, overfishing, climate change.
Importance: ecosystem balance, medical discoveries, agricultural resilience.
Preservation: protected areas, wildlife conservation laws, restoration projects.
5. Water Scarcity:
Reasons: overuse of water resources, pollution, climate change effects on precipitation.
Impacts: agricultural productivity, human health, regional conflicts.
Solutions: efficient water use, desalination technology, improved infrastructure.
6. Sustainable Development:
Definition: meeting current needs without compromising the ability of future generations.
Examples: green buildings, sustainable agriculture, circular economy.
Importance: long-term environmental health, economic stability, social equity.
== Problems of the world II. -- social problems, lethal diseases
1. Poverty:
Causes: unemployment, lack of education, economic disparity.
Effects: malnutrition, lack of access to healthcare and education, social exclusion.
Solutions: economic policies for job creation, educational programs, social safety nets.
2. Inequality:
Types: economic, gender, racial, and social inequality.
Impacts: limited opportunities for marginalized groups, social unrest, hindered economic growth.
Remedies: affirmative action, inclusive policies, education and awareness campaigns.
3. Homelessness:
Reasons: housing affordability crisis, unemployment, mental illness, substance abuse.
Consequences: poor health, increased crime rates, social isolation.
Solutions: affordable housing projects, mental health support, job training programs.
4. Human Rights Violations:
Examples: political oppression, discrimination, gender-based violence.
Consequences: social instability, refugee crises, global condemnation.
Actions: international treaties, advocacy, sanctions against violators.
#hrule()
1. HIV/AIDS:
Transmission: unprotected sex, blood transfusions, mother-to-child.
Effects: weakened immune system, social stigma, high mortality.
Prevention/Treatment: antiretroviral therapy (ART), education on safe practices, needle exchange programs.
2. Cancer:
Types: lung, breast, prostate, colorectal, etc.
Risk factors: smoking, diet, genetic predisposition, environmental exposures.
Treatments: surgery, chemotherapy, radiation, immunotherapy.
3. Cardiovascular Diseases:
Examples: heart attacks, strokes, hypertension.
Causes: unhealthy diet, lack of exercise, smoking, genetic factors.
Prevention: healthy lifestyle choices, regular medical check-ups, public health initiatives.
4. COVID-19:
Origin: SARS-CoV-2 virus.
Impact: global pandemic, high mortality, long-term health effects (Long COVID).
Response: vaccines, public health measures (masks, social distancing), antiviral treatments.
== Problems of the world III. -- addictions <addictions>
- Substance Addictions:
Alcohol: prevalence, social acceptance, health risks (liver disease, heart problems), impact on families.
Drugs: opioids, cocaine, marijuana, methamphetamines; effects on physical and mental health, addiction cycle.
Nicotine: smoking and vaping, health consequences (lung cancer, respiratory issues), addiction mechanisms.
- Behavioral Addictions:
Gambling: financial ruin, family breakdowns, mental health issues.
Internet and Gaming: impact on social skills, physical health problems, interference with daily responsibilities.
#underline[Social networks] especially dangerous for teenagers
Shopping: financial consequences, underlying emotional issues, compulsive behavior patterns.
- brain chemistry, dopamine reward system
- Peer pressure and social norms.
- Availability and accessibility of substances or behaviors.
- Socioeconomic status and living conditions.
== Media and technology
- different types of mediums: newspapers and magazines, radio, TV... digital
- pessimism is better for the views
- Social media dangers and addictions, see @addictions[]
- AI (artificial inteligence)
- in schools #sym.arrow cheating students, AI generated assignments
- in society #sym.arrow where is the line between artificial and real inteligence?
- scamming #sym.arrow automated bots
- fake news, propaganda
- ethics of using human works
- VR (virtual reality)
- metaverse
- Ready Player One type of future?
- Robotics and automation
- Privacy
- undermined by the state and by the advertisement sector (and more)
- private data used to serve personalized ads
- Meta (Facebook, Instagram), Google, Amazon...
- Orwell kind of future, see @farma[chapter]
|
https://github.com/Aphoh/flash-attention-703 | https://raw.githubusercontent.com/Aphoh/flash-attention-703/main/main.typ | typst | #import "@preview/touying:0.5.2": *
#import "@preview/cetz:0.2.2"
#import "@preview/fletcher:0.5.1" as fletcher: node, edge, diagram
#import themes.university: *
#show: university-theme.with(
aspect-ratio: "16-9",
config-common(handout: false),
config-info(
title: [Flash Attention 1],
author: [<NAME>],
date: datetime.today(),
institution: [KAIST],
logo: emoji.school,
),
)
#let cetz-canvas = touying-reducer.with(reduce: cetz.canvas, cover: cetz.draw.hide.with(bounds: true))
#let fletcher-diagram = touying-reducer.with(reduce: fletcher.diagram, cover: fletcher.hide)
#let smat(..args) = { math.mat(delim: "[", ..args) }
#let bvec(a) = { math.accent(math.bold(a), math.arrow)}
#title-slide()
== Overview
1. GPU Architecture
2. Attention Overview
3. Online Softmax
4. Flash Attention
5. Discussion
== GPU Architecture
#grid(columns: (auto, auto),
[
#align(center)[#image("a100mem.jpg")]
], [
#text(size: 20pt, [
#pause
SM: 'Stream Multiprocessor' #pause
L1/SRAM: Fast and tiny #pause
L2 fast-ish and small #pause
HBM: Slow and big #pause
How does an SM do compute?
])
]
)
== GPU Architecture
#grid(columns: (auto, auto),
[
#align(center)[#image("sm.jpg")]
], [
#text(size: 20pt, [
#pause
Each Warp is 32 executing 'threads' #pause
Warps can use tensor cores #pause
Each tensor core can do one 16x16x16 matrix multiply _every 16 cycles_ #pause
That's $(16*16*16)/16 = 256$ FLOPs/cycle!#pause
Threads/warps can communicate only through SRAM #pause
Goal: break your problem into pieces of roughly `size(SRAM)` #pause
Goal: keep the tensor cores fed
])
]
)
== GPU Architecture: example, matrix multiply
#grid(columns: (3fr, 3fr),
[
#align(center)[#image("tiled.svg")]
], [
#text(size: 20pt, [
#pause
Each tile is given to an SM #pause
Each SM breaks the tile into 16x16x16 pieces #pause
Each piece is assigned to a warp #pause
Each warp does it's 16x16x16 matrix multiply, accumulating into SRAM #pause
Otherwise, we'd have to go from $"SRAM" -> "HBM" -> "SRAM"$ for each 16x16x16 piece!
])
]
)
== GPU Architecture takeaways
#slide(repeat: 3, self => [
#let (uncover, only, alternatives) = utils.methods(self)
#only("1-")[
1. Break your problem into pieces that can fit into SRAM
]
#only("2-")[
2. Use tensor cores whenever you can
]
#only("3-")[
3. Minimize read/writes to HBM
]
])
== Attention Overview
Queries, Keys, Values: $[S, D]$
$
Q = mat(delim: "[",
dots.h, q_1, dots.h;
dots.h, q_2, dots.h;
dots.v, dots.v, dots.v;
dots.h, q_H, dots.h;
),
K = mat(delim: "[",
dots.h, k_1, dots.h;
dots.h, k_2, dots.h;
dots.v, dots.v, dots.v;
dots.h, k_H, dots.h;
),
V = mat(delim: "[",
dots.h, v_1, dots.h;
dots.h, v_2, dots.h;
dots.v, dots.v, dots.v;
dots.h, v_H, dots.h;
)
$
#pause
Output: $"Softmax"(Q K^T) V$
#pause
What does this look like in the GPU?
== Naive Attention Computation
#slide(repeat: 8, self => [
#let (uncover, only, alternatives) = utils.methods(self)
#for i in range(1, 8) {
only(str(i))[ #image("naive/" + str(i) + ".jpg") ]
}
#only("8")[ #image("naive/7.jpg") ]
#place(bottom + center, dy: -1in,
uncover("8")[Can we do less IO?]
)
])
== Attention: Single query
Assume query is a single vector $bvec(q)$
$
bvec(a) = bvec(q) K^T pause &= smat(
dots.h, bvec(q), dots.h;
)
smat(
dots.v, dots.v, dots.h, dots.v;
bvec(k)_2, bvec(k)_3, dots.h, bvec(k)_S;
dots.v, dots.v, dots.h, dots.v;
) \
pause
&= smat(
bvec(q) dot bvec(k)_1, bvec(q) dot bvec(k)_2, dots.h, bvec(q) dot bvec(k)_S;
) \
&= smat(
a_1, a_2, dots.h, a_S;
) \
pause
"Softmax"(bvec(a)) &= smat((exp(a_1 - m)) / Z, (exp(a_2 - m))/Z, ... , (exp(a_S - m)) / Z) \
"where" m &= max_j a_j, Z = sum_(j=1)^S exp(a_j - m)
$
== Attention: Softmax scans $bvec(a)$ 3 times
1. Compute
$
m = max_j a_j
$
#pause
2. Compute
$
Z = sum_(j=1)^S exp(a_1 - m)
$
#pause
3. Compute
$
"Softmax"(a) = smat((exp(a_1 - m)) / Z, (exp(a_2 - m))/Z, ... , (exp(a_S - m)) / Z) \
$
== Attention: Softmax in two scans
We can do better! #pause
This is called "Online Softmax", published by NVIDIA #footnote[Online normalizer calculation for softmax, https://arxiv.org/abs/1805.02867]
#pause
Want to scan over $bvec(a)$ only once, computing $m, Z$ at the same time
#align(start)[$forall i in {1..S}$]
$
m_i &= max(m_(i-1), a_i) #pause arrow.l m_S "will be the max" \ #pause
Z_i &= sum_(j=1)^i e^(a_j - m_i) #pause arrow.l "requires summing everything up..." \ #pause
& "Can we express" Z_i "in terms of" Z_(i-1) "?" \
$
== Attention: Softmax in two reads
$
Z_i &= sum_(j=1)^i e^(a_j - m_i) pause \
&= sum_(j=1)^(i-1) e^(a_j - m_i) + e^(a_i - m_i) "(pull out" i"-th term)" \ pause
&= sum_(j=1)^(i-1) e^(a_j - bold(m_(i-1) + m_(i-1)) - m_i) + e^(a_i - m_i) \ pause
&= (sum_(j=1)^(i-1) e^(a_j - m_(i-1)))e^(m_(i-1) - m_i) + e^(a_i - m_i) \ pause
&= Z_(i-1)e^(m_(i-1) - m_i) + e^(a_i - m_i)
$
== Attention: Softmax in two reads
1. #align(start)[$forall i in {1..S}$]
$
m_i &= max(m_(i-1), a_i) \ #pause
Z_i &= Z_(i-1)e^(m_(i-1) - m_i) + e^(a_i - m_i) \
$
#pause
2.
$
"Softmax"(bvec(a)) = smat(dots.h, exp(a_i - m_S) / Z_S, dots.h)
$
== Attention in two read/writes
Can we do this _while we read $Q,K,V$_? #pause
$
smat(
dots.h, bvec(q), dots.h;
)
smat(
dots.v, dots.v, dots.h, dots.v;
bvec(k)_1, bvec(k)_2, dots.h, bvec(k)_S;
dots.v, dots.v, dots.h, dots.v;
) arrow.r smat(dots.h, bvec(x), dots.h)
$ #pause
$forall i in {1..S}$
$
x_i &= bvec(q) dot bvec(k_i) \ #pause
m_i &= max(m_(i-1), x_i) \ #pause
Z_i &= Z_(i-1)e^(m_(i-1) - m_i) + e^(a_i - m_i) \
$
== Attention in two read/writes
Now apply softmax _as we compute_ $"Softmax"(bvec(q)K^T)V$
#pause
$
smat(
x_1, x_2, dots.h, x_S;
)
smat(
dots.h, bvec(v)_1, dots.h;
dots.h, bvec(v)_2, dots.h;
dots.v, dots.v, dots.v;
dots.h, bvec(v)_H, dots.h;
) arrow.r
smat(dots.h, bvec(o), dots.h)
$
#pause
$forall i in {1.. S}$
$
w_i &= exp(x_i - m_S) / Z_S \ pause
bvec(o_i) &= o_(i-1) + w_i bvec(v_i) <- "Final output at " bvec(o)_S
$
== Attention in two read/writes
Overall looks like
$
forall i in {1..S} \
x_i &= bvec(q) dot bvec(k_i) <- "Write to hbm" \
m_i &= max(m_(i-1), x_i) \
Z_i &= Z_(i-1)e^(m_(i-1) - m_i) + e^(a_i - m_i) \
forall i in {1.. S} \
w_i &= exp(x_i - m_S) / Z_S <- "Read " x_i " from hbm" \
bvec(o_i) &= o_(i-1) + w_i bvec(v_i)
$
== Attention: can we get it in one?
#pause Problem: need $w_i$ to compute $bvec(o_i)$...
#pause Solution: Can we adjust $bvec(o_i)$ as we scan over everything?
#pause Try the same trick as before
#pause
$
bvec(o_i)' &:= sum_(j=1)^i exp(x_j - m_i) / Z_i bvec(v_j), " replacing" m_S -> m_i, Z_S -> Z_i \ pause
&= sum_(j=1)^(i-1) exp(x_j - m_i) / Z_i bvec(v_j) + exp(x_i - m_i) / Z_i bvec(v_i)\
$
== Attention: can we get it in one?
$
bvec(o_i)' &= sum_(j=1)^(i-1) exp(x_j - m_i) / Z_i bvec(v_j) + exp(x_i - m_i) / Z_i bvec(v_i) \ pause
&= sum_(j=1)^(i-1)
exp(x_j - m_i) / Z_i
exp(x_j - m_(i-1)) / exp(x_j - m_(i-1))
Z_(i-1) / Z_(i-1)
bvec(v_j) + dots.h \ pause
&= sum_(j=1)^(i-1)
exp(x_j - m_(i-1)) / Z_(i-1)
exp(x_j - m_i) / exp(x_j - m_(i-1))
Z_(i-1) / Z_i
bvec(v_j) + dots.h \ pause
&= (sum_(j=1)^(i-1)
exp(x_j - m_(i-1)) / Z_(i-1)
bvec(v_j)
)
exp(m_(i-1) - m_i)
Z_(i-1) / Z_i
+ dots.h \ pause
&= bvec(o)'_(i-1)
exp(m_(i-1) - m_i)
(Z_(i-1) \/ Z_i)
+ (exp(x_i - m_i) \/ Z_i) bvec(v_i)
$
== Attention: putting it all together
$forall i in {1..S}$
$
x_i &= bvec(q) dot bvec(k_i) \
m_i &= max(m_(i-1), x_i) \
Z_i &= Z_(i-1)e^(m_(i-1) - m_i) + e^(a_i - m_i) \
pause
bvec(o)'_i &= bvec(o)'_(i-1)
e^(m_i - m_(i-1))
Z_(i-1) / Z_i
+ e^(x_i - m_i) / Z_i bvec(v_i)
$
Once we hit $i=S$, $bvec(o)'_S$ has the correct output for $bvec(q)$!
== Multiple queries at once
#pause
#grid(columns: (2fr, 1fr),
image("Screenshot 2024-09-23 at 10.18.58 PM.png"),
[
#pause
Pick \# of queries/keys that fit into sram #pause
HBM usage scales with the number of $bvec(q)$ we compute at once, not with $S$ #pause
Important for long sequence modeling! #pause
],
)
== Performance
#align(center)[
#image("flash-attn-figure.png")
]
== Discussion
1. Have you used flash attention before?
2. Are there any questions you have about CUDA/GPUs?
3. Can you think of any other situations where we can use the online softmax trick? |
|
https://github.com/MattiaOldani/Informatica-Teorica | https://raw.githubusercontent.com/MattiaOldani/Informatica-Teorica/master/capitoli/complessità/15_utilizzare_le_dtm.typ | typst | #import "@preview/lemmify:0.1.5": *
#let (
theorem, lemma, corollary,
remark, proposition, example,
proof, rules: thm-rules
) = default-theorems("thm-group", lang: "it")
#show: thm-rules
#show thm-selector("thm-group", subgroup: "theorem"): it => block(
it,
stroke: red + 1pt,
inset: 1em,
breakable: true
)
#import "../alias.typ": *
= Funzionalità di una DTM
== Insiemi riconosciuti
La principale funzionalità di una DTM è *riconoscere linguaggi*. Un linguaggio $L subset.eq Sigma^*$ è *riconoscibile* da una DTM se e solo se esiste una DTM $M$ tale che $L = L_M$.
Grazie alla possibilità di riconoscere linguaggi, una DTM può riconoscere anche gli insiemi: dato $A subset.eq NN$, _come lo riconosco con una DTM?_ L'idea che viene in mente è di codificare ogni elemento $a in A$ in un elemento di $Sigma^*$, per poter passare dal riconoscimento di un insieme al riconoscimento di un linguaggio.
$ A arrow.long.squiggly #square(align(center + horizon)[cod]) arrow.long.squiggly L_A = {cod(a) : a in A} $
Un insieme $A$ è riconoscibile da una DTM se e solo se esiste una DTM $M$ tale che $L_A = L_M$.
Quando facciamo riconoscere un insieme $A$ a una DTM $M$, possiamo trovarci in due situazioni, in funzione dell'input (_codificato_):
+ se l'input appartiene ad $A$, allora $M$ si arresta;
+ se l'input _non_ appartiene ad $A$, allora $M$ può:
- arrestarsi rifiutando l'input, ovvero finisce in uno stato $q in.not F$, ma allora $A$ è ricorsivo;
- andare in loop, ma allora $A$ è ricorsivamente numerabile.
#theorem(
numbering: none
)[
La classe degli insiemi riconosciuti da DTM coincide con la classe degli insiemi ricorsivamente numerabili.
]
Un *algoritmo deterministico* per il riconoscimento di un insieme $A subset.eq NN$ è una DTM $M$ tale che $L_A = L_M$ e tale che $M$ si arresta su ogni input.
#theorem(
numbering: none
)[
La classe degli insiemi riconosciuti da algoritmi deterministici coincide con la classe degli insiemi ricorsivi.
]
== Problemi di decisione
Una seconda funzionalità delle DTM è quella di risolvere dei *problemi di decisione*.
Dato problema $Pi$, con istanza $x in D$ e domanda $p(x)$, andiamo a codificare gli elementi di $D$ in elementi di $Sigma^*$, ottenendo $L_Pi = {cod(x) bar.v x in D and p(x)}$ *insieme delle istanze (_codificate_) a risposta positiva* di $Pi$.
La DTM risolve $Pi$ se e solo se $M$ è un *algoritmo deterministico* per $L_Pi$, ovvero:
- se vale $p(x)$, allora $M$ accetta la codifica di $x$;
- se non vale $p(x)$, allora $M$ si arresta senza accettare.
== Calcolo di funzioni
Oltre a riconoscere linguaggi, riconoscere insiemi e risolvere problemi di decisione, le DTM sono anche in grado di *calcolare funzioni*. Questo è un risultato molto importante, in quanto sappiamo che calcolare funzioni significa risolvere problemi del tutto generali, quindi non solo di decisione.
Data una funzione $f : Sigma^* arrow.long Gamma^*$, la DTM $M$ calcola $f$ se e solo se:
- se $f(x) arrow.b$ allora $M$ su input $x$ termina con $f(x)$ sul nastro;
- se $f(x) arrow.t$ allora $M$ su input $x$ va in loop.
A tutti gli effetti le DTM sono _sistemi di programmazione_.
== Potenza computazionale
È possibile dimostrare che le DTM calcolano tutte e sole le funzioni *ricorsive parziali*.
Possiamo riscrivere la *tesi di Church-Turing* come
#align(center)[
#block(
stroke: green + 1pt,
inset: 1em,
breakable: true,
[_"Una funzione è intuitivamente calcolabile se e solo se è calcolata da una DTM"_]
)
]
Inoltre, è possibile dimostrare che le DTM sono *SPA* (sistemi di programmazione accettabili), semplicemente mostrando che valgono i _tre assiomi di Rogers_:
+ le DTM calcolano tutte e sole le funzioni *ricorsive parziali*;
+ esiste una *DTM universale* che simula tutte le altre;
+ vale il teorema $S^m_n$.
|
|
https://github.com/Wh4rp/OCI-Solutions | https://raw.githubusercontent.com/Wh4rp/OCI-Solutions/main/README.md | markdown | # OCI Solutions Book
Este proyecto es un libro escrito en Typst que contiene las soluciones de la OCI (Olimpiada Chilena de Informática) desde el año 2015 hasta el 2023. El objetivo de este libro es proporcionar una referencia completa de las soluciones de los problemas planteados en la OCI.
## Contribuciones
Este libro aún no está completado y se agradece cualquier contribución para agregar nuevas soluciones o mejorar las existentes. Si deseas contribuir, sigue estos pasos:
1. Haz un fork de este repositorio.
2. Crea una rama nueva para tu contribución.
3. Agrega tus soluciones o mejoras al libro.
4. Realiza un pull request para que tus cambios sean revisados y fusionados.
## Estructura del libro
El libro está organizado por años, y cada año contiene los problemas planteados en la OCI junto con sus soluciones. Cada solución está escrita en Typst y se proporciona una explicación detallada de la misma.
## Uso del libro
Puedes utilizar este libro como referencia para estudiar y comprender las soluciones de los problemas planteados en la OCI. Cada solución está acompañada de una explicación detallada que te ayudará a entender el razonamiento detrás de la solución.
## Licencia
Este proyecto se encuentra bajo la licencia [MIT](LICENSE), lo que significa que puedes utilizar, modificar y distribuir el contenido de este libro de acuerdo con los términos de dicha licencia.
¡Gracias por tu interés en contribuir a este proyecto!
|
|
https://github.com/dark-flames/resume | https://raw.githubusercontent.com/dark-flames/resume/main/libs.typ | typst | MIT License | #import "libs/trans.typ": *
#import "libs/version.typ": * |
https://github.com/Mc-Zen/tidy | https://raw.githubusercontent.com/Mc-Zen/tidy/main/src/styles.typ | typst | MIT License | #import "styles/default.typ"
#import "styles/minimal.typ"
#import "styles/help.typ"
|
https://github.com/EpicEricEE/typst-plugins | https://raw.githubusercontent.com/EpicEricEE/typst-plugins/master/outex/src/lib.typ | typst | #import "outex.typ": outex, repeat
|
|
https://github.com/jomaway/typst-teacher-templates | https://raw.githubusercontent.com/jomaway/typst-teacher-templates/main/README.md | markdown | MIT License | # typst-teacher-tools (ttt)
Collection of tools, which makes the teacher life easier. This repo contains multiple packages and templates.
> Old version of this repo is still available under the branch [deprecated](https://github.com/jomaway/typst-teacher-templates/tree/deprecated)
⚠️ **Still a work in progress**
## Packages
- [ttt-utils](./ttt-utils/): the core package.
## Templates
- [ttt-exam](./ttt-exam/)
- [ttt-lists](./ttt-lists/)
- [ttt-worksheet](./ttt-worksheet/)
# Changelog
See [CHANGELOG.md](CHANGELOG.md)
|
https://github.com/noahjutz/AD | https://raw.githubusercontent.com/noahjutz/AD/main/notizen/algorithmen/main.typ | typst | = Einfache Algorithmen
== ggT
Man sagt "$x$ teilt $a$", wenn $a$ ohne Rest durch $x$ teilbar ist.
$
x divides a
$
Der größte gemeinsame Teiler von $a$ und $b$ $gcd(a, b)$ ist der größte Wert, für den gilt:
$
x divides a and x divides b
$
=== Primfaktorzerlegung
Um den ggT von $a$ und $b$ zu ermitteln, können wir $a$ und $b$ probeweise durch Faktoren teilen. Beispiel mit $a = 3528, b = 3780$:
#align(center, include "ggt_primes_step1.typ")
Um systematischer vorzugehen, ermitteln wir die gemeinsamen minimalen Faktoren von $a$ und $b$ durch Primfaktorzerlegung.
$
3528 &= 2^3 dot 3^2 dot 5^0 dot 7^2 \
3780 &= 2^2 dot 3^3 dot 5^1 dot 7^1
$
Die gemeinsamen Faktoren von $a$ und $b$ sind in diesem Beispiel $2^2, 3^2, 7$. Multipliziert man sie, so erhält man
$
gcd(3528, 3780) = 2^2 dot 3^2 dot 7 = 252
$
=== Euklid
Haben $a$ und $b$ mit $a>b$ einen gemeinsamen Teiler $x$, so ist die Differenz $d=a-b$ auch ein vielfaches von $x$.
#include "ggt_proof.typ"
Die Rechnung ist also gleich, wenn statt $a$ und $b$ die Parameter $b$ und $d$ verwendet werden.
$
gcd(a, b) = gcd(a-b, b) = x
$
#include "euclid.typ"
Irgendwann sind $a_n$ und $b_n$ gleich. Der ggT ist dann $x = a_n = b_n$. Dieses $x$ teilt auch $a_0$ und $b_0$, weil der umgekehrte Schritt lediglich ein vielfaches von $x$ zu $a$ addiert.
#stack(dir: ltr, spacing: 20pt,
$
a_(n-1) = a_n + b_n
$, $
b_(n-1) = b_n
$
)
Dieser Algorithmus zur berechnung des ggT ist der *einfache euklidische Algorithmus*. Der Pseudo-Code ist wie folgt.
```py
def gcd_euclid(a, b):
if a == b: return a
a_next = max(b, a - b)
b_next = min(b, a - b)
gcd(a_next, b_next)
```
Passt ein $b$ mehrmals in ein $a$, so müssen mehrere Subtraktionsschritte getätigt werden, welche durch eine Moduloberechnung konsolidiert werden können.
#import "@preview/xarrow:0.3.1": xarrow
$
a_0 -->^(-b) a_1 -->^(-b) a_2 -->^(-b) a_n \
a_0 xarrow(#h(24pt) mod b #h(24pt)) a_n
$
Der *verbesserte Algorithmus* gibt $b$ aus, wenn $a mod b = 0$, weil $b$ der kleinere Wert ist und $a$ durch $b$ teilbar ist.
Des Weiteren ist $r = a mod b$ per Definition des Modulo immer kleiner als $b$, wir können uns also die $max$/$min$-berechnung sparen.
```py
def gcd_euclid_fast(a, b):
if a % b == 0: return b
a_next = b
b_next = a % b
return gcd(a_next, b_next)
```
Iterativ kann der Algorithmus folgendermaßen umgeschrieben werden:
```py
def gcd_euclid_fast_iterative(a, b):
while a % b != 0:
a, b = b, a % b
return b
```
== kgV
Man nennt $x$ ein Vielfaches von $a$, wenn es ein $k in ZZ$ gibt, sodass
$
x = k dot a
$
Ein gemeinsames Vielfaches von $a$ und $b$ erfüllt mit $k_1, k_2 in ZZ$:
$
x = k_1 dot a = k_2 dot b
$
Zum Beispiel ist 12 ein Vielfaches von 4 und 6, weil $12 = 3 dot 4 = 2 dot 6$.
#include "vielfaches.typ"
Das kleinste gemeinsame Vielfache ist der kleinste Wert $x$, der sowohl ein Vielfaches von $a$ als auch von $b$ ist. Man schreibt:
$
op("lcm")(a, b)
$
Eine naive Implementierung prüft alle $x in NN$ auf die Bedingung $a divides x and b divides x$.
```py
def lcm_naive(a, b):
x = 1
while x % a != 0 or x % b != 0:
x += 1
return x
```
=== Primfaktorzerlegung
Um das kleinste gemeinsame Vielfache von $a$ und $b$ zu ermitteln, nehmen wir dieses mal nicht die Schnittmenge beider Primfaktorzerlegungen, sondern die Vereinigung. Wir erweitern also die eine Zerlegung um die Faktoren, welche zusätzlich in der anderen sind.
#include "kgv_primes.typ"
=== Zusammenhang ggT / kgV
Wir haben etabliert, dass beim ggT die gemeinsamen Primfaktoren multipliziert werden, während beim kgV die überschüssigen Primfaktoren hinzumultipliziert werden.
$
gcd(a, b) &= product_(p in PP) p^(min(e_p, f_p)) \
op("lcm")(a, b) &= product_(p in PP) p^(max(e_p, f_p))
$
Daraus lässt sich folgender Zusammenhang schließen:
$
gcd(a, b) dot op("lcm")(a, b) = a dot b
$
Das liegt daran, dass:
$
p^(min(e_p, f_p)) dot p^(max(e_p, f_p)) = p^(e_p+f_p)
$
== Sieb des Eratosthenes
Eine Primzahl hat genau zwei Teiler: sich selbst und 1. Das Gegenstück ist eine Zusammengesetzte Zahl; diese hat mindestens zwei Primfaktoren. Die 1 ist weder prim noch zusammengesetzt.
$
PP = {2, 3, 5, 7, 11, 13, 17, 19, ...}
$
Die Menge aller Primzahlen sind also die natürlichen Zahlen ohne zusammengesetze Zahlen und ohne 1.
=== Algorithmus
Um alle Primzahlen bis zu einem Wert $n$ herauszufinden, entfernen wir schrittweise alle zusammengesetzten Zahlen aus der Menge {2, 3, 4, ..., n}. Im Beispiel ist $n = 50$.
#import "eratosthenes.typ": sieve
#sieve(0)
In jeder Iteration des Algorithmus wählen wir die kleinste Zahl $p$, welche noch nicht markiert wurde. Dann werden alle Vielfachen von $p$ gestrichen und $p$ als Primzahl markiert.
Der erste Schritt ist trivial: Die kleinste Primzahl in $PP$ ist 2.
#sieve(2)
Die nächste nicht gestrichene Zahl ist 3. Sie ist kein Vielfaches von 2, und auch kein Vielfaches von irgend einer anderen Primzahl, weil es keine Primzahl kleiner als 2 gibt. Daraus folgt, dass 3 eine Primzahl ist.
#sieve(3)
Der nächste Wert ist 5. Er ist nicht Vielfaches von irgend einer Zahl kleiner als sich selbst (außer 1), daher ist er auch eine Primzahl.
#sieve(5)
Das kleinste noch nicht gestrichene Vielfache einer Primzahl $p$ ist jeweils $p^2$. Das liegt daran, dass jedes Vielfache von $p$ auch ein Vielfaches von $k$ ist.
$
k dot p = p dot k
$
Zum Beispiel ist 15 ein Vielfaches von $p = 5$ mit $k = 3$, aber wurde davor schon als Vielfaches von $p = 3$ mit $k = 5$ gestrichen.
#sieve(7)
Der Algorithmus ist beendet, wenn $p^2 > n$, weil es dann kein Vielfaches von $p$ gibt, welches nicht davor schon gestrichen wurde. Damit wurden alle zusammengesetzten Zahlen gestrichen, und es bleiben nur noch Primzahlen.
#sieve(51)
== Addition um 1
Ein Stellenwertsystem mit Basis $b$ besteht aus $b$ Schriftzeichen mit jeweils einem Wert aus ${0, 1, 2, ..., b-1}$. Der Stellenwert des Vorgängers wird um Faktor $b$ erhöht.
#table(columns: (1fr,) * 5, align: center,
"...", ..range(4).rev().map(i => $b^#i$)
)
Der Zahlenwert an Stelle $i$ ist das Produkt Des Stellenwertes $b^i$ und des Ziffernwertes $a_i$. Der Zahlenwert einer Ziffernfolge $a_n...a_2a_1a_0$ ist die Summe
$
Z = sum_(i=0)^n a_i dot b^i
$
Es gibt für jede natürliche Zahl genau eine $b$-adische Darstellung. Beweis: @proof-positional-system
=== Algorithmus
Aus dem induktiven Beweis ergibt sich auch der Algorithmus zur Addition um 1 (bei diesem vereinfachten Algorithmus ist ein Integer Overflow möglich).
```py
def inc(x, n, b):
for i in range(n):
if x[i] + 1 == b:
x[i] = 0
elif x[i] + 1 < b:
x[i] += 1
break
```
Im Fall $b=2$ gilt für jedes bit $x+1=not x$. Die binäre Addition um 1 ist also noch einfacher:
```py
def inc_bin(x, n):
for i in range(n):
x[i] = not x[i]
if x[i] == 1:
break
```
== MaxTeilSum
Gesucht ist die Teilfolge, welche aufsummiert maximal ist.
#include "mts.typ"
=== Naiver Algorithmus (MTS1)
Am einfachsten wäre es, alle Möglichkeiten durchzuprobieren und das größte Ergebnis zu nehmen. Die möglichen Teilfolgen haben für jeden Startwert von $0 <= i < n$ einen Endwert von $i <= j < n$. Sie können also mit zwei for-loops durchlaufen werden.
```python
for i in range(n):
for j in range(i, n):
# ...
```
Die Laufzeit für diesen Teil des Algorithmus ist $Theta(n^2)$.
$
sum_(i=0)^(n-1) sum_(j=i)^(n-1) 1
&= sum_(i=0)^(n-1) (n-1-i) \
&= n^2 - n - sum_(i=0)^(n-1) i
#h(4pt) #text(fill: gray, font: "Noto Sans")[Gauß-Summe] \
&= n^2 - n - (n^2-n)/2 \
&= 1/2 dot (n^2-n) \
&= Theta(n^2)
#h(4pt) square.filled
$
Für jede Teilfolge muss nur noch die Summe berechnet werden, sodass man die maximale Summe auswählen kann.
```python
sum(array[i:j])
```
Die Laufzeit für die Berechnung der Summe ist $Theta(n)$, weil eine Operation für jedes Element in `array[i:j]` ausgeführt wird, und dieses Array eine Länge von $Theta(n)$ hat.
$
S^"AC"_"array" (n) &= sum_(i=1)^n (1/2)^i \
&= n/2 = Theta(n)
$
Die Laufzeit für den naiven Algorithmus ist damit $Theta(n^2 dot n) = Theta(n^3)$.
// Volle Laufzeitberechnung
// $
// sum_(i=0)^(n-1) sum_(j=i)^(n-1) sum_(k=i)^j 1
// &= sum_(i=1)^n sum_(j=i)^n sum_(k=i)^j 1 \
// &= sum_(i=1)^n sum_(j=i)^n j - i \
// &= sum_(i=1)^n sum_(j=0)^(n-i) j \
// &= sum_(i=1)^n sum_(j=0)^(i) j \
// &= sum_(i=1)^n (i^2+i)/2 \
// &= 1/2 (sum_(i=1)^n i + sum_(i=1)^n i^2) \
// &= 1/2 ((n(n+1))/2 + (n(n+1)(2n+1))/6) \
// &= Theta(n^3)
// $
=== Quadratischer Algorithmus (MTS2)
Dadurch, dass bereits in der inneren Schleife alle Elemente von $i$ nach $j$ angeschaut werden, ist eine nochmalige Iteration zur Summierung redundant.
```python
for i in range(n):
sum = 0
for j in range(i, n):
sum += array[j]
```
Damit wurde die Laufzeit auf $Theta(n^2)$ reduziert.
=== Algorithmus von Kadane (MTS3)
Der Algorithmus von Kadane läuft eine Liste von links nach rechts durch, und hat deshalb eine lineare Laufzeit.
#include "mts3.typ"
Für jedes Element $x$ wird `aktSum` berechnet (erste Spalte). Das ist die maximale Teilsumme, welche an dieser Stelle endet. Beweis: @proof-kadane
```python
aktSum = max(x, aktSum + x)
```
Die maximale Teilsumme ist das Maximum aller dieser Teilsummen.
=== Divide and Conquer (MTS4)
Dieser rekursive Algorithmus teilt die Eingabe in jedem Schritt durch die Hälfte. Für jeden Knoten im Rekursionsbaum wird die maximale Teilsumme, welche durch die Mitte geht, berechnet (farbig hinterlegt).
#include "mts4.typ"
Das Ergebnis muss eine dieser Teilsummen sein, weil es entweder in der linken oder der rechten Hälfte liegt, oder durch die Mitte geht.
```python
def mts4(nums):
if nums.len() == 1:
return nums.first()
return max(
mts4(left_half),
mts4(right_half),
center_mts(nums)
)
```
Die Maximale Teilsumme, welche jeweils durch die Mitte eines Segments geht, wird durch eine Iteration nach links und nach rechts berechnet.
```python
s = 0
m = -math.inf
for x in left.rev(): # same for right
s += x
m = max(m, s)
```
== Türme von Hanoi
#import "hanoi.typ": hanoi
Es gibt drei Stäbe und $n$ Scheiben mit unterschiedlichen Durchmessern. Zu Beginn sind alle Scheiben auf dem linken Stab. Ziel ist es, den gesamten Stapel Scheibenweise auf den rechten Stab zu verlegen. In jedem Schritt muss jede Scheibe auf einer größeren liegen. @bib-hanoi-reducible
#align(center,
box(width: 50%, {
hanoi(
a: (
..range(1, 6).map(i => (
size: i,
fill: rgb(0, 0, 0, 25%)
))
),
c: (
..range(1, 6).map(i => (size: i)),
),
arrow: ("A", "C")
)
})
)
Die Hanoi-Funktion liefert die notwendigen Schritte, um $n$ Scheiben von `src` auf `dst` zu verlegen.
```python
hanoi(n, src, dst): ((from, to), ...)
```
Bei $n=1$ muss die Scheibe lediglich auf den Zielstab gelegt werden.
#align(center,
box(width: 50%)[
#hanoi(
a: ((size: 1, fill: rgb(0, 0, 0, 25%)),),
c: ((size: 1),),
arrow: ("A", "C")
)
#set align(start)
```python
push(src, dst)
```
]
)
Bei allen anderen $n$ gibt es drei Schritte:
#grid(
columns: 3,
column-gutter: 8pt,
row-gutter: 8pt,
align: center,
hanoi(
a: (
(size: 1, fill: rgb(0, 0, 0, 25%)),
(size: 2, fill: rgb(0, 0, 0, 25%)),
(size: 3)
),
b: range(1, 3).map(i => (size: i)),
arrow: ("A", "B")
),
hanoi(
a: ((size: 3, fill: rgb(0, 0, 0, 25%)),),
b: range(1, 3).map(i => (size: i)),
c: ((size: 3),),
arrow: ("A", "C")
),
hanoi(
b: range(1, 3).map(i => (size: i, fill: rgb(0, 0, 0, 25%))),
c: range(1, 4).map(i => (size: i)),
arrow: ("B", "C")
),
[(1)], [(2)], [(3)],
)
1. Verlege Scheiben $(1, 2, ..., n-1)$ von `src` auf `other`.
```python
hanoi(n-1, src, other)
```
2. Verlege Scheibe $n$ von `src` auf `dst`.
```python
push(src, dst)
```
3. Verlege Scheiben $(1, 2, ..., n-1)$ von `other` auf `dst`.
```python
hanoi(n-1, other, dst)
```
== Rod Cutting Problem
Ziel ist es, einen Stab der Länge $n$ in kleineren Stücken zu verkaufen, um den maximalen Gewinn zu erzielen, wobei jedem Schnittstück ein Preis zugeordnet ist @bib-rodcutting.
#include "rod_cutting.typ"
=== Naiver Algorithmus
Man könnte alle möglichen Kombinationen durchprobieren und das Maximum nehmen. Es gibt $n-1$ Stellen, an denen der Stab geschnitten werden darf. Deshalb gibt es $2^(n-1)$ Möglichkeiten, den Stab zu zerstückeln.
$
T(n) = Theta(2^n)
$
Tatsächlich gibt es weniger Kombinationen, weil dieser Ansatz die Reihenfolge der Stücke berücksichtigt. Um die genaue Anzahl zu berechnen, müssten wir die Partitionsfunktion anwenden @bib-partition-function. |
|
https://github.com/ice1000/website | https://raw.githubusercontent.com/ice1000/website/main/lnl-modal/report.typ | typst | #import "tizart.typ": *
#import "prooftree.typ": prooftree, axiom, rule
#show: thmrules.with(qed-symbol: $square$)
#import "/book.typ": book-page
#show: book-page.with(
title: "Linear/Non-Linear Contextual Modal Logic",
show-title: true,
authors: ((
name: "<NAME>",
email: "<EMAIL>"
), (
name: "<NAME>",
email: "<EMAIL>"
))
)
#set heading(numbering: "1.")
#show math.equation: it => {
show sym.arrow.t: math.class.with("unary")
show sym.arrow.b: math.class.with("unary")
it
}
// Good box
#let gbox(content) = box(stroke: black, inset: 5pt, baseline: 4pt, content)
This document is the miniproject project for the course
Substructural Logics (15-836, #link("https://www.cs.cmu.edu/~fp/courses/15836-f23")).
/* = Project description
This section is adapted from the miniproject description from the course
Substructural Logics (15-836, #link("https://www.cs.cmu.edu/~fp/courses/15836-f23")).
Originally, contextual modal type theory @08nanevski_contextual_modal_type_theory was developed for two main
purposes: support metaprogramming with open code, and capture the concept of metavariable
type-theoretically. It generalized the constructor $bold("quote") M : □A$ ($M$ is a closed term of type $A$)
from modal logic to $bold("box") (Γ. M)$ ($M$ may only depend on the variables in context $Γ$).
Actually, we have already been using metavariables without internalizing them into the type
system because all top level definitions, written as $p (x : A) (y_1 : A_1) ... (y_n : A_n) = P (x, y_1, ..., y_n)$
essentially give $p$ a contextual type $[y_1 : A_1, ..., y_n : A_n](x : A)$. That is, in #smallcaps("MPass") and #smallcaps("Sax"), process variables are metavariables.
1. First, in a mixed linear/nonlinear logic: What is the right decomposition of $[∆]A$ (which
requires a generalization of $↓$ or $↑$ or both)?
2. Prove admissibility of cut and identity in the sequent calculus formulation of contextual
mixed linear/nonlinear logic.
3. Give an operational interpretation, either under a message passing or a shared memory
interpretation.
4. Further questions to investigate:
• Can we generalize the contextual linear/nonlinear logic to a full adjoint logic?
• What additional computational or logical phenomena can be modeled by contextualizing adjoint logic (if any)?
*/
= Introduction
In logic, we consider hypothetical judgments $Γ ⊢ A$
and usually take them to mean "if every assumption in $Γ$ is true, then $A$ is true".
Nanevski et al.~@08nanevski_contextual_modal_type_theory introduced ICML,
Intuitionistic Contextual Modal Logic.
In ICML, $[Ψ]A$ is a proposition
standing for the hypothetical judgment $Ψ ⊢ A$.
So $[Ψ]A$ is true when
the truth of all assumptions in $Ψ$ implies truth of $A$.
In this way, ICML internalizes hypothetical truth in any context.
Nanevski and coauthors find $[Ψ]$ to be a modal operator validating S4 axioms.
Unfortunately, ICML is a structural logic.
In a different development,
Girard introduced linear logic @87girard_linear_logic
in which weakening and contraction are not available.
This enables tracking the exact multiset of assumptions (resources)
required to prove a statement (make a construction).
Linear logic is more general than structural logic:
<NAME> Lafont @87girard_linear_logic_lazy_computation
showed that intuitionistic structural logic (IL)
can be soundly embedded into intuitionistic linear logic (ILL)
by means of an 'of course' operator $!$
that does admit weakeaning and contraction:
$ #prooftree(
axiom($!Delta tack.r A$),
rule($!Delta tack.r !A$, label: $!R$)
) #h(3em) #prooftree(
axiom($Delta,A tack.r C$),
rule($Delta, !A tack.r C$, label: $!L$)
) $
$ #prooftree(
axiom($Delta tack.r C$),
rule($Delta, !A tack.r C$, label: $sans("Wk")$)
) #h(3em) #prooftree(
axiom($Delta,!A,!A tack.r C$),
rule($Delta, !A tack.r C$, label: $sans("Ctr")$)
) $
In fact, 'of course' also satisfies the axioms of an S4 modality.
Andreoli @92andreoli_logic_programming_focusing_proofs_linear_logic
gave a _dyadic_ presentation of ILL,
meaning that the basic hypothetical judgment
assumes two contexts.
It is written (in our presentation) $Γ;Δ ⊢ A$
and read as
"if the structural assumptions in $Γ$ are valid, and the linear assumptions in $Δ$ are true, then the linear succedent $A$ is true".
In this presentation,
'of course' can be seen to internalize hypothetical truth
with no linear assumptions
(a construction that requires no resources):
$ #prooftree(
axiom($Γ; dot ⊢ A$),
rule($Γ; dot ⊢ !A$, label: $!R$)
) $
This brings forward the connection of ILL to ICML:
we conjecture that $!A ≡ [·]A$ should make sense somehow.
The 'of course' point of view treats ILL as prior,
and IL as something that embeds into it.
Benton @94benton_mixed_linear_non_linear_logic_proofs_terms_models
proposed an alternative perspective:
IL and ILL can be put on equal footing
in a combined system of linear/non-linear logic (LNL)
that includes two layers of propositions --
the structural ones and the linear ones --
that interact by means of up- and down-shift modalities $↑ ↓$.
In LNL, $!A eq.def #h(.3em) ↓↑ A$.
In this project we investigate how to combine these developments
by first making ICML linear
and then splitting the modality $[Ψ]$ into a contextual upshift $↑Ψ]$,
and a standard downshift $↓$ in the style of LNL.
We conjecture that $[Ψ]A ≡ #h(.3em) ↓↑Ψ] A$,
similarly to $!A ≡ [dot]A ≡ #h(.3em) ↓↑dot] A$.
The choice to generalize only the upshift, and not the downshift,
is motivated by the observation
that this seems to suffice to internalize hypothetical judgments
with respect to the _linear_ context.
However, other phenomena may not be captured.
We consider possible extensions in #ref(<further>).
= Development of the logical calculus
Nanevski and coauthors presented ICML as a system of natural deduction,
and an equivalent sequent calculus.
They provided an operational interpretation
for the former in the form of a type theory.
We present only a sequent calculus,
which will later be operationalized.
== The right left rule for $↑$
#let ctx = $sans("ctx")$
We start from Benton's LNL, presented as in lecture 10.
We have two basic judgments $Γ_S ⊢ A_S$
and $Γ_S; Δ_L ⊢ A_L$.
The shift rules are as follows:
#figure(
grid(
columns: (1fr, 1fr),
[
$ #prooftree(
axiom($Γ_S;dot ⊢ A_L$),
rule($Γ_S ⊢ ↑ A_L$, label: $↑ R$)
) $
$ #prooftree(
axiom($Γ_S ⊢ A_S$),
rule($Γ_S;dot ⊢ ↓ A_S$, label: $↓ R$)
) $
],
[
$ #prooftree(
axiom($Γ_S, ↑ A_L;Δ_L,A_L ⊢ C_L$),
rule($Γ_S, ↑ A_L;Δ_L ⊢ C_L$, label: $↑ L$)
) $
$ #prooftree(
axiom($Γ_S, A_S;Δ_L ⊢ C_L$),
rule($Γ_S;Δ_L, ↓ A_S ⊢ C_L$, label: $↓ L$)
) $
]
),
caption: [Shift rules]
)
As mentioned earlier, we do not generalize the downshift.
So nothing will change in the downshift rules apart
from the intended interpretation of the symbols.
The remaining task is to generalize the upshift.
The right rule says that to prove $↑ A$,
it suffices to prove $A_L$ in an empty linear context.
It is clear how to make the linear context arbitrary:
$ #prooftree(
axiom($Γ_S; Ψ_L ⊢ A_L$),
rule($Γ_S ⊢ ↑ Ψ_L ] A_L$, label: $↑ R$)
) $
The left rule is not so easy:
at least syntactically,
there doesn't seem to be an empty context anywhere
that we could generalize.
One way of proceeding is to think of the rule $↑ L$
as a sort of cut:
we have the structural assumption $↑ A_L$
which means that we are assuming
that $A_L$ is provable from no linear assumptions.
Now the context $Δ_L$ is the same as $Δ_L,dot$,
and the rule $↑ L$ is cutting in $A_L$ for $dot$.
One possible generalization would consequently be
to cut in $A_L$ for some context $Ψ_L$:
$ #prooftree(
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ_L,A_L ⊢ C_L$),
rule($Γ_S, ↑ Ψ_L ]A_L; Δ_L,Ψ_L ⊢ C_L$, label: $↑ L?$)
) $
Unfortunately this does not admit cut elimination,
for essentially the same reason that
$ #prooftree(
axiom($Δ,B ⊢ C$),
rule($Δ,A,A⊸B ⊢ C$)
) $
does not admit cut elimination in ILL.
In ILL with the above as the left rule for $⊸$,
#gbox($1⊸1 ⊢ 1$) has no cut-free proof because no rule applies.
This sequent is, however, provable with cut.
The reason is that the input to $⊸$
may not be directly available as an assumption
but rather only be provable
from a subcontext of $Δ$.
To remedy this, in ILL we must use
$ #prooftree(
axiom($Δ' ⊢ A$),
axiom($Δ,B ⊢ C$),
rule($Δ,Δ',A⊸B ⊢ C$, n: 2)
) $
Similarly in our system with $↑ L?$,
#gbox($↑ 1 ]P;dot ⊢ P$) where $P$ is a propositional atom
has no cut-free proof, but is provable with cut.
To make the ILL remedy work,
we must express somehow
that _all_ propositions in the context $Ψ_L$ are provable.
We take a page from Nanevski and coauthors
and add a judgment $Γ_S; Δ_L ⊢ Ψ_L$
where the succedent is a linear context
derivable by
$ #prooftree(
axiom($Γ_S;Δ_1 ⊢ A_1$),
axiom($dots.h$),
axiom($Γ_S;Δ_n ⊢ A_n$),
rule($Γ_S;Δ_1, dots.h, Δ_n ⊢ A_1, dots.h, A_n$, n: 3, label: ctx)
) $
This extra gadget allows us to express the correct left rule
$ #prooftree(
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ'_L ⊢ Ψ_L$),
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ_L,A_L ⊢ C_L$),
rule($Γ_S, ↑ Ψ_L ]A_L; Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑L$)
) $
== Rules
In summary, the rules of our system are those of LNL
extended by a concludes-context judgment $Gamma_S;Delta_L tack.r Psi_L$
derivable by
$ #prooftree(
axiom($Γ_S;Δ_1 ⊢ A_1$),
axiom($dots.h$),
axiom($Γ_S;Δ_n ⊢ A_n$),
rule($Γ_S;Δ_1, dots.h, Δ_n ⊢ A_1, dots.h, A_n$, n: 3, label: ctx)
) $
and with the upshift rules replaced by
$ #prooftree(
axiom($Γ_S; Ψ_L ⊢ A_L$),
rule($Γ_S ⊢ ↑ Ψ_L ] A_L$, label: $↑ R$)
)\ #prooftree(
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ'_L ⊢ Ψ_L$),
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ_L,A_L ⊢ C_L$),
rule($Γ_S, ↑ Ψ_L ]A_L; Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑L$)
) $
We also note some essential properties of $↑$ and $↓$:
- $↑$ is invertible on the right, hence negative.
- $↓$ is invertible on the left, hence positive.
= Identity and cut elimination
#let cutSS = $sans("cut"_"SS")$
#let cutSL = $sans("cut"_"SL")$
#let cutLL = $sans("cut"_"LL")$
#let cutmLL = $sans("cut"_(overline("L")"L"))$
#let cutLmL = $sans("cut"_("L"overline("L")))$
#let cutSmL = $sans("cut"_("S"overline("L")))$
#let idS = $sans("id"_"S")$
#let idL = $sans("id"_"L")$
#let idmL = $sans("id"_overline("L"))$
We will show that the following rules of identity and cut
are admissible in a version of our system without cut,
and with identites restricted to atomic propositions.
We will rely on the fact that the system we adapted, LNL,
has these properties.
#figure(
$ #prooftree(
rule($Γ_S,A_S ⊢ A_S$, n: 0, label: idS)
) #h(3em) #prooftree(
rule($Γ_S;A_L ⊢ A_L$, n: 0, label: idL)
) $,
caption: [Identity rules]
)
#figure(
[
$ #prooftree(
axiom($Γ_S ⊢ A_S$),
axiom($Γ_S,A_S ⊢ C_S$),
rule($Γ_S ⊢ C_S$, n: 2, label: cutSS)
) \
#prooftree(
axiom($Γ_S ⊢ A_S$),
axiom($Γ_S,A_S;Δ_L ⊢ C_L$),
rule($Γ_S;Δ_L ⊢ C_L$, n: 2, label: cutSL)
) \
#prooftree(
axiom($Γ_S;Δ'_L ⊢ A_L$),
axiom($Γ_S;Δ_L,A_L ⊢ C_L$),
rule($Γ_S;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: cutLL)
) $
],
caption: [Cut rules]
)
#lemma("Identity for contexts")[
If $Gamma_S;A_L ⊢ A_L$ is derivable for every $A_L in Psi_L$, then
$ #prooftree(
rule($Γ_S;Psi_L ⊢ Psi_L$, n: 0, label: idmL)
) $
is derivable.
]
#proof[
Let $Psi_L = A_1, dots.h, A_n$. Then
$ #prooftree(
axiom($Gamma_S;A_1 ⊢ A_1$),
axiom($dots.h$),
axiom($Gamma_S;A_n ⊢ A_n$),
rule($Gamma_S;A_1, dots.h, A_n ⊢ A_1, dots.h, A_n$, n: 3, label: ctx)
) $
]
#theorem("Admissibility of Identity")[
The rules of identity #idS and #idL are admissible
in the system where identities are restricted to atomic propositions.
]
#proof[
By simultaneous structural induction on $A_S$ and $A_L$.
The cases except for $↑$
are the same as in LNL,
so need not be re-checked.
The new case of #idS follows by #idmL since all propositions in $Psi_L$
are subformulas of $↑Psi_L]A_L$.
$ #prooftree(
rule($Γ_S,↑Psi_L]A_L;Psi_L ⊢ Psi_L$, n: 0, label: idmL),
rule($Γ_S,↑Psi_L]A_L;A_L ⊢ A_L$, n: 0, label: idL),
rule($Γ_S,↑Psi_L]A_L;Psi_L ⊢ A_L$, n: 2, label: $↑ L$),
rule($Γ_S,↑Psi_L]A_L ⊢ ↑ Psi_L]A_L$, label: $↑ R$)
) $
]
#lemma("Cut for contexts")[
If #cutSL with $cal(D)$ and any subderivation of $cal(E)$
as premises is admissible,
then
$ #prooftree(
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S,A_S;Delta_L ⊢ Psi_L$, label: $cal(E)$),
rule($Γ_S;Δ_L ⊢ Psi_L$, n: 2, label: cutSmL)
) $
is derivable.
Similarly if #cutLL with $cal(D)$ and any subderivation of $cal(E)$
as premises is admissible,
then
$ #prooftree(
axiom($Γ_S;Delta'_L ⊢ A_L$, label: $cal(D)$),
axiom($Γ_S;Delta_L, A_L ⊢ Psi_L$, label: $cal(E)$),
rule($Γ_S;Δ_L, Delta'_L ⊢ Psi_L$, n: 2, label: cutLmL)
) $
is derivable.
Furthermore if #cutLL with any subderivation of $cal(D)$
as the left permise is admissible,
then for all $cal(E)$
$ #prooftree(
axiom($Γ_S;Delta'_L ⊢ Psi_L$, label: $cal(D)$),
axiom($Γ_S;Delta_L, Psi_L ⊢ C_L$, label: $cal(E)$),
rule($Γ_S;Δ_L, Delta'_L ⊢ C_L$, n: 2, label: cutmLL)
) $
is derivable.
]
#proof[
(#cutSmL). Let $Psi_L = B_1, dots.h, B_n$.
By inversion on $cal(E)$ (which was derived by #ctx),
there are contexts ${Delta_i}$ such that $Delta_L = Delta_1, dots.h, Delta_n$,
and $Gamma_S,A_S;Delta_i ⊢ B_i$ are all derivable.
Thus
$ #prooftree(
axiom($Γ_S ⊢ A_S$),
axiom($Γ_S,A_S;Delta_1 ⊢ B_1$),
rule($Γ_S;Δ_1 ⊢ B_1$, n: 2, label: cutSL),
axiom($dots.h$),
axiom($Γ_S ⊢ A_S$),
axiom($Γ_S,A_S;Delta_n ⊢ B_n$),
rule($Γ_S;Δ_n ⊢ B_n$, n: 2, label: cutSL),
rule($Γ_S;Δ_L ⊢ B_1, dots.h, B_n$, n: 3, label: ctx)
) $
(#cutLmL).
Let $Psi_L = B_1, dots.h, B_n$.
By inversion on $cal(E)$,
there are contexts ${Delta_i}$ such that $Delta_L,A_L = Delta_1, dots.h, Delta_n$,
and $Gamma_S;Delta_i ⊢ B_i$ are all derivable.
Let $Delta_(i_0)$ be the context that contains $A_L$.
We now have
$ #prooftree(
axiom($Γ_S;Δ_1 ⊢ B_1$),
axiom($dots.h$),
axiom($Γ_S;Delta'_L ⊢ A_L$, label: $cal(D)$),
axiom($Γ_S;Delta_(i_0) ⊢ B_(i_0)$),
rule($Γ_S;Δ_(i_0) - {A_L}, Δ'_L ⊢ B_(i_0)$, n: 2, label: cutLL),
axiom($dots.h$),
axiom($Γ_S;Δ_n ⊢ B_n$),
rule($Γ_S;Δ_L, Δ'_L ⊢ Psi_L$, n: 5, label: ctx)
) $
(#cutmLL). Let $Psi_L = A_1, dots.h, A_n$.
By inversion on $cal(D)$,
there are contexts ${Delta'_i}$ such that $Delta'_L = Delta'_1, dots.h, Delta'_n$
and $Gamma_S;Delta'_i ⊢ A_i$ are all derivable.
We now have
$ #prooftree(
axiom($Γ_S;Delta'_1 ⊢ A_1$),
axiom($Γ_S;Delta'_2 ⊢ A_2$),
axiom($Gamma_S;Delta_L,Psi_L tack.r C_L$, label: $cal(E)$),
rule($dots.v$),
rule($Γ_S;Delta_L,A_1,Delta'_2,dots.h,Delta'_n ⊢ C_L$, n: 2, label: cutLL),
rule($Γ_S;Δ_L, Delta'_1, dots.h, Delta'_n ⊢ C_L$, n: 2, label: cutLL)
) $
]
#theorem("Admissibility of Cut")[
The three rules of cut are admissible in the system without cut.
]
#proof[
By simultaneous nested induction on all three forms of cut,
first on the cut proposition $A_L$ or $A_S$,
and second on the first and second given derivation.
Both LNL without cut and our system without cut
have the subformula property.
Thus, cut-free proofs of connectives other than $↑$
cannot refer to $↑$.
Consequently the cases of cut elimination for these connectives
are the same as in the proof for LNL
and need not be re-checked.
We only need to check cases with the modified $↑$ connective.
We only consider principal and commuting cases.
The *principal case* of #cutSL $↑R slash ↑L$ is
$ #prooftree(
axiom($Γ_S;Psi_L ⊢ A_L$, label: $cal(D)$),
rule($Γ_S ⊢ ↑ Psi_L]A_L$, label: $↑ R$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ'_L ⊢ Psi_L$, label: $cal(E_1)$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ_L,A_L ⊢ C_L$, label: $cal(E_2)$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑L$),
rule($Γ_S;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: cutSL)
) $
and eliminates to
$ #prooftree(
axiom($cal(A)$),
axiom($Γ_S;Psi_L ⊢ A_L$, label: $cal(D)$),
axiom($Γ_S ⊢ ↑ Psi_L]A_L$, label: $cal(D')$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ_L,A_L ⊢ C_L$, label: $cal(E_2)$),
rule($Γ_S;Δ_L,A_L ⊢ C_L$, n: 2, label: cutSL),
rule($Γ_S;Δ_L,Psi_L ⊢ C_L$, n: 2, label: cutLL),
rule($Γ_S;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: cutmLL)
) $
// TODO: draw a brace around $cal(D')$ in the unreduced proof?
where $cal(D') = cal(D)+↑ R$, and $cal(A)$ is
$ #prooftree(
axiom($Γ_S ⊢ ↑Psi_L]A_L$, label: $cal(D')$),
axiom($Γ_S, ↑Psi_L]A_L;Δ'_L ⊢ Psi_L$, label: $cal(E_1)$),
rule($Γ_S;Δ'_L ⊢ Psi_L$, n: 2, label: cutSmL)
) $
Note that the use of #cutmLL on $Psi_L$ is justified
because all formulas in $Psi_L$ are subformulas of $arrow.t Psi_L]A_L$,
and the use of #cutSmL is justified
because $cal(E)_1$ is a smaller derivation.
The *commuting case* of #cutLL with $↑L slash ?$ is
$ #prooftree(
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ'_L ⊢ Ψ_L$, label: $cal(D)_1$),
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ_L,A_L ⊢ C_L$, label: $cal(D)_2$),
rule($Γ_S, ↑ Ψ_L ]A_L; Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑L$),
axiom($Γ_S, ↑ Ψ_L ]A_L;Δ''_L,C_L ⊢ D_L$, label: $cal(E)$),
rule($Γ_S, ↑ Ψ_L ]A_L;Δ_L,Δ'_L,Δ''_L ⊢ D_L$, n: 2, label: cutLL)
) $
This eliminates to
$ #prooftree(
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ'_L ⊢ Ψ_L$, label: $cal(D)_1$),
axiom($Γ_S, ↑ Ψ_L ]A_L; Δ_L,A_L ⊢ C_L$, label: $cal(D)_2$),
axiom($Γ_S, ↑ Ψ_L ]A_L;Δ''_L,C_L ⊢ D_L$, label: $cal(E)$),
rule($Γ_S, ↑ Ψ_L ]A_L;Δ_L,A_L,Δ''_L ⊢ D_L$, n: 2, label: cutLL),
rule($Γ_S, ↑ Ψ_L ]A_L;Δ_L,Δ'_L,Δ''_L ⊢ D_L$, n: 2, label: $↑ L$)
) $
The *commuting case* of #cutSS with $? slash ↑R$ is
$ #prooftree(
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S,A_S;Psi_L ⊢ B_L$, label: $cal(E)$),
rule($Γ_S,A_S ⊢ ↑ Psi_L]B_L$, label: $↑ R$),
rule($Γ_S ⊢ ↑ Psi_L]B_L$, n: 2, label: cutSS)
) $
This eliminates to
$ #prooftree(
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S,A_S;Psi_L ⊢ B_L$, label: $cal(E)$),
rule($Γ_S; Psi_L ⊢ B_L$, n: 2, label: cutSS),
rule($Γ_S ⊢ ↑ Psi_L]B_L$, label: $↑ R$)
) $
The *commuting case* of #cutSL with $? slash ↑ L$ is
$ #prooftree(
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S, A_S, ↑ Psi_L]A_L; Δ_L ⊢ Psi_L$, label: $cal(E)_1$),
axiom($Γ_S, A_S, ↑ Psi_L]A_L; Δ'_L, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, A_S, ↑ Psi_L]A_L;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑ L$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: cutSL)
) $
and eliminates to
$ #prooftree(
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S, A_S, ↑ Psi_L]A_L; Δ_L ⊢ Psi_L$, label: $cal(E)_1$),
rule($Γ_S, ↑ Psi_L]A_L; Δ_L ⊢ Psi_L$, n: 2, label: cutSmL),
axiom($Γ_S ⊢ A_S$, label: $cal(D)$),
axiom($Γ_S, A_S, ↑ Psi_L]A_L; Δ'_L, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, ↑ Psi_L]A_L; Δ'_L, A_L ⊢ C_L$, n: 2, label: cutSL),
rule($Γ_S, ↑ Psi_L]A_L;Δ_L,Δ'_L ⊢ C_L$, n: 2, label: $↑L$)
) $
Finally, #cutLL with $? slash ↑ L$ has two *commuting cases*
depending on which branch uses $B_L$.
The first is
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L; Δ'_L ⊢ B_L$, label: $cal(D)$),
axiom($Γ_S, ↑ Psi_L]A_L; Δ_1, B_L ⊢ Psi_L$, label: $cal(E)_1$),
axiom($Γ_S, ↑ Psi_L]A_L; Δ_2, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,B_L ⊢ C_L$, n: 2, label: $↑ L$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,Δ'_L ⊢ C_L$, n: 2, label: cutLL)
) $
We first do a sub-cut to obtain derivation $cal(A)$:
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L;Δ'_L ⊢ B_L$, label: $cal(D)$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ_1, B_L ⊢ Psi_L$, label: $cal(E)_1$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1, Δ'_L ⊢ Psi_L$, n: 2, label: cutLmL)
) $
The use of #cutLmL is justified here because $cal(E)_1$
is a smaller derivation. Then we can eliminate to
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L;Δ_1, Δ'_L ⊢ Psi_L$, label: $cal(A)$),
axiom($Γ_S, ↑ Psi_L]A_L; Δ_2, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,Δ'_L ⊢ C_L$, n: 2, label: $↑ L$)
) $
The *second* is
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L; Δ'_L ⊢ B_L$, label: $cal(D)$),
axiom($Γ_S, ↑ Psi_L]A_L; Δ_1, ⊢ Psi_L$, label: $cal(E)_1$),
axiom($Γ_S, ↑ Psi_L]A_L; Δ_2, B_L, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,B_L ⊢ C_L$, n: 2, label: $↑ L$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,Δ'_L ⊢ C_L$, n: 2, label: cutLL)
) $
We first obtain $cal(A)$:
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L;Δ'_L ⊢ B_L$, label: $cal(D)$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ_2, B_L, A_L ⊢ C_L$, label: $cal(E)_2$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_2, Δ'_L, A_L ⊢ C_L$, n: 2, label: cutLL)
) $
And then produce the new proof:
$ #prooftree(
axiom($Γ_S, ↑ Psi_L]A_L; Δ_1 ⊢ Psi_L$, label: $cal(E)_1$),
axiom($Γ_S, ↑ Psi_L]A_L;Δ_2, Δ'_L, A_L ⊢ C_L$, label: $cal(A)$),
rule($Γ_S, ↑ Psi_L]A_L;Δ_1,Δ_2,Δ'_L ⊢ C_L$, n: 2, label: $↑L$)
) $
]
= Operational interpretation
#let recv = $sans("recv")$
#let send = $sans("send")$
#let proc = $sans("proc")$
#let call = $sans("call")$
We extend the operational interpretation
of LNL proofs as message passing programs
to our system.
The program terms for LNL rules are as before.
A provider of generalized upshift type $↑Psi_L]A_L$
provides a structural channel
that expects to receive the resources $Psi_L$
and continues by providing a channel of type $A_L$.
In essence, it is like a global #smallcaps("MPass") function $times.circle.big_i Psi_i multimap A_L$
(registered with `proc`)
that can be called arbitrarily many times,
but now existing dynamically as a channel.
Writing $overline(t_i)$ for an arbitrary list of terms $t_1,dots.h,t_n$,
our program terms written in send-receive style are:
#figure(
[
$ #prooftree(
axiom($Γ_S;overline(x_i):Psi_L ⊢ P(overline(x_i),y_L) :: (y_L:A_L)$),
rule($Γ_S ⊢ recv f_S space (⟨y_L⟩, overline(⟨x_i⟩) => P) :: (f_S:↑ Psi_L]A_L)$, label: $↑ R$)
) $
$ #prooftree(
axiom($Γ_S,f_S:↑ Psi_L]A_L;Δ_L ⊢ overline(P_i (x_i)) :: (overline(x_i):Psi_L)$),
axiom($Γ_S,f_S:↑ Psi_L]A_L;Δ'_L,y_L:A_L ⊢ Q(y_L) :: (z_L:C_L)$),
rule($Γ_S,f_S:↑ Psi_L]A_L;Δ_L,Δ'_L ⊢ send f_S space overline((⟨x_i⟩ => P_i)) space (⟨y_L⟩ => Q) :: (z_L:C_L)$, n: 2, label: $↑ L$)
) $
],
caption: [Upshift program terms]
)
We could alternatively use a syntax closer to the one in #smallcaps("MPass") by writing:
- $proc f_S space (y_L:A_L) space overline((x_i:A_i)) = P$ for $recv f_S space (⟨y_L⟩, overline(⟨x_i⟩) => P)$
- $call f_S space overline((x_i => P_i)) space (⟨y_L⟩ => Q)$ for $send f_S space overline((x_i => P_i)) space (⟨y_L⟩ => Q)$
although the analogy is not exact:
e.g. the argument $P_i$ to $call$
is a program term that writes into a freshly bound channel
rather than necessarily being a variable
as in the original $call$ syntax.
The dynamic behaviour inspired by the principal case of cut elimination for $arrow.t$ is:
$ & underline(proc) (recv a_S space (⟨y_L⟩, overline(⟨x_i⟩) => P)), proc (send a_S space overline((⟨x_i⟩ => Q_i)) space (⟨y_L⟩ => R)) --> \
& underline(proc) (dots.h), overline(proc(Q_i (b_i))), proc(P(overline(b_i),c_L)), proc (R(c_L)) $
Insofar as the operation consists of the persistent provider
receiving several channels at once,
we may need to adjust the message grammar to $M ::= dots.h | ⟨overline(a_i)⟩$.
= Further questions <further>
- We chose to generalize $arrow.t$ to $↑ Psi_L]A_L$.
Alternatively, we could also capture the structural context
as in $↑Γ_S;Psi_L]A_L$
with the right rule
$ #prooftree(
axiom($Gamma_S;Psi_L tack.r A_L$),
rule($Theta_S tack.r ↑Γ_S;Psi_L]A_L$)
) $
This formulation would more clearly include the structural ICML
in its structural fragment; our current version seems to include
something like a linear version of ICML in its linear fragment instead.
- Can $arrow.b$ be contextified, too, and how?
Does it have anything to do with existential quantification or parametric abstraction?
- How does any of this generalize to a full adjoint logic?
- Can our additions be reflected in the categorical semantics of LNL
@94benton_mixed_linear_non_linear_logic_proofs_terms_models
without modifying the notion of model?
In other words, is the extension conservative?
/* WARNING: speculation, might be wrong
== Categorical semantics
Benton @94benton_mixed_linear_non_linear_logic_proofs_terms_models
showed that a categorical model
of the multiplicative ($times.circle, multimap, 1$) fragment of LNL can be built out of the data of
- a cartesian closed category $(cal(C), 1, times, arrow)$; and
- a symmetric monoidal closed category $(cal(L), bold(I), times.circle, multimap)$; and
- a pair of symmetric monoidal functors $(arrow.t, n) : cal(L) arrow cal(C)$,
$(arrow.b, m) : cal(C) arrow cal(L)$
that form a symmetric monoidal adjunction $arrow.b tack.l arrow.t$.
As one consequence of this definition,
there is a natural isomorphism
$m_(A,B) : arrow.b A times.circle arrow.b B tilde.equiv arrow.b (A times B)$
and an isomorphism $m_I : bold(I) tilde.equiv arrow.b 1$.
Given this data,
we interpret linear types as objects in $cal(L)$,
and structural types as objects in $cal(C)$.
This lifts to linear and structural contexts
using the monoidal and cartesian product operations,
respectively.
A proof of
$ Gamma_1, dots.h, Gamma_n;Delta_1, dots.h, Delta_m tack.r A_L $
becomes a morphism
$ times.circle.big_(1<=i<=n) arrow.b Gamma_i times.circle times.circle.big_(1<=j<=m) Delta_j arrow A in cal(L) $
whereas a proof of
$ Gamma_1, dots.h, Gamma_n tack.r A_S $
becomes a morphism
$ product_(1<=i<=n) Gamma_i arrow A in cal(C) $
where we punned types and their interpretations.
We conjecture that a possible interpretation of $arrow.t Psi_1, dots.h, Psi_n]A_L$
comes from the exponential object via $arrow.t (times.circle.big_(1<=i<=n)Psi_i multimap A)$.
Below we check that this makes the two rules for $arrow.t$ interpretable.
However, we do not check that our cut elimination procedure is sound
with respect to this interpretation.
... */
#bibliography("papers.bib", style: "association-for-computing-machinery")
|
|
https://github.com/moamenhredeen/cv | https://raw.githubusercontent.com/moamenhredeen/cv/main/cv.typ | typst |
#show heading: set text(font: "Linux Biolinum")
#show link: underline
#set text( size: 10pt, font: "New Computer Modern")
#set page(
paper: "a4",
margin: (
top: 10mm,
bottom: 15mm,
left: 15mm,
right: 15mm,
),
)
#set par(justify: true)
#let skill(percentage) = {
rect(
inset: 0pt,
width: 100%,
rect(
width: percentage,
height: 5pt,
fill: black
)
)
}
#let todo(body) = {
grid(
columns: (auto, 1fr),
inset: 4pt,
grid.cell(
fill: rgb(250, 140, 100, 150),
align: (center + horizon),
[*TODO*],
),
grid.cell(
fill: rgb(250, 120, 100, 50),
[#body],
)
)
}
// -------------------------------- content --------------------------------
#align(left)[
= <NAME>
Europastraße 20/1, 72510 Stetten am kalten Markt\
<EMAIL> |
moamenhredeen.me/portfolio |
github.com/moamenhredeen
#v(-6pt)
#line(length: 100%, stroke: .5pt)
]
== Biography
#line()
I am a passionate software developer who thrives on tackling complex challenges and continuously learning new concepts.
For me, software development isn't just a job—it's what I love to do most.
I’m always eager to dive deep into the latest frameworks, understanding their internals, and pushing my skills to the next level.
Routine and repetitive work don’t excite me; I’m driven by tasks that force me to think critically and innovate.
I find joy in refactoring code and am almost religious about maintaining clean, readable, and efficient code. Whether it's mastering a new technology or optimizing a system, I'm always ready to take on the next challenge. From fullstack development to embedded systems and DevOps, my career has been defined by my desire to solve complex problems and continually improve my craft. I’m dedicated to creating software that is not only functional but also elegant and maintainable, and I’m always looking for opportunities that allow me to grow as a developer
== Experience
#line()
=== Java Developer | Primion Technology GmbH #h(1fr) Jan 2023 -- Present
After working on the PSIM platform, I transitioned to the hardware department at Primion to help develop our embedded software platform.
In this role, I contributed to building a YAWL-based workflow management system for our devices.
This shift allowed me to apply my software development skills to embedded systems, further broadening my expertise in integrating complex workflows into hardware solutions
*Earned skills*: Software Architecture, Java, Gradle, Distributed Systems, MQTT, Workflow Engines, Workflow Management Systems
=== Software Engineer | Primion Technology GmbH #h(1fr) Jan 2022 -- Jan 2023
After completing my thesis, I joined Primion full-time and worked on their PSIM (Physical Security Information Management) platform.
Initially, I focused on the mobile client, but soon transitioned to backend development, primarily using Spring.
Later, I contributed to integrating OPC UA into our PSIM platform, enhancing its capabilities.
Toward the end of my time there, I shifted into a DevOps role, where I modernized the build process for Java and .NET projects.
I wrote custom Maven plugins and MSBuild tasks to automate common tasks, streamlining our development workflow
*Earned skills*: Software Architecture, Java, Jakarta EE, Spring, Hibernate, (formally known as J2EE), JavaFX, .NET Core, Maven, MSBuild, DevOps, Apache Cordova
=== Thesis | Primion Technology GmbH #h(1fr) Apr 2021 -- Oct 2021
For my thesis at Primion, I focused on interprocess communication for a new software platform that would run on access controllers, which manage access points.
My research involved comparing different architectural patterns, including multi-threading, RPC, and MQTT, to identify the most suitable approach for the platform.
I also explored the benefits of using Docker for embedded software, with our system running on Yocto Linux.
This project deepened my understanding of system architecture and the unique challenges of developing software for embedded systems in access control environments.
*Supervisor*: Prof. Dr. <NAME>
*Earned skills*: Software Architecture, Distributed Systems, MQTT, Java, C++
=== Intern | Primion Technology GmbH #h(1fr) Nov 2020 - Apr 2021
During my Praxis semester, I interned as a Java Developer at Primion.
My main responsibility was migrating the company's in-house bug tracker to Jira Cloud.
To make this process efficient, I developed a Java tool that automatically transferred all our projects and users to Jira Cloud using their REST API.
This experience gave me hands-on knowledge of software migration and improved my skills in Java and working with APIs.
*Earned skills*: Java, REST APIs, Linux Containers (Docker)
=== Fullstack Web Developer | Vinnova #h(1fr) Jan 2024 - Jun 2024
While studying, I worked part-time as a Fullstack Web Developer at Vennova.
I helped build software that made tunnel inspections in Sweden more efficient by analyzing 3D models of tunnels to find cracks in the support structure.
I worked on both the frontend and backend, using React and Node.js to create a user-friendly interface and ensure smooth performance.
Although I didn’t work directly with the machine learning side of things, I collaborated with the team to make sure everything came together
*Earned skills*: NodeJs, Express.js, REST APIs, ReactJs
=== Tutor | Albstadt-Sigmaringen University #h(1fr) 10/2020 -- 01/2021
Supervision of the Practical Course on discrete time signals and systems
*Supervisor*: Prof. Dr. <NAME>
== Education
#line()
=== B.Eng. Computer Engineering | Albstadt-Sigmaringen University #h(1fr) Mar 2018 - Oct 2021
Key Areas of Study:
- System Design: Operating Systems, Software Engineering, Mobile Systems & Clouds, Distributed Systems, Graphical User Interface (GUI) Development, Secure Databases
- Web Development: Web Applications 1, Web Applications 2
- Machine Learning & AI: Applied Mathematics, Intelligent Systems
== Skills
#line()
- Software Architecture and System Design
- Full Stack Web Development
- SPA using ReactJs, Angular and Svelte/Sveltekit.
- Classic MVC using Asp.Net Core (Razor Pages) and HTMX
- Backend using Spring Framework, Asp.Net Core and NodeJs
- Systems Programming: Rust
- Desktop/Mobile Applications: Ionic, Flutter, Java FX, and AvaloniaUI
== Languages
#line()
- *Arabic*: Native speaker
- *German*: Fluent
- *English*: Fluent
|
|
https://github.com/EpicEricEE/typst-marge | https://raw.githubusercontent.com/EpicEricEE/typst-marge/main/README.md | markdown | MIT License | # marge
A package for easy-to-use but powerful and smart margin notes.
## Usage
The main function provided by this package is `sidenote`, which allows you to create margin notes. The function takes a single positional argument (the text of the note) and several optional keyword arguments for customization:
| Parameter | Description | Default |
| ----------- | --------------------------------------------------------------------- | --------------------- |
| `side` | The margin where the note should be placed. | `auto` |
| `dy` | The custom offset by which the note should be moved along the y-axis. | `0pt` |
| `padding` | The space between the note and the page or content border. | `2em` |
| `gap` | The minimum gap between this and neighboring notes. | `0.4em` |
| `numbering` | How the note should be numbered. | `none` |
| `counter` | The counter to use for numbering. | `counter("sidenote")` |
| `format` | The "show rule" for the note. | `it => it.default` |
The parameters allow maximum flexibility and often allow values of different types:
- The `side` parameter can be set to `auto`, `"inside"`, `"outside"` or any horizontal `alignment` value. If set to `auto`, the note is placed on the larger of the two margins. If they are equally large, it is placed on the `"outside"` margin.
- If the `dy` parameter has a relative part, it is resolved relative to the height of the note.
- The `padding` parameter can be set either to a single length value or a dictionary. If a dictionary is used, the keys can be any horizontal alignment value, as well as `inside` and `outside`.
- With the `counter` parameter, you can for example combine the numbering of footnotes and sidenotes.
An especially useful feature is the `format` parameter, as it emulates the behavior of a show rule via a function. That function is called with the context of the note and receives a dictionary with the following keys:
| Key | Description | Value or type |
| ----------- | -------------------------------------------------------- | ----------------------------|
| `side` | The side of the page the note is placed on. | `left` or `right` |
| `numbering` | The numbering of the note. | `str`, `function` or `none` |
| `counter` | The counter used for numbering the note. | `counter` |
| `padding` | The padding of the note, resolved to `left` and `right`. | `dictionary` |
| `margin` | The size of the margin, which the note is placed on. | `length` |
| `source` | The location in the document where the note is defined. | `location` |
| `body` | The content of the note. | `str` |
| `default` | The default look of the note. | `content` |
As the dictionary itself is not an element, you cannot directly use it within the `format` function as you would be able to in a normal show rule. To still be able to build upon the default look of the note without having to reconstruct it, the `default` key is provided.
Aside from the customizability, the package also provides automatic overlap and overflow protection. If a note would overlap with another note, it is moved further down the page, so that the `gap` parameters of both notes are respected. If a note would overflow the page, it is moved upwards, so that the bottom of the note is aligned with the bottom of the page content. Any previous notes, which would then overlap with the moved note, are also moved accordingly.
### Note about pages with automatic width
If a note is placed in the right margin of a page with width set to `auto`, additional configuration is necessary. As the final width of the page is not known when the note is placed, the note's position cannot be calculated. To place notes on the right margin of such pages, the package provides a `container`, which is supposed to be included in the page's `background` or `foreground`:
```typ
#import "@preview/marge:0.1.0": sidenote, container
#set page(width: auto, background: container)
...
```
The use of the `container` variable is detected automatically by the package, so that an error can be raised when it is required but not set.
### Note about layout convergence and performance
This package makes heavy use of states and contextual blocks, causing Typst to require multiple layout passes to fully resolve the final layout. Usually, the limit imposed by Typst is sufficient, but I cannot guarantee that this will remain true for large documents with a lot of notes. If you happen to run into this limit, you can try using the `container` variable as mentioned above, as it can reduce the number of layout passes required.
As each layout iteration adds to the total compile time, the use of the `container` can also be beneficial for performance reasons. Another performance tip is to keep the size of paragraphs containing margin notes small, as the line breaking algorithm cannot be memoized when the paragraph contains a note.
### Note about how lengths are resolved
When a length is given in a context-dependent way (i.e. in `em` units), it is resolved relative to the font size of the _content_, not the font size of the note (which is smaller by default). This has the unfortunate side effect that a gap set to `0pt` will still have some space due to the content paragraph's leading (which is also larger than default leading of the note). Similarly, if notes are defined in a context with a larger font size, the padding and gap values may unexpectedly be larger than of neighboring notes.
## Example
```typ
#import "@preview/marge:0.1.0": sidenote
#set page(margin: (right: 5cm))
#set par(justify: true)
#let sidenote = sidenote.with(numbering: "1", padding: 1em)
The Simpsons is an iconic animated series that began in 1989
#sidenote[The show holds the record for the most episodes of any
American sitcom.]. The show features the Simpson family: Homer,
Marge, Bart, Lisa, and Maggie.
Bart is the rebellious son who often gets into trouble, and Lisa
is the intelligent and talented daughter #sidenote[Lisa is known
for her saxophone playing and academic achievements.]. Baby
Maggie, though silent, has had moments of surprising brilliance
#sidenote[Maggie once shot <NAME> in a dramatic plot twist.].
```

|
https://github.com/antonWetzel/typst-languagetool | https://raw.githubusercontent.com/antonWetzel/typst-languagetool/main/readme.md | markdown | MIT License | # typst-languagetool
Spellcheck typst files with LanguageTool.
## Overview
1. compile the document
1. extract text content
1. check text with languagetool
1. map results back to the source
## Use special styling for spellchecking
```typst
// use styling for spellcheck only in the spellchecker
// keep the correct styling in pdf or preview
// should be called after the template
#show: lt()
// use styling for spellcheck in pdf or preview
// should be called after the template
#show: lt(overwrite: true)
#let lt(overwrite: false) = {
if not sys.inputs.at("spellcheck", default: overwrite) {
return (doc) => doc
}
return (doc) => {
show math.equation.where(block: false): it => [0]
show math.equation.where(block: true): it => []
show bibliography: it => []
show par: set par(justify: false, leading: 0.65em)
set page(height: auto)
show block: it => it.body
show page: set page(numbering: none)
show heading: it => if it.level <= 3 {
pagebreak() + it
} else {
it
}
doc
}
}
```
## Language Selection
The compiled document contains the text language, but not the region.
```typst
#set text(
lang: "de", // included
region: "DE", // lost
)
```
The text language is used to determine the region code ("de-DE", ...).
If another region is desired, it can be specified in the language parameter.
## LanguageTool Backend
- different LanguageTool backends can be used to check the text
- atleast one backend must be enabled for `cargo install ...` with `--features=<backend>`
- one backend must be selected for `typst-languagetool ...` with the required flags
### Bundled
- typst-languagetool starts a LanguageTool instance with JNI
- requires maven and the executable is not portable
- add feature `bundle-jar`
- specify flag `--bundled`
### External JAR
- typst-languagetool starts a LanguageTool instance with JNI
- requires JAR with languagetool
- add feature `external-jar`
- specify flag `jar_location=<path>`
### Remote Server
- typst-languagetool connects to a running LanguageTool server
- add feature `remote-server`
- specify flags `host=<host>` and `port=<port>`
## Usage
- terminal
- install command line interface (CLI)
- `cargo install --git=https://github.com/antonWetzel/typst-languagetool cli --features=...`
- Check on time or watch for changes
- `typst-languagetool check ...`
- `typst-languagetool watch ...`
- Path to check
- `typst-languagetool watch --path=<directory or file>`
- `typst-languagetool check --path=<file>`
- Main file of the document
- defaults to path if not specified
- check the complete document if a path is not specified
- `--main=<file>`
- Project root can be changed
- defaults to main parent folder
- `--root=<path>`
- vs-codium/vs-code
- install language server protocal (LSP)
- `cargo install --git=https://github.com/antonWetzel/typst-languagetool lsp --features=...`
- install generic lsp (`editors/vscodium/generic-lsp/generic-lsp-0.0.1.vsix`)
- configure options (see below)
- hints should appear
- first check takes longer
- neovim
- install language server protocal (LSP)
- `cargo install --git=https://github.com/antonWetzel/typst-languagetool lsp --features=...`
- copy the `editors/nvim/typst.lua` file in the `ftplugin/` folder (should be in the nvim config path)
- configure options in `init_option` (see below)
- create a `main.typst` file and include your typst files inside if needed
- hints should appear (if not use `set filetype=typst` to force the type)
- first check takes longer
## LSP Options
```rust
/// Additional allowed words for language codes
dictionary: HashMap<String, Vec<String>>,
/// Languagetool rules to ignore (WHITESPACE_RULE, ...) for language codes
disabled_checks: HashMap<String, Vec<String>>,
/// preferred language codes
languages: Vec<String>,
/// use bundled languagetool
bundled: bool,
/// use external JAR for languagetool
jar_location: Option<String>,
/// host for remote languagetool
host: Option<String>,
/// port for remote languagetool
port: Option<String>,
/// Size for chunk send to LanguageTool
chunk_size: usize,
/// Duration to wait for additional changes before checking the file
/// Leave empty to only check on open and save
on_change: Option<std::time::Duration>,
/// Project Root
root: Option<PathBuf>,
/// Project Main File
main: Option<PathBuf>,
```
|
https://github.com/liamaxelrod/Resume | https://raw.githubusercontent.com/liamaxelrod/Resume/main/README.md | markdown |
# <NAME> Resume/CV
## Requirements
- [Typst](https://typst.app)
## VSCODE Extensions
- nvarner.typst-lsp
- mgt19937.typst-preview
|
|
https://github.com/matteopolak/resume | https://raw.githubusercontent.com/matteopolak/resume/main/cover.typ | typst | MIT License | #import "utils.typ": *
#let config = toml("config.toml")
#set page(paper: "us-letter", margin: 0.4in)
#set document(
title: config.at("title", default: config.name + "'s Cover Letter"),
author: config.at("author", default: config.name),
keywords: "cover letter, software engineer, developer, programmer",
)
#set text(font: "open sans", weight: "regular", size: 10.5pt, hyphenate: true)
#set par(leading: 0.5em)
#set list(indent: 1em, spacing: 0.65em, tight: false)
#set block(below: 2em)
#let name = text(
size: 40pt,
font: "jersey 10",
weight: "bold",
fill: white,
config.name
)
#let about = text(
size: 10pt,
stack(
dir: ltr,
spacing: 0.5em,
[
#config.phone \
#link("mailto:" + config.email, config.email) \
#link("https://linkedin.com/in/" + config.linkedin, "linkedin/" + config.linkedin)
],
// vertical line
line(
stroke: 1pt + white,
angle: 90deg,
length: 40pt
),
align(start, [
#config.location \
#link("https://" + config.website, config.website) \
#link("https://github.com/" + config.github, "github/" + config.github)
])
)
)
#header(
text(fill: white, stack(dir: ltr, [
#name \
#text(size: 10pt, [3#super[rd] year Computer Science student])
],
align(right, about)
)),
alignment: start + horizon
)
#space(h: 0.3in)
<NAME>,
I am writing to express my interest in the Co-op Software Developer position at Cliniconex. As a third-year Computer Science student at the University of Ottawa, with a focus on full-stack development and hands-on experience in various technologies, I am excited about the opportunity to contribute to your team and help advance healthcare communication solutions.
At Ciena, I developed and maintained a variety of full-stack projects, including a resource booking platform that reduced wait times by over 99%. I have experience building and integrating RESTful APIs, utilizing technologies such as JavaScript, PostgreSQL, and MongoDB, and I am confident that my skills in both front-end and back-end development will allow me to make meaningful contributions to the projects at Cliniconex.
I am particularly drawn to the collaborative culture and innovative healthcare solutions that Cliniconex provides. The opportunity to work in a cross-functional team, design software-as-a-service solutions, and directly impact patient care is extremely motivating. I am eager to apply my technical skills, learn from experienced developers, and contribute to the software solutions that improve communication and collaboration within healthcare environments.
I am confident that my experience in software development, combined with my enthusiasm for learning and problem-solving, will make me a strong addition to your team. I look forward to the opportunity to contribute to Cliniconex and further develop my skills.
Thank you for considering my application. I am happy to provide any additional information or references as needed, just let me know!
#line(length: 100%)
Regards, \
#config.name
#space(h: 0.1fr)
#box(
width: 100%,
fill: rgb(38, 38, 38),
// but since this is at the top, we want to fill
// the margin with the background of the box
outset: (x: 0.4in, bottom: 0.4in),
)
|
https://github.com/sicheng1806/typst-book-for-sicheng | https://raw.githubusercontent.com/sicheng1806/typst-book-for-sicheng/main/scr/basic_pkg/board.typ | typst | #let background-board(width:auto,out-fill:luma(90%),in-fill:white,radius: 0pt,out-inset: 0pt,_align: center,in-inset:10pt,body) = {
set align(_align)
block(
radius: radius,width: width,fill:out-fill,inset: out-inset,
block(width: 100%,fill:in-fill,inset:in-inset,body)
)
}
#let result-board(width:auto,body) = {
background-board(width:width,radius:4pt,out-inset:6pt,_align:center,body)
}
#let code-board(width: auto,body) = {
set align(left)
background-board(width: width,radius: 1pt ,out-inset: 1pt,out-fill:luma(80%),_align:left,body)
}
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/056%20-%20Outlaws%20of%20Thunder%20Junction/006_A%20Long%20Way%20from%20Home.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"A Long Way from Home",
set_name: "Outlaws of Thunder Junction",
story_date: datetime(day: 19, month: 03, year: 2024),
author: "<NAME>",
doc
)
Nashi stood beneath a canopy of oversized cacti. Sunlight slipped through the mess of short prickles, making crisscrossed shadows appear over his feet. He took a step back, tucking himself farther into the shade. The cacti forest was one of the greenest places on Thunder Junction, but only the hardiest wildflowers and desert vegetation survived the dry heat.
It was like that for the people, too.
Nashi's tail flicked behind him, and he uncurled the scroll in his hands, eyes darting over the story he'd memorized by heart. He let every word seep into his mind—then he did his best to hold them there. He imagined the spell latching itself to his very soul as if putting down roots. When the magic began to course through him, it pulsated in his bloodstream like a living, volatile being.
The vibrations made him shudder.
"Steady," his mother's voice sounded beside him. "Story magic cannot be rushed. It is an exchange, and one that requires balance. Give strength to the words, and they will give strength in return."
The familiar tone was enough to make Nashi's throat knot. Soothing, deliberate, and wise; if he closed his eyes, he could imagine the scent of flowers and spice that always lingered on her robes, and the brush of air that tickled his cheeks whenever she'd float past him. Instead, he glanced up to see the shimmering silhouette of his mother's former self.
He still wasn't used to this version of her—not exactly alive, but not truly gone. The Tamiyo that existed now was a mere collection of memories; an animated story scroll that represented everything she once was.
Tamiyo moved like a pixelated aura, and the air around her crackled with light. She took a step closer to Nashi. "Find the balance."
Nashi released a slow breath and let the story flow through him. He recited the words with precision, recounting the tale of a plant sprouting to life from a single particle of sand, each tendril growing to impossible heights, controlled by the will of its creator. A weapon born from the earth.
As Nashi spoke the final word, a sapling burst free of the desert floor, lifting itself slowly toward the sunlight.
"That's it," Tamiyo said patiently. "Now, finish the story. Give it life."
#emph[Life. ] The word hit Nashi like a sucker punch, and in an instant, his mind was transported back to the day the Wanderer killed what had been left of Tamiyo. He wasn't sure if his mother had still been there—if a part of her had managed to survive her transformation—but it didn't matter. The loss that day had been just as powerful as the day he'd learned she'd been compleated.
Nashi faltered, and the sprout gave a weakened shudder before coiling back into the sand.
He tightened his grip around the scroll, whiskers twitching. "I—I can't do it. I'm not gifted the way you were."
Tamiyo's ghost-like form flickered between existence and nothingness, and she reached out to lift Nashi's chin. He couldn't feel a thing but tried to imagine it anyway.
"You're easily distracted by things you cannot control," she said. "I understand your sorrow, but you cannot allow it to break the flow of your story. You have to maintain focus."
He lifted his shoulders. "I can focus on you." He motioned to the memory scroll that never left his side. "When I read your story, you're here, every time."
"Yes. And why do you think that is?"
He knew the answer without having to think about it; he just didn't want to say it out loud.
#emph[The only stories that mean anything are the ones that bring me back to you.]
Nashi turned away and blinked hard. He stuffed the plant scroll into his rucksack and gave the strap a sharp tug. "It'll be sundown soon. I should head back."
Tamiyo watched Nashi with careful curiosity. Finally, she nodded. "Until next time, then."
Nashi released his hold over Tamiyo's memory scroll. The glowing version of his mother vanished, but the pain in his chest was unrelenting.
With a tired sigh, he trudged back through the cacti forest, avoiding the rattlesnakes hiding in the surrounding brittlebush as he made his way to the nearest town.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
The evening train pulled into the station, and a deep whistle sounded before the wheels screeched to a halt. Moments later, a surge of travelers spilled out onto the platform, and the clamor of footsteps echoed through the night air. A small, metal orb darted in and out of the crowd, weaving around strangers with ease. It hovered for a moment, out of reach, while its blue light scanned the bustling space, logging every detail. After a few minutes, it flew over the train and made a beeline for the three-story saloon across the main road.
The device paused in front of the shuttered doors. The darkness did nothing to hide the wear and tear visible all over the building—chipped paint, splintered window frames, and an abundance of missing roof tiles—but Nashi hadn't chosen Ironstone for its luster.
Most of the people who passed through were only interested in breaking up their train journeys. It was a roadside town, with little to offer beyond a single card den, an abandoned mine, and a rail station with connections that stretched from Thunder Junction's biggest cities to the far-reaching outskirts in the wastes. But the influx of new faces every day meant there were always new stories to uncover.
To record and preserve history was Tamiyo's greatest pursuit. Her #emph[legacy] . Nashi desperately wanted to keep that part of her alive, in the only way he knew how.
The metal orb launched itself skyward and followed the incline of the roof. Nashi waited at the apex where several exposed beams created a smooth surface for sitting. The spy drone slowed in front of him before settling in the curve of his outstretched palm.
Nashi pressed a finger against the microchip at his temple, switching the drone's feed from "record" to "playback." The device spun in place, and a hologram formed above the camera's glass dome. The glowing image of the train station stretched in front of Nashi, and he watched with interest as the holo-recording began to play.
Most of it was completely ordinary—strangers lugged their bags across the platform, passing anxious looks between their tickets and the overhead clock tower. Two young children stood outside the station café, fighting over a bottle of lemonade. An elderly woman waited on a bench reading a day-old newspaper. And a couple was so busy arguing about whose fault it was they ended up at the wrong station that neither noticed the rogue hand slipping into their coat pockets, relieving them of a silver pocket watch, several gold coins, and a rather important-looking identification card.
#emph[Nothing of merit beyond petty theft] , Nashi concluded and tapped the chip at his temple several more times, sifting through the shared library of video recordings he'd gathered from across Thunder Junction. There was footage of dueling Hellspurs and Outcasters practicing wild magic, but instead of watching, he paused on a holo-recording he'd seen many times before.
The image flickered across the rooftop. A mother and her two children stood in front of the Omenpath. The children paced, fingers tangling with anticipation. Their eyes locked onto the wide, flickering portal, and their mother took one of their hands and squeezed tight.
Shadows appeared within the blue swirls, and a cluster of figures stepped through the Omenpath. One was tall and broad, but the oversized bags hanging against his shoulders made him appear colossal. His face was weary and travel-worn, but there was hope in it, too.
The man barely stepped away from the portal when he began his search, eyes darting from one stranger to the next. It didn't take him long to spot his family—or for them to spot him.
Joy erupted across his face, and his bags plummeted to the sand. He flung his arms around his family, squeezing them into a desperate embrace, limbs tangled together as his eyes turned glassy. It was a reunion he'd clearly waited a long time for.
The knot in Nashi's throat felt like iron. A part of him knew it was unfair to blame the Wanderer for taking away the reunion he might've had with his mother, but a bigger part of him was too burdened with grief to feel anything but cheated.
Nashi had believed there was still a way to save his mother's life. If Kaito had listened to him … If the Wanderer hadn't swung her sword …
His hands curled into fists, thoughts drowning out the sounds of the family's laughter.
Tamiyo had preserved her memories in a magic scroll, but Nashi's memories were in his head. They were fallible at best and at an even greater risk of being forgotten one day. He wished he could rewatch every detail of his life. He wished he could remember the last time his mother hugged him. The last time she'd held him while he cried. The last time she'd tucked him into bed and sang him to sleep.
The corners of his eyes filled with salt-sting, and he cut off the drone's holo-recording abruptly, wiping his cheek with the back of his hand.
#emph[You can still make her proud] , he told himself, face heating. #emph[You can finish what she started.]
He took a breath, attempting to regain his composure, when a pair of voices in the alley below made his ears perk up.
"I'm telling you—these outskirt jobs are rarely worth the payday. You can make #emph[twice] as much going after high-collar marks in Omenport."
"They're twice the risk, too. Have you seen the amount of Sterling guards crawling around the city these days? I've got no interest in going up against Graywater's crew. At least these backwater places know how to mind their own business."
There was a gruff chuckle, and Nashi moved closer to the edge of the roof. Two Slickshots wearing garish velvet coats stood between the buildings, counting whatever money they'd won in the saloon. It was strange to see a Slickshot so far from the city, but even stranger to see them working in pairs. Most knew better than to trust one another.
"No wonder Lilah is getting all the good jobs these days. That magic amplifier is practically making her untouchable!"
"Wonder what a concoction like that would cost on the black market?"
"Doesn't matter #emph[what] the price is—no one steals from the Slickshots and lives to spend the coin."
"I don't want to sell it—I want to #emph[use] it. And it's not like there's only one in existence, right? It obviously came from #emph[somewhere] ."
"With the Omenpaths open for business, you're looking at a thousand and one possibilities. Probably more."
"Well, I heard it came from a frozen plane full of gods. Rumor is it's what they drink to stay immortal."
"I don't believe that for a second. More likely it's that Halo stuff from the city-plane."
"Ravnica?"
"No, the #emph[other ] one!"
"Aw, hells. Who can keep track these days. Point is, there's gotta be more of it out there."
"Good luck trying to find it. But if you keep talking about stealing from Lilah, I'm going to consider turning you in. Now #emph[that] would be an easy payday."
The Slickshot laughed in response, but there was an unmissable edge to it. Nashi had a hunch that only one of them would be heading back to the city in the morning.
As they walked back to the hotel across the road, their voices faded in the distance. Nashi didn't bother following them; he'd heard enough.
There was an amplifier on Thunder Junction. Something that could strengthen his story magic in an instant. And it was currently in the possession of a Slickshot boss called Lilah.
Nashi stood, dusting the sand from his clothes. There wasn't much he could do tonight. But tomorrow?
He had a train to catch.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
The Voyager Grande stretched toward the clouds. Jagged, triangular rooftops and wide-reaching windmills loomed from the very top of the entertainment megaplex. Colorful bunting stretched from one balcony to the next, and spherical lights were strung up along the roof gables where blue paint was streaked in neat, uniform lines.
After days of scouring through holo-recordings for information on Lilah, Nashi had what he needed: the amplifier's location. He straightened his cloak, making sure it hid the equipment he'd attached to his belt, and stepped through the main doors of the megaplex.
Wooden card tables lined the edges of the grand front room. Two wide staircases led to the second floor, where lights flashed around the doorways of each unique establishment. There were restaurants and dance halls and theatre shows—all designed to rid people of as much coin as possible. Nashi made his way to one of the elevators and ducked inside, keeping his head low.
The elevator door curved around him, and the platform began to rise. Nashi studied the control panel at the wall. There were two rows of bronze buttons and a key slot at the top that provided access to the tenth floor. Nashi had done enough research to know that the Slickshot headquarters operated in the basement, but the tenth floor was for the hotel's most-exclusive customers. In other words, anyone—or anything—Lilah wanted to keep out of sight.
Nashi removed one of the devices from his belt and latched it to the control panel. The buttons began to flash wildly, and the key slot lit up a neon blue. When the elevator opened on the tenth floor, he found himself in a wide foyer.
Taking the hallway to the right, Nashi moved for the nearest air vent and reached for one of his drones. The small metal orb gave a shudder before zipping into the dark tunnel. Using the device at his temple, he led the orb through the vent, navigating corners as he followed alongside the corridor. When he stopped in front of one of the rooms, he positioned the drone at the edge of the metal grate, glass dome rotating to get a complete image of the space below. He was prepared for a guard or two and had the smoke bombs on his belt to prove it—but the room was empty, save for an office desk near the window and a wide glass shelving unit along the entire back wall.
Nashi grinned, smug. A thought flickered in his mind of Kaito being impressed by his entry methods—but he pushed the notion away. Things with Kaito were … complicated.
Focusing on the camera feed, Nashi let the drone circle the room, checking every corner for alarms. A trip light stretched across the floor like a wire, and Nashi nearly laughed when he saw it.
#emph[A child could've set a better trap] , his mind hummed.
The drone split into two parts: the camera remained floating in the air, but the bottom half took the shape of an origami butterfly. It skittered through the room, racing for the door, and latched itself to the handle. Its metal legs reached into the keyhole, and Nashi heard the #emph[click] from outside. He opened the door, taking care to step over the trip light, and walked toward the back of the room when something made him hesitate.
Sitting on the middle of the desk without any protection at all was a small glass bottle.
The liquid was deep red and unmistakably metallic. There was no writing on the bottle, but Nashi's nostrils flared when he picked up its scent. The magic was abhorrently pungent, and the stench made his eyes water. Maybe #emph[that's] why there were no guards here.
Nashi didn't exactly relish the thought of downing something so putrid, but if it would make him more like his mother …
#emph[I could be what she always wanted me to be] , Nashi's heart pinched.
He reached for the potion—but his hand pressed straight through the glass, as if the bottle wasn't there at all. He frowned, trying once more to close his fist around the elixir, but he felt nothing but air.
Nashi pulled his arm back, and the hairs on the back of his neck stood up, alert. Something was wrong.
A #emph[crack] sounded, and when Nashi turned back to the bottle, it had shattered in place. The sounds came in quick succession, glass breaking in time with Nashi's racing heart, when he realized it wasn't just the bottle—the entire #emph[room] was shattering. Lines appeared in his vision, slicing at the world around him like miniature lightning bolts. Nashi spun, searching for the doorway, but there were cracks there, too. And then—the world exploded.
Nashi threw his hands over his head and crouched low, biting down the cry in the back of his throat. A deep laugh turned his panic to terror.
He looked past his outstretched fingers, and the room was no longer made up of a trillion broken pieces. It was whole, and still—but where the bottle once sat, there was an ogre with blue-gray skin and a ferocious glare. One side of her head was shaved nearly to the skin, while the other boasted wild red waves that seemed to grow in every direction. A pair of fanged animal teeth pierced her pointed ears, and a sleeveless maroon cloak exposed the muscular curves of a well-trained fighter. But it was the hourglass lantern hanging from her waistcoat that made Nashi flinch.
#figure(image("006_A Long Way from Home/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
"You're a time mage," Nashi managed, hoarse. He quickly searched his memories for information on the Slickshot's hired mercenaries. He hadn't seen them on any of his drone footage, but he #emph[did] remember a name coming up on more than one occasion. "Obeka."
The woman flashed her teeth. "You know who I am, and you still tried to steal from me? Either I'm losing my edge, or you have a death wish."
Nashi stood up slowly. "Look, this is all just a misunderstanding. I thought this room was empty."
"The second part, I believe. Who do you work for?"
"No one," Nashi insisted.
Obeka tilted her head to the side before removing the elixir from her coat. "This is what you came for, isn't it? Who's after the amplifier? Graywater? The Hellspurs?" She gritted her teeth. "I knew those snakes couldn't handle competition. I bet they hoped I'd go easy on you because you're a kid. What a spineless bunch of—"
"I'm not a kid," Nashi interrupted. "And I don't know what you're talking about." He watched as Obeka rotated the bottle in her fist, studying him. His mind was racing for details about Slickshots and time mages and ogres—anything he could think of to give him an advantage. He tried to keep his voice steady. "I came here alone."
"Do you know what my employer does to thieves?" Obeka drew out her words carefully, dark eyes searching for the fear in Nashi's.
He looked at her. He looked at the bottle. He calculated the distance.
Obeka mistook his movements for dread and sneered. "Slickshots like to show each other up, you see. A regular old duel just isn't enough. It needs something special. Something flashy."
"If it's all same to you," Nashi started, brushing a finger against his temple, "I think I'll pass."
The butterfly drone shot down from above, crashing against Obeka's fist as it snatched the elixir free from her grip. It swooped toward the air vent, barely making it to the grate before shuddering in place—frozen.
Obeka stood, face flushed with rage and her arm outstretched. Magic rippled around her hand before a chain of golden links thrashed forward, tugging at the air as if it were pulling the drone back through time.
The butterfly drone retraced its movements, on course to deliver the elixir back into Obeka's fist—just the way Nashi had predicted.
With Obeka's attention fixed on the drone, Nashi removed one of his mother's scrolls from his bag, eyes scanning hurriedly over the story about a thief disappearing under a veil of invisibility to escape. He mouthed the words, trying not to stumble over his own thoughts, and let the magic move through him. He felt it for a moment—watched his reflection in the mirrored wall as he flickered out of sight—but the spell faltered, just as it had in the cacti forest.
The ripple of magic was enough to draw Obeka's attention, even as she retrieved the elixir and smashed the drone against the floor.
Her laughter was full of disdain. "Now I understand. You really #emph[were] after the amplifier for your own purposes." She tucked the bottle into her coat and squared her shoulders. "You should know that the potion would be wasted on a weakling like you. The elixir doesn't #emph[give] power, it enhances it—and you clearly have nothing worth strengthening."
Nashi's anger flushed through him. It didn't matter if she was right; he needed to move, fast. He reached for a smoke bomb and raised his arm to throw it, when Obeka punched him hard across the jaw.
He felt the pain radiate across his chin, followed by the violent aftershocks that roiled to his very core. But Obeka's fist was frozen in front of him. Cracks split around it, and once again, the world began to break apart. Glass shards appeared, faster and faster until the explosion shattered his reality.
Something tugged at Nashi's body, yanking him backward as he tumbled through a tunnel of broken glass. The hotel room morphed into flashes of images that swept past him like shapes in a kaleidoscope.
#emph[No, not images] , Nashi realized, eyes widening as he soaked in the details around him. #emph[These are memories. ] My#emph[ memories.]
When Tamiyo's face blurred past him, he fought at the invisible restraints with every bit of energy he had left, tugging himself free until he lunged for his mother. He was weightless, drifting toward light and color, when the memory surrounded him.
A much younger version of Nashi stood in the doorway of his mother's library, watching her read her scrolls. In his hands was a small gadget. Something he'd made of bolts, spare wires, and a repurposed chip from a surface drone. It chirped like a bird and responded to hand commands. Nashi hoped his mother would like it. She'd always been fond of birds.
But the longer Nashi watched his mother, the more he began to second-guess himself. He wouldn't get her approval with toys he patched together with recycled parts. He needed to study. To practice story magic.
#emph[He needed to be just like his mom.]
Nashi tucked the small device into his shirt pocket, shoulders sagging with doubt, when Tamiyo turned to face him. She didn't ask any questions; at first, she didn't say anything at all. She just watched Nashi with curious eyes, the way she studied the people whose stories she recorded.
After a moment, she left her scrolls and pulled Nashi into her arms. "Never hide who you are, Nashi. Not from me, and not from the world."
Nashi's voice was timid. "I don't want to be different from you. I want us to be the same."
Tamiyo tilted her head. "We are family. You are my son. The part of my heart that loves you will always be a match to the part of your heart that loves me. In that way, we will always be the same." She cupped his face, brushing her fingers over his cheeks. "But we don't have to be the same for me to be proud of you. You are #emph[Nashi] . That is who I'm proud of. Don't ever forget that. Don't ever forget who #emph[you ] are."
The memory dissolved. Nashi blinked, head swirling and jaw aching, and he pushed himself off the carpeted floor. He was back in the hotel room, but Obeka had already vanished with the amplifier. He had no idea how long he'd been unconscious, or how far back into his memories Obeka had sent him. But the warmth of the flashback simmered at the forefront of his mind.
Obeka hadn't meant to, but she'd done him a favor.
When Nashi regained his composure and made his way back through the hotel, he knew exactly what he needed to do next.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
A collection of half-built drones was sprawled across Nashi's desk. His brow twitched as he worked, eyes focused on the corner pin of a microchip. He pressed the tip of a soldering iron against it, and the sizzle of heat caused a wave of nostalgia to ripple through him. There was something comforting about the smell of burning metal.
It reminded him of home.
When Nashi finished the modifications, he pulled up every holo-recording from the storage drives. He watched the surveillance feeds he'd gathered from across Thunder Junction, combing through each frame, searching for what he needed.
When he imagined he was back in his mother's study, studying the drones the way she once studied her scrolls, he felt a piece of his heart click into place.
#emph[We were never so different after all] , he thought, and the relief made his throat tighten.
Nashi worked through the night, singling out a set of holo-recordings and transferring them to their individual drones. When the sun rose over the desert and light flickered through the dusty windowpane, he leaned back in his chair and pressed the device at his temple.
Magic bristled at his fingertips, more naturally than ever before. There was no strain. No fight for control. Power channeled through him like an extension of his own being. For the first time in months, he felt like himself.
It had always been enough for his mother—now, it would be enough for him, too.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Nashi stood outside the Voyager Grande for the second time. Five drones circled around him, taking the shape of small, origami birds. His mother's favorites.
He wore no hat and no cloak. He brought only himself, and the truth in his heart.
Nashi took the elevator to the top floor of the hotel, moved carefully through the halls, and stopped in front of a door he was all too familiar with. When he unlocked the door with one of his devices, he didn't wait for an invitation.
Obeka was sitting in the chair behind the desk, legs up on the table. Behind her, the elixir sat in one of the glass cases.
She frowned at the sight of the open door, but her eyes didn't register on Nashi. Not until he let the invisibility spell drift away.
It only took her a moment to recognize him, and when she did, her mouth curled to one side. "Seriously, kid? I know I let you live, but it was heavily implied I didn't want to see you again."
"It was," Nashi agreed. "But how else was I going to thank you?"
Obeka folded her arms over her chest and snickered. "Not the usual reaction I get after punching people into yesterday."
Nashi took a step forward. "You showed me a memory. It helped me realize what I've been missing all this time."
"Common sense? Survival instincts?"
Nashi cracked a smile. "No. Well, maybe a little bit. But I was so busy trying to be like my mother, that I forgot to embrace who I've always been at my core."
Obeka pressed her fists to the desk, crunching into the wooden surface. "And who might that be?"
Nashi ushered one of his drones ahead, and a hologram appeared from its camera. Video footage from the night Obeka punched him. The audio was distorted and garbled, but the image was seamless. #emph[Accurate.]
Nashi watched the footage alongside Obeka, paying no attention to her reaction as the Nashi in the hologram reached for a potion that wasn't actually there.
Obeka snorted. "So, you're a kid who was tricked by my time illusion. Is that what you're here to tell me?"
Nashi shook his head before vanishing from sight. Obeka startled, blinking furiously as her eyes darted around the room, when she realized the glass case was wide open.
When Nashi's voice sounded once more in the middle of the room, she spun to face him.
He gripped the elixir in his hand and shrugged. "I'm not much of a storyteller—but I know how to work a camera."
Obeka's eyes blazed with rage, and she lunged for Nashi before crashing straight through him and onto the floor. "What did you do?"
From the open window frame, Nashi watched Obeka swing once more at his own time illusion, copied from Obeka's recorded magic. It was a helpful spell to have—and it turned out story magic was a lot easier to control once he traded scrolls for surveillance footage. He smirked before gripping tight to the outer wall and climbing to the rooftop, out of sight.
Nashi stalked across the pitch of the roof and pressed a finger to his temple, summoning his drones back to him. They moved in a slow orbit around him, following as he scaled the next wall and made his way back into the crowd below. He pulled his hood up then, covering his face in shadows.
"You did it," came Tamiyo's voice in a whisper. "Just like I knew you could."
Today, he'd celebrate; tomorrow, he'd make his mother proud. There were new planes to visit, stories to uncover, and magic to record—and Nashi was ready for all of it. So long as she was at his side, nothing could stand in his way.
|
|
https://github.com/Jollywatt/typst-fletcher | https://raw.githubusercontent.com/Jollywatt/typst-fletcher/master/tests/label-wrapper/test.typ | typst | MIT License | #set page(width: auto, height: auto, margin: 1em)
#import "/src/exports.typ" as fletcher: diagram, node, edge
#diagram(
crossing-fill: blue.lighten(80%),
edge($ f $, label-wrapper: it => rect(
it.label, fill: it.label-fill, inset: 0pt, stroke: .1pt + blue,
))
)
#diagram(
label-wrapper: it => circle(
align(center + horizon, $ #it.label $), fill: it.label-fill, inset: 1pt, stroke: blue,
radius: 7pt,
),
$
A edge(->, f) & B edge("d", ->, g) \
C edge("u", ->, i) & D edge("l", ->, j)
$
)
|
https://github.com/DashieTM/ost-5semester | https://raw.githubusercontent.com/DashieTM/ost-5semester/main/web3/weeks/week1.typ | typst | #import "../../utils.typ": *
#section("Single Page Application (SPA)")
Definition: *SPA is a website that fits on a single web page with the goal of
providing a
user experience similar to that of a desktop application.*\
In an SPA, either _all necessary code_ is retrieved with a _single page load_ or
the appropriate resources are _dynamically laoded_ and added to the page as
necessary.\
In short, no flickering or crazy reloads.
- used to offer native like experience via PWA or electron
- can use notifications unlike webpages
- can also use server side rendering -> for lower power clients
- PWA and co. are what java wanted to be.
- Partitioning of client and server allows for *seperation of concerns* and
*better maintainability*
#align(center, [#image("../../Screenshots/2023_09_21_02_47_52.png", width: 70%)])
Bundling: In order to not send unnecessary data to the client, and to obfuscate
code..., we bundle the entire page.
#align(center, [#image("../../Screenshots/2023_09_21_02_52_14.png", width: 70%)])
#columns(
2,
[
#align(center, [#image("../../Screenshots/2023_09_21_02_56_45.png", width: 90%)])
#colbreak()
#align(center, [#image("../../Screenshots/2023_09_21_02_57_24.png", width: 90%)])
],
)
#subsection("Browser based application")
- can be provided as SaaS
- not efficient
- restricted hardware access
- ram usage
- no data sovereignity
- crossplatform (mostly)
#subsection("Webpack")
- page must be delivered even over slow metered connections
- bundling reduces footprint
- larger SPAs need a reliable package managing system
- initial footprint can be reduced with lazy loading of data
- one of many solutions: others -> broccoli, bazel, rollup, and newest: vite
Example of webpack usage:
#align(center, [#image("../../Screenshots/2023_09_21_03_14_45.png", width: 70%)])
#columns(
2,
[
#align(center, [#image("../../Screenshots/2023_09_21_03_04_53.png", width: 90%)])
#colbreak()
#align(center, [#image("../../Screenshots/2023_09_21_03_05_33.png", width: 90%)])
],
)
#subsection("Routing in SPA")
- routing is done solely on client
- challange: how do we store URLs when we don't actually call anything?\
- old way: hash page with window.location.hash()
- HTML5: window.history.pushState()\
both of these forces the browser to remember the state of the SPA in order to
restore last page
Example routing:
#columns(
2,
[
#align(center, [#image("../../Screenshots/2023_09_21_03_12_22.png", width: 90%)])
#colbreak()
#align(center, [#image("../../Screenshots/2023_09_21_03_13_15.png", width: 90%)])
],
)
#subsection("Dependency Injection")
The idea is that instead of calling functions directly, we pass in code, that
will later be called.\
Mostly this is done with other languages -> from JS we call html, from whatever
we call SQL, etc\
However, this can also be used in SPA by using frameworks that offer integrated
dependency injection.
#columns(
2,
[
#align(center, [#image("../../Screenshots/2023_09_21_03_22_18.png", width: 90%)])
#colbreak()
#align(center, [#image("../../Screenshots/2023_09_21_03_22_56.png", width: 90%)])
],
)
#align(center, [#image("../../Screenshots/2023_09_21_03_23_17.png", width: 70%)])
|
|
https://github.com/EricWay1024/Homological-Algebra-Notes | https://raw.githubusercontent.com/EricWay1024/Homological-Algebra-Notes/master/ha/5-cc.typ | typst | #import "../libs/template.typ": *
= Chain Complexes
<chain-complex>
== Definitions
Let $cA$ be an abelian category.
#definition[
A *chain complex* $Ccx$ in $cA$ is a family ${C_n}_(n in ZZ)$ of objects in $cA$ with morphisms $d_n : C_n -> C_(n-1)$ such that $d_n oo d_(n-1) = 0$, where $d_n$ are called *differentials*.
The *$n$-cycles* of $Ccx$ are defined as $ Z_n (C) := Ker d_n $ and
the *$n$-boundaries* are defined as $ B_n (C) := IM d_(n+1). $
Since $d_n oo d_(n-1) = 0$, we have $ B_n (C) arrow.hook Z_n (C) arrow.hook C_n $ (as subobjects) for all $n$.
The *$n$-th homology* is defined as $ H_n (C) := Coker(B_n (C) arrow.hook Z_n (C)). $
]
#notation[
We often omit the subscript in $d_n$ and simply write $d$, so $d_n oo d_(n-1) = 0$ becomes $d^2 = 0$. To emphasise that $d$ belongs to the chain complex $C_cx$, we would write either $d_C$, or $d^((C))_n$ if we also need to explicitly specify the index. We sometimes also omit the dot in $Ccx$ and simply write $C$. We might write $Z_n = Z_n (C)$ and $B_n = B_n (C)$.
]
#remark[
In the case of $RMod$, an *$n$-cycle* in $C_n$ is an element $x in C_n$ such that $d(x) = 0$, and an *$n$-boundary* in $C_n$ is an element $y in C_n$ such that there exists $c' in C_(n+1)$ such that $d(c') = y$. An $n$-boundary must be an $n$-cycle because $d^2= 0$. The $n$-th homology becomes a quotient module#footnote()[The slogan is that "homology is cycles modulo boundaries" or even "homology is kernel modulo image".], $ H_n (C) = Z_n / B_n = (Ker d_n) /( IM d_(n+1)) $ An element in $H_n (C)$ can be written as $x + B_n$, or simply $[x]$, for some $n$-cycle $x$.
]
#remark[
It is helpful to keep in mind two defining short exact sequences:
$
0-> Z_n -> C_n ->^(d_n) B_(n-1) -> 0, \
0 -> B_(n) arrow.hook Z_n -> H_n -> 0.
$
From these we know that exact functors preserve homology as they preserve #sess.
]
// #align(center,image("../imgs/2023-11-03-12-27-08.png",width:80%))
#definition[
We can form a category $"Ch"(cA)$ where objects are chain complexes and morphisms are *chain maps* $u_cx : C_cx -> D_cx$ which
commutes with differentials
$
u d = d u.
$
Namely, for all $n in ZZ$,
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAGEB9QgX1PUy58hFAEZyVWoxZsuACjABaUQEoQfAdjwEiZUZPrNWiEABFu6-iAxbhRcfuqGZJ8wuVqekmFADm8IlAAMwAnCABbJDIQHAgkcSkjNihLYLDIxAAmalikAGYnaWMQFI0QUIionLiswqSTJgsyioyE3MQCxJcQRvdVdQoeIA
#align(center, commutative-diagram(
node-padding: (30pt, 50pt),
padding: 0.5em,
node((0, 0), [$C_n$]),
node((0, 1), [$C_(n-1)$]),
node((1, 0), [$D_n$]),
node((1, 1), [$D_(n-1)$]),
arr((0, 0), (0, 1), [$d$]),
arr((1, 0), (1, 1), [$d$]),
arr((0, 0), (1, 0), [$u_n$]),
arr((0, 1), (1, 1), [$u_(n-1)$]),
)) commutes.
]
#proposition[
$Ch(cA)$ is an abelian category if $cA$ is an abelian category.
]
#proof[
@rotman[Proposition 5.100].
]
#proposition[
A chain map $u_cx : Ccx -> Dcx$ induces a morphism $H_n (u) : H_n (C) -> H_n (D). $
]
#proof[
It suffices to assume $cA = RMod$. First we show that $u_n : C_n -> D_n$ sends boundaries to boundaries. Take boundary $b in C_n$, then there exists $c in C_(n+1)$ such that $d(c) = b$. Thus $u(b) = u d(c) = d u (c)$, showing that $u(b)$ is a boundary in $D_n$.
Next we show that $u_n : C_n -> D_n$ sends cycles to cycles. Take cycle $z in C_n$ such that $d(z) = 0$. Then $d u(z) = u d(z) = u(0) = 0$, showing that $u(z)$ is a cycle in $D_n$.
Therefore, $u_n$ induces a function $H_n (C) -> H_n (D)$.
]
#corollary[
$H_n : "Ch"(cA) -> cA$ is an additive functor.
]
#definition[
A chain map $C_cx -> D_cx$ is called a *quasi-isomorphism* if the induced maps $H_n (C) -> H_n (D)$ are isomorphisms for all $n$.
]
// #remark[
// (Remark here, connection to topology)
// Derived category of an abelian category $cA$ is $ D(A) = Ch(A) ["qiso"^(-1)]$. Compare to $R[s^(-1)]$ for some $s in R$ and non-commutative $R$.
// Non-linear version: homotopy types. $Top[W^(-1)]$
// (TODO)
// ]
#proposition[
The followings are equivalent:
- $C_cx$ is exact at every $C_n$;
- $C_cx$ is *acyclic*, i.e., $H_n (C) = 0$ for all $n$;
- $0 -> C_cx$ is a quasi-isomorphism.
]
// #proof[Trivial.]
// #definition[
// A cochain complex is given by ${C^n}_(n in ZZ)$ and $d^n : C^n -> C^(n+1)$ with $d^2 = 0$.
// ... Just dual. TODO
// ]
#definition[
A *cochain complex* $Ccx$ in $cA$ is a family ${C^n}_(n in ZZ)$ of objects in $cA$ with morphisms $d^n : C^n -> C^(n+1)$ such that $d^n oo d^(n+1) = 0$, where $d^n$ are called *differentials*. The *$n$-cocycles* of $C^cx$ are $ Z^n (C) := Ker d^n $ and the *$n$-coboundaries* are $ B^n (C) := IM d^(n-1). $
We have $ B^n ( C) arrow.hook Z^n (C) arrow.hook C^n $ (as subobjects) for all $n$.
The *$n$-th cohomology* are defined as $ H^n (C) := Coker(B^n (C) arrow.hook Z^n (C)). $
We also define *cochain maps* similarly as before.
]
#example[@weibel[Application 1.1.4].
Let $X$ be a topological
space, and let $C_k eq C_k lr((X))$ be the free $R$-module on the set of
continuous maps from the standard $k$-simplex $Delta_k$ to X. Restriction
to the $i$-th face of $Delta_k lr((0 lt.eq i lt.eq k))$ transforms a
map $Delta_k arrow.r X$ into a map
$Delta_(k minus 1) arrow.r X$, and induces an $R$-module
homomorphism $diff_i$ from $C_k$ to $C_(k minus 1)$. The alternating
sums $d eq sum lr((minus 1))^i diff_i$ (from $C_k$ to $C_(k minus 1)$)
assemble to form a chain complex
$ dots.h.c arrow.r^d C_2 arrow.r^d C_1 arrow.r^d C_0 arrow.r 0 $ called the *singular chain complex* of $X$.
The $n$-th homology module of $C_cx (X)$ is called the
$n$-th singular homology of $X$ \(with
coefficients in $R$) and is written $H_n lr((X semi R))$.
]
// #example[
// Let $X$ be a topological space. Then $S_k = S_k (X)$ is the free $R$-module on the set of continuous maps $Delta_k -> X$, with restriction to the $i$-th face defines $S_k rgt(diff_i) S_(k-1)$, $d = sum (-1)^i diff_i$ gives a chain complex.
// The singular chain complex of $X$
// $H_n^"singular"(X, R)$
// ]
// #remark[
// If $cA$ is an abelian category, then we can define $S cA$ as the set of simplicial objects in $cA$. Then there is a functor $N: S cA -> Ch_(>= 0) (cA)$.
// Dold-Kan
// (?)
// ]
== Chain Homotopy
#definition[
A chain map $f: Ccx -> Dcx$ is *null homotopic* if there are maps $s_n : C_n -> D_(n+1)$ such that $f = d s + s d$, or more rigorously,
$ f_n = d_(n+1) s_n + s_(n+1) d_n $
for all $n$.
// #align(center,image("../imgs/2023-10-31-00-07-24.png",width:50%))
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRAGEB9ACjAGoAjAEoQAX1LpMufIRQDyVWoxZsuhcZOx4CRAEwLq9Zq0QceYALTCxEkBi0yiZAYqMrTAEXOCRGu1O1ZZHkXQ2UTEC91W3tpHRR9UKVjNi9eHzFFGCgAc3giUAAzACcIAFskMhAcCCR5ZPcQKBsi0orEepqkfQaI5r8S8rrqLsQAZmoGLDA+ujgAC2yQMJTTBAG24eraxAAWFcbClpBB9p7R-ZApmbYoOcXmg4j121OkCe2kS7c+47e9kY7ACsT1umVEQA
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 0), [$C_(n+1)$]),
node((0, 1), [$C_n$]),
node((0, 2), [$C_(n-1)$]),
node((1, 0), [$D_(n+1)$]),
node((1, 1), [$D_n$]),
node((1, 2), [$D_(n+1)$]),
arr((0, 0), (0, 1), [$d$]),
arr((0, 1), (0, 2), [$d$]),
arr((0, 1), (1, 0), label-pos:-1em, [$s$], "dashed"),
arr((0, 1), (1, 1), [$f$]),
arr((0, 2), (1, 1), label-pos:-1em, [$s$], "dashed"),
arr((1, 0), (1, 1), [$d$]),
arr((1, 1), (1, 2), [$d$]),
))
(Only the solid lines commute.) We denote $f tilde 0$ in this case.
]
#definition[
Two chain maps $f$ and $g$ from $Ccx$ to $Dcx$ are *chain homotopic* if $f - g$ is null homotopic. We denote $f tilde g$.
]
#remark[
$f tilde g <=> f - g tilde 0 <=> f - g = s d + d s$.
]
#lemma[
// If $f tilde g$, then $f_* = g_* : H_* (C) -> H_* (D)$.
Suppose that chain maps
$f comma g colon C_cx arrow.r D_cx$ are chain homotopic.
Then the induced maps
$f_* comma g_* colon H_n lr((C)) arrow.r H_n lr((D))$
are equal. In particular, if $f: Ccx-> Dcx$ is null homotopic, then $f_* = 0 : H_n (C) -> H_n (D)$.
]
#proof[@notes[Lemma 2.32], @weibel[Lemma 1.4.5]. Let $h$ be a chain homotopy from $f$ to $g$. We have
$ f_n minus g_n eq s_(n minus 1) compose d_n^(lr((C))) plus d_(n plus 1)^(lr((D))) compose s_n $
for each $n$. Let $x in H_n lr((C))$. Then $x eq lr([c])$ for some cycle
$c in Z_n C$. We have
$ f_* lr((x)) minus g_* lr((x)) & eq lr([f_n lr((c)) minus g_n lr((c))])\
& eq lr([s_(n minus 1) compose d_n^(lr((C))) lr((c)) plus d_(n plus 1)^(lr((D))) compose s_n lr((c))])\
& eq lr([d_(n plus 1)^(lr((D))) compose s_n lr((c))])\
& eq 0 comma $
The third equality is because $c$ is an $n$-cycle in $C$ and last equality is because $d_(n plus 1)^(lr((D))) compose s_n lr((c))$ is an $n$-boundary in $D$.
]
#corollary[
If the chain map $id : C_cx -> C_cx$ is null homotopic, then $C_cx$ is acyclic.
]
<null-homotopic-acyclic>
#endlec(7)
#definition[@weibel[Translation 1.2.8].
If $C = Ccx$
is a chain complex (resp. cochain complex) and $p$ an integer, we form a new complex $C lr([p])$ as
follows:
$ C lr([p])_n eq C_(n plus p) quad lr((upright("resp. ") C lr([p])^n eq C^(n minus p))) $
with differential $lr((minus 1))^p d$. We call
$C lr([p])$ the *$p$-th translate* of $C$. The way to remember
the shift is that the degree $0$ part of $C lr([p])$ is $C_p$. The
sign convention is designed to simplify notation later on. Note that
translation shifts homology:
$ H_n lr((C lr([p]))) eq H_(n plus p) lr((C)) quad lr((upright("resp. ") H^n lr((C lr([p]))) eq H^(n minus p) lr((C)))). $
We make translation into a functor $[p]: Ch(cA) -> Ch(cA)$ by shifting indices on chain maps.
That is, if $f colon C arrow.r D$ is a chain map, then
$f lr([p])$ is the chain map given by the formula
$ f lr([p])_n eq f_(n plus p) quad lr((upright("resp. ") f lr([p])^n eq f^(n minus p))). $
]
// #definition[
// Translation $ (C[p])_n := C_(n+p) $
// $ (C[p])^n := C^(n-p) $
// differential is $(-1)^p d $
// ]
// $(C[p])_0 = C_p$
// $H_n (C[p]) = H_(n+p) (C)$
// $f: Ccx -> Dcx$ => $f[p]_n = f_(n+p)$
== Exact Sequences
Recall that if $cA$ is an abelian category, then $Ch(cA)$ is also an abelian category.
Therefore, we can form short exact sequences with chain complexes, and it turns out that they naturally induce long exact sequences in (co)homology.
#definition[ For chain complexes $A_cx, B_cx, Ccx$,
$ ses(A_cx, B_cx, Ccx) $ is a *short exact sequence* if $ses(A_n, B_n, C_n)$ is a short exact sequence for all $n$.
]
// Long exact sequence.
#theorem[
If $ 0 -> A_cx rgt(f) B_cx rgt(g) Ccx -> 0$ is a short exact sequence of chain complexes, then there is a natural map for each $n$ $ diff_n: H_n (C) -> H_(n-1) (A), $ which we call the *connecting homomorphism*, making
$ ... -> H_n (B) -> H_n (C) rgt(diff_n) H_(n-1) (A) -> H_(n-1)(B) -> ... $
a long exact sequence. Further, $diff_n$ is explicitly given by the well-defined expression $ diff_n = f^(-1) d_B g^(-1). $
If $ 0 -> A_cx rgt(f) B_cx rgt(g) Ccx -> 0$ is a short exact sequence of cochain complexes, then we have the connecting homomorphism
$ diff^n : H^n\(C) -> H^(n+1)(A), $
where the induced long exact sequence is
$
... -> H_n (B) -> H_n (C) rgt(diff^n) H_(n+1) (A) -> H_(n+1)(B) -> ...
$
and $ diff^n = f^(-1) d^B g^(-1). $
]
<connecting>
#proof[
Again, we assume the context of $RMod$. This is an application of the @snake[Snake Lemma].
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRGJAF9T1Nd9CKAIzkqtRizYBBAPqFuvbHgJEATKOr1mrRCABCcrjxAYlAogGYN47WwDChhSb7LByACzWtk3Ryen+FRQyITFvHXYjRUC3EVDNCQjZAAowAFohAEoo5zMg5HV4mx99GVSM7P8XcxQrIvD7MvSsnIDXIk96xLY-MRgoAHN4IlAAMwAnCABbJDIQHAgkIScJ6aXqBaRVFcmZxHV5xcQLHbXjjaP3U72RQ6QANgTbXSgc1b2DzcQAdieS1+uSCsd0QAA5qAw6AAjGAMAAK1SCIAYMFGOBAfwiAOM7yQAFYLg9AYhHiDvsTfiDQcTwSCAJycCicIA
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 0), [$0$]),
node((0, 1), [$A_n$]),
node((0, 2), [$B_n$]),
node((0, 3), [$C_n$]),
node((0, 4), [$0$]),
node((1, 0), [$0$]),
node((1, 1), [$A_(n-1)$]),
node((1, 2), [$B_(n-1)$]),
node((1, 3), [$C_(n-1)$]),
node((1, 4), [$0$]),
arr((0, 0), (0, 1), []),
arr((0, 1), (0, 2), []),
arr((0, 2), (0, 3), []),
arr((0, 3), (0, 4), []),
arr((0, 1), (1, 1), [$d_A$]),
arr((0, 2), (1, 2), [$d_B$]),
arr((0, 3), (1, 3), [$d_C$], label-pos: left),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), []),
arr((1, 2), (1, 3), []),
arr((1, 3), (1, 4), []),
))
Using the Snake Lemma, if we write the cokernels (and shift up the index by $1$), we get
$
A_n / (d A_(n+1)) -> B_n / (d B_(n+1)) -> C_n / (d C_(n+1)) -> 0
$
is exact, where $d A_(n+1) = IM d$; if we write the kernels, we get
$
0-> Z_(n-1)(A) -> Z_(n-1)(B) -> Z_(n-1)(C)
$
is also exact. Notice that $d A_n subset.eq Z_(n-1)(A)$, so we can use $d$ to connect the rows again:
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyx<KEY>VJ<KEY>
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 1), [$A_n / (d A_(n+1))$]),
node((0, 2), [$B_n / (d B_(n+1))$]),
node((0, 3), [$C_n / (d C_(n+1))$]),
node((0, 4), [$0$]),
node((1, 0), [$0$]),
node((1, 1), [$Z_(n-1)(A)$]),
node((1, 2), [$Z_(n-1)(B)$]),
node((1, 3), [$Z_(n-1)(C)$]),
arr((0, 1), (0, 2), []),
arr((0, 2), (0, 3), []),
arr((0, 3), (0, 4), []),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), []),
arr((1, 2), (1, 3), []),
arr((0, 1), (1, 1), [$d_A$]),
arr((0, 2), (1, 2), [$d_B$]),
arr((0, 3), (1, 3), [$d_C$]),
))
Notice that $ Ker ( A_n / (d A_(n+1)) rgt(d) Z_(n-1) (A)) = H_n\(A) $ and
$
Coker ( A_n / (d A_(n+1)) rgt(d) Z_(n-1) (A)) = H_(n-1) (A)
$
and the other two columns are similar.
By the Snake Lemma again, we have the connecting map:
$
H_n (A) -> H_n (B) -> H_n (C) rgt(diff_n) H_(n-1) (A) -> H_(n-1) (B) -> H_(n-1) (C)
$
// #align(center,image("imgs/2023-11-03-11-53-54.png",width:80%))
Putting all these exact sequences together, we get the desired long exact sequence.
The explicit expression for $diff_n$ follows directly from the Snake Lemma.
// See https://web.northeastern.edu/suciu/MATH7221/les_homology.pdf.
]
#theorem([Naturality of $diff$])[
Given a morphism between short exact sequences of chain complexes, i.e., a commutative diagram
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABgBpiBdUkANwEMAbAVxiRGJAF9T1Nd9CKAIzkqtRizYBBAPoBjAB5ceID<KEY>
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 0), [$0$]),
node((0, 1), [$A_cx$]),
node((0, 2), [$B_cx$]),
node((0, 3), [$C_cx$]),
node((0, 4), [$0$]),
node((1, 0), [$0$]),
node((1, 1), [$A'_cx$]),
node((1, 2), [$B'_cx$]),
node((1, 3), [$C'_cx$]),
node((1, 4), [$0$]),
arr((0, 0), (0, 1), []),
arr((0, 1), (0, 2), [$f$]),
arr((0, 2), (0, 3), [$g$]),
arr((0, 3), (0, 4), []),
arr((0, 1), (1, 1), [$alpha$]),
arr((0, 2), (1, 2), [$beta$]),
arr((0, 3), (1, 3), [$gamma$]),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), [$f'$]),
arr((1, 2), (1, 3), [$g'$]),
arr((1, 3), (1, 4), []),
))
then there is a morphism between long exact sequence, i.e., a commutative diagram
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyx<KEY>VJ<KEY>
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 1), [$H_n (A)$]),
node((0, 2), [$H_n (B)$]),
node((0, 3), [$H_n (C)$]),
node((0, 4), [$H_(n-1) (A)$]),
node((1, 1), [$H_n (A')$]),
node((1, 2), [$H_n (B')$]),
node((1, 3), [$H_n (C')$]),
node((1, 4), [$H_(n-1) (A')$]),
node((0, 0), [$...$]),
node((0, 5), [$...$]),
node((1, 0), [$...$]),
node((1, 5), [$...$]),
arr((0, 0), (0, 1), []),
arr((0, 1), (0, 2), [$f_ast$]),
arr((0, 2), (0, 3), [$g_ast$]),
arr((0, 3), (0, 4), [$diff$]),
arr((0, 4), (0, 5), []),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), [$f'_ast$]),
arr((1, 2), (1, 3), [$g'_ast$]),
arr((1, 3), (1, 4), [$diff'$]),
arr((1, 4), (1, 5), []),
arr((0, 1), (1, 1), [$alpha_ast$]),
arr((0, 2), (1, 2), [$beta_ast$]),
arr((0, 3), (1, 3), [$gamma_ast$]),
arr((0, 4), (1, 4), [$alpha_ast$]),
))
]
#proof[@rotman[Theorem 6.13].
Since $H_n$ is a functor, the leftmost two squares commute. Take $[c] in H_n (C)$ for some $c in Z_n (C)$, we need to show that $alpha_ast diff ([c]) = diff' gamma_ast ([c])$.
Let $b in B_n$ be a lifting of $c$, i.e., $g(b) = c$. Then $diff([c]) = [a]$, where $f(a) = d_B (b)$. Therefore, $alpha_ast diff([c]) = [alpha (a)]$.
On the other hand, since $gamma$ is a chain map, we have $g' beta (b)= gamma g (b) = gamma (c)$. We see that $b' := beta(b) in B'_n$ is a lifting of $c'$ because $g'(b') = g'(beta(b)) = gamma(g(b)) = gamma(c) = c'$. Hence $diff' gamma_ast ([c]) = diff' ([gamma(c)]) = [a']$, where $f'(a') = d_(B') (b') = d_(B') (beta (b))$.
But
$
f'(alpha(a)) = beta(f(a)) = beta(d_B (b)) = d_(B') (beta(b)) = f'(a')
$
and $f'$ is injective, so $alpha(a) = a'$.
]
#corollary[Let $cA$ be an abelian category.
Then homology induces a functor from the category of #sess of chain complexes in $cA$ to the category of #less in $cA$.
]
== Resolutions
#definition[
Let $cA$ be an abelian category. Let $M$ be an object of $cA$. A *left resolution* of $M$ is a complex $P_cx$, where $P_i = 0$ for negative $i$, with morphism $epsilon : P_0 -> M$ such that
$ ... -> P_2 rgt(d) P_1 rgt(d) P_0 rgt(epsilon) M -> 0 $
is exact.
If each $P_i$ is projective, then we call it a *projective resolution*.
If $cA$ is $RMod$ or $ModR$ and each $P_i$ is a free module, then we call it a *free resolution*.
In the same way, we define *right resolutions* and *injective resolutions*, only reversing all the arrows.
]
#proposition[
$P_cx -> M$ is a resolution if and only if the following chain map $f: P_cx -> M[0]$
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZABg<KEY>
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 0), [$...$]),
node((0, 1), [$P_2$]),
node((0, 2), [$P_1$]),
node((0, 3), [$P_0$]),
node((0, 4), [$0$]),
node((1, 4), [$0$]),
node((1, 3), [$M$]),
node((1, 2), [$0$]),
node((1, 1), [$0$]),
node((1, 0), [$...$]),
arr((0, 0), (0, 1), [$d$]),
arr((0, 1), (0, 2), [$d$]),
arr((0, 2), (0, 3), [$d$]),
arr((0, 3), (0, 4), []),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), []),
arr((1, 2), (1, 3), []),
arr((1, 3), (1, 4), []),
arr((0, 1), (1, 1), [$0$]),
arr((0, 2), (1, 2), [$0$]),
arr((0, 3), (1, 3), [$epsilon$]),
arr((0, 0), (1, 0), [$...$]),
))
is a quasi-isomorphism.
]
<resolution-qi>
#proof[
By definition, $P_cx$ is a resolution if and only if
1. $P_cx$ is exact at $P_n$ for $n>=1$ and
2. $M = Coker(P_1 rgt(d) P_0)$.
On the other hand, $f$ is quasi-isomorphism if and only if
3. $H_n (P) iso H_n\(M[0]) iso 0$ for $n>=1$ and
4. $ H_0(P) iso H_0(M[0]) iso M$.
(1) is obviously equivalent to (3). (4) is equivalent to $M iso P_0 over IM(d) = Coker(P_1 rgt(d) P_0)$ and thus equivalent to (2).
]
// (Some more remark...?)
By finding a resolution of a potentially "complicated" object $M$, we can work with a chain complex of "simple" objects, e.g. projective or injective objects.
#lemma[
If $cA$ has enough projectives, then every object has a projective resolution.
Dually, if $cA$ has enough injectives, then every object has an injective resolution.
]
<enough-resolution>
#proof[@notes[Lemma 5.20].
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZAdgBoAmAXVJADcBDAGwFcYkQBZEAX1PU1z5CKABwVqdJq3YAGHnxAZseAkQBs4mgxZtEIAAoB9Ob37KhRACybJO9kYCM8s4NUoArKQDME7dL0cxs6<KEY>
#align(center, commutative-diagram(
node-padding: (40pt, 40pt),
node((2, 7), [$M$]),
node((2, 8), [$0$]),
node((2, 6), [$P_0$]),
node((2, 4), [$P_1$]),
node((3, 5), [$M_0$]),
node((4, 6), [$0$]),
node((4, 4), [$0$]),
node((1, 3), [$M_1$]),
node((0, 2), [$0$]),
node((2, 2), [$P_2$]),
node((0, 4), [$0$]),
node((3, 1), [$M_2$]),
node((4, 0), [$0$]),
node((2, 1), [$...$]),
arr((3, 5), (2, 6), [$i_0$], label-pos: -1em),
arr((2, 4), (3, 5), [$epsilon_1$]),
arr((3, 5), (4, 6), []),
arr((2, 4), (2, 6), [$d_1$]),
arr((2, 6), (2, 7), [$epsilon_0$]),
arr((2, 7), (2, 8), []),
arr((4, 4), (3, 5), []),
arr((1, 3), (2, 4), [$i_1$]),
arr((0, 2), (1, 3), []),
arr((2, 2), (1, 3), [$epsilon_2$], label-pos: 1.5em),
arr((2, 2), (2, 4), [$d_2$]),
arr((1, 3), (0, 4), []),
arr((3, 1), (2, 2), [$i_2$], label-pos: -1em),
arr((4, 0), (3, 1), []),
arr((2, 1), (2, 2), []),
))
Let $M in cA$.
By definition of having enough projectives, let $epsilon_0: P_0 -> M$ be an epimorphism where $P_0$ is projective.
Let $M_0 := Ker epsilon_0$, and we have short exact sequence
$
0 -> M_0 -> P_0 -> M -> 0.
$
Now we can let $epsilon_1: P_1 -> M_0$ be an epimorphism and $M_1 := Ker epsilon_1$, obtaining the short exact sequence
$
ses(M_1, P_1, M_0).
$
We define $d_1 = i_0 epsilon_1 : P_1 -> P_0$ and then
$
d_1(P_1) = M_0 = Ker epsilon_0.
$
Thus the chain in exact at $P_0$. The procedure above can be then iterated for any $n >= 1$ and the resultant chain is infinitely long.
// Set $d_0 = epsilon_0$.
// Suppose we now have monomorphism $i_(n-1) : M_(n-1) -> P_(n-1)$ and $d_(n-1) : P_(n-1) -> P_(n-2)$
// By induction, givenlet $epsilon_n: P_n -> M_(n-1)$ be an epimorphism, where $P_n$ is projective, and let $M_n = ker epsilon_n$. Thus we have
// $ 0 -> M_n -> P_n -> M_(n-1) -> 0 $
// Define $d_n = i_(n-1) epsilon_n$, which is the composite $P_n -> M_(n-1) -> P_(n-1)$. The image of $d_n$ is $ d_(n) (P_n) = M_(n-1) = ker d_(n-1) $ and hence exact.
// (TODO A very nice commutative diagram!!)
]
// (Some remarks...)
// In the case of $RMod$, we can work with free resolutions instead of just projective ones.
#theorem("Comparison Theorem")[ In an abelian category $cA$, let $f': M->N$. Consider the commutative diagram, where the rows are chain complexes:
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZAFgBoAGAXVJADcBDAGwFcYkQBZEAX1PU1z5CKMgEZqdJq3YA5HnxAZseAkQCsFCQxZtEIcvP7Kh60uJrbpeg7yODVKAMyaLU3SAAKAfRsKl94WQAJhdJHXZvUUNFARVA0VDLd28g6P84omdzMKsQAEUfNNiTFBDspPYCqNsY4wdkBPK3Sq9UmvSS5HJE5r0iusDupvC+7gkYKABzeCJQADMAJwgAWyQANhocCCQNHPcoaMWVnc3txDI99gOao9Xz06Ruy70YNGxGVRulu6etpCCvsdEAkQH9EI5AXcAOwPYGuEYgGA4eiHb5IAAcsJhzxAUAA5KigQBOWGYnH4wl3US-M5rSFIUQgsFE+mIDags4knFzVqUk4cjHw3I86oKW5IC5g7EVPQ83zzNGIGkMoXuOYEsbcIA
#align(center, commutative-diagram(
node-padding: (50pt, 50pt),
node((0, 4), [$M$]),
node((1, 4), [$N$]),
node((0, 5), [$0$]),
node((1, 5), [$0$]),
node((0, 3), [$P_0$]),
node((0, 2), [$P_1$]),
node((0, 1), [$P_2$]),
node((1, 3), [$Q_0$]),
node((1, 2), [$Q_1$]),
node((1, 1), [$Q_2$]),
node((0, 0), []),
node((1, 0), []),
arr((0, 1), (0, 2), [$d$]),
arr((0, 2), (0, 3), [$d$]),
arr((0, 3), (0, 4), [$epsilon$]),
arr((0, 4), (0, 5), []),
arr((1, 4), (1, 5), []),
arr((1, 3), (1, 4), [$eta$]),
arr((1, 2), (1, 3), [$d'$]),
arr((1, 1), (1, 2), [$d'$]),
arr((0, 0), (0, 1), []),
arr((1, 0), (1, 1), []),
arr((0, 1), (1, 1), [$f_2$], "dashed"),
arr((0, 2), (1, 2), [$f_1$], "dashed"),
arr((0, 3), (1, 3), [$f_0$], "dashed"),
arr((0, 4), (1, 4), [$f'$]),
))
Assume that $P_n$ is projective for all $n >= 0$ and that $eta: Q_cx -> N$ is a resolution (i.e., the bottom row is exact), then there is a chain map $f_cx: P_cx -> Q_cx$ lifting $f'$ (i.e., $f_cx$ makes the above diagram commutative).
// i.e. $ eta oo f_0 = f' oo epsilon $
Further, $f_cx$ is unique up to a chain homotopy equivalence.
]
<comparison>
#proof[@weibel[Comparison Theorem 2.26], @rotman[Theorem 6.16]. Set $f_(-1) = f'$.
By induction, suppose that $f_n$ has been constructed.
Note that for any $a in P_(n+1)$, we have
$
d'_n oo f_n oo d_(n+1) (a) = f_(n-1) oo d_n oo d_(n+1) (a) = 0,
$
therefore $f_n oo d_(n+1) : P_(n+1) -> Q_(n)$ lands in $Z_n (Q)$. On the other hand, due to the exactness of $Q_cx$, the map $d'_(n+1)
: Q_(n+1) -> Z_n (Q)$ is an epimorphism. So we have the following:
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZARgBoAGAXVJADcBDAGwFcYkQAFAfQAowBqYgEoQAX1LpMufIRRli1Ok1bsAWlzAACHgEUR4ydjwEiAJlIKaDFm0QhyYiSAxGZRchcXWVdnbwHCYoowUADm8ESgAGYAThAAtkhkIDgQSKYGILEJSB4paYgAzDSMWGC2IFD0cAAWISBWyhUwAB5YcDgImdmJRTSpSY027FCO0XG9eQOIyd4VURqaEBCaUP6C+pSiQA
#align(center, commutative-diagram(
node-padding: (60pt, 50pt),
node((0, 1), [$P_(n+1)$]),
node((1, 1), [$Z_n (Q)$]),
node((1, 2), [$0$]),
node((1, 0), [$Q_(n+1)$]),
arr((1, 1), (1, 2), []),
arr((0, 1), (1, 0), [$f_(n+1)$], label-pos: right, "dashed"),
arr((1, 0), (1, 1), [$d'_(n+1)$]),
arr((0, 1), (1, 1), [$f_n oo d_(n+1)$]),
))
where since $P_(n+1)$ is an projective object,
the morphism $f_(n+1) : P_(n+1) -> Q_(n+1)$ exists such that the diagram commutes, i.e. $d'_(n+1) oo f_(n+1) = f_n oo d_(n+1)$.
For the uniqueness, let $h: P_cx -> Q_cx$ be another chain map lifting $f'$. We want to construct homotopy $s$ with terms $s_n: P_n -> Q_(n+1)$ such that
$ h_n - f_n = d'_(n+1) s_n + s_(n-1) d_n $
for all $n >= -1$.
For the base case, set $f_(-1) = h_(-1) = f'$, $d_0 = epsilon, d_(-1) = 0, d'_0 = eta, d_(-1) = 0$. We construct $s_(-2) = s_(-1) = 0$, and the claim is trivially true for $n = -1$.
For the induction step, assume we have constructed $s_i$ for $i <= n$,
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZAJgBoAGAXVJADcBDAGwFcYkQAFAfQAowBqAIwBKEAF9S6TLnyEUgitTpNW7bn37<KEY>
#align(center, commutative-diagram(
node((0, 2), [$P_(n+1)$]),
node((0, 1), [$P_(n+2)$]),
node((0, 3), [$P_n$]),
node((0, 4), [$P_(n-1)$]),
node((1, 1), [$Q_(n+2)$]),
node((1, 2), [$Q_(n+1)$]),
node((1, 3), [$Q_(n)$]),
node((1, 4), [$Q_(n-1)$]),
node((0, 0), []),
node((1, 0), []),
node((0, 5), []),
node((1, 5), []),
arr((1, 1), (1, 2), [$d'_(n+2)$]),
arr((1, 2), (1, 3), [$d'_(n+1)$]),
arr((1, 3), (1, 4), [$d'_(n)$]),
arr((0, 1), (0, 2), [$d_(n+2)$]),
arr((0, 2), (0, 3), [$d_(n+1)$]),
arr((0, 3), (0, 4), [$d_(n)$]),
arr((0, 2), (1, 2), [$h_(n+1) - f_(n+1)$], label-pos: 0),
arr((0, 3), (1, 3), [$h_(n) - f_(n)$], label-pos: 0),
arr((0, 4), (1, 4), [$h_(n-1) - f_(n-1)$], label-pos: 0),
arr((0, 1), (1, 1), [$h_(n+2) - f_(n+2)$], label-pos: 0),
arr((0, 0), (0, 1), []),
arr((1, 0), (1, 1), []),
arr((0, 4), (0, 5), []),
arr((1, 4), (1, 5), []),
arr((0, 3), (1, 2), [$s_n$], label-pos: 0, "dashed"),
arr((0, 4), (1, 3), [$s_(n-1)$], label-pos: 0, "dashed"),
arr((0, 2), (1, 1), [$s_(n+1)$], label-pos: 0, "dashed"),
))
(Again, only the solid lines commute.)
We want to show the existence of $s_(n+1)$ which satisfies
$ d'_(n+2) s_(n+1) = h_(n+1) - f_(n+1) - s_n d_(n+1). $
We claim that $(h_(n+1) - f_(n+1) - s_n d_(n+1))$ sends $P_(n+1)$ to $Z_(n+1) (Q)$. First, notice that this claim would indicate the existence of $s_(n+1)$, as we would have
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZARgBoAGAXVJADcBDAGwFcYkQAFAfQAowBqYgEoQAX1LpMufIRRli1Ok1bsAWrwHCABDwCKI8ZOx4CRcqQU0GLNohC6N-AEwGJIDMZlEnFxdZV25GKKMFAA5vBEo<KEY>ZI<KEY>Hz<KEY>gj-nl<KEY>Zs7WlVgWlCbtYwNTS2epnaMMNE4PXP9K4PpiADMopSiQA
#align(center, commutative-diagram(
node-padding: (60pt, 50pt),
node((0, 1), [$P_(n+1)$]),
node((1, 1), [$Z_(n+1) (Q)$]),
node((1, 0), [$Q_(n+2)$]),
node((1, 2), [$0$]),
arr((0, 1), (1, 0), [$s_(n+1)$], label-pos: 0, "dashed"),
arr((1, 0), (1, 1), [$d'_(n+2)$]),
arr((0, 1), (1, 1), [$h_(n+1) - f_(n+1) - s_n d_(n+1)$], label-pos: left),
arr((1, 1), (1, 2), []),
))
where $P_(n+1)$ is projective and $d'_(n+2) : Q_(n+2) -> Z_(n+1) (Q)$ is an epimorphism.
Now $
d'_(n+1) (h_(n+1) - f_(n+1) - s_n d_(n+1)) &= d'_(n+1) (h_(n+1) - f_(n+1)) - d'_(n+1) s_n d_(n+1) \
&= d'_(n+1) (h_(n+1) - f_(n+1)) - (h_n - f_n - s_(n-1) d_n) d_(n+1)
\ &= d'_(n+1) (h_(n+1) - f_(n+1)) - (h_n - f_n) d_(n+1)
\ &= 0.
$
Hence $(h_(n+1) - f_(n+1) - s_n d_(n+1))$ sends $P_(n+1)$ to $Z_(n+1) (Q)$.
// The uniqueness is an exercise.
]
#lemma("Horseshoe Lemma")[Suppose we have a commutative diagram
// #align(center,image("../imgs/2023-11-04-13-51-57.png",width:50%))
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZARgBpiBdUkANwEMAbAVxiRAAUByAfQCYQAvqXSZc+Qil7kqtRizZduxQcJAZseAkQDM06vWatEHHgAYVIjeKIAWPbMNsAgpwtrRmicju8ZB+cZObupiWih22n5yRiAurkKWoV52plGOxuYJ7lZh3qQ2aQEgmaohnjqkkfrRCpxmwR7WkpWFMVw8ylllTSQt1ekmPPxdjbmm9v4xAHQzDTle41UORTNTc0l<KEY>
#align(center, commutative-diagram(
node-padding: (40pt, 40pt),
node((1, 1), [$P'_2$]),
node((1, 2), [$P'_1$]),
node((1, 3), [$P'_0$]),
node((1, 4), [$A'$]),
node((2, 4), [$A$]),
node((3, 4), [$A''$]),
node((0, 4), [$0$]),
node((4, 4), [$0$]),
node((3, 3), [$P''_0$]),
node((3, 2), [$P''_1$]),
node((3, 1), [$P''_2$]),
node((1, 0), [$...$]),
node((3, 0), [$...$]),
node((1, 5), [$0$]),
node((3, 5), [$0$]),
arr((1, 1), (1, 2), []),
arr((1, 2), (1, 3), []),
arr((1, 3), (1, 4), [$epsilon'$]),
arr((1, 0), (1, 1), []),
arr((3, 0), (3, 1), []),
arr((3, 1), (3, 2), []),
arr((3, 2), (3, 3), []),
arr((3, 3), (3, 4), [$epsilon''$]),
arr((0, 4), (1, 4), []),
arr((1, 4), (2, 4), [$i_A$]),
arr((2, 4), (3, 4), [$pi_A$]),
arr((3, 4), (4, 4), []),
arr((1, 4), (1, 5), []),
arr((3, 4), (3, 5), []),
))
where the
column is exact and the rows are projective resolutions. Set $P_n eq$
$P_n^prime xor P_n^(prime prime)$. Then the $P_n$ assemble to form a
projective resolution $P$ of $A$, and the right-hand column lifts to an
exact sequence of complexes
$ 0 arrow.r P'_cx arrow.r^(i_cx) P_cx arrow.r^(pi_cx) P''_cx arrow.r 0 comma $
where $i_n colon P_n^prime arrow.r P_n$ and
$pi_n colon P_n arrow.r P_n^(prime prime)$ are the natural inclusion and
projection, respectively.
// Suppose $ses(A', A, A'')$ is a #sest, and $P'_cx rgt(epsilon') A'$ and $P''_cx rgt(epsilon'') A''$ are projective resolutions. Then there exists a projective resolution $P rgt(epsilon) A$ such that $P_n = P'_n ds P''_n$ such that
// $
// 0 -> P' rgt(i) P rgt(pi) P'' -> 0
// $
// is a #sest of complexes where $i$ is the canonical inclusion (mono) and $pi$ is the canonical proj.
]
<horseshoe>
// (Some remark...)
#proof[@weibel[Horseshoe Lemma 2.2.8].
Since $P''_0$ is projective and $pi_A : A -> A''$ is an epimorphism, we can lift $epsilon^(prime prime) : P''_0 -> A''$ to a map
$tilde(epsilon^(prime prime)) : P_0^(prime prime) arrow.r A$. The direct sum of $tilde(epsilon^(prime prime))$ and
$i_A epsilon^prime colon P_0^prime arrow.r A$ gives a map
$epsilon colon P_0 arrow.r A$. Then the diagram below
commutes:
// #align(center,image("../imgs/2023-11-04-13-59-23.png",width:80%))
// https://t.yw.je/#<KEY>LW<KEY>bff7k-riEH-SX<KEY>BIgA
#align(center, commutative-diagram(
node-padding: (40pt, 40pt),
node((1, 1), [$Ker(epsilon')$]),
node((2, 1), [$Ker(epsilon)$]),
node((3, 1), [$Ker(epsilon'')$]),
node((1, 2), [$P'_0$]),
node((2, 2), [$P_0$]),
node((3, 2), [$P''_0$]),
node((1, 3), [$A'$]),
node((2, 3), [$A$]),
node((3, 3), [$A''$]),
node((1, 0), [$0$]),
node((1, 4), [$0$]),
node((2, 0), [$0$]),
node((2, 4), [$0$]),
node((3, 0), [$0$]),
node((3, 4), [$0$]),
node((0, 1), [$0$]),
node((4, 1), [$0$]),
node((0, 2), [$0$]),
node((4, 2), [$0$]),
node((0, 3), [$0$]),
node((4, 3), [$0$]),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), []),
arr((1, 2), (1, 3), [$epsilon'$]),
arr((1, 3), (1, 4), []),
arr((2, 0), (2, 1), []),
arr((2, 1), (2, 2), []),
arr((2, 2), (2, 3), [$epsilon$]),
arr((2, 3), (2, 4), []),
arr((3, 0), (3, 1), []),
arr((3, 1), (3, 2), []),
arr((3, 2), (3, 3), [$epsilon''$]),
arr((3, 3), (3, 4), []),
arr((0, 1), (1, 1), []),
arr((1, 1), (2, 1), []),
arr((2, 1), (3, 1), []),
arr((3, 1), (4, 1), []),
arr((0, 2), (1, 2), []),
arr((1, 2), (2, 2), []),
arr((2, 2), (3, 2), []),
arr((3, 2), (4, 2), []),
arr((2, 3), (3, 3), []),
arr((1, 3), (2, 3), []),
arr((0, 3), (1, 3), []),
arr((3, 3), (4, 3), []),
))
where the right two columns are short exact sequences, and
the @snake[Snake Lemma] shows that the left column is exact and that
$"Coker"lr((epsilon)) eq 0$, so that $P_0$ maps onto $A$. This
finishes the initial step and brings us to the situation
// #align(center,image("../imgs/2023-11-04-13-56-51.png",width:40%))
// https://t.yw.je/#N4Igdg9gJgpgziAXAbVABwnAlgFyxMJZAJgBoAGAXVJADcBDAGwFcYkRyQBfU9TXfIRRkAjNTpNW7ANIwATgAoYabIwIByAJTdeIDNjwEiZYuIYs2iELMXLVBbTz4HBx0gGYzky9flKVWGpg6lo6zgJGKCKkYjTmUlYACuoA+iJhevyGQsjRnnHe7Mmp6U6ZLpHI5DFeFuwAdI0Z+hE57jUFdVacZS3ZRNX5El0gjfXNWa7CpAAstQkcExVtHvM+PeIwUADm8ESgAGZyEAC2SABsNDgQSDNlR6e3VzeI0cMLUOoZD2evz0gAdnux1+1RA1yQImBjz+4JexGhvzIcKQ7kRSAAHP9EABWdG47Htd4+T5ffFEiGIACc5OxInIXEoXCAA
#align(center, commutative-diagram(
node-padding: (40pt, 40pt),
node((0, 2), [$0$]),
node((1, 2), [$Ker(epsilon')$]),
node((2, 2), [$Ker(epsilon)$]),
node((3, 2), [$Ker(epsilon'')$]),
node((1, 1), [$P'_1$]),
node((3, 1), [$P''_1$]),
node((1, 0), [$...$]),
node((1, 3), [$0$]),
node((3, 0), [$...$]),
node((4, 2), [$0$]),
node((3, 3), [$0$]),
arr((1, 0), (1, 1), []),
arr((1, 1), (1, 2), [$d'$]),
arr((1, 2), (1, 3), []),
arr((0, 2), (1, 2), []),
arr((1, 2), (2, 2), []),
arr((2, 2), (3, 2), []),
arr((3, 0), (3, 1), []),
arr((3, 1), (3, 2), [$d''$]),
arr((3, 2), (4, 2), []),
arr((3, 2), (3, 3), []),
))
The filling in of the "horseshoe" now proceeds by induction.
]
#endlec(8) |
|
https://github.com/sjedev/typst-notetaking-template | https://raw.githubusercontent.com/sjedev/typst-notetaking-template/main/example.typ | typst | The Unlicense | #import "template.typ": *
#show: doc => conf(
[Philosophy], // Subject
[*iv ii i*], // Locator
doc,
)
#align(left, text(18pt)[
====== Metaphysics of mind
])
#align(left, text(18pt)[
*Substance dualism*
])
#lorem(60)
#lorem(70)
= This is a title
#lorem(65)
$A+B->C$
== This is a second-level title
#lorem(60)
#lorem(70)
#lorem(65)
#lorem(60)
#lorem(70)
#lorem(65)
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/unichar/0.1.0/ucd/block-FB50.typ | typst | Apache License 2.0 | #let data = (
("ARABIC LETTER ALEF WASLA ISOLATED FORM", "Lo", 0),
("ARABIC LETTER ALEF WASLA FINAL FORM", "Lo", 0),
("ARABIC LETTER BEEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER BEEH FINAL FORM", "Lo", 0),
("ARABIC LETTER BEEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER BEEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER PEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER PEH FINAL FORM", "Lo", 0),
("ARABIC LETTER PEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER PEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER BEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER BEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER BEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER BEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER TTEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER TTEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER TTEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER TTEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER TEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER TEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER TEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER TEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER TTEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER TTEH FINAL FORM", "Lo", 0),
("ARABIC LETTER TTEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER TTEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER VEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER VEH FINAL FORM", "Lo", 0),
("ARABIC LETTER VEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER VEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER PEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER PEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER PEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER PEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER DYEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER DYEH FINAL FORM", "Lo", 0),
("ARABIC LETTER DYEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER DYEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER NYEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER NYEH FINAL FORM", "Lo", 0),
("ARABIC LETTER NYEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER NYEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER TCHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER TCHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER TCHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER TCHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER TCHEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER TCHEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER TCHEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER TCHEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER DDAHAL ISOLATED FORM", "Lo", 0),
("ARABIC LETTER DDAHAL FINAL FORM", "Lo", 0),
("ARABIC LETTER DAHAL ISOLATED FORM", "Lo", 0),
("ARABIC LETTER DAHAL FINAL FORM", "Lo", 0),
("ARABIC LETTER DUL ISOLATED FORM", "Lo", 0),
("ARABIC LETTER DUL FINAL FORM", "Lo", 0),
("ARABIC LETTER DDAL ISOLATED FORM", "Lo", 0),
("ARABIC LETTER DDAL FINAL FORM", "Lo", 0),
("ARABIC LETTER JEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER JEH FINAL FORM", "Lo", 0),
("ARABIC LETTER RREH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER RREH FINAL FORM", "Lo", 0),
("ARABIC LETTER KEHEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER KEHEH FINAL FORM", "Lo", 0),
("ARABIC LETTER KEHEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER KEHEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER GAF ISOLATED FORM", "Lo", 0),
("ARABIC LETTER GAF FINAL FORM", "Lo", 0),
("ARABIC LETTER GAF INITIAL FORM", "Lo", 0),
("ARABIC LETTER GAF MEDIAL FORM", "Lo", 0),
("ARABIC LETTER GUEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER GUEH FINAL FORM", "Lo", 0),
("ARABIC LETTER GUEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER GUEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER NGOEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER NGOEH FINAL FORM", "Lo", 0),
("ARABIC LETTER NGOEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER NGOEH MEDIAL FORM", "Lo", 0),
("ARABIC LETTER NOON GHUNNA ISOLATED FORM", "Lo", 0),
("ARABIC LETTER NOON GHUNNA FINAL FORM", "Lo", 0),
("ARABIC LETTER RNOON ISOLATED FORM", "Lo", 0),
("ARABIC LETTER RNOON FINAL FORM", "Lo", 0),
("ARABIC LETTER RNOON INITIAL FORM", "Lo", 0),
("ARABIC LETTER RNOON MEDIAL FORM", "Lo", 0),
("ARABIC LETTER HEH WITH YEH ABOVE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER HEH WITH YEH ABOVE FINAL FORM", "Lo", 0),
("ARABIC LETTER HEH GOAL ISOLATED FORM", "Lo", 0),
("ARABIC LETTER HEH GOAL FINAL FORM", "Lo", 0),
("ARABIC LETTER HEH GOAL INITIAL FORM", "Lo", 0),
("ARABIC LETTER HEH GOAL MEDIAL FORM", "Lo", 0),
("ARABIC LETTER HEH DOACHASHMEE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER HEH DOACHASHMEE FINAL FORM", "Lo", 0),
("ARABIC LETTER HEH DOACHASHMEE INITIAL FORM", "Lo", 0),
("ARABIC LETTER HEH DOACHASHMEE MEDIAL FORM", "Lo", 0),
("ARABIC LETTER YEH BARREE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER YEH BARREE FINAL FORM", "Lo", 0),
("ARABIC LETTER YEH BARREE WITH HAMZA ABOVE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER YEH BARREE WITH HAMZA ABOVE FINAL FORM", "Lo", 0),
("ARABIC SYMBOL DOT ABOVE", "Sk", 0),
("ARABIC SYMBOL DOT BELOW", "Sk", 0),
("ARABIC SYMBOL TWO DOTS ABOVE", "Sk", 0),
("ARABIC SYMBOL TWO DOTS BELOW", "Sk", 0),
("ARABIC SYMBOL THREE DOTS ABOVE", "Sk", 0),
("ARABIC SYMBOL THREE DOTS BELOW", "Sk", 0),
("ARABIC SYMBOL THREE DOTS POINTING DOWNWARDS ABOVE", "Sk", 0),
("ARABIC SYMBOL THREE DOTS POINTING DOWNWARDS BELOW", "Sk", 0),
("ARABIC SYMBOL FOUR DOTS ABOVE", "Sk", 0),
("ARABIC SYMBOL FOUR DOTS BELOW", "Sk", 0),
("ARABIC SYMBOL DOUBLE VERTICAL BAR BELOW", "Sk", 0),
("ARABIC SYMBOL TWO DOTS VERTICALLY ABOVE", "Sk", 0),
("ARABIC SYMBOL TWO DOTS VERTICALLY BELOW", "Sk", 0),
("ARABIC SYMBOL RING", "Sk", 0),
("ARABIC SYMBOL SMALL TAH ABOVE", "Sk", 0),
("ARABIC SYMBOL SMALL TAH BELOW", "Sk", 0),
("ARABIC SYMBOL WASLA ABOVE", "Sk", 0),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
("ARABIC LETTER NG ISOLATED FORM", "Lo", 0),
("ARABIC LETTER NG FINAL FORM", "Lo", 0),
("ARABIC LETTER NG INITIAL FORM", "Lo", 0),
("ARABIC LETTER NG MEDIAL FORM", "Lo", 0),
("ARABIC LETTER U ISOLATED FORM", "Lo", 0),
("ARABIC LETTER U FINAL FORM", "Lo", 0),
("ARABIC LETTER OE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER OE FINAL FORM", "Lo", 0),
("ARABIC LETTER YU ISOLATED FORM", "Lo", 0),
("ARABIC LETTER YU FINAL FORM", "Lo", 0),
("ARABIC LETTER U WITH HAMZA ABOVE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER VE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER VE FINAL FORM", "Lo", 0),
("ARABIC LETTER KIRGHIZ OE ISOLATED FORM", "Lo", 0),
("ARABIC LETTER KIRGHIZ OE FINAL FORM", "Lo", 0),
("ARABIC LETTER KIRGHIZ YU ISOLATED FORM", "Lo", 0),
("ARABIC LETTER KIRGHIZ YU FINAL FORM", "Lo", 0),
("ARABIC LETTER E ISOLATED FORM", "Lo", 0),
("ARABIC LETTER E FINAL FORM", "Lo", 0),
("ARABIC LETTER E INITIAL FORM", "Lo", 0),
("ARABIC LETTER E MEDIAL FORM", "Lo", 0),
("ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA INITIAL FORM", "Lo", 0),
("ARABIC LETTER UIGHUR KAZAKH KIRGHIZ ALEF MAKSURA MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH AE FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH WAW FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH U FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH OE FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YU FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH E INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE UIGHUR KIRGHIZ YEH WITH HAMZA ABOVE WITH ALEF MAKSURA INITIAL FORM", "Lo", 0),
("ARABIC LETTER FARSI YEH ISOLATED FORM", "Lo", 0),
("ARABIC LETTER FARSI YEH FINAL FORM", "Lo", 0),
("ARABIC LETTER FARSI YEH INITIAL FORM", "Lo", 0),
("ARABIC LETTER FARSI YEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE ZAH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH LAM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE THAL WITH SUPERSCRIPT ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE REH WITH SUPERSCRIPT ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH DAMMATAN ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH KASRATAN ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH FATHA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH DAMMA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH KASRA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH SUPERSCRIPT ALEF ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH ALEF FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH LAM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH ALEF FINAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE ALEF MAKSURA WITH SUPERSCRIPT ALEF FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH ZAIN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH NOON FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE ZAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH LAM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH SUPERSCRIPT ALEF INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAMZA ABOVE WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE THEH WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH LAM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HEH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH FATHA MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH DAMMA MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHADDA WITH KASRA MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH ALEF MAKSURA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH YEH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH JEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH KHAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH REH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH REH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH REH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH REH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KHAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH JEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH KHAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH REH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HEH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH JEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HAH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH KHAH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH JEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH KHAH MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE ZAH WITH MEEM MEDIAL FORM", "Lo", 0),
("ARABIC LIGATURE ALEF WITH FATHATAN FINAL FORM", "Lo", 0),
("ARABIC LIGATURE ALEF WITH FATHATAN ISOLATED FORM", "Lo", 0),
("ORNATE LEFT PARENTHESIS", "Pe", 0),
("ORNATE RIGHT PARENTHESIS", "Ps", 0),
("ARABIC LIGATURE RAHIMAHU ALLAAH", "So", 0),
("ARABIC LIGATURE RADI ALLAAHU ANH", "So", 0),
("ARABIC LIGATURE RADI ALLAAHU ANHAA", "So", 0),
("ARABIC LIGATURE RADI ALLAAHU ANHUM", "So", 0),
("ARABIC LIGATURE RADI ALLAAHU ANHUMAA", "So", 0),
("ARABIC LIGATURE RADI ALLAAHU ANHUNNA", "So", 0),
("ARABIC LIGATURE SALLALLAAHU ALAYHI WA-AALIH", "So", 0),
("ARABIC LIGATURE ALAYHI AS-SALAAM", "So", 0),
("ARABIC LIGATURE ALAYHIM AS-SALAAM", "So", 0),
("ARABIC LIGATURE ALAYHIMAA AS-SALAAM", "So", 0),
("ARABIC LIGATURE ALAYHI AS-SALAATU WAS-SALAAM", "So", 0),
("ARABIC LIGATURE QUDDISA SIRRAH", "So", 0),
("ARABIC LIGATURE SALLALLAHU ALAYHI WAAALIHEE WA-SALLAM", "So", 0),
("ARABIC LIGATURE ALAYHAA AS-SALAAM", "So", 0),
("ARABIC LIGATURE TABAARAKA WA-TAAALAA", "So", 0),
("ARABIC LIGATURE RAHIMAHUM ALLAAH", "So", 0),
("ARABIC LIGATURE TEH WITH JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HAH WITH JEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH KHAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH HAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH JEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH JEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH HAH WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH HAH WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH HAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH KHAH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH KHAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE TAH WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH JEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE GHAIN WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH KHAH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH KHAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM WITH JEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH KHAH WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH KHAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH HAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH JEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH KHAH WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH KHAH WITH MEEM INITIAL FORM", "Lo", 0),
(),
(),
("ARABIC LIGATURE MEEM WITH JEEM WITH KHAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH MEEM WITH JEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE HEH WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH KHAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH JEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH KHAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH KHAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE TEH WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH HAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH MEEM WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH KHAH WITH ALEF MAKSURA FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE SHEEN WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE DAD WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE YEH WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE QAF WITH MEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH HAH WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH HAH INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH KHAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE LAM WITH JEEM WITH MEEM FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH HAH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE JEEM WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE HAH WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE MEEM WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE FEH WITH MEEM WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE BEH WITH HAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE KAF WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE AIN WITH JEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SAD WITH MEEM WITH MEEM INITIAL FORM", "Lo", 0),
("ARABIC LIGATURE SEEN WITH KHAH WITH YEH FINAL FORM", "Lo", 0),
("ARABIC LIGATURE NOON WITH JEEM WITH YEH FINAL FORM", "Lo", 0),
(),
(),
(),
(),
(),
(),
(),
("ARABIC LIGATURE SALAAMUHU ALAYNAA", "So", 0),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
(),
("ARABIC LIGATURE SALLA USED AS KORANIC STOP SIGN ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE QALA USED AS KORANIC STOP SIGN ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE ALLAH ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE AKBAR ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE MOHAMMAD ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SALAM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE RASOUL ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE ALAYHE ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE WASALLAM ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SALLA ISOLATED FORM", "Lo", 0),
("ARABIC LIGATURE SALLALLAHOU ALAYHE WASALLAM", "Lo", 0),
("ARABIC LIGATURE JALLAJALALOUHOU", "Lo", 0),
("RIAL SIGN", "Sc", 0),
("ARABIC LIGATURE BISMILLAH AR-RAHMAN AR-RAHEEM", "So", 0),
("ARABIC LIGATURE SUBHAANAHU WA TAAALAA", "So", 0),
("ARABIC LIGATURE AZZA WA JALL", "So", 0),
)
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/construct-03.typ | typst | Other | // The inner rectangle should not be yellow here.
A #box(rect(fill: yellow, inset: 5pt, rect())) B
|
https://github.com/DieracDelta/presentations | https://raw.githubusercontent.com/DieracDelta/presentations/master/polylux/book/src/external/external.md | markdown | # External tools
Most users will only come across Typst itself and some off-the-shelf PDF viewer.
However, there are some additional tools that might come in handy and Polylux
supports some of their special needs.
So far, this support is limited to the pdfpc presentation tool.
|
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/modern-uit-thesis/0.1.1/README.md | markdown | Apache License 2.0 | # Modern UiT Thesis Template
Port of the [uit-thesis](https://github.com/egraff/uit-thesis)-latex template to Typst.
`thesis.typ` contains a full usage example, see `thesis.pdf` for a rendered pdf.
## Usage
Using the Typst Universe package/template:
```console
typst init @preview/modern-uit-thesis:0.1.1
```
### Fonts
This template uses a number of different fonts:
- Open Sans (Noto Sans)
- JetBrains Mono (Fira Code)
- Charter
The above parenthesized fonts are fallback typefaces available by default in [the web app](https://typst.app).
If you'd like to use the main fonts instead, simply upload the `.ttf`s to the web app and it will detect and apply them automatically.
If you're running typst locally, install the fonts in a directory of your choosing and specify it with `--font-path`.
## Roadmap
- [ ] Content and pages
- [x] Complete front page
- [x] Back page
- [x] Supervisors page
- [ ] List of Definitions
- [x] List of Abbreviations
- [ ] Appendix
- [ ] Styling
- [x] Headings (chapter on odd, subsection on even)
- [ ] Font features
- [x] Figures (captions etc)
- [x] Code blocks (syntax highlights)
- [x] Tables
- [x] Footnotes
- [ ] Style for print (pagebreak to even)
- [ ] Good examples
- [x] Use of figures, tables, code blocks
- [x] Side by side
- [ ] Create table from CSV
- [ ] Codeblocks with External Code
- [x] Citations
- [x] Lists (unordered, ordered)
- [x] Equations
- [x] Utilities
- [x] Abbreviations
- [x] TODOs, feedback, form, etc
- [x] CI/CD
- [x] Formatting
- [x] Build and Release pdf
- [ ] Release as lib (TODO: Add to local index)
- [x] License
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/foundations-10.typ | typst | Other | // Test failing assertions.
// Error: 11-19 inequality assertion failed: value 11 was equal to 11
#assert.ne(11, 11)
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/silky-slides-insa/0.1.0/README.md | markdown | Apache License 2.0 | # INSA - Slides Typst Template
<p align="center">
<img alt="thumbnail" src="thumbnail-full.png" style="width: 80%"/>
</p>
Typst Template for presentation for the french engineering school INSA.
## Table of contents
1. [Example](#examples)
1. [Usage](#usage)
1. [Fonts information](#fonts)
1. [Notes](#notes)
1. [License](#license)
1. [Changelog](#changelog)
## Example
```typst
#import "@preview/silky-slides-insa:0.1.0": *
#show: insa-slides.with(
title: "Titre du diaporama",
title-visual: none,
subtitle: "Sous-titre (noms et prénoms ?)",
insa: "rennes"
)
= Titre de section
== Titre d'une slide
- Liste
- dans
- une liste
On peut aussi faire un #text(fill: insa-colors.secondary)[texte] avec les #text(fill: insa-colors.primary)[couleurs de l'INSA] !
== Une autre slide
Du texte
#pause
Et un autre texte qui apparaît plus tard !
#section-slide[Une autre section][Avec une petite description]
Coucou
```
## Usage
### Slide show rule
You call it with `#show: insa-slides.with(..parameters)`.
| Parameter | Description | Type | Example |
|----------- |------------------------------- |-------------- |-------------------------------- |
| **title** | Title of the presentation | content | `[Titre de la prez]` |
| **title-visual** | Content shown at the right of the title slide | content | none | `image("img.png")` |
| **subtitle** | Subtitle of the presentation | content | `[Sous-titre]` |
| **insa** | INSA name (`rennes`, `hdf`...) | str | `"rennes"` |
If you assign a content to `title-visual`, the title slide will automatically switch layout to the "visual" one from the graphic charter. If you do not assign a visual content, the title slide will only contain the title and subtitle and will choose the simple layout.
### Section slide
A section slide is automatically created when you put a level-1 header in your markup. For example:
```typst
= Slide section
Blablabla
```
Will create a section slide with the title "Slide section" and will be followed by a content slide containing "Blablabla".
If you want to put a subtitle in your section slide, you must explicitely use the `section-slide` function like so:
```typst
#section-slide[Titre de section][Description de section]
```
## Fonts
The graphic charter recommends the fonts **League Spartan** for headings and **Source Serif** for regular text. To have the best look, you should install those fonts.
> You can download the fonts from [here](https://github.com/SkytAsul/INSA-Typst-Template/tree/main/fonts).
To behave correctly on computers lacking those specific fonts, this template will automatically fallback to similar ones:
- **League Spartan** -> **Arial** (approved by INSA's graphic charter, by default in Windows) -> **Liberation Sans** (by default in most Linux)
- **Source Serif** -> **Source Serif 4** (downloadable for free) -> **Georgia** (approved by the graphic charter) -> **Linux Libertine** (default Typst font)
### Note on variable fonts
If you want to install those fonts on your computer, Typst might not recognize them if you install their _Variable_ versions. You should install the static versions (**League Spartan Bold** and most versions of **Source Serif**).
Keep an eye on [the issue in Typst bug tracker](https://github.com/typst/typst/issues/185) to see when variable fonts will be used!
## Notes
This template is being developed by <NAME> from the INSA de Rennes in [this repository](https://github.com/SkytAsul/INSA-Typst-Template).
For now it includes assets from the INSA de Rennes and INSA Hauts de France graphic charters, but users from other INSAs can open a pull request on the repository with the correct assets for their INSA.
If you have any other feature request, open an issue on the repository.
## License
The typst template is licensed under the [MIT license](https://github.com/SkytAsul/INSA-Typst-Template/blob/main/LICENSE). This does *not* apply to the image assets. Those image files are property of Groupe INSA, INSA Rennes and INSA HdF.
## Changelog
### 0.1.0
- Created the template |
https://github.com/sitandr/conchord | https://raw.githubusercontent.com/sitandr/conchord/main/examples/simple.typ | typst | MIT License | #set page(height: auto, width: auto, margin: 1em)
#import "../lib.typ": new-chordgen
#let chord = new-chordgen()
#box(chord("x32010", name: "C"))
#box(chord("x33222", name: "F#m/C#"))
#box(chord("x,9,7,8,9,9"))
|
https://github.com/nikhilweee/nikipedia-typst | https://raw.githubusercontent.com/nikhilweee/nikipedia-typst/main/papers/2305-18290.typ | typst | == Direct Preference Optimization
http://arxiv.org/abs/2305.18290
=== Abstract
Existing methods for LLM steerability involve the following steps:
1. Make humans score model generations and obtain relative scores.
2. Fine tune the unsupervised LM to align with these preferences.
The second step is often performed using RLHF. This is done as follows:
1. Fit a reward model which reflects human preferences.
2. Fine tune the unsupervised LM using RL to maximize rewards.
This paper introduces a new parameterization of the reward model, that enables
extraction of the optimal policy without having to train a reward model. This
enables alignment of the model with a simple classification loss. The resulting
algorithm, called DPO, is stable, performant and lightweight, eliminating the
need for sampling from the LM during fine tuning.
The paper also claims that DPO compares or exceeds PPO based RLHF in several
tasks.
=== Introduction
LLMs are trained on very large datasets with a wide variety of skillsets.
However, some of these skills may not be desirable to imitate. Our goal is to
make the model aware of common mistakes, but we want to steer the model to only
generate the best responses.
Existing methods steer language models using a curated set of _human preferences_
which are representative of the type of behaviours that humans find safe and
helpful. This stage follows a large-scale unsupervised pre-training on a large
dataset. The most straightforward appraoch for preference learning is supervised
fine tuning on human demonstrations.
However, the approach which is most successful is RLHF. As described before,
this approach fits a reward model to a dataset of human preferences and then
uses RL to optimize a language model policy to produce responses which
correspond to high rewards. This pipeline is considerably more complex than
supervised learning, and involves sampling from a language model during the
training loop. This leads to significant computational costs.
This paper describes how to directly optimize a language model to adhere to
human preferences without explicit reward modeling or RL. The authors show that
their algorithm, DPO, is at least as effective as existing methods, including
RLHF, in tasks such as sentiment modulation, summarization and dialoge, using
language models with upto 6B parameters.
=== Related Work
While LLMs are better trained using a dataset of expert demonstrations
(instruction tuning), relative human judgements of model responses are often
easier to collect. Therefore, subsequent works have fine-tuned LLMs with
datasets of human preferences. These methods optimize a reward function for
compatibility with the preference dataset under a preference model, such as the
Bradley-Terrey model. The next step is to fine-tune a language model using RL
algorithms such as REINFORCE, PPO, etc. A related line of work uses fine-tuned
LLMs to generate additional preference data for targeted attributes such as
safety or harmlessness.
=== Preliminaries
The RLHF pipeline @ziegler2020finetuning includes the following steps:
1. Supervised Fine Tuning
2. Preference Sampling
3. Reward Learning
4. RL Optimization
After being pretrained in an unsupervised manner on a large dataset, the model
undergoes supervised fine tuning on a rather small but high quality dataset to
obtain $pi^"SFT"$.
This supervised model is then sampled to collect multiple answers $(y_1, y_2) tilde pi^"SFT" (y | x)$ for
a given prompt $x$. These answers are then presented to human labelers who
express their preferences over these answers. These preferences are assumed to
be generated by some latent reward model $r^*(y, x)$ which we do not have access
to.
There are a number of methods used to model preferences, the Bradley-Terry model
being a popular choice. This model states that the human preference distribution
can be written as:
$ p^*(y_1 gt.curly y_2 | x) = exp(r^*(x, y_1)) / (exp(r^*(x, y_1)) + exp(r^*(x, y_2))) $
|
|
https://github.com/tingerrr/subpar | https://raw.githubusercontent.com/tingerrr/subpar/main/test/chapter-relative/test.typ | typst | MIT License | // Synopsis:
// - adding contextual numbering like chapter-relative numbering preserves the correct subfigure
// numbering and supplements
#import "/test/util.typ": *
#import "/src/lib.typ" as subpar
#let sub-figure-numbering = (super, sub) => numbering("1.1a", counter(heading).get().first(), super, sub)
#let figure-numbering = super => numbering("1.1", counter(heading).get().first(), super)
#set heading(numbering: "1.1")
#show heading.where(level: 1): it => counter(figure.where(kind: image)).update(0) + it
#show figure.where(kind: image): set figure(numbering: figure-numbering)
#let subpar-grid = subpar.grid.with(
numbering: figure-numbering,
numbering-sub-ref: sub-figure-numbering,
)
#outline(target: figure.where(kind: image))
= Chapter
#figure(fake-image, caption: [aaa])
#subpar-grid(
figure(fake-image, caption: [Inner caption]), <a>,
figure(fake-image, caption: [Inner caption]), <b>,
columns: (1fr, 1fr),
caption: [Outer caption],
label: <full1>,
)
#figure(fake-image, caption: [aaa])
#subpar-grid(
figure(`adas`, caption: [Inner caption]), <c>,
figure(fake-image, caption: [Inner caption]), <d>,
columns: (1fr, 1fr),
caption: [Outer caption],
label: <full2>,
)
= Another Chapter
#figure(fake-image, caption: [aaa])
See @full1, @a and @b.
See also @full2, @c and @d.
|
https://github.com/linhduongtuan/DTU-typst-presentation | https://raw.githubusercontent.com/linhduongtuan/DTU-typst-presentation/main/th_bipartite.typ | typst | // This theme is inspired by https://slidesgo.com/theme/modern-annual-report
#import "slides.typ": *
#let slide_footnote_counter = page
#let bipartite-theme() = data => {
let my-dark = rgb("#192e41")
let my-bright = rgb("#fafafa")
let my-accent = rgb("#fc9278")
let title-slide = {
block(
width: 100%, height: 60%, outset: 0em, inset: 0em, breakable: false,
stroke: none, spacing: 0em, fill: my-bright,
align(center + horizon, text(size: 1.7em, fill: my-dark, data.title))
)
block(
width: 100%, height: 40%, outset: 0em, inset: 0em, breakable: false,
stroke: none, spacing: 0em, fill: my-dark,
align(center + horizon, text(fill: my-bright)[
#text(size: 1.2em, data.subtitle)
// #v(.0em)
// #text(size: .9em)[ #data.authors.join(", ") #h(0.25em) #data.email #h(1em) #sym.dot.c #h(1em) #data.date ]
])
)
place(
center + horizon, dy: 10%,
rect(width: 6em, height: .5em, radius: .25em, fill: my-accent)
)
}
let displayed-title(slide-info) = if "title" in slide-info {
text(fill: my-bright, heading(level: 2, numbering: "1.", slide-info.title))
} else {
[]
}
let west(slide-info, bodies) = {
if bodies.len() != 1 {
panic("default variant of bipartite theme only supports one body per slide, has "+str(bodies.len())+". / "+repr(slide-info))
}
let body = bodies.first()
style(s => {
let footer = box(width: 100%, height: 1em, stroke: my-dark, fill: my-bright,
{
box(
width: if "title" in slide-info.keys() { 30% } else { 10% },
height: 100%, outset: 0em, stroke: none, fill: my-dark, [])
box(
width: if "title" in slide-info.keys() { 70% } else { 90% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(left + horizon, text(fill: my-dark, size: 0.6em,
[
#locate(loc => {
let s = state("current_slide_section").at(loc)
if s != none {
s
if state("slide_footnotes").at(loc) != none and state("slide_footnotes").at(loc).len() > 0 {
h(0.5em)
sym.dot.c
h(0.5em)
}
}
})
#gen-footnotes()
#h(1fr)
#counter(slide_footnote_counter).display() / #locate(loc => counter(slide_footnote_counter).final(loc).at(0))]))
)
})
box(
height: 100% - measure(footer, s).height, outset: 0em, baseline: 0em,
stroke: none, fill: my-dark,
box(
width: if "title" in slide-info.keys() { 30% } else { 10% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-dark,
align( left + horizon, displayed-title(slide-info) )
) +
box(
width: if "title" in slide-info.keys() { 70% } else { 90% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(left + horizon, text(fill: my-dark, body))
)
)
v(0em, weak: true)
footer
})
}
let east(slide-info, bodies) = {
if bodies.len() != 1 {
panic("east variant of bipartite theme only supports one body per slide")
}
let body = bodies.first()
box(height: 100% - 1em,
box(
width: if "title" in slide-info.keys() { 70% } else { 90% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(right + horizon, text(fill: my-dark, body))
)+
box(
width: if "title" in slide-info.keys() { 30% } else { 10% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-dark,
align( right + horizon, displayed-title(slide-info) )
)
)
v(0em, weak: true)
box(width: 100%, height: 1em, stroke: my-dark, fill: my-bright,
{
box(
width: if "title" in slide-info.keys() { 70% } else { 90% },
height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(left + horizon, text(fill: my-dark, size: 0.6em,
[#counter(slide_footnote_counter).display() / #locate(loc => counter(slide_footnote_counter).final(loc).at(0))
#locate(loc => {
let s = state("current_slide_section").at(loc)
if s != none {
h(0.5em)
sym.dot.c
h(0.5em)
s
}
}) #h(1fr) #gen-footnotes()]))
)
box(
width: if "title" in slide-info.keys() { 30% } else { 10% },
height: 100%, outset: 0em, stroke: none, fill: my-dark, [])
})
}
let center-split(slide-info, bodies) = {
if bodies.len() != 2 {
panic("center split variant of bipartite theme only supports two bodies per slide")
}
let body-left = bodies.first()
let body-right = bodies.last()
box(
width: 50%, height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(right + horizon, text(fill: my-dark, body-left))
)
box(
width: 50%, height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-dark,
align(left + horizon, text(fill: my-bright, body-right))
)
}
let center-split-white(slide-info, bodies) = {
if bodies.len() != 2 {
panic("center split variant of bipartite theme only supports two bodies per slide")
}
let body-left = bodies.first()
let body-right = bodies.last()
box(
width: 50%, height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(right + horizon, text(fill: my-dark, body-left))
)
box(
width: 50%, height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-bright,
align(left + horizon, text(fill: my-dark, body-right))
)
}
let section-slide(slide-info, bodies) = {
let body-left = bodies.first()
box(
width: 100%, height: 100%, outset: 0em, inset: (x: 1em), baseline: 0em,
stroke: none, fill: my-dark,
align(center + horizon, text(fill: my-bright, body-left))
)
}
(
title-slide: title-slide,
variants: ( "default": west, "east": east, "center split": center-split, "section-slide": section-slide, "center split white": center-split-white),
)
}
|
|
https://github.com/jomaway/typst-teacher-templates | https://raw.githubusercontent.com/jomaway/typst-teacher-templates/main/ttt-exam/example/abi.typ | typst | MIT License | #import "@preview/ttt-exam:0.1.0": *
#import "@preview/wrap-it:0.1.0": *
#set text(size: 13pt, font: ("Rubik"), weight: 300, lang: "de")
#let logo = image("logo.jpg")
#show: exam.with(title: "ABI", subtitle: "2023", subject: "Mathe", logo: logo, authors: "ISB", date: datetime(year:2023, month:05, day:03) );
= Teil 1: Analysis
#assignment[
Auf einer Autobahn entsteht morgens an einer Baustelle häufig ein Stau.
#let fig = [#figure(
image("abb1.png", width: 5cm),
)<fig1>]
#wrap-content(
align: top + right,
fig
)[
An einem bestimmten Tag entsteht der Stau um 06:00 Uhr und löst sich bis 10:00 Uhr vollständig auf. Für diesen Tag kann die momentane Änderungsrate der Staulänge mithilfe der in $R$ definierten Funktion f mit
$ f(x) = x dot (8 - 5x) dot ( 1 - x/4)² = -5/16 x⁴ + 3x³ -9x² +8x $
]
beschrieben werden. Dabei gibt x die nach 06:00 Uhr vergangene Zeit in Stunden und $f(x)$ die momentane Änderungsrate der Staulänge in Kilometern pro Stunde an. Die Abbildung 1 zeigt den Graphen von f für $0≤ x ≤ 4$. Für die erste Ableitungsfunktion von $f$ gilt $f'(x) = (5x²-16x+8) dot (1-x/4)$.
#question(points: 3)[
Nennen Sie die Zeitpunkte, zu denen die momentane Änderungsrate der Staulänge den Wert null hat, und begründen Sie anhand der Struktur des Funktionsterms von f, dass es keine weiteren solchen Zeitpunkte gibt
]
#question(points: 1)[
Es gilt $f(2)<0$. Geben Sie die Bedeutung dieser Tatsache im Sachzusammenhang an.
]
#question(points:5)[
Bestimmen Sie rechnerisch den Zeitpunkt, zu dem die Staulänge am stärksten zunimmt.
]
#question(points:2)[
Geben Sie den Zeitpunkt an, zu dem der Stau am längsten ist. Begründen Sie Ihre Angabe.
]
Im Sachzusammenhang ist neben der Funktion f die in IR definierte Funktion s mit
$ s(x) = (x/4)² dot (4-x)³ = -1/16x⁵ + 3/4x⁴ -3x³ + 4x² $ von Bedeutung.
#pagebreak()
#question(points:4)[
Begründen Sie, dass die folgende Aussage richtig ist:
_Die Staulänge kann für jeden Zeitpunkt von 06:00 Uhr bis 10:00Uhr durch die Funktion s angegeben werden._
Bestätigen Sie rechnerisch, dass sich der Stau um 10:00 vollständig aufgelöst hat.
]
#question(points:3)[
Berechnen Sie die Zunahme der Staulänge von 06:30 Uhr bis 08:00 Uhr und bestimmen Sie für diesen Zeitraum die mittlere Änderungsrate der Staulänge.
]
#question(points:3)[
#let fig = [#figure(
image("abb2.png", width: 5cm),
// supplement: "Abb.",
)<fig2> ]
#wrap-content(
align: top + right,
fig,
)[
Für einen anderen Tag wird die momentane Änderungsrate der Staulänge für den Zeitraum von 06:00 Uhr bis 10:00 Uhr durch den in der @fig2 gezeigten Graphen dargestellt. Dabei ist x die nach 06:00 Uhr vergangene Zeit in Stunden und y die momentane Änderungsrate
der Staulänge in Kilometern pro Stunde.
]
Um 07:30 Uhr hat der Stau eine bestimmte Länge. Es gibt einen anderen Zeitpunkt, zu dem der Stau die gleiche Länge hat. Markieren Sie diesen Zeitpunkt in der Abbildung 2, begründen Sie Ihre Markierung und veranschaulichen Sie Ihre Begründung in der @fig2.
]
#caro(22)
]
|
https://github.com/piepert/typst-seminar | https://raw.githubusercontent.com/piepert/typst-seminar/main/Beispiele/Essay/main.typ | typst | #import "template.typ": *
#import "fullcite.typ": *
// Take a look at the file `template.typ` in the file panel
// to customize this template and discover how it works.
#show: project.with(
title: "Wie plausibel ist Descartes' Methodik des radikalen Zweifelns?",
authors: (
(
affiliation: "Universtität Rostock",
institute: "Institut für Philosophie",
docent: "Dr. phil. <NAME>",
course: "Philosophie der Neuzeit: Seminar 1",
semester: "Sommersemester 2023",
name: "<NAME>"
),
),
date: "20. April 2023",
)
#load-bibliography("bibliography.yaml")
#let ncite(..args) = cite-footnote(fullcite(style: "full", ..args.pos()))
#let blockquote(stroke: white, body) = block(inset: (left: 1em), v(0.5em) + block(stroke: (left: 0.25mm + stroke), inset: (left: 1em, right: 2em, rest: 0.5em), body) + v(0.5em))
/*
- Einleitung + Hinführung
- Hauptteil
- Darstellung Descartes' Position
- Argument der Sinnestäuschung: Zweifel nur an wenigem?
- Genius malignus: Logik bleibt drin, warum? (Erklären)
- Ende
- Fazit
*/
Bei der Frage nach dem Wahren gibt es einige Probleme. Nicht nur ist fraglich, _was_ als "wahr" bezeichnet werden kann, sondern auch, _ob_ überhaupt etwas als "wahr" bezeichnet werden kann. Seit vielen Jahren überlegen viele Philosophen, wie man am besten zu wahrer Erkenntnis gelangen kann oder ob es diese wahre Erkenntnis überhaupt gibt. <NAME> war ein Philosoph des 17. Jahrhunderts, der sich dieser Frage annahm. Seine _Meditationen über die erste Philosophie_ bestehen aus erkenntnistheoretisches Gedankenexperimenten für eine Methode des Erkennens von grundlegenden, unanzweifelbaren Wahrheiten. // Muss das Problem hier am Ende der Einleitung nochmal genau angesprochen werden?
// Darstellung von Descartes' Position
Um diese unanzweifelbaren Wahrheiten zu finden, geht Descartes systematisch vor. In der ersten Meditation legt er diese Idee fest:
#blockquote(stroke: black)[_[W]eil schon die Vernunft davon überzeugt, dass man den Meinungen, die nicht völlig gewiss und unbezweifelbar sind, die Zustimmung nicht weniger sorgfältig versagen muss als den offensichtlich falschen, so wird es, um sie alle zurückzuweisen, genug sein, wenn ich bei jeder irgendeinen Grund zum Zweifeln finde._ (#fullcite("ATVIIM1", "[2.]")).]
Im darauf folgenden Text macht er sich daran, dieses Zweifelhafte zu bestimmen und für eine sichere Form der Erkenntnis auszuschließen. Seine Entdeckungen werden in drei Schritten deutlich:
#block(inset: (left: 1em))[1. Die Sinne können täuschen, daher ist keine Sinneserfahrung ohne Zweifel.#ncite("ATVIIM1", "[3.]", "vgl.")
2. Die Welt könnte ein Traum sein, daher ist keine weltliche Erkenntnis ohne Zweifel.#ncite("ATVIIM1", "[5.]", "vgl.")
3. Ein böser Geist könnte das eigene Denken beeinflussen, daher ist auch rein geistige Erkenntnis nicht ohne Zweifel.#ncite("ATVIIM1", "[9.]", "vgl.")]
Im ersten Schritt löst Descartes sich von den Sinnen, bleibt jedoch dabei, dass der Mensch einen Körper hat, mit dem er wahrnehmen kann, und dass es eine wirkliche Welt gibt, die wahrgenommen wird. Der zweite Schritt stellt nun dies infrage, denn auch ein Traum kann solche sinnlichen Empfindungen verursachen. Der letzte Schritt ist der radikalste: In einem Traum können trotz der möglicherweise nicht-wirklichen Umgebung mathematische Gesetze gelten.#ncite("ATVIIM1", "[8.]", "vgl.") Doch wenn ein allmächtiger Geist den Verstand so manipulieren könnte, dass er ihn von unwahren Regeln überzeugt, sind auch Gegenstände des Geistes nicht zweifelsfrei wahr.
// Bewertung von Descartes' Position
Dieser Argumentationsgang ist jedoch aus zwei Punkten problematisch: Erstens sind die Stufen nicht so klar, wie Descartes es beschreibt, voneinander abtrennbar und zweitens ist die Methode eines radikalen Zweifels beschränkt auf die Vorstellungskraft des Zweifelnden. Descartes hat ein grundlegendes Problem: Er ist nicht so genau, wie er vorgibt zu sein.
Die Trennung der drei Stufen, in die sich Descartes' Untersuchung einteilen lässt, ist in der Hinsicht zu kritisieren, dass bereits die erste Stufe die Erkenntnis der zweiten Stufe ausschließt: zweifelt Descartes an der Wahrnehmung oder an der Interpretation der Sinne, jedoch nicht an den Sinnen an sich, verschiebt er das Problem der Erkenntnis von der Welt auf die Erkennenden. Falls sich die Erkennenden täuschen, entsteht im zweiten Schritt ein Problem: wenn die Erkennenden falsche Schlüsse ziehen und die Welt ein Traum sein könnte, braucht es keine falsche Welt, die die Erkennenden falsche Schlüsse ziehen lässt, denn das tun die Erkennenden bereits. Eine Welt wird über die Sinne erfahren. Der geistige Filter dazwischen oder die Sinne selbst können täuschen. Ob die Welt dann wirklich ist oder nicht, ist unwichtig. Das Zweifeln an der Wahrnehmung schließt bereits das Erkennen einer wirklichen oder falschen Welt aus und somit auch jede Erkenntnis aus ihr, ohne dass man an der Welt an sich zweifeln muss.
Der zweite zu kritisierende Punkt umfasst das Argument vom bösen Geist. Descartes versucht in seinen Meditationen durch Argumentation und logische Schlussfolgerung seinen Standpunkt zu erklären. Die Mathematik wurde im dritten Schritt zur Erkenntnisgewinnung ausgeschlossen, da der böse Geist den Verstand beeinflussen könnte. Diese Idee zweifelt an so grundlegenden Dingen und geht doch nicht so weit, als dass er den Bereich der Logik verlassen und den Satz vom Widerspruch entfernen würde. Existiert jedoch dieser allmächtige böse Geist, ist es nicht ausgeschlossen, dass er nicht der Logik, die wir kennen, unterworfen ist. Befreit man sich auch von dieser Einschränkung, sind Existenz des Zweifelnden und seine Nicht-Existenz, die Wahrheit und Unwahrheit zugleich, nicht mehr ausgeschlossen. Was für uns unmöglich erscheint, dass also etwa zwei Sachen, die sich gegenseitig widersprechen, zusammen wahr sein können, wäre dort möglich.
Man muss Descartes zugutehalten, dass ohne diese Mindestanforderung der Logik der Begriff "Wahrheit" keine Rolle mehr spielt, da er den Bereich des von uns Verständlichen verlässt. Trotzdem ist es den wirklichen Dingen aber gleich, ob der menschliche Geist sie begreift oder nicht, daher ist das Einbauen der Logik zwar Grund genug für die Annahme der Gültigkeit seiner Schlüsse und die Notwendigkeit seiner Ergebnisse, jedoch nicht für das Erkennen eben dieser wirklichen Dinge. Erschließt sich Descartes seine eigene Existenz durch "Ego sum, ego existo"#ncite("ATVIIM2", "[3.]"), mag sein Argument gültig sein, aber ohne das Widerspruchsprinzip könnte auch das Gegenteil dieses Arguments gültig sein, also dass er nicht existiert.
// Fazit
Die Position, die in den Meditationen beschrieben wird, entsteht aus interessanten und genau geführten Gedankenexperimenten. Solange Descartes jedoch die wirkliche Welt bezweifeln und sie gleichzeitig beschreiben will, entstehen Lücken in der Argumentation. Besonders in der Hinsicht auf das Vorgehen den aller geringsten Zweifel an einer Sache dazu zu benutzen, diese Sache für den Erkenntnisgewinn auszuschließen, ist Descartes seinen eigenen Anforderungen nicht treu geblieben, jedoch ist die einzige Möglichkeit dafür, Descartes' Methode "plausibel" zu nennen, eben jene Logik zu verwenden, die Descartes voraussetzt.
/*
#pagebreak()
#print_bibliography()
*/
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/037%20-%20Ravnica%20Allegiance/002_Rage%20of%20the%20Unsung.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"Rage of the Unsung",
set_name: "Ravnica Allegiance",
story_date: datetime(day: 30, month: 01, year: 2019),
author: "<NAME>",
doc
)
I crouch in the brown grass, eyes locked on my prey. Not twenty feet away, a maaka sniffs the air, feline tail whipping in aggravation as it scouts the area for threats. I'm safely downwind from the beast, but my heart is beating so wildly in my chest, I fear the maaka will hear me and tear me to bits with those massive, black claws.
Its rib cage is visible through brittle fur, and all six of its emerald-hued eyes have lost their luster. There's no time to go in search of a healthier beast, though. War is already raging, and the ground rumbles from the fighting in the distance. On the horizon, I can just make out the red-hot coils of siege magic—cindervines whipping around the foundations of buildings and turning them to rubble. Dryzek's work for sure. His return from prison has stoked the fire within the hearts of the Ghor Clan—well, #emph[most] of us—and tonight, the Rubblebelt will expand its domain as lands are brought back from the brink of civilization.
The celebrations tonight will be many, and there's a good chance I'll get to tattoo these war triumphs upon the legendary warrior himself. Giants like Dryzek have thick skin that's notoriously difficult for a needle to pierce, but I've developed a technique that's twice as fast and three times as painful as the traditional method, which allows the skin to absorb more of the magic imbued ink~that is, if I can get enough ink to cover Dryzek's massive arm.
The recipe for the ink is a simple one, passed down through generations, but I take care to gather the ingredients myself:
#emph[Five pieces of charred pine bark,]
#emph[One hydra egg yolk,]
#emph[And the freshest, greenest maaka scat available.]
I turn my attention back to the maaka, who finally feels comfortable enough to do its business, and as soon as it's kicked up dirt behind itself, it's dashing off, and I'm rushing over. I frown at the specimen, a dull greenish brown, but it'll have to do. I set my clay bowl on the ground and quickly pound the charred bark into a fine powder. Then I crack the egg, careful twisting the shell so that only the yolk falls into the bowl and mix until it's an even paste. Finally, I add the scat, stirring and stirring, but this mixture refuses to turn green. It's duller than my last batch even.
I double the amount of scat, and the mixture finally takes on some color. I conjure magic from the soil itself, and red flames rise up from the earth and flicker around the bowl. The ink starts to bubble, and I hold my breath, waiting for the familiar glow that signals the mixture is viable and will shine brilliantly upon the skin when the Rage takes hold.
The sun sets, shadows stretch across this expanse of reclaimed nature, and suddenly I'm feeling less like the hunter and more like the hunted. Out in the wild, cold and all alone, is the last place a viashino like me wants to get caught, so I desperately add more scat to the mix until finally the ink brightens. My reservations about tampering with the recipe melt away as swirls of yellow-green marble across the surface. Perfect. I put the lid on the bowl, wrap it up in leather straps, and ignore the howls of the wild as I rush back to the warfront.
#figure(image("002_Rage of the Unsung/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
There, in the wake of rampant destruction, I breathe in the dust from pulverized stone and revel at the cracked backbones of lumbering architecture. Most artists don't bother to walk the ruins they tattoo upon the skins of our warriors, but I find that it brings a quality to my work that can't be duplicated by secondhand tellings. All around me, goblins froth at the mouth as they chase off remaining civilians. Gruul children sift through the rubble for loot—such beautiful wild creatures with dirt under their nails, bugs in their hair, grit in their smiles. And then I see #emph[him] , Dryzek the legendary berserker, harnessing his Rage to stack massive chunks of rubble in the shape of tusks as a tribute to the Raze-Boar.
Not to be outdone, Ruric and Thar pile up a tribute of their own, making a point to howl and grunt as their stack overtakes Dryzek's in height. Others join in the fray, expressing their support for our clan leaders. But the ogres, big as they are, are no match for Dryzek's girth, and as he stacks another rubble block, his backers beat their chests and snort like boars, fewer in number but just as vocal. And just like that, Rage ignites. It travels like an infection from one Gruul to the next, hackles raising, tattoos inflaming, eyes shining bright. The berserker closest to me catches it, and then I pretend to catch it as well, throwing my head back and yelling at the top of my lungs. I smash stones, break glass, gnash my teeth, secretly praying to the Raze-Boar for a flicker of Rage to enter my heart, but, like always, it remains as cold as week-old ash.
Finally, things calm, and we retreat to the bonfire to enjoy the spoils of war.
"Good battle today," grunts Jiri, my littermate, squatting down next to me and presenting me with his bicep. "Eighteen blocks destroyed."
"Aye. Shame I missed so much of it," I say, setting my needle in his skin, continuing the map of ruined civilizations running down his arm. Six Boros blocks, and twelve Izzet. Izzet couldn't construct a straight road if their lives depended on it, which makes for interesting work on my part. Their labs would pop up in any odd place, encroaching upon thoroughfares and sometimes other buildings, but seeing those spectacular beacons of chaos fall, smoking and shooting sparks into the sky is a thrill like no other, and I try my best to capture that feeling in ink.
I tap the end of my inked needle with a small mallet, puncturing Jiri's scaled skin. I fall into a trance, working quickly, diligently, like a fire moving through a forest, but I keep getting distracted by the sound of Jiri tapping his spiked tail on the ground over and over again. When I pull back, I realize the olive green of his skin has brightened to a more aggravated hue.
"What's going on with you?" I ask.
"You don't feel it? The tension?" He nods in Dryzek's direction.
The giant leans back against the husk of a stone building, the light of the bonfire flickering in his eyes. Several humans tend to him, soothing his wounds and massaging his battle-worn muscles. His gaze shifts my way, and I immediately avert my eyes in submission.
"I think he's going to challenge Ruric and Thar for clan chieftain," my brother says.
I shake my head. "Dryzek? He's got to be a thousand years old."
"Means he's wise."
"But he just got out of Udzec. He's got no idea of how the social order has changed."
"Means he's got a different way of seeing things," Jiri says, his voice perfectly neutral. Too neutral.
I've never heard my brother speak ill of Ruric and Thar, but there are those who aren't happy with their leadership lately. The two-headed ogre is all rage, all the time. Smash now, ask questions later, or usually not at all. Sometimes, I feel like they're too busy fighting to remember what we're fighting #emph[for] . But Dryzek gets it. He'd grown up learning the Old Ways and is more patient and practical in the matters of war. Our fight is not about rampant destruction, but of curing Ravnica of the disease that manifests as gratuitous construction and institutional corruption.
"What if he #emph[does ] challenge for chieftain?" I whisper. "You picked a side?"
"I'll side with the winner. You'd do best to do the same." Jiri's tail goes still. "I've seen the way you look at him. He's just a Gruul like any other Gruul."
"Dryzek is a legend! You remember when we were kids, gathering around the fire and listening to stories about how he pounded his fist into the middle of a town square and made all the buildings topple?"
"Those were stories, Arrus. You stick your neck out for that giant, and <NAME> Thar will slash it." Jiri gets up, even though I'm only half finished with his tattoo. He tosses me a raktusk tail in payment.
I know he's right. Jiri is the reason I've got this job, instead of off starving in the wilds of the Rubblebelt, clanless. The runt of our litter, I was never in any shape to fight. My skin is a pallid yellow-green, the color of maaka bile, and my spikes never erupted, leaving me smooth from my head to the tip of my tail. But I became decent with a needle and ink, and as my siblings returned from war, I marked their skin with detailed maps of the territories they'd destroyed. I lived vicariously through the battlefields I tattooed onto their skin, while my own adventures consisted of nothing more than scavenging materials for my ink. The pride I held for my siblings showed in my work, though, and soon they were bringing their friends to me, and their friends' friends, and so on until I received an invitation to ink up the clan chieftains themselves.
#figure(image("002_Rage of the Unsung/02.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
My eyes cut toward the legend, Dryzek. Inking #emph[those ] arms, though~
I get up, approaching him with a subservient hunch, hands open and stretched to the side. His human servants all stop what they're doing and form a loose barrier in front of him.
"Can we help you, brother?" says the one holding a wooden spit with a pitched fork meant for cooking, but it could easily become a weapon. Even within the clan, #emph[especially ] within the clan, there is no room to let your guard down.
"I'm the artist here," I say. "Arrus, you can call me. That's my name. I'm the artist here." I whip my tail nervously. "I said that already, didn't I? Need ink?"
"Aye~" the legend bellows, a deep voice I can feel in my own chest. He moves closer to me and swats his humans away. They return to their duties, the one with the spit ramming the pointed end into a fresh drake carcass. They heft it up over Dryzek's personal bonfire, and the smell of cooking flesh makes my mouth go slippery inside.
"The way everyone is avoiding me, I was thinking we weren't welcome among Ghor Clan anymore," Dryzek says. "Seems like I could raze all of Ravnica and still not fall into Ruric Thar's favor."
"Ruric #emph[and ] Thar. They're two—You know what? Never mind." Without another thought, I press one of my fingers against Dryzek's bicep like I'm testing the firmness of a melon. "Eighteen blocks?" I squeak out.
"Skin's thick," Dryzek says.
"Never a problem," I say. I unroll my tattoo sash and get to work. The deep bronze of his skin soaks up the ink like it's thirsty for it, and I'm able to add contours and shadows, giving the tattoo a three-dimensional feel. The Izzet lab takes center stage, though, as I coil a serpentine pattern within the block, representing the electrical fire that had consumed the sky for a whole twenty minutes.
"Smash civility," he grunts when he sees it. "Smash it to bits." He punches me in the square in my chest with his massive fist. I think it was supposed to be a friendly tap, but it feels like my ribs have caved in.
"Arrus!" my brother hisses. "Arrus, you've got a line forming over here. You've got blocks to ink."
I turn and see my brother standing there, several of his mates behind him, as sharp as a wall of knives. Maybe I didn't feel the tension much before, but I feel it now. No one else in the clan dares come within twenty feet of Dryzek.
"But I'm not done with—"
"It's all right," says Dryzek. "Come back and finish tomorrow. I'm not going anywhere."
He waves me off as his humans present him with an enormous plate of perfectly roasted drake, a bright yellow melon rammed in its mouth. I clear my throat, eyeing the drumstick on the drake as payment. Certainly, more of a delicacy than I could hope for, but a viashino can dream.
"How's this for a tip—" Dryzek says with a grin, "—Rage isn't all fighting and destruction. It speaks to different people in different ways."
I go stiff. All my life, my heart has been cold, but I learned how to fake the Rage early, and no one has ever challenged me on it before. I grit my teeth and growl for good measure. "What are you talking about? I Rage all the time. Every day, nearly. So, so angry."
Dryzek lifts a thick, skeptical brow. "I'm eight hundred and thirty-something years old, Arrus. I know Rage when I see it, and that ain't it. But it'll find you. Took me a hundred and six years to figure out what I was mad about."
No. Not Dryzek. How could that be? But before I get a chance to question him about it, Jiri's pulling me away. Soon the ink is flowing, the drinks are pouring, and merriment starts outweighing the tension. That is until Dryzek makes a move toward Ruric and Thar. The crowd parts around him as he nears our clan leaders. The drinking stops. The music stops. The breathing stops. Jiri was right. The legend #emph[does] plan to challenge for chieftain. Just when the tension can't get any thicker, Dryzek lowers his head and kneels as his human servants place the glazed drake at Ruric and Thar's feet. "A token, my chieftain, of my loyalty to <NAME>an. May your Rage ever guide us toward destruction."
#figure(image("002_Rage of the Unsung/03.jpg", width: 100%), caption: [<NAME>, the Unbowed | Art by: <NAME>], supplement: none, numbering: none)
Ruric and Thar look surprised by the gesture, but in the next instant, they each rip a wing from the drake and bite down into the flesh. "It is undeniable that #emph[your ] Rage has stoked a much-needed fire in the clan," Thar says, pieces of drake meat tumbling over his lips, "and we are honored to have you fight among us."
The deal is sealed with a blood kinship, and all the walls between factions come crashing down. We celebrate once again, and I breathe a sigh of relief that I've narrowly avoided getting caught in the middle of a coup~then, the screaming starts.
I look over and see it's Jiri, his new tattoo glowing as bright as the moons before his arm bursts into flames. He wails, and his mates try to put out the fire with dirt and cloth scraps, but then Dryzek's tattoo goes aflame as well, and there's so, so much more ink. The smell of cooking flesh fills our campsite as one by one, each of the other warriors I'd inked today starts to burn. I cringe and skitter away before the blame can fall on me, but I'm caught by the tip of my tail, and then I'm dangling in the air, the world swinging back and forth. Ruric and Thar come into view, and I try to explain that this isn't my fault, that something is wrong with the ink, that it's been fading, that the maakas are looking sicker and sicker, but all that tumbles out of my mouth is senseless whimpering.
I expect to be pummeled, beaten, torn to bits, but what happens is much, much worse.
"Your services are no longer needed here," Ruric grunts, then tosses me to the ground, and all of the sudden, I'm clanless.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
In the heart of the Rubblebelt, the wild has taken root in the ruins of civilization long past—trees twisting through old doorframes, a family of boars turning the remnants of an Orzhov cathedral into their den. Vines cling to the shell of the crumbled building, patiently turning stone to dirt over the course of a millennium or two. Stained glass that once adorned windows now lies in piles, sharp edges rendered smooth by time. Still, nature feels like it's choking here. Tree leaves yellowing, vines browning. Even the dirt seems pale and sickly. Barely surviving.
Like me.
A Gruul without a clan is days from becoming wurm food, or so the saying goes. Skittish and alert, I hide in shadow, blending into my surroundings. I scavenge what I can, watching a pair of goblins wrestling over the carcass of a raktusk calf. While they've got each other in head locks, I sneak up and steal a piece of meat for myself.
"Hey!" one of the goblins growls as he notices me. It takes a moment for them to untangle from each other's grip, but in that time, I've already scampered off with a juicy raktusk leg and lose them in the tall grasses. I let my skin go a few shades browner to better blend into my surroundings. The grasses conceal me, but I notice they aren't dried and brittle like they lack for water, but thin and limp, like they lack for nutrients.
I hold my breath, waiting for my pursuers to give up looking for me, and when all is quiet, I take a bite of the leg. The meat is sour, almost like it's gone off, but I'd seen the goblins kill the calf myself. I eat it anyway, my mind churning over being away from my clan, but when I get down to the bone, I'm taken aback by how malleable it is, bending like a tree branch in the wind.
Wilting vegetation, bad batches of ink, rancid meat. Something's gone wrong with the Rubblebelt, and it's only getting worse. Someone needs to do something before it's too late. I'm just one person, though. I need help—the help of my former clan, if I can get it. I know it's a risk, but I gather my proof and wait until the dead of night to make my way back to their camp.
The festivities have wound down, save for a few ogres, two giants, and a centaur huddled close to the fire, drunkenly reliving the day's conquests—heroes of new stories that will be told for generations to come. Everyone else has dozed off, and I tiptoe around mounds of snoring warriors. With all the fur and leather and skulls, it's hard to tell where one ends and the next begins.
I see Jiri, nesting with his mates, a filthy scrap of cloth bandaged around his bicep. I nudge his shoulder, and a bloodshot eye opens, taking a moment to focus upon me, then slowly and quietly, he extracts himself from the pile.
"What are you doing here?" he breathes, beyond aggravated.
"I need to talk to <NAME>," I whisper, shoving the rubbery bone and wilted vegetation at him. "Something's been sucking the life out of the Rubblebelt these last couple months. The grass is dying. The creatures are sickly. If we don't do something, we'll be the next to starve."
Jiri laughs. "Didn't you notice? We're at war. Ruric and Thar don't have time to look at grass and bone."
"Please," I beg. "This is important."
"You know what's important to me?" Jiri unwraps his bandage. "Not having an arm that's half burned by bad ink."
"But that's exactly what I'm—"
He bares his teeth and flexes his skin spikes. "Go, Arrus. Don't come back here."
#figure(image("002_Rage of the Unsung/04.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
I skulk off, but before I get very far, I notice that the group of warriors gathered next to the bonfire aren't just over there telling stories. My eyes narrow and my scales prickle at a hulking ogre in long robes, boar skulls capping each of her shoulders. Her right arm ends below the elbow and attached to that is a prosthetic made of intricately carved battleboar tusk with leather straps bearing an assortment of fine tools. A modified tattoo needle juts out from the end of the prosthetic, set at the perfect angle.
She taps the butt of the needle with a small mallet, moving at a steady rhythm across the centaur's hindquarters. The bright green hue of ogre's ink is like nothing I've ever seen, shimmering in the night as if the whole pot's been consumed by Rage.
I had no idea they'd replace me so quickly. I wait in the shadows, stewing silently as she breezes through each of the warriors. It's nearly morning when the last of them leaves her side, and I slip up next to her, and from this close, I see she's got a face full of shaman tattoos.
"Hey there, slick. What can I do for you?" The ogre glances at my thin, bare arms.
"What kind of ink you using there?" I ask. "Never seen anything like it."
"Special blend. Proprietary," she says, picking a large piece of roasted battleboar from between her blunted teeth. Should be #emph[my ] roasted battleboar.
"Can I trade you for some?"
"You can fight me for it," she says with a laugh, then starts to pack up her tools into the pockets in her shaman's apron.
The way she carries herself, you can tell she's born from strong family lines steeped in heroism and might~the ones that children begged storytellers to hear. But there are less-told stories of sneakiness and cunning, of the unsung viashino guerilla raiders with poor impulse control and quick hands, taking their enemies by surprise. Their names may be forgotten, but I channel the stealth of my own ancestors, and while the ogre's back is turned, I extend my sticky fingers, grab the clay pot that holds her ink, and without a sound, wrap it up into the folds of my cloak.
And with a movement quick as a tail whip, my arm is pinned to the ground, and the ogre's knee is in my chest. Ink spills upon the malnourished earth.
As you would expect, a fight ensues, and as each of her punches and kicks land, I am reminded of why her ancestors got stories and mine didn't.
"Touch my ink again, and I'll make a pair of boots out of your hide," she growls, holding out her now empty ink bowl. The beatdown had been so swift, it didn't even wake the others.
As I lie here, broken and bent, staring at the sky, waiting to die, I feel something brush against my cheek. Agony strikes as I turn my head to the side and notice a lush green vine growing up from where the ink had soaked into the ground, leaves unfurling and reaching toward the rising sun before my very eyes. The vine meanders down my shoulder, then loops around my arm. Slowly, but surely, I feel my broken bones mend.
"What magic is this? Who—" I croak, shortly before vines find their way into my mouth, down my throat, touching all those bleeding spots inside me. Selesnyan magic, no doubt—a guild kindred in the ways of nature, though their shortsightedness keeps them busy trying to bring order and calmness to what should be wild and invigorating. I cannot deny their healing magic is what I need in this moment, though. As soon as I'm properly mended, I'm tempted to sit up, look for the source of the magic, but I keep playing half-dead, listening carefully as the ogre cusses to herself, complaining about the wasted ink and how she'll have to go make more. She finishes packing up and leaves, and I follow after her, mind set on finding out her secrets.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
I keep low to the ground, far enough behind her that she won't notice me, and if she does, I'll be able to scramble away before she can pummel me again. We've trekked clear out of the Rubblebelt, the withering foliage transforming into vibrant greens, so bright they fall well above the color range of my scales. A huge outcropping of limestone rises high into the air before us, and a series of cave mouths gape wide like black maws daring us to come inside.
And I know exactly what the ogre is after: hydra eggs.
#figure(image("002_Rage of the Unsung/05.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
Usually, hydras lay two or three clutches a year, but this season has been plagued with empty nests and eggshells too fragile to handle. I've got a good feeling about this nest, though. I watch as the ogre sneaks inside, and I get as close as I dare, letting my coloring go the pale gray of the cave walls. I sneak farther, farther into its depths, feeling like I'm descending a cold, damp throat.
The hydra enrages at the sight of the ogre, hissing and spitting. You haven't seen Rage until you've seen a mother hydra protecting her clutch. The beast rears back, but right before it strikes, the ogre starts humming a low-pitched note, her arms waving back and forth in a hypnotic motion. At the tip of her prosthetic, she skillfully balances a thick, oblong skull. Goblin, probably. Within seconds, she's got all the hydra heads mesmerized. And then carefully, the ogre pulls a chunk of meat from the pocket in her apron, tucks it inside the skull, and launches the skull into the dark depths of the cave. The hydra breaks from the trance and chases after it.
While the beast is distracted, the ogre starts digging. Looks like a decent clutch, maybe forty or fifty eggs. She tucks one into her apron, then tiptoes back toward the mouth of the cave as the hydra heads fight over the skull, trying to remove the irresistible morsel inside. Interesting technique. Goblin skulls are difficult to crush, even for a beast that size, but then there's a crunch of splintering bone and more hissing, and then the chalky sounds of a hydra slithering against rock.
The ogre looks back startled, and then breaks into a dead sprint. I can't help but wonder if weak bone has already made its way up the Rubblebelt's food chain, but I don't have time to wonder long, because now the hydra has noticed her clutch has been disturbed. My coloring might blend in here, but no amount of camouflage is going to stop me from smelling like dinner to that hydra. I've got no choice but to start running as well.
Cusses echo off the cave walls as the ogre sees me, and when she passes me, I know I'll be a hydra snack for sure. Then the ogre slings a cindervine glowing hot with orange-red magic in front of us, whips it down into the ground, and heaves. The ground erupts, spewing rock and stone as a steep ramp forms ahead of us. We scale the ramp as it chokes off the mouth of the cave, leaving just a narrow band of daylight for us to escape through.
We tumble safely down the other side—me out of breath, her not so much. I know she's a shaman, but the way she moved back there didn't match up with being a tattoo artist. She's built more like someone's who seen battle, and lots of it. I stare at her facial tattoos again~noting the meandering line of a familiar river and the blocks of the surrounding Azorius neighborhood that now sits under fifteen feet of water. "Wait. You're <NAME>. The shaman who collapsed the Jezeru dams?"
She raises a brow, then starts walking, putting some distance between us and the hydra still snarling at us from inside the cave. "It's just Baas, now. Feel free to get lost, slick."
"Eighty-two blocks decimated in a single day!" I say, following right behind her, star-struck. Oh, what I would give to tattoo her skin. "And then there was that bridge collapse in the Smelting District, and the absolute carnage at the Tin Street Massacre, so much—"
"That one wasn't me. I'm partial to crushing dams and bridges, not bones." She shoots a glance my way. "Unless someone's #emph[asking] for it."
Baas doesn't seem like the talkative type, but maybe if I get on her good side, she'll let me tag along while she collects the rest of her ink ingredients and I could hear some of her amazing battle stories as well. "The colossal fissure you put in the Transguild Promenade? Was it as deep as they say? That you couldn't even see the bottom?"
#figure(image("002_Rage of the Unsung/06.jpg", width: 100%), caption: [Transguild Promenade | Art by: <NAME>], supplement: none, numbering: none)
I pause, waiting for a response. Nothing. Her gait grows, and her step quickens, and I'm practically running to keep up with her.
"And the Concourse collapse, where you took out three support pillars simultaneously! Ha! Selesnya spent months rebuilding. Just you and that Bolrac berserker were responsible, right? Oooh, I remembered the uproar when you married outside the clan, but you two worked so well together. That cyclops, right? Named Daeska Sol—"
Baas stops, turns, and fixes me with the most feral glare. "Finish that sentence, and I'll punch your throat out."
I swallow hard, but before I can change the subject, the ground starts quaking like war is close by, but that can't be it. Forest surrounds us for miles. Then I see the leaves shaking, treetops swaying, and I realize something's moving toward us. An enormous set of tusks emerges into the clearing—a battleboar. And they never travel alone.
I turn to run, but Baas grabs me by the nape of my neck.
"#emph[Never] turn your back on a battleboar," she says, "unless you want to be trampled into paste. Best chance we've got now is to stand our ground."
"The two of us against a whole herd?"
"We don't have to fight them. We just have to #emph[look] like we want to fight them. Chances are they'll back down." She takes me by the shoulders and kicks my feet apart. "Wide stance, lean slightly forward, like you're about to pounce. Shoulders high. Teeth bared."
"Like this?" I say, channeling my inner berserker, but my cold heart bucks in protest.
She jabs her knuckle two thirds of the way down my back, and my posture shifts, my chest widens. "Better," she says, then takes a fierce stance of her own.
The battleboars grow closer—I can't help but notice how their massive hooves are polished to a high shine and their thick, wooly coats gleam like silk in the sun. Nothing like the matted beasts I'm used to, but make no mistake, even with this ridiculous parade of overgrooming, there's no way I'd want to find myself at the pointy end of those massive tusks.
"Make eye contact with the lead beast. Don't break it. She's the only one we have to deter."
The lead beast stops, and the rest of the herd does, too. She sniffs at us. I raise up onto the balls of me feet, straining to look more formidable than I am. The boar grunts, then moves on, changing course ever so slightly. They pass within inches of us, so close their fur tickles the tip of my snout, but we hold our stances until the very last boar has passed.
"That's the second time you've saved my life today," I say.
"And the third time you've put your life on the line just to get a little ink," Baas says, shaking her head. "Your name's Arrus, right?"
I go stiff. "You know who I am?"
"You burned half of the Ghor Clan," she says with a laugh. "Everyone knows who you are."
"It wasn't my fault! Something's wrong with the land, and I can't get the right ink mix anymore. You've noticed it, right? Why else would you trek all the way out here?"
Her arms cross, but the rest of her body language softens. "I've noticed."
"Well, why haven't you told anyone? They'd listen to you!"
"I just got out of Wargate, slick. Need some time to get my head right, and I'm afraid that doesn't involve getting everyone all riled up about the potency of maaka scat. But, I've seen your work. You're too good to toss to the Wilds. I know some people in Burning Tree Clan, and they'd be glad to have you. I'll show you how to make the ink. It's potent. It can even heal fighters when the Rage strikes. Not like it healed you~you must have had a couple hundred blocks' worth of healing magic. But it helps, and we need all the help we can get."
"Wait~" My mind tumbles slowly, trying to put everything together. "Back at the camp~you knew that ink would heal me. And you knew I would follow you?"
Baas smiles. "Maybe. Now do you want the ink recipe or not?"
I do. I absolutely do.
So we trek into the forest in search of pine bark. The trees here are majestic, tall specimens reaching toward the sky, but something eerie pokes in the back of my mind. There's a pattern to the trees—oak, twelve steps, pine, eight steps, pine, fifteen steps, willow, then another oak. Over and over and over again.
#figure(image("002_Rage of the Unsung/07.jpg", width: 100%), caption: [Selesnya Guildgate | Art by: <NAME>], supplement: none, numbering: none)
"We've crossed into Selesnyan territory," I say.
"You mean that pack of battleboars straight from the salon didn't give it away?" She laughs, then steps up in front of a towering pine, balls her fist, and delivers a solid gut-punch to the tree trunk. A couple dozen bark chips fall to the ground. I go to pick them up, but Baas laughs again. "I bet you're the type that just grabs the first bark he sees. The strongest pieces will cling to the tree after you've given it a little love tap. Give it a go."
I pound my fists against the trunk a few times. Nothing happens except scratching up my knuckles. "It'd be easier if I was built like you," I mumble.
"You think size is the only thing that matters on the battlefield?" She steps up so we're standing eye to navel. "Here, flip me. Put your arm around my neck, twist, then lean in with all your weight."
I follow her instructions, and I'm able to take her down with more than a bit of assistance on her part. But I get the gist. With a little practice, I could see it working. Maybe not on someone quite her size, but next time my brother tries to steal my tips, I can teach him a thing or two.
My heart goes cold at the thought. Well, colder than it already is. Who knows when I'll see Jiri again. Burning Tree's territory is so far off. Maybe he'll come visit when the war dies down, but the way aggressions have been ramping up these past few months, who knows when that'll be.
"Why are you here, running from battle?" I ask her. "We need you out there fighting. Did Wargate 'rehabilitate' you?"
"Ha, no. I'm all about bashing civilization to bits. I just can't be on the front line while #emph[you-know-who ] is out there. Too many memories of us fighting side by side."
"Daeska?"
Baas slits her eyes at me. "Yeah," she grumbles. "We were at the Tin Street Market, browsing around, spending a minute away from the battlefront together, when the mayhem broke out. Boros soldiers started getting handsy, saying they saw us assault a couple of old minotaurs. Liars, all of them. Rage got the best of me and made a bad situation worse. I got arrested. Daeska got away. Came to visit me a few times, promising to wait ten years for me to get out of Wargate, if that's what it took. Turns out, I got released early, only to find out that tramp hadn't even waited ten months."
"Cyclopes," I say, shaking my head.
"Anyway, I figure I'm still doing my part. Helping the cause, and—"
We both perk up at the sound of a feral roar from deep in the woods.
"Maaka," we say in unison. Source of the final ingredient.
We cut through the perfectly spaced trees, noticing how even the detritus upon the earth looks like it's purposefully spread. Every sixty steps, I'm leaping over the same pile of rocks, and every eighty-eight steps, we pass the same fallen oak. The brambles in between trees become thicker, denser, sharper. Just when I think we won't be able to travel any further, we see the source of the roar, what has got to be the biggest, most beautiful maaka I've ever seen—bulging muscles barely contained by its lustrous red fur. We track it for nearly an hour before it does its duty, and then Baas pulls out her clay pot and mixes the ingredients together, using the stump from one of the fallen trees as a makeshift table. The ink's glow sets in almost immediately, and without asking, she pours half of the mix into my bowl.
"Thanks," I say, preparing to set off for whatever awaits me in the Burning Tree Clan. But then I take a second look at the tree stump. That eerie feeling overwhelms me as I count the too-wide rings. I shake my head. This massive oak, probably forty feet tall, is only five years old.
On a whim, I put my sticky fingers to good use and climb up to the top of a tree. From this vantage, the forest looks less like a forest and more like a giant fence dividing the Rubblebelt wilds from a stretch of Selesnyan territory.
#figure(image("002_Rage of the Unsung/08.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
I was right. There #emph[is] a war raging beneath our feet, only it's not one fought with knives and cudgels. It's a silent war fought with growth magic. Selesnya had planted thousands and thousands of saplings, and then accelerated their growth until they had the perfect impenetrable barrier. And they've been leaching magic from our lands to do it, thinking we'd never have the smarts to figure it out.
We wouldn't starve, of course. Even if all the plants and animals in the Rubblebelt died off, there would always be war to feed us. We'd press further into civilization, tearing down Izzet labs and Orzhov basilicas and Azorius training facilities, doing Selesnya's dirty work for them. Meanwhile, they laugh and sing and hold hands within their manufactured gardens, pretending like they are above the "savagery" of fighting.
This~#emph[this] is something that I can get mad about. I feel a spark in my chest, a kindling of Rage waiting to be stoked. Now all I have to do is summon the courage to get the rest of the clan mad about this, too.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
"I challenge for the position of clan chieftain," I say, legs spread wide, body leaned slightly forward, scowl on my face that could scare off an entire herd of battleboars. Ruric and Thar might not have time to listen to theories about limp grass and brittle bone, but they can't turn down a challenge.
The camp goes silent. It is not the silence of tension, but that of barely contained laughter.
The two-headed ogre sighs, and they rise from their throne of skulls and step up to me. Ruric smiles, revealing a chunk of meat caught between his jagged incisors. "I suppose I could use your scrawny bones as toothpicks. Who says we're uncivilized, see?"
"You're unfit to be our leaders," I say, raising my voice so it cuts through the laughter, and I cling to hope that this altercation will be resolved with the aid of aggressive body language. "The Rubblebelt is practically withering right under your noses, and you don't even bother to look up and ask what's causing it."
"Do you want to fight, or do you plan to bore us to death with your words?" says Thar.
Ruric and Thar step closer. Talking isn't going to work. Violence is all they'll listen to. I throw my whole body behind a punch that lands in their gut, but it gives less than the tree trunk had. Ruric pounds his huge fist on the top of my head, and I crumple to the ground, white spots blooming in my vision. I scramble back up to my feet, struggling to keep the world under me as Ruric and Thar head back to their throne.
"I challenge for the position of clan chieftain," I say again. The ogres growl this time.
Jiri steps in and grabs me by the shoulders, his eyes desperate. "Arrus. Don't do this. Beg them for forgiveness and come back to the clan. Look, the burns didn't come out so bad." He turns his arm to me, now healed up into a mesmerizing pattern of shimmering scars. "Some of my mates want the same for their next set of tattoos. Please."
I step around Jiri, focused on the burn smoldering in my heart. "My challenge stands."
"You won't be standing for long," Thar says. The ogres beat their chest, and the Rage ignites within them. Their tattoos gleam, some of it the work of my own two hands. I recall the takedown move Baas showed me. I use my quickness to get behind the lumbering brutes, then climb up their back and set my hold. I lean. Lean harder. I think I hear vertebrae snap, but turns out, it's just Ruric and Thar popping their knuckles. Ruric reaches up, grabs me, throws me. I hit the ground hard and go rolling, stopping inches away from the bonfire.
I lay there, sure I've broken a couple ribs. Then I find myself caught in the shadow of a hulking figure. I cringe, thinking it's Ruric and Thar, come to stomp the life out of me, but a familiar deep voice rumbles the pit of my stomach.
"Good. You found your Rage," Dryzek says, looking down at me with a smile. "Now #emph[use] it."
Use it? Isn't that what I've been trying to do? I focus on what I'm mad about, ignoring the bonfire embers drifting onto my skin. I'm mad at the Selesnya Conclave, sure. I'm mad our lands are being drained of magic, paved over by civilization, poisoned by industrialization. But what I'm mostly mad about has been sitting with me for a very long time, before any of those things ever mattered to me. I'm mad that my people's stories have been lost, that my heroes have been hidden from me. I'm mad that not once as a young viashino had I sat down before the bonfire to hear stories of warriors with green scales and lashing tails, people like me, smashing civility with reckless abandon.
I force myself back up onto my feet. Ruric and Thar are already knuckles deep in what's left of a stack of raktusk ribs, and I hobble toward them. After a couple steps, my limp eases back into a steady gait, though the soles of my feet feel like I'm walking across hot coals. That feeling spreads~my knees, my gut, my lungs. My heart. There's no more pain, only Rage.
"I challenge for the position of clan chieftain," I say for the third time. Ruric and Thar start to get up again, but something in my eyes must spook them, because they sit back down and press hard against the back of their throne. "Listen to what I'm saying. The Rubblebelt is #emph[dying] . The plants are decaying, the animals are sickly, and it won't stop there if we don't do something about it. The Selesnyan Conclave is behind it. They're sucking the magic from our land to grow their own. We can't waste a day longer, a minute longer ignoring the problem, or there will be nothing wild left for us to fight for."
#figure(image("002_Rage of the Unsung/09.jpg", width: 100%), caption: [Privileged Position | Art by: Wayne England], supplement: none, numbering: none)
I take a deep breath, let it out. It's then I notice that I am completely engulfed in red, roiling flames, a lifetime's worth of pent up Rage magically surging out from me all at once. I dial it back until the flames merely flicker.
Jiri steps up next to me and puts his hand on my shoulder. The flames spread to him, and soon he is engulfed as well. "I stand with Arrus," he says.
Baas puts her hand on my other shoulder. She catches the flames, too. "I stand with Arrus."
"As do I," Dryzek's voice booms. He stands behind me, and my flames all but leap for him. Others join us, until together, we burn brighter than any bonfire ever could.
"I challenge you, chieftain, to do something about this," I say to Ruric and Thar, speaking for our clan and for #emph[all] Gruul clans. "We've fought for you. Now we need you to fight for us."
"If Selesnya wants a war, we'll give them a war," Ruric and Thar say, walking up to me. Ruric reaches out, places his open palm upon my head. Red flames wick up his arm, then set our leaders fully alight. "Stories will be told of this war for generations, and your name, my fierce warrior, will be at the center of them."
#figure(image("002_Rage of the Unsung/10.jpg", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
|
|
https://github.com/hyrious/typst-syntax-highlight | https://raw.githubusercontent.com/hyrious/typst-syntax-highlight/main/README.md | markdown | MIT License | # Typst syntax highlight
[](./LICENSE.txt)
[](https://www.sublimetext.com/blog/articles/sublime-text-4)
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://user-images.githubusercontent.com/8097890/241095831-5f66d097-bb86-44e6-9014-7237cb9f59e4.png">
<source media="(prefers-color-scheme: light)" srcset="https://user-images.githubusercontent.com/8097890/241097972-48c03f13-3bc8-4095-8533-28de079599fc.png">
<img alt="screenshot" src="https://user-images.githubusercontent.com/8097890/241095831-5f66d097-bb86-44e6-9014-7237cb9f59e4.png">
</picture>
</p>
## Install
- Via Package Control: search for `Typst`.
- Manual: clone this repo into your Sublime `Packages` folder.
## Recipes
### Show auto complete panel without pressing TAB
You can create a [syntax specific settings](https://www.sublimetext.com/docs/settings.html#syntax-specific-settings)
with the config below:
```json
{
"auto_complete_selector": "text.typst"
}
```
### Build with Makefile
You can create a [build system](https://www.sublimetext.com/docs/build_systems.html)
with the config below:
```json
{
"cmd": ["make"],
"selector": "text.typst",
"file_regex": "┌─ (...*?):([0-9]*):?([0-9]*)",
"env": { "NO_COLOR": "1" },
"cancel": { "kill": true }
}
```
## License
MIT @ [hyrious](https://github.com/hyrious)
|
https://github.com/cloudsftp/zivi.typ | https://raw.githubusercontent.com/cloudsftp/zivi.typ/latest/README.md | markdown | Apache License 2.0 | # Zivi
This is a [typst](https://github.com/typst/typst) template based on [ModernCV for Typst](https://github.com/giovanniberti/moderncv.typst) which was in turn inspired by [moderncv](https://github.com/moderncv/moderncv), a LaTeX template.
## How to use
Currently, there is no documentation.
The example file serves as the only documentation.
## Examples
See `example.typ` and `example.pdf`.
## How to customize colors
Currently, the `project` function exposes three different color parameters:
* `main_color`: Used by left-side heading bars. The default color is "Verkehrsblau".
* `heading_color`: Used in headings text. It is the same as `main_color` per default.
* `job_color`: Used in the main job occupation text. The default color is red. |
https://github.com/dyc3/ssw-555-agile-methods | https://raw.githubusercontent.com/dyc3/ssw-555-agile-methods/main/README.md | markdown | # ssw-555-agile-methods
## How to build
1. Clone the repo
2. Download typst: https://github.com/typst/typst#installation
3. Build the paper with
```
typst compile main.typ
```
Recommended vscode extension: `nvarner.typst-lsp`
|
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/packages/typst.angular/README.md | markdown | Apache License 2.0 | # Typst.angular
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 15.2.6.
See [Angular Library Docs](https://myriad-dreamin.github.io/typst.ts/cookery/guide/renderer/angular.html).
|
https://github.com/dccsillag/minienvs.typ | https://raw.githubusercontent.com/dccsillag/minienvs.typ/main/minienvs.typ | typst | MIT License | #let _counter_prefix = "minienvs:"
#let _current = state("minienvs:current", none)
#let _config = state("minienvs:config", (
no-numbering: (
proof: true,
),
bbox: (:),
head-style: (
proof: it => [_#{it}_],
),
transforms: (
proof: it => [#it #h(1fr) $space qed$],
)
))
#let _recognize(term_content) = {
let _get_nth_bit(x, i) = {
if x.has("children") {
_get_nth_bit(x.children.at(i), i)
} else {
x
}
}
let _split_head_tail(x) = {
if x.has("children") {
(x.children.at(0), x.children.slice(1, none).join([]))
} else {
(x, none)
}
}
let (head, tail) = _split_head_tail(term_content)
if not head.has("text") {
return none
}
if tail == none {
return (head.text, none)
} else {
(head.text, tail)
}
}
// TODO hanging indent?
#let _minienv(term, config) = {
let maybe_recognized = _recognize(term.term)
if maybe_recognized == none {
// TODO: just return a plain term, but without falling prey to infinite recursion
// return term
return [
*#{term.term}* _#{term.description}_
]
}
let (head, tail) = maybe_recognized
let kind = lower(head)
let c = counter(_counter_prefix + kind)
c.step()
locate(loc => _current.update((head: head, count: c.at(loc))))
let head-format = config.head-style.at(kind, default: it => [*#{it}*])
block({
head-format[#head]
if not config.no-numbering.at(kind, default: false) {
head-format[ #{c.display()}]
}
if tail != none {
head-format[#tail]
}
head-format[.]
_current.update(none)
config.transforms.at(kind, default: it => [_#{it}_])([#{term.description}])
}, width: 100%, ..config.bbox.at(kind, default: ()))
}
#let minienvs(doc, config: auto) = {
if config != auto {
// FIXME: dict update instead of overwrite
_config.update(x => config)
}
show figure.where(kind: "minienv"): _ => []
show terms: (ts => _config.display(c => ts.children.map(t => _minienv(t, c)).join([])))
doc
}
#let envlabel(label) = locate(loc => _current.display(current => [
#if current == none {
panic("`envlabel` used out-of-place. Must be used within the head of a minienv")
}
#let relevant_counter = counter(figure.where(kind: "minienv"))
#let saved_count = relevant_counter.at(loc)
#relevant_counter.update((current.count.at(0) - 1, ..current.count.slice(1, none)))
#figure([], gap: 0pt, placement: none, kind: "minienv", supplement: current.head)
#label
#relevant_counter.update(saved_count)
]))
|
https://github.com/3w36zj6/textlint-plugin-typst | https://raw.githubusercontent.com/3w36zj6/textlint-plugin-typst/main/README.md | markdown | MIT License | # textlint-plugin-typst
[](https://www.npmjs.com/package/textlint-plugin-typst?activeTab=versions)
[](https://www.npmjs.com/package/textlint-plugin-typst)
[](https://github.com/3w36zj6/textlint-plugin-typst/blob/HEAD/LICENSE)
[](https://github.com/3w36zj6/textlint-plugin-typst/actions/workflows/ci.yaml)
[textlint](https://github.com/textlint/textlint) plugin to lint [Typst](https://typst.app/)
## Installation
```sh
# npm
npm install textlint-plugin-typst
# Yarn
yarn add textlint-plugin-typst
# pnpm
pnpm add textlint-plugin-typst
# Bun
bun add textlint-plugin-typst
```
## Usage
```json
{
"plugins": {
"typst": true
}
}
```
## Options
- `extensions`: `string[]`
- Additional file extensions for Typst
## Syntax support
This plugin supports the syntax of Typst [v0.11.1](https://github.com/typst/typst/releases/tag/v0.11.1).
Legend for syntax support:
- ✅: Supported
- 🚫: Not in progress
- ⌛️: In progress
- ⚠️: Partially supported (with some caveats)
| Typst | textlint | Markup | Function |
| --- | --- | --- | --- |
| Paragraph break | Paragraph | ✅ | 🚫 |
| Strong emphasis | Strong | ✅ | 🚫 |
| Emphasis | Emphasis | ✅ | 🚫 |
| Raw text | Code / CodeBlock | ✅ | 🚫 |
| Link | Link | ✅ | 🚫 |
| Label | | 🚫 | 🚫 |
| Reference | | 🚫 | 🚫 |
| Heading | Header | ✅ | 🚫 |
| Bullet list | List / ListItem | 🚫 | 🚫 |
| Numbered list | List / ListItem | 🚫 | 🚫 |
| Term list | | 🚫 | 🚫 |
| Math | | 🚫 | 🚫 |
| Line break | Break | ✅ | 🚫 |
| Smart quote | | 🚫 | 🚫 |
| Symbol shorthand | | 🚫 | 🚫 |
| Code expression | | 🚫 | 🚫 |
| Character escape | | 🚫 | 🚫 |
| Comment | Comment | ✅ | 🚫 |
## Examples
### textlint-filter-rule-comments
Example of how to use [textlint-filter-rule-comments](https://www.npmjs.com/package/textlint-filter-rule-comments) is shown below.
```typst
This is error text.
/* textlint-disable */
This is ignored text by rule.
Disables all rules between comments
/* textlint-enable */
This is error text.
```
Also, you can use single-line comments.
```typst
This is error text.
// textlint-disable
This is ignored text by rule.
Disables all rules between comments
// textlint-enable
This is error text.
```
## Contributing
This project is still under development, so please feel free to contribute!
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D
## Maintainers
- [@3w36zj6](https://github.com/3w36zj6)
## License
[MIT License](LICENSE)
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/056%20-%20Outlaws%20of%20Thunder%20Junction/007_Episode%204%3A%20Finding%20Tarnation.typ | typst | #import "@local/mtgstory:0.2.0": conf
#show: doc => conf(
"Episode 4: Finding Tarnation",
set_name: "Outlaws of Thunder Junction",
story_date: datetime(day: 20, month: 03, year: 2024),
author: "<NAME>",
doc
)
It had been hours since Oko's crew evaded the Sterling Company, but Kellan couldn't stop fidgeting. He tucked his hands into his wool-lined pockets, knees bouncing with unease. A pot of stew simmered over the campfire in front of him, each flame casting shadows against the nearby rockface.
The Outcaster sat in the distance, guarded by Kaervek and Rakdos. His coat was made up of layers of fur, moss, and cactus armor, and his wiry mustache curled in every direction. A thick cloth covered his eyes, and his hands were bound with rope—not that he needed either. Eriette's charms had rendered him almost euphoric, and without outside help, there was nowhere for Nolan to run.
Outcasters were notorious hermits. If anyone was going to come looking for him, it was more likely to be a band of coyotes, a flock of vultures, or a particularly loyal cougar. But with Annie's sight and Malcolm's ability to patrol the sky, they'd see danger coming from miles away. There was no need to worry.
And yet …
Kellan dug his fingernails into his palms. Oko had stolen from Bertram Graywater—#emph[twice] —which made everyone in their crew a target. Not just to the Sterling Company, but to any outlaws hoping to profit from the bounty that would inevitably be placed on their heads. The thought of being a wanted criminal made Kellan's stomach roil.
A wooden spoon landed in the stew, making him jump. Breeches scooped a portion into a tin bowl, too distracted to notice that Tinybones was behind him, rummaging through his coat pockets for a flask. When he found it, he opened the lid and tipped the contents back. Amber liquid sloshed through his ribcage, pooling at Breeches's feet.
Breeches snarled in alarm, spilling his stew in the process. His nostrils flared, and the goblin's claws flexed with rage. He ran after Tinybones, whose bones gave a jovial shudder as he bounded over the rocks.
Umezawa's stifled howl echoed through the sheltered hillside. "What is taking you so long? My grandmother could stich a #emph[quilt] faster than this!"
Geralf tutted, eyes fixed in concentration. His fingers danced over Umezawa's wound as if threading an invisible needle. "Weaving flesh back together is an art form. Now, stay still."
Umezawa gritted his teeth. "You're enjoying this #emph[far ] too much."
"I don't know what you mean," Geralf replied, but the rapture in his eyes was undeniable.
Gisa feigned distress. "You're torturing the poor man. And not even in a fun way!" She leaned toward Umezawa, voice becoming song-like. "I can take all your pain away."
Geralf rolled his eyes, shooing her away with a hand. "The point is to heal him, not kill him."
Another stitch went through Umezawa's skin, and he shut his eyes tight. "If I pass out, don't let your sister anywhere near me."
Gisa pushed her bottom lip into a pout.
A breeze tumbled through the hills, making the fire shudder. Shadows pooled behind Kellan, and he turned to see Ashiok making their way toward the Outcaster.
Ashiok lifted their hands above the Outcaster's head, fishing for secrets with the lure of magic. Their fingers moved slow and deliberate. Memories were pulled out of Nolan's mind, leaving streaks of silver threads in the air.
#figure(image("007_Episode 4: Finding Tarnation/01.png", width: 100%), caption: [Art by: <NAME>], supplement: none, numbering: none)
Kellan's skin prickled with concern.
"Don't worry," said Oko. He took a seat beside Kellan, leaning back until the firelight trickled over his sharp features. "Ashiok is perfectly capable of getting the answers we need without hurting him."
Kellan dug his heels into the ground. How long had his father been watching him?
"I didn't agree to this," he said. "You promised no innocents would get hurt. And just because he's been charmed doesn't mean he isn't scared. Ashiok isn't someone you—or anyone—should be trusting." He glanced back at Ashiok, shuddering at the memory of their confrontation on Eldraine. But for Ashiok's part, they barely seemed to notice Kellan was there at all.
"It's not my fault the plan went awry. And the Outcaster knew what he was getting into when he agreed to help Graywater. If he didn't want trouble, then he shouldn't have walked into it."
"He was surrounded by armed guards. For all we know, he was on that train under duress," Kellan argued. "I'm not sure he had a choice."
Oko's eyes flashed. "Is that how you feel? Like you had no choice?"
Blood rushed to Kellan's head, making his cheeks darken. "I—I never said that."
The challenge in Oko's stare vanished as if it were never there at all. He smiled and gripped Kellan's shoulder. "Everyone made it off that train. You may think I left those people behind, but I knew you could handle it—you're my son, and I trust you."
The tension didn't leave Kellan, even as Oko pulled his hand away. He wanted to believe his father. He wanted his approval. But he'd seen Oko's face on the train. Oko hadn't believed in him; he'd been ready to abandon him.
#emph[Maybe it was just a misunderstanding] , Kellan's thoughts stirred, hopeful. #emph[He's your father. Even if he'd wanted to leave those people, he wouldn't have left ] you#emph[.]
Smoke-like ribbons crept over the sand, and Kellan leapt to his feet abruptly. Ashiok waited with their hands folded together, shadows spilling away from their horns.
Oko stood, hungry for information. "What did you find?"
Ashiok tilted their head, lips pursed tight. "The artifact is a key, just as we thought. But it is one of six."
Oko brushed a finger over his brow. Kellan realized it was a tell, something he did to hide his frustration. "Where are the others?"
"Akul has the other five. He wears them in a medallion around his neck," Ashiok explained, and the nearby crew mumbled their displeasure. "But there's something else I found in the Outcaster's mind. A map to Tarnation exists—and it's buried in Thief's Folly."
From across the campfire, Gisa squealed with delight.
"You've heard of it?" Oko asked, bemused.
Geralf hummed from above Umezawa's vanishing wound, finishing the last seam. "It's a graveyard for prospectors."
Gisa flashed her teeth, eyes sparking with venomous hunger. "So many bones. So many beautiful corpses to dig up."
Oko studied each member of the crew before landing on the necromancer siblings. "Are the two of you up for a little side mission?"
Gisa clapped her hands together eagerly, and Geralf gave a curt nod.
"Let's talk when we get back to the saloon." Oko turned to Tinybones, who was busy helping himself to a portion of stew; it dripped through the hollow of his ribcage. "Can you flag down Annie and Malcolm? The sooner we get out of here, the better."
The others started to pack up their gear, when Kellan's words erupted out of him, too important to hold back. "What about Nolan?"
"What about him?" Oko asked, barely meeting his gaze.
Kellan lifted his shoulders, sheepish. "Well—I mean—is someone going to take him home?"
Some of the others snickered.
Oko quirked an eyebrow, like Kellan was a strange kind of curiosity. "He's an Outcaster. They thrive in the wilderness."
"But we can't just leave him here," Kellan blurted out. "Hardbristle is days away. And he's got no supplies, or water, or—"
Ashiok took a step closer, shadows rumbling along the desert floor like they were being tested. "You fear for his life." It wasn't a question.
Kellan opened his mouth, but the words were too tangled to sort through.
"Fear not," Ashiok said, curling their long claws. "I do not wish the man dead."
"How wonderful to see that we're all on the same page," Oko said with a hint of irritation.
Annie's voice sounded from the darkness. "I can go with Kellan and escort the Outcaster to the nearest oasis. I'm sure he can make his way home from there."
Kellan smiled weakly in appreciation.
Oko's mouth twitched. "I'm sure you know how important it is to the mission that you don't get caught—or followed."
Annie nodded. "We'll stay out of sight."
Kellan followed her away from the campfire. When he was certain the rest of the crew was out of earshot, he said, "That's twice you've helped me. Thank you."
Annie didn't respond. She continued down the path and clicked her tongue against the roof of her mouth, drawing Fortune's attention. He stalked out of the evening breeze, body relaxed in a way that showed trust.
"What made you sign up with Oko?" Kellan asked.
"It was the lesser of two evils."
He couldn't tell if she was joking or not. "You don't trust him?"
Annie winced. "Trust is for favors. This is a job—and I reckon I don't trust anyone who hires outlaws to do their dirty work."
Kellan stared at the ground. "I wasn't sure you #emph[were] an outlaw, to be honest. You don't seem like the others. I thought—well, I don't know."
"That I was more like you?"
Kellan didn't answer.
She shook her head like she was trying to rid herself of a memory. "A while back, I was with the Freestriders. We made the mistake of robbing Akul and the Hellspurs. He tracked us for weeks, relentlessly. We lost good people because of it. And when we tried to make a deal and return what we stole, my nephew was badly injured during the exchange. We barely escaped. After that, my nephew was never quite the same. He returned to join our people not too long ago." Her eyes steeled. "It was never Akul's plan to let us go. I'm not even sure he cared much about what we stole. He just wanted blood—and he used our trust to get it.
"I'm not saying I'm any better than the crew around that fire. I know what I am, and what I've done. But Akul—he's a different kind of outlaw. The #emph[worst] kind. I don't want to see anyone hurt the way my nephew was. If there's really power in that vault, and Akul gets ahold of it?" Her expression hardens. "I can't let that happen."
Kellan looked back to the campfire in the distance, watching his father deep in conversation with Vraska and Ashiok.
#emph[The worst kind of outlaw …]
His eyes remained pinned to Oko, long enough for Annie to notice.
"Family is tough—blood or otherwise," she said quietly. "It's not always easy to know someone's heart. But in my experience?" She shrugged. "Time helps, but a gut feeling is always worth paying attention to."
Kellan blinked away his embarrassment.
Annie took hold of Fortune's reins. "I reckon that's enough storytelling for one day. How about we go fetch the Outcaster and get him on the trail home?"
They made their way to Nolan and helped him onto the saddle before taking the winding path down the hillside. Kellan flew alongside them, careful not to fall behind. Even though he wanted to take one last look at the campfire, he didn't.
He was too worried that he'd find his father watching him—and that all he'd see was doubt.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
The saloon doors slammed open, and Gisa and Geralf half-stumbled into the room, eyes wide with delirium. They took a few steps inside, boots clunking heavily against the floorboards. The overhead light spilled over their faces, showing off a mess of fresh bruises and bloodied cuts.
Geralf tugged at the leather strap around his eye, making sure it was straight. Gisa swept a hand over her disheveled, knotted hair.
"Welcome back," Oko announced, leaning against the edge of the bar. "I see Thief's Folly has been kind to you both."
Geralf picked at the dried blood under his nails. "I'd rather not talk about it."
Gisa blew at the sand covering her leather bracers, and a small dust cloud appeared in front of her. She grimaced.
Her brother removed a piece of rolled-up parchment from his coat and held it up for Oko to take. "I believe this is what you were after."
Oko flattened the map against the bar, relishing the sight of every strange marking.
He finally had it—the path to Tarnation, and <NAME>.
"Is that what I think it is?" Vraska asked. She stepped away from Ashiok's curling shadows and leaned across the counter. "So—the vault floats above the city."
Oko's thoughts were already moving into hyper-focus. "The vault doesn't matter if we can't get ahold of the keys. And in order to get the medallion, we need to be in the same room as Akul." He looked up, searching the room for Annie, and found her sitting with Kellan at one of the far tables. They'd been almost inseparable since the train incident.
Oko's expression soured. He wasn't opposed to his crew becoming friendly—but it was easier to control people when he knew where they stood. Kellan's burgeoning friendship could be a problem. He didn't like it. Didn't #emph[trust] it.
He faked a smile anyway. "Annie—you'd recognize the Hellspurs from Akul's inner circle, correct?"
She tapped a nail against her glass bottle. "I suppose so."
"If we were to track one of them down in Tarnation, do you also suppose they'd lead us to wherever Akul's headquarters are?"
"Maybe. But you can't just walk into Tarnation like it's a holiday destination," Annie said. "There's a reason only Hellspurs know how to find the city. They don't let outsiders in—and they #emph[certainly] wouldn't let them leave."
"We're all capable of playing our roles," Oko countered. "If we dress like Hellspurs and keep a low profile, we can hide out in the open."
"I'm not sure our crew is exactly #emph[low profile] ," Annie said. "We have a giant demon and a skeleton, for starters. No amount of Hellspur attire is going to make them blend in."
"We'll split up the team and take a small group of four into the city," Oko said, as if the solution was simple. "Everyone else can wait outside Tarnation until we're ready to open the vault."
"Count me in," Vraska said.
"Perfect," Oko agreed. "Annie—you're with us, too."
She downed the rest of her bottle in acknowledgment.
Oko knew who had to be fourth. He'd known since before the necromancers brought the map back.
But he drew out the wait, gaze moving from one crew member to the next.
"Kellan," he said finally.
The shock on his son's face was clear. "You want #emph[my ] help?"
"I need you with me. You have skills that will be useful in Tarnation," Oko said. "Especially once we find Akul."
Kellan bit the edge of his lip, but whatever was weighing on his conscience didn't matter. Oko had posited Kellan as a necessary player; and Kellan wouldn't let his father down.
The boy nodded. "Alright. I'll do it."
Oko feigned gratitude, but he wasn't the least bit surprised. Kellan craved his attention. He wanted #emph[acceptance] . Flattery, it seemed, was the key to keeping his son on his side.
#figure(image("007_Episode 4: Finding Tarnation/02.png", width: 100%), caption: [Art by: Fariba Khamseh], supplement: none, numbering: none)
He needed the boy's help, in more ways than he was prepared to explain. And Kellan was willing to oblige him, freely and without question, all because Oko was family. A stranger in almost every way except blood—but to Kellan, that was enough. That kind of allegiance? It was the one thing Oko #emph[was ] grateful for. He just needed to make sure it would last.
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
An enormous rock with sharp, jagged edges hovered in the sky. Clouds swirled around the tallest spire as if caught in its orbit while lava flowed from the edge, pooling into the twisted rivers that moved through Tarnation. It left an angry hue on every surface, glowing like the embers of a newborn fire.
#emph[<NAME>. The vault.]
A maze of warped rock foundations wound through the city below, surrounded by a circular canyon. Buildings made of solidified lava rock and sharpened bits of wood were everywhere, and animal bones framed many of the doors and windows, illuminated by the colorful lanterns hidden inside.
Kellan adjusted his hat, keeping far from the thin veins of molten lava running into the street. There was smoke everywhere—and more Hellspurs than he could count.
In the clearing to his left, a street duel was taking place. Two mountainous Hellspurs sliced at one another with a pair of axes. The edges blazed with remnants of thunder, casting sparks every time the blades collided. A small crowd jeered and roared, and when one of the axes landed in the other man's chest, the onlookers raised their arms in triumph. Kellan felt ill as they dragged the body toward an enormous fire pit and rolled the corpse onto the hot coals.
"A common practice here to settle disputes. More civilized than killing someone's whole family, I suppose," said Oko, noticing Kellan's gaze. He gave a carefree whistle and motioned ahead to a saloon door glowing with cindered edges. He'd shapeshifted into a rugged, human version of himself that blended in perfectly with the rest of Akul's crew, and his chest was covered in an elaborate display of bone armor.
They'd already visited three other saloons, but so far there'd been no sign of anyone from the inner circle of the Hellspurs. Nearby, Annie adjusted the black bandana covering the lower half of her face. Kellan wondered if she was afraid of being recognized, or of finally facing the people who'd hurt her nephew all that time ago.
When Annie, Oko, and Vraska stepped through the doors, Kellan took a silent breath, counted to five, and did the same.
The ceiling curved like the inside of a barrel. Everything smelled of metal and sour fruit, making Kellan recoil. He followed Annie's gaze to a woman sitting at the bar. She wore a spiked wrought iron pauldron, each point tinged with red-hot embers. The rest of her clothes were of burgundy material, frayed at every edge, with a small thunder pistol and hatchet tucked in her belt. Smoke radiated from her skin, as if she were ready to catch fire at any moment.
Annie went rigid, voice nearly inaudible. "That's <NAME>. One of Akul's crew."
Oko gave a brief nod as he strolled past Annie toward the bar, with Vraska taking the empty seat beside him. Annie retreated into the corner of the room, putting as much space between her and the Hellspur as possible.
Kellan brushed a hand over his cloak, avoiding the burnt edges. He felt like an impostor. A scarecrow among soldiers. But mostly he just hoped none of the Hellspurs would notice.
Kellan found a booth at the back and sat down, hands fidgeting beneath the table. Across the room, Oko was busy striking up a conversation with the bartender, as if pretending to be someone else was the easiest thing in the world.
"This ain't your table," a voice barked, gruff.
Kellan looked up to find three Hellspurs glaring down at him. The one who spoke had skin that burned like lava; the other two wore iron faceplates that covered everything except their flaming hair.
"I—I'm sorry," Kellan sputtered. He tried to stand, but the lava-skinned Hellspur shoved him back down.
"You're #emph[sorry] ?" he repeated, flashing his sharpened teeth. "You didn't learn them manners in Tarnation. I reckon you ain't supposed to be here at all." He pulled out a heavy-looking thunder pistol and pointed it at Kellan's chest.
"I'm just here to meet someone!" Kellan said quickly, stumbling over every word. "They have information I need about a job."
The trio cackled.
"No Hellspur would trust you with so much as an ember, boy," the man spit. "Either someone dragged you out here to skin your hide, or you're serving me a fabrication."
Kellan held up his hands. "I don't want any trouble!"
Their laughter continued, even more raucous this time, and Kellan took the opportunity to slip out of the booth. He made it three steps before one of the Hellspurs shoved him to the ground, knocking his face against the wooden planks with a #emph[crack] . When he pressed his lips together, he could taste blood.
"Get up, coward," the Hellspur growled. "I'm only just getting started."
Oko's spurs rattled to a stop, blocking Kellan's line of sight. "Leave the kid alone."
Kellan pushed himself up shakily, relief knotting in his throat.
The Hellspur narrowed his eyes. "He's no Hellspur—and this ain't none of your business."
Oko didn't move. "He says he's here for a job, right? For all you know, Akul's the one who sent for him."
The man snorted. "Akul could snap this runt in half without even trying. He'd sooner hire a field mouse than this bag of twigs."
Oko's mouth hitched, taunting. "You willing to risk finding out which one of us is wrong?"
The three Hellspurs turned to one another, hesitant.
Oko shoved Kellan to the side, removing him from the Hellspur's path. "Let him deal with whoever invited him here, so the rest of us can drink in peace."
Fire raged in the man's eyes. He took a step forward. "What are you going to do about it?"
The two iron-masked Hellspurs drew their blades.
"Three against one?" Oko tutted. "Who's the coward now?"
The Hellspur laughed, low and deep, before swinging his massive fist toward Oko's head. Oko ducked, missing the blow by an inch, and cracked his elbow against the man's neck.
The saloon erupted into chaos, and the musicians in the corner stepped up the pace of their mad jig. Glass shattered, thunder exploded, and Kellan covered his face, too stunned to move. His ears rang, gaze processing his father and Vraska, each taking swings at every Hellspur around them.
Vraska was quick, slicing at every Hellspur with a long saber before they even had a chance to turn their weapons on her. When one of the iron-masked assailants charged, Vraska smashed the back of a thunder pistol against their face, knocking their mask to the ground. She shoved her boot against their neck, pinning them to the floor—and used her gaze to turn them to stone.
Some of the other Hellspurs stumbled back in alarm, but most only saw it as bigger fuel for a bigger fire. They roared, unloading their thunder blasters across the saloon, smashing the skull-shaped bar to pieces.
Oko shapeshifted from one Hellspur to the next, causing mayhem as he alternated between throwing punches and shifting into each neighboring Hellspur. None of them looked too closely before swinging for the nearest available jaw.
Kellan flexed his hands, ready to summon two swords of energy, when Annie grabbed his arm.
"Don't!" she argued. "We need to go after Twist. If she gets away, we might not get the chance to find Akul again." She motioned for the saloon windows, which were swung wide open.
"I can't leave him," Kellan said, firm.
Annie's eyes blazed. "Wouldn't he tell you the mission comes first?"
"I've been looking for him for so long. I won't leave him now!" Kellan said and flung a golden vine toward the Hellspur whose axe had been raised over Oko's unassuming frame, knocking her across the room.
Oko turned, eyes wide, when a thunder blast exploded through the saloon doors, sending wood splintering in every direction. Twist Fandango stood in the frame, hair curling with flames. Behind her were half a dozen armed strangers. Not just Hellspurs—but Akul's inner circle.
One of them grabbed Kellan before he had a chance to react, clamping a pair of iron cuffs to his wrists. He took a staggered breath before realizing his magic was subdued. When he searched the room for Oko, Annie, and Vraska, they'd all been overtaken, too.
Kellan felt his stomach sink as the realization dawned on him: no one was coming for them. The rest of the crew would know better than to burst through Tarnation on a rescue mission. They were hired criminals, not friends. Twist stepped forward and sneered, holding her hatchet to Oko's throat. He sputtered as something fizzled against his skin, forcing his illusion to fade.
"So, you're the fae we've heard so much about," Twist said, drawing out her words like a slow poison. "Someone I know has been #emph[very] anxious to meet you."
"I do love my fans," Oko managed through strained breaths as the two Hellspurs holding him back tightened their grips.
Twist turned to the others. "Tie 'em up—they're coming with us. Akul wants to deal with these trespassers personally."
#v(0.35em)
#line(length: 100%, stroke: rgb(90%, 90%, 90%))
#v(0.35em)
Kellan's toes grazed the floor as he struggled to keep his balance. His arms were raised above his head, chained to the rafters alongside the rest of the crew.
"Please tell me there's a second part to your plan," Vraska hissed through her teeth, swaying beneath the chains. "Or at the very least, a backup."
Oko looked up at the only bit of sunlight peering through the high ceiling and squinted. The prison was an enormous dome, littered with crushed pieces of rock. "This looks like an old quarry."
"It is," Annie said dryly. "Which means we're at the lowest level possible. Even if we manage to get out of these cuffs, we'd have to claw our way out of the entire city."
Vraska shook her head. "I #emph[told] you bringing the kid was a bad idea. A bunny would've made a more convincing Hellspur than he did."
Kellan opened his mouth to apologize when the room shuddered, sending dust skittering down the walls. Footsteps boomed through the open doorway. Akul himself stalked through the dark mist, head low and talons scraping over the rocky floor. His crew filled in behind him, hungry for entertainment.
Akul studied each of the hanging prisoners, golden eyes scanning their faces, until recognition hit him.
"Annie Flash." A low rumble sounded from deep in his chest. "I wondered when our paths would cross again. How is that nephew of yours?"
The rage on Annie's face said everything she couldn't.
A low rumble emerged from Akul's throat. "I'll give him this much—he's a tough kid. I've seen bastards twice his size die after one of my stings." The dragon turned his attention to Oko, hot steam erupting from his nostrils. "You have something that belongs to me."
Oko motioned to the chains. "Cut me loose, and I'll get it for you."
Akul let out a throaty snarl. He held a claw against Oko's neck, stopping short of drawing blood, and dragged it slowly down to his heart. "I thought I'd have to rip the truth from you—but you've brought the key right to my doorstep." He reached into Oko's bone-clad vest and pulled out the artifact.
Oko clenched his jaw, watching as Akul reached for the chain around his neck. A medallion hung in the center, five spikes protruding from the sides at uneven heights. In the center was a strange carving with six glass domes, all lit with a different color except for one.
Akul slotted the sixth key into the medallion, and the edges morphed into another spike. The final glass dome became an iridescent violet. The medallion clicked and moved, turning in place until the spikes revealed a pattern.
Kellan's eyes widened. They weren't six keys—they were six pieces of #emph[one] key.
And now they were united.
Akul roared, and a glow from deep inside him lit up every scale on his chest, like distant lightning in a dark storm cloud. Sparks crackled across his entire body, and he stretched his claws wide.
Oko hadn't taken his eyes off the dragon. "I take it you have no intention of letting us go?"
Akul's voice was lethal. "If I did that, I wouldn't have the pleasure of watching you suffer—and I intend to take my time."
Kellan's eyes shot around the room, frantic. Annie looked like she was going to be sick, his father, and Vraska …
#emph[No. I can't let this be my fault. I can't let them suffer because of me.]
He thought back to the battle he'd seen on the streets—the closest to honorable combat they got here. Kellan clenched his teeth, reaching for every ounce of courage hibernating in his veins. "I challenge you to a duel!" he blurted out.
Akul pulled his neck back in surprise before chuckling darkly. The contempt on his face was clear. The Hellspurs behind him broke into mocking fits of laughter.
#emph["What are you doing?"] Annie mouthed, fearful.
Kellan kept his eyes glued to Akul. "If I win, your crew has to let me and my friends go free."
Vraska's tendrils rose with interest.
Oko had no reaction at all. Just a calculating, pensive stare.
"I have no need to duel with prisoners," Akul drawled. "You're already at my mercy—of which I have none."
Kellan's heart thumped. "Even outlaws have a code, don't they?"
"You seem eager for a quick death, but I have other plans," Akul said. "Though, when it's time to finally throw your bodies into the bonfire, I'll make sure you're first. Consider it a gesture of goodwill." His eyes gleamed. "From one outlaw to another."
Kellan looked around, desperate for an idea, or a thought, or a—
"I never expected the infamous Akul to be so afraid of a child," Oko mused, unblinking.
Akul flinched, sucking the air between his sharp teeth. "#emph[Afraid] ?"
Oko lifted a brow. "Or maybe it's his magic you're afraid of. Maybe you prefer an easier target."
Kellan could feel the pressure seem to change in the room as the energy built and built. The scales across Akul's chest, each hard as steel, began to glow a sickly yellow. It was as if he were swelling with energy, with #emph[thunder] .
Vraska strained against the chains. "All that talk of torture, and now you'd rather kill us than go head-to-head with the kid?" Her words were scathing. "No wonder you need whatever is inside the vault. Without your crew, you're nothing."
Annie blinked, studying the others. "You're a coward," she said slowly, eyes burning toward Akul. "You went after my nephew for the same reason you go after unarmed civilians and low-level outlaws. They're a sure thing. And as much as you like to cause trouble, well—I can't imagine you're happy when trouble comes to your own front door."
"That's why you hide this place, isn't it?" Oko pushed. "To avoid a fight you didn't choose?"
Akul burned from within, smoke shooting through the gaps of his teeth with every breath. The rest of the room fell silent.
To a criminal like Akul, reputation was everything.
And Oko's crew had just challenged his.
After a long pause, the dragon lowered his head toward Kellan, teeth appearing in two razor-sharp rows. "Throw them in a holding cell," he said to the Hellspurs. "The duel begins at midnight."
|
|
https://github.com/liuguangxi/suiji | https://raw.githubusercontent.com/liuguangxi/suiji/main/examples/random-permutation.typ | typst | MIT License | #set document(date: none)
#import "/src/lib.typ": *
#set page(width: auto, height: auto, margin: 0.5cm)
#{
let rng = gen-rng-f(42)
let a = ()
for i in range(5) {
(rng, a) = shuffle-f(rng, range(10))
[#raw(a.map(it => str(it)).join(" ") + "\n")]
}
}
|
https://github.com/peterw16/da_typst_vorlage | https://raw.githubusercontent.com/peterw16/da_typst_vorlage/main/README.md | markdown | # Voraussetzungen:
Installation der vs-code Erweiterung Typst LSP, damit ein pdf generiert wird. |
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/visualize/path-02.typ | typst | Other | // Error: 7-47 path vertex must have 1, 2, or 3 points
#path(((0%, 0%), (0%, 0%), (0%, 0%), (0%, 0%)))
|
https://github.com/Myriad-Dreamin/typst.ts | https://raw.githubusercontent.com/Myriad-Dreamin/typst.ts/main/fuzzers/corpora/text/space_05.typ | typst | Apache License 2.0 |
#import "/contrib/templates/std-tests/preset.typ": *
#show: test-page
// Test that space at start of non-backslash-linebreak line isn't trimmed.
A#"\n" B
|
https://github.com/hrbrmstr/2023-10-20-wpe-quarto-typst | https://raw.githubusercontent.com/hrbrmstr/2023-10-20-wpe-quarto-typst/main/blank-test/blank-deno.typ | typst | // needed for callout support
#import "@preview/fontawesome:0.1.0": *
// Some definitions presupposed by pandoc's typst output.
#let blockquote(body) = [
#set text( size: 0.92em )
#block(inset: (left: 1.5em, top: 0.2em, bottom: 0.2em))[#body]
]
#let horizontalrule = [
#line(start: (25%,0%), end: (75%,0%))
]
#let endnote(num, contents) = [
#stack(dir: ltr, spacing: 3pt, super[#num], contents)
]
#show terms: it => {
it.children
.map(child => [
#strong[#child.term]
#block(inset: (left: 1.5em, top: -0.4em))[#child.description]
])
.join()
}
// Some quarto-specific definitions.
#show raw: it => {
if it.block {
block(fill: luma(230), width: 100%, inset: 8pt, radius: 2pt, it)
} else {
it
}
}
#show ref: it => locate(loc => {
let target = query(it.target, loc).first()
if it.at("supplement", default: none) == none {
it
return
}
let sup = it.supplement.text.matches(regex("^45127368-afa1-446a-820f-fc64c546b2c5%(.*)")).at(0, default: none)
if sup != none {
let parent_id = sup.captures.first()
let parent_figure = query(label(parent_id), loc).first()
let parent_location = parent_figure.location()
let counters = numbering(
parent_figure.at("numbering"),
..parent_figure.at("counter").at(parent_location))
let subcounter = numbering(
target.at("numbering"),
..target.at("counter").at(target.location()))
// NOTE there's a nonbreaking space in the block below
link(target.location(), [#parent_figure.at("supplement") #counters#subcounter])
} else {
it
}
})
// 2023-10-09: #fa-icon("fa-info") is not working, so we'll eval "#fa-info()" instead
#let callout(body: [], title: "Callout", background_color: rgb("#dddddd"), icon: none, icon_color: black) = {
block(breakable: false, fill: background_color, stroke: (paint: icon_color, thickness: 0.5pt, cap: "round"), width: 100%, radius: 2pt)[
#block(inset: 1pt, width: 100%, below: 0pt)[#block(fill: background_color, width: 100%, inset: 8pt)[#text(icon_color, weight: 900)[#icon] #title]]
#block(inset: 1pt, width: 100%)[#block(fill: white, width: 100%, inset: 8pt)[#body]]]
}
#let article(
margin: (x: 1.25in, y: 1.25in),
paper: "us-letter",
lang: "en",
region: "US",
doc
) = {
set page(
paper: paper,
margin: margin,
)
set text(
lang: lang,
region: region,
)
doc
}
#show: doc => article(
margin: (x: 1in,y: 1in,),
doc
)
#set page(
fill: rgb("#142933")
)
#set text(
fill: white,
font: ("Tilt Prism"),
size: 32pt
)
#set align(center)
This is the base for your document content.
#block[
#block[
#image("blank-deno_files/figure-typst/cell-2-output-1.svg")
]
]
|
|
https://github.com/Dicarbene/note-typst | https://raw.githubusercontent.com/Dicarbene/note-typst/master/README.md | markdown | MIT License | # note-typst
notes taking with typst (also for template storages)
|
https://github.com/Scriptor25/Seminararbeit | https://raw.githubusercontent.com/Scriptor25/Seminararbeit/master/template.typ | typst | #let project(
title: "",
author: "",
school: "",
location: "",
subject: "",
teacher: "",
years: "",
deadline: "",
body,
) = {
set page(
paper: "a4",
margin: (left: 2.5cm, right: 2.5cm, top: 3.5cm, bottom: 3.5cm),
) // paper format
set text(font: "Arial", lang: "de") // font
// Set paragraph spacing.
show par: set block(above: 1.2em, below: 1.2em)
set heading(numbering: "1.1") // heading numbering
set par(leading: 1.0em) // line spacing
// Main body.
set par(justify: true)
grid(
columns: (50%, 50%),
align(left + horizon)[#school \ #location],
align(right + horizon)[Abiturjahrgang #years],
)
align(center)[#block(height: 20%, text(weight: 500, 1.75em, [
#align(horizon)[S E M I N A R A R B E I T \
#text(size: 12pt, weight: 400, [aus dem W-Seminar]) \
#subject]
]))]
block(height: 5%)
align(center)[Thema der Seminararbeit: \
#text(weight: 700, 1.70em)[#title]]
block(height: 10%)
block(height: 20%)[
#align(horizon)[
#grid(
columns: (30%, 70%),
align(left + horizon)[Verfasser: \ Kursleiter: \ Abgabetermin:],
align(left + horizon)[#author \ #teacher \ #deadline],
)
]
]
grid(
columns: (40%, 20%, auto),
rows: (2%, 2%),
align(left)[Bewertung der schriftlichen Arbeit:],
align(left)[.......... Punkte],
align(left)[in Worten: ..............................],
align(left)[Bewertung der Präsentation:],
align(left)[.......... Punkte],
align(left)[in Worten: ..............................],
)
grid(
columns: (60%, auto),
rows: (2%, 2%),
align(left)[Gesamtbewertung ((3x schriftlich + 1x mündlich) : 2):],
align(left)[.......... Punkte],
align(left)[Abgabe beim Oberstufenkoordinator am:],
align(left)[..............................],
)
block(height: 11%, width: 100%)[
#align(
right + bottom,
)[............................................................ \
Unterschrift des Kursleiters]
]
pagebreak()
set page(header: [
#grid(columns: (60%, 40%), align(left)[
#set text(12pt)
#smallcaps(title)
], align(right)[
#set text(11pt)
<NAME>
])
])
block(height: 100%)[
#align(horizon)[ #outline(depth: 3, indent: auto) ]
]
pagebreak()
set text(size: 12pt)
set page(numbering: "1", number-align: center)
set cite(style: "mla")
body
set page(numbering: none)
bibliography("bib.yml", style: "mla")
pagebreak()
align(
horizon + center,
)[
#text(
weight: "bold",
)[Ich erkläre hiermit, dass ich die Seminararbeit ohne fremde Hilfe angefertigt
und nur die im Literaturverzeichnis angeführten Quellen und Hilfsmittel benützt
habe.]
#grid(
columns: (35%, 30%, 35%),
rows: (2%, 2%),
[......................................,],
[den ......................],
[........................................],
align(center)[Ort],
align(center)[Datum],
align(center)[Unterschrift des Schülers],
)
]
} |
|
https://github.com/mariuslb/thesis | https://raw.githubusercontent.com/mariuslb/thesis/main/content/05-ergebnisse.typ | typst | #import "../template.typ": Template, code
#let translations = json("../translations.json").at("de")
= Zusammenfassung der Ergebnisse
In diesem Kapitel werden die Ergebnisse der Analyse dargestellt, wie sie in Kapitel 4 dargestellt erhoben wurden.
== Key Performance Indicators (KPIs)
=== EPI
#figure(
image("../img/epi-api/epi.png", width: 80%),
caption: [Energy Performance Index zwischen Golf und Mokka.],
)
Die obige Abbildung zeigt einen Vergleich des Energy Performance Index (EPI) zwischen einem VW Golf (Verbrennungsmotor) und einem Opel Mokka (Elektrofahrzeug). Der EPI ist ein Maß für den Energieverbrauch in Kilowattstunden pro 100 Kilometer pro Tonne Fahrzeuggewicht.
Die Boxplots verdeutlichen, dass der Opel Mokka einen deutlich niedrigeren mittleren EPI-Wert (Median von etwa 11 kWh/100km*t) aufweist als der VW Golf (Median von etwa 12,5 kWh/100km*t). Der Interquartilsabstand (IQR) des Mokka erstreckt sich von etwa 10 bis 12 kWh/100km*t, während der IQR des Golfs von etwa 11,5 bis 13,5 kWh/100km*t reicht. Der Gesamtbereich der EPI-Werte des Golfs, einschließlich Ausreißern, liegt zwischen etwa 10 und 15 kWh/100km*t, wobei einige Ausreißer oberhalb von 15 kWh/100km*t zu erkennen sind. Im Gegensatz dazu zeigt der Mokka eine geringere Streuung der Werte, die von etwa 9 bis 13 kWh/100km*t reichen, mit einem Ausreißer oberhalb von 14 kWh/100km*t.
Diese Ergebnisse deuten darauf hin, dass der Opel Mokka im Vergleich zum VW Golf effizienter im Energieverbrauch ist. Dies unterstützt die Hypothese, dass Elektrofahrzeuge unter realen Fahrbedingungen eine höhere Energieeffizienz aufweisen als Fahrzeuge mit Verbrennungsmotoren.
=== API
#figure(
image("../img/epi-api/api.png", width: 80%),
caption: [Acceleration Performance Index zwischen Golf und Mokka.],
)
Die obige Abbildung zeigt einen Vergleich des Acceleration Performance Index (API) zwischen einem VW Golf (Verbrennungsmotor) und einem Opel Mokka (Elektrofahrzeug). Der API misst den Energieverbrauch während der Beschleunigung in Kilowattstunden pro 100 Kilometer pro Tonne Fahrzeuggewicht.
Die Boxplots verdeutlichen, dass der Opel Mokka einen deutlich niedrigeren mittleren API-Wert (Median von etwa 14 kWh/100km*t) aufweist als der VW Golf (Median von etwa 15,5 kWh/100km*t). Der Interquartilsabstand (IQR) des Mokka erstreckt sich von etwa 13 bis 15 kWh/100km*t, während der IQR des Golfs von etwa 14 bis 16 kWh/100km*t reicht. Der Gesamtbereich der API-Werte des Golfs, einschließlich Ausreißern, liegt zwischen etwa 13 und 17,5 kWh/100km*t, wobei einige Ausreißer oberhalb von 17,5 kWh/100km*t zu erkennen sind.
Im Gegensatz dazu zeigt der Mokka eine größere Streuung der Werte, die von etwa 12 bis 18 kWh/100km*t reichen, mit einem Ausreißer unterhalb von 12,5 kWh/100km*t und einem weiteren oberhalb von 18 kWh/100km*t.
Diese Ergebnisse deuten darauf hin, dass der Opel Mokka im Vergleich zum VW Golf effizienter im Energieverbrauch während der Beschleunigung ist. Der Mokka zeigt zudem eine größere Variabilität in den API-Werten, was auf eine unterschiedlichere Fahrweise oder variierende Fahrbedingungen hindeuten könnte. Dies unterstützt die Hypothese, dass Elektrofahrzeuge eine höhere Energieeffizienz aufweisen können, wobei die Variabilität der Ergebnisse weitere Untersuchungen erfordert.
== Statistische Modelle
=== Lineare Regression
Für die Modellierung des Energieverbrauchs wurde eine lineare Regression durchgeführt, um die Beziehung zwischen dem Energieverbrauch (Energy_kWh) und den anderen Variablen zu untersuchen. Dafür wurde beispielsweise ein additiver Effekt untersucht und die Modellformel wie folgt definiert:
#code(
```R
Call:
lm(formula = TotalWork.J. ~ Vehicle_Type + Distance_km + RollWork.J. +
GradeWork.J. + AccWork.J. + Acceleration.m.s.2., data = combined_data)
Residuals:
Min 1Q Median 3Q Max
-29556 -2729 -1027 1601 113325
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 3.620e+03 2.667e+01 135.738 <2e-16 ***
Vehicle_TypeMokka e -6.421e+02 2.762e+01 -23.250 <2e-16 ***
Distance_km 1.654e+05 3.558e+03 46.496 <2e-16 ***
RollWork.J. 3.761e-01 2.251e-02 16.707 <2e-16 ***
GradeWork.J. 5.567e-01 1.934e-03 287.822 <2e-16 ***
AccWork.J. 5.388e-01 3.235e-03 166.554 <2e-16 ***
Acceleration.m.s.2. 2.089e+01 3.544e+01 0.589 0.556
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 4029 on 93382 degrees of freedom
Multiple R-squared: 0.7373, Adjusted R-squared: 0.7373
F-statistic: 4.368e+04 on 6 and 93382 DF, p-value: < 2.2e-16
```,
caption: [Code für Lineare Regression zur Modellierung des Energieverbrauchs.],
supplement: translations.codeausschnitt,
) <glacier>
Dadurch konnte ein R-Squared-Wert von 0,7373 erzielt werden, was darauf hindeutet, dass das Modell etwa 73,73 % der Varianz im Energieverbrauch erklären kann. Die Ergebnisse der linearen Regression zeigen, dass die Variable "Vehicle_Type" (Mokka E) einen signifikanten Einfluss auf den Energieverbrauch hat, wobei der Mokka E im Vergleich zum Golf einen niedrigeren Energieverbrauch aufweist. Die Variablen "Distance_km", "RollWork.J.", "GradeWork.J." und "AccWork.J." haben ebenfalls einen signifikanten Einfluss auf den Energieverbrauch, während die Variable "Acceleration.m.s.2." keinen signifikanten Einfluss hat.
=== ANOVA
Die ANOVA-Analyse wurde durchgeführt, um den Unterschied im Energieverbrauch zwischen dem VW Golf und dem Opel Mokka E zu untersuchen. Dabei wurde die Variable "Vehicle_Type" als unabhängige Variable und der Energieverbrauch (TotalWork.J.) als abhängige Variable verwendet.
#code(
```R
> anova_result <- aov(TotalWork.J. ~ Vehicle_Type, data = combined_data)
> summary(anova_result)
Df Sum Sq Mean Sq F value Pr(>F)
Vehicle_Type 1 5.925e+09 5.925e+09 96.01 <2e-16 ***
Residuals 93387 5.763e+12 6.171e+07
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> tukey_result <- TukeyHSD(anova_result)
> print(tukey_result)
Tukey multiple comparisons of means
95% family-wise confidence level
Fit: aov(formula = TotalWork.J. ~ Vehicle_Type, data = combined_data)
$Vehicle_Type
diff lwr upr p adj
Mokka e-Golf -527.2025 -632.6571 -421.7479 0
```,
caption: [Code für ANOVA zur Untersuchung des Energieverbrauchs zwischen Golf und Mokka.],
supplement: translations.codeausschnitt,
) <glacier>
Die ANOVA-Analyse zeigt, dass der Unterschied im Energieverbrauch zwischen dem VW Golf und dem Opel Mokka E signifikant ist (F-Wert: 96,01, p-Wert: < 2e-16). Der Tukey-Test bestätigt, dass der Mokka E im Vergleich zum Golf einen signifikant niedrigeren Energieverbrauch aufweist (Differenz: -527,20 J, p-Wert: 0).
Diese Ergebnisse bestätigen die Hypothese, dass Elektrofahrzeuge unter realen Fahrbedingungen einen niedrigeren Energieverbrauch aufweisen als Fahrzeuge mit Verbrennungsmotoren.
=== Random Forests
Das Random Forest-Modell wurde verwendet, um die wichtigsten Einflussfaktoren auf den Energieverbrauch zu identifizieren und die Unterschiede zwischen dem VW Golf und dem Opel Mokka E zu quantifizieren.
Der RMSE (Root Mean Square Error) betrug 419.302 J, was eine hohe Genauigkeit des Modells bei der Vorhersage des Energieverbrauchs anzeigt.
Der MAE (Mean Absolute Error) lag bei 58.253 J, was die durchschnittliche Abweichung der Vorhersagen vom tatsächlichen Wert darstellt.
Das Bestimmtheitsmaß R² erreichte einen Wert von 0.997, was auf eine fast perfekte Anpassung des Modells an die Daten hinweist.
Der prozentuale RMSE betrug 8.42%, und der MAE in Prozent lag bei 0.027%, was zeigt, dass das Modell den Energieverbrauch mit einer hohen Genauigkeit vorhersagen kann.
Dazu wurde mit dem Testdatensatz eine Vorhersage des Energieverbrauchs je Fahrzeugtyp durchgeführt, um die Unterschiede zwischen dem VW Golf und dem Opel Mokka E zu quantifizieren. Die Ergebnisse zeigen, dass der Mokka E im Durchschnitt einen um 5,89 % niedrigeren Energieverbrauch aufweist als der Golf, was die Ergebnisse der vorherigen Analysen bestätigt.
#figure(
image("../img/rf/average_consumption.png", width: 80%),
caption: [Durchschnittlicher Energieverbrauch zwischen Golf und Mokka.],
)
=== Gradient Boosting Machines (GBM)
#code(
```R
gbm_model <- gbm(TotalWork.J. ~ ., data = train_set, distribution = "gaussian", n.trees = 100, interaction.depth = 5, shrinkage = 0.01, cv.folds = 5)
# Evaluate the model
best_iter <- gbm.perf(gbm_model, method = "cv")
predictions <- predict(gbm_model, test_set, n.trees = best_iter)
actuals <- test_set$TotalWork.J.
> print(paste("RMSE:", rmse))
[1] "RMSE: 4242.59124039615"
> print(paste("MAE:", mae))
[1] "MAE: 2898.41111856062"
> print(paste("R-squared:", r2))
[1] "R-squared: 0.88712358658838"
```,
caption: [Code für Gradient Boosting Machine zur Modellierung des Energieverbrauchs.],
supplement: translations.codeausschnitt,
) <glacier>
Das Gradient Boosting Machine-Modell erreichte einen RMSE von 4242,59 J, einen MAE von 2898,41 J und ein R² von 0,8871. Diese Ergebnisse zeigen, dass das Modell den Energieverbrauch mit einer hohen Genauigkeit vorhersagen kann und die Unterschiede zwischen dem VW Golf und dem Opel Mokka E quantifiziert.
#figure(
image("../img/gbm/average_consumption.png", width: 80%),
caption: [Vorhersagen des Energieverbrauchs zwischen Golf und Mokka.],
)
Die obige Abbildung zeigt die Vorhersagen des Energieverbrauchs für den VW Golf und den Opel Mokka E durch das Gradient Boosting Machine-Modell. Die Ergebnisse zeigen, dass der Mokka E im Durchschnitt einen um 5,12 % niedrigeren Energieverbrauch aufweist als der Golf, was ebenfalls die Ergebnisse der vorherigen Analysen bestätigt.
=== XGBoost
#code(
```R
xgb_model <- xgboost(params = params, data = dtrain, nrounds = 100)
> print(xgb_model)
##### xgb.Booster
raw: 330.8 Kb
call:
xgb.train(params = params, data = dtrain, nrounds = nrounds,
watchlist = watchlist, verbose = verbose, print_every_n = print_every_n,
early_stopping_rounds = early_stopping_rounds, maximize = maximize,
save_period = save_period, save_name = save_name, xgb_model = xgb_model,
callbacks = callbacks)
params (as set within xgb.train):
objective = "reg:squarederror", eval_metric = "rmse", max_depth = "6", eta = "0.3", gamma = "0.1", validate_parameters = "TRUE"
xgb.attributes:
niter
callbacks:
cb.print.evaluation(period = print_every_n)
cb.evaluation.log()
# of features: 22
niter: 100
nfeatures : 22
evaluation_log:
iter train_rmse
<num> <num>
1 6529.99070
2 4610.53192
---
99 32.56959
100 32.45040
> y_pred <- predict(xgb_model, dtest)
> rmse <- sqrt(mean((test_data_norm$TotalWork.J. - y_pred)^2))
> print(paste("RMSE:", rmse))
[1] "RMSE: 1555.22528742603"
> r2 <- cor(test_data_norm$TotalWork.J., y_pred)^2
> print(paste("R-squared (R2):", round(r2, 4)))
[1] "R-squared (R2): 0.9972"
```,
caption: [Code für XGBoost zur Modellierung des Energieverbrauchs.],
supplement: translations.codeausschnitt,
) <glacier>
Das XGBoost-Modell erreichte einen RMSE von 1555,23 J und ein R² von 0,9972. Diese Ergebnisse zeigen, dass das Modell den Energieverbrauch mit einer sehr hohen Genauigkeit vorhersagen kann und die Unterschiede zwischen dem VW Golf und dem Opel Mokka E quantifiziert.
#figure(
image("../img/xgboost/average_consumption.png", width: 80%),
caption: [Vorhersagen des Energieverbrauchs zwischen Golf und Mokka.],
)
Die obige Abbildung zeigt die Vorhersagen des Energieverbrauchs für den VW Golf und den Opel Mokka E durch das XGBoost-Modell. Die Ergebnisse zeigen, dass der Mokka E im Durchschnitt einen um 10,57 % niedrigeren Energieverbrauch aufweist als der Golf, was ebenfalls die Ergebnisse der vorherigen Analysen bestätigt.
== WLTP-Normwerte und Vergleich
== VW Golf
#grid(
columns: 2,
gutter: 5pt,
figure(
image("../img/wltp/golf_wltp.png"),
caption: [Verteilung Golf],
),
figure(
image("../img/wltp/golf_wltp_verteilung.png"),
caption: [Verteilung Mokka],
)
)
Die obigen Abbildungen zeigen den Vergleich der WLTP-Normwerte für jede Kategorie mit dem tatsächlichen Energieverbrauch des VW Golf.
Hierbei zeigt sich das die Datenpunkte nur in den WLTP-Kategorien Stadt und Überland liegen, während keine Datenpunkte darüber hinaus vorhanden sind, was daran liegt, dass die Testfahrten im städtischen Gebiet durchgeführt wurden.
Die Verteilung der Verbrauchswerte des VW Golf zeigt, dass der tatsächliche Energieverbrauch in den beiden Kategorien über den WLTP-Normwerten liegt. Bei "Low Speed" liegt der tatsächliche Verbrauch ca. 2 % über dem Normwert, während er bei "Medium Speed" sogar über 141 % über dem Normwert liegt.
Eine solche hohe Abweichung im "Medium Speed"-Bereich kann darauf zurückzuführen sein, dass nur sehr wenige Datenpunkte in dieser Kategorie vorhanden sind, was zu einer Verzerrung der Ergebnisse führen kann. Die Grenze zwischen den Kategorien "Low Speed" und "Medium Speed" ist bei 56,5 km/h definiert, wodurch die Datenpunkte in "Medium Speed" möglicherweise schnelle Beschleunigungsmanöver enthalten, die dadurch den Energieverbrauch signifikant erhöhen.
=== Opel Mokka E
#grid(
columns: 2,
gutter: 5pt,
figure(
image("../img/wltp/mokka_wltp.png"),
caption: [Verteilung Mokka],
),
figure(
image("../img/wltp/mokka_wltp_verteilung.png"),
caption: [Verteilung Mokka],
)
)
Die obigen Abbildungen zeigen den Vergleich der WLTP-Normwerte für jede Kategorie mit dem tatsächlichen Energieverbrauch des Opel Mokka E.
Hierbei zeigt sich, dass die Datenpunkte ebenfalls nur in den WLTP-Kategorien Stadt und Überland liegen.
Die Verteilung der Verbrauchswerte des Opel Mokka E zeigt, dass der tatsächliche Energieverbrauch in den beiden Kategorien deutlich über den WLTP-Normwerten liegt. Bei "Low Speed" liegt der tatsächliche Verbrauch knapp bei 1,9 % über dem Normwert, während er bei "Medium Speed" sogar über 31,4 % über dem Normwert liegt.
Hier zeigt sich eine ähnliche Tendenz wie beim VW Golf, wobei der tatsächliche Verbrauch in der Kategorie "Medium Speed" auch wieder deutlich über den Normwerten liegt. Dies liegt auch wieder daran dass wieder nur ein minimaler Bruchteil der Gesamtdatenpunkte in dieser Kategorie liegt und darauf hindeutet, dass die Testfahrten in dieser Kategorie zu schnellen Beschleunigungsmanövern geführt haben, die den Energieverbrauch erhöht haben (siehe Abb 7). |
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compiler/closure-00.typ | typst | Other | // Don't parse closure directly in content.
// Ref: true
#let x = "x"
// Should output `x => y`.
#x => y
|
https://github.com/BackThePortal/typst-plugin-jetbrains | https://raw.githubusercontent.com/BackThePortal/typst-plugin-jetbrains/main/README.md | markdown | # typst-plugin-jetbrains

[](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
[](https://plugins.jetbrains.com/plugin/PLUGIN_ID)
## Template ToDo list
- [x] Create a new [IntelliJ Platform Plugin Template][template] project.
- [ ] Get familiar with the [template documentation][template].
- [ ] Adjust the [pluginGroup](./gradle.properties), [plugin ID](./src/main/resources/META-INF/plugin.xml) and [sources package](./src/main/kotlin).
- [ ] Adjust the plugin description in `README` (see [Tips][docs:plugin-description])
- [ ] Review the [Legal Agreements](https://plugins.jetbrains.com/docs/marketplace/legal-agreements.html?from=IJPluginTemplate).
- [ ] [Publish a plugin manually](https://plugins.jetbrains.com/docs/intellij/publishing-plugin.html?from=IJPluginTemplate) for the first time.
- [ ] Set the `PLUGIN_ID` in the above README badges.
- [ ] Set the [Plugin Signing](https://plugins.jetbrains.com/docs/intellij/plugin-signing.html?from=IJPluginTemplate) related [secrets](https://github.com/JetBrains/intellij-platform-plugin-template#environment-variables).
- [ ] Set the [Deployment Token](https://plugins.jetbrains.com/docs/marketplace/plugin-upload.html?from=IJPluginTemplate).
- [ ] Click the <kbd>Watch</kbd> button on the top of the [IntelliJ Platform Plugin Template][template] to be notified about releases containing new features and fixes.
<!-- Plugin description -->
This Fancy IntelliJ Platform Plugin is going to be your implementation of the brilliant ideas that you have.
This specific section is a source for the [plugin.xml](/src/main/resources/META-INF/plugin.xml) file which will be extracted by the [Gradle](/build.gradle.kts) during the build process.
To keep everything working, do not remove `<!-- ... -->` sections.
<!-- Plugin description end -->
## Installation
- Using the IDE built-in plugin system:
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>Marketplace</kbd> > <kbd>Search for "typst-plugin-jetbrains"</kbd> >
<kbd>Install</kbd>
- Manually:
Download the [latest release](https://github.com/BackThePortal/typst-plugin-jetbrains/releases/latest) and install it manually using
<kbd>Settings/Preferences</kbd> > <kbd>Plugins</kbd> > <kbd>⚙️</kbd> > <kbd>Install plugin from disk...</kbd>
---
Plugin based on the [IntelliJ Platform Plugin Template][template].
[template]: https://github.com/JetBrains/intellij-platform-plugin-template
[docs:plugin-description]: https://plugins.jetbrains.com/docs/intellij/plugin-user-experience.html#plugin-description-and-presentation
|
|
https://github.com/Treeniks/bachelor-thesis-isabelle-vscode | https://raw.githubusercontent.com/Treeniks/bachelor-thesis-isabelle-vscode/master/chapters/02-background/isabelle.typ | typst | #import "/utils/todo.typ": TODO
#import "/utils/isabelle.typ": *
== Isabelle
From proving the prime number theorem @prime-number-theorem over a verified microkernel @verified-microkernel to a formalization of a sequential Java-like programming language @jinja, Isabelle has been used for numerous formalizations and proofs since its initial release in 1986. Additionally, the Archive of Formal Proofs #footnote[https://www.isa-afp.org/] hosts a journal-style collection of many more such proofs constructed in Isabelle.
// #quote(attribution: <paulson-next-700>, block: true)[Isabelle was not designed; it evolved. Not everyone likes this idea.]
=== #isar
When one wants to write an Isabelle theory, i.e., a document containing several theorems, lemmas, function definitions, and more, Isabelle offers a proof language called #emph(isar), allowing its users to write human-readable structured proofs @manual-isar-ref. An example theory and #isar proof can be seen in @list:example-theory.
The #isar syntax comprises three main syntactic concepts: _Commands_, _methods_, and _attributes_. Particularly relevant for us are the commands, which include keywords like `theorem` to state a proposition followed by a proof or `apply` to apply a proof method.
#figure(
align(left, rect(
radius: 5%,
fill: luma(245),
stroke: 2pt + luma(230),
)[
#let blue = rgb(42, 100, 149)
#let green = rgb(67, 151, 106) // used for imports, begin, where etc.
#let green2 = rgb(58, 126, 38) // used for f, A, a, x etc.
#let lightblue = rgb(67, 151, 247)
#let purple = rgb(145, 51, 221) // used for 'a
#let lightpurple = rgb(146, 104, 247) // used for add
#let orange = rgb(196, 111, 51)
#show raw: set text(font: "Isabelle DejaVu Sans Mono")
#show "from": set text(blue, weight: "semibold")
#show "then": set text(blue, weight: "semibold")
#show "have": set text(blue, weight: "semibold")
#show "by": set text(blue, weight: "semibold")
#show "theory": set text(blue, weight: "semibold")
#show "proof": set text(blue, weight: "semibold")
#show "qed": set text(blue, weight: "semibold")
#show "theorem": set text(blue, weight: "semibold")
#show "imports": set text(green, weight: "semibold")
#show "begin": set text(green, weight: "semibold")
#show "end": set text(green, weight: "semibold")
#show "where": set text(green, weight: "semibold")
#show "obtain": set text(lightblue, weight: "semibold")
#show "assume": set text(lightblue, weight: "semibold")
#show "show": set text(lightblue, weight: "semibold")
#show "'a": set text(purple)
#show "add": set text(lightpurple)
`theory Example
imports Main
begin
theorem "∄`#text(green2)[`f`]` :: 'a ⇒ 'a set. surj(`#text(green2)[`f`]`)"
proof
assume "∃`#text(green2)[`f`]` :: 'a ⇒ 'a set. surj(`#text(green2)[`f`]`)"
then obtain `#text(orange)[`f`]` :: "'a ⇒ 'a set" where a: "surj(`#text(orange)[`f`]`)" by blast
from a have b: "∀`#text(green2)[`A`]`. ∃`#text(green2)[`a`]`. `#text(green2)[`A`]` = `#text(orange)[`f`]` `#text(green2)[`a`]`" by (simp add: surj_def)
from b have c: "∃`#text(green2)[`a`]`. {(`#text(green2)[`x`]` :: 'a). `#text(green2)[`x`]` ∉ `#text(orange)[`f`]` `#text(green2)[`x`]`} = `#text(orange)[`f`]` `#text(green2)[`a`]`" by blast
from c show False by blast
qed
end`
]),
caption: [Example Isabelle theory with #isar proof.],
kind: raw,
placement: auto,
) <list:example-theory>
=== Implementation Design
Isabelle's core implementation languages are _ML_ and _Scala_. Generally, the ML code is responsible for Isabelle's purely functional and mathematical domain (e.g. its LCF-style kernel~@paulson-next-700@lcf-to-isabelle), while Scala is responsible for Isabelle's physical domain (e.g. everything to do with the UI and IO~@manual-system[Chapter~5]). Many modules within the Isabelle code base exist in both Scala and ML, thus creating an almost seamless transition between the two.
Isabelle employs a monolithic architecture. While logic is split between modules, there is no limitation on how they can be accessed within the Isabelle system. Moreover, as a JVM-based programming language, Scala effortlessly integrates into jEdit's Java code base. Due to these two facts, when using #jedit, Isabelle is able to offer an interactive session where the entire Isabelle system has direct access to any data jEdit may hold, and the same is true the other way around. For example, #jedit has a feature that automatically indents an Isabelle theory. Internally, this automatic indentation uses both access to the Isabelle system and the jEdit buffer simultaneously.
Isabelle, being a proof assistant, also does not follow conventional programming language design practices. The actual Isabelle kernel is kept small to maintain correctness (albeit with performance-related additions). Many of Isabelle's systems are built within Isabelle itself, including a majority of the #isar syntax.
#quote(block: true, attribution: <markarius-isabelle-vscode-2017>)[Note that static grammar and language definitions are not ideal: Isabelle syntax depends on theory imports: new commands may be defined in user libraries.]
Even fundamental keywords such as `theorem` do not exist statically but are instead defined in user space. When editing a theory in #jedit, the syntax highlighting is mostly done dynamically.
=== Output and State Panels <background:output-and-state-panels>
#figure(
box(stroke: 1pt, image("/resources/jedit1.png", width: 80%)),
caption: [JEdit with both output and state panels open. Output on the bottom, state on the right.],
kind: image,
placement: auto,
) <jedit1>
Isabelle has a few different types of panels that give the user crucial information. The two most relevant to us are the _output_ and _state_ panels, as seen in @jedit1.
The output panels show messages corresponding to a given command, including general information, warnings, or errors. This also means that the content of the output panel is directly tied to a specific command in the theory. The command is typically determined by the caret's current position.
On the other hand, state panels display the current internal proof state within a proof. Just like with output panels, it is possible to open multiple state panels, which may show states at different positions within the document. Whether moving the caret updates the currently displayed output or state depends on the _Auto update_ setting of the respective panel.
=== Symbols <background:isabelle-symbols>
Isabelle uses a lot of custom symbols to allow logical terms to be written in a syntax close to that of mathematics. The concept of what an _Isabelle symbol_ is exactly is rather broad. We will focus primarily on a certain group of symbols typically used in mathematical formulas.
#figure(
table(
columns: 2,
stroke: (x, y) => (
left: if x > 0 { .5pt } else { 0pt },
right: 0pt,
top: 0pt,
bottom: 0pt,
),
align: left,
[*ASCII Representation*], [`\<Longrightarrow>`],
[*Name*], [`Longrightarrow`],
[*UTF-16 Codepoint*], [`0x27F9`],
[*Abbreviations*], [#isabelle(`.>`), #isabelle(`==>`)],
),
caption: [Symbol data of #isabelle(`⟹`).],
kind: table,
placement: auto,
) <symbol-data-example>
Each Isabelle symbol roughly consists of four components: An ASCII representation of the symbol, a name, an optional #box[UTF-16] code point, and a list of abbreviations for this symbol. These four are only part of the story; however, for the sake of simplicity, we will skip some details.
As an example, let us say a user writes the implication $A ==> B$ in Isabelle. Within jEdit, they will see it written out as #isabelle(`A ⟹ B`)\; /* backslash is needed because otherwise typst thinks the semicolon ends the function call I guess? */ however, internally, the #isabelle(`⟹`) is an Isabelle symbol. Its corresponding data is outlined in @symbol-data-example.
To deal with these symbols, #jedit uses a custom encoding called #emph(utf8isa). This encoding ensures that the user sees #isabelle(`A ⟹ B`) while the actual content of the underlying file is "`A \<Longrightarrow> B`". However, Isabelle has no trouble dealing with cases where the actual #isabelle(`⟹`) Unicode symbol is used within a file.
There are a few reasons why this special system exists instead of just encoding the files in UTF-16 or UTF-8. Unicode is somewhat inconsistent regarding #sub[subscript] and #super[superscript] support (e.g. while the capital letters A to W exist in superscript, X, Y, and Z currently do not). Isabelle instead adds #isabelle(`\<^sub>`) and #isabelle(`\<^sup>`) prefixes to letters and numbers, which can also be nested. Additionally, by encoding theories with simple ASCII characters, they can be viewed with almost any font and do not require more advanced Unicode support.
// #TODO[
// Add explanation why this custom encoding is used instead of just unicode:
// - sub/sup not consistent in Unicode, can even be nested in Isabelle
// - not dependent on font Unicode support, file can be viewed with virtually any font if needed
// ]
=== #vscode <background:isabelle-vscode>
#figure(
box(stroke: 1pt, image("/resources/vscode1-light.png", width: 80%)),
caption: [VSCode with both output and state panels open. Output on the bottom, state on the right.],
kind: image,
placement: auto,
) <vscode1>
Isabelle consists of multiple different components. #jedit is one such component. When we mention #vscode, we are referring to three different Isabelle components: The Isabelle _language server_, which is a part of #scala, Isabelle's own patched _VSCodium_ #footnote[https://vscodium.com/], and the VSCode _extension_ written in TypeScript. #footnote[https://www.typescriptlang.org/] Note in particular that when running #vscode, Isabelle does not use a standard distribution of VSCode. Instead, it is a custom VSCodium package.
VSCodium is a fully open-source distribution of Microsoft's VSCode with some patches to disable telemetry and replace the VSCode branding with that of VSCodium. Isabelle adds patches on top of VSCodium to add a custom encoding mimicking the functionality of #jedit described in @background:isabelle-symbols and integrating custom Isabelle-specific fonts. Since neither adding custom encodings nor including custom fonts is possible from within a VSCode extension, these patches exist instead.
The concept of output and state panels exist equivalently within #vscode, as seen in @vscode1, although it is currently not possible to create multiple panels of the same type.
Generally speaking, the goal of #vscode is to mimic the functionality of #jedit as closely as possible. Many issues described and solved within this work stem from a discrepancy between the two, and #jedit will often serve as the reference implementation.
|
|
https://github.com/alperari/cyber-physical-systems | https://raw.githubusercontent.com/alperari/cyber-physical-systems/main/week14/solution.typ | typst | #import "@preview/diagraph:0.1.2": *
#set text(
size: 15pt,
)
#set page(
paper: "a4",
margin: (x: 1.8cm, y: 1.5cm),
)
#align(center, text(21pt)[
*Cyber Physical Systems - Discrete Models \
Exercise Sheet 14 Solution*
])
#grid(
columns: (1fr, 1fr),
align(center)[
<NAME> \
<EMAIL>
],
align(center)[
<NAME> \
<EMAIL>
]
)
#align(center)[
February 7, 2023
]
#pagebreak()
== Exercise 1: Transition Systems, Program Graphs, Interleaving
#image("assets/CyberPhysicalEx14-1.jpg")
== Exercise 2: From LTL to NBA and Back
#image("assets/CyberPhysicalEx14-2.jpg")
#pagebreak()
== Exercise 3: LT Properties for a Program
$
"AP" = { x = 0 , x > 1 }
$
Assuming that "x is equal to 0" doesn't hold for $"AP" = { x = 0 , x > 1}$ and only holds for $"AP" = {x = 0}$. Similar assumption is made for "x differs from 0" as well.
=== Part A
- a) ${A_0 A_1 ... in (2^"AP")^omega | "false"}$
- b) ${A_0 A_1 ... in (2^"AP")^omega | {x = 0} = A_0}$
- c) ${A_0 A_1 ... in (2^"AP")^omega | {x > 1} = A_0}$
- d) ${A_0 A_1 ... in (2^"AP")^omega | {x = 0} = A_0 and exists i in NN_1 . {x = 1} = A_i}$
- e) ${A_0 A_1 ... in (2^"AP")^omega | limits(forall)^infinity i in NN . space {x > 1} != A_i}$
- f) ${A_0 A_1 ... in (2^"AP")^omega | limits(exists)^infinity i in NN . space {x > 1} = A_i}$
- g) ${A_0 A_1 ... in (2^"AP")^omega | "true"}$
=== Part B
- a) It's a safety property because it satisfies the condition that all traces that are not in the language has a bad prefix. Since there are no traces in the property, any finite trace is a bad prefix for this language.
- b) It's a safety property with $"BadPref" = {A_0 A_1 ... A_n in (2^"AP")^+ | {x = 0} != A_0}$
- c) It's a safety property with $"BadPref" = {A_0 A_1 ... A_n in (2^"AP")^+ | {x > 0} != A_0}$
- d) It's not a safety property. One counter example is $sigma = {x = 0}^omega$. $sigma$ does not satisfy this lt property, however all of it's finite prefixes can be extended to satisfy the property by appending ${x > 1}$ at some point. Therefore, this trace doesn't have any prefix that is a bad prefix of the language of this property.
- e) It's not a safety property because it's a liveness property. It's a liveness property because for any finite prefix we can extend it so that ${x > 1}$ does not appear infinitely often.
- f) Similar to part e), this is also a liveness property because we can extend any finite prefix such that ${x > 1}$ appears infinitely often. Therefore it's not a safety property.
- g) It's a safety property, because there are no traces that is not in the language of this property. Therefore it satisfies the safety property condition trivially.
== Exercise 4: Fair Equivalence
=== a)
If $phi_1 eq.triple_"fair" phi_2$ and $psi_1 eq.triple_"fair" psi_2$, then $(phi_1 or psi_1) eq.triple_"fair" (phi_2 or psi_2)$.
We know that $(phi_1 or psi_1) eq.triple_"fair" (phi_2 or psi_2)$ is equivalent to $"fair" -> (phi_1 or psi_1) eq.triple "fair" -> (phi_2 or psi_2)$.
We need to show that:
1. $"Words"("fair" -> (phi_1 or psi_1)) subset.eq "Words"("fair" -> (phi_2 or psi_2))$
2. $"Words"("fair" -> (phi_2 or psi_2)) subset.eq "Words"("fair" -> (phi_1 or psi_1))$
Then the equivalence holds.
Without loss of generality, we can prove just the lemma 1. Lemma 2. can be proven in the same fashion.
Let $sigma tack.double "Words"("fair" -> (phi_1 or psi_1))$. Then:
1. $sigma tack.double.not "fair"$: Then $sigma tack.double "fair" -> (phi_2 or psi_2)$ holds trivially.
2. $sigma tack.double "fair"$: Then we also know that $sigma tack.double (phi_1 or psi_1)$. Then we have the following cases:
1. $sigma tack.double phi_1$: Then from $phi_1 eq.triple_"fair" phi_2$ we can claim $sigma tack.double phi_2$ as well. And therefore $sigma tack.double (phi_2 or psi_2)$. Hence, $sigma tack.double "fair" -> (phi_2 or psi_2)$.
2. $sigma tack.double psi_1$: Then from $psi_1 eq.triple_"fair" psi_2$ we can claim $sigma tack.double psi_2$ as well. And therefore $sigma tack.double (psi_2 or psi_2)$. Hence, $sigma tack.double "fair" -> (phi_2 or psi_2)$.
Since $forall sigma in "Words"("fair" -> (phi_1 or psi_1)) . space sigma in "Words"("fair" -> (phi_2 or psi_2))$, $"Words"("fair" -> (phi_1 or psi_1)) subset.eq "Words"("fair" -> (phi_2 or psi_2))$. Applying the same steps for the other direction we can conclude that $(phi_1 or psi_1) eq.triple_"fair" (phi_2 or psi_2)$ $qed$
=== b)
If $phi_1 eq.triple_"fair" phi_2$, then $(circle phi_1) eq.triple_"fair" (circle phi_2)$.
We know that $(circle phi_1) eq.triple_"fair" (circle phi_2)$ is equivalent to $"fair" -> (circle phi_1) eq.triple "fair" -> (circle phi_2)$.
We need to show that:
1. $"Words"("fair" -> (circle phi_1)) subset.eq "Words"("fair" -> (circle phi_2))$
2. $"Words"("fair" -> (circle phi_2)) subset.eq "Words"("fair" -> (circle phi_1))$
Then the equivalence holds.
Without loss of generality, we can prove just the lemma 1. Lemma 2. can be proven in the same fashion.
Let $sigma tack.double "fair" -> (circle phi_1)$. Then:
1. $sigma tack.double.not "fair"$: Then $sigma tack.double "fair" -> (circle phi_2)$ holds trivially.
2. $sigma tack.double "fair"$: Then we also know that $sigma tack.double (circle phi_1)$. Let $sigma' = sigma[1..]$. We know that $sigma' tack.double phi_1$. Also $sigma' tack.double "fair"$ because $sigma'$ is a suffix of $sigma$. So $sigma' tack.double "fair" -> phi_1$. From $phi_1 eq.triple_"fair" phi_2$, we can conclude that $sigma' tack.double "fair" -> phi_2$. And because $sigma' tack.double "fair"$, $sigma' tack.double phi_2$ also holds. Thus $sigma tack.double (circle phi_2)$. Hence we conclude $sigma tack.double "fair" -> (circle phi_2)$.
Since $forall sigma in "Words"("fair" -> (circle phi_1)) . space sigma in "Words"("fair" -> (circle phi_2))$, $"Words"("fair" -> (circle phi_1)) subset.eq "Words"("fair" -> (circle phi_2))$. Applying the same steps for the other direction we can conclude that $(circle phi_1) eq.triple_"fair" (circle phi_2)$ $qed$
=== c)
If $phi_1 eq.triple_"fair" phi_2$ $psi_1 eq.triple_"fair" psi_2$, then $(phi_1 U psi_1) eq.triple_"fair" (phi_2 U psi_2)$.
We know that $(phi_1 U psi_1) eq.triple_"fair" (phi_2 U psi_2)$ is equivalent to $"fair" -> (phi_1 U psi_1) eq.triple "fair" -> (phi_2 U psi_2)$.
We need to show that:
1. $"Words"("fair" -> (phi_1 U psi_1)) subset.eq "Words"("fair" -> (phi_2 U psi_2))$
2. $"Words"("fair" -> (phi_2 U psi_2)) subset.eq "Words"("fair" -> (phi_1 U psi_1))$
Then the equivalence holds.
Without loss of generality, we can prove just the lemma 1. Lemma 2. can be proven in the same fashion.
Let $sigma tack.double "fair" -> (phi_1 U psi_1)$. Then:
1. $sigma tack.double.not "fair"$: Then $sigma tack.double "fair" -> (phi_2 or psi_2)$ holds trivially.
2. $sigma tack.double "fair"$: Then it must follow that $sigma tack.double phi_1 U psi_1$. There exists an $i in NN$ such that $sigma[i..] tack.double psi_1$ and $forall j in NN . space j < i -> sigma[j..] tack.double phi_1$.
Since every suffix of $sigma$ is also fair, from $phi_1 eq.triple_"fair" phi_2$ we can conclude $forall j in NN . space j < i -> sigma[j..] tack.double phi_2$. And similarly from $psi_1 eq.triple_"fair" psi_2$ we can conlude $sigma[i..] tack.double psi_2$. Therefore $sigma tack.double phi_2 U psi_2$ where the break point is $i$. Then $sigma tack.double "fair" -> phi_2 U psi_2$.
Since $forall sigma in "Words"("fair" -> (phi_1 U psi_1)) . space sigma in "Words"("fair" -> (phi_2 U psi_2))$, $"Words"("fair" -> (phi_1 U psi_1)) subset.eq "Words"("fair" -> (phi_2 U psi_2))$. Applying the same steps for the other direction we can conclude that $(phi_1 U psi_1) eq.triple_"fair" (phi_2 U psi_2)$ $qed$
|
|
https://github.com/ice1000/website | https://raw.githubusercontent.com/ice1000/website/main/resume.typ | typst | #import "resume/main.typ": *;
#import "/book.typ": book-page
#show: book-page.with(title: "<NAME>")
The content in this page is automatically synced from the #link("https://github.com/ice1000/resume")[resume repository].
#runReader(EnglishFull)
|
|
https://github.com/donghoony/KUPC-2023 | https://raw.githubusercontent.com/donghoony/KUPC-2023/master/README.md | markdown | # KUPC 2023 Editorial
2023 건국대학교 프로그래밍 경진대회의 에디토리얼입니다. [**Typst**](https://typst.app/)로 작성되었습니다.
에디토리얼은 [이곳에서](https://github.com/donghoony/KUPC-2023/blob/master/Editorial.pdf) 확인하실 수 있습니다.
## Environment
로컬 환경에서 작업하는 것을 추천합니다. 개인적으로 사용한 툴은 아래와 같습니다.
- Visual Studio Code
- [Typst LSP (VS Code Extension)](https://marketplace.visualstudio.com/items?itemName=nvarner.typst-lsp)
- [Typst Preview (VS Code Extension)](https://marketplace.visualstudio.com/items?itemName=mgt19937.typst-preview)
## How to edit typst script
```git
git clone https://github.com/donghoony/KUPC-2023
git submodule update --init --recursive
```
`main.typ`에서 Command palette를 연 뒤 (Ctrl + Shift + P in windows), `Typst Preview: Preview Current File`을 선택하면 미리보기가 활성화됩니다.
PDF 미리보기에서 문자 등을 클릭하면 해당 부분으로 편집할 수 있도록 이동합니다.
|
|
https://github.com/matthiasGmayer/structural-independence-typst | https://raw.githubusercontent.com/matthiasGmayer/structural-independence-typst/Typst/symbols.typ | typst | #let AS = math.cal("A")
#let BS = math.cal("B")
#let CS = math.cal("C")
#let DS = math.cal("D")
#let NS = math.cal("N")
#let ms = [#h(0pt)-measurable]
#let Lip = "Lip"
#let loc = "loc"
#let Val = "Val"
#let PA = "PA"
#let angles(a,b) = $angle.l #a, #b angle.r$
#let duality = angles
#let supp = "supp"
#let comp = math.overline
#let distributions=[$triangle.t$#h(0pt)]
#let distributionstimes=[$triangle.t^(#h(-0.25em)times)$#h(-4pt)]
#let indep = math.scripts(math.class("relation")[
#move(dy:0.045em)[#scale(origin: bottom, y:140%)[#sym.tack.t.double]]
])
#let orth = math.scripts(math.perp)
#let history = math.cal("H")
#let disintegrates = math.times.div
#let generates = math.tack
#let Union = math.union.big
#let Sect = math.sect.big
#let Times = math.times.big
#let And = math.and.big
#let Or = math.or.big
|
|
https://github.com/EGmux/ControlTheory-2023.2 | https://raw.githubusercontent.com/EGmux/ControlTheory-2023.2/main/classNotes/main.typ | typst | #include "./functions.typ"
#include "./dicasDeProva.typ"
#include "./comentarioResolucao.typ"
|
|
https://github.com/fuchs-fabian/typst-template-aio-studi-and-thesis | https://raw.githubusercontent.com/fuchs-fabian/typst-template-aio-studi-and-thesis/main/src/assets.typ | typst | MIT License | #import "utils.typ": *
// Card
#let card(
primary-color: dark-blue,
background-color: light-blue,
title: none,
img: none,
body
) = {
show par: set block(spacing: 1em)
rect(fill: background-color, stroke: none, inset: 1.3em)[
#text(1.2em, fill: primary-color, weight: "bold", title)
#grid(
columns: if is-not-none-or-empty(img) == false { (100%) } else { (75%, 25%) },
body,
if is-not-none-or-empty(img) {
let offset = if is-not-none-or-empty(title) == false { 0em } else { -2em }
box(inset: (top: offset))[#img]
}
)
]
}
// Author
#let author-box(
background-color: light-blue,
plural: false,
body
) = {
import "dictionary.typ": txt-author, txt-authors
show par: set block(spacing: 1em)
rect(fill: background-color, stroke: none, inset: 0.5em)[
#text[ #emph(if plural { txt-authors } else { txt-author }): ]
#text(weight: "bold", body)
]
}
// Buttons
#let button(
url: "",
fill: none,
stroke: none,
text-color: none,
body
) = {
show link: it => text(weight: "bold", it)
if is-not-none-or-empty(url) {
rect(
fill: if fill != none { fill } else { dark-blue },
stroke: if stroke != none { stroke } else { dark-blue },
radius: 3pt,
inset: .8em)[
#link(url)[
#text(
fill: if text-color != none { text-color } else { white }
)[
#body #h(2pt) ↗ //$arrow.tr.filled$
]
]
]
} else {
h(1.5pt)
box(
fill: if fill != none { fill } else { silver },
stroke: 1pt + if stroke != none { stroke } else { dark-grey },
inset: 2pt,
radius: 2pt,
baseline: 20%
)[
#text(
fill: if text-color != none { text-color } else { dark-grey }
)[
#body
]
]
h(1.5pt)
}
} |
https://github.com/HKFoggyU/hkust-thesis-typst | https://raw.githubusercontent.com/HKFoggyU/hkust-thesis-typst/main/hkust-thesis/templates/lof-page.typ | typst | LaTeX Project Public License v1.3c | #import "../imports.typ": *
#import "../utils/invisible-heading.typ": invisible-heading
// 目录生成
#let lof-page(
// documentclass 传入参数
config: (:),
info: (:),
// 其他参数
depth: 3,
// 间距
vspace: (25pt, 14pt),
indent: (0pt, 4.25em, 1.6em),
// 不显示点号
fill: (none, none),
..args,
) = {
set text(
font: constants.font-names.toc,
size: constants.font-sizes.toc,
)
// page setting
show outline.entry: outrageous.show-entry.with(
// 保留 Typst 基础样式
..outrageous.presets.typst,
body-transform: (level, it) => {
// 计算缩进
if (it.has("children") and it.children.at(3, default: none) == [#": "]) {
let pre = it.children.slice(0, 3).sum()
let sep = it.children.slice(3, 4).sum()
let post = it.children.slice(4).sum()
indent-entry(pre, sep, post)
} else {
it
}
},
// vspace: vspace,
fill: fill,
..args,
)
// page rendering
pagebreak(weak: true, to: if config.twoside { "odd" })
{
set align(center)
let toc-text = "List of Figures"
invisible-heading(toc-text)
heading(outlined: false)[#text(size: constants.font-sizes.title)[#upper(toc-text)]]
do-repeat([#linebreak()], 1)
}
{
// 显示目录
i-figured.outline(target-kind: image, title: none, depth: depth)
}
} |
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/cetz/0.0.2/lib/axes.typ | typst | Apache License 2.0 | // CeTZ Library for drawing graph axes
#import "../util.typ"
#import "../draw.typ"
#import "../vector.typ"
#import "../styles.typ"
// Global defaults
#let tic-limit = 100
#let default-style = (
fill: none,
stroke: black,
label: (
offset: .2,
),
tick: (
fill: none,
stroke: black,
length: .1,
minor-length: .08,
label: (
offset: .2,
)
),
grid: (
stroke: (paint: gray, dash: "dotted"),
fill: none
),
)
#let default-style-schoolbook = util.merge-dictionary(default-style, (
tick: (label: (offset: .1)),
mark: (end: ">"),
padding: .4))
// Construct Axis Object
//
// - min (number): Minimum value
// - max (number): Maximum value
// - ticks (dictionary): Tick settings:
// - step (number): Major tic step
// - minor-step (number): Minor tic step
// - unit (content): Tick label suffix
// - decimals (int): Tick float decimal length
// - label (content): Axis label
#let axis(min: -1, max: 1, label: none,
ticks: (step: auto, minor-step: none,
unit: none, decimals: 2, grid: false,
format: "float")) = (
min: min, max: max, ticks: ticks, label: label,
)
// Format a tick value
#let format-tick-value(value, tic-options) = {
let round(value, digits) = {
calc.round(value, digits: digits)
}
let format-float(value, digits) = {
$#round(value, digits)$
}
let format-sci(value, digits) = {
let exponent = if value != 0 {
calc.floor(calc.log(calc.abs(value), base: 10))
} else {
0
}
let ee = calc.pow(10, calc.abs(exponent + 1))
if exponent > 0 {
value = value / ee * 10
} else if exponent < 0 {
value = value * ee * 10
}
value = round(value, digits)
if exponent <= -1 or exponent >= 1 {
return $#value times 10^#exponent$
}
return $#value$
}
if type(value) in ("int", "float") {
let format = tic-options.at("format", default: "float")
if type(format) == "function" {
value = (format)(value)
} else if format == "sci" {
value = format-sci(value, tic-options.at("decimals", default: 2))
} else {
value = format-float(value, tic-options.at("decimals", default: 2))
}
} else if type(value) != "content" {
value = str(value)
}
if tic-options.at("unit", default: none) != none {
value += tic-options.unit
}
return value
}
// Get value on axis
//
// - axis (axis): Axis
// - v (number): Value
#let value-on-axis(axis, v) = {
if v == none { return }
let (min, max) = (axis.min, axis.max)
let dt = max - min; if dt == 0 { dt = 1 }
return (v - min) / dt
}
/// Compute list of linear ticks for axis
///
/// - axis (axis): Axis
#let compute-linear-ticks(axis) = {
let (min, max) = (axis.min, axis.max)
let dt = max - min; if (dt == 0) { dt = 1 }
let ticks = axis.ticks
let ferr = util.float-epsilon
let l = ()
if ticks != none {
let major-tick-values = ()
if "step" in ticks and ticks.step != none {
assert(ticks.step >= 0,
message: "Axis tick step must be positive")
let s = 1 / ticks.step
let n = range(int(min * s), int(max * s + 1.5))
assert(n.len() <= tic-limit,
message: "Number of major ticks exceeds limit.")
for t in n {
let v = (t / s - min) / dt
if v >= 0 - ferr and v <= 1 + ferr {
l.push((v, format-tick-value(t / s, ticks), true))
major-tick-values.push(v)
}
}
}
if "minor-step" in ticks and ticks.minor-step != none {
assert(ticks.minor-step >= 0,
message: "Axis minor tick step must be positive")
let s = 1 / ticks.minor-step
let n = range(int(min * s), int(max * s + 1.5))
assert(n.len() <= tic-limit * 10,
message: "Number of minor ticks exceeds limit.")
for t in n {
let v = (t / s - min) / dt
if v in major-tick-values {
// Prefer major ticks over minor ticks
continue
}
if v != none and v >= 0 and v <= 1 + ferr {
l.push((v, none, false))
}
}
}
}
return l
}
/// Get list of fixed axis ticks
///
/// - axis (axis): Axis object
#let fixed-ticks(axis) = {
let l = ()
if "list" in axis.ticks {
for t in axis.ticks.list {
let (v, label) = (none, none)
if type(t) in ("float", "integer") {
v = t
label = format-tick-value(t, axis.ticks)
} else {
(v, label) = t
}
v = value-on-axis(axis, v)
if v != none and v >= 0 and v <= 1 {
l.push((v, label, true))
}
}
}
return l
}
/// Compute list of axis ticks
///
/// A tick triple has the format:
/// (rel-value: float, label: content, major: bool)
///
/// - axis (axis): Axis object
#let compute-ticks(axis) = {
let find-max-n-ticks(axis, n: 11) = {
let dt = calc.abs(axis.max - axis.min)
let scale = calc.pow(10, calc.floor(calc.log(dt, base: 10) - 1))
if scale > 100000 or scale < .000001 {return none}
let (step, best) = (none, 0)
for s in (1, 1.5, 2, 2.5, 3, 4, 5, 6, 8, 10) {
s = s * scale
let divs = calc.abs(dt / s)
if divs >= best and divs <= n {
step = s
best = divs
}
}
return step
}
if axis.ticks.step == auto {
axis.ticks.step = find-max-n-ticks(axis, n: 11)
}
if axis.ticks.minor-step == auto {
axis.ticks.minor-step = if axis.ticks.step != none {
axis.ticks.step / 5
} else {
none
}
}
let ticks = compute-linear-ticks(axis)
ticks += fixed-ticks(axis)
return ticks
}
/// Draw inside viewport coordinates of two axes
///
/// - size (vector): Axis canvas size (relative to origin)
/// - origin (coordinates): Axis Canvas origin
/// - x (axis): X Axis
/// - y (axis): Y Axis
/// - name (string,none): Group name
#let axis-viewport(size, x, y, origin: (0, 0), name: none, body) = {
size = (rel: size, to: origin)
draw.group(name: name, {
draw.set-viewport(origin, size,
bounds: (x.max - x.min,
y.max - y.min,
0))
draw.translate((-x.min, y.min, 0), pre: false)
body
})
}
// Draw up to four axes in an "scientific" style at origin (0, 0)
//
// - left (axis): Left (y) axis
// - bottom (axis): Bottom (x) axis
// - right (axis): Right axis
// - top (axis): Top axis
// - size (array): Size (width, height)
// - name (string): Object name
// - padding (array): Padding (left, right, top, bottom)
// - frame (string): Frame mode:
// - true: Draw frame around all axes
// - "set": Draw line for set (!= none) axes
// - false: Draw no frame
// - ..style (any): Style
#let scientific(size: (1, 1),
left: none,
right: auto,
bottom: none,
top: auto,
frame: true,
padding: (left: 0, right: 0, top: 0, bottom: 0),
name: none,
..style) = {
import draw: *
if right == auto {
if left != none {
right = left; right.is-mirror = true
} else {
right = none
}
}
if top == auto {
if bottom != none {
top = bottom; top.is-mirror = true
} else {
top = none
}
}
group(name: name, ctx => {
let (w, h) = size
anchor("origin", (0, 0))
anchor("data-bottom-left", (0, 0))
anchor("data-top-right", (w, h))
let style = style.named()
style = util.merge-dictionary(default-style,
styles.resolve(ctx.style, style, root: "axes"))
let padding = (
l: padding.at("left", default: 0),
r: padding.at("right", default: 0),
t: padding.at("top", default: 0),
b: padding.at("bottom", default: 0),
)
let axis-settings = (
(left, "left", "right", (0, auto), ( 1, 0), "left"),
(right, "right", "left", (w, auto), (-1, 0), "right"),
(bottom, "bottom", "top", (auto, 0), (0, 1), "bottom"),
(top, "top", "bottom", (auto, h), (0, -1), "top"),
)
group(name: "axes", {
let (w, h) = (w - padding.l - padding.r,
h - padding.t - padding.b)
for (axis, _, anchor, placement, tic-dir, name) in axis-settings {
let style = style
if name in style {
style = util.merge-dictionary(style, style.at(name))
}
if axis != none {
let grid-mode = axis.ticks.at("grid", default: false)
grid-mode = (
major: grid-mode == true or grid-mode in ("major", "both"),
minor: grid-mode in ("minor", "both")
)
let is-mirror = axis.at("is-mirror", default: false)
for (pos, label, major) in compute-ticks(axis) {
let (x, y) = placement
if x == auto { x = pos * w + padding.l }
if y == auto { y = pos * h + padding.b }
let length = if major {
style.tick.length} else {
style.tick.minor-length}
let tick-start = (x, y)
let tick-end = vector.add(tick-start,
vector.scale(tic-dir, length))
if not is-mirror {
if label != none {
let label-pos = vector.add(tick-start,
vector.scale(tic-dir, -style.tick.label.offset))
content(label-pos, [#label], anchor: anchor)
}
if grid-mode.major and major or grid-mode.minor and not major {
let (grid-begin, grid-end) = if name in ("top", "bottom") {
((x, 0), (x, h))
} else {
((0, y), (w, y))
}
line(grid-begin, grid-end, ..style.grid)
}
}
if length != none and length > 0 {
line(tick-start, tick-end, ..style.tick)
}
}
}
}
assert(frame in (true, false, "set"),
message: "Invalid frame mode")
if frame == true {
rect((0, 0), size, ..style)
} else if frame == "set" {
let segments = ((),)
if left != none {segments.last() += ((0,h), (0,0))}
if bottom != none {segments.last() += ((0,0), (w,0))}
else {segments.push(())}
if right != none {segments.last() += ((w,0), (w,h))}
else {segments.push(())}
if top != none {segments.last() += ((w,h), (0,h))}
else {segments.push(())}
for s in segments {
if s.len() > 1 {
line(..s, ..style)
}
}
}
})
for (axis, side, anchor, ..) in axis-settings {
if axis == none {continue}
if "label" in axis and axis.label != none and not axis.at("is-mirror", default: false) {
let angle = if side in ("left", "right") {
-90deg
} else { 0deg }
// Use a group to get non-rotated anchors
group(content("axes." + side, axis.label,
angle: angle, padding: style.label.offset),
anchor: anchor)
}
}
})
}
// Draw two axes in a "school book" style
//
// - x-axis (axis): X axis
// - y-axis (axis): Y axis
// - size (array): Size (width, height)
// - x-position (number): X Axis position
// - y-position (number): Y Axis position
// - name (string): Object name
// - ..style (any): Style
#let school-book(x-axis, y-axis,
size: (1, 1),
x-position: 0,
y-position: 0,
name: none,
..style) = {
import draw: *
group(name: name, ctx => {
let style = style.named()
style = util.merge-dictionary(default-style-schoolbook,
styles.resolve(ctx.style, style, root: "axes"))
let x-position = calc.min(calc.max(y-axis.min, x-position), y-axis.max)
let y-position = calc.min(calc.max(x-axis.min, y-position), x-axis.max)
let padding = (
left: if y-position > x-axis.min {style.padding} else {style.tick.length},
right: style.padding,
top: style.padding,
bottom: if x-position > y-axis.min {style.padding} else {style.tick.length}
)
let (w, h) = size
let x-y = value-on-axis(y-axis, x-position) * h
let y-x = value-on-axis(x-axis, y-position) * w
let axis-settings = (
(x-axis, "top", (auto, x-y), (0, 1), "x"),
(y-axis, "right", (y-x, auto), (1, 0), "y"),
)
line((-padding.left, x-y), (w + padding.right, x-y),
..util.merge-dictionary(style, style.at("x", default: (:))),
name: "x-axis")
if "label" in x-axis and x-axis.label != none {
content((rel: (0, -style.tick.label.offset), to: "x-axis.end"),
anchor: "top", x-axis.label)
}
line((y-x, -padding.bottom), (y-x, h + padding.top),
..util.merge-dictionary(style, style.at("y", default: (:))),
name: "y-axis")
if "label" in y-axis and y-axis.label != none {
content((rel: (-style.tick.label.offset, 0), to: "y-axis.end"),
anchor: "right", y-axis.label)
}
// If both axes cross at the same value (mostly 0)
// draw the tick label for both axes together.
let origin-drawn = false
let shared-origin = x-position == y-position
for (axis, anchor, placement, tic-dir, name) in axis-settings {
if axis != none {
let style = style
if name in style {
style = util.merge-dictionary(style, style.at(name))
}
let grid-mode = axis.ticks.at("grid", default: false)
grid-mode = (
major: grid-mode == true or grid-mode in ("major", "both"),
minor: grid-mode in ("minor", "both")
)
for (pos, label, major) in compute-ticks(axis) {
let (x, y) = placement
if x == auto { x = pos * w }
if y == auto { y = pos * h }
let dir = vector.scale(tic-dir,
if major {style.tick.length} else {style.tick.minor-length})
let tick-begin = vector.sub((x, y), dir)
let tick-end = vector.add((x, y), dir)
let is-origin = x == y-x and y == x-y
if not is-origin {
if grid-mode.major and major or grid-mode.minor and not major {
let (grid-begin, grid-end) = if name == "x" {
((x, 0), (x, h))
} else {
((0, y), (w, y))
}
line(grid-begin, grid-end, ..style.grid)
}
line(tick-begin, tick-end, ..style.tick)
}
if label != none {
if is-origin and shared-origin {
if not origin-drawn {
origin-drawn = true
content(vector.add((x, y),
vector.scale((1, 1), -style.tick.label.offset / 2)),
[#label], anchor: "top-right")
}
} else {
content(vector.add(tick-begin,
vector.scale(tic-dir, -style.tick.label.offset)),
[#label], anchor: anchor)
}
}
}
}
}
})
}
|
https://github.com/EpicEricEE/typst-plugins | https://raw.githubusercontent.com/EpicEricEE/typst-plugins/master/outex/src/outex.typ | typst | // Repeat the given content to fill the full space.
//
// Parameters:
// - gap: The gap between repeated items. (Default: none)
// - justify: Whether to increase the gap to justify the items. (Default: false)
//
// Returns: The repeated content.
#let repeat(
gap: none,
justify: false,
body
) = layout(size => context {
let pt(length) = length.to-absolute()
let width = measure(body).width
let amount = calc.floor(pt(size.width + gap) / pt(width + gap))
let gap = if not justify { gap } else {
(size.width - amount * width) / (amount - 1)
}
let items = ((box(body),) * amount)
if type(gap) == length and gap != 0pt {
items = items.intersperse(h(gap))
}
items.join()
})
// Layout a heading entry in an outline.
//
// Parameters:
// - entry: The entry to apply the layout on.
// - gap: The gap between numbering and section title.
// - fill-pad: A dict (left, right) of the padding around the "fill" line.
// - bold: Whether to embolden first-level section titles.
// - space: Whether to add block-spacing before fist-level titles.
//
// Returns: The styled entry.
#let heading-entry(entry, gap, fill-pad, bold, space) = context {
let el = entry.element
let level = str(el.level)
let number = if el.numbering != none {
numbering(el.numbering, ..counter(heading).at(el.location()))
}
let page = {
let page-numbering = el.location().page-numbering()
if page-numbering == none { page-numbering = "1" }
numbering(page-numbering, ..counter(page).at(el.location()))
}
let number-width = measure(number + h(gap)).width
let page-width = measure(page).width
// Keep track of the maximum widths of the numbering and page.
let state = state("outex:0.1.0/heading", (
number-widths: (:),
page-width: 0pt,
))
state.update(state => {
let number-widths = state.number-widths
if level in number-widths {
number-widths.at(level) = calc.max(number-widths.at(level), number-width)
} else {
number-widths.insert(level, number-width)
}
(
page-width: calc.max(state.page-width, page-width),
number-widths: number-widths
)
})
// Add paragraph spacing
if el.level == 1 and space { parbreak() }
// Add links
let linked = link.with(el.location())
let number = linked(number)
let title = linked(el.body)
let page = linked(page)
// Render with final state
context {
let state = state.final()
let indent = range(1, el.level).map(level => {
state.number-widths.at(str(level), default: 0pt)
}).sum(default: 0pt)
let number-width = if el.numbering == none { 0pt } else {
state.number-widths.at(level)
}
let page-width = state.page-width
let fill = if el.level > 1 { entry.fill }
set text(weight: "bold") if bold and el.level == 1
box(grid(
columns: (indent, number-width, 1fr, page-width),
[],
number,
pad(
right: fill-pad.right,
title + box(width: 1fr, pad(left: fill-pad.left, fill))
),
align(bottom + end, page)
))
}
}
// Layout a figure entry in an outline.
//
// Parameters:
// - entry: The entry to apply the layout on.
// - gap: The gap between numbering and figure caption.
// - fill-pad: A dict (left, right) of the padding around the "fill" line.
//
// Returns: The styled entry.
#let figure-entry(entry, gap, fill-pad) = context {
let el = entry.element
let number = if el.numbering != none {
numbering(el.numbering, ..el.counter.at(el.location()))
}
let page = {
let page-numbering = el.location().page-numbering()
if page-numbering == none { page-numbering = "1" }
numbering(page-numbering, el.location().page())
}
let number-width = measure(number).width
let page-width = measure(page).width
// Keep track of the maximum widths of the numbering and page.
let state = state("outex:0.1.0/figure/" + repr(el.kind), (
number-width: 0pt,
page-width: 0pt,
))
state.update(state => {(
page-width: calc.max(state.page-width, page-width),
number-width: calc.max(state.number-width, number-width)
)})
// Add links
let linked = link.with(el.location())
let number = linked(number)
let title = linked(el.caption.body)
let page = linked(page)
// Render with final state
context {
let state = state.final()
let number-width = state.number-width
let page-width = state.page-width
box(grid(
columns: (number-width, gap, 1fr, page-width),
align(end, number),
[],
pad(
right: fill-pad.right,
title + box(width: 1fr, pad(left: fill-pad.left, entry.fill))
),
align(bottom + end, page)
))
}
}
// Template to apply for a LaTeX styled outline.
//
// Parameters:
// - gap: The gap between numbering and section title. (Default: 1em)
// - fill-pad: The padding around the "fill" line. (Default: (left: 0.5em, right: 1em))
// - bold: Whether to embolden first-level section titles. (Default: true)
// - space: Whether to add block-spacing before fist-level titles. (Default: true)
// - body: The content to apply the template on.
//
// Returns: The passed content with the styles applied.
#let outex(
gap: 1em,
fill-pad: (left: 0.5em, right: 1em),
bold: true,
space: true,
body
) = {
set outline(fill: align(end, repeat(gap: 0.5em, ".")))
// Convert fill-pad to dict
let fill-pad = if type(fill-pad) == dictionary {(
left: fill-pad.at("left", default: 0pt),
right: fill-pad.at("right", default: 0pt)
)} else {(
left: fill-pad,
right: fill-pad
)}
show outline.entry: it => {
let el = it.element
if el.func() == heading {
return heading-entry(it, gap, fill-pad, bold, space)
} else if el.func() == figure {
return figure-entry(it, gap, fill-pad)
}
it
}
body
}
|
|
https://github.com/MALossov/YunMo_Doc | https://raw.githubusercontent.com/MALossov/YunMo_Doc/main/contents/context.typ | typst | Apache License 2.0 | = 绪论
== 上海大学开源爱好者的交流平台
In real open source, you have the right to control your own destiny. —— <NAME>
+ 「自由、开放、平等」:我们秉承自由软件运动之精神,弘扬黑客(Hacker)文化,传播先进的开源技术方案,鼓励源代码开放,培养自由平等的社区氛围,致力为世界开源事业作出贡献@shuosc。
+ 公共社区服务:我们面向全校师生举办定期的技术分享活动,并通过自建的平台服务进行线上弹幕直播。同时,我们每周会在微信公众号、博客等平台推送原创的翻译资料与技术文章。 我们提供开源镜像、校内&谷歌代理、代码托管、验证码识别等服务,为广大师生进行学术研究、技术研发给予各类支持。
+ 技术交流社群:社区自 2010 年成立以来,这里有就职于微软、摩根士丹利、百度、腾讯、阿里等企业的已毕业成员,有正在清北交复浙乃至海外攻读硕博学位的高材生,还有知名开源项目的贡献者。社区中校内同学与往届成员保持密切的联系,开展各式各样的技术交流,衍生出前端技术、Python、Java 等专题兴趣小组。这样良好的技术交流氛围,是社区宝贵的财富,也吸引了校内各类的技术爱好者们参与到社区活动与建设中来。
+ 线下活动:除了技术分享,我们还会定期举办「Geek Party」茶话会,促进社区成员之间交流。同时,我们与校外企业、技术组织维系长期合作关系,不定期组织志愿者参加大型开源及技术专题活动,帮助同学们获知业界技术动向,了解开源事业发展。
= 模版简介
== 模板概述
本项目是基于上海大学本科毕业论文 LaTeX 模板,使用 Typst 语言重新编写而成,旨在帮助上海大学的本科生更方便地撰写自己的毕业论文。该模板基于 Typst 系统创建,相较于 Latex@tex1989,Typst 是一种语法更加简易的排版软件,可以用于制作高质量的科技论文和出版物。该项目目前已经包括论文的封面、摘要、正文、参考文献等,用户可以根据自己的需要进行修改和定制。
== 引用文献
这里参考了开源社区 Latex 模板中的参考文献@tex1989 @nikiforov2014 @algebra2000 @LuMan2016:Small-Spectral-Radius @HuQiShao2013:Cored-Hypergraphs @LinZhou2016:Distance-Spectral @KangNikiforov2014:Extremal-Problems @Qi2014:H-Plus-Eigenvalues @Nikiforov2017:Symmetric-Spectrum @BuFanZhou2016:Z-eigenvalues,可以点击序号跳转文末查看引用格式。
= 图表样例
== 图表样例
// 新增了对图的引用参考
如@fig-shuosc 所示是一个图片样例。
#figure(
image("../images/shuosc.png", width: 50%),
caption: [
如果你对计算机技术充满兴趣,或是愿意参与到我们的活动中来,欢迎加入我们!
],
) <fig-shuosc>
== 表格样例
@tab-oscer 展示了部分SHUOSC在校生或校友信息@SHUOSCers。
#figure(
table(
columns: (auto, auto, auto,auto),
[怎么称呼], [所在院系], [来句介绍], [甩个链接],
[chinggg], [2019网安], [开源招新中], [https://chinggg.github.io/],
[chasing], [2019计科], [摸鱼ing], [https://chasing1020.github.io/],
[guttutas], [2019计科], [模板开发中],[https://github.com/guttatus],
[JamesNULLiu], [2021计科], [C艹天下第一],[https://www.cnblogs.com/jamesnulliu/],
),
caption : [
SHUOSCers
]
) <tab-oscer>
= 公式样例
== 行内公式
行内公式 $a^2 + b^2 = c^2$ 行内公式。
== 独立公式
独立公式,如@eq-1 所示。
$
sum_(i=1)^(n) F_i(x) = F_1(x) + F_2(x) + ... + F_n(x)
$ <eq-1>
独立公式,如@eq-2 所示。
$
F_1(x) + F_2(x) + ... + F_n(x) = sum_(i=1)^(n) F_i(x)
$ <eq-2>
== #lorem(1)
#lorem(100)
=== #lorem(2)
#lorem(200) |
https://github.com/patricoferris/typst-template | https://raw.githubusercontent.com/patricoferris/typst-template/main/template/main.typ | typst | #import "./lib/lib.typ": *
#set text(lang: "en")
#let layout = {
ilm.with(
title: [The Scientific Method\ in the Computational Age], author: "<NAME>", date: datetime(year: 2024, month: 06, day: 30), abstract: [
_Department of Computer Science and Technology
\
Pembroke College_
\
\
Supervisor: _Prof. <NAME>_
\
Cosupervisor: _Prof. <NAME>_
\
\
The modern scientific method has become computational. But is computer science _helping_ or _hindering_ research? Using climate science and ecology as a case study, I proposed a systematic study of sources of uncertainty in critical results in these fields. Furthermore, I set out to design and implement a _specification language_ and _environment_ that empowers climate scientists and ecologists to create less ambiguous, more precise and testable scientific methodologies and results.
], bibliography: bibliography(style:"association-for-computing-machinery", "refs.bib"), figure-index: (enabled: true), table-index: (enabled: true), listing-index: (enabled: true),
)
}
#let appendix(body) = {
set heading(numbering: "A", supplement: [Appendix])
counter(heading).update(0)
body
}
#show: layout
|
|
https://github.com/MrLadas/resume | https://raw.githubusercontent.com/MrLadas/resume/main/README.md | markdown | # Resume
### [My resume](https://github.com/MrLadas/resume/releases/latest/download/resume.pdf) written in [Typst](https://github.com/typst/typst)
This repository contains my personal resume written in Typst. These documents are compiled using the Typst compiler in a GitHub Actions workflow. The compiler extracts input variables such as name and email directly from GitHub, which are then passed through the [--inputs](https://typst.app/docs/reference/foundations/sys/) CLI flag during the compilation process. Typst compiles the resume into a PDF format, and this PDF is then published as a release.
## Typst
[Typst](https://github.com/typst/typst) is a markup-based typesetting system designed to be as powerful as LaTeX while being much easier to learn and use.
It brings the capability of complex templating for code reuse even in typesetting, allowing for clean documents that are easier to update when needed.
## How It Works
The compilation process is automated using GitHub Actions. Whenever changes are pushed to the repository, the Typst compiler is triggered. It extracts input variables such as name and email from GitHub variables. These variables are then passed to the Typst compiler using the `--inputs` CLI flag. The compiler transforms the resume into a PDF format, ready for release.
## Credits
Forked from my good friend [jLevere](https://github.com/jLevere/resume)
This workflow is inspired by [this cool resume build system](https://github.com/mbund/resume).
For more information about Typst, visit the [official TypSt GitHub repository](https://github.com/typst/typst).
|
|
https://github.com/dssgabriel/master-thesis | https://raw.githubusercontent.com/dssgabriel/master-thesis/main/src/chapters/4-conclusion.typ | typst | Apache License 2.0 | = Conclusion
This internship aimed to explore Rust's viability for GPGPU programming in scientific computing use cases. On the one hand, HPC is shifting towards an ever-growing reliance on hardware accelerators, especially GPUs, and it is crucial to write robust code that efficiently exploits these new heterogeneous architectures. On the other hand, the Rust programming language focuses on performance, safety and concurrency, three aspects that align well with HPC's needs. Rust's type, memory, and thread safety features make it a particularly appealing language for this task.
Without any prior comprehensive work on Rust's potential for GPU programming, we set out to establish an exhaustive state of the art for the available options in this domain. We investigated various possibilities, first starting with the language's native support. Then, we explored compute shaders libraries that brought hardware accelerator programming capabilities to Rust. We concluded that the most relevant strategies for developing GPGPU kernels involved using bindings to the OpenCL API and the Rust-CUDA project, designed to bring first-class support for NVIDIA's CUDA framework within the Rust ecosystem.
#linebreak()
During this internship, we also contributed to the Rust-CUDA project by updating the code generation pipeline to support the newly released CUDA 12 Toolkit. We also added support for the most recent NVIDIA architectures to optimize the generated PTX targeting them.
The next step of this internship was to develop a scientific approach to evaluate the performance of Rust-based GPU programming. To this end, we developed an open-source tool, HARP, which automates the performance benchmarking of basic kernels often encountered in scientific applications. HARP was carefully designed to provide accurate and reliable results and remain portable across a wide variety of systems, from small laptops to bleeding-edge supercomputers.
Finally, we pushed the boundaries of Rust-based GPU programming by attempting to port parts of an industrial-grade scientific library for mesh partitioning. This proved to be remarkably challenging as we reached the limits of the Rust-CUDA project. Numerous constraints constitute critical opportunities for improving Rust's support in GPU programming.
The main challenge for Rust's adoption remains the low amount of contributions in projects that focus on HPC and scientific computing. This is reinforced by the absence of libraries that provide the basic blocks for writing more complex and well-optimized algorithms on hardware accelerators (e.g., NVIDIA CUB and NVIDIA Thrust in the CUDA ecosystem).
However, while the prospect of developing an entire application leveraging GPUs in Rust may currently seem challenging, the language exhibits several promising features that could turn into serious assets in the future. Rust already largely outclasses C and C++ for orchestrating the environment surrounding GPU execution. This includes the management of devices, streams, memory allocations and transfers, kernel launches, and more. Rust's distinctive memory management approach significantly alleviates the challenges posed by error handling and resource deallocation in C/C++. These often result in a plethora of elusive memory bugs, which can be arduous to trace and rectify. The OpenCL API bindings and the `cust` crate within the Rust-CUDA project already constitute a significantly better alternative than their default C/C++ counterparts.
Furthermore, as we demonstrated through several benchmarks presented in this report, Rust is capable of rivaling and even exceeding the performance of C++. Although kernels written using Rust-CUDA still lack some of the usual abstractions traditionally offered by Rust, they are more compact than their CUDA C++ equivalents. Given that Rust-CUDA is still in its early stages of development, it is easy to envision a future where Rust is the most accessible, efficient, and robust choice for GPU programming.
== Perspectives and future work
#h(1.8em)
The final weeks of this internship will focus on finishing to implement the GPU version of the RCB algorithm discussed in @rcb. We will also get the chance to conduct more benchmarks on an NVIDIA A100 GPU, which we hope to present during the thesis defense.
Beyond the scope of this internship, Rust has several challenges to address if it aims to become a proper first-class language for GPU programming. Its primary goal should be to improve the native language support, at least make it a usable alternative to Rust-CUDA. The Rust project leadership could also consider integrating the Rust-CUDA project into the upstream rustc compiler so as to benefit from the advanced work that has already been done and improve upon it. Likewise, the focus should be on enhancing the existing abstractions, particularly for manipulating slices, as well as fixing some of the overly verbose syntax required to write kernels.
Moreover, the serious lack of compute-focused libraries for GPU programming should be tackled as soon as possible to make Rust a more viable language for writing kernels.
#linebreak()
There are two possible approaches we can already propose:
1. Write bindings for existing C/C++ libraries that already fit this purpose, e.g., NVIDIA CUB and NVIDIA Thrust.
2. Implement an idiomatic wrapper over Rust-based kernels that provide the same functionality as Rust's native standard library, notably for handling iterators. This should allow for writing kernels that look and feel very much like usual CPU code while also benefiting from highly optimized GPU primitives that are abstracted away thanks to "syntax sugar."
#h(1.8em)
Another point that could be explored is Rust's support and performance on AMD hardware accelerators. This internship has been predominantly focused on NVIDIA GPUs, as it was the only hardware we had available. Future work could investigate the performance of OpenCL Rust on AMD, especially compared to ROCm/HIP C++. Likewise, we should examine the viability of a Rust-ROCm project, similar to what we have with Rust-CUDA, and even consider a direct integration into the Rust compiler.
|
https://github.com/sofianedjerbi/ResumeOld | https://raw.githubusercontent.com/sofianedjerbi/ResumeOld/main/modules/skills.typ | typst | Apache License 2.0 | #import "../brilliant-CV/template.typ": *
#cvSection("Compétences")
#let lightbold(str) = text(weight: 501, str)
#cvSkill(
type: [Langages],
info: [#lightbold("Java"), #lightbold("C++"), #lightbold("Python"), #lightbold("Kotlin"), SQL, Bash, Rust, C, UML, JavaScript, Julia, TypeScript, Haskell]
)
#cvSkill(
type: [Outils],
info: [#lightbold("Linux"), #lightbold("Git"), #lightbold("MySQL"), API REST, AWS, Azure, MongoDB, Docker, Jira, Gradle, Maven, Bitbucket, Jenkins]
)
#cvSkill(
type: [Librairies],
info: [#lightbold("Spring"), Hibernate, #lightbold("Guava"), Gson #hBar() Numpy, #lightbold("Pandas"), #lightbold("FastAPI"), Flask, Django #hBar() #lightbold("SQLite"), #lightbold("Qt"), Boost, Eigen]
)
|
https://github.com/fenjalien/metro | https://raw.githubusercontent.com/fenjalien/metro/main/tests/complex/qty/test.typ | typst | Apache License 2.0 | #import "/src/lib.typ": *
#import units: *
#set page(width: auto, height: auto, margin: 1cm)
#complex(1, 1, ohm)
#complex(1, 1deg, watt) |
https://github.com/MrToWy/Bachelorarbeit | https://raw.githubusercontent.com/MrToWy/Bachelorarbeit/master/Code/modulePrismaNew.typ | typst | #import("../Template/customFunctions.typ"): *
#text(size: 9.5pt)[
```prisma
model Module {
id Int @id @default(autoincrement())
name String?
degreeProgram DegreeProgram @relation(fields: [degreeProgramId], references: [id])
degreeProgramId Int
...
model DegreeProgram {
id Int @id @default(autoincrement())
modules Module[]
...
```
]
|
|
https://github.com/goshakowska/Typstdiff | https://raw.githubusercontent.com/goshakowska/Typstdiff/main/tests/test_complex/text_formats/text_formats.typ | typst | = Heading1
Paragraph with quotes “This is in quotes.”
#strong[Date:] 26.12.2022 \
Date used in paragraph #strong[Date:] 26.12.2022 \
#strong[Topic:] Infrastructure Test \
#strong[Severity:] High \
= Heading3
#emph[emphasis]
Some normal text
#text(font: "Linux Libertine", style: "italic")[Italic]
#upper[*my text*] \
#upper[ALREADY HIGH]
#link("https://typst.app/")
= Heading4
#lower("ABC")
Link in paragraph: #link("https://typst.app/")
= Heading5
|
|
https://github.com/An-314/Notes-of-Fundamentals_of_Electronics | https://raw.githubusercontent.com/An-314/Notes-of-Fundamentals_of_Electronics/main/chap2.typ | typst | #import "@local/mytemplate:1.0.0": *
#import "@preview/physica:0.9.2": *
*数字电路——用电压来编码信息*
电压优点:
- 容易产生
- 检测需要大量工程知识
- 稳态功率可能较低(追求为0)
电压缺点:
- 容易受环境影响
- 需要直流连接
#figure(
image("pic/2024-03-21-08-37-06.png", width: 80%),
caption: [
信号的处理过程
],
)
数据处理——运算
- 模拟的信号在处理过程中会有噪声干扰
- *数字系统具有抗干扰能力(tolerance)*
- 数字电路的特点:#footnote[导线不认为是数字电路元件,它没有这个特性]
- 接受的输入信号可以有一定的噪声
- 输出的信号是标准的0,1
- 0,1之间有一定的容错能力,存在一个Forbidden Zone(要求比较小)
- 由于离散化的处理,电路规模剧增
= 信息和编码
== 信息
信息熵(Claude Shannon):对于一个有$M$个可能状态的系统,一个信息给出了其中$N$个状态的信息量,则信息熵$H$定义为:
$
H = log_2(N/M)
$
例如:
- 一个硬币的信息熵为$log_2(2/1)=1$bit
== 编码Encoding
编码描述了为信息分配表征的过程
- 要选择适当、高效的编码
影响多个层面的设计
- 机制(设备、使用的组件数量)
- 效率(使用的比特)
- 可靠性(噪音)
- 安全性(加密)
+ 数制:表示数量的规则
- 每一位的构成
- 从低位向高位的进位规则
- 二进制:补码编码
+ 码制:用不同数码表示不同事物时遵循的规则。例如:学号,身份证号,车牌号。。。
- 目前,数字电路中都采用二进制
- 表示数量时称二进制
- 表示事物时称二值逻辑
Huffman编码:根据字符出现的频率,将出现频率高的字符用较短的编码表示,出现频率低的字符用较长的编码表示
= 逻辑代数基础
基本逻辑运算;基本公式,表示方法化简
*逻辑运算*:当二进制代码表示不同逻辑状态时,可以按一定的规则进行推理运算。
== 三种基本运算
#figure(
table(
columns: (auto, auto, auto),
inset: 10pt,
align: horizon,
[*与*],[*或*],[*非*],
)
)
=== 与
条件同时具备,结果发生。
真值表:
#grid(
columns: (1fr, 1fr),
[#figure(
table(
columns: (auto, auto, auto),
align: horizon,
[*A*],[*B*],[*AB*],
[0],[0],[0],
[0],[1],[0],
[1],[0],[0],
[1],[1],[1],
),
caption: [*AB*的真值表],
)],
[
#figure(
image("pic/2024-03-26-09-29-49.png", width: 30%),
caption: [
与门的逻辑电路
],
)
]
)
=== 或
条件任一具备,结果发生。
真值表:
#grid(
columns: (1fr, 1fr),
[#figure(
table(
columns: (auto, auto, auto),
align: horizon,
[*A*],[*B*],[*A+B*],
[0],[0],[0],
[0],[1],[1],
[1],[0],[1],
[1],[1],[1],
),
caption: [*A+B*的真值表],
)],
[
#figure(
image("pic/2024-03-26-09-30-26.png", width: 30%),
caption: [
或门的逻辑电路
],
)
]
)
=== 非
条件不具备,结果发生。
真值表:
#grid(
columns: (1fr, 1fr),
[#figure(
table(
columns: (auto, auto),
align: horizon,
[*A*],[*A'*],
[0],[1],
[1],[0],
),
caption: [*A'*的真值表],
)],
[
#figure(
image("pic/2024-03-26-09-30-50.png", width: 30%),
caption: [
非门的逻辑电路
],
)
]
)
=== 几种常用的复合逻辑运算
#figure(
table(
columns: (auto, auto, auto),
inset: 10pt,
align: horizon,
[*与非*],[*或非*],[*与或非*],
[
#figure(
image("pic/2024-03-26-09-32-16.png", width: 45%),
)
],
[
#figure(
image("pic/2024-03-26-09-32-34.png", width: 45%),
)
],
[
#figure(
image("pic/2024-03-26-09-33-04.png", width: 45%),
)
],
)
)
=== 异或
条件不同时具备,结果发生。
真值表:
#grid(
columns: (1fr, 1fr),
[#figure(
table(
columns: (auto, auto, auto),
align: horizon,
[*A*],[*B*],[*A⊕B*],
[0],[0],[0],
[0],[1],[1],
[1],[0],[1],
[1],[1],[0],
),
caption: [*A⊕B*的真值表],
)],
[
#figure(
image("pic/2024-03-26-09-33-58.png", width: 30%),
caption: [
异或门的逻辑电路
],
)
]
)
=== 同或
条件同时具备或不具备,结果发生。
真值表:
#grid(
columns: (1fr, 1fr),
[#figure(
table(
columns: (auto, auto, auto),
align: horizon,
[*A*],[*B*],[*A⊙B*],
[0],[0],[1],
[0],[1],[0],
[1],[0],[0],
[1],[1],[1],
),
caption: [*A⊙B*的真值表],
)],
[
#figure(
image("pic/2024-03-26-09-34-48.png", width: 30%),
caption: [
同或门的逻辑电路
],
)
]
)
== 逻辑代数的基本公式和常用公式
=== 基本公式
- $0 A = 0$
- $1 A = A$
- $A A = A$
- $A A' = 0$
- $A B = B A$
- $A (B C) = (A B) C$
- $A (B + C) = A B+A C$
- $(A B)' = A' + B'$[De Morgan's Law]
- $((A)')' = A$
- $1' = 0,0' = 1$
- $1 + A = 1$
- $0 + A = 0$
- $A + A = A$
- $A + A' = 1$
- $A + B = B + A$
- $A + (B + C) = (A + B) + C$
- $A + B C = (A + B)(A + C) $[Distributive Law]
证明:$(A + B)(A + C)= A +A B + A C + B C = A(1 + B +C) + B C$
- $(A + B)' = A' B'$[De Morgan's Law]
其中打方括号的是重要的公式,因为它们建立了和与积的关系。
=== 常用公式
- $A + A B = A$
- $A + A'B = (A + A')(A + B) = A + B$
- $A B + A B' = A$
- $A (A + B) = A$
- $A B + A'C + B C = A B + A'C + B C D = A B + A'C$
- $A(A B)' = A B', A'(A B)' = A'$
== 逻辑代数的基本定理
=== 代入定理
在任何一个包含A的逻辑等式中,若以另外一个逻辑式代入式中A的位置,则等式依然成立。
例如:
$
A + B C = (A + B)(A + C)
$
就有
$
A + B (C D) = (A + B)(A + C D) = (A + B)(A + C)(A + D)
$
=== 反演定理
对任一逻辑式,若将该式中的0换成1,1换成0,将所有的与或非运算符号互换,则所得的逻辑式称为原逻辑式的反逻辑式。
例如:
$
Y = A(B + C) + C D
$
的反逻辑式为
$
Y' &= (A' + B'C')(C' + D')\
&= A'C' + B' C' + A' D' + B'C' D'\
&= A'C' + B'C' + A' D'
$
== 逻辑函数及其表示方法
逻辑函数 $Y=F(A,B,C,...)$
——若以逻辑变量为输入,运算结果为输出,则输入变量值确定以后,输出的取值也随之而定。输入/输出之间是一种函数关系。#footnote[在二值逻辑中,输入/输出都只有两种取值0/1。]
各种表示方法之间可以相互转换:
- 真值表
- 逻辑式
- 逻辑图
- 波形图
- 卡诺图
- EDA中硬件描述语言
=== 真值表——厘清思路
#figure(
table(
columns: (auto, auto),
inset: 10pt,
align: horizon,
[输入变量 $A B C ...$],[输出 $Y_1 Y_2 ...$],
[遍历所有可能的输入变量的取值组合],[输出对应的取值],
)
)
=== 逻辑式——简洁
将输入/输出之间的逻辑关系用与/或/非的运算式表示就得到逻辑式。
=== 逻辑图——电路连接
用逻辑图形符号表示逻辑运算关系,与逻辑电路的实现相对应。
=== 波形图——实验室测试
将输入变量所有取值可能与对应输出按时间顺序排列起来画成时间波形。
#figure(
image("pic/2024-03-28-08-31-22.png", width: 80%),
caption: [
逻辑函数的波形图
],
)
=== EDA中的描述方式
HDL (Hardware Description Language)
- specifies logic function only
- Computer-aided design (CAD) tool produces or synthesizes the optimized gates
两种HDLs:
- Verilog
- developed in 1984 by Gateway Design Automation
- IEEE standard (1364) in 1995
- Extended in 2005 (IEEE STD 1800-2017)
- VHDL
- Developed in 1981 by the Department of Defense
- IEEE standard (1076) in 1987
- Updated in 2008 (IEEE STD 1076-2017)
Verilog Modules
```verilog
module example(input logic a, b, c,output logic y);
assign y = ~a & ~b & ~c | a & ~b & ~c | a & ~b & c;
endmodule
```
#grid(
columns: (1fr, 1fr),
[
#figure(
image("pic/2024-03-28-08-42-34.png", width: 80%),
caption: [
Verilog仿真
],
)],
[
#figure(
image("pic/2024-03-28-08-43-17.png", width: 80%),
caption: [
Synthesis
],
)
]
)
=== 各种表现形式的相互转换
==== 真值表$<=>$逻辑式
例如真值表:
#figure(
table(
columns: (auto, auto, auto, auto),
align: horizon,
[*A*],[*B*],[*C*],[*Y*],
[0],[0],[0],[0],
[0],[0],[1],[0],
[0],[1],[0],[0],
[0],[1],[0],[1],
[1],[0],[0],[0],
[1],[0],[1],[1],
[1],[1],[0],[1],
[1],[1],[0],[0],
),
caption: [
逻辑函数的真值表
],
)
逻辑式(合取范式):
$
Y = A'B C + A B'C + B'C
$
例如:
$
A ⊕ B = A'B + A B'
$
==== 真值表$<=>$逻辑式
#figure(
image("pic/2024-03-28-08-57-33.png", width: 50%),
caption: [
逻辑函数的真值表与逻辑图
],
)
== 逻辑函数的两种标准形式
+ 最小项之和
+ 最大项之积
*最小项 $m$(Minterm):*
- $m$是乘积项
- 包含$n$个因子
- $n$个变量均以原变量和反变量的形式在$m$中出现一次
#figure(
table(
columns: (auto, auto, auto, auto),
inset: 10pt,
align: horizon,
[*最小项*],[*取值*],[*对应十进制数*],[*编号*],
[$A'B'C'$],[000],[0],[$m_0$],
[$A'B'C$],[001],[1],[$m_1$],
[$A'B C'$],[010],[2],[$m_2$],
[$A'B C$],[011],[3],[$m_3$],
[$A B'C'$],[100],[4],[$m_4$],
[$A B'C$],[101],[5],[$m_5$],
[$A B C'$],[110],[6],[$m_6$],
[$A B C$],[111],[7],[$m_7$],
),
caption: [
三个变量的最小项
],
)
*最小项的性质:*
- 在输入变量任一取值下,*有且仅有一个最小项的值为1*。
- *全体最小项之和为1*。
- 任何两个最小项之积为0。
- *两个相邻的最小项之和可以合并*,消去一对因子,只留下公共因子。
把最小项取反,得到最大项。
*最大项 $M$(Maxterm):*
- $M$是和项
- 包含$n$个因子
- $n$个变量均以原变量和反变量的形式在$M$中出现一次
#figure(
table(
columns: (auto, auto, auto, auto),
inset: 10pt,
align: horizon,
[*最大项*],[*取值*],[*对应十进制数*],[*编号*],
[$A+B+C$],[000],[0],[$M_0$],
[$A+B+C'$],[001],[1],[$M_1$],
[$A+B'+C$],[010],[2],[$M_2$],
[$A+B'+C'$],[011],[3],[$M_3$],
[$A'+B+C$],[100],[4],[$M_4$],
[$A'+B+C'$],[101],[5],[$M_5$],
[$A'+B'+C$],[110],[6],[$M_6$],
[$A'+B'+C'$],[111],[7],[$M_7$],
),
caption: [
三个变量的最大项
],
)
$
Y &= sum m_i\
Y' &= sum_(k != i) m_k\
Y &= (sum_(k != i) m_k)'\
Y &= product_(k != i) m_k ' = product_(k != i) M_k
$
*最小项之和 = 最大项之积 (二者编号取补)*
== 逻辑函数的化简法
=== 逻辑函数的最简形式
*最简与或:*包含的乘积项已经最少,每个乘积项的因子也最少,称为最简的*与-或逻辑式*。
$
Y_1 &= A B C + B' C + A C D\
Y_2 &= A C + B'C
$
=== 公式化简法
反复应用基本公式和常用公式,消去多余的乘积项和多余的因子。
例:
$
Y &= A C + B' C +B D' + C D' + A( B + C' ) + A'B C D' + A B' D E\
&= A C + B' C + B D' + C D' + A(B'C)' + A B' D E\
&= A C + B' C + B D' + C D' + A + A B' D E\
&= A + B' C + B D' + C D'\
&= A + B' C + B D'
$
=== 卡诺图化简法
逻辑函数的卡诺图表示法
- 实质:将逻辑函数的最小项之和的以图形的方式表示出来。
- 以2n个小方块分别代表 n变量的所有最小项,并将它们排列成矩阵,而且使*几何位置相邻的两个最小项在逻辑上也是相邻的*(只有一个变量不同),就得到表示n变量全部最小项的卡诺图。
#grid(
columns: (1fr, 1fr),
[
#figure(
image("pic/2024-03-28-09-21-03.png", width: 50%),
caption: [
2个变量的卡诺图
],
)],
[
#figure(
image("pic/2024-03-28-09-21-16.png", width: 80%),
caption: [
3个变量的卡诺图
],
)
],
[
#figure(
image("pic/2024-03-28-09-21-36.png", width: 70%),
caption: [
4个变量的卡诺图
],
)
],
[
#figure(
image("pic/2024-03-28-09-21-58.png", width: 80%),
caption: [
5个变量的卡诺图
],
)
]
)
其实在卡诺图#footnote[卡诺图的排布不唯一,只需保留相邻]中相邻的最小项并不只是位置相邻的,还包括边界相邻的。
用卡诺图表示逻辑函数
1. 将函数表示为最小项之和的形式$sum m_i$
2. 在卡诺图上与这些最小项对应的位置上添入1,其余地方添0。
#figure(
table(
columns: (auto, auto, auto, auto, auto),
align: horizon,
[*A B*],[*00*],[*01*],[*11*],[*10*],
[*00*],[],[1],[],[],
[*01*],[1],[],[],[1],
[*11*],[],[],[],[],
[*10*],[1],[1],[1],[1],
),
caption: [
逻辑函数的卡诺图
],
)
对应的函数为$Y = A'B'C'D + A'B D' +A B'$。
用卡诺图化简函数:
- 依据:具有相邻性的最小项可合并,消去不同因子。
- 在卡诺图中,最小项的相邻性可以从图形中直观地反映出来。*一定是$2^n$*。
合并最小项的原则:
- 两个相邻最小项可合并为一项,消去一对因子
- 四个排成矩形的相邻最小项可合并为一项,消去两对因子
- 八个相邻最小项可合并为一项,消去三对因子
卡诺图化简的原则:
- 化简后的乘积项应包含函数式的所有最小项,*即覆盖图中所有的1*。
- 乘积项的数目最少,即*圈成的矩形最少*。
- 每个乘积项因子最少,即*圈成的矩形最大*。
不唯一性:卡诺图化简的结果不唯一,但是最简的项数是一样的。
#figure(
image("pic/2024-04-02-08-10-18.png", width: 80%),
caption: [
逻辑函数的卡诺图化简
],
)
#figure(
image("pic/2024-04-02-08-10-48.png", width: 80%),
caption: [
逻辑函数的卡诺图化简
],
)
=== 具有无关项的逻辑函数及其化简
==== 约束项、任意项和逻辑函数式中的无关项
*约束项*:在逻辑函数中,对输入变量取值的限制,在这些取值下为1的最小项称为约束项。
*任意项*:在输入变量某些取值下,函数值为1或为0不影响逻辑电路的功能,在这些取值下为1的最小项称为任意项。
*逻辑函数中的无关项*:约束项和任意项可以写入函数式,也可不包含在函数式中,因此统称为无关项。
==== 无关项在化简逻辑函数中的应用
- 合理地利用无关项,可得更简单的化简结果。
- 加入(或去掉)无关项,应使化简后的项数最少,每项因子最少。从卡诺图上直观地看,加入无关项的目的是为矩形圈最大,矩形组合数最少。
#figure(
image("pic/2024-04-02-08-23-04.png", width: 80%),
caption: [
逻辑函数的卡诺图化简
],
)
#figure(
image("pic/2024-04-02-08-23-45.png", width: 80%),
caption: [
逻辑函数的卡诺图化简
],
)
=== 机器化简法
机器化简法:奎恩—麦克拉斯基化简法(列表法)——Q—M法
#figure(
image("pic/2024-04-02-08-26-20.png", width: 80%),
caption: [
机器化简法
],
) |
|
https://github.com/HKFoggyU/hkust-thesis-typst | https://raw.githubusercontent.com/HKFoggyU/hkust-thesis-typst/main/hkust-thesis/templates/cover-page.typ | typst | LaTeX Project Public License v1.3c | #import "../imports.typ": *
#import "../utils/invisible-heading.typ": invisible-heading
#let cover-page(
config: (:),
info: (:),
) = {
let (degreeFull, degreeShort) = set-degree(info.degree)
set align(center)
// Main text
[
#pagebreak(weak: true, to: if config.twoside { "odd" })
#invisible-heading("Title Page")
#heading(outlined: false)[#text(size: constants.font-sizes.title)[#info.title.join("\n")]]
#do-repeat([#linebreak()], 5)
by
#do-repeat([#linebreak()], 1)
#info.author
#do-repeat([#linebreak()], 5)
A Thesis Submitted to\
The Hong Kong University of Science and Technology\
in Partial Fulfillment of the Requirements for\
the Degree of #degreeFull of Philosophy\
in #info.program
#do-repeat([#linebreak()], 3)
#info.submit-date.month #info.submit-date.year, #info.city
]
}
|
https://github.com/songoffireandice03/simple-template | https://raw.githubusercontent.com/songoffireandice03/simple-template/main/templates/maths.typ | typst | #let sc(it) = math.class("normal",
text(font: "", stylistic-set: 1, $cal(it)$) + h(0em)
)
#import "@preview/physica:0.9.2": *
#import "@preview/quick-maths:0.1.0": *
// The math stuff
#let mkdisplay(func) = (..args) => math.display(func(..args))
#let mkinline(func) = (..args) => inl(func(..args))
#let ds = math.display
#let inl = math.inline
#let dsum = ds(math.sum)
#let disum(x1,xn,fun) = $ds(sum_(i = x1)^(xn) fun)$
#let isum = inl(math.sum)
#let dpro = ds(math.product)
#let dpro = ds(math.product)
#let ipro = inl(math.product)
#let ang = $angle$
#let mang = $angle.arc$
#let line(content) = $arrow.l.r(content)$
#let seg(content) = $overline(content)$
#let conj(content) = $overline(content)$
#let arc(content) = $accent(content,paren.t)$
#let leq = $<=$
#let geq = $>=$
#let simeq = $tilde.equiv$
#let sim = $tilde$
#let sand = $sect$
#let sor = $union$
#let spn = $upright("span")$
#let Spn = $upright("Span")$
#let dlim(var, limit, fun) = $ds(lim_(var -> limit) fun)$
#let ilim(var, limit, fun) = $inline(lim_(var -> limit) fun)$
#let nlim(var, limit, fun) = $lim_(var -> limit) fun$
#let fall = $forall space$
#let est = $exists space$
#let fall2 = $space forall space$
#let est2 = $space exists space$
#let nest = $exists.not space$
#let est1 = $exists! space$
#let dot = $dprod$
#let crs = $times$
#let ap = $approx$
#let circ = $space circle.stroked.small space$
#let pp = $#h(0cm) + #h(0cm) +$
// Math styles
#let bba= $bb(a)$
#let bbb= $bb(b)$
#let bbc= $bb(c)$
#let bbd= $bb(d)$
#let bbe= $bb(e)$
#let bbf= $bb(f)$
#let bbg= $bb(g)$
#let bbh= $bb(h)$
#let bbi= $bb(i)$
#let bbj= $bb(j)$
#let bbk= $bb(k)$
#let bbl= $bb(l)$
#let bbm= $bb(m)$
#let bbn= $bb(n)$
#let bbo= $bb(o)$
#let bbp= $bb(p)$
#let bbq= $bb(q)$
#let bbr= $bb(r)$
#let bbs= $bb(s)$
#let bbt= $bb(t)$
#let bbu= $bb(u)$
#let bbv= $bb(v)$
#let bbw= $bb(w)$
#let bbx= $bb(x)$
#let bby= $bb(y)$
#let bbz= $bb(z)$
#let bbA= $bb(A)$
#let bbB= $bb(B)$
#let bbC= $bb(C)$
#let bbD= $bb(D)$
#let bbE= $bb(E)$
#let bbF= $bb(F)$
#let bbG= $bb(G)$
#let bbH= $bb(H)$
#let bbI= $bb(I)$
#let bbJ= $bb(J)$
#let bbK= $bb(K)$
#let bbL= $bb(L)$
#let bbM= $bb(M)$
#let bbN= $bb(N)$
#let bbO= $bb(O)$
#let bbP= $bb(P)$
#let bbQ= $bb(Q)$
#let bbR= $bb(R)$
#let bbS= $bb(S)$
#let bbT= $bb(T)$
#let bbU= $bb(U)$
#let bbV= $bb(V)$
#let bbW= $bb(W)$
#let bbX= $bb(X)$
#let bbY= $bb(Y)$
#let bbZ= $bb(Z)$
#let boa= $bold(a)$
#let bob= $bold(b)$
#let boc= $bold(c)$
#let bod= $bold(d)$
#let boe= $bold(e)$
#let bof= $bold(f)$
#let bog= $bold(g)$
#let boh= $bold(h)$
#let boi= $bold(i)$
#let boj= $bold(j)$
#let bok= $bold(k)$
#let bol= $bold(l)$
#let bom= $bold(m)$
#let bon= $bold(n)$
#let boo= $bold(o)$
#let bop= $bold(p)$
#let boq= $bold(q)$
#let bor= $bold(r)$
#let bos= $bold(s)$
#let bot= $bold(t)$
#let bou= $bold(u)$
#let bov= $bold(v)$
#let bow= $bold(w)$
#let box= $bold(x)$
#let boy= $bold(y)$
#let boz= $bold(z)$
#let boA= $bold(A)$
#let boB= $bold(B)$
#let boC= $bold(C)$
#let boD= $bold(D)$
#let boE= $bold(E)$
#let boF= $bold(F)$
#let boG= $bold(G)$
#let boH= $bold(H)$
#let boI= $bold(I)$
#let boJ= $bold(J)$
#let boK= $bold(K)$
#let boL= $bold(L)$
#let boM= $bold(M)$
#let boN= $bold(N)$
#let boO= $bold(O)$
#let boP= $bold(P)$
#let boQ= $bold(Q)$
#let boR= $bold(R)$
#let boS= $bold(S)$
#let boT= $bold(T)$
#let boU= $bold(U)$
#let boV= $bold(V)$
#let boW= $bold(W)$
#let boX= $bold(X)$
#let boY= $bold(Y)$
#let boZ= $bold(Z)$
#let cla= $cal(a)$
#let clb= $cal(b)$
#let clc= $cal(c)$
#let cld= $cal(d)$
#let cle= $cal(e)$
#let clf= $cal(f)$
#let clg= $cal(g)$
#let clh= $cal(h)$
#let cli= $cal(i)$
#let clj= $cal(j)$
#let clk= $cal(k)$
#let cll= $cal(l)$
#let clm= $cal(m)$
#let cln= $cal(n)$
#let clo= $cal(o)$
#let clp= $cal(p)$
#let clq= $cal(q)$
#let clr= $cal(r)$
#let cls= $cal(s)$
#let clt= $cal(t)$
#let clu= $cal(u)$
#let clv= $cal(v)$
#let clw= $cal(w)$
#let clx= $cal(x)$
#let cly= $cal(y)$
#let clz= $cal(z)$
#let clA= $cal(A)$
#let clB= $cal(B)$
#let clC= $cal(C)$
#let clD= $cal(D)$
#let clE= $cal(E)$
#let clF= $cal(F)$
#let clG= $cal(G)$
#let clH= $cal(H)$
#let clI= $cal(I)$
#let clJ= $cal(J)$
#let clK= $cal(K)$
#let clL= $cal(L)$
#let clM= $cal(M)$
#let clN= $cal(N)$
#let clO= $cal(O)$
#let clP= $cal(P)$
#let clQ= $cal(Q)$
#let clR= $cal(R)$
#let clS= $cal(S)$
#let clT= $cal(T)$
#let clU= $cal(U)$
#let clV= $cal(V)$
#let clW= $cal(W)$
#let clX= $cal(X)$
#let clY= $cal(Y)$
#let clZ= $cal(Z)$
#let sca= $sc(a)$
#let scb= $sc(b)$
#let scc= $sc(c)$
#let scd= $sc(d)$
#let sce= $sc(e)$
#let scf= $sc(f)$
#let scg= $sc(g)$
#let sch= $sc(h)$
#let sci= $sc(i)$
#let scj= $sc(j)$
#let sck= $sc(k)$
#let scl= $sc(l)$
#let scm= $sc(m)$
#let scn= $sc(n)$
#let sco= $sc(o)$
#let scp= $sc(p)$
#let scq= $sc(q)$
#let scr= $sc(r)$
#let scs= $sc(s)$
#let sct= $sc(t)$
#let scu= $sc(u)$
#let scv= $sc(v)$
#let scw= $sc(w)$
#let scx= $sc(x)$
#let scy= $sc(y)$
#let scz= $sc(z)$
#let scA= $sc(A)$
#let scB= $sc(B)$
#let scC= $sc(C)$
#let scD= $sc(D)$
#let scE= $sc(E)$
#let scF= $sc(F)$
#let scG= $sc(G)$
#let scH= $sc(H)$
#let scI= $sc(I)$
#let scJ= $sc(J)$
#let scK= $sc(K)$
#let scL= $sc(L)$
#let scM= $sc(M)$
#let scN= $sc(N)$
#let scO= $sc(O)$
#let scP= $sc(P)$
#let scQ= $sc(Q)$
#let scR= $sc(R)$
#let scS= $sc(S)$
#let scT= $sc(T)$
#let scU= $sc(U)$
#let scV= $sc(V)$
#let scW= $sc(W)$
#let scX= $sc(X)$
#let scY= $sc(Y)$
#let scZ= $sc(Z)$
#let sbs = $subset$
#let nsbs = $subset.not$
#let psbs = $subset.eq$
#let isbs = $subset.neq$
#let npsbs = $subset.eq.not$
#let sps = $supset$
#let nsps = $supset.not$
#let psps = $supset.eq$
#let isps = $supset.neq$
#let npsps = $supset.eq.not$
#let imap(set1,set2) = $iota_(set1 --> set2)$
#let opp = $plus.circle$
#let oxx = $times.circle$
#let dfr(enum,denom) = $ds(frac(enum,denom))$
#let ifr(enum,denom) = $inline(frac(enum,denom))$
#let fr(enum,denom) = $frac(enum,denom)$
#let nabla = $grad$
#let del = $grad$
#let vdots = $dots.v$
#let ddots = $dots.down$
#let udots = $dots.up$
#let cdots = $dots.h.c$
#let romt = math.mat.with(delim: "(")
#let sqmt = math.mat.with(delim: "[")
#let crmt = math.mat.with(delim: "{")
#let brmt = math.mat.with(delim: "|")
#let bbmt = math.mat.with(delim: "||")
#let romtd = mkdisplay(math.mat.with(delim: "("))
#let sqmtd = mkdisplay(math.mat.with(delim: "["))
#let crmtd = mkdisplay(math.mat.with(delim: "{"))
#let brmtd = mkdisplay(math.mat.with(delim: "|"))
#let bbmtd = mkdisplay(math.mat.with(delim: "||"))
#let rocs = math.cases.with(delim: "(")
#let sqcs = math.cases.with(delim: "[")
#let crcs = math.cases.with(delim: "{")
#let brcs = math.cases.with(delim: "|")
#let bbcs = math.cases.with(delim: "||")
#let rocsd = mkdisplay(math.cases.with(delim: "("))
#let sqcsd = mkdisplay(math.cases.with(delim: "["))
#let crcsd = mkdisplay(math.cases.with(delim: "{"))
#let brcsd = mkdisplay(math.cases.with(delim: "|"))
#let bbcsd = mkdisplay(math.cases.with(delim: "||"))
#let dromt = mkdisplay(dmat.with(delim: "("))
#let dsqmt = mkdisplay(dmat.with(delim: "["))
#let dcrmt = mkdisplay(dmat.with(delim: "{"))
#let dbrmt = mkdisplay(dmat.with(delim: "|"))
#let dbbmt = mkdisplay(dmat.with(delim: "||"))
#let dadromt = mkdisplay(admat.with(delim: "("))
#let dadsqmt = mkdisplay(admat.with(delim: "["))
#let dadcrmt = mkdisplay(admat.with(delim: "{"))
#let dadbrmt = mkdisplay(admat.with(delim: "|"))
#let dadbbmt = mkdisplay(admat.with(delim: "||"))
#let drromt = mkdisplay(rot2mat.with(delim: "("))
#let drsqmt = mkdisplay(rot2mat.with(delim: "["))
#let drcrmt = mkdisplay(rot2mat.with(delim: "{"))
#let drbrmt = mkdisplay(rot2mat.with(delim: "|"))
#let drbbmt = mkdisplay(rot2mat.with(delim: "||"))
#let rromt = rot2mat.with(delim: "(")
#let rsqmt = rot2mat.with(delim: "[")
#let rcrmt = rot2mat.with(delim: "{")
#let rbrmt = rot2mat.with(delim: "|")
#let rbbmt = rot2mat.with(delim: "||")
#let adromt = admat.with(delim: "(")
#let adsqmt = admat.with(delim: "[")
#let adcrmt = admat.with(delim: "{")
#let adbrmt = admat.with(delim: "|")
#let adbbmt = admat.with(delim: "||")
#let rovt = math.vec.with(delim: "(")
#let sqvt = math.vec.with(delim: "[")
#let crvt = math.vec.with(delim: "{")
#let brvt = math.vec.with(delim: "|")
#let bbvt = math.vec.with(delim: "||")
#let drovt = mkdisplay(math.vec.with(delim: "("))
#let dsqvt = mkdisplay(math.vec.with(delim: "["))
#let dcrvt = mkdisplay(math.vec.with(delim: "{"))
#let dbrvt = mkdisplay(math.vec.with(delim: "|"))
#let dbbvt = mkdisplay(math.vec.with(delim: "||"))
#let ni = math.in.rev
#let nni = math.in.rev.not
#let nin = math.in.not
#let vdot = math.circle.filled.small
#let sl = math.slash
#let R3 = $bbR^(3)$
#let R2 = $bbR^(2)$
#let R4 = $bbR^(2)$
#let Rn = $bbR^(n)$
#let Roo = $bbR^(oo)$
#let Coo = $bbC^(oo)$
#let Cin = $clC^(oo)$
#let C3 = $bbC^(3)$
#let C2 = $bbC^(2)$
#let C4 = $bbC^(4)$
#let Cn = $bbC^(n)$
#let cn = $clC^(n)$
#let c1 = $clC^(1)$
#let c2 = $clC^(2)$
#let xx = math.times
#let mkdisplay(func) = (..args) => ds(func(..args))
#let nnm(content) = {
math.equation(numbering: none, block: true, content)
}
#let prnm(number, content) = {h(1fr)
set math.equation(numbering: n => {
numbering("(1.1)", number)})
content
}
#let scnm(m,e,content) = {h(1fr)
set math.equation(numbering: n => {
numbering("(1.1)", m, e) // Manually builds a numbering with custom section and equation numbers
} )
content
}
#let prnm2(number, content) = {
set math.equation(numbering: n => {
numbering("(1.1)", number)})
content
}
#let scnm2(m,e,content) = {
set math.equation(numbering: n => {
numbering("(1.1)", m, e) // Manually builds a numbering with custom section and equation numbers
} )
content
}
#let eset = math.emptyset
#let lor = math.union.big
#let land = math.sect.big
#let nequiv = math.equiv.not
#let ddv = mkdisplay(dv)
#let dpdv = mkdisplay(pdv)
#let idv = mkinline(dv)
#let ipdv = mkinline(pdv)
#let pr = $lt.curly$
// Units
#let dinte = ds(math.integral)
#let dintev = ds(math.integral.vol)
#let iintev = inl(math.integral.vol)
#let nintev = math.integral.vol
#let dintes = ds(math.integral.surf)
#let iintes = inl(math.integral.surf)
#let nintes = math.integral.surf
#let dintec = ds(math.integral.cont)
#let iintec = inl(math.integral.cont)
#let nintec = math.integral.cont
#let dinte4 = ds(math.integral.quad)
#let iinte4 = inl(math.integral.quad)
#let ninte4 = math.integral.quad
#let dinte3 = ds(math.integral.triple)
#let iinte3 = inl(math.integral.triple)
#let ninte3 = math.integral.triple
#let dinte2 = ds(math.integral.double)
#let iinte2 = inl(math.integral.double)
#let ninte2 = math.integral.double
#let dpdv(fun,var) = $ds(pdv(fun,var))$
#let Hom = math.upright("Hom") |
|
https://github.com/Myriad-Dreamin/shiroa | https://raw.githubusercontent.com/Myriad-Dreamin/shiroa/main/github-pages/docs/cli/init.typ | typst | Apache License 2.0 | #import "/github-pages/docs/book.typ": book-page, cross-link
#show: book-page.with(title: "CLI Init Command")
= The init command
The `init` command will try to initialize your book to build your book successfully by default. It is hence including all of the #cross-link("/cli/build.typ")[options] from `build` command.
For instance, Initialize a book to the directory `my-book`:
```bash
shiroa init my-book/
shiroa build my-book/
```
Initialize a book with specific typst workspace directory:
```bash
shiroa init -w . my-book/
shiroa build -w . my-book/
```
Initialize a book with specific `dest-dir`:
```bash
shiroa init --dest-dir ../dist my-book/
shiroa build my-book/ # memoryized dest-dir
```
== Things to note
The harder way, by creating the book without `init` command, your `book.typ` should at least provides a `book-meta`, as #cross-link("/guide/get-started.typ")[Get Started] shown.
```typ
#import "@preview/shiroa:0.1.1": *
#show: book
#book-meta(
title: "My Book"
summary: [
= My Book
]
)
```
Your `template.typ` must import and respect the `page-width` and `target` variable from `@preview/shiroa:0.1.1` to this time. The two variables will be used by the tool for rendering responsive layout and multiple targets.
```typ
#import "@preview/shiroa:0.1.1": get-page-width, target, is-web-target, is-pdf-target
// Metadata
#let page-width = get-page-width()
#let is-pdf-target = is-pdf-target() // target.starts-with("pdf")
#let is-web-target = is-web-target() // target.starts-with("web")
#let project(body) = {
// set web/pdf page properties
set page(
width: page-width,
// for a website, we don't need pagination.
height: auto,
)
// remove margins for web target
set page(margin: (
// reserved beautiful top margin
top: 20pt,
// Typst is setting the page's bottom to the baseline of the last line of text. So bad :(.
bottom: 0.5em,
// remove rest margins.
rest: 0pt,
)) if is-web-target;
body
}
```
|
https://github.com/typst/packages | https://raw.githubusercontent.com/typst/packages/main/packages/preview/supercharged-dhbw/1.3.0/template/acronyms.typ | typst | Apache License 2.0 | // Define your acronyms here
// For more information look at the used package https://typst.app/universe/package/acrostiche
#let acronyms = (
"API": ("Application Programming Interface"),
"AWS": ("Amazon Web Services"),
) |
https://github.com/mcarifio/explore.typst | https://raw.githubusercontent.com/mcarifio/explore.typst/main/src/examples/example-merged-dicts.typ | typst | // pandoc -t html example-merged-dicts.typ
#let defaults = (x:1, y:2)
#let overrides = (x:3, z:4)
#let merged = overrides + defaults // first key wins
#for (k,v) in merged { [ #k: #v ] }
|
|
https://github.com/polarkac/MTG-Stories | https://raw.githubusercontent.com/polarkac/MTG-Stories/master/stories/032_Ixalan.typ | typst | #import "@local/mtgset:0.1.0": conf
#show: doc => conf("Ixalan", doc)
#include "./032 - Ixalan/001_Jace, Alone.typ"
#include "./032 - Ixalan/002_A Question of Confidence.typ"
#include "./032 - Ixalan/003_The Talented Captain Vraska.typ"
#include "./032 - Ixalan/004_The Shapers.typ"
#include "./032 - Ixalan/005_Something Else Entirely.typ"
#include "./032 - Ixalan/006_The Race, Part 1.typ"
#include "./032 - Ixalan/007_The Race, Part 2.typ"
|
|
https://github.com/rabotaem-incorporated/algebra-conspect-1course | https://raw.githubusercontent.com/rabotaem-incorporated/algebra-conspect-1course/master/main.typ | typst | Other | #import "utils/core.typ": notes
#show: notes.with(
name: "Конспект лекций по алгебре за первый курс",
short-name: "Алгебра",
lector: "<NAME>",
info: "СПБГУ МКН, Современное программирование, 2022-2023",
)
#include "sections/01-number-theory/!sec.typ"
#include "sections/02-complex-numbers/!sec.typ"
#include "sections/03-polynomials/!sec.typ"
#include "sections/04-linear-algebra/!sec.typ"
#include "sections/05-group-theory/!sec.typ"
#include "sections/06-field-theory/!sec.typ"
#include "appendix.typ"
|
https://github.com/monaqa/typst-class-memo | https://raw.githubusercontent.com/monaqa/typst-class-memo/master/src/code.typ | typst | MIT License | //! target: ../.memo.local/memo.typ
// code 記述における便利関数
#let normal_raw_block(body) = {
block(
width: 100%,
fill: luma(95%),
inset: (x: 4pt, top: 6pt, bottom: 6pt),
radius: 2pt,
body
)
}
#let console_block(body) = {
block(
width: 100%,
stroke: (left:3pt + luma(30%), rest: 1pt + luma(30%)),
fill: luma(85%),
inset: (x: 4pt, top: 6pt, bottom: 6pt),
radius: 0pt,
body
)
}
#let termlog(input, output) = {
grid(rows: 2, input, block(
stroke: (left: 3pt + luma(30%)),
inset: (left: 4pt, top: 4pt),
output
))
}
#let filecode(fname, href: none, body) = {
show raw.where(block: true): (it) => {
grid(
rows: 2,
block(
width: 100%,
stroke: (bottom: none, rest: 1.5pt),
fill: luma(20%),
inset: (top: 4pt, bottom: 6pt, x: 4pt),
radius: (top: 4pt),
[
#text(size: 0.8em, fill: white, font: "Courier", fname)
#if href != none {
place(
right + top,
text(
size: 0.7em,
link(
href,
text(fill: blue.lighten(70%), underline[ View Full Code]),
),
),
)
}
],
),
block(
width: 100%,
stroke: (top: none, rest: 1.5pt),
inset: 2pt,
radius: (bottom: 4pt),
it,
),
)
}
body
}
|
https://github.com/elpekenin/access_kb | https://raw.githubusercontent.com/elpekenin/access_kb/main/typst/content/parts/hardware/scanning.typ | typst | #import "@preview/glossarium:0.4.2": gls
==== Conexión directa <conexión-directa>
La opción más sencilla que se nos puede ocurrir para conectar diversos interruptores a nuestro microcontrolador es soldarlos directamente a los pines de entrada/salida (GPIO). Para hacer esto tenemos 2 opciones:
#figure(
grid(
columns: (auto, auto),
gutter: 1em,
figure(
image("../../../images/pull_down.png"),
caption: [Pull-Down],
numbering: none,
outlined: false,
),
figure(
image("../../../images/pull_up.png"),
caption: [Pull-Up],
numbering: none,
outlined: false,
),
),
caption: [Cableado directo],
)
Si hacemos esto, sin embargo, tendremos un problema pronto porque necesitaremos un chip con muchos pines de entrada/salida, o hacer un teclado con pocas teclas porque la cantidad de GPIOs es reducida.
==== Matriz <matriz>
Para solventar este problema, podemos cablear los botones mediante una matriz, usando un pin para cada fila y columna de teclas. Usamos una dimensión como salida y otra como entrada, haciendo un bucle que aplique voltaje en cada una de las filas y compruebe si las columnas reciben una entrada (tecla pulsada cerrando el circuito).
*Nota*: También se podría iterar en la otra dimensión
#figure(
image("../../../images/matrix.png", width: 35%),
caption: [Cableado en matriz],
)
Este diseño también tiene sus problemas, el más notorio es el conocido como "efecto _ghosting_" en el que podemos detectar como pulsada una tecla que no lo está.
#figure(
image("../../../images/ghosting.png", width: 35%),
caption: [Ghosting en una matriz],
)
En este ejemplo, la tecla *(1, 1)* se detecta como pulsada de manera correcta pero, al pulsar también las teclas *(0, 1)* y *(0, 0)*, estamos cerrando el circuito y generando que en la columna 1 llegue voltaje a la entrada, que será interpretado como que la tecla *(1, 0)* ha sido pulsada puesto que estamos en la iteración de la fila 0.
Este problema se solventa de forma sencilla, añadiendo unos diodos que bloqueen esta retroalimentación permitiendo detectar *(1, 1)* pero sin la pulsación falsa de *(1, 0)* del caso anterior.
#figure(
image("../../../images/anti_ghosting.png", width: 45%),
caption: [Matriz anti-ghosting],
)
Aunque no es muy grave, para matrices muy desiguales, por ejemplo 5x20 teclas, no estamos usando eficazmente los pines, ya que para esas 100 teclas estamos empleando 25 pines mientras que una configuración 10x10 (20 pines) sería suficiente. En este caso, podriamos hacer una distribución de teclas en forma rectangular, pero luego cablearlas como dicha matrix cuadrada, sin embargo el diseño sería bastante más confuso.
Por último hay que tener en cuenta que, aunque el uso de los pines sea más óptimo, seguimos necesitando una cantidad de pines cada vez mayor conforme queramos añadir más teclas, aunque esto no debería ser un factor limitante en la mayoría de casos ya que este límite seguiría permitiendo una cantidad bastante elevada de teclas.
==== Lectura en serie <lectura-en-serie>
La opción que vamos a usar, inspirada en el _ghoul_#cite(<ghoul>), consiste en el uso de registros de desplazamiento conectados en una _daisy chain_, de esta forma vamos a emplear un único pin para leer todas las teclas en una señal serie, y otros pocos pines (unos 3 o 4) para controlar estos chips mediante #gls("spi") o #gls("i2c"). De esta forma, podemos escanear potencialmente cualquier cantidad de teclas sin aumentar el números de pines necesarios, simplemente añadimos más registros a la cadena (aunque el escaneo se iría haciendo más y más lento)
|
|
https://github.com/jgm/typst-hs | https://raw.githubusercontent.com/jgm/typst-hs/main/test/typ/compute/data-03.typ | typst | Other | // Test reading CSV data.
// Ref: true
#set page(width: auto)
#let data = csv("test/assets/files/zoo.csv")
#let cells = data.at(0).map(strong) + data.slice(1).flatten()
#table(columns: data.at(0).len(), ..cells)
|
https://github.com/skomaroh1845/TheoreticalInformaticsMIPT | https://raw.githubusercontent.com/skomaroh1845/TheoreticalInformaticsMIPT/main/HW4.typ | typst | = <NAME> ДЗ №4
#set par(
justify: true,
)
= Задача 1
Какие из включений $subset.eq, supset.eq$ имеют место между классами TIME($n^2$) и SPACE($n^2 log n$)?
== Решение
Для МТ имеем теорему о соотношении между T и S: $S_M (arrow(x)) lt.eq.slant T_M (arrow(x))$.
TIME($n^2$) $arrow.r.double$ $T_M (arrow(x)) = O(n^2)$, где $n=$ $bar.v$$arrow(x)$$bar.v$. Значит для МТ этого класса зона будет $lt.eq.slant O(n^2)$.
SPACE($n^2 log n$) $arrow.r.double$ $S_M (arrow(x)) = O(n^2 log n)$, значит время МТ этого класса будет $gt.eq.slant O(n^2 log n)$.
Из последовательного сравнения машин видим, что у машин класса TIME($n^2$) и время, и зона меньше таковых у маишн класса SPACE($n^2 log n$), значит TIME($n^2$) $subset.eq$ SPACE($n^2 log n$).
= Задача 2
Пусть язык $L$ распознается 0−1-машиной $M$, такой что $S_M (n) lt.eq.slant f(n)$ при всех $n in N$. Докажите,
что для каждого $epsilon > 0$ существует 0−1-машина $M'$, распознающая язык $L$, такая что $S_(M') lt.eq.slant n + epsilon f(n)$.
== Доказательство
$square$
Идея - сопоставить последовательности k входных символов исходной машины комбинацию этих символов записанную в одну ячейку, где $k = ceil.l 1/epsilon ceil.r$.
$bracket.l 1 bracket.r bracket.l 0 bracket.r bracket.l 1 bracket.r...$ $arrow.r$ $bracket.l 101 bracket.r ...$
Для этого потребуется перекодирование исходного входного алфавита машины $M$ и дальнейшая эмуляция $M$ машиной $M'$ на преобразованном новом алфавите.
Для эмуляции сопоставим состояния старой машины с состояниями новой, это требует храния в состояниях новой $M'$ некоторый субъячеечный индекс отвечающих состоянию исходной машины на исходных раздельных символах, то есть состоянию машины $M$ $q_k$ будет соответствовать состояние $q'_(i k j)$ машины $M'$, где i -- номер новой ячейки, k -- соответсвие состояцию исходной машины, а j -- позиция символа в новой ячейке для изменения.
Время алгоритма нам не важно исходя из условия задачи. Зато благодаря преобразованию зона эмулирующей машины будет $f(n) / k lt.eq.slant epsilon f(n)$ (так как k окргляли вверх). При этом сам вход изначально занимал n.
Таким образом для всей конструкции имеем $S_M' lt.eq.slant n + f(n)/k lt.eq.slant n + epsilon f(n)$.
#align(right, $square.filled$) |
|
https://github.com/piepert/philodidaktik-hro-phf-ifp | https://raw.githubusercontent.com/piepert/philodidaktik-hro-phf-ifp/main/src/parts/ephid/beurteilen_bewerten/missverstaendnisse_bewertung.typ | typst | Other | #import "/src/template.typ": *
== Missverständnisse der Leistungsbewertung
Bewertungen im Phosophieunterricht werden verschiedene Sachen unterstellt. "#ix("Bewertung")" und "#ix("Beurteilung")" werden verwechselt, Philosophie wird als "unbewertbar" bezeichnet, bestimmte Beurteilungsformen werden abgelehnt. Auf einige dieser Unterstellungen kann wie folgt geantwortet werden:
#orange-list-with-body[*Noten sind keine Beurteilung:*#en[Vgl. @Klager2021_Bewertung[S. 4]]][
#set text(fill: black)
Im Unterricht unterscheidet man zwischen #ix("Beurteilung") und #ix("Bewertung") einer Leistung. Während die Be#underline[wert]ung die SuS in ein vordefiniertes Raster einordnet und ihre Leistung demnach mit einer normierten Wertung versieht, gibt eine Be#underline[urteil]ung den SuS eine individuelle Rückmeldung zum aktuellen Leistungs- und #ix("Kompetenzstand", "Kompetenz").
][*Leistungsprüfungen sind keine Machtinstrumente:*#en[Vgl. @Klager2021_Bewertung[S. 4 f]]][
#set text(fill: black)
Leistungsüberprüfungen haben verschiedene Funktionen, für die sie eingesetzt werden. Siehe dazu den entsprechenden Abschnitt.
][*#ix("Hausaufgaben"), #ix("Mitarbeit", "Mitarbeitsbewertung") und #ix("Gruppenarbeit", "Gruppenarbeitsbewertung") sind nicht bewertbar:*#en[Vgl. @Klager2021_Bewertung[S. 5]]][
#set text(fill: black)
In jedem der drei Fälle wird eine der Anforderungen an die Leistungsbewertung verletzt. Keine von ihnen ist #ix("reliabel", "Reliabilität") oder valide. Die ausgeübten Kompetenzen bei der Bearbeitung von Hausaufgaben können nicht geprüft werden, da die Situation, in der die Leistung erbracht wird, nicht #ix("reliabel", "Reliabilität") ist. In Gruppenarbeiten sind die einzelnen Leistungen der SuS nicht beobacht- oder ermittelbar. Wird eine #ix("Gruppennote", "Gruppenarbeitsbewertung") vergeben, ist dies ebenso ungenau, da die SuS sich kein Zeugnis teilen. #ix("Mitarbeitsnoten", "Mitarbeitsbewertung") transofmieren den gesamten Unterricht in eine pausenlose Leistungsprüfung und reizen somit die #ix("situativen Rahmenbedingungen", "Rahmenbedingungen, situativ"). Außerdem sind sie weder transparent und anfällig für Messfehler und geringe #ix("Intersubjektivität").
][*Philosophieren ist bewertbar:*#en[Vgl. @Klager2021_Bewertung[S. 5]]][
#set text(fill: black)
Philosophie wird nicht bewertet, sondern methodisch-adäquates Philosophieren anhand der Anforderungen der EPA im Fach Philosophie. Die EPA bieten standardisierte, konkrete Operationen, die die SuS ausführen können sollen und deren Produkt bewertet werden kann. Es werden keine Meinungsäußerungen bewertet, sondern die korrekte Anwendung methodischer Prozesse und Formen.
][*Nicht nur Tests und Klausuren sind Leistungsprüfungen:*#en[Vgl. @Klager2021_Bewertung[S. 5 f]]][
#set text(fill: black)
Die Didaktik bietet viele verschiedene mögliche Prüfungsformen neben den traditionellen schriftlichen Kontrollen und mündlichen Prüfungen. In *#ix("Facharbeiten", "Facharbeit")*, *#ix("Essays", "Essay")* und *#ix("mündlichen Kolloqien", "Kolloquium, mündlich")* haben die SuS thematisch Mitspracherecht. #ix("Feedback-Bögen", "Feedback-Bogen"), #ix("Schüler-Lehrer-Bewertungskonferenzen", "Schüler-Lehrer-Bewertungskonferenz"), Lerntagebücher, Portfolios und Selbstbeurteilungsbögen ermöglichen es den SuS, sich selbst besser einzuschätzen und Bewertungen und Beurteilungen der Lehrkraft besser einordnen zu können.
] |
https://github.com/brynne8/typst-undergradmath-zh | https://raw.githubusercontent.com/brynne8/typst-undergradmath-zh/main/README.md | markdown | Creative Commons Attribution Share Alike 4.0 International | # typst-undergradmath-zh
[typst-undergradmath](https://github.com/johanvx/typst-undergradmath)的中文翻译。预计会跟踪原仓库进行更新。
|
https://github.com/OrangeX4/typst-pinit | https://raw.githubusercontent.com/OrangeX4/typst-pinit/main/examples/fletcher.typ | typst | MIT License | #import "../lib.typ": *
#import "@preview/fletcher:0.5.1"
Con#pin(1)#h(4em)#pin(2)nect
#pinit-fletcher-edge(
fletcher, 1, end: 2, (1, 0), [bend], bend: -20deg, "<->",
decorations: fletcher.cetz.decorations.wave.with(amplitude: .1),
) |
https://github.com/Shedward/dnd-charbook | https://raw.githubusercontent.com/Shedward/dnd-charbook/main/dnd/page/attacks.typ | typst | #import "../core/core.typ": *
#let attacks = {
let headerCell(colspan: 1, body) = grid.cell(
colspan: colspan,
tableHeader(body)
)
let emptyCell(colspan: 1) = grid.cell(colspan: colspan, [])
let vline(row) = grid.vline(stroke: strokes.hairline, start: row, end: row + 1)
let hline = grid.hline(stroke: strokes.hairline)
let attackFrame(lines: 4) = framed(
fitting: expand-h,
insets: (bottom: 0pt, rest: paddings(1))
)[
#grid(
columns: (1fr, 1fr, 1fr),
rows: paddings(2),
stroke: none,
headerCell(colspan: 2)[Name], headerCell[Damage],
emptyCell(colspan: 2), vline(1), emptyCell(),
grid.hline(stroke: (thickness: strokes.hairline, dash: "dashed")),
emptyCell(colspan: 2), vline(2), emptyCell(),
headerCell[Range], headerCell[Atk. bonus], headerCell[Type],
emptyCell(), vline(4), emptyCell(), vline(4), emptyCell(),
..((hline, emptyCell(colspan: 3)) * lines),
)
]
page(
header: section[Attacks]
)[
#grid(
columns: (1fr, 1fr),
rows: 1fr,
stroke: none,
gutter: paddings(2),
..((attackFrame(),) * 8),
)
]
}
|
|
https://github.com/Area-53-Robotics/53E-Notebook-Over-Under-2023-2024 | https://raw.githubusercontent.com/Area-53-Robotics/53E-Notebook-Over-Under-2023-2024/giga-notebook/packages.typ | typst | Creative Commons Attribution Share Alike 4.0 International | // Provides a centralized way to specify package versions
#import "@local/notebookinator:1.0.0"
#import "@preview/codetastic:0.2.2"
#import "@preview/diagraph:0.1.0"
|
https://github.com/LDemetrios/Typst4k | https://raw.githubusercontent.com/LDemetrios/Typst4k/master/src/test/resources/suite/math/multiline.typ | typst | // Test multiline math.
--- math-align-basic ---
// Test basic alignment.
$ x &= x + y \
&= x + 2z \
&= sum x dot 2z $
--- math-align-wider-first-column ---
// Test text before first alignment point.
$ x + 1 &= a^2 + b^2 \
y &= a + b^2 \
z &= alpha dot beta $
--- math-align-aligned-in-source ---
// Test space between inner alignment points.
$ a + b &= 2 + 3 &= 5 \
b &= c &= 3 $
--- math-align-cases ---
// Test in case distinction.
$ f := cases(
1 + 2 &"iff" &x,
3 &"if" &y,
) $
--- math-align-lines-mixed ---
// Test mixing lines with and some without alignment points.
$ "abc" &= c \
&= d + 1 \
= x $
--- math-attach-subscript-multiline ---
// Test multiline subscript.
$ sum_(n in NN \ n <= 5) n = (5(5+1))/2 = 15 $
--- math-multiline-no-trailing-linebreak ---
// Test no trailing line break.
$
"abc" &= c
$
No trailing line break.
--- math-multiline-trailing-linebreak ---
// Test single trailing line break.
$
"abc" &= c \
$
One trailing line break.
--- math-multiline-multiple-trailing-linebreaks ---
// Test multiple trailing line breaks.
$
"abc" &= c \ \ \
$
Multiple trailing line breaks.
--- math-linebreaking-after-binop-and-rel ---
// Basic breaking after binop, rel
#let hrule(x) = box(line(length: x))
#hrule(45pt)$e^(pi i)+1 = 0$\
#hrule(55pt)$e^(pi i)+1 = 0$\
#hrule(70pt)$e^(pi i)+1 = 0$
--- math-linebreaking-lr ---
// LR groups prevent linebreaking.
#let hrule(x) = box(line(length: x))
#hrule(76pt)$a+b$\
#hrule(74pt)$(a+b)$\
#hrule(74pt)$paren.l a+b paren.r$
--- math-linebreaking-multiline ---
// Multiline yet inline does not linebreak
#let hrule(x) = box(line(length: x))
#hrule(80pt)$a + b \ c + d$\
--- math-linebreaking-trailing-linebreak ---
// A single linebreak at the end still counts as one line.
#let hrule(x) = box(line(length: x))
#hrule(60pt)$e^(pi i)+1 = 0\ $
--- math-linebreaking-in-box ---
// Inline, in a box, doesn't linebreak.
#let hrule(x) = box(line(length: x))
#hrule(80pt)#box($a+b$)
--- math-linebreaking-between-consecutive-relations ---
// A relation followed by a relation doesn't linebreak
// so essentially `a < = b` can be broken to `a` and `< = b`, `a < =` and `b`
// but never `a <` and `= b` because `< =` are consecutive relation that should
// be grouped together and no break between them.
#let hrule(x) = box(line(length: x))
#hrule(70pt)$a < = b$\
#hrule(78pt)$a < = b$
--- math-linebreaking-after-relation-without-space ---
// Line breaks can happen after a relation even if there is no
// explicit space.
#let hrule(x) = box(line(length: x))
#hrule(90pt)$<;$\
#hrule(95pt)$<;$\
#hrule(90pt)$<)$\
#hrule(95pt)$<)$
--- math-linebreaking-empty ---
// Verify empty rows are handled ok.
$ $\
Nothing: $ $, just empty.
--- math-pagebreaking ---
// Test breaking of equations at page boundaries.
#set page(height: 5em)
#show math.equation: set block(breakable: true)
$ a &+ b + & c \
a &+ b & && + d \
a &+ b + & c && + d \
& & c && + d \
&= 0 $
--- math-pagebreaking-numbered ---
// Test breaking of equations with numbering.
#set page(height: 5em)
#set math.equation(numbering: "1")
#show math.equation: set block(breakable: true)
$ a &+ b + & c \
a &+ b & && + d \
a &+ b + & c && + d \
& & c && + d \
&= 0 $
--- math-pagebreaking-single-line ---
// Test breaking of single line equations.
#set page(height: 4em)
#show math.equation: set block(breakable: true)
Shouldn't overflow:
$ a + b $
--- math-pagebreaking-single-line-numbered ---
// Test breaking of single line equations with numbering.
#set page(height: 4em)
#show math.equation: set block(breakable: true)
#set math.equation(numbering: "(1)")
Shouldn't overflow:
$ a + b $
--- issue-1948-math-text-break ---
// Test text with linebreaks in math.
$ x := "a\nb\nc\nd\ne" $
--- issue-4829-math-pagebreaking-wrong-number ---
// Test numbering of empty regions of broken equations.
#set page(height: 5em)
#set math.equation(numbering: "1")
#show math.equation: set block(breakable: true)
#rect(height: 1.5em)
$ a + b \
a + b $
|
|
https://github.com/swaits/typst-collection | https://raw.githubusercontent.com/swaits/typst-collection/main/glossy/0.1.0/examples/readme.typ | typst | MIT License | // a minimal example, also listed in the README
#import "@preview/glossy:0.1.0": *
#let myGlossary = (
(key: "html", short: "HTML", long: "Hypertext Markup Language", description: "A standard language for creating web pages", group: "Web"),
(key: "css", short: "CSS", long: "Cascading Style Sheets", description: "A language used for describing the presentation of a document", group: "Web"),
(key: "tps", short: "TPS", long: "test procedure specification"),
// Add more entries as needed
)
#show: init-glossary.with(myGlossary)
In modern web development, languages like @html and @css are essential.
Now make sure I get your @tps:short reports by 2pm!
#table(
columns: 2,
table.header([*Input*], [*Output*]),
[`@tps:short` ], [@tps:short],
[`@tps:long` ], [@tps:long],
[`@tps:both` ], [@tps:both],
[`@tps:long:cap` ], [@tps:long:cap],
[`@tps:long:pl` ], [@tps:long:pl],
[`@tps:short:pl` ], [@tps:short:pl],
[`@tps:both:pl:cap`], [@tps:both:pl:cap],
)
#let my-theme = (
section: (title, body) => {
heading(level: 1, title)
body
},
group: (name, body) => {
if name != none and name != "" {
heading(level: 2, name)
}
body
},
entry: (entry, i, n) => {
// i is the entry's index, n is total number of entries
let output = [#entry.short]
if entry.long != none {
output = [#output -- #entry.long]
}
if entry.description != none {
output = [#output: #entry.description]
}
block(
grid(
columns: (auto, 1fr, auto),
output,
repeat([#h(0.25em) . #h(0.25em)]),
entry.pages,
)
)
}
)
#glossary(theme: my-theme)
|
https://github.com/AxiomOfChoices/Typst | https://raw.githubusercontent.com/AxiomOfChoices/Typst/master/Courses/Math%20591%20-%20Mathematical%20Logic/Assignments/Assignment%205.typ | typst | #import "/Templates/generic.typ": latex, header
#import "@preview/ctheorems:1.1.0": *
#import "/Templates/math.typ": *
#import "/Templates/assignment.typ": *
#import "@preview/commute:0.2.0": node, arr, commutative-diagram
#import "@preview/cetz:0.2.0"
#let head(doc) = header(doc, title: "Assignment 5")
#show: head
#show: latex
#show: NumberingAfter
#show: thmrules
#show: symbol_replacing
#set page(margin: (x: 1.6cm, top: 2.5cm, bottom: 1.9cm))
#show math.equation: it => {
if it.has("label"){
return math.equation(block: true, numbering: "(1)", it)
}
else {
it
}
}
#show ref: it => {
let el = it.element
if el != none and el.func() == math.equation {
link(el.location(),numbering(
"(1)",
counter(math.equation).at(el.location()).at(0)+1
))
} else {
it
}
}
#let lemma = lemma.with(numbering: none)
#set enum(numbering: "(a)")
= Question
<question-1>
== Statement
Let $mM$ be a countable ultrahomogeneous structure. Show that $Age(mM)$ has the amalgamation property.
== Solution
Assume we have the following diagram in $Age(mM)$
#align(center)[
#commutative-diagram(
node((0, 0), $C$),
node((0, 1), $A$),
node((1, 0), $B$),
arr($C$, $A$, $f_1$),
arr($C$, $B$, $f_2$),
)
]
then both $A$ and $B$ are submodels of $mM$ so let $g_1, g_2$ be their respective embeddings. Now consider $C_1 = g_1 compose f_1 (C)$ and $C_2 = g_2 compose f_2 (C)$, both are finitely generated submodels of $mM$ isomorphic to each other, and thus by ultrahomogeneity we get a map $h : mM -> mM$ with $h compose g_1 compose f_1 = g_2 compose f_2$.
Now consider $A' = h compose g_1 (A)$ and $B' = g_2 (A)$, we have that $D = ip(A',B')$ is finitely generated and thus is in $Age(mM)$. We now have the diagram
#align(center)[
#commutative-diagram(
node((0, 0), $C$),
node((0, 1), $A$),
node((1, 0), $B$),
node((1, 1), $D$),
arr($C$, $A$, $f_1$),
arr($C$, $B$, $f_2$),
arr($A$, $D$, $h compose g_1$),
arr($B$, $D$, $g_2$)
)
]
By construction this diagram commutes and so we have the amalgamation property.
= Question
<question-2>
== Statement
Show that a theory $T$ has a countable saturated model if and only if all $S_n (T)$ are countable.
== Solution
If $T$ has such a model $mM$, then all types are in the model, so we have that a surjective map
$
mM^n -> S_n (T)
$
hence since $||mM||^n = aleph_0$ we get $S_n (T)$ is countable.
On the other hand assume each $S_n (T)$ is countable, then we will construct saturated countable model. First we need to show that we have $|S_n (A)| <= aleph_0$.
To see this, let $p$ be a type in $S_n (A)$ with $A$ finite, enumerate $A$ as $a_1,...,a_m$ and note that $ov(b)$ realizing $p$ means by definition that
$
mM sat phi(ov(b), a_1,...,a_m), quad forall phi(ov(x),a_1,...,a_m) in p.
$
Now for each formula $phi$ we will replace all $a_i$ with variables $y_i$ and call that modified formula $phi'$, then we immediately get that
$
mM sat phi(ov(b), a_1,...,a_m) <=> mM sat phi'(ov(b), ov(a))
$
and so
$
ov(b) "realizes" p <=> (ov(b),ov(a)) "realizes" p'
$
where $p'$ contains $phi'$ for each $phi in p$.
Hence each complete type in $S_n (A)$ is equivalent to a complete type in $S_(n + m) (nothing)$ so we have $|S_n (A)| <= |S_(n + m) (nothing)| <= aleph_0$.
In #link("https://notes.axiomofchoice.dev/Mathematical%20Logic.pdf?time_stamp=1710726223#%5B%7B%22num%22%3A26%2C%22gen%22%3A0%7D%2C%7B%22name%22%3A%22XYZ%22%7D%2C56.693%2C468.53165%2C0%5D")[class (Theorem 1.5.9)] we showed that we can construct a model of $T$ that is $aleph_0$ saturated, it is enough then to show that its cardinality is also $aleph_0$.
We know that $|S_n (A)| <= aleph_0$ and so as in the proof we have that for each finite subset we add at most $aleph_0$ elements and we have $aleph_0$ finite subsets so our cardinality of our model is
$
sum_(n in NN) aleph_0 = aleph_0
$
and so our model is countable and saturated.
= Question
<question-3>
== Statement
Show that a theory $T$ has countably many countable models up to isomorphism, then all $S_n (T)$ are countable.
== Solution
Let $C$ be the set of equivalence classes of models of $T$ with underlying set $NN$ up to isomorphism. Assume that $C$ is countable, then we have for each $mM in C$ the set of types in $S_n (T)$ realized in $mM$ is countable. So since every type is realized in some countable model the set of types is the union of the types realized in elements of $C$ so is a countable union of countable sets and thus is countable.
= Question
<question-4>
== Statement
Show that if a complete theory $T$ has countably many countable models up to isomorphism, then it has both a prime and a countable saturated model.
== Solution
By applying @question-3 we get that $S_n (T)$ are countable for every $n$, then by applying @question-2 we get that $T$ has a countable saturated model. It is thus enough to show that it has a prime model.
To see this note that since each $S_n (T)$ is countable the collection of non-isolated types is also countable, hence by omitting types theorem we can omit all non-isolated types, which by Assignment 3 gives us a prime model.
= Question
== Statement
Show that a complete theory cannot have exactly 2 countable models up to isomorphism.
== Solution
We aim for a contradiction to assume that such a theory $T$ exists. Then since it is not $aleph_0$-categorical it must have a non-isolated type $p$, and some $S_n (T)$ is not finite. Since a prime model cannot contain this type and a countable saturated model must contain this type, by @question-4 we get that $T$ has a prime model $mM_0$ and a countable saturated model $mM_1$ which are not isomorphic. By assumption these are the only countable models of $mM$.
Now let $ov(a)$ realize $p$ in $mM_1$, then consider the theory $T' = Th(mM_1, ov(a))$. Note that each type of $S_n (T')$ is just a type in $S_n^T (ov(a))$ and thus by the reasoning in @question-2 we get that these are equivalent to types in $S_n (T)$ and vice versa. Hence $S_n (T')$ is countable for each $n$.
Now by @question-4 we get that $T'$ has a prime model, which we will name $mM_2$, since $mM_2$ realizes $p$ it cannot be isomorphic to $mM_0$, and so since $mM sat T$ it is enough to show that $mM_2$ is not isomorphic to $mM_1$ to get a contradiction.
To see that this is indeed the case note that since $S_n (T)$ is not finite for some $n$ then $S_n (T')$ is also not finite and so $T'$ has a non-isolated type $q$ which cannot be in $mM_2$. But $q$ must be realized in $mM_1$ since it is countably saturated over $T'$ as well and so $mM_2$ and $mM_1$ cannot be isomorphic. This contradicts the fact that $T$ has 2 models.
= Question
== Statement
Find a complete theory with exactly 3 countable models up to isomorphism.
== Solution
Consider $T = Th(QQ,<=,0,1,2,...)$.
Let $mM$ be a model of $T$ and let $a_n$ be the interpretations of $n$ for all $n in NN$. Consider the subset $A seq mM$ defined by
$
A := {
x in mM : x >= a_n, med forall n in NN
}
$
We have 3 options for the order-theoretic properties of $A$,
+ $A$ is empty.
+ $A$ is non-empty and does not have a minimal element.
+ $A$ is non-empty and does have a minimal element.
Note that these options are invariant under isomorphisms, so two models attaining different options cannot be isomorphic.
We will show that these exactly describe the 3 models of $T$ up to isomorphism.
Since all models of $T$ are also models of $D L O_0$ we can isomorphically map them to $QQ$, then the images of $a_n$ will form an increasing sequence in $QQ$, and for the rest of this proof we will identify them with said images.
Now first let us construct 3 models attaining the 3 options we have above, we consider the 3 sequences in $QQ$
+ Model $mM_1$ with $a_n = n$.
+ Model $mM_2$ with $a_n = 1 - 1/n$.
+ Model $mM_3$ with $a_n = (1 + 1/n)^n$.
Model $mM_1$ has $A$ being empty, since the sequence is unbounded. Model $mM_2$ has $A$ having the minimal element $1$ since the sequence has a limit point $1 in QQ$. Model $mM_3$ has $A$ having no minimal element since the limit point $e$ is not in $QQ$.
Since they attain different options regarding the properties of $A$ they are all non-isomorphic. It is thus left to show that any model of $T$ is isomorphic to one of these $3$.
Let $mM$ be a model of $T$ which we want to map isomorphically to one $mM_i$, we have to map the increasing sequences to each other so we can restrict out attention to $mM backslash { a_n : n in NN }$.
Now we can split this set into subsets as follows, we define
- $S_0 := { x in mM : x <= a_0 }$.
- $S_i := { x in mM : a_(i - 1) <= x <= a_i }$ for $i >= 0$.
Then we clearly have that $mM backslash { a_n : n in NN } = A union.big_(n in NN) S_n$. Now each $S_n$ is itself a model of $D L O_0$ which one can easily check.
Now assume that $mM$ has $A$ be empty, then we want to map it isomorphically to $mM_1$, we do the same splitting $mM_1 backslash { a_n : n in NN} = union.big_(n in NN) S'_n$. Since each $S'_n$ is also a model of $D L O_0$ we can isomorphically map $S_n$ to $S'_n$ and get a complete isomorphism $mM$ to $mM_1$.
Next assume that $mM$ has $A$ be non-empty with a minimal element $x$, then we want to map it isomorphically to $mM_2$. We again map the sequences to each other and write $mM backslash { a_n : n in NN } = A union.big_(n in NN) S_n$ as well as $mM_2 backslash { a_n : n in NN } = A' union.big_(n in NN) S'_n$.
Notice then that once again each $S_n$ and $S'_n$ are models of $D L O_0$ and thus isomorphic, so it is enough to check that $A$ is isomorphic to $A'$. To see this note that
$
A backslash {x} = {y in mM : y >= x}
$
and so $A backslash {x}$ is a model of $D L O_0$. This is also true for $A' backslash {1}$. Thus we can just map $x -> 1$ and then $A backslash {x}$ is isomorphic to $A' backslash {1}$ and so we are done.
Finally for the final case assume that $mM$ has $A$ be non-empty without a minimal element, then one can easily check that $A$ is a model of $D L O_0$, we can thus do the exact same construction as above but for $mM_3$ and map each $S_n$ to $S'_n$ and $A$ to $A'$.
This shows that each model of $T$ is isomorphic to $mM_1,mM_2,mM_3$ which are all non-isomorphic so there are exactly 3 models up to isomorphism of $T$.
= Question
== Statement
Suppose that $(ov(a)_i : i in I)$ is an infinite order-indiscernible sequence in a model of a theory $T$. Show that for any linear order $J$ there is an order-indiscernible $(ov(b)_j : j in J)$ in a model of $T$ such that for any $i_1 < ... < i_n$ and any $j_1 < ... < j_n$ we have
$
tp(ov(a)_i_1,...,ov(a)_i_n) = tp(ov(b)_i_1,...,ov(b)_i_n).
$
== Solution
Let $mM$ be the model containing the sequence $(ov(a)_i : i in I)$, and consider adding the constants $(ov(c)_j : j in J)$ to our language and considering the theory
$
T' = T union { phi(ov(c)_j_1,...,ov(c)_j_n) : phi in tp(ov(a)_i_1,...,ov(a)_i_n), i_1 < ... < i_n in I, j_1 < ... < j_n in J }.
$
It is enough to show that this theory is consistent, to see this note that any finite fragment of this theory is satisfied by $mM$, this is because any finite fragment only contains finitely many formulas in the right set above and thus by choosing sequences $i_1^(1),...,i^1_n_1$, $i_1^2,..,i^2_n_2$,... far enough apart from each other, we can satisfy any finite number of these formulas. Hence by compactness this theory is consistent and thus complete.
|
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.