url stringclasses 147
values | commit stringclasses 147
values | file_path stringlengths 7 101 | full_name stringlengths 1 94 | start stringlengths 6 10 | end stringlengths 6 11 | tactic stringlengths 1 11.2k | state_before stringlengths 3 2.09M | state_after stringlengths 6 2.09M | input stringlengths 73 2.09M |
|---|---|---|---|---|---|---|---|---|---|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | let ⟨_, h2⟩ := h1.isType henv hΔ₁.toCtx | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have htt := ht.uniq henv hΔ (ih1.weakN henv W hΔ₂) |>.of_l henv hΔ₁.toCtx h2 | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have ⟨_, ih3⟩ := ih3 (W.cons_bvar (.vlet ..)) (hΔ.cons nofun <| .vlet hvv htt) hs.2.2.fvars_cons | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3 :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝)
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have h1 := HasType.weakN_iff henv hΔ₂.toCtx W.toCtx
|>.1 ((htt.defeqDF hvv).hasType.2.defeqDFC henv hΔ.defeqCtx) | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1✝ : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ) val₁ ty₁
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | exact ⟨_, .letE h1 ih1 ih2 ih3⟩ | case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1✝ : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ) val₁ ty₁
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e' | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case letE
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
val'✝ ty'✝ : VExpr
Δ✝ : VLCtx
ty✝ val✝ body✝ : Expr
body'✝ : VExpr
name✝ : Name
bi✝ : Bool
h1✝ : HasType env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ ty'✝
ht : TrExpr env Us Δ✝ ty✝ ty'✝
hv : TrExpr env Us Δ✝ val✝ val'✝
hb : TrExpr env Us ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) body✝ body'✝
ih1✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) ty✝ dk → ∃ e', TrExpr env Us Δ ty✝ e'
ih2✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) val✝ dk → ∃ e', TrExpr env Us Δ val✝ e'
ih3✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) ((none, VLocalDecl.vlet ty'✝ val'✝) :: Δ✝) Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) body✝ dk → ∃ e', TrExpr env Us Δ body✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.letE name✝ ty✝ val✝ body✝ bi✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
ty₁ : VExpr
ih1 : TrExpr env Us Δ ty✝ ty₁
val₁ : VExpr
ih2 : TrExpr env Us Δ val✝ val₁
hvv : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) val'✝ (VExpr.liftN n val₁ k) ty'✝
w✝¹ : VLevel
h2 : HasType env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.sort w✝¹)
htt : IsDefEq env (List.length Us) (VLCtx.toCtx Δ✝) ty'✝ (VExpr.liftN n ty₁ k) (VExpr.sort w✝¹)
w✝ : VExpr
ih3 : TrExpr env Us ((none, VLocalDecl.vlet ty₁ val₁) :: Δ) body✝ w✝
h1 : HasType env (List.length Us) (VLCtx.toCtx Δ) val₁ ty₁
⊢ ∃ e', TrExpr env Us Δ (Expr.letE name✝ ty✝ val✝ body✝ bi✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | let ⟨_, ih⟩ := ih W hΔ .toConstructor | case lit
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : VExpr
l✝ : Literal
a✝ : TrExpr env Us Δ✝ (Literal.toConstructor l✝) e✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) (Literal.toConstructor l✝) dk →
∃ e', TrExpr env Us Δ (Literal.toConstructor l✝) e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.lit l✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.lit l✝) e' | case lit
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : VExpr
l✝ : Literal
a✝ : TrExpr env Us Δ✝ (Literal.toConstructor l✝) e✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) (Literal.toConstructor l✝) dk →
∃ e', TrExpr env Us Δ (Literal.toConstructor l✝) e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.lit l✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ (Literal.toConstructor l✝) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.lit l✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case lit
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : VExpr
l✝ : Literal
a✝ : TrExpr env Us Δ✝ (Literal.toConstructor l✝) e✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) (Literal.toConstructor l✝) dk →
∃ e', TrExpr env Us Δ (Literal.toConstructor l✝) e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.lit l✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.lit l✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | exact ⟨_, .lit ih⟩ | case lit
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : VExpr
l✝ : Literal
a✝ : TrExpr env Us Δ✝ (Literal.toConstructor l✝) e✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) (Literal.toConstructor l✝) dk →
∃ e', TrExpr env Us Δ (Literal.toConstructor l✝) e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.lit l✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ (Literal.toConstructor l✝) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.lit l✝) e' | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case lit
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : VExpr
l✝ : Literal
a✝ : TrExpr env Us Δ✝ (Literal.toConstructor l✝) e✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) (Literal.toConstructor l✝) dk →
∃ e', TrExpr env Us Δ (Literal.toConstructor l✝) e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.lit l✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ (Literal.toConstructor l✝) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.lit l✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | let ⟨_, ih⟩ := ih W hΔ hs | case mdata
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
d✝ : MData
a✝ : TrExpr env Us Δ✝ e✝ e'✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.mdata d✝ e✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.mdata d✝ e✝) e' | case mdata
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
d✝ : MData
a✝ : TrExpr env Us Δ✝ e✝ e'✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.mdata d✝ e✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.mdata d✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case mdata
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
d✝ : MData
a✝ : TrExpr env Us Δ✝ e✝ e'✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.mdata d✝ e✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.mdata d✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | exact ⟨_, .mdata ih⟩ | case mdata
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
d✝ : MData
a✝ : TrExpr env Us Δ✝ e✝ e'✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.mdata d✝ e✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.mdata d✝ e✝) e' | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case mdata
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
d✝ : MData
a✝ : TrExpr env Us Δ✝ e✝ e'✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.mdata d✝ e✝) dk
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.mdata d✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have hΔ₁ := hΔ.wf | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have hΔ₂ := (hΔ.symm henv).wf | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | let ⟨_, ih⟩ := ih W hΔ hs | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have htt := h1.uniq henv hΔ (ih.weakN henv W hΔ₂) | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝ k)
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have ⟨_, h2⟩ := h2.defeqDFC henv hΔ.defeqCtx htt | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝ k)
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝¹ : VExpr
ih : TrExpr env Us Δ e✝ w✝¹
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝¹ k)
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝¹ k) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2 : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝ : VExpr
ih : TrExpr env Us Δ e✝ w✝
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝ k)
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | have ⟨_, h2⟩ := h2.weakN_inv henv hΔ₂.toCtx W.toCtx | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝¹ : VExpr
ih : TrExpr env Us Δ e✝ w✝¹
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝¹ k)
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝¹ k) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝¹ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝² : VExpr
ih : TrExpr env Us Δ e✝ w✝²
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝² k)
w✝¹ : VExpr
h2✝ : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝² k) w✝¹
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ) s✝ i✝ w✝² w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝¹ : VExpr
ih : TrExpr env Us Δ e✝ w✝¹
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝¹ k)
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝¹ k) w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.TrExpr.weakN_inv | [366, 1] | [439, 27] | exact ⟨_, .proj ih h2⟩ | case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝¹ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝² : VExpr
ih : TrExpr env Us Δ e✝ w✝²
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝² k)
w✝¹ : VExpr
h2✝ : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝² k) w✝¹
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ) s✝ i✝ w✝² w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e' | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case proj
env : VEnv
n : Nat
Δ₁ : VLCtx
Us : List Name
e : Expr
e' : VExpr
henv : Ordered env
Δ✝ : VLCtx
e✝ : Expr
e'✝ : VExpr
s✝ : Name
i✝ : Nat
e''✝ : VExpr
h1 : TrExpr env Us Δ✝ e✝ e'✝
h2✝¹ : TrProj (VLCtx.toCtx Δ✝) s✝ i✝ e'✝ e''✝
ih✝ :
∀ {Δ Δ₂ : VLCtx} {dk k : Nat},
VLCtx.LiftN Δ Δ₂ dk n k →
VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂ →
InScope (fun x => x ∈ VLCtx.fvars Δ) e✝ dk → ∃ e', TrExpr env Us Δ e✝ e'
Δ Δ₂ : VLCtx
dk k : Nat
W : VLCtx.LiftN Δ Δ₂ dk n k
hΔ : VLCtx.IsDefEq env (List.length Us) Δ✝ Δ₂
hs : InScope (fun x => x ∈ VLCtx.fvars Δ) (Expr.proj s✝ i✝ e✝) dk
hΔ₁ : VLCtx.WF env (List.length Us) Δ✝
hΔ₂ : VLCtx.WF env (List.length Us) Δ₂
w✝² : VExpr
ih : TrExpr env Us Δ e✝ w✝²
htt : IsDefEqU env (List.length Us) (VLCtx.toCtx Δ✝) e'✝ (VExpr.liftN n w✝² k)
w✝¹ : VExpr
h2✝ : TrProj (VLCtx.toCtx Δ₂) s✝ i✝ (VExpr.liftN n w✝² k) w✝¹
w✝ : VExpr
h2 : TrProj (VLCtx.toCtx Δ) s✝ i✝ w✝² w✝
⊢ ∃ e', TrExpr env Us Δ (Expr.proj s✝ i✝ e✝) e'
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | refine and_congr (imp_congr (H _ (.head _)) ?_) (congr fun fv h => H _ (.tail _ h)) | P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ IsFVarUpSet P ((some fv, d) :: Δ) ↔ IsFVarUpSet Q ((some fv, d) :: Δ) | P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d ↔
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d | Please generate a tactic in lean4 to solve the state.
STATE:
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ IsFVarUpSet P ((some fv, d) :: Δ) ↔ IsFVarUpSet Q ((some fv, d) :: Δ)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | apply iff_of_eq | P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d ↔
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d | case a
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d =
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d | Please generate a tactic in lean4 to solve the state.
STATE:
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d ↔
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | congr | case a
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d =
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d | case a.e_P
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) = fun i =>
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv | Please generate a tactic in lean4 to solve the state.
STATE:
case a
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) d =
VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv) d
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | funext i | case a.e_P
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) = fun i =>
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv | case a.e_P.h
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
i : Nat
⊢ (∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) =
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv | Please generate a tactic in lean4 to solve the state.
STATE:
case a.e_P
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
⊢ (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) = fun i =>
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | refine forall_congr fun fv => propext ?_ | case a.e_P.h
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
i : Nat
⊢ (∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) =
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv | case a.e_P.h
P Q : FVarId → Prop
fv✝ : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv : FVarId), fv ∈ VLCtx.fvars ((some fv✝, d) :: Δ) → (P fv ↔ Q fv)
i : Nat
fv : FVarId
⊢ VLCtx.vlamName Δ i = some (some fv) → P fv ↔ VLCtx.vlamName Δ i = some (some fv) → Q fv | Please generate a tactic in lean4 to solve the state.
STATE:
case a.e_P.h
P Q : FVarId → Prop
fv : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv_1 : FVarId), fv_1 ∈ VLCtx.fvars ((some fv, d) :: Δ) → (P fv_1 ↔ Q fv_1)
i : Nat
⊢ (∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → P fv) =
∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → Q fv
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.congr | [465, 1] | [472, 80] | exact imp_congr_right fun ha => H _ (.tail _ (VLCtx.vlamName_mem_fvars ha)) | case a.e_P.h
P Q : FVarId → Prop
fv✝ : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv : FVarId), fv ∈ VLCtx.fvars ((some fv✝, d) :: Δ) → (P fv ↔ Q fv)
i : Nat
fv : FVarId
⊢ VLCtx.vlamName Δ i = some (some fv) → P fv ↔ VLCtx.vlamName Δ i = some (some fv) → Q fv | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case a.e_P.h
P Q : FVarId → Prop
fv✝ : FVarId
d : VLocalDecl
Δ : VLCtx
H : ∀ (fv : FVarId), fv ∈ VLCtx.fvars ((some fv✝, d) :: Δ) → (P fv ↔ Q fv)
i : Nat
fv : FVarId
⊢ VLCtx.vlamName Δ i = some (some fv) → P fv ↔ VLCtx.vlamName Δ i = some (some fv) → Q fv
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/Verify/Typing/Lemmas.lean | Lean4Lean.IsFVarUpSet.trivial | [477, 1] | [481, 78] | cases d <;> simp [VLocalDecl.OnVars, VExpr.OnVars] | val✝ : FVarId
d : VLocalDecl
Δ : List (Option FVarId × VLocalDecl)
x✝ : (fun x => True) val✝
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → (fun x => True) fv) d | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
val✝ : FVarId
d : VLocalDecl
Δ : List (Option FVarId × VLocalDecl)
x✝ : (fun x => True) val✝
⊢ VLocalDecl.OnVars (fun i => ∀ (fv : FVarId), VLCtx.vlamName Δ i = some (some fv) → (fun x => True) fv) d
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parentD_set | [34, 1] | [37, 92] | rw [parentD] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ parentD (Array.set arr x v) i = if ↑x = i then v.parent else parentD arr i | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).parent
else i) =
if ↑x = i then v.parent else parentD arr i | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ parentD (Array.set arr x v) i = if ↑x = i then v.parent else parentD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parentD_set | [34, 1] | [37, 92] | simp [Array.get_eq_getElem, parentD] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).parent
else i) =
if ↑x = i then v.parent else parentD arr i | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].parent else i) =
if ↑x = i then v.parent else if h : i < Array.size arr then arr[i].parent else i | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).parent
else i) =
if ↑x = i then v.parent else parentD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parentD_set | [34, 1] | [37, 92] | split <;> [split <;> simp [Array.get_set, *]; split <;> [(subst i; cases ‹¬_› x.2); rfl]] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].parent else i) =
if ↑x = i then v.parent else if h : i < Array.size arr then arr[i].parent else i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].parent else i) =
if ↑x = i then v.parent else if h : i < Array.size arr then arr[i].parent else i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parentD_set | [34, 1] | [37, 92] | subst i | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
h✝¹ : ¬i < Array.size arr
h✝ : ↑x = i
⊢ i = v.parent | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ ↑x = v.parent | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
h✝¹ : ¬i < Array.size arr
h✝ : ↑x = i
⊢ i = v.parent
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parentD_set | [34, 1] | [37, 92] | cases ‹¬_› x.2 | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ ↑x = v.parent | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ ↑x = v.parent
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_set | [39, 1] | [42, 92] | rw [rankD] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ rankD (Array.set arr x v) i = if ↑x = i then v.rank else rankD arr i | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).rank else 0) =
if ↑x = i then v.rank else rankD arr i | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ rankD (Array.set arr x v) i = if ↑x = i then v.rank else rankD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_set | [39, 1] | [42, 92] | simp [Array.get_eq_getElem, rankD] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).rank else 0) =
if ↑x = i then v.rank else rankD arr i | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].rank else 0) =
if ↑x = i then v.rank else if h : i < Array.size arr then arr[i].rank else 0 | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size (Array.set arr x v) then (Array.get (Array.set arr x v) { val := i, isLt := h }).rank else 0) =
if ↑x = i then v.rank else rankD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_set | [39, 1] | [42, 92] | split <;> [split <;> simp [Array.get_set, *]; split <;> [(subst i; cases ‹¬_› x.2); rfl]] | arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].rank else 0) =
if ↑x = i then v.rank else if h : i < Array.size arr then arr[i].rank else 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
⊢ (if h : i < Array.size arr then (Array.set arr x v)[i].rank else 0) =
if ↑x = i then v.rank else if h : i < Array.size arr then arr[i].rank else 0
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_set | [39, 1] | [42, 92] | subst i | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
h✝¹ : ¬i < Array.size arr
h✝ : ↑x = i
⊢ 0 = v.rank | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ 0 = v.rank | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
i : Nat
h✝¹ : ¬i < Array.size arr
h✝ : ↑x = i
⊢ 0 = v.rank
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_set | [39, 1] | [42, 92] | cases ‹¬_› x.2 | case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ 0 = v.rank | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
arr : Array UFNode
x : Fin (Array.size arr)
v : UFNode
h✝ : ¬↑x < Array.size arr
⊢ 0 = v.rank
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent'_lt | [70, 1] | [71, 78] | simp [← parentD_eq, parentD_lt] | self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).parent < size self | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).parent < size self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent_lt | [73, 1] | [74, 49] | simp [parentD] | self : UnionFind
i : Nat
⊢ parent self i < size self ↔ i < size self | self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).parent else i) <
Array.size self.arr ↔
i < Array.size self.arr | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Nat
⊢ parent self i < size self ↔ i < size self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent_lt | [73, 1] | [74, 49] | split <;> simp [*, parent'_lt] | self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).parent else i) <
Array.size self.arr ↔
i < Array.size self.arr | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).parent else i) <
Array.size self.arr ↔
i < Array.size self.arr
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank_lt | [78, 1] | [79, 83] | simpa [rank] using self.rankD_lt | self : UnionFind
i : Nat
⊢ parent self i ≠ i → rank self i < rank self (parent self i) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Nat
⊢ parent self i ≠ i → rank self i < rank self (parent self i)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt | [81, 1] | [82, 99] | simpa [← parentD_eq] using self.rankD_lt | self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).parent ≠ ↑i → rank self ↑i < rank self (Array.get self.arr i).parent | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).parent ≠ ↑i → rank self ↑i < rank self (Array.get self.arr i).parent
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | simp [rankMax, Array.foldr_eq_foldr_data] | self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).rank < rankMax self | self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).rank < List.foldr (fun x => max x.rank) 0 self.arr.data + 1 | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).rank < rankMax self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | exact Nat.lt_succ.2 <| go (self.arr.data.get_mem i.1 i.2) | self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).rank < List.foldr (fun x => max x.rank) 0 self.arr.data + 1 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
⊢ (Array.get self.arr i).rank < List.foldr (fun x => max x.rank) 0 self.arr.data + 1
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | dsimp | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
⊢ a.rank ≤ List.foldr (fun x => max x.rank) 0 (a :: l) | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
⊢ a.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
⊢ a.rank ≤ List.foldr (fun x => max x.rank) 0 (a :: l)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | apply Nat.le_max_left | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
⊢ a.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
⊢ a.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | dsimp | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
a✝ : UFNode
h : List.Mem a✝ l
⊢ a✝.rank ≤ List.foldr (fun x => max x.rank) 0 (a :: l) | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
a✝ : UFNode
h : List.Mem a✝ l
⊢ a✝.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
a✝ : UFNode
h : List.Mem a✝ l
⊢ a✝.rank ≤ List.foldr (fun x => max x.rank) 0 (a :: l)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rank'_lt_rankMax | [86, 1] | [92, 60] | exact Nat.le_trans (go h) (Nat.le_max_right ..) | self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
a✝ : UFNode
h : List.Mem a✝ l
⊢ a✝.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Fin (size self)
a : UFNode
l : List UFNode
a✝ : UFNode
h : List.Mem a✝ l
⊢ a✝.rank ≤ max a.rank (List.foldr (fun x => max x.rank) 0 l)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_lt_rankMax | [94, 1] | [96, 71] | simp [rankD] | self : UnionFind
i : Nat
⊢ rankD self.arr i < rankMax self | self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).rank else 0) < rankMax self | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Nat
⊢ rankD self.arr i < rankMax self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_lt_rankMax | [94, 1] | [96, 71] | split <;> [apply rank'_lt_rankMax; apply Nat.succ_pos] | self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).rank else 0) < rankMax self | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
i : Nat
⊢ (if h : i < Array.size self.arr then (Array.get self.arr { val := i, isLt := h }).rank else 0) < rankMax self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_rankD | [100, 1] | [102, 72] | simp [rankD, Array.get_eq_getElem, Array.get_push] | i : Nat
arr : Array UFNode
⊢ rankD (Array.push arr { parent := Array.size arr, rank := 0 }) i = rankD arr i | i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).rank
else 0) =
if h : i < Array.size arr then arr[i].rank else 0 | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
arr : Array UFNode
⊢ rankD (Array.push arr { parent := Array.size arr, rank := 0 }) i = rankD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_rankD | [100, 1] | [102, 72] | split <;> split <;> first | simp | cases ‹¬_› (Nat.lt_succ_of_lt ‹_›) | i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).rank
else 0) =
if h : i < Array.size arr then arr[i].rank else 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).rank
else 0) =
if h : i < Array.size arr then arr[i].rank else 0
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_rankD | [100, 1] | [102, 72] | simp | case inr.inr
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ 0 = 0 | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inr
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ 0 = 0
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_rankD | [100, 1] | [102, 72] | cases ‹¬_› (Nat.lt_succ_of_lt ‹_›) | case inr.inl
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : i < Array.size arr
⊢ 0 = arr[i].rank | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : i < Array.size arr
⊢ 0 = arr[i].rank
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_parentD | [104, 1] | [108, 39] | simp [parentD, Array.get_eq_getElem, Array.get_push] | i : Nat
arr : Array UFNode
⊢ parentD (Array.push arr { parent := Array.size arr, rank := 0 }) i = parentD arr i | i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).parent
else i) =
if h : i < Array.size arr then arr[i].parent else i | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
arr : Array UFNode
⊢ parentD (Array.push arr { parent := Array.size arr, rank := 0 }) i = parentD arr i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_parentD | [104, 1] | [108, 39] | split <;> split <;> try simp | i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).parent
else i) =
if h : i < Array.size arr then arr[i].parent else i | case inl.inr
i : Nat
arr : Array UFNode
h✝¹ : i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ Array.size arr = i
case inr.inl
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : i < Array.size arr
⊢ i = arr[i].parent | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
arr : Array UFNode
⊢ (if i < Array.size arr + 1 then
(if h : i < Array.size arr then arr[i] else { parent := Array.size arr, rank := 0 }).parent
else i) =
if h : i < Array.size arr then arr[i].parent else i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_parentD | [104, 1] | [108, 39] | simp | case inr.inr
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ i = i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inr
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ i = i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_parentD | [104, 1] | [108, 39] | exact Nat.le_antisymm (Nat.ge_of_not_lt ‹_›) (Nat.le_of_lt_succ ‹_›) | case inl.inr
i : Nat
arr : Array UFNode
h✝¹ : i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ Array.size arr = i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inl.inr
i : Nat
arr : Array UFNode
h✝¹ : i < Array.size arr + 1
h✝ : ¬i < Array.size arr
⊢ Array.size arr = i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.push_parentD | [104, 1] | [108, 39] | cases ‹¬_› (Nat.lt_succ_of_lt ‹_›) | case inr.inl
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : i < Array.size arr
⊢ i = arr[i].parent | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr.inl
i : Nat
arr : Array UFNode
h✝¹ : ¬i < Array.size arr + 1
h✝ : i < Array.size arr
⊢ i = arr[i].parent
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent'_root' | [126, 1] | [131, 42] | rw [root'] | self : UnionFind
x : Fin (size self)
⊢ (Array.get self.arr (root' self x)).parent = ↑(root' self x) | self : UnionFind
x : Fin (size self)
⊢ (Array.get self.arr
(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (Array.get self.arr (root' self x)).parent = ↑(root' self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent'_root' | [126, 1] | [131, 42] | split <;> [assumption; skip] | self : UnionFind
x : Fin (size self)
⊢ (Array.get self.arr
(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (Array.get self.arr
(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent'_root' | [126, 1] | [131, 42] | have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank'_lt _ ‹_›) | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent'_root' | [126, 1] | [131, 42] | apply parent'_root' | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (Array.get self.arr
(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })).parent =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent_root | [136, 1] | [138, 84] | rw [root] | self : UnionFind
x : Nat
⊢ parent self (root self x) = root self x | self : UnionFind
x : Nat
⊢ parent self (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) =
if h : x < size self then ↑(root' self { val := x, isLt := h }) else x | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ parent self (root self x) = root self x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.parent_root | [136, 1] | [138, 84] | split <;> [simp [parentD, parent'_root']; simp [parentD_of_not_lt, *]] | self : UnionFind
x : Nat
⊢ parent self (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) =
if h : x < size self then ↑(root' self { val := x, isLt := h }) else x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ parent self (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) =
if h : x < size self then ↑(root' self { val := x, isLt := h }) else x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | simp [root, parent_lt] | self : UnionFind
x : Nat
⊢ root self (parent self x) = root self x | self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := parent self x, isLt := ⋯ }) else parent self x) =
if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ root self (parent self x) = root self x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | split <;> simp [parentD, parentD_of_not_lt, *] | self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := parent self x, isLt := ⋯ }) else parent self x) =
if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(root' self { val := x, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := parent self x, isLt := ⋯ }) else parent self x) =
if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | (conv => rhs; rw [root']) | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(root' self { val := x, isLt := ⋯ }) | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(if h : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ } then { val := x, isLt := ⋯ }
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(root' self { val := x, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | split | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(if h : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ } then { val := x, isLt := ⋯ }
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) | case inl.inl
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) = ↑{ val := x, isLt := ⋯ }
case inl.inr
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : ¬(Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(if h : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ } then { val := x, isLt := ⋯ }
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | conv => rhs; rw [root'] | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(root' self { val := x, isLt := ⋯ }) | case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(if h : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ } then { val := x, isLt := ⋯ }
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) | Please generate a tactic in lean4 to solve the state.
STATE:
case inl
self : UnionFind
x : Nat
h✝ : x < Array.size self.arr
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(root' self { val := x, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | rw [root', dif_pos] <;> simp [*] | case inl.inl
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) = ↑{ val := x, isLt := ⋯ } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inl.inl
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : (Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) = ↑{ val := x, isLt := ⋯ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_parent | [140, 1] | [144, 9] | simp | case inl.inr
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : ¬(Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inl.inr
self : UnionFind
x : Nat
h✝¹ : x < Array.size self.arr
h✝ : ¬(Array.get self.arr { val := x, isLt := ⋯ }).parent = ↑{ val := x, isLt := ⋯ }
⊢ ↑(root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ }) =
↑(let_fun this := ⋯;
root' self { val := (Array.get self.arr { val := x, isLt := ⋯ }).parent, isLt := ⋯ })
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_lt | [146, 1] | [147, 34] | simp [root] | self : UnionFind
x : Nat
⊢ root self x < size self ↔ x < size self | self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x) < Array.size self.arr ↔
x < Array.size self.arr | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ root self x < size self ↔ x < size self
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_lt | [146, 1] | [147, 34] | split <;> simp [*] | self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x) < Array.size self.arr ↔
x < Array.size self.arr | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ (if h : x < Array.size self.arr then ↑(root' self { val := x, isLt := ⋯ }) else x) < Array.size self.arr ↔
x < Array.size self.arr
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_eq_self | [149, 1] | [151, 90] | refine ⟨fun h => by rw [← h, parent_root], fun h => ?_⟩ | self : UnionFind
x : Nat
⊢ root self x = x ↔ parent self x = x | self : UnionFind
x : Nat
h : parent self x = x
⊢ root self x = x | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ root self x = x ↔ parent self x = x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_eq_self | [149, 1] | [151, 90] | rw [root] | self : UnionFind
x : Nat
h : parent self x = x
⊢ root self x = x | self : UnionFind
x : Nat
h : parent self x = x
⊢ (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) = x | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x = x
⊢ root self x = x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_eq_self | [149, 1] | [151, 90] | split <;> [rw [root', dif_pos (by rwa [parent, parentD_eq' ‹_›] at h)]; rfl] | self : UnionFind
x : Nat
h : parent self x = x
⊢ (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) = x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x = x
⊢ (if h : x < size self then ↑(root' self { val := x, isLt := h }) else x) = x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_eq_self | [149, 1] | [151, 90] | rw [← h, parent_root] | self : UnionFind
x : Nat
h : root self x = x
⊢ parent self x = x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : root self x = x
⊢ parent self x = x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_eq_self | [149, 1] | [151, 90] | rwa [parent, parentD_eq' ‹_›] at h | self : UnionFind
x : Nat
h : parent self x = x
h✝ : x < size self
⊢ (Array.get self.arr { val := x, isLt := h✝ }).parent = ↑{ val := x, isLt := h✝ } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x = x
h✝ : x < size self
⊢ (Array.get self.arr { val := x, isLt := h✝ }).parent = ↑{ val := x, isLt := h✝ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_ext | [156, 1] | [163, 38] | if h : m2.parent x = x then
rw [root_eq_self.2 h, root_eq_self.2 ((H _).trans h)]
else
have := Nat.sub_lt_sub_left (m2.lt_rankMax x) (m2.rank_lt h)
rw [← root_parent, H, root_ext H, root_parent] | m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
⊢ root m1 x = root m2 x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
⊢ root m1 x = root m2 x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_ext | [156, 1] | [163, 38] | rw [root_eq_self.2 h, root_eq_self.2 ((H _).trans h)] | m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : parent m2 x = x
⊢ root m1 x = root m2 x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : parent m2 x = x
⊢ root m1 x = root m2 x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_ext | [156, 1] | [163, 38] | have := Nat.sub_lt_sub_left (m2.lt_rankMax x) (m2.rank_lt h) | m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : ¬parent m2 x = x
⊢ root m1 x = root m2 x | m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : ¬parent m2 x = x
this : rankMax m2 - rank m2 (parent m2 x) < rankMax m2 - rank m2 x
⊢ root m1 x = root m2 x | Please generate a tactic in lean4 to solve the state.
STATE:
m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : ¬parent m2 x = x
⊢ root m1 x = root m2 x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.root_ext | [156, 1] | [163, 38] | rw [← root_parent, H, root_ext H, root_parent] | m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : ¬parent m2 x = x
this : rankMax m2 - rank m2 (parent m2 x) < rankMax m2 - rank m2 x
⊢ root m1 x = root m2 x | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
m1 m2 : UnionFind
H : ∀ (x : Nat), parent m1 x = parent m2 x
x : Nat
h : ¬parent m2 x = x
this : rankMax m2 - rank m2 (parent m2 x) < rankMax m2 - rank m2 x
⊢ root m1 x = root m2 x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.le_rank_root | [165, 1] | [172, 42] | if h : self.parent x = x then
rw [root_eq_self.2 h]
else
have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank_lt h)
rw [← root_parent]
exact Nat.le_trans (Nat.le_of_lt (self.rank_lt h)) le_rank_root | self : UnionFind
x : Nat
⊢ rank self x ≤ rank self (root self x) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ rank self x ≤ rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.le_rank_root | [165, 1] | [172, 42] | rw [root_eq_self.2 h] | self : UnionFind
x : Nat
h : parent self x = x
⊢ rank self x ≤ rank self (root self x) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x = x
⊢ rank self x ≤ rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.le_rank_root | [165, 1] | [172, 42] | have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank_lt h) | self : UnionFind
x : Nat
h : ¬parent self x = x
⊢ rank self x ≤ rank self (root self x) | self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self x) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : ¬parent self x = x
⊢ rank self x ≤ rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.le_rank_root | [165, 1] | [172, 42] | rw [← root_parent] | self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self x) | self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self (parent self x)) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.le_rank_root | [165, 1] | [172, 42] | exact Nat.le_trans (Nat.le_of_lt (self.rank_lt h)) le_rank_root | self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self (parent self x)) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : ¬parent self x = x
this : rankMax self - rank self (parent self x) < rankMax self - rank self x
⊢ rank self x ≤ rank self (root self (parent self x))
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.lt_rank_root | [174, 1] | [178, 57] | refine ⟨fun h h' => Nat.ne_of_lt h (by rw [root_eq_self.2 h']), fun h => ?_⟩ | self : UnionFind
x : Nat
⊢ rank self x < rank self (root self x) ↔ parent self x ≠ x | self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self x) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
⊢ rank self x < rank self (root self x) ↔ parent self x ≠ x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.lt_rank_root | [174, 1] | [178, 57] | rw [← root_parent] | self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self x) | self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self (parent self x)) | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.lt_rank_root | [174, 1] | [178, 57] | exact Nat.lt_of_lt_of_le (self.rank_lt h) le_rank_root | self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self (parent self x)) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : parent self x ≠ x
⊢ rank self x < rank self (root self (parent self x))
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.lt_rank_root | [174, 1] | [178, 57] | rw [root_eq_self.2 h'] | self : UnionFind
x : Nat
h : rank self x < rank self (root self x)
h' : parent self x = x
⊢ rank self x = rank self (root self x) | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Nat
h : rank self x < rank self (root self x)
h' : parent self x = x
⊢ rank self x = rank self (root self x)
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_root | [195, 1] | [200, 42] | rw [findAux, root'] | self : UnionFind
x : Fin (size self)
⊢ (findAux self x).root = root' self x | self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).root =
if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (findAux self x).root = root' self x
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_root | [195, 1] | [200, 42] | simp | self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).root =
if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | self : UnionFind
x : Fin (size self)
⊢ (if (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
{
s :=
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank },
root := (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, size_eq := ⋯ }).root =
if (Array.get self.arr x).parent = ↑x then x else root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).root =
if h : (Array.get self.arr x).parent = ↑x then x
else
let_fun this := ⋯;
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_root | [195, 1] | [200, 42] | split <;> simp | self : UnionFind
x : Fin (size self)
⊢ (if (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
{
s :=
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank },
root := (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, size_eq := ⋯ }).root =
if (Array.get self.arr x).parent = ↑x then x else root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (if (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
{
s :=
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank },
root := (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, size_eq := ⋯ }).root =
if (Array.get self.arr x).parent = ↑x then x else root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_root | [195, 1] | [200, 42] | have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank'_lt _ ‹_›) | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_root | [195, 1] | [200, 42] | exact findAux_root | case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
case inr
self : UnionFind
x : Fin (size self)
h✝ : ¬(Array.get self.arr x).parent = ↑x
this : rankMax self - rank self (Array.get self.arr x).parent < rankMax self - rank self ↑x
⊢ (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root =
root' self { val := (Array.get self.arr x).parent, isLt := ⋯ }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_s | [202, 1] | [208, 82] | rw [show self.root _ = (self.findAux ⟨_, self.parent'_lt x⟩).root from _] | self : UnionFind
x : Fin (size self)
⊢ (findAux self x).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := root self ↑x, rank := s.rank } | self : UnionFind
x : Fin (size self)
⊢ (findAux self x).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank }
self : UnionFind
x : Fin (size self)
⊢ root self ↑x = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (findAux self x).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := root self ↑x, rank := s.rank }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_s | [202, 1] | [208, 82] | rw [findAux] | self : UnionFind
x : Fin (size self)
⊢ (findAux self x).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank } | self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank } | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (findAux self x).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_s | [202, 1] | [208, 82] | split <;> rfl | self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank } | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ (if h : (Array.get self.arr x).parent = ↑x then { s := self.arr, root := x, size_eq := ⋯ }
else
let_fun this := ⋯;
match findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ } with
| { s := arr₁, root := root, size_eq := H } =>
{ s := Array.modify arr₁ ↑x fun s => { parent := ↑root, rank := s.rank }, root := root, size_eq := ⋯ }).s =
if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root, rank := s.rank }
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_s | [202, 1] | [208, 82] | rw [← root_parent, parent, parentD_eq] | self : UnionFind
x : Fin (size self)
⊢ root self ↑x = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root | self : UnionFind
x : Fin (size self)
⊢ root self (Array.get self.arr x).parent = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ root self ↑x = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.findAux_s | [202, 1] | [208, 82] | simp [findAux_root, root, parent'_lt] | self : UnionFind
x : Fin (size self)
⊢ root self (Array.get self.arr x).parent = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
self : UnionFind
x : Fin (size self)
⊢ root self (Array.get self.arr x).parent = ↑(findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).root
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_findAux | [210, 1] | [220, 42] | if h : i < self.size then
rw [findAux_s]; split <;> [rfl; skip]
have := Nat.sub_lt_sub_left (self.lt_rankMax x) (self.rank'_lt _ ‹_›)
have := lt_of_parentD (by rwa [parentD_eq])
rw [rankD_eq' (by simp [FindAux.size_eq, h]), Array.get_modify (by rwa [FindAux.size_eq])]
split <;> simp [← rankD_eq, rankD_findAux (x := ⟨_, self.parent'_lt x⟩)]
else
simp [rank, rankD]; rw [dif_neg (by rwa [FindAux.size_eq]), dif_neg h] | i : Nat
self : UnionFind
x : Fin (size self)
⊢ rankD (findAux self x).s i = rank self i | no goals | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
self : UnionFind
x : Fin (size self)
⊢ rankD (findAux self x).s i = rank self i
TACTIC:
|
https://github.com/digama0/lean4lean.git | c534f13d8d25f5e1891b6d18cc76b601ee87aa66 | Lean4Lean/UnionFind.lean | Lean4Lean.UnionFind.rankD_findAux | [210, 1] | [220, 42] | rw [findAux_s] | i : Nat
self : UnionFind
x : Fin (size self)
h : i < size self
⊢ rankD (findAux self x).s i = rank self i | i : Nat
self : UnionFind
x : Fin (size self)
h : i < size self
⊢ rankD
(if (Array.get self.arr x).parent = ↑x then self.arr
else
Array.modify (findAux self { val := (Array.get self.arr x).parent, isLt := ⋯ }).s ↑x fun s =>
{ parent := root self ↑x, rank := s.rank })
i =
rank self i | Please generate a tactic in lean4 to solve the state.
STATE:
i : Nat
self : UnionFind
x : Fin (size self)
h : i < size self
⊢ rankD (findAux self x).s i = rank self i
TACTIC:
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.