internlm/Lean-Github huggingface dataset:
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝
ih : OnTypes env✝ (motive env✝)
⊢ OnTypes (addDefEq env✝ df✝) (motive (addDefEq env✝ df✝))
Tactic:
apply OnTypes.mono .rfl (mono addDefEq_le)
Proof state after:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝
ih : OnTypes env✝ (motive env✝)
⊢ OnTypes (addDefEq env✝ df✝) fun {U} {e A} => motive env✝ U e A
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝
ih : OnTypes env✝ (motive env✝)
⊢ OnTypes (addDefEq env✝ df✝) fun {U} {e A} => motive env✝ U e A
Tactic:
refine ⟨ih.1, fun hdf => ?_⟩
Proof state after:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : (addDefEq env✝ df✝¹).defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : (addDefEq env✝ df✝¹).defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Tactic:
simp [addDefEq] at hdf
Proof state after:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : df✝ = df✝¹ ∨ env✝.defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : df✝ = df✝¹ ∨ env✝.defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Tactic:
obtain rfl | hdf := hdf
Proof state after:
case defeq.inl
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
h1 : Ordered env✝
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
h2 : VDefEq.WF env✝ df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A

case defeq.inr
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : env✝.defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq.inl
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
h1 : Ordered env✝
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
h2 : VDefEq.WF env✝ df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Tactic:
let ⟨hl, hr⟩ := h2
Proof state after:
case defeq.inl
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
h1 : Ordered env✝
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
h2 : VDefEq.WF env✝ df✝
hl : HasType env✝ df✝.uvars [] df✝.lhs df✝.type
hr : HasType env✝ df✝.uvars [] df✝.rhs df✝.type
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq.inl
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
h1 : Ordered env✝
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
h2 : VDefEq.WF env✝ df✝
hl : HasType env✝ df✝.uvars [] df✝.lhs df✝.type
hr : HasType env✝ df✝.uvars [] df✝.rhs df✝.type
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Tactic:
exact ⟨type h1 ih hl, type h1 ih hr⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.Ordered.induction
Proof state before:
case defeq.inr
env : VEnv
motive : VEnv → Nat → VExpr → VExpr → Prop
mono : ∀ {env env' : VEnv} {U : Nat} {e A : VExpr}, env ≤ env' → motive env U e A → motive env' U e A
type :
  ∀ {env : VEnv} {U : Nat} {e A : VExpr},
    Ordered env → OnTypes env (motive env) → HasType env U [] e A → motive env U e A
env✝ : VEnv
df✝¹ : VDefEq
h1 : Ordered env✝
h2 : VDefEq.WF env✝ df✝¹
ih : OnTypes env✝ (motive env✝)
df✝ : VDefEq
hdf : env✝.defeqs df✝
⊢ (fun {U} {e A} => motive env✝ U e A) ∧ fun {U} {e A} => motive env✝ U e A
Tactic:
exact ih.2 hdf
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
H : IsDefEq env U Γ e1 e2 A
hΓ : CtxClosed Γ
⊢ ClosedN e1 (List.length Γ) ∧ ClosedN e2 (List.length Γ) ∧ ClosedN A (List.length Γ)
Tactic:
induction H with
| bvar h => exact ⟨h.lt, h.lt, hΓ.lookup h⟩
| constDF h1 =>
  let ⟨_, h, _⟩ := henv.1 h1
  exact ⟨trivial, trivial, h.instL.mono (Nat.zero_le _)⟩
| sortDF => exact ⟨trivial, trivial, trivial⟩
| symm _ ih => let ⟨h1, h2, h3⟩ := ih hΓ; exact ⟨h2, h1, h3⟩
| trans _ _ ih1 ih2 => exact ⟨(ih1 hΓ).1, (ih2 hΓ).2.1, (ih1 hΓ).2.2⟩
| appDF _ _ ih1 ih2 =>
  let ⟨hf, hf', _, hB⟩ := ih1 hΓ
  let ⟨ha, ha', _⟩ := ih2 hΓ
  exact ⟨⟨hf, ha⟩, ⟨hf', ha'⟩, hB.inst ha⟩
| lamDF _ _ ih1 ih2 =>
  let ⟨hA, hA', _⟩ := ih1 hΓ
  let ⟨hb, hb', hB⟩ := ih2 ⟨hΓ, hA⟩
  exact ⟨⟨hA, hb⟩, ⟨hA', hb'⟩, hA, hB⟩
| forallEDF _ _ ih1 ih2 =>
  let ⟨hA, hA', _⟩ := ih1 hΓ
  let ⟨hb, hb', _⟩ := ih2 ⟨hΓ, hA⟩
  exact ⟨⟨hA, hb⟩, ⟨hA', hb'⟩, trivial⟩
| defeqDF _ _ ih1 ih2 => exact ⟨(ih2 hΓ).1, (ih2 hΓ).2.1, (ih1 hΓ).2.1⟩
| beta _ _ ih1 ih2 =>
  let ⟨he', _, hA⟩ := ih2 hΓ
  let ⟨he, _, hB⟩ := ih1 ⟨hΓ, hA⟩
  exact ⟨⟨⟨hA, he⟩, he'⟩, he.inst he', hB.inst he'⟩
| eta _ ih =>
  let ⟨he, _, hA, hB⟩ := ih hΓ
  exact ⟨⟨hA, he.liftN, Nat.succ_pos _⟩, he, hA, hB⟩
| proofIrrel _ _ _ _ ih2 ih3 =>
  let ⟨hh, _, _⟩ := ih2 hΓ
  let ⟨hh', _, hp⟩ := ih3 hΓ
  exact ⟨hh, hh', hp⟩
| extra h1 _ _ =>
  let ⟨⟨hl, _⟩, ⟨hr, hA⟩⟩ := henv.2 h1
  exact ⟨
    hl.instL.mono (Nat.zero_le _),
    hr.instL.mono (Nat.zero_le _),
    hA.instL.mono (Nat.zero_le _)⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case bvar
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
i✝ : Nat
A✝ : VExpr
h : Lookup Γ✝ i✝ A✝
hΓ : CtxClosed Γ✝
⊢ ClosedN (VExpr.bvar i✝) (List.length Γ✝) ∧ ClosedN (VExpr.bvar i✝) (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
Tactic:
exact ⟨h.lt, h.lt, hΓ.lookup h⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case constDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
c✝ : Name
ci✝ : VConstant
ls✝ ls'✝ : List VLevel
Γ✝ : List VExpr
h1 : env.constants c✝ = some (some ci✝)
a✝³ : ∀ (l : VLevel), l ∈ ls✝ → VLevel.WF U l
a✝² : ∀ (l : VLevel), l ∈ ls'✝ → VLevel.WF U l
a✝¹ : List.length ls✝ = ci✝.uvars
a✝ : List.Forall₂ (fun x x_1 => x ≈ x_1) ls✝ ls'✝
hΓ : CtxClosed Γ✝
⊢ ClosedN (VExpr.const c✝ ls✝) (List.length Γ✝) ∧
    ClosedN (VExpr.const c✝ ls'✝) (List.length Γ✝) ∧ ClosedN (instL ls✝ ci✝.type) (List.length Γ✝)
Tactic:
let ⟨_, h, _⟩ := henv.1 h1
Proof state after:
case constDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
c✝ : Name
ci✝ : VConstant
ls✝ ls'✝ : List VLevel
Γ✝ : List VExpr
h1 : env.constants c✝ = some (some ci✝)
a✝³ : ∀ (l : VLevel), l ∈ ls✝ → VLevel.WF U l
a✝² : ∀ (l : VLevel), l ∈ ls'✝ → VLevel.WF U l
a✝¹ : List.length ls✝ = ci✝.uvars
a✝ : List.Forall₂ (fun x x_1 => x ≈ x_1) ls✝ ls'✝
hΓ : CtxClosed Γ✝
w✝ : VLevel
h : ClosedN ci✝.type
right✝ : ClosedN (VExpr.sort w✝)
⊢ ClosedN (VExpr.const c✝ ls✝) (List.length Γ✝) ∧
    ClosedN (VExpr.const c✝ ls'✝) (List.length Γ✝) ∧ ClosedN (instL ls✝ ci✝.type) (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case constDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
c✝ : Name
ci✝ : VConstant
ls✝ ls'✝ : List VLevel
Γ✝ : List VExpr
h1 : env.constants c✝ = some (some ci✝)
a✝³ : ∀ (l : VLevel), l ∈ ls✝ → VLevel.WF U l
a✝² : ∀ (l : VLevel), l ∈ ls'✝ → VLevel.WF U l
a✝¹ : List.length ls✝ = ci✝.uvars
a✝ : List.Forall₂ (fun x x_1 => x ≈ x_1) ls✝ ls'✝
hΓ : CtxClosed Γ✝
w✝ : VLevel
h : ClosedN ci✝.type
right✝ : ClosedN (VExpr.sort w✝)
⊢ ClosedN (VExpr.const c✝ ls✝) (List.length Γ✝) ∧
    ClosedN (VExpr.const c✝ ls'✝) (List.length Γ✝) ∧ ClosedN (instL ls✝ ci✝.type) (List.length Γ✝)
Tactic:
exact ⟨trivial, trivial, h.instL.mono (Nat.zero_le _)⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case sortDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
l✝ l'✝ : VLevel
Γ✝ : List VExpr
a✝² : VLevel.WF U l✝
a✝¹ : VLevel.WF U l'✝
a✝ : l✝ ≈ l'✝
hΓ : CtxClosed Γ✝
⊢ ClosedN (VExpr.sort l✝) (List.length Γ✝) ∧
    ClosedN (VExpr.sort l'✝) (List.length Γ✝) ∧ ClosedN (VExpr.sort (VLevel.succ l✝)) (List.length Γ✝)
Tactic:
exact ⟨trivial, trivial, trivial⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case symm
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
e✝ e'✝ A✝ : VExpr
a✝ : IsDefEq env U Γ✝ e✝ e'✝ A✝
ih : CtxClosed Γ✝ → ClosedN e✝ (List.length Γ✝) ∧ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
⊢ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN e✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
Tactic:
let ⟨h1, h2, h3⟩ := ih hΓ
Proof state after:
case symm
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
e✝ e'✝ A✝ : VExpr
a✝ : IsDefEq env U Γ✝ e✝ e'✝ A✝
ih : CtxClosed Γ✝ → ClosedN e✝ (List.length Γ✝) ∧ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
h1 : ClosedN e✝ (List.length Γ✝)
h2 : ClosedN e'✝ (List.length Γ✝)
h3 : ClosedN A✝ (List.length Γ✝)
⊢ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN e✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case symm
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
e✝ e'✝ A✝ : VExpr
a✝ : IsDefEq env U Γ✝ e✝ e'✝ A✝
ih : CtxClosed Γ✝ → ClosedN e✝ (List.length Γ✝) ∧ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
h1 : ClosedN e✝ (List.length Γ✝)
h2 : ClosedN e'✝ (List.length Γ✝)
h3 : ClosedN A✝ (List.length Γ✝)
⊢ ClosedN e'✝ (List.length Γ✝) ∧ ClosedN e✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
Tactic:
exact ⟨h2, h1, h3⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case trans
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
e₁✝ e₂✝ A✝ e₃✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ e₁✝ e₂✝ A✝
a✝ : IsDefEq env U Γ✝ e₂✝ e₃✝ A✝
ih1 : CtxClosed Γ✝ → ClosedN e₁✝ (List.length Γ✝) ∧ ClosedN e₂✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN e₂✝ (List.length Γ✝) ∧ ClosedN e₃✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
⊢ ClosedN e₁✝ (List.length Γ✝) ∧ ClosedN e₃✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
Tactic:
exact ⟨(ih1 hΓ).1, (ih2 hΓ).2.1, (ih1 hΓ).2.2⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case appDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
f✝ f'✝ A✝ B✝ a✝² a'✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ f✝ f'✝ (VExpr.forallE A✝ B✝)
a✝ : IsDefEq env U Γ✝ a✝² a'✝ A✝
ih1 :
  CtxClosed Γ✝ →
    ClosedN f✝ (List.length Γ✝) ∧ ClosedN f'✝ (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN a✝² (List.length Γ✝) ∧ ClosedN a'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
⊢ ClosedN (app f✝ a✝²) (List.length Γ✝) ∧
    ClosedN (app f'✝ a'✝) (List.length Γ✝) ∧ ClosedN (inst B✝ a✝²) (List.length Γ✝)
Tactic:
let ⟨hf, hf', _, hB⟩ := ih1 hΓ
Proof state after:
case appDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
f✝ f'✝ A✝ B✝ a✝² a'✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ f✝ f'✝ (VExpr.forallE A✝ B✝)
a✝ : IsDefEq env U Γ✝ a✝² a'✝ A✝
ih1 :
  CtxClosed Γ✝ →
    ClosedN f✝ (List.length Γ✝) ∧ ClosedN f'✝ (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN a✝² (List.length Γ✝) ∧ ClosedN a'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
hf : ClosedN f✝ (List.length Γ✝)
hf' : ClosedN f'✝ (List.length Γ✝)
left✝ : ClosedN A✝ (List.length Γ✝)
hB : ClosedN B✝ (List.length Γ✝ + 1)
⊢ ClosedN (app f✝ a✝²) (List.length Γ✝) ∧
    ClosedN (app f'✝ a'✝) (List.length Γ✝) ∧ ClosedN (inst B✝ a✝²) (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case appDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
f✝ f'✝ A✝ B✝ a✝² a'✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ f✝ f'✝ (VExpr.forallE A✝ B✝)
a✝ : IsDefEq env U Γ✝ a✝² a'✝ A✝
ih1 :
  CtxClosed Γ✝ →
    ClosedN f✝ (List.length Γ✝) ∧ ClosedN f'✝ (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN a✝² (List.length Γ✝) ∧ ClosedN a'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
hf : ClosedN f✝ (List.length Γ✝)
hf' : ClosedN f'✝ (List.length Γ✝)
left✝ : ClosedN A✝ (List.length Γ✝)
hB : ClosedN B✝ (List.length Γ✝ + 1)
⊢ ClosedN (app f✝ a✝²) (List.length Γ✝) ∧
    ClosedN (app f'✝ a'✝) (List.length Γ✝) ∧ ClosedN (inst B✝ a✝²) (List.length Γ✝)
Tactic:
let ⟨ha, ha', _⟩ := ih2 hΓ
Proof state after:
case appDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
f✝ f'✝ A✝ B✝ a✝² a'✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ f✝ f'✝ (VExpr.forallE A✝ B✝)
a✝ : IsDefEq env U Γ✝ a✝² a'✝ A✝
ih1 :
  CtxClosed Γ✝ →
    ClosedN f✝ (List.length Γ✝) ∧ ClosedN f'✝ (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN a✝² (List.length Γ✝) ∧ ClosedN a'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
hf : ClosedN f✝ (List.length Γ✝)
hf' : ClosedN f'✝ (List.length Γ✝)
left✝ : ClosedN A✝ (List.length Γ✝)
hB : ClosedN B✝ (List.length Γ✝ + 1)
ha : ClosedN a✝² (List.length Γ✝)
ha' : ClosedN a'✝ (List.length Γ✝)
right✝ : ClosedN A✝ (List.length Γ✝)
⊢ ClosedN (app f✝ a✝²) (List.length Γ✝) ∧
    ClosedN (app f'✝ a'✝) (List.length Γ✝) ∧ ClosedN (inst B✝ a✝²) (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case appDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
f✝ f'✝ A✝ B✝ a✝² a'✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ f✝ f'✝ (VExpr.forallE A✝ B✝)
a✝ : IsDefEq env U Γ✝ a✝² a'✝ A✝
ih1 :
  CtxClosed Γ✝ →
    ClosedN f✝ (List.length Γ✝) ∧ ClosedN f'✝ (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
ih2 : CtxClosed Γ✝ → ClosedN a✝² (List.length Γ✝) ∧ ClosedN a'✝ (List.length Γ✝) ∧ ClosedN A✝ (List.length Γ✝)
hΓ : CtxClosed Γ✝
hf : ClosedN f✝ (List.length Γ✝)
hf' : ClosedN f'✝ (List.length Γ✝)
left✝ : ClosedN A✝ (List.length Γ✝)
hB : ClosedN B✝ (List.length Γ✝ + 1)
ha : ClosedN a✝² (List.length Γ✝)
ha' : ClosedN a'✝ (List.length Γ✝)
right✝ : ClosedN A✝ (List.length Γ✝)
⊢ ClosedN (app f✝ a✝²) (List.length Γ✝) ∧
    ClosedN (app f'✝ a'✝) (List.length Γ✝) ∧ ClosedN (inst B✝ a✝²) (List.length Γ✝)
Tactic:
exact ⟨⟨hf, ha⟩, ⟨hf', ha'⟩, hB.inst ha⟩
Proof state after:
no goals
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case lamDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
A✝ A'✝ : VExpr
u✝ : VLevel
body✝ body'✝ B✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ A✝ A'✝ (VExpr.sort u✝)
a✝ : IsDefEq env U (A✝ :: Γ✝) body✝ body'✝ B✝
ih1 :
  CtxClosed Γ✝ → ClosedN A✝ (List.length Γ✝) ∧ ClosedN A'✝ (List.length Γ✝) ∧ ClosedN (VExpr.sort u✝) (List.length Γ✝)
ih2 :
  CtxClosed (A✝ :: Γ✝) →
    ClosedN body✝ (List.length (A✝ :: Γ✝)) ∧
      ClosedN body'✝ (List.length (A✝ :: Γ✝)) ∧ ClosedN B✝ (List.length (A✝ :: Γ✝))
hΓ : CtxClosed Γ✝
⊢ ClosedN (lam A✝ body✝) (List.length Γ✝) ∧
    ClosedN (lam A'✝ body'✝) (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
Tactic:
let ⟨hA, hA', _⟩ := ih1 hΓ
Proof state after:
case lamDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
A✝ A'✝ : VExpr
u✝ : VLevel
body✝ body'✝ B✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ A✝ A'✝ (VExpr.sort u✝)
a✝ : IsDefEq env U (A✝ :: Γ✝) body✝ body'✝ B✝
ih1 :
  CtxClosed Γ✝ → ClosedN A✝ (List.length Γ✝) ∧ ClosedN A'✝ (List.length Γ✝) ∧ ClosedN (VExpr.sort u✝) (List.length Γ✝)
ih2 :
  CtxClosed (A✝ :: Γ✝) →
    ClosedN body✝ (List.length (A✝ :: Γ✝)) ∧
      ClosedN body'✝ (List.length (A✝ :: Γ✝)) ∧ ClosedN B✝ (List.length (A✝ :: Γ✝))
hΓ : CtxClosed Γ✝
hA : ClosedN A✝ (List.length Γ✝)
hA' : ClosedN A'✝ (List.length Γ✝)
right✝ : ClosedN (VExpr.sort u✝) (List.length Γ✝)
⊢ ClosedN (lam A✝ body✝) (List.length Γ✝) ∧
    ClosedN (lam A'✝ body'✝) (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case lamDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
A✝ A'✝ : VExpr
u✝ : VLevel
body✝ body'✝ B✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ A✝ A'✝ (VExpr.sort u✝)
a✝ : IsDefEq env U (A✝ :: Γ✝) body✝ body'✝ B✝
ih1 :
  CtxClosed Γ✝ → ClosedN A✝ (List.length Γ✝) ∧ ClosedN A'✝ (List.length Γ✝) ∧ ClosedN (VExpr.sort u✝) (List.length Γ✝)
ih2 :
  CtxClosed (A✝ :: Γ✝) →
    ClosedN body✝ (List.length (A✝ :: Γ✝)) ∧
      ClosedN body'✝ (List.length (A✝ :: Γ✝)) ∧ ClosedN B✝ (List.length (A✝ :: Γ✝))
hΓ : CtxClosed Γ✝
hA : ClosedN A✝ (List.length Γ✝)
hA' : ClosedN A'✝ (List.length Γ✝)
right✝ : ClosedN (VExpr.sort u✝) (List.length Γ✝)
⊢ ClosedN (lam A✝ body✝) (List.length Γ✝) ∧
    ClosedN (lam A'✝ body'✝) (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
Tactic:
let ⟨hb, hb', hB⟩ := ih2 ⟨hΓ, hA⟩
Proof state after:
case lamDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
A✝ A'✝ : VExpr
u✝ : VLevel
body✝ body'✝ B✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ A✝ A'✝ (VExpr.sort u✝)
a✝ : IsDefEq env U (A✝ :: Γ✝) body✝ body'✝ B✝
ih1 :
  CtxClosed Γ✝ → ClosedN A✝ (List.length Γ✝) ∧ ClosedN A'✝ (List.length Γ✝) ∧ ClosedN (VExpr.sort u✝) (List.length Γ✝)
ih2 :
  CtxClosed (A✝ :: Γ✝) →
    ClosedN body✝ (List.length (A✝ :: Γ✝)) ∧
      ClosedN body'✝ (List.length (A✝ :: Γ✝)) ∧ ClosedN B✝ (List.length (A✝ :: Γ✝))
hΓ : CtxClosed Γ✝
hA : ClosedN A✝ (List.length Γ✝)
hA' : ClosedN A'✝ (List.length Γ✝)
right✝ : ClosedN (VExpr.sort u✝) (List.length Γ✝)
hb : ClosedN body✝ (List.length (A✝ :: Γ✝))
hb' : ClosedN body'✝ (List.length (A✝ :: Γ✝))
hB : ClosedN B✝ (List.length (A✝ :: Γ✝))
⊢ ClosedN (lam A✝ body✝) (List.length Γ✝) ∧
    ClosedN (lam A'✝ body'✝) (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
Theorem: Lean4Lean.VEnv.IsDefEq.closedN'
Proof state before:
case lamDF
env : VEnv
henv : OnTypes env fun x e A => ClosedN e ∧ ClosedN A
U : Nat
Γ : List VExpr
e1 e2 A : VExpr
Γ✝ : List VExpr
A✝ A'✝ : VExpr
u✝ : VLevel
body✝ body'✝ B✝ : VExpr
a✝¹ : IsDefEq env U Γ✝ A✝ A'✝ (VExpr.sort u✝)
a✝ : IsDefEq env U (A✝ :: Γ✝) body✝ body'✝ B✝
ih1 :
  CtxClosed Γ✝ → ClosedN A✝ (List.length Γ✝) ∧ ClosedN A'✝ (List.length Γ✝) ∧ ClosedN (VExpr.sort u✝) (List.length Γ✝)
ih2 :
  CtxClosed (A✝ :: Γ✝) →
    ClosedN body✝ (List.length (A✝ :: Γ✝)) ∧
      ClosedN body'✝ (List.length (A✝ :: Γ✝)) ∧ ClosedN B✝ (List.length (A✝ :: Γ✝))
hΓ : CtxClosed Γ✝
hA : ClosedN A✝ (List.length Γ✝)
hA' : ClosedN A'✝ (List.length Γ✝)
right✝ : ClosedN (VExpr.sort u✝) (List.length Γ✝)
hb : ClosedN body✝ (List.length (A✝ :: Γ✝))
hb' : ClosedN body'✝ (List.length (A✝ :: Γ✝))
hB : ClosedN B✝ (List.length (A✝ :: Γ✝))
⊢ ClosedN (lam A✝ body✝) (List.length Γ✝) ∧
    ClosedN (lam A'✝ body'✝) (List.length Γ✝) ∧ ClosedN (VExpr.forallE A✝ B✝) (List.length Γ✝)
Tactic:
exact ⟨⟨hA, hb⟩, ⟨hA', hb'⟩, hA, hB⟩
Proof state after:
no goals