Library Lambda.JRussell.PreFunctionality

Require
Import
Lambda.Terms
.
Require
Import
Lambda.Reduction
.
Require
Import
Lambda.LiftSubst
.
Require
Import
Lambda.Env
.
Require
Import
Lambda.JRussell.Types
.
Require
Import
Lambda.JRussell.Coercion
.
Require
Import
Lambda.JRussell.Substitution
.

Require
Import
Coq.Arith.Arith
.


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
.

Lemma
pre_functionality_rec
: ∀
g
(
d
:
term
)
t
,
g
|-=
d
:
t
→ ∀
d'
,
g
|-=
d
=
d'
:
t

  ∀
e
U
T
,
e
|-=
U
:
T

  ∀
f
n
,
sub_in_env
d
t
n
e
f
trunc
_
n
f
g

  
f
|-= (
subst_rec
d
U
n
) = (
subst_rec
d'
U
n
) : (
subst_rec
d
T
n
).

Lemma
pre_functionality
: ∀
e
(
d
:
term
)
t
,
e
|-=
d
:
t

  ∀
d'
,
e
|-=
d
=
d'
:
t

  ∀
U
T
,
t
::
e
|-=
U
:
T

  
e
|-= (
subst
d
U
) = (
subst
d'
U
) : (
subst
d
T
).