-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfp-dop-01.tex
More file actions
167 lines (135 loc) · 5.49 KB
/
fp-dop-01.tex
File metadata and controls
167 lines (135 loc) · 5.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
%! suppress = Makeatletter
%! suppress = TooLargeSection
%! suppress = MissingLabel
\documentclass{article}
% Fields
\usepackage{geometry}
\geometry{top=25mm}
\geometry{bottom=35mm}
\geometry{left=20mm}
\geometry{right=20mm}
% ------------------------------------------------
% Graphics
\usepackage{color}
\usepackage{tabularx}
\usepackage{tikz}
\usepackage{blkarray}
\usepackage{graphicx}
% ------------------------------------------------
% Math
\usepackage{amsmath, amsfonts}
\usepackage{amssymb}
\usepackage{proof}
\usepackage{mathrsfs}
% Crossed-out symbols
% https://tex.stackexchange.com/questions/75525/how-to-write-crossed-out-math-in-latex
\usepackage[makeroom]{cancel}
\usepackage{mathtools}
% ------------------------------------------------
% Additional font sizes
% https://www.overleaf.com/learn/latex/Questions/How_do_I_adjust_the_font_size%3F
\usepackage{moresize}
% Additional colors
% https://www.overleaf.com/learn/latex/Using_colours_in_LaTeX
\usepackage{xcolor}
% \texttimes
\usepackage{textcomp}
% ------------------------------------------------
% Language
\usepackage[utf8] {inputenc}
\usepackage[T2A] {fontenc}
\usepackage[english, russian] {babel}
\usepackage{indentfirst, verbatim}
\usetikzlibrary{cd, babel}
% ------------------------------------------------
% Fonts
\usepackage{stmaryrd}
\usepackage{cmbright}
\usepackage{wasysym}
% ------------------------------------------------
% Code
% https://tex.stackexchange.com/questions/99475/how-to-invoke-latex-with-the-shell-escape-flag-in-texstudio-former-texmakerx
% Colored, requires --shell-escape compiling option
% \usepackage{minted}
% \setminted{xleftmargin=\parindent, autogobble, escapeinside=\#\#}
\usepackage{listings}
% ------------------------------------------------
% Custom envs
% https://tex.stackexchange.com/questions/371286/draw-a-horizontal-line-in-latex
\newenvironment{proof}{\subparagraph{\hspace{-1em}Решение:\newline}}{\par\noindent\rule{\textwidth}{0.4pt}}
% ------------------------------------------------
% Custom commands
\newcommand{\comb}[1]{\mathbf{#1}}
\newcommand{\step}{\rightsquigarrow}
\newcommand{\term}[1]{\mathbf{#1}}
\newcommand{\ap}{~}
\newcommand{\termdef}{\coloneqq}
\newcommand{\subst}[3]{\left[#2 \mapsto #3 \right] #1}
\newcommand{\eqbeta}{=_\beta}
\newcommand{\eqeta}{=_\eta}
\newcommand{\tlist}[1]{\term{[}#1\term{]}} % list-term
\renewcommand{\emph}[1]{{\color{blue} \textit{#1}}}
% ------------------------------------------------
% Head
\usepackage{fancybox,fancyhdr}
\usepackage{hyperref}
\pagestyle{fancy}
\fancyhead[R]{Студент(ка) Студентов(а)} % TODO введите ваше имя
\fancyhead[L]{ИТМО MSE, ФП 2025, Дз 1}
% ------------------------------------------------
% Numbering
% https://tex.stackexchange.com/questions/80113/hide-section-numbers-but-keep-numbering
\makeatletter
\renewcommand\thesubsection{Блок \@arabic\c@subsection.\hspace{-0.8em}}
\renewcommand\thesubsubsection{Задание \@arabic\c@subsubsection\hspace{-0.8em}}
% https://tex.stackexchange.com/questions/327689/numbering-subsubsections-with-letters
\renewcommand\theparagraph{\alph{paragraph})\hspace{-0.8em}}
% https://tex.stackexchange.com/questions/129208/numbering-paragraphs-in-latex
\setcounter{secnumdepth}{4}
\makeatother
% ------------------------------------------------
\begin{document}
\section*{Дополнительные задания 1. Лямбда-исчисление}
\subsubsection{(1б)}
Задайте лямбда-терм $\mathbf{xor}~b_1~b_2$.
\begin{proof}
TODO % TODO
\end{proof}
\subsubsection{(1б)}
Задайте терм, который принимает на себя бинарную функцию $\oplus$ над
логическими переменными и возвращает её таблицу истинности: пару из
пары, в которой содержатся $\mathbf{true} \oplus \mathbf{true}$ и
$\mathbf{true} \oplus \mathbf{false}$, и пары, в которой содержатся
$\mathbf{false} \oplus \mathbf{true}$ и $\mathbf{false} \oplus
\mathbf{false}$.
\begin{proof}
TODO % TODO
\end{proof}
\subsubsection{(1.5б)}
Задайте терм, который принимает на вход таблицу истинности функции
$\oplus$ над логическими переменными (представление таблицы описано в
предыдущем задании) и возвращает терм, вычисляющий $\oplus$.
\begin{proof}
TODO % TODO
\end{proof}
\subsubsection{(1б)}
Докажите, что $\mathbf{mult}~a~(\mathbf{plus}~b~c) =
\mathbf{plus}~(\mathbf{mult}~a~b)~(\mathbf{mult}~a~c)$, если $a$, $b$ и $c$ "---
числа Чёрча.
\begin{proof}
TODO % TODO
\end{proof}
\subsubsection{(3б)}
Не используя комбинатор неподвижной точки, задайте терм, который
принимает на вход два числа Чёрча и возвращает наибольшее из них.
\begin{proof}
TODO % TODO
\end{proof}
\subsubsection{(5б)}
Задайте терм $\mathbf{mult}$, используя только аппликацию, скобки и
термы $\mathbf{S}$ и $\mathbf{K}$. Использовать лямбда-абстракцию
запрещается.
\begin{proof}
TODO % TODO
\end{proof}
\end{document}