Skip to content

Commit 87a9332

Browse files
committed
update leansubst
1 parent 1d8b8c5 commit 87a9332

7 files changed

Lines changed: 12 additions & 11 deletions

File tree

LeanStlc/Infer.lean

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
import Std.Tactic.Do
23
import LeanStlc.Typing
34

45
namespace Ty

LeanStlc/SNi.lean

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ namespace SNi
333333
intro i y h
334334
cases i <;> simp at *
335335
case zero => exact h
336-
case _ z => apply Or.inl; exact h
336+
case _ z => exact h
337337
rw [lem] at j2
338338
apply SNi.lam
339339
apply @antirename .nor (b[r]) r j2

LeanStlc/Term.lean

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,13 +135,13 @@ theorem ren_subst_apply_eq_lift {r : Ren} {σ : Subst Term} :
135135
simp [Subst.compose]
136136
generalize zdef : σ i = z at *
137137
cases z <;> simp at *
138-
case _ y => subst h; apply Or.inl; exact h2
138+
case _ y => subst h; exact h2
139139
case _ t => subst h; simp; exact h2
140140
case _ h =>
141141
simp [Subst.compose]
142142
generalize zdef : σ i = z at *
143143
cases z <;> simp at *
144-
case _ y => subst h; apply Or.inl; exact h2
144+
case _ y => subst h; exact h2
145145

146146
theorem ren_subst_apply_eq {t : Term} {r : Ren} {σ : Subst Term} :
147147
(∀ i x, r i = x -> σ i = #x ∨ σ i = .re x) ->

LeanStlc/WeakNorm.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ namespace WeakNormalization
8282
apply lem
8383
end WeakNormalization
8484

85-
theorem weak_termination {t A} : [] ⊢ t : A -> ∃ v, t ~>* v ∧ WeakValue v := by
85+
theorem weak_termination {t A} : .nil ⊢ t : A -> ∃ v, t ~>* v ∧ WeakValue v := by
8686
intro j
8787
have lem := WeakNormalization.fundamental j
8888
simp at lem
@@ -92,12 +92,12 @@ theorem weak_termination {t A} : [] ⊢ t : A -> ∃ v, t ~>* v ∧ WeakValue v
9292
exists v
9393
apply And.intro lem.1 weak
9494

95-
theorem consistency_lemma {t} : [] ⊢ t : ⊤ -> WeakValue t -> False := by
95+
theorem consistency_lemma {t} : .nil ⊢ t : ⊤ -> WeakValue t -> False := by
9696
intro h1 h2
9797
cases t <;> simp [WeakValue] at *
9898
case lam A b => cases h1
9999

100-
theorem consistency {t} : ¬ ([] ⊢ t : ⊤) := by
100+
theorem consistency {t} : ¬ (.nil ⊢ t : ⊤) := by
101101
intro h
102102
have lem := weak_termination h
103103
cases lem; case _ v lem =>

Main.lean

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ def tt (A : Ty) : Term := :λ[A] :λ[A] #1
66
def ff (A : Ty) : Term := :λ[A] :λ[A] #0
77
def not (A : Ty) : Term := :λ[bool_ty (bool_ty A)] #0 :@ (ff A) :@ (tt A)
88

9-
#eval Option.get! (infer [] (tt ⊤))
10-
#eval Option.get! (infer [] (not ⊤))
11-
#eval Option.get! (infer [] ((not ⊤) :@ (tt (bool_ty ⊤))))
9+
#eval Option.get! (infer .nil (tt ⊤))
10+
#eval Option.get! (infer .nil (not ⊤))
11+
#eval Option.get! (infer .nil ((not ⊤) :@ (tt (bool_ty ⊤))))
1212

1313
def main : IO Unit := do return ()

docbuild/lake-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"type": "git",
6363
"subDir": null,
6464
"scope": "amarmaduke",
65-
"rev": "987039ce9c6e92b6a1b4e7a0ddcfbc9678eb48a5",
65+
"rev": "8da67cb68dd63ef181e521996f58992c7d9e7008",
6666
"name": "«lean-subst»",
6767
"manifestFile": "lake-manifest.json",
6868
"inputRev": "main",

lake-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "git",
66
"subDir": null,
77
"scope": "amarmaduke",
8-
"rev": "987039ce9c6e92b6a1b4e7a0ddcfbc9678eb48a5",
8+
"rev": "8da67cb68dd63ef181e521996f58992c7d9e7008",
99
"name": "«lean-subst»",
1010
"manifestFile": "lake-manifest.json",
1111
"inputRev": "main",

0 commit comments

Comments
 (0)