Skip to content

Commit

Permalink
Improve fize, and fize!
Browse files Browse the repository at this point in the history
  • Loading branch information
utensil committed May 21, 2024
1 parent 261d457 commit fe5de3c
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 21 deletions.
12 changes: 8 additions & 4 deletions fize.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ TREE="trees/$1.tree"
sed -i '' -E 's/\$([^$]+)\$/#{\1}/g' $TREE
# for the file $TREE, replace all string matching regrex \$\$\n([^$]+)\$\$ to ##{$1} where $1 is the first match using sed inplace
cat $TREE | tr '\n' '\r' | sed -E 's/\$\$([^$]+)\$\$/##{\1}/g' > $TREE.tmp
# for the file $TREE.tmp, replace all string matching \r(.*)\r\r to \r\p{\1}\r\r where $1 is the first match using sed inplace
# sed -i '' -E 's/\r(.*)\r\r/\p{\r\1\r}\r\r/g' $TREE.tmp
cat $TREE.tmp | tr '\r' '\n' > $TREE
rm $TREE.tmp
# 1. \texdef{}{}{ -> \refdef{}{}{\r\\p{
sed -i '' -E 's/\\texdef\{([^\}]*)\}\{([^\}]*)\}\{/\\refdef\{\1\}\{\2\}\{\n\\p\{/g' $TREE.tmp
# 2. before the line containing \refdef, skip; after the line, replace \r\r -> }\r\r\\p{
awk 'BEGIN {skip=1} {if ($0 ~ /\\refdef/) {skip=0;print $0} else if (skip==1) {print $0} else { gsub(/\r\r/,"}\r\r\\p{", $0); print $0} }' $TREE.tmp > $TREE.tmp2
# 3. }\s*$ -> }}
sed -i '' -E 's/\}\s*$/\}\}\r/g' $TREE.tmp2
cat $TREE.tmp2 | tr '\r' '\n' > $TREE
rm $TREE.tmp*
# for the file $TREE, replace all string \( to #{ using sed inplace
sed -i '' -E 's/\\\(/#\{/g' $TREE
# for the file $TREE, replace all string \) to } using sed inplace
Expand Down
20 changes: 11 additions & 9 deletions trees/hopf-0002.tree
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
\import{macros}
\tag{hopf}

\texdef{Peano space}{fauser2002treatise}{
Let $V$ be a linear space of finite dimension $n$. Let lower case $x_i$ denote elements of $V$, which we will call also letters. We define a bracket as an alternating multilinear scalar valued function
$$
\refdef{Peano space}{fauser2002treatise}{
\p{
Let #{V} be a linear space of finite dimension #{n}. Let lower case #{x_i} denote elements of #{V}, which we will call also letters. We define a bracket as an alternating multilinear scalar valued function
##{
\begin{gathered}
{[, \ldots, .]: V \times \ldots \times V \rightarrow \mathbb{k}} \\
{\left[x_1, \ldots, x_n\right]=\operatorname{sign}(p)\left[x_{p(1)}, \ldots, x_{p(n)}\right]} \\
{\left[x_1, \ldots, \alpha x_r+\beta y_r, \ldots, x_n\right]=\alpha\left[x_1, \ldots, x_r, \ldots, x_n\right]+\beta\left[x_1, \ldots, y_r, \ldots, x_n\right]}
\end{gathered}
$$
$n$-factors
$$
}
#{n}-factors
##{
\begin{aligned}
{\left[x_1, \ldots, x_n\right] } & =\operatorname{sign}(p)\left[x_{p(1)}, \ldots, x_{p(n)}\right] \\
{\left[x_1, \ldots, \alpha x_r+\beta y_r, \ldots, x_n\right] } & =\alpha\left[x_1, \ldots, x_r, \ldots, x_n\right]+\beta\left[x_1, \ldots, y_r, \ldots, x_n\right]
\end{aligned}
$$
}}

\p{The sign is due to the permutation #{p} on the arguments of the bracket. The pair #{\mathcal{P}=(V,[., \ldots,])}. is called a Peano space.
}}

The sign is due to the permutation $p$ on the arguments of the bracket. The pair $\mathcal{P}=(V,[., \ldots,])$. is called a Peano space.
}
5 changes: 3 additions & 2 deletions trees/hopf-0003.tree
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
\tag{hopf}

\taxon{remark}
\texnote{Peano space}{fauser2002treatise}{
Of course, this structure is much weaker as e.g. a normed space or an inner product space. It does not allow to introduce the concept of length, distance or angle. Therefore it is clear that a geometry based on this structure cannot be metric. However, the bracket can be addressed as a volume form. Volume measurements are used e.g. in the analysis of chaotic systems and strange attractors.
\refnote{Peano space}{fauser2002treatise}{
\p{Of course, this structure is much weaker as e.g. a normed space or an inner product space. It does not allow to introduce the concept of length, distance or angle. Therefore it is clear that a geometry based on this structure cannot be metric. However, the bracket can be addressed as a volume form. Volume measurements are used e.g. in the analysis of chaotic systems and strange attractors.}
}

14 changes: 8 additions & 6 deletions trees/hopf-0004.tree
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
\import{macros}
\tag{hopf}

\texdef{standard Peano space}{fauser2002treatise}{
A standard Peano space is a Peano space over the linear space $V$ of dimension $n$ whose bracket has the additional property that for every vector $x \in V$ there exist vectors $x_2, \ldots, x_n$ such that
$$
\refdef{standard Peano space}{fauser2002treatise}{
\p{
A standard Peano space is a Peano space over the linear space #{V} of dimension #{n} whose bracket has the additional property that for every vector #{x \in V} there exist vectors #{x_2, \ldots, x_n} such that
##{
\left[x, x_2, \ldots, x_n\right] \neq 0 .
$$
}}

\p{In such a space the length of the bracket, i.e. the number of entries, equals the dimension of the space, and conversely. We will be concerned here with standard Peano spaces only.
}}

In such a space the length of the bracket, i.e. the number of entries, equals the dimension of the space, and conversely. We will be concerned here with standard Peano spaces only.
}

0 comments on commit fe5de3c

Please sign in to comment.