... ... @@ -17,8 +17,8 @@ \textbf{Variables} & $$x,y,z,\dots$$ & & \\ \textbf{Sorts} & $$s$$ & $$\defn$$ & $$\ttype{} ~|~ \tkind$$ \\ \textbf{Terms} & $$A,B,t,u$$ & $$\defn$$ & $$x~|~s~|~\tpi{x}{A}{B} ~|~\tabs{x}{A}{u} ~|~ \tapp{t}{u}$$\\ \textbf{Relations} & $$\mathcal{R}$$ & & \\ \textbf{Context} & $$\Gamma$$ & $$\defn$$ & $$\emptyset~|~\Gamma, x:A~|~\Gamma, \mathcal{R}$$\\ \textbf{Relations} & $$\mathcal{R}$$ &$$\defn$$ & $$(t,u)$$ \\ \textbf{Context} & $$\Gamma$$ & $$\defn$$ & $$[]~|~\Gamma, x:A~|~\Gamma, \mathcal{R}$$\\ \textbf{Typing Judgment} & & & $$\Gamma \vdash t : A$$\\ \textbf{Typing context well-formed} & & & $$\phantom{\Gamma} \vdash \wf{\Gamma}$$ \\ \textbf{Relation well-formed} & & & $$\Gamma \vdash \wf{\mathcal{R}}$$ \\ ... ... @@ -49,21 +49,21 @@ \end{definition} \begin{definition} We define $$\conv_{\beta\Gamma}$$ as the reflexive, symmetric, transitive closure of $$\beta$$ and $$\bigcup_{\mathcal{R} \in \Gamma} \mathcal{R}$$ and closed by context. We define $$\convbg$$ as the reflexive, symmetric, transitive closure of $$\beta$$ and $$\bigcup_{\mathcal{R} \in \Gamma} \mathcal{R}$$ and closed by context. \end{definition} \begin{rules}{typing}{Typing rules} \inferrule{ } \inferrule*{ } {\wf{\emptyset}} \and \inferrule{ \inferrule*{ \wf{\Gamma} \\ {\Gamma \vdash A : \ttype} } {\wf{\Gamma, x:A}} \and \inferrule{ \inferrule*{ \wf{\Gamma} \\ {\mathcal{R} \in \mathfrak{R}_{Dom(\Gamma)}} ... ... @@ -72,30 +72,34 @@ } {\wf{\Gamma, \mathcal{R}}} \and \inferrule{ TODO \inferrule*[Right=Rel]{ \Gamma \vdash A : \ttype \\ \Gamma \vdash t : A \\ \Gamma \vdash u : A } {\Gamma \vdash \wf{\mathcal{R}}} {\Gamma \vdash \wf{\mathcal{R} = (t,u)}} \and \inferrule{ \inferrule*{ \wf{\Gamma} \\ x : A \in \Gamma } {\Gamma \vdash x : A} \and \inferrule{ \inferrule*{ } {\Gamma \vdash \ttype : \tkind} \and \inferrule{ \inferrule*{ \Gamma \vdash A : \ttype \\ \Gamma, x : A \vdash B : s } {\Gamma \vdash \tpi{x}{A}{B} : s} \and \inferrule{ \inferrule*{ \Gamma \vdash A : \ttype \\ \Gamma, x : A \vdash B : s ... ... @@ -104,21 +108,38 @@ } {\Gamma \vdash \tabs{x}{A}{t} : \tpi{x}{A}{B}} \and \inferrule{ \inferrule*{ \Gamma \vdash t : \tpi{x}{A}{B} \\ \Gamma \vdash u : A } {\Gamma \vdash t~u : \subst{B}{x}{u}} \and \inferrule{ \inferrule*{ \Gamma \vdash t : A \\ \Gamma \vdash B : s \\ A \conv_{\beta\Gamma} B A \convbg B } {\Gamma \vdash t: B} \end{rules} \begin{lemma} For any context $$\Gamma$$, if $$\tkind \convbg t$$ then $$t = \tkind$$. \end{lemma} \begin{proof} By induction on the length of $$\Gamma$$, we can prove that there is no $$u$$ such that $$\Gamma \vdash \wf{(\tkind,u)}$$ or the symmetrical case are derivable. From this, we can conclude the statement. \todo{Peut-on le prouver sans induction ?} \end{proof} \begin{lemma} For any context $$\Gamma$$, if $$\ttype \convbg t$$ then $$t = \ttype$$. \end{lemma} \begin{proof} Same proof as the precedent lemma. \end{proof} Notice that if we want to be pedantic, the proofs above need actually to prove a mutual judgment since the congruence relation and the typing judgements are mutually defined. \end{document}