Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BW_VersionPositive
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Guillaume GENESTIER
BW_VersionPositive
Commits
bc17dafe
Commit
bc17dafe
authored
Mar 28, 2019
by
Guillaume GENESTIER
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Typing in english
parent
b377552a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
46 deletions
+54
-46
typing.tex
typing.tex
+54
-46
No files found.
typing.tex
View file @
bc17dafe
\section
{
Typ
age
}
\section
{
Typ
ing
}
\subsection*
{
Formation des contextes
}
\subsection*
{
Context formation
}
\begin{center}
\begin{tabular}
{
rcl
}
\AxiomC
{$
\phantom
{
\Gamma\vdash
A
}$}
\UnaryInfC
{$
[]
$
bien formé
}
\UnaryInfC
{$
[]
$
well-formed
}
\DisplayProof
&&
\AxiomC
{$
\Gamma\vdash
A:s
$}
\RightLabel
{$
\sys
{
x
\notin\support
(
\Gamma
)
}{
s
\in\Sort
}$}
\UnaryInfC
{$
\Gamma
,x:A
$
bien formé
}
\UnaryInfC
{$
\Gamma
,x:A
$
well-formed
}
\DisplayProof
\end{tabular}
\end{center}
\subsection*
{
Axiom
e
s
}
\subsection*
{
Axioms
}
\begin{center}
\begin{tabular}
{
rcl
}
\AxiomC
{$
\Gamma
$
bien formé
}
\AxiomC
{$
\Gamma
$
well-formed
}
\UnaryInfC
{$
\Gamma\vdash
\Type
:
\Kind
$}
\DisplayProof
&&
\AxiomC
{$
\Gamma
$
bien formé
}
\AxiomC
{$
\Gamma
$
well-formed
}
\RightLabel
{$
x:A
\in\Gamma
$}
\UnaryInfC
{$
\Gamma\vdash
x:A
$}
\DisplayProof
...
...
@@ -30,11 +30,11 @@
\end{center}
\todo
{
On peut remplacer ce prédicat bien formé par une règle d'affaiblissement (cf
FSCD).
Quel impact ce changement a-t-il
?
We can replace the ``well-formed'' predicate by a weakening (cf.
FSCD).
Does it change anything
?
}
\subsection*
{
Produ
i
t
}
\subsection*
{
Produ
c
t
}
\begin{prooftree}
\AxiomC
{$
\Gamma\vdash
A:
\Type
$}
...
...
@@ -60,7 +60,7 @@ Quel impact ce changement a-t-il ?
\BinaryInfC
{$
\Gamma\vdash
t
\,
u:
\subst
{
B
}{
x
}{
u
}$}
\end{prooftree}
\subsection*
{
S
ymbole de la signature
}
\subsection*
{
S
ignature symbol
}
\begin{prooftree}
\def\defaultHypSeparation
{
\hskip
0em
}
...
...
@@ -68,7 +68,7 @@ Quel impact ce changement a-t-il ?
\UnaryInfC
{$
\Gamma\vdash
f:
\tau
(
f
)
$}
\end{prooftree}
\todo
{
Si l'on a l'affaiblissement,
$
\G
$
peut être supprimé dans cette règ
le.
}
\todo
{
If we have the weakening,
$
\G
$
can be suppressed in this ru
le.
}
\subsection*
{
Conversion
}
...
...
@@ -80,72 +80,80 @@ Quel impact ce changement a-t-il ?
\end{prooftree}
\begin{cond}
{
SubjectReduction
}
(Subject reduction).
On suppose que les règles préservent le typage,
\cad
que
pour tous termes
$
t
$
et
$
t'
$
tels que
$
t
\rew
t'
$
,
pour tout
$
T
$
,
pour tout contexte
$
\Gamma
$
tel que
$
\Gamma\vdash
t:T
$
,
on a
$
\Gamma\vdash
t':T
$
.
We suppose that the rules are type preserving in the sense that :
for all terms
$
t
$
and
$
t'
$
such that
$
t
\rew
t'
$
,
for all
$
T
$
,
for all context
$
\Gamma
$
such that
$
\Gamma\vdash
t:T
$
,
then
$
\Gamma\vdash
t':T
$
.
\end{cond}
\begin{rmq}
Subject reduction impli
que que pour toute règ
le
$
f
\,\bar
l
\rul
r
$
,
Subject reduction impli
es that for any ru
le
$
f
\,\bar
l
\rul
r
$
,
$
\FreeVar
(
r
)
\subseteq\FreeVar
(
f
\,\bar
l
)
$
.
\end{rmq}
\begin{defi}
[Termes (version stratifiée)]
On donne les 3 grammaires suivantes :
\begin{defi}
[Terms (stratified version)]
We give the 3 following grammars:
\begin{center}
\begin{tabular}
{
rrlr
}
kinds
&
$
K
$
&
$
::
=
\Type\mid\Pi
(
x:U
)
. K
$
\\
famil
l
es
&
$
T,U
$
&
$
::
=
\lambda
(
x:U
)
.
\,
T
\mid\Pi
(
x:U
)
.T
\mid
T
\,
t
\mid
F
$&
où
$
F
\in\FTyp
$
\\
objets
&
$
t,u
$
&
$
::
=
x
\mid\lambda
(
x:T
)
.
\,
t
\mid
t
\,
u
\mid
f
$&
où
$
f
\in\FObj
$
,
$
x
\in\Var
$
\\
famil
i
es
&
$
T,U
$
&
$
::
=
\lambda
(
x:U
)
.
\,
T
\mid\Pi
(
x:U
)
.T
\mid
T
\,
t
\mid
F
$&
où
$
F
\in\FTyp
$
\\
obje
c
ts
&
$
t,u
$
&
$
::
=
x
\mid\lambda
(
x:T
)
.
\,
t
\mid
t
\,
u
\mid
f
$&
où
$
f
\in\FObj
$
,
$
x
\in\Var
$
\\
\end{tabular}
\end{center}
Un
\emph
{
terme
}
est
$
\Kind
$
, une
\emph
{
kind
}
, une
\emph
{
famille
}
ou un
\emph
{
obje
t
}
.
A
\emph
{
term
}
is
$
\Kind
$
, a
\emph
{
kind
}
, a
\emph
{
family
}
or an
\emph
{
objec
t
}
.
\end{defi}
\todo
{
Rajouter un item pour les types qui sont des familles d'arité 0 et mettre cela au bon endroit (mais ça fait une 3e grammaire) ?
}
\todo
{
Add a grammar for types which are families of arity 0?
But it would be a 4th grammar.
Does it offer any benefit?
}
\begin{nots}
$
\mbb
{
K
}$
désigne l'ensemble des kinds,
$
\mbb
{
F
}$
l'ensemble des familles et
$
\mbb
{
O
}$
l'ensemble des objets.
$
\mbb
{
K
}$
is the set of kinds,
$
\mbb
{
F
}$
the set of familles
and
$
\mbb
{
O
}$
the set of objects.
De plus,
$
\Terms
$
désigne l'ensemble de tous les terme
s.
Furthermore,
$
\Terms
$
designates the set of all term
s.
\end{nots}
\begin{cond}
{
ConsistTypSort
}
(Co
hérence typage sortage
)
$
\tau
$
associ
e
:
\begin{cond}
{
ConsistTypSort
}
(Co
nsistency between typing and sorting
)
$
\tau
$
associ
ates
:
\begin{itemize}
\item
une kind à chaque symbole de
$
\FTyp
$
;
\item
une famille à chaque symbole de
$
\FObj
$
.
\item
a kind to every symbol of
$
\FTyp
$
;
\item
a family to every symbol of
$
\FObj
$
.
\end{itemize}
\end{cond}
\begin{defi}
[
Forme normale
]
Soit
$
t
\in\SN
$
, on note
$
t
\Downarrow
$
sa forme normale
,
qui est le terme
$
u
$
tel que
$
t
\reww
u
$
et il n'existe pas de
$
v
$
tel que
$
u
\rew
v
$
.
\begin{defi}
[
Normal form
]
For
$
t
\in\SN
$
, we denote by
$
t
\Downarrow
$
its normal form
,
which is the term
$
u
$
such that
$
t
\reww
u
$
and there exist no
$
v
$
such that
$
u
\rew
v
$
.
\end{defi}
\begin{rmq}
Grâce à l'hypothèse de confluence locale et lemme de Newman, la forme si elle existe est unique
.
Thanks to the local confluence hypothesis and Newman's lemma, the normal form is unique and well-defined
.
\end{rmq}
\begin{propo}
[Stratification]
\label
{
lem-Stratification
}
Si
$
\Delta\vdash
t:A
$
, alors on est dans l'un des cas suivants
:
\begin{propo}
[Stratification lemma]
If
$
\D\vdash
t:A
$
then we are in one of the following cases
:
\begin{itemize}
\item
$
t
$
est un objet,
$
A
$
une famille et
$
\D\vdash
A:
\Type
$
,
\item
$
t
$
est une famille,
$
A
$
une kind et
$
\D\vdash
A:
\Kind
$
,
\item
$
t
$
est une kind et
$
A
=
\Kind
$
.
\item
$
t
$
is an object,
$
A
$
a family and
$
\D\vdash
A:
\Type
$
,
\item
$
t
$
is an family,
$
A
$
a kind and
$
\D\vdash
A:
\Kind
$
,
\item
$
t
$
is an kind and
$
A
=
\Kind
$
.
\end{itemize}
\end{propo}
\begin{proof}
C'est le lemme 2.6.10 de la thèse de Ronan.
C'est aussi dans la thèse de Frédéric (numéro à chercher).
This is lemma 2.6.10 of Ronan's thesis.
\end{proof}
\begin{defi}
[Transition bien typée]
Soit
$
\G
$
et
$
\D
$
deux contextes.
$
\sg
$
est
\emph
{
une transition bien typée
}
entre
$
\G
$
et
$
\D
$
(notée
$
\sg
:
\G\rightsquigarrow\D
$
)
si pour tous
$
t,T
$
,
$
\G\vdash
t:T
$
implique
$
\D\vdash
t
\sg
:T
\sg
$
.
\begin{defi}
[Well-typed transition]
Let
$
\G
$
and
$
\D
$
be two contexts.
$
\sg
$
is a
\emph
{
well-typed transition
}
between
$
\G
$
and
$
\D
$
(denoted
$
\sg
:
\G\rightsquigarrow\D
$
)
if for all
$
t,T
$
,
$
\G\vdash
t:T
$
implies
$
\D\vdash
t
\sg
:T
\sg
$
.
\end{defi}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment