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/Theory/VExpr.lean
Lean4Lean.VExpr.sizeOf_liftN
[90, 1]
[93, 64]
induction e generalizing k with simp [liftN, Nat.add_assoc, Nat.add_le_add_iff_left] | bvar => simp [liftVar]; split <;> simp [Nat.le_add_left] | _ => rename_i ih1 ih2; exact Nat.add_le_add (ih1 _) (ih2 _)
n : Nat e : VExpr k : Nat ⊢ sizeOf e ≤ sizeOf (liftN n e k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e : VExpr k : Nat ⊢ sizeOf e ≤ sizeOf (liftN n e k) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.sizeOf_liftN
[90, 1]
[93, 64]
simp [liftVar]
case bvar n deBruijnIndex✝ k : Nat ⊢ deBruijnIndex✝ ≤ liftVar n deBruijnIndex✝ k
case bvar n deBruijnIndex✝ k : Nat ⊢ deBruijnIndex✝ ≤ if deBruijnIndex✝ < k then deBruijnIndex✝ else n + deBruijnIndex✝
Please generate a tactic in lean4 to solve the state. STATE: case bvar n deBruijnIndex✝ k : Nat ⊢ deBruijnIndex✝ ≤ liftVar n deBruijnIndex✝ k TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.sizeOf_liftN
[90, 1]
[93, 64]
split <;> simp [Nat.le_add_left]
case bvar n deBruijnIndex✝ k : Nat ⊢ deBruijnIndex✝ ≤ if deBruijnIndex✝ < k then deBruijnIndex✝ else n + deBruijnIndex✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar n deBruijnIndex✝ k : Nat ⊢ deBruijnIndex✝ ≤ if deBruijnIndex✝ < k then deBruijnIndex✝ else n + deBruijnIndex✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.sizeOf_liftN
[90, 1]
[93, 64]
rename_i ih1 ih2
case forallE n : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (k : Nat), sizeOf binderType✝ ≤ sizeOf (liftN n binderType✝ k) body_ih✝ : ∀ (k : Nat), sizeOf body✝ ≤ sizeOf (liftN n body✝ k) k : Nat ⊢ sizeOf binderType✝ + sizeOf body✝ ≤ sizeOf (liftN n binderType✝ k) + sizeOf (liftN n body✝ (k + 1))
case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ (k : Nat), sizeOf binderType✝ ≤ sizeOf (liftN n binderType✝ k) ih2 : ∀ (k : Nat), sizeOf body✝ ≤ sizeOf (liftN n body✝ k) k : Nat ⊢ sizeOf binderType✝ + sizeOf body✝ ≤ sizeOf (liftN n binderType✝ k) + sizeOf (liftN n body✝ (k + 1))
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (k : Nat), sizeOf binderType✝ ≤ sizeOf (liftN n binderType✝ k) body_ih✝ : ∀ (k : Nat), sizeOf body✝ ≤ sizeOf (liftN n body✝ k) k : Nat ⊢ sizeOf binderType✝ + sizeOf body✝ ≤ sizeOf (liftN n binderType✝ k) + sizeOf (liftN n body✝ (k + 1)) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.sizeOf_liftN
[90, 1]
[93, 64]
exact Nat.add_le_add (ih1 _) (ih2 _)
case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ (k : Nat), sizeOf binderType✝ ≤ sizeOf (liftN n binderType✝ k) ih2 : ∀ (k : Nat), sizeOf body✝ ≤ sizeOf (liftN n body✝ k) k : Nat ⊢ sizeOf binderType✝ + sizeOf body✝ ≤ sizeOf (liftN n binderType✝ k) + sizeOf (liftN n body✝ (k + 1))
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ (k : Nat), sizeOf binderType✝ ≤ sizeOf (liftN n binderType✝ k) ih2 : ∀ (k : Nat), sizeOf body✝ ≤ sizeOf (liftN n body✝ k) k : Nat ⊢ sizeOf binderType✝ + sizeOf body✝ ≤ sizeOf (liftN n binderType✝ k) + sizeOf (liftN n body✝ (k + 1)) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.mono
[109, 1]
[114, 58]
induction e generalizing k k' with (simp [ClosedN] at self ⊢; try simp [self, *]) | bvar i => exact Nat.lt_of_lt_of_le self h | app _ _ ih1 ih2 => exact ⟨ih1 h self.1, ih2 h self.2⟩ | lam _ _ ih1 ih2 | forallE _ _ ih1 ih2 => exact ⟨ih1 h self.1, ih2 (Nat.succ_le_succ h) self.2⟩
k k' : Nat e : VExpr h : k ≤ k' self : ClosedN e k ⊢ ClosedN e k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: k k' : Nat e : VExpr h : k ≤ k' self : ClosedN e k ⊢ ClosedN e k' TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.mono
[109, 1]
[114, 58]
simp [ClosedN] at self ⊢
case const declName✝ : Name us✝ : List VLevel k k' : Nat h : k ≤ k' self : ClosedN (const declName✝ us✝) k ⊢ ClosedN (const declName✝ us✝) k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: case const declName✝ : Name us✝ : List VLevel k k' : Nat h : k ≤ k' self : ClosedN (const declName✝ us✝) k ⊢ ClosedN (const declName✝ us✝) k' TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.mono
[109, 1]
[114, 58]
exact Nat.lt_of_lt_of_le self h
case bvar i k k' : Nat h : k ≤ k' self : i < k ⊢ i < k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar i k k' : Nat h : k ≤ k' self : i < k ⊢ i < k' TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.mono
[109, 1]
[114, 58]
exact ⟨ih1 h self.1, ih2 h self.2⟩
case app fn✝ arg✝ : VExpr ih1 : ∀ {k k' : Nat}, k ≤ k' → ClosedN fn✝ k → ClosedN fn✝ k' ih2 : ∀ {k k' : Nat}, k ≤ k' → ClosedN arg✝ k → ClosedN arg✝ k' k k' : Nat h : k ≤ k' self : ClosedN fn✝ k ∧ ClosedN arg✝ k ⊢ ClosedN fn✝ k' ∧ ClosedN arg✝ k'
no goals
Please generate a tactic in lean4 to solve the state. STATE: case app fn✝ arg✝ : VExpr ih1 : ∀ {k k' : Nat}, k ≤ k' → ClosedN fn✝ k → ClosedN fn✝ k' ih2 : ∀ {k k' : Nat}, k ≤ k' → ClosedN arg✝ k → ClosedN arg✝ k' k k' : Nat h : k ≤ k' self : ClosedN fn✝ k ∧ ClosedN arg✝ k ⊢ ClosedN fn✝ k' ∧ ClosedN arg✝ k' TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.mono
[109, 1]
[114, 58]
exact ⟨ih1 h self.1, ih2 (Nat.succ_le_succ h) self.2⟩
case forallE binderType✝ body✝ : VExpr ih1 : ∀ {k k' : Nat}, k ≤ k' → ClosedN binderType✝ k → ClosedN binderType✝ k' ih2 : ∀ {k k' : Nat}, k ≤ k' → ClosedN body✝ k → ClosedN body✝ k' k k' : Nat h : k ≤ k' self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) ⊢ ClosedN binderType✝ k' ∧ ClosedN body✝ (k' + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE binderType✝ body✝ : VExpr ih1 : ∀ {k k' : Nat}, k ≤ k' → ClosedN binderType✝ k → ClosedN binderType✝ k' ih2 : ∀ {k k' : Nat}, k ≤ k' → ClosedN body✝ k → ClosedN body✝ k' k k' : Nat h : k ≤ k' self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) ⊢ ClosedN binderType✝ k' ∧ ClosedN body✝ (k' + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
induction e generalizing k j with (simp [ClosedN] at self; simp [self, liftN, *]) | bvar i => exact liftVar_lt (Nat.lt_of_lt_of_le self h) | app _ _ ih1 ih2 => exact ⟨ih1 self.1 h, ih2 self.2 h⟩ | lam _ _ ih1 ih2 | forallE _ _ ih1 ih2 => exact ⟨ih1 self.1 h, ih2 self.2 (Nat.succ_le_succ h)⟩
e : VExpr k j n : Nat self : ClosedN e k h : k ≤ j ⊢ liftN n e j = e
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr k j n : Nat self : ClosedN e k h : k ≤ j ⊢ liftN n e j = e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
simp [ClosedN] at self
case const n : Nat declName✝ : Name us✝ : List VLevel k j : Nat self : ClosedN (const declName✝ us✝) k h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
case const n : Nat declName✝ : Name us✝ : List VLevel k j : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
Please generate a tactic in lean4 to solve the state. STATE: case const n : Nat declName✝ : Name us✝ : List VLevel k j : Nat self : ClosedN (const declName✝ us✝) k h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
simp [self, liftN, *]
case const n : Nat declName✝ : Name us✝ : List VLevel k j : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case const n : Nat declName✝ : Name us✝ : List VLevel k j : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
exact liftVar_lt (Nat.lt_of_lt_of_le self h)
case bvar n i k j : Nat self : i < k h : k ≤ j ⊢ liftVar n i j = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar n i k j : Nat self : i < k h : k ≤ j ⊢ liftVar n i j = i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
exact ⟨ih1 self.1 h, ih2 self.2 h⟩
case app n : Nat fn✝ arg✝ : VExpr ih1 : ∀ {k j : Nat}, ClosedN fn✝ k → k ≤ j → liftN n fn✝ j = fn✝ ih2 : ∀ {k j : Nat}, ClosedN arg✝ k → k ≤ j → liftN n arg✝ j = arg✝ k j : Nat self : ClosedN fn✝ k ∧ ClosedN arg✝ k h : k ≤ j ⊢ liftN n fn✝ j = fn✝ ∧ liftN n arg✝ j = arg✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case app n : Nat fn✝ arg✝ : VExpr ih1 : ∀ {k j : Nat}, ClosedN fn✝ k → k ≤ j → liftN n fn✝ j = fn✝ ih2 : ∀ {k j : Nat}, ClosedN arg✝ k → k ≤ j → liftN n arg✝ j = arg✝ k j : Nat self : ClosedN fn✝ k ∧ ClosedN arg✝ k h : k ≤ j ⊢ liftN n fn✝ j = fn✝ ∧ liftN n arg✝ j = arg✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq
[116, 1]
[122, 58]
exact ⟨ih1 self.1 h, ih2 self.2 (Nat.succ_le_succ h)⟩
case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ {k j : Nat}, ClosedN binderType✝ k → k ≤ j → liftN n binderType✝ j = binderType✝ ih2 : ∀ {k j : Nat}, ClosedN body✝ k → k ≤ j → liftN n body✝ j = body✝ k j : Nat self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) h : k ≤ j ⊢ liftN n binderType✝ j = binderType✝ ∧ liftN n body✝ (j + 1) = body✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ {k j : Nat}, ClosedN binderType✝ k → k ≤ j → liftN n binderType✝ j = binderType✝ ih2 : ∀ {k j : Nat}, ClosedN body✝ k → k ≤ j → liftN n body✝ j = body✝ k j : Nat self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) h : k ≤ j ⊢ liftN n binderType✝ j = binderType✝ ∧ liftN n body✝ (j + 1) = body✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN
[126, 11]
[130, 82]
induction e generalizing k j with (simp [ClosedN] at self; simp [self, VExpr.liftN, ClosedN, *]) | bvar i => exact liftVar_lt_add self | lam _ _ _ ih2 | forallE _ _ _ ih2 => exact Nat.add_right_comm .. ▸ ih2 self.2
e : VExpr k n j : Nat self : ClosedN e k ⊢ ClosedN (liftN n e j) (k + n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr k n j : Nat self : ClosedN e k ⊢ ClosedN (liftN n e j) (k + n) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN
[126, 11]
[130, 82]
simp [ClosedN] at self
case app n : Nat fn✝ arg✝ : VExpr fn_ih✝ : ∀ {k j : Nat}, ClosedN fn✝ k → ClosedN (liftN n fn✝ j) (k + n) arg_ih✝ : ∀ {k j : Nat}, ClosedN arg✝ k → ClosedN (liftN n arg✝ j) (k + n) k j : Nat self : ClosedN (app fn✝ arg✝) k ⊢ ClosedN (liftN n (app fn✝ arg✝) j) (k + n)
case app n : Nat fn✝ arg✝ : VExpr fn_ih✝ : ∀ {k j : Nat}, ClosedN fn✝ k → ClosedN (liftN n fn✝ j) (k + n) arg_ih✝ : ∀ {k j : Nat}, ClosedN arg✝ k → ClosedN (liftN n arg✝ j) (k + n) k j : Nat self : ClosedN fn✝ k ∧ ClosedN arg✝ k ⊢ ClosedN (liftN n (app fn✝ arg✝) j) (k + n)
Please generate a tactic in lean4 to solve the state. STATE: case app n : Nat fn✝ arg✝ : VExpr fn_ih✝ : ∀ {k j : Nat}, ClosedN fn✝ k → ClosedN (liftN n fn✝ j) (k + n) arg_ih✝ : ∀ {k j : Nat}, ClosedN arg✝ k → ClosedN (liftN n arg✝ j) (k + n) k j : Nat self : ClosedN (app fn✝ arg✝) k ⊢ ClosedN (liftN n (app fn✝ arg✝) j) (k + n) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN
[126, 11]
[130, 82]
simp [self, VExpr.liftN, ClosedN, *]
case app n : Nat fn✝ arg✝ : VExpr fn_ih✝ : ∀ {k j : Nat}, ClosedN fn✝ k → ClosedN (liftN n fn✝ j) (k + n) arg_ih✝ : ∀ {k j : Nat}, ClosedN arg✝ k → ClosedN (liftN n arg✝ j) (k + n) k j : Nat self : ClosedN fn✝ k ∧ ClosedN arg✝ k ⊢ ClosedN (liftN n (app fn✝ arg✝) j) (k + n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case app n : Nat fn✝ arg✝ : VExpr fn_ih✝ : ∀ {k j : Nat}, ClosedN fn✝ k → ClosedN (liftN n fn✝ j) (k + n) arg_ih✝ : ∀ {k j : Nat}, ClosedN arg✝ k → ClosedN (liftN n arg✝ j) (k + n) k j : Nat self : ClosedN fn✝ k ∧ ClosedN arg✝ k ⊢ ClosedN (liftN n (app fn✝ arg✝) j) (k + n) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN
[126, 11]
[130, 82]
exact liftVar_lt_add self
case bvar n i k j : Nat self : i < k ⊢ liftVar n i j < k + n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar n i k j : Nat self : i < k ⊢ liftVar n i j < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN
[126, 11]
[130, 82]
exact Nat.add_right_comm .. ▸ ih2 self.2
case forallE n : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ {k j : Nat}, ClosedN binderType✝ k → ClosedN (liftN n binderType✝ j) (k + n) ih2 : ∀ {k j : Nat}, ClosedN body✝ k → ClosedN (liftN n body✝ j) (k + n) k j : Nat self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) ⊢ ClosedN (liftN n body✝ (j + 1)) (k + n + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ {k j : Nat}, ClosedN binderType✝ k → ClosedN (liftN n binderType✝ j) (k + n) ih2 : ∀ {k j : Nat}, ClosedN body✝ k → ClosedN (liftN n body✝ j) (k + n) k j : Nat self : ClosedN binderType✝ k ∧ ClosedN body✝ (k + 1) ⊢ ClosedN (liftN n body✝ (j + 1)) (k + n + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
induction e generalizing k j with (simp [ClosedN] at self; simp [self, liftN, *]) | bvar i => refine liftVar_lt (Nat.lt_of_lt_of_le ?_ h) unfold liftVar at self; split at self <;> [exact self; exact Nat.lt_of_le_of_lt (Nat.le_add_left ..) self] | app _ _ ih1 ih2 => exact ⟨ih1 self.1 h, ih2 self.2 h⟩ | lam _ _ ih1 ih2 | forallE _ _ ih1 ih2 => exact ⟨ih1 self.1 h, ih2 self.2 (Nat.succ_le_succ h)⟩
n : Nat e : VExpr j k : Nat self : ClosedN (liftN n e j) k h : k ≤ j ⊢ liftN n e j = e
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e : VExpr j k : Nat self : ClosedN (liftN n e j) k h : k ≤ j ⊢ liftN n e j = e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
simp [ClosedN] at self
case const n : Nat declName✝ : Name us✝ : List VLevel j k : Nat self : ClosedN (liftN n (const declName✝ us✝) j) k h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
case const n : Nat declName✝ : Name us✝ : List VLevel j k : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
Please generate a tactic in lean4 to solve the state. STATE: case const n : Nat declName✝ : Name us✝ : List VLevel j k : Nat self : ClosedN (liftN n (const declName✝ us✝) j) k h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
simp [self, liftN, *]
case const n : Nat declName✝ : Name us✝ : List VLevel j k : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case const n : Nat declName✝ : Name us✝ : List VLevel j k : Nat self : True h : k ≤ j ⊢ liftN n (const declName✝ us✝) j = const declName✝ us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
refine liftVar_lt (Nat.lt_of_lt_of_le ?_ h)
case bvar n i j k : Nat self : liftVar n i j < k h : k ≤ j ⊢ liftVar n i j = i
case bvar n i j k : Nat self : liftVar n i j < k h : k ≤ j ⊢ i < k
Please generate a tactic in lean4 to solve the state. STATE: case bvar n i j k : Nat self : liftVar n i j < k h : k ≤ j ⊢ liftVar n i j = i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
unfold liftVar at self
case bvar n i j k : Nat self : liftVar n i j < k h : k ≤ j ⊢ i < k
case bvar n i j k : Nat self : (if i < j then i else n + i) < k h : k ≤ j ⊢ i < k
Please generate a tactic in lean4 to solve the state. STATE: case bvar n i j k : Nat self : liftVar n i j < k h : k ≤ j ⊢ i < k TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
split at self <;> [exact self; exact Nat.lt_of_le_of_lt (Nat.le_add_left ..) self]
case bvar n i j k : Nat self : (if i < j then i else n + i) < k h : k ≤ j ⊢ i < k
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar n i j k : Nat self : (if i < j then i else n + i) < k h : k ≤ j ⊢ i < k TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
exact ⟨ih1 self.1 h, ih2 self.2 h⟩
case app n : Nat fn✝ arg✝ : VExpr ih1 : ∀ {j k : Nat}, ClosedN (liftN n fn✝ j) k → k ≤ j → liftN n fn✝ j = fn✝ ih2 : ∀ {j k : Nat}, ClosedN (liftN n arg✝ j) k → k ≤ j → liftN n arg✝ j = arg✝ j k : Nat self : ClosedN (liftN n fn✝ j) k ∧ ClosedN (liftN n arg✝ j) k h : k ≤ j ⊢ liftN n fn✝ j = fn✝ ∧ liftN n arg✝ j = arg✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case app n : Nat fn✝ arg✝ : VExpr ih1 : ∀ {j k : Nat}, ClosedN (liftN n fn✝ j) k → k ≤ j → liftN n fn✝ j = fn✝ ih2 : ∀ {j k : Nat}, ClosedN (liftN n arg✝ j) k → k ≤ j → liftN n arg✝ j = arg✝ j k : Nat self : ClosedN (liftN n fn✝ j) k ∧ ClosedN (liftN n arg✝ j) k h : k ≤ j ⊢ liftN n fn✝ j = fn✝ ∧ liftN n arg✝ j = arg✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.ClosedN.liftN_eq_rev
[132, 1]
[141, 58]
exact ⟨ih1 self.1 h, ih2 self.2 (Nat.succ_le_succ h)⟩
case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ {j k : Nat}, ClosedN (liftN n binderType✝ j) k → k ≤ j → liftN n binderType✝ j = binderType✝ ih2 : ∀ {j k : Nat}, ClosedN (liftN n body✝ j) k → k ≤ j → liftN n body✝ j = body✝ j k : Nat self : ClosedN (liftN n binderType✝ j) k ∧ ClosedN (liftN n body✝ (j + 1)) (k + 1) h : k ≤ j ⊢ liftN n binderType✝ j = binderType✝ ∧ liftN n body✝ (j + 1) = body✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat binderType✝ body✝ : VExpr ih1 : ∀ {j k : Nat}, ClosedN (liftN n binderType✝ j) k → k ≤ j → liftN n binderType✝ j = binderType✝ ih2 : ∀ {j k : Nat}, ClosedN (liftN n body✝ j) k → k ≤ j → liftN n body✝ j = body✝ j k : Nat self : ClosedN (liftN n binderType✝ j) k ∧ ClosedN (liftN n body✝ (j + 1)) (k + 1) h : k ≤ j ⊢ liftN n binderType✝ j = binderType✝ ∧ liftN n body✝ (j + 1) = body✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instL_liftN
[162, 9]
[163, 47]
cases e <;> simp [liftN, instL, instL_liftN]
n : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (liftN n e k) = liftN n (instL ls e) k
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (liftN n e k) = liftN n (instL ls e) k TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instL_instL
[165, 1]
[166, 77]
cases e <;> simp [instL, instL_instL, Function.comp_def, VLevel.inst_inst]
ls ls' : List VLevel e : VExpr ⊢ instL ls' (instL ls e) = instL (List.map (VLevel.inst ls') ls) e
no goals
Please generate a tactic in lean4 to solve the state. STATE: ls ls' : List VLevel e : VExpr ⊢ instL ls' (instL ls e) = instL (List.map (VLevel.inst ls') ls) e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.LevelWF.instL_id
[174, 1]
[177, 74]
induction e <;> simp_all [instL, LevelWF, VLevel.inst_id]
U : Nat e : VExpr h : LevelWF U e ⊢ instL (List.map VLevel.param (List.range U)) e = e
case const U : Nat declName✝ : Name us✝ : List VLevel h : ∀ (l : VLevel), l ∈ us✝ → VLevel.WF U l ⊢ List.map (VLevel.inst (List.map VLevel.param (List.range U))) us✝ = us✝
Please generate a tactic in lean4 to solve the state. STATE: U : Nat e : VExpr h : LevelWF U e ⊢ instL (List.map VLevel.param (List.range U)) e = e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.LevelWF.instL_id
[174, 1]
[177, 74]
case const => exact List.map_id'' _ fun _ h1 => VLevel.inst_id (h _ h1)
U : Nat declName✝ : Name us✝ : List VLevel h : ∀ (l : VLevel), l ∈ us✝ → VLevel.WF U l ⊢ List.map (VLevel.inst (List.map VLevel.param (List.range U))) us✝ = us✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: U : Nat declName✝ : Name us✝ : List VLevel h : ∀ (l : VLevel), l ∈ us✝ → VLevel.WF U l ⊢ List.map (VLevel.inst (List.map VLevel.param (List.range U))) us✝ = us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.LevelWF.instL_id
[174, 1]
[177, 74]
exact List.map_id'' _ fun _ h1 => VLevel.inst_id (h _ h1)
U : Nat declName✝ : Name us✝ : List VLevel h : ∀ (l : VLevel), l ∈ us✝ → VLevel.WF U l ⊢ List.map (VLevel.inst (List.map VLevel.param (List.range U))) us✝ = us✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: U : Nat declName✝ : Name us✝ : List VLevel h : ∀ (l : VLevel), l ∈ us✝ → VLevel.WF U l ⊢ List.map (VLevel.inst (List.map VLevel.param (List.range U))) us✝ = us✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.levelWF_liftN
[179, 1]
[180, 58]
induction e generalizing k <;> simp [liftN, LevelWF, *]
n : Nat e : VExpr k U : Nat ⊢ LevelWF U (liftN n e k) ↔ LevelWF U e
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e : VExpr k U : Nat ⊢ LevelWF U (liftN n e k) ↔ LevelWF U e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.LevelWF.instL
[182, 1]
[183, 61]
induction e <;> simp [instL, VLevel.WF.inst h, LevelWF, *]
ls : List VLevel e : VExpr U : Nat h : ∀ (l : VLevel), l ∈ ls → VLevel.WF U l ⊢ LevelWF U (VExpr.instL ls e)
no goals
Please generate a tactic in lean4 to solve the state. STATE: ls : List VLevel e : VExpr U : Nat h : ∀ (l : VLevel), l ∈ ls → VLevel.WF U l ⊢ LevelWF U (VExpr.instL ls e) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_lower
[192, 9]
[192, 81]
simp [instVar]
e : VExpr k : Nat ⊢ instVar 0 e (k + 1) = bvar 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr k : Nat ⊢ instVar 0 e (k + 1) = bvar 0 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
simp [instVar, Nat.succ_lt_succ_iff]
i : Nat e : VExpr k : Nat ⊢ instVar (i + 1) e (k + 1) = lift (instVar i e k)
i : Nat e : VExpr k : Nat ⊢ (if i < k then bvar (i + 1) else if i = k then liftN (k + 1) e else bvar i) = lift (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1))
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e : VExpr k : Nat ⊢ instVar (i + 1) e (k + 1) = lift (instVar i e k) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
split <;> simp [lift, liftN]
i : Nat e : VExpr k : Nat ⊢ (if i < k then bvar (i + 1) else if i = k then liftN (k + 1) e else bvar i) = lift (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1))
case inr i : Nat e : VExpr k : Nat h✝ : ¬i < k ⊢ (if i = k then liftN (k + 1) e else bvar i) = liftN 1 (if i = k then liftN k e else bvar (i - 1))
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e : VExpr k : Nat ⊢ (if i < k then bvar (i + 1) else if i = k then liftN (k + 1) e else bvar i) = lift (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1)) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
split <;> simp [liftN_liftN, liftN]
case inr i : Nat e : VExpr k : Nat h✝ : ¬i < k ⊢ (if i = k then liftN (k + 1) e else bvar i) = liftN 1 (if i = k then liftN k e else bvar (i - 1))
case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k ⊢ i = i - 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: case inr i : Nat e : VExpr k : Nat h✝ : ¬i < k ⊢ (if i = k then liftN (k + 1) e else bvar i) = liftN 1 (if i = k then liftN k e else bvar (i - 1)) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
have := Nat.lt_of_le_of_ne (Nat.not_lt.1 ‹_›) (Ne.symm ‹_›)
case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k ⊢ i = i - 1 + 1
case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k this : k < i ⊢ i = i - 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k ⊢ i = i - 1 + 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
let i+1 := i
case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k this : k < i ⊢ i = i - 1 + 1
case inr.inr i✝ : Nat e : VExpr k i : Nat h✝¹ : ¬i + 1 < k h✝ : ¬i + 1 = k this : k < i + 1 ⊢ i + 1 = i + 1 - 1 + 1
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i : Nat e : VExpr k : Nat h✝¹ : ¬i < k h✝ : ¬i = k this : k < i ⊢ i = i - 1 + 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instVar_succ
[193, 9]
[197, 20]
rfl
case inr.inr i✝ : Nat e : VExpr k i : Nat h✝¹ : ¬i + 1 < k h✝ : ¬i + 1 = k this : k < i + 1 ⊢ i + 1 = i + 1 - 1 + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ : Nat e : VExpr k i : Nat h✝¹ : ¬i + 1 < k h✝ : ¬i + 1 = k this : k < i + 1 ⊢ i + 1 = i + 1 - 1 + 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
simp [instVar]
i n : Nat e : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (instVar i e j) k = instVar (liftVar n i k) e (n + j)
i n : Nat e : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
Please generate a tactic in lean4 to solve the state. STATE: i n : Nat e : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (instVar i e j) k = instVar (liftVar n i k) e (n + j) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
split <;> rename_i h
i n : Nat e : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) case inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j ⊢ liftN n (if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
Please generate a tactic in lean4 to solve the state. STATE: i n : Nat e : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
split <;> rename_i h'
case inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j ⊢ liftN n (if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inr.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : i = j ⊢ liftN n (liftN j e) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j ⊢ liftN n (if i = j then liftN j e else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [if_pos]
case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = bvar (liftVar n i k) case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftVar n i k < n + j
Please generate a tactic in lean4 to solve the state. STATE: case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
simp only [liftN, liftVar]
case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftVar n i k < n + j
case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ (if i < k then i else n + i) < n + j
Please generate a tactic in lean4 to solve the state. STATE: case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftVar n i k < n + j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
split <;> rename_i hk
case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ (if i < k then i else n + i) < n + j
case inl.hc.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : i < k ⊢ i < n + j case inl.hc.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : ¬i < k ⊢ n + i < n + j
Please generate a tactic in lean4 to solve the state. STATE: case inl.hc i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ (if i < k then i else n + i) < n + j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rfl
case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = bvar (liftVar n i k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j ⊢ liftN n (bvar i) k = bvar (liftVar n i k) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
exact Nat.lt_add_left _ h
case inl.hc.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : i < k ⊢ i < n + j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.hc.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : i < k ⊢ i < n + j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
exact Nat.add_lt_add_left h _
case inl.hc.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : ¬i < k ⊢ n + i < n + j
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl.hc.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : i < j hk : ¬i < k ⊢ n + i < n + j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
subst i
case inr.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : i = j ⊢ liftN n (liftN j e) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inr.inl n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬j < j ⊢ liftN n (liftN j e) k = if liftVar n j k < n + j then bvar (liftVar n j k) else if liftVar n j k = n + j then liftN (n + j) e else bvar (liftVar n j k - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : i = j ⊢ liftN n (liftN j e) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [liftN'_liftN' (h1 := Nat.zero_le _) (h2 := hj), liftVar_le hj, if_neg (by simp), if_pos rfl, Nat.add_comm]
case inr.inl n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬j < j ⊢ liftN n (liftN j e) k = if liftVar n j k < n + j then bvar (liftVar n j k) else if liftVar n j k = n + j then liftN (n + j) e else bvar (liftVar n j k - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬j < j ⊢ liftN n (liftN j e) k = if liftVar n j k < n + j then bvar (liftVar n j k) else if liftVar n j k = n + j then liftN (n + j) e else bvar (liftVar n j k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
simp
n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬j < j ⊢ ¬n + j < n + j
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬j < j ⊢ ¬n + j < n + j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [Nat.not_lt] at h
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [liftVar_le (Nat.le_trans hj h)]
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1)
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
have hk := Nat.lt_of_le_of_ne h (Ne.symm h')
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1)
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
let i+1 := i
case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1)
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i n : Nat e : VExpr j k : Nat hj : k ≤ j h : j ≤ i h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) k = if n + i < n + j then bvar (n + i) else if n + i = n + j then liftN (n + j) e else bvar (n + i - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
have := Nat.add_lt_add_left hk n
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1)
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [if_neg (Nat.lt_asymm this), if_neg (Nat.ne_of_gt this)]
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1)
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = if n + (i + 1) < n + j then bvar (n + (i + 1)) else if n + (i + 1) = n + j then liftN (n + j) e else bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
simp only [liftN]
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = bvar (n + (i + 1) - 1)
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (liftVar n (i + 1 - 1) k) = bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ liftN n (bvar (i + 1 - 1)) k = bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rw [liftVar_le (Nat.le_trans hj <| by exact Nat.le_of_lt_succ hk)]
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (liftVar n (i + 1 - 1) k) = bvar (n + (i + 1) - 1)
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (n + (i + 1 - 1)) = bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (liftVar n (i + 1 - 1) k) = bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
rfl
case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (n + (i + 1 - 1)) = bvar (n + (i + 1) - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ bvar (n + (i + 1 - 1)) = bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_lo
[199, 1]
[216, 76]
exact Nat.le_of_lt_succ hk
i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ j ≤ i + 1 - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: i✝ n : Nat e : VExpr j k : Nat hj : k ≤ j i : Nat h : j ≤ i + 1 h' : ¬i + 1 = j hk : j < i + 1 this : n + j < n + (i + 1) ⊢ j ≤ i + 1 - 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [instVar]
i : Nat e2 : VExpr n k j : Nat ⊢ liftN n (instVar i e2 j) (k + j) = instVar (liftVar n i (k + j + 1)) (liftN n e2 k) j
i : Nat e2 : VExpr n k j : Nat ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e2 : VExpr n k j : Nat ⊢ liftN n (instVar i e2 j) (k + j) = instVar (liftVar n i (k + j + 1)) (liftN n e2 k) j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
split <;> rename_i h
i : Nat e2 : VExpr n k j : Nat ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inl i : Nat e2 : VExpr n k j : Nat h : i < j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) case inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j ⊢ liftN n (if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e2 : VExpr n k j : Nat ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
split <;> rename_i h'
case inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j ⊢ liftN n (if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inr.inl i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : i = j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j ⊢ liftN n (if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
have := Nat.lt_add_left k h
case inl i : Nat e2 : VExpr n k j : Nat h : i < j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inl i : Nat e2 : VExpr n k j : Nat h : i < j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
rw [liftVar_lt <| Nat.lt_succ_of_lt this, if_pos h]
case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar i
Please generate a tactic in lean4 to solve the state. STATE: case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [liftN, liftVar_lt this]
case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl i : Nat e2 : VExpr n k j : Nat h : i < j this : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
subst i
case inr.inl i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : i = j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : i = j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
have := Nat.le_add_left j k
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1)
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl e2 : VExpr n k j : Nat h : ¬j < j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [liftVar_lt (by exact Nat.lt_succ_of_le this)]
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1)
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = liftN j (liftN n e2 k)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = if liftVar n j (k + j + 1) < j then bvar (liftVar n j (k + j + 1)) else if liftVar n j (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n j (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
rw [liftN'_comm (h := Nat.zero_le _), Nat.add_comm]
case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = liftN j (liftN n e2 k)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inl e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ liftN n (liftN j e2) (k + j) = liftN j (liftN n e2 k) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
exact Nat.lt_succ_of_le this
e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ ?m.56873 < ?m.56874
no goals
Please generate a tactic in lean4 to solve the state. STATE: e2 : VExpr n k j : Nat h : ¬j < j this : j ≤ k + j ⊢ ?m.56873 < ?m.56874 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
have hk := Nat.lt_of_le_of_ne (Nat.not_lt.1 h) (Ne.symm h')
case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
let i+1 := i
case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) (k + j) = if liftVar n (i + 1) (k + j + 1) < j then bvar (liftVar n (i + 1) (k + j + 1)) else if liftVar n (i + 1) (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n (i + 1) (k + j + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i : Nat e2 : VExpr n k j : Nat h : ¬i < j h' : ¬i = j hk : j < i ⊢ liftN n (bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [liftVar, h, Nat.succ_lt_succ_iff]
case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) (k + j) = if liftVar n (i + 1) (k + j + 1) < j then bvar (liftVar n (i + 1) (k + j + 1)) else if liftVar n (i + 1) (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n (i + 1) (k + j + 1) - 1)
case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar i) (k + j) = if (if i < k + j then i + 1 else n + (i + 1)) < j then bvar (if i < k + j then i + 1 else n + (i + 1)) else if (if i < k + j then i + 1 else n + (i + 1)) = j then liftN j (liftN n e2 k) else bvar ((if i < k + j then i + 1 else n + (i + 1)) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar (i + 1 - 1)) (k + j) = if liftVar n (i + 1) (k + j + 1) < j then bvar (liftVar n (i + 1) (k + j + 1)) else if liftVar n (i + 1) (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n (i + 1) (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
split <;> rename_i hi
case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar i) (k + j) = if (if i < k + j then i + 1 else n + (i + 1)) < j then bvar (if i < k + j then i + 1 else n + (i + 1)) else if (if i < k + j then i + 1 else n + (i + 1)) = j then liftN j (liftN n e2 k) else bvar ((if i < k + j then i + 1 else n + (i + 1)) - 1)
case inr.inr.inl i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar (i + 1 - 1) case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 ⊢ liftN n (bvar i) (k + j) = if (if i < k + j then i + 1 else n + (i + 1)) < j then bvar (if i < k + j then i + 1 else n + (i + 1)) else if (if i < k + j then i + 1 else n + (i + 1)) = j then liftN j (liftN n e2 k) else bvar ((if i < k + j then i + 1 else n + (i + 1)) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [liftN, liftVar_lt hi]
case inr.inr.inl i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar (i + 1 - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inl i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : i < k + j ⊢ liftN n (bvar i) (k + j) = bvar (i + 1 - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
have := Nat.lt_add_left n hk
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1)
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
rw [if_neg (Nat.lt_asymm this), if_neg (Nat.ne_of_gt this)]
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1)
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = bvar (n + (i + 1) - 1)
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = if n + (i + 1) < j then bvar (n + (i + 1)) else if n + (i + 1) = j then liftN j (liftN n e2 k) else bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
simp [liftN]
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = bvar (n + (i + 1) - 1)
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftVar n i (k + j) = n + (i + 1) - 1
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftN n (bvar i) (k + j) = bvar (n + (i + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
rw [liftVar_le (Nat.not_lt.1 hi)]
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftVar n i (k + j) = n + (i + 1) - 1
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ n + i = n + (i + 1) - 1
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ liftVar n i (k + j) = n + (i + 1) - 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instVar_hi
[218, 1]
[235, 59]
rfl
case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ n + i = n + (i + 1) - 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr.inr.inr i✝ : Nat e2 : VExpr n k j i : Nat h : ¬i + 1 < j h' : ¬i + 1 = j hk : j < i + 1 hi : ¬i < k + j this : j < n + (i + 1) ⊢ n + i = n + (i + 1) - 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instL_instVar
[237, 9]
[238, 72]
simp [instVar]
i : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (instVar i e k) = instVar i (instL ls e) k
i : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1)) = if i < k then bvar i else if i = k then liftN k (instL ls e) else bvar (i - 1)
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (instVar i e k) = instVar i (instL ls e) k TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.instL_instVar
[237, 9]
[238, 72]
split <;> [skip; split] <;> simp [instL, instL_liftN]
i : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1)) = if i < k then bvar i else if i = k then liftN k (instL ls e) else bvar (i - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: i : Nat e : VExpr k : Nat ls : List VLevel ⊢ instL ls (if i < k then bvar i else if i = k then liftN k e else bvar (i - 1)) = if i < k then bvar i else if i = k then liftN k (instL ls e) else bvar (i - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_lo
[250, 1]
[255, 13]
induction e1 generalizing k j with simp [liftN, inst, instVar, Nat.add_le_add_iff_right, *] | bvar i => apply liftN_instVar_lo (hj := hj) | _ => rfl
n : Nat e1 e2 : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (inst e1 e2 j) k = inst (liftN n e1 k) e2 (n + j)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat e1 e2 : VExpr j k : Nat hj : k ≤ j ⊢ liftN n (inst e1 e2 j) k = inst (liftN n e1 k) e2 (n + j) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_lo
[250, 1]
[255, 13]
apply liftN_instVar_lo (hj := hj)
case bvar n : Nat e2 : VExpr i j k : Nat hj : k ≤ j ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e2 else bvar (liftVar n i k - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar n : Nat e2 : VExpr i j k : Nat hj : k ≤ j ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) k = if liftVar n i k < n + j then bvar (liftVar n i k) else if liftVar n i k = n + j then liftN (n + j) e2 else bvar (liftVar n i k - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_lo
[250, 1]
[255, 13]
rfl
case forallE n : Nat e2 binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j k : Nat), k ≤ j → liftN n (inst binderType✝ e2 j) k = inst (liftN n binderType✝ k) e2 (n + j) body_ih✝ : ∀ (j k : Nat), k ≤ j → liftN n (inst body✝ e2 j) k = inst (liftN n body✝ k) e2 (n + j) j k : Nat hj : k ≤ j ⊢ inst (liftN n body✝ (k + 1)) e2 (n + (j + 1)) = inst (liftN n body✝ (k + 1)) e2 (n + j + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n : Nat e2 binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j k : Nat), k ≤ j → liftN n (inst binderType✝ e2 j) k = inst (liftN n binderType✝ k) e2 (n + j) body_ih✝ : ∀ (j k : Nat), k ≤ j → liftN n (inst body✝ e2 j) k = inst (liftN n body✝ k) e2 (n + j) j k : Nat hj : k ≤ j ⊢ inst (liftN n body✝ (k + 1)) e2 (n + (j + 1)) = inst (liftN n body✝ (k + 1)) e2 (n + j + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_hi
[257, 1]
[261, 31]
induction e1 generalizing j with simp [liftN, inst, instVar, *] | bvar i => apply liftN_instVar_hi | _ => rename_i IH; apply IH
e1 e2 : VExpr n k j : Nat ⊢ liftN n (inst e1 e2 j) (k + j) = inst (liftN n e1 (k + j + 1)) (liftN n e2 k) j
no goals
Please generate a tactic in lean4 to solve the state. STATE: e1 e2 : VExpr n k j : Nat ⊢ liftN n (inst e1 e2 j) (k + j) = inst (liftN n e1 (k + j + 1)) (liftN n e2 k) j TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_hi
[257, 1]
[261, 31]
apply liftN_instVar_hi
case bvar e2 : VExpr n k i j : Nat ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar e2 : VExpr n k i j : Nat ⊢ liftN n (if i < j then bvar i else if i = j then liftN j e2 else bvar (i - 1)) (k + j) = if liftVar n i (k + j + 1) < j then bvar (liftVar n i (k + j + 1)) else if liftVar n i (k + j + 1) = j then liftN j (liftN n e2 k) else bvar (liftVar n i (k + j + 1) - 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_hi
[257, 1]
[261, 31]
rename_i IH
case forallE e2 : VExpr n k : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j : Nat), liftN n (inst binderType✝ e2 j) (k + j) = inst (liftN n binderType✝ (k + j + 1)) (liftN n e2 k) j body_ih✝ : ∀ (j : Nat), liftN n (inst body✝ e2 j) (k + j) = inst (liftN n body✝ (k + j + 1)) (liftN n e2 k) j j : Nat ⊢ liftN n (inst body✝ e2 (j + 1)) (k + j + 1) = inst (liftN n body✝ (k + j + 1 + 1)) (liftN n e2 k) (j + 1)
case forallE e2 : VExpr n k : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j : Nat), liftN n (inst binderType✝ e2 j) (k + j) = inst (liftN n binderType✝ (k + j + 1)) (liftN n e2 k) j IH : ∀ (j : Nat), liftN n (inst body✝ e2 j) (k + j) = inst (liftN n body✝ (k + j + 1)) (liftN n e2 k) j j : Nat ⊢ liftN n (inst body✝ e2 (j + 1)) (k + j + 1) = inst (liftN n body✝ (k + j + 1 + 1)) (liftN n e2 k) (j + 1)
Please generate a tactic in lean4 to solve the state. STATE: case forallE e2 : VExpr n k : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j : Nat), liftN n (inst binderType✝ e2 j) (k + j) = inst (liftN n binderType✝ (k + j + 1)) (liftN n e2 k) j body_ih✝ : ∀ (j : Nat), liftN n (inst body✝ e2 j) (k + j) = inst (liftN n body✝ (k + j + 1)) (liftN n e2 k) j j : Nat ⊢ liftN n (inst body✝ e2 (j + 1)) (k + j + 1) = inst (liftN n body✝ (k + j + 1 + 1)) (liftN n e2 k) (j + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_instN_hi
[257, 1]
[261, 31]
apply IH
case forallE e2 : VExpr n k : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j : Nat), liftN n (inst binderType✝ e2 j) (k + j) = inst (liftN n binderType✝ (k + j + 1)) (liftN n e2 k) j IH : ∀ (j : Nat), liftN n (inst body✝ e2 j) (k + j) = inst (liftN n body✝ (k + j + 1)) (liftN n e2 k) j j : Nat ⊢ liftN n (inst body✝ e2 (j + 1)) (k + j + 1) = inst (liftN n body✝ (k + j + 1 + 1)) (liftN n e2 k) (j + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE e2 : VExpr n k : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ (j : Nat), liftN n (inst binderType✝ e2 j) (k + j) = inst (liftN n binderType✝ (k + j + 1)) (liftN n e2 k) j IH : ∀ (j : Nat), liftN n (inst body✝ e2 j) (k + j) = inst (liftN n body✝ (k + j + 1)) (liftN n e2 k) j j : Nat ⊢ liftN n (inst body✝ e2 (j + 1)) (k + j + 1) = inst (liftN n body✝ (k + j + 1 + 1)) (liftN n e2 k) (j + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.inst_liftN
[272, 1]
[277, 66]
induction e1 generalizing k with simp [liftN, inst, *] | bvar i => simp only [liftVar, instVar, Nat.add_comm 1]; split <;> [rfl; rename_i h] rw [if_neg (mt (Nat.lt_of_le_of_lt (Nat.le_succ _)) h), if_neg (mt (by rintro rfl; apply Nat.lt_succ_self) h)]; rfl
k : Nat e1 e2 : VExpr ⊢ inst (liftN 1 e1 k) e2 k = e1
no goals
Please generate a tactic in lean4 to solve the state. STATE: k : Nat e1 e2 : VExpr ⊢ inst (liftN 1 e1 k) e2 k = e1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.inst_liftN
[272, 1]
[277, 66]
simp only [liftVar, instVar, Nat.add_comm 1]
case bvar e2 : VExpr i k : Nat ⊢ instVar (liftVar 1 i k) e2 k = bvar i
case bvar e2 : VExpr i k : Nat ⊢ (if (if i < k then i else i + 1) < k then bvar (if i < k then i else i + 1) else if (if i < k then i else i + 1) = k then liftN k e2 else bvar ((if i < k then i else i + 1) - 1)) = bvar i
Please generate a tactic in lean4 to solve the state. STATE: case bvar e2 : VExpr i k : Nat ⊢ instVar (liftVar 1 i k) e2 k = bvar i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.inst_liftN
[272, 1]
[277, 66]
split <;> [rfl; rename_i h]
case bvar e2 : VExpr i k : Nat ⊢ (if (if i < k then i else i + 1) < k then bvar (if i < k then i else i + 1) else if (if i < k then i else i + 1) = k then liftN k e2 else bvar ((if i < k then i else i + 1) - 1)) = bvar i
case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ (if i + 1 < k then bvar (i + 1) else if i + 1 = k then liftN k e2 else bvar (i + 1 - 1)) = bvar i
Please generate a tactic in lean4 to solve the state. STATE: case bvar e2 : VExpr i k : Nat ⊢ (if (if i < k then i else i + 1) < k then bvar (if i < k then i else i + 1) else if (if i < k then i else i + 1) = k then liftN k e2 else bvar ((if i < k then i else i + 1) - 1)) = bvar i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.inst_liftN
[272, 1]
[277, 66]
rw [if_neg (mt (Nat.lt_of_le_of_lt (Nat.le_succ _)) h), if_neg (mt (by rintro rfl; apply Nat.lt_succ_self) h)]
case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ (if i + 1 < k then bvar (i + 1) else if i + 1 = k then liftN k e2 else bvar (i + 1 - 1)) = bvar i
case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ bvar (i + 1 - 1) = bvar i
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ (if i + 1 < k then bvar (i + 1) else if i + 1 = k then liftN k e2 else bvar (i + 1 - 1)) = bvar i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.inst_liftN
[272, 1]
[277, 66]
rfl
case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ bvar (i + 1 - 1) = bvar i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inr e2 : VExpr i k : Nat h : ¬i < k ⊢ bvar (i + 1 - 1) = bvar i TACTIC: