]> matita.cs.unibo.it Git - helm.git/blob - helm/papers/system_T/t.tex
realizability for the induction principle.
[helm.git] / helm / papers / system_T / t.tex
1 \documentclass[a4paper]{article}
2 \pagestyle{headings}
3 %\usepackage{graphicx}
4 \usepackage{amssymb,amsmath,mathrsfs}
5 %\usepackage{hyperref}
6 %\usepackage{picins}
7
8 \newcommand{\sem}[1]{[\![ #1 ]\!]}
9 \newcommand{\R}{\,\mathscr{R}\,}
10 \title{...}
11 \author{...}
12
13
14 \begin{document}
15 \maketitle
16
17 \begin{abstract}
18 ...
19 \end{abstract}
20
21 \section{Heyting's arithmetics}
22
23 {\bf Axioms}
24
25 \begin{itemize}
26
27 \item $nat\_ind: P(0) \to (\forall x.P(x) \to P(S(x))) \to \forall x.P(x)$ 
28 \item $ex\_ind: (\forall x.P(x) \to Q) \to \exists x.P(x) \to Q$
29 \item $ex\_intro: \forall x.(P \to \exists x.P)$
30 \item $fst: P \land Q \to P$
31 \item $snd: P \land Q \to Q$
32 \item $conj: P \to Q \to P \land Q$
33 \item $false\_ind: \bot \to Q$
34 \item $discriminate:\forall x.0 = S(x) \to \bot$
35 \item $injS: \forall x,y.S(x) = S(y) \to x=y$
36 \item $plus\_O:\forall x.x+0=x$
37 \item $plus\_S:\forall x,y.x+S(y)=S(x+y)$ 
38 \item $times\_O:\forall x.x*0=0$
39 \item $timies\_S:\forall x,y.x*S(y)=x+(x*y)$ 
40 \end{itemize}
41
42 \noindent
43 {\bf Inference Rules}
44
45 \[ 
46    (\to_i)\frac{\Gamma,x:A \vdash M:Q}{\Gamma \vdash \lambda x:A.M: A \to Q} \hspace{2cm}
47    (\to_e)\frac{\Gamma \vdash M: A \to Q \hspace{1cm}\Gamma \vdash N: A}
48     {\Gamma \vdash M N: Q} 
49 \]
50
51 %\[ 
52 %   (\land_i)\frac{\Gamma \vdash M:A \hspace{1cm}\Gamma \vdash N:B}
53 %   {\Gamma \vdash <M,N> : A \land B} 
54 %\hspace{2cm}
55 %   (\land_{el})\frac{\Gamma \vdash A \land B}{\Gamma \vdash A}
56 %\hspace{2cm}
57 %   (\land_{er})\frac{\Gamma \vdash A \land B}{\Gamma \vdash B}  
58 %\]
59
60 \[ 
61    (\forall_i)\frac{\Gamma \vdash M:P}{\Gamma \vdash 
62    \lambda x:N.M: \forall x.P}(*) \hspace{2cm}
63    (\forall_e)\frac{\Gamma \vdash M :\forall x.P}{\Gamma \vdash M t: P[t/x]} 
64 \]
65
66
67 %\[ 
68 %   (\exists_i)\frac{\Gamma \vdash P[t/x]}{\Gamma \vdash \exists x.P}\hspace{2cm}
69 %   (\exists_e)\frac{\Gamma \vdash \exists x.P\hspace{1cm}\Gamma \vdash \forall x.P \to Q}
70 %{\Gamma \vdash Q} 
71 %\]
72
73 \section{Extraction}
74
75 \begin{itemize}
76 \item $\sem{A} = 1$ if A is atomic
77 \item $\sem{A \land B} = \sem{A}\times \sem{B}$
78 \item $\sem{A \to B} = \sem{A}\to \sem{B}$
79 \item $\sem{\forall x.P} = N \to \sem{P}$
80 \item $\sem{\exists x.P} = N \times \sem{P}$
81 \end{itemize}
82
83 definition.
84 For any type T of system T $\bot_T: 1 \to T$  is inuctively defined as follows:
85 \begin{enumerate}
86 \item $\bot_1 = \lambda x:1.x$
87 \item $\bot_N = \lambda x:1.0$
88 \item $\bot_{U\times V} = \lambda x:1.<\bot_{U} x,\bot_{V} x>$
89 \item $\bot_{U\to V} = \lambda x:1.\lambda \_:U. \bot_{V} x$
90 \end{enumerate}
91
92 \begin{itemize}
93 \item $\sem{nat\_ind} = R$
94 \item $\sem{ex\_ind} = (\lambda f:(N \to \sem{P} \to \sem{Q}).
95 \lambda p:N\times \sem{P}.f (fst \,p) (snd \,p)$. 
96 \item $\sem{ex\_intro} = \lambda x:N.\lambda f:\sem{P}.<x,f>$
97 \item $\sem{fst} = fst$
98 \item $\sem{snd} = snd$
99 \item $\sem{conj} = \lambda x:\sem{P}.\lambda y:\sem{Q}.<x,y>$
100 \item $\sem{false\_ind} = \bot_{\sem{Q}}$
101 \item $\sem{discriminate} = \lambda \_:N.\lambda \_:1.*$
102 \item $\sem{injS}= \lambda \_:N. \lambda \_:N.\lambda \_:1.*$
103 \item $\sem{plus\_O} = \sem{times\_O} = \lambda \_:N.*$
104 \item $\sem{plus\_S} = \sem{times_S} = \lambda \_:N. \lambda \_:N.*$
105 \end{itemize}
106
107 In the case of structured proofs:
108 \begin{itemize}
109 \item $\sem{M N} = \sem{M} \sem{N}$
110 \item $\sem{\lambda x:A.M} = \lambda x:\sem{A}.\sem{M}$
111 \item $\sem{\lambda x:N.M} = \lambda x:N.\sem{M}$
112 \item $\sem{M t} = \sem{M} \sem{t}$
113 \end{itemize}
114
115 \section{Realizability}
116 The realizability relation is a relation $f \R P$ where $f: \sem{P}$.
117 In particular:
118 \begin{itemize}
119 \item $\neg (* \R \bot)$
120 \item $* \R (t_1=t_2)$ iff $t_1=t_2$ is true ...
121 \item $<f,g> \R (P\land Q)$ iff $f \R P$ and $g \R Q$
122 \item $f \R (P\to Q)$ iff for any $m$ such that $m \R P$, $(f \,m) \R Q$
123 \item $f \R (\forall x.P)$ iff for any natural number $n$ $(f n) \R P[\underline{n}/x]$
124 \item $<n,g> \R (\exists x.P)$ iff $g \R P[\underline{n}/x]$
125 \end{itemize}
126
127 \noindent
128 We proceed to prove that alla axioms $ax:Ax$ are realized by $\sem{ax}$.
129
130 \begin{itemize}
131 \item $nat\_ind$. We must prove that the recursion schema $R$ realizes the 
132 induction principle. To this aim we must prove that for any $a$ and $f$ such that
133 $a \R P(0)$ and  $f \R \forall x.(P(x) \to P(S(x)))$, and any natural number 
134 $n$, $(R \,a \,f \,n) \R P(\underline{n})$.\\
135 We proceed by induction on n.\\
136 If $n=O$, $(R \,a \,f \,O) = a$ and by hypothesis $a \R P(0)$.\\
137 Suppose by induction that $(R \,a \,f \,n) \R P(\underline{n})$, and let us prove that
138 the relation still holds for $n+1$. 
139 By definition $(R \,a \,f \,(n+1)) = f \,n \,(R \,a \,f \,n)$, 
140 and since $f \R \forall x.(P(x) \to P(S(x)))$,  
141 $(f n (R a f n)) \R P(S(\underline{n}))=P(\underline{n+1})$.
142 \end{itemize}
143
144 \begin{thebibliography}{}
145
146
147 \end{thebibliography}
148
149 \end{document}
150