aboutsummaryrefslogtreecommitdiff
path: root/entries/pkoronkevich/tex
diff options
context:
space:
mode:
authorBraxton Hall2022-10-24 20:05:05 +0000
committerGitHub2022-10-24 20:05:05 +0000
commit39795db6b972b0f0ae471ae353022e17f3763608 (patch)
tree977553020d25a156c252991a6aed1b3282071322 /entries/pkoronkevich/tex
parent0059457c8cb0a282053d868f5a27ba0d136cfa29 (diff)
parentd6cab23a8b6879a58eadac239001acc40372cbb6 (diff)
Merge pull request #26 from braxtonhall/splaulette
Update Paulette's fib
Diffstat (limited to 'entries/pkoronkevich/tex')
-rw-r--r--entries/pkoronkevich/tex/fib.tex3
-rw-r--r--entries/pkoronkevich/tex/render.pdfbin21761 -> 21807 bytes
-rw-r--r--entries/pkoronkevich/tex/render.pngbin297404 -> 387387 bytes
3 files changed, 2 insertions, 1 deletions
diff --git a/entries/pkoronkevich/tex/fib.tex b/entries/pkoronkevich/tex/fib.tex
index 22781d1..cef9138 100644
--- a/entries/pkoronkevich/tex/fib.tex
+++ b/entries/pkoronkevich/tex/fib.tex
@@ -11,6 +11,7 @@
\newcommand{\plus}{\lambda m . \lambda n . m \ (\suc) \ n}
\newcommand{\pred}{\lambda n . \lambda f . \lambda x . n \ (\lambda g . \lambda h . h \ (g \ f)) \ (\lambda u . x) \ (\lambda u . u)}
\newcommand{\sub}{\lambda m . \lambda n . n \ (\pred) \ m}
+\newcommand{\lleq}{\lambda m . \lambda n . \\ \qquad \isz \ ((\sub) \\ \qquad \ m \ n)}
\newcommand{\fix}{\lambda g . (\lambda x . g \ (x \ x)) \ (\lambda x . g \ (x \ x))}
\newcommand{\appo}[2]{#1 \ #2}
\newcommand{\appt}[3]{#1 \ #2 \ #3}
@@ -19,7 +20,7 @@
\begin{gather*}
\fix \\ % recursive function application
\quad \lambda r . \lambda n . (\ife) \\ % of fib, which takes itself and n, if expression
- \quad \ \appo{(\isz)}{n} \\ % is n zero
+ \quad \ \appt{(\lleq)}{n}{\one} \\ % if n less than or equal to one
\quad \ (\one) \\ % if so, return 1
\quad \ (\plus) \\ % if not, add
\qquad \appo{r}{(\appo{(\pred)}{n})} \\ % the first recursive call, n - 1, to
diff --git a/entries/pkoronkevich/tex/render.pdf b/entries/pkoronkevich/tex/render.pdf
index b69f747..8ee60c7 100644
--- a/entries/pkoronkevich/tex/render.pdf
+++ b/entries/pkoronkevich/tex/render.pdf
Binary files differ
diff --git a/entries/pkoronkevich/tex/render.png b/entries/pkoronkevich/tex/render.png
index 2e172cc..a1896a2 100644
--- a/entries/pkoronkevich/tex/render.png
+++ b/entries/pkoronkevich/tex/render.png
Binary files differ