File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed
Cslib/Computability/LambdaCalculus/WellScoped/FSub Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -32,9 +32,13 @@ import Cslib.Computability.LambdaCalculus.WellScoped.FSub.Syntax
32
32
must preserve the variable and type bindings in the context. -/
33
33
structure Rebind (Γ : Ctx s1) (f : Rename s1 s2) (Δ : Ctx s2) where
34
34
/-- Term variable preservation: x:T in Γ implies f(x):f(T) in Δ -/
35
- var : ∀ x T, Ctx.LookupVar Γ x T → Ctx.LookupVar Δ (f.var x) (T.rename f)
35
+ var : ∀ x T,
36
+ (hb : Ctx.LookupVar Γ x T) →
37
+ Ctx.LookupVar Δ (f.var x) (T.rename f)
36
38
/-- Type variable preservation: X<:T in Γ implies f(X)<:f(T) in Δ -/
37
- tvar : ∀ X T, Ctx.LookupTVar Γ X T → Ctx.LookupTVar Δ (f.tvar X) (T.rename f)
39
+ tvar : ∀ X T,
40
+ (hb : Ctx.LookupTVar Γ X T) →
41
+ Ctx.LookupTVar Δ (f.tvar X) (T.rename f)
38
42
39
43
/-- **Lifting rebinding morphisms over term variable binders** .
40
44
Original file line number Diff line number Diff line change @@ -31,8 +31,12 @@ import Cslib.Computability.LambdaCalculus.WellScoped.FSub.RebindTheory.TypeSyste
31
31
32
32
Unlike rebinding morphisms, retyping morphisms map variables to typing derivations. -/
33
33
structure Retype (Γ : Ctx s1) (σ : Subst s1 s2) (Δ : Ctx s2) where
34
- var : ∀ x T, Γ.LookupVar x T → HasType Δ (σ.var x) (T.subst σ)
35
- tvar : ∀ X S, Γ.LookupTVar X S → Subtyp Δ (σ.tvar X) (S.subst σ)
34
+ var : ∀ x T,
35
+ (hb : Γ.LookupVar x T) →
36
+ HasType Δ (σ.var x) (T.subst σ)
37
+ tvar : ∀ X S,
38
+ (hb : Γ.LookupTVar X S) →
39
+ Subtyp Δ (σ.tvar X) (S.subst σ)
36
40
37
41
/-- Extends a retyping morphism to contexts with an additional term variable. -/
38
42
def Retype.liftVar (ρ : Retype Γ σ Δ) : Retype (Γ,x:P) (σ.liftVar) (Δ,x:P.subst σ) where
You can’t perform that action at this time.
0 commit comments