Library Lambda.JRussell.Conversion
Require
Import
Lambda.Terms
.
Require
Import
Lambda.Reduction
.
Require
Import
Lambda.Conv
.
Require
Import
Lambda.LiftSubst
.
Require
Import
Lambda.Env
.
Require
Import
Lambda.JRussell.Types
.
Require
Import
Lambda.JRussell.Basic
.
Implicit
Types
i
k
m
n
p
: nat
.
Implicit
Type
s
: sort
.
Implicit
Types
A
B
M
N
T
t
u
v
: term
.
Implicit
Types
e
f
g
: env
.
Inductive
conv_in_env
: env
→ env
→ Prop
:=
| conv_env_hd
: ∀ e
t
u
s
, e
|-= t
= u
: Srt
s
→ e
|-= u
: Srt
s
→
conv_in_env
(t
:: e
) (u
:: e
)
| conv_env_tl
:
∀ e
f
t
, conv_in_env
e
f
→ conv_in_env
(t
:: e
) (t
:: f
).
Hint
Resolve
conv_env_hd
conv_env_tl
: coc
.
Lemma
ind_conv_env
:
(∀ e
t
T
, e
|-= t
: T
→
∀ f
, conv_in_env
e
f
→ f
|-= t
: T
) ∧
(∀ e
T
U
s
, e
|-= T
>> U
: s
→
∀ f
, conv_in_env
e
f
→ f
|-= T
>> U
: s
) ∧
(∀ e
U
V
T
, e
|-= U
= V
: T
→
∀ f
, conv_in_env
e
f
→ f
|-= U
= V
: T
).
Lemma
type_conv_env
: ∀ e
t
T
, e
|-= t
: T
→
∀ f
, conv_in_env
e
f
→ f
|-= t
: T
.
Lemma
coerce_conv_env
: ∀ e
T
U
s
, e
|-= T
>> U
: s
→
∀ f
, conv_in_env
e
f
→ f
|-= T
>> U
: s
.
Lemma
jeq_conv_env
: ∀ e
U
V
T
, e
|-= U
= V
: T
→
∀ f
, conv_in_env
e
f
→ f
|-= U
= V
: T
.