You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introducing more complicated types, for example for handling first-order and higher-order logic, is often done, in the tradition established by Per Martin-L\"of, via a stout list of metatheoretic \hyperref[def:inference_rule]{inference rules}. The classification of these rules is described in \cref{rem:type_theory_rule_classification}, and concrete rules extending the Curry-Howard correspondence to higher-order logic are presented in \fullref{sec:dependent_types}.
270
270
271
-
Fortunately, for the types we will consider in this section, we will be able to easily reuse the machinery we have built for untyped and simply typed (with only arrow types) \(\muplambda\)-calculus, with some small adjustments. See \cref{rem:product_type_equality_rules} for a more concrete discussion. We will however only limit ourselves to introduction and elimination rules since we will not need the rest. We will avoid introducing judgmental equality rules because we have spent considerable effort ensuring correctness of even \hyperref[def:lambda_term_alpha_equivalence]{\(\alpha\)-equivalence}.
271
+
Fortunately, for the types we will consider in this section, we will be able to easily reuse the machinery we have built for untyped and simply typed (with only arrow types) \(\muplambda\)-calculus, with some small adjustments. See \cref{rem:simple_product_type_equality_rules} for a more concrete discussion. We will however only limit ourselves to introduction and elimination rules since we will not need the rest. We will avoid introducing judgmental equality rules because we have spent considerable effort ensuring correctness of even \hyperref[def:lambda_term_alpha_equivalence]{\(\alpha\)-equivalence}.
272
272
273
273
Still, we will still find useful the classification of rules, mostly because of the respective terminology.
In \cref{ex:def:beta_eta_reduction/pairs}, we have shown that the \(\muplambda\)-terms \ref{ex:def:beta_eta_reduction/pairs/intro}, \ref{ex:def:beta_eta_reduction/pairs/elim_left} and \ref{ex:def:beta_eta_reduction/pairs/elim_right} enable the following \(\beta\)-reductions:
There is one important downside related to \(\eta\)-reduction and \hyperref[rem:type_theory_rule_classification/equality/uniq]{uniqueness rules}, however. We could expect that
\incite*[corr. 1.23]{Barendregt1974SurjectivePairing} demonstrates that there is no triple of untyped \(\muplambda\)-terms \( P_+ \), \( P_{-L} \) and \( P_{+R} \) satisfying \eqref{eq:rem:product_type_equality_rules/eta}.
447
+
\incite*[corr. 1.23]{Barendregt1974SurjectivePairing} demonstrates that there is no triple of untyped \(\muplambda\)-terms \( P_+ \), \( P_{-L} \) and \( P_{+R} \) satisfying \eqref{eq:rem:simple_product_type_equality_rules/eta}.
448
448
449
-
Barendregt calls a triple satisfying \eqref{eq:rem:product_type_equality_rules/beta} a \enquote{pairing}, and a triple additionally satisfying \eqref{eq:rem:product_type_equality_rules/eta} --- a \enquote{surjective pairing}. Thus, his result states that untyped \(\muplambda\)-calculus does not admit a surjective pairing, despite the obvious pairing shown in \cref{ex:def:beta_eta_reduction/pairs}.
449
+
Barendregt calls a triple satisfying \eqref{eq:rem:simple_product_type_equality_rules/beta} a \enquote{pairing}, and a triple additionally satisfying \eqref{eq:rem:simple_product_type_equality_rules/eta} --- a \enquote{surjective pairing}. Thus, his result states that untyped \(\muplambda\)-calculus does not admit a surjective pairing, despite the obvious pairing shown in \cref{ex:def:beta_eta_reduction/pairs}.
450
450
451
451
Thus, even for simple types, adding new congruence and uniqueness rules cannot be circumvented by a simpler mechanism such as \(\delta\)-reduction. This will unfortunately require us to reprove all results involving either \(\beta\eta\)-reduction or only \(\alpha\)-equivalence. So, our decision is to avoid new rules and to sacrifice \hyperref[con:extensionality]{extensionality} for the sake of simplicity.
\item As with the \hyperref[def:simple_empty_type]{empty type}, unless we make the constants \(\synS_{+L} \) and \(\synS_{+R} \) depend on the types of the terms, we break the type uniqueness for typed terms shown in \cref{thm:typed_term_habitation_uniqueness}. Again, this is a sacrifice for the sake of simplicity of our formalized system.
501
501
502
-
\item We discuss how equality rules and \(\beta\eta\)-reduction are related in \cref{rem:sum_type_equality_rules}.
502
+
\item We discuss how equality rules and \(\beta\eta\)-reduction are related in \cref{rem:simple_sum_type_equality_rules}.
503
503
504
504
\item This is a binary analogue to the dependent sums defined in \cref{def:dependent_sum}.
\item One downside of our approach is that some recursive tree traversals like that in \fullref{alg:simply_typed_reduction} become much more involved because application terms (i.e. \( M = NK \)) can be produced by a variety of rules. With a dedicated syntax, only \ref{inf:def:arrow_type/elim} is able to produce such terms.
523
523
\end{comments}
524
524
525
-
\begin{remark}\label{rem:sum_type_equality_rules}
526
-
Similarly to product types, we can use \(\beta\delta\)-reduction to emulate \hyperref[rem:type_theory_rule_classification/equality/comp]{computation rules}. See \cref{rem:product_type_equality_rules} for a broader discussion of the general idea.
Similarly to product types, we can use \(\beta\delta\)-reduction to emulate \hyperref[rem:type_theory_rule_classification/equality/comp]{computation rules}. See \cref{rem:simple_product_type_equality_rules} for a broader discussion of the general idea.
However, as per \cref{rem:model_theory_structure_terminology}, unlike in general institutions, we will refer to structures as \enquote{models} only with respect to a theory.
751
751
752
-
We say that \(\mscrX\) is a \term[ru=модель (\cite[2.6.21]{Герасимов2014Вычислимость}), en=model (\cite[def. def.2.2.13(ii)]{Hinman2005Logic})]{model} \hi{of} the set of closed formulas \(\Gamma\) and write \(\mscrX\vDash\Gamma\) if and only if \(\Bracks{\varphi}_\mscrX = T \) for every formula \(\varphi\in\Gamma\).
752
+
We say that \(\mscrX\) is a \term[ru=модель (\cite[2.6.21]{Герасимов2014Вычислимость}), en=model (\cite[def. def.2.2.13(ii)]{Hinman2005Logic})]{model} \hi{of} the set of closed formulas \(\Gamma\) and write \(\mscrX\vDash\Gamma\) if and only if \(\Bracks{\varphi}_\mscrX = T \) for every (closed) formula \(\varphi\in\Gamma\).
753
753
754
754
We also say that \(\varphi\) is \term[en=valid (\cite[144]{VanDalen2004LogicAndStructure})]{valid} in \(\mscrX\).
755
755
756
-
\thmitem{def:fol_semantics/satisfiable} If \(\Gamma\) has a model, we say that it is \term[ru=выполнимая (формула) (\cite[def. 2.4.1]{Герасимов2014Вычислимость}), en=satisfiable (formula) (\cite[71]{VanDalen2004LogicAndStructure})]{satisfiable}.
756
+
Via \hyperref[def:fol_implicit_universal_quantification]{implicit universal quantification}, it is possible to extend the model relation to arbitrary formulas, not necessarily closed. Then \(\mscrX\) becomes a model of \(\varphi\) if and only if it is a model if its \hyperref[def:fol_quantifier_closure]{universal closure}.
757
+
758
+
\thmitem{def:fol_semantics/satisfaction} Consider some formula \(\varphi\), not necessarily closed. If there exists a structure \(\mscrX\) and a variable assignment \( v \) into \(\mscrX\) such that \(\Bracks{\varphi}_\mscrX^v = \semtop\), we say that \( v \)\term[en=satisfies (\cite[def. 2.1.23(i)]{Hinman2005Logic})]{satisfies} \(\varphi\).
759
+
760
+
Thus, \(\mscrX\) satisfies \(\varphi\) if and only if \(\mscrX\) is a model of its \hyperref[def:fol_quantifier_closure]{existential closure}. This coincides with validity in the case where \(\varphi\) is closed.
761
+
762
+
We say that \(\varphi\) is \term[ru=выполнимая (формула) (\cite[def. 2.4.1]{Герасимов2014Вычислимость}), en=satisfiable (formula) (\cite[71]{VanDalen2004LogicAndStructure})]{satisfiable} if at least one interpretation satisfies it.
757
763
758
764
\thmitem{def:fol_semantics/tautology} We call the closed formula \(\varphi\) a \term[ru=тавтология (\cite[def. 2.4.1]{Герасимов2014Вычислимость}), en=tautology (\cite[97]{Hinman2005Logic})]{tautology} if \(\Bracks{\varphi}_\mscrX = \semtop\) for every interpretation \(\mscrX\), and a \term[ru=противоречивая формула (\cite[def. 2.4.1]{Герасимов2014Вычислимость})]{contradiction} if \(\Bracks{\varphi}_\mscrX < \semtop\) for every \(\mscrX\).
We can extend the satisfaction relation from \cref{def:fol_semantics/model} for arbitrary \hyperref[def:fol_formula]{first-order formulas} as follows.
894
+
We can extend the model relation from \cref{def:fol_semantics/model} for arbitrary \hyperref[def:fol_formula]{first-order formulas} as follows via \hyperref[def:fol_universal_validity]{universal validity}.
889
895
890
896
In a given \hyperref[def:fol_structure]{structure} \(\mscrX\), let \(\mscrX\vDash\varphi\) if and only if \(\Bracks{\varphi}_\mscrX^v = T \) for every variable assignment \( v \) in \(\mscrX\). Instead of using variable assignments, we can rely on the \hyperref[def:fol_quantifier_closure]{universal closure} of \(\varphi\) by requiring \(\Bracks{\qforall {x_1} \ldots\qforall {x_n} \varphi}_\mscrX = T \). This approach, which we will call \term{implicit universal quantification}, is used in \cite[def. 2.2.1]{Hinman2005Logic} and \cite[94]{Герасимов2014Вычислимость}.
891
897
892
898
This easily extends to sets of formulas, so we let \(\mscrX\vDash\Gamma\) if and only if \(\mscrX\vDash\psi\) for every \(\psi\) in \(\Gamma\). For the corresponding entailment relation, let \(\Gamma\vDash\varphi\) if and only if \(\mscrX\vDash\varphi\) whenever \(\mscrX\vDash\Gamma\).
893
899
\end{definition}
900
+
\begin{comments}
901
+
\item We must be careful about using implicit universal quantification for two reasons:
902
+
\begin{itemize}
903
+
\item It is incompatible with \fullref{thm:fol_semantic_deduction_theorem}, as shown in \cref{rem:implicit_quantification_and_deduction}.
904
+
\item It can lead to confusion with implicit existential quantification, which is used in \cref{def:fol_semantics/satisfaction} to generalize satisfaction.
For first-order logic, we have defined the \hyperref[def:institution]{institution} in \cref{def:fol_institution} only for \hyperref[def:closed_fol_formula]{closed first-order formulas}. It is tempting to allow formulas with free variables via \hyperref[def:fol_implicit_universal_quantification]{implicit universal quantification}.
We will outline the proof system of Andrews' \(\logic{Q}_0 \) from \incite[\S 51]{Andrews2002Logic} since it is the most refined of the Church-like systems listed in \cref{rem:higher_order_logic_and_type_theory/types}.
366
366
367
-
It is based on \hyperref[def:propositional_axiomatic_derivation_system]{axiomatic derivation systems}, but instead of \ref{inf:thm:axiomatic_derivation_as_natural_deduction/mp}, it features a peculiar rule:
367
+
It is based on \hyperref[def:propositional_axiomatic_derivation_system]{axiomatic derivation systems}, but instead of \ref{inf:def:axiomatic_derivation_as_natural_deduction/mp}, it features a peculiar rule:
368
368
\begin{displayquote}
369
369
\textit{Rule R}. From \(\mathbf{C} \) and \(\mathbf{A_\alpha} = \mathbf{B_\alpha} \) to infer the result of replacing one occurrence of \(\mathbf{A_\alpha} \) in \(\mathbf{C} \) by an occurrence of \(\mathbf{B_\alpha} \), provided that the occurrence of \(\mathbf{A_\alpha} \) in \(\mathbf{C} \) is not (an occurrence of a variable) immediately preceded by \(\muplambda\).
In such case, it seems reasonable to say that the formula is a \hyperref[con:hypothetical_judgment]{hypothetical judgment} whose hypotheses disambiguate it. This is correct as long as the aforementioned terms are vague, but it is incorrect in the more precise meaning we will consider here.
58
58
59
-
The reason for this is that the validity of hypothetical judgments is determined via logical consequence. In the sequent notation from \cref{rem:sequent_notation}, \(\varphi\vdash\psi\) expresses that \(\psi\) is a logical consequence of \(\varphi\). Then, as per \ref{inf:thm:axiomatic_derivation_as_natural_deduction/mp}, if \(\varphi\) is considered true, so is \(\psi\).
59
+
The reason for this is that the validity of hypothetical judgments is determined via logical consequence. In the sequent notation from \cref{rem:sequent_notation}, \(\varphi\vdash\psi\) expresses that \(\psi\) is a logical consequence of \(\varphi\). Then, as per \ref{inf:def:axiomatic_derivation_as_natural_deduction/mp}, if \(\varphi\) is considered true, so is \(\psi\).
60
60
61
61
The hypotheses in ambiguous formulas are instead not logical. Such is the case where \(\varphi\) depends on a \hyperref[con:variable_binding]{free variable} \( x \). Disambiguation is then achieved by substituting or binding \( x \), not via logical consequence.
0 commit comments