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/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
apply decide_eq_true
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true ⊢ decide (∀ (i : Fin n), p i) = true
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true ⊢ ∀ (i : Fin n), p i
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true ⊢ decide (∀ (i : Fin n), p i) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
intro i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true ⊢ ∀ (i : Fin n), p i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ p i
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true ⊢ ∀ (i : Fin n), p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
apply of_decide_eq_true
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ p i
case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ decide (p i) = true
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
exact h i
case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ decide (p i) = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = true h : ∀ (i : Fin n), decide (p i) = true i : Fin n ⊢ decide (p i) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
match exists_eq_false_of_all_eq_false h with | ⟨i, hi⟩ => have hi := of_decide_eq_false hi apply decide_eq_false intro h apply hi exact h i
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false ⊢ decide (∀ (i : Fin n), p i) = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false ⊢ decide (∀ (i : Fin n), p i) = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
have hi := of_decide_eq_false hi
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi : decide (p i) = false ⊢ decide (∀ (i : Fin n), p i) = false
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ decide (∀ (i : Fin n), p i) = false
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi : decide (p i) = false ⊢ decide (∀ (i : Fin n), p i) = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
apply decide_eq_false
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ decide (∀ (i : Fin n), p i) = false
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ ¬∀ (i : Fin n), p i
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ decide (∀ (i : Fin n), p i) = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
intro h
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ ¬∀ (i : Fin n), p i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i ⊢ ¬∀ (i : Fin n), p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
apply hi
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ False
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ p i
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_forall_eq_all
[43, 1]
[58, 16]
exact h i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ p i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∀ (i : Fin n), p i) h✝ : (Fin.all fun i => decide (p i)) = false i : Fin n hi✝ : decide (p i) = false hi : ¬p i h : ∀ (i : Fin n), p i ⊢ p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.any_zero
[63, 9]
[63, 85]
simp [Fin.any]
p : Fin 0 → Bool ⊢ Fin.any p = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: p : Fin 0 → Bool ⊢ Fin.any p = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.any_succ
[65, 1]
[66, 33]
simp [Fin.any, Fin.foldr_succ]
n : Nat p : Fin (n + 1) → Bool ⊢ Fin.any p = (p 0 || Fin.any (p ∘ succ))
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool ⊢ Fin.any p = (p 0 || Fin.any (p ∘ succ)) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
simp at h
x✝ : Fin 0 → Bool h : Fin.any x✝ = true ⊢ ∃ i, x✝ i = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: x✝ : Fin 0 → Bool h : Fin.any x✝ = true ⊢ ∃ i, x✝ i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
rw [Fin.any, Fin.foldr_succ, Bool.or_eq_true] at h
n : Nat p : Fin (n + 1) → Bool h : Fin.any p = true ⊢ ∃ i, p i = true
n : Nat p : Fin (n + 1) → Bool h : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true ⊢ ∃ i, p i = true
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : Fin.any p = true ⊢ ∃ i, p i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
match h with | .inl h => exists ⟨0, Nat.zero_lt_succ n⟩ | .inr h => match exists_eq_true_of_any_eq_true h with | ⟨⟨i,hi⟩,hp⟩ => exists ⟨i+1, Nat.succ_lt_succ hi⟩
n : Nat p : Fin (n + 1) → Bool h : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true ⊢ ∃ i, p i = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true ⊢ ∃ i, p i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
exists ⟨0, Nat.zero_lt_succ n⟩
n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : p 0 = true ⊢ ∃ i, p i = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : p 0 = true ⊢ ∃ i, p i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
match exists_eq_true_of_any_eq_true h with | ⟨⟨i,hi⟩,hp⟩ => exists ⟨i+1, Nat.succ_lt_succ hi⟩
n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : foldr n (fun i v => p i.succ || v) false = true ⊢ ∃ i, p i = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : foldr n (fun i v => p i.succ || v) false = true ⊢ ∃ i, p i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.exists_eq_true_of_any_eq_true
[68, 1]
[75, 55]
exists ⟨i+1, Nat.succ_lt_succ hi⟩
n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : foldr n (fun i v => p i.succ || v) false = true i : Nat hi : i < n hp : p ⟨i, hi⟩.succ = true ⊢ ∃ i, p i = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h✝ : p 0 = true ∨ foldr n (fun i v => p i.succ || v) false = true h : foldr n (fun i v => p i.succ || v) false = true i : Nat hi : i < n hp : p ⟨i, hi⟩.succ = true ⊢ ∃ i, p i = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.forall_eq_false_of_any_eq_false
[77, 1]
[83, 79]
rw [Fin.any, Fin.foldr_succ, Bool.or_eq_false_iff] at h
n : Nat p : Fin (n + 1) → Bool h : Fin.any p = false isLt✝ : 0 < n + 1 ⊢ p ⟨0, isLt✝⟩ = false
n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false isLt✝ : 0 < n + 1 ⊢ p ⟨0, isLt✝⟩ = false
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : Fin.any p = false isLt✝ : 0 < n + 1 ⊢ p ⟨0, isLt✝⟩ = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.forall_eq_false_of_any_eq_false
[77, 1]
[83, 79]
exact h.left
n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false isLt✝ : 0 < n + 1 ⊢ p ⟨0, isLt✝⟩ = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false isLt✝ : 0 < n + 1 ⊢ p ⟨0, isLt✝⟩ = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.forall_eq_false_of_any_eq_false
[77, 1]
[83, 79]
rw [Fin.any, Fin.foldr_succ, Bool.or_eq_false_iff] at h
n : Nat p : Fin (n + 1) → Bool h : Fin.any p = false i : Nat hi : i + 1 < n + 1 ⊢ p ⟨i + 1, hi⟩ = false
n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false i : Nat hi : i + 1 < n + 1 ⊢ p ⟨i + 1, hi⟩ = false
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : Fin.any p = false i : Nat hi : i + 1 < n + 1 ⊢ p ⟨i + 1, hi⟩ = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.forall_eq_false_of_any_eq_false
[77, 1]
[83, 79]
exact forall_eq_false_of_any_eq_false h.right ⟨i, Nat.lt_of_succ_lt_succ hi⟩
n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false i : Nat hi : i + 1 < n + 1 ⊢ p ⟨i + 1, hi⟩ = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin (n + 1) → Bool h : p 0 = false ∧ foldr n (fun i v => p i.succ || v) false = false i : Nat hi : i + 1 < n + 1 ⊢ p ⟨i + 1, hi⟩ = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
match h : Fin.any fun i => decide (p i) with | true => match exists_eq_true_of_any_eq_true h with | ⟨i, hi⟩ => have hi := of_decide_eq_true hi apply decide_eq_true exists i | false => have h := forall_eq_false_of_any_eq_false h apply decide_eq_false intro ⟨i, hi⟩ absurd hi apply of_decide_eq_false exact h i
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) ⊢ decide (∃ i, p i) = Fin.any fun i => decide (p i)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) ⊢ decide (∃ i, p i) = Fin.any fun i => decide (p i) TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
match exists_eq_true_of_any_eq_true h with | ⟨i, hi⟩ => have hi := of_decide_eq_true hi apply decide_eq_true exists i
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true ⊢ decide (∃ i, p i) = true
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true ⊢ decide (∃ i, p i) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
have hi := of_decide_eq_true hi
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi : decide (p i) = true ⊢ decide (∃ i, p i) = true
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ decide (∃ i, p i) = true
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi : decide (p i) = true ⊢ decide (∃ i, p i) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
apply decide_eq_true
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ decide (∃ i, p i) = true
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ ∃ i, p i
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ decide (∃ i, p i) = true TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
exists i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ ∃ i, p i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = true i : Fin n hi✝ : decide (p i) = true hi : p i ⊢ ∃ i, p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
have h := forall_eq_false_of_any_eq_false h
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = false ⊢ decide (∃ i, p i) = false
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ decide (∃ i, p i) = false
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h : (Fin.any fun i => decide (p i)) = false ⊢ decide (∃ i, p i) = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
apply decide_eq_false
n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ decide (∃ i, p i) = false
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ ¬∃ i, p i
Please generate a tactic in lean4 to solve the state. STATE: n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ decide (∃ i, p i) = false TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
intro ⟨i, hi⟩
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ ¬∃ i, p i
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ False
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false ⊢ ¬∃ i, p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
absurd hi
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ False
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ ¬p i
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ False TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
apply of_decide_eq_false
case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ ¬p i
case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ decide (p i) = false
Please generate a tactic in lean4 to solve the state. STATE: case a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ ¬p i TACTIC:
https://github.com/fgdorais/extra4.git
eb1c6c30f5790bed1bb4b01534d271a2490d9730
Extra/Fin.lean
Fin.decide_exists_eq_any
[96, 1]
[110, 14]
exact h i
case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ decide (p i) = false
no goals
Please generate a tactic in lean4 to solve the state. STATE: case a.a n : Nat p : Fin n → Prop inst✝¹ : DecidablePred p inst✝ : Decidable (∃ i, p i) h✝ : (Fin.any fun i => decide (p i)) = false h : ∀ (i : Fin n), decide (p i) = false i : Fin n hi : p i ⊢ decide (p i) = false TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/Typing/Meta.lean
Lean4Lean.VEnv.with_addConst
[6, 1]
[14, 84]
let ⟨env1, h1, henv1⟩ := Option.bind_eq_some.1 H
n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' ⊢ P
n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ P
Please generate a tactic in lean4 to solve the state. STATE: n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' ⊢ P TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/Typing/Meta.lean
Lean4Lean.VEnv.with_addConst
[6, 1]
[14, 84]
refine IH (.const henv (by rintro _ ⟨⟩; exact hci hcis) h1) (hcis.const h1) henv1
n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ P
no goals
Please generate a tactic in lean4 to solve the state. STATE: n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ P TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/Typing/Meta.lean
Lean4Lean.VEnv.with_addConst
[6, 1]
[14, 84]
rintro _ ⟨⟩
n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ ∀ (ci_1 : VConstant), some ci = some ci_1 → VConstant.WF env ci_1
case refl n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ VConstant.WF env ci
Please generate a tactic in lean4 to solve the state. STATE: n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ ∀ (ci_1 : VConstant), some ci = some ci_1 → VConstant.WF env ci_1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/Typing/Meta.lean
Lean4Lean.VEnv.with_addConst
[6, 1]
[14, 84]
exact hci hcis
case refl n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ VConstant.WF env ci
no goals
Please generate a tactic in lean4 to solve the state. STATE: case refl n : Name ci : VConstant f : VEnv → Option VEnv P : Prop env env' : VEnv cis : List VObject henv : Ordered env hci : HasObjects env cis → VConstant.WF env ci IH : ∀ {env1 : VEnv}, Ordered env1 → HasObjects env1 (VObject.const n (some ci) :: cis) → f env1 = some env' → P hcis : HasObjects env cis H : addConst env n (some ci) >>= f = some env' env1 : VEnv h1 : addConst env n (some ci) = some env1 henv1 : f env1 = some env' ⊢ VConstant.WF env ci TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Nat.le_iff_exists_add'
[11, 11]
[12, 45]
simp [Nat.add_comm, Nat.le_iff_exists_add]
a b : Nat ⊢ a ≤ b ↔ ∃ c, b = c + a
no goals
Please generate a tactic in lean4 to solve the state. STATE: a b : Nat ⊢ a ≤ b ↔ ∃ c, b = c + a TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.rfl
[14, 11]
[18, 55]
induction l with | nil => constructor | cons _ _ ih => simp at h; exact .cons h.1 (ih h.2)
α : Type u_1 R : α → α → Prop l : List α h : ∀ (a : α), a ∈ l → R a a ⊢ Forall₂ R l l
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 R : α → α → Prop l : List α h : ∀ (a : α), a ∈ l → R a a ⊢ Forall₂ R l l TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.rfl
[14, 11]
[18, 55]
constructor
case nil α : Type u_1 R : α → α → Prop h : ∀ (a : α), a ∈ [] → R a a ⊢ Forall₂ R [] []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 R : α → α → Prop h : ∀ (a : α), a ∈ [] → R a a ⊢ Forall₂ R [] [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.rfl
[14, 11]
[18, 55]
simp at h
case cons α : Type u_1 R : α → α → Prop head✝ : α tail✝ : List α ih : (∀ (a : α), a ∈ tail✝ → R a a) → Forall₂ R tail✝ tail✝ h : ∀ (a : α), a ∈ head✝ :: tail✝ → R a a ⊢ Forall₂ R (head✝ :: tail✝) (head✝ :: tail✝)
case cons α : Type u_1 R : α → α → Prop head✝ : α tail✝ : List α ih : (∀ (a : α), a ∈ tail✝ → R a a) → Forall₂ R tail✝ tail✝ h : R head✝ head✝ ∧ ∀ (a : α), a ∈ tail✝ → R a a ⊢ Forall₂ R (head✝ :: tail✝) (head✝ :: tail✝)
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 R : α → α → Prop head✝ : α tail✝ : List α ih : (∀ (a : α), a ∈ tail✝ → R a a) → Forall₂ R tail✝ tail✝ h : ∀ (a : α), a ∈ head✝ :: tail✝ → R a a ⊢ Forall₂ R (head✝ :: tail✝) (head✝ :: tail✝) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.rfl
[14, 11]
[18, 55]
exact .cons h.1 (ih h.2)
case cons α : Type u_1 R : α → α → Prop head✝ : α tail✝ : List α ih : (∀ (a : α), a ∈ tail✝ → R a a) → Forall₂ R tail✝ tail✝ h : R head✝ head✝ ∧ ∀ (a : α), a ∈ tail✝ → R a a ⊢ Forall₂ R (head✝ :: tail✝) (head✝ :: tail✝)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 R : α → α → Prop head✝ : α tail✝ : List α ih : (∀ (a : α), a ∈ tail✝ → R a a) → Forall₂ R tail✝ tail✝ h : R head✝ head✝ ∧ ∀ (a : α), a ∈ tail✝ → R a a ⊢ Forall₂ R (head✝ :: tail✝) (head✝ :: tail✝) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_left_iff
[20, 9]
[21, 63]
cases H
α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l : List α✝ H : Forall₂ R [] l ⊢ l = []
case nil α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ [] = []
Please generate a tactic in lean4 to solve the state. STATE: α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l : List α✝ H : Forall₂ R [] l ⊢ l = [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_left_iff
[20, 9]
[21, 63]
rfl
case nil α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ [] = [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_left_iff
[20, 9]
[21, 63]
rintro rfl
α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l : List α✝ ⊢ l = [] → Forall₂ R [] l
α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ Forall₂ R [] []
Please generate a tactic in lean4 to solve the state. STATE: α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l : List α✝ ⊢ l = [] → Forall₂ R [] l TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_left_iff
[20, 9]
[21, 63]
exact Forall₂.nil
α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ Forall₂ R [] []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop ⊢ Forall₂ R [] [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_right_iff
[23, 9]
[24, 63]
cases H
α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop l : List α✝ H : Forall₂ R l [] ⊢ l = []
case nil α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ [] = []
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop l : List α✝ H : Forall₂ R l [] ⊢ l = [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_right_iff
[23, 9]
[24, 63]
rfl
case nil α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ [] = [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_right_iff
[23, 9]
[24, 63]
rintro rfl
α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop l : List α✝ ⊢ l = [] → Forall₂ R l []
α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ Forall₂ R [] []
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop l : List α✝ ⊢ l = [] → Forall₂ R l [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_nil_right_iff
[23, 9]
[24, 63]
exact Forall₂.nil
α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ Forall₂ R [] []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 β✝ : Type u_2 R : α✝ → β✝ → Prop ⊢ Forall₂ R [] [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.imp
[38, 1]
[40, 70]
induction h <;> constructor <;> [(apply H; assumption); assumption]
α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ h : Forall₂ R l₁ l₂ ⊢ Forall₂ S l₁ l₂
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ h : Forall₂ R l₁ l₂ ⊢ Forall₂ S l₁ l₂ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.imp
[38, 1]
[40, 70]
apply H
case cons.a α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ a_ih✝ : Forall₂ S l₁✝ l₂✝ ⊢ S a✝² b✝
case cons.a.a α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ a_ih✝ : Forall₂ S l₁✝ l₂✝ ⊢ R a✝² b✝
Please generate a tactic in lean4 to solve the state. STATE: case cons.a α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ a_ih✝ : Forall₂ S l₁✝ l₂✝ ⊢ S a✝² b✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.imp
[38, 1]
[40, 70]
assumption
case cons.a.a α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ a_ih✝ : Forall₂ S l₁✝ l₂✝ ⊢ R a✝² b✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.a.a α✝¹ : Type u_1 α✝ : Type u_2 R S : α✝¹ → α✝ → Prop H : ∀ (a : α✝¹) (b : α✝), R a b → S a b l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ a_ih✝ : Forall₂ S l₁✝ l₂✝ ⊢ R a✝² b✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_map_left_iff
[42, 9]
[45, 81]
simp only [map, forall₂_nil_left_iff]
γ : Type u_1 α : Type u_2 α✝ : Type u_3 R : α → α✝ → Prop f : γ → α x✝ : List α✝ ⊢ Forall₂ R (map f []) x✝ ↔ Forall₂ (fun c b => R (f c) b) [] x✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: γ : Type u_1 α : Type u_2 α✝ : Type u_3 R : α → α✝ → Prop f : γ → α x✝ : List α✝ ⊢ Forall₂ R (map f []) x✝ ↔ Forall₂ (fun c b => R (f c) b) [] x✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_map_left_iff
[42, 9]
[45, 81]
simp only [map, forall₂_cons_left_iff, forall₂_map_left_iff]
γ : Type u_1 α : Type u_2 α✝ : Type u_3 R : α → α✝ → Prop f : γ → α a : γ l : List γ x✝ : List α✝ ⊢ Forall₂ R (map f (a :: l)) x✝ ↔ Forall₂ (fun c b => R (f c) b) (a :: l) x✝
no goals
Please generate a tactic in lean4 to solve the state. STATE: γ : Type u_1 α : Type u_2 α✝ : Type u_3 R : α → α✝ → Prop f : γ → α a : γ l : List γ x✝ : List α✝ ⊢ Forall₂ R (map f (a :: l)) x✝ ↔ Forall₂ (fun c b => R (f c) b) (a :: l) x✝ TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_map_right_iff
[47, 9]
[50, 83]
simp only [map, forall₂_nil_right_iff]
γ : Type u_1 β : Type u_2 α✝ : Type u_3 R : α✝ → β → Prop f : γ → β x✝ : List α✝ ⊢ Forall₂ R x✝ (map f []) ↔ Forall₂ (fun a c => R a (f c)) x✝ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: γ : Type u_1 β : Type u_2 α✝ : Type u_3 R : α✝ → β → Prop f : γ → β x✝ : List α✝ ⊢ Forall₂ R x✝ (map f []) ↔ Forall₂ (fun a c => R a (f c)) x✝ [] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.forall₂_map_right_iff
[47, 9]
[50, 83]
simp only [map, forall₂_cons_right_iff, forall₂_map_right_iff]
γ : Type u_1 β : Type u_2 α✝ : Type u_3 R : α✝ → β → Prop f : γ → β x✝ : List α✝ b : γ u : List γ ⊢ Forall₂ R x✝ (map f (b :: u)) ↔ Forall₂ (fun a c => R a (f c)) x✝ (b :: u)
no goals
Please generate a tactic in lean4 to solve the state. STATE: γ : Type u_1 β : Type u_2 α✝ : Type u_3 R : α✝ → β → Prop f : γ → β x✝ : List α✝ b : γ u : List γ ⊢ Forall₂ R x✝ (map f (b :: u)) ↔ Forall₂ (fun a c => R a (f c)) x✝ (b :: u) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.forall_exists_l
[56, 1]
[57, 76]
induction h with simp [*] | cons _ _ ih => exact fun a h => .inr (ih _ h)
α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l₁ : List α✝¹ l₂ : List α✝ h : Forall₂ R l₁ l₂ ⊢ ∀ (a : α✝¹), a ∈ l₁ → ∃ b, b ∈ l₂ ∧ R a b
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l₁ : List α✝¹ l₂ : List α✝ h : Forall₂ R l₁ l₂ ⊢ ∀ (a : α✝¹), a ∈ l₁ → ∃ b, b ∈ l₂ ∧ R a b TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.Forall₂.forall_exists_l
[56, 1]
[57, 76]
exact fun a h => .inr (ih _ h)
case cons α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ ih : ∀ (a : α✝¹), a ∈ l₁✝ → ∃ b, b ∈ l₂✝ ∧ R a b ⊢ ∀ (a : α✝¹), a ∈ l₁✝ → R a b✝ ∨ ∃ a_2, a_2 ∈ l₂✝ ∧ R a a_2
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α✝¹ : Type u_1 α✝ : Type u_2 R : α✝¹ → α✝ → Prop l₁ : List α✝¹ l₂ : List α✝ a✝² : α✝¹ b✝ : α✝ l₁✝ : List α✝¹ l₂✝ : List α✝ a✝¹ : R a✝² b✝ a✝ : Forall₂ R l₁✝ l₂✝ ih : ∀ (a : α✝¹), a ∈ l₁✝ → ∃ b, b ∈ l₂✝ ∧ R a b ⊢ ∀ (a : α✝¹), a ∈ l₁✝ → R a b✝ ∨ ∃ a_2, a_2 ∈ l₂✝ ∧ R a a_2 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.map_id''
[66, 1]
[67, 27]
induction l <;> simp_all
α : Type u_1 f : α → α l : List α h : ∀ (x : α), x ∈ l → f x = x ⊢ map f l = l
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 f : α → α l : List α h : ∀ (x : α), x ∈ l → f x = x ⊢ map f l = l TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.map_fst_lookup
[69, 1]
[71, 43]
induction l <;> simp_all [lookup, find?]
α : Type u_1 β : Type u_2 f : α → β inst✝ : BEq β l : List α b : β ⊢ lookup b (map (fun a => (f a, a)) l) = find? (fun a => b == f a) l
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → β inst✝ : BEq β l : List α b : β ⊢ lookup b (map (fun a => (f a, a)) l) = find? (fun a => b == f a) l TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
rw [append_eq_append_iff, or_iff_left_iff_imp]
α : Type u_1 a b c d : List α h : length a ≤ length c ⊢ a ++ b = c ++ d ↔ ∃ a', c = a ++ a' ∧ b = a' ++ d
α : Type u_1 a b c d : List α h : length a ≤ length c ⊢ (∃ c', a = c ++ c' ∧ d = c' ++ b) → ∃ a', c = a ++ a' ∧ b = a' ++ d
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a b c d : List α h : length a ≤ length c ⊢ a ++ b = c ++ d ↔ ∃ a', c = a ++ a' ∧ b = a' ++ d TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
rintro ⟨c', rfl, rfl⟩
α : Type u_1 a b c d : List α h : length a ≤ length c ⊢ (∃ c', a = c ++ c' ∧ d = c' ++ b) → ∃ a', c = a ++ a' ∧ b = a' ++ d
case intro.intro α : Type u_1 b c c' : List α h : length (c ++ c') ≤ length c ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 a b c d : List α h : length a ≤ length c ⊢ (∃ c', a = c ++ c' ∧ d = c' ++ b) → ∃ a', c = a ++ a' ∧ b = a' ++ d TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
rw [← Nat.add_zero c.length, length_append, Nat.add_le_add_iff_left, Nat.le_zero, length_eq_zero] at h
case intro.intro α : Type u_1 b c c' : List α h : length (c ++ c') ≤ length c ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b)
case intro.intro α : Type u_1 b c c' : List α h : c' = [] ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α : Type u_1 b c c' : List α h : length (c ++ c') ≤ length c ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
subst h
case intro.intro α : Type u_1 b c c' : List α h : c' = [] ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b)
case intro.intro α : Type u_1 b c : List α ⊢ ∃ a', c = c ++ [] ++ a' ∧ b = a' ++ ([] ++ b)
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α : Type u_1 b c c' : List α h : c' = [] ⊢ ∃ a', c = c ++ c' ++ a' ∧ b = a' ++ (c' ++ b) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
exact ⟨[], by simp⟩
case intro.intro α : Type u_1 b c : List α ⊢ ∃ a', c = c ++ [] ++ a' ∧ b = a' ++ ([] ++ b)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro.intro α : Type u_1 b c : List α ⊢ ∃ a', c = c ++ [] ++ a' ∧ b = a' ++ ([] ++ b) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.append_eq_append_of_length_le
[81, 1]
[87, 31]
simp
α : Type u_1 b c : List α ⊢ c = c ++ [] ++ [] ∧ b = [] ++ ([] ++ b)
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 b c : List α ⊢ c = c ++ [] ++ [] ∧ b = [] ++ ([] ++ b) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
simp [h]
α : Type ?u.21452 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ i < size (modify arr x f)
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type ?u.21452 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ i < size (modify arr x f) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
simp [modify, modifyM, Id.run]
α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ get (modify arr x f) { val := i, isLt := ⋯ } = if x = i then f (get arr { val := i, isLt := h }) else get arr { val := i, isLt := h }
α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ (if h : x < size arr then set arr { val := x, isLt := h } (f arr[x]) else arr)[i] = if x = i then f arr[i] else arr[i]
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ get (modify arr x f) { val := i, isLt := ⋯ } = if x = i then f (get arr { val := i, isLt := h }) else get arr { val := i, isLt := h } TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
split
α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ (if h : x < size arr then set arr { val := x, isLt := h } (f arr[x]) else arr)[i] = if x = i then f arr[i] else arr[i]
case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (set arr { val := x, isLt := h✝ } (f arr[x]))[i] = if x = i then f arr[i] else arr[i] case inr α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : ¬x < size arr ⊢ arr[i] = if x = i then f arr[i] else arr[i]
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr ⊢ (if h : x < size arr then set arr { val := x, isLt := h } (f arr[x]) else arr)[i] = if x = i then f arr[i] else arr[i] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
simp [get_set _ _ _ h]
case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (set arr { val := x, isLt := h✝ } (f arr[x]))[i] = if x = i then f arr[i] else arr[i]
case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (if x = i then f arr[x] else arr[i]) = if x = i then f arr[i] else arr[i]
Please generate a tactic in lean4 to solve the state. STATE: case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (set arr { val := x, isLt := h✝ } (f arr[x]))[i] = if x = i then f arr[i] else arr[i] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
split <;> simp [*]
case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (if x = i then f arr[x] else arr[i]) = if x = i then f arr[i] else arr[i]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : x < size arr ⊢ (if x = i then f arr[x] else arr[i]) = if x = i then f arr[i] else arr[i] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
rw [if_neg (mt (by rintro rfl; exact h) ‹_›)]
case inr α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : ¬x < size arr ⊢ arr[i] = if x = i then f arr[i] else arr[i]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : ¬x < size arr ⊢ arr[i] = if x = i then f arr[i] else arr[i] TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
rintro rfl
α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : ¬x < size arr ⊢ x = i → ?m.24309
α : Type u_1 f : α → α arr : Array α x : Nat h✝ : ¬x < size arr h : x < size arr ⊢ ?m.24496 h
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 f : α → α arr : Array α x i : Nat h : i < size arr h✝ : ¬x < size arr ⊢ x = i → ?m.24309 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Array.get_modify
[103, 1]
[108, 50]
exact h
α : Type u_1 f : α → α arr : Array α x : Nat h✝ : ¬x < size arr h : x < size arr ⊢ ?m.24496 h
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 f : α → α arr : Array α x : Nat h✝ : ¬x < size arr h : x < size arr ⊢ ?m.24496 h TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
List.mapM_eq_some
[110, 1]
[113, 99]
induction l generalizing l' <;> simp [List.mapM_nil, List.mapM_cons, bind, List.forall₂_cons_left_iff, *, pure, @eq_comm _ l']
α : Type u_1 β : Type u_2 f : α → Option β l : List α l' : List β ⊢ mapM f l = some l' ↔ Forall₂ (fun x x_1 => f x = some x_1) l l'
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 f : α → Option β l : List α l' : List β ⊢ mapM f l = some l' ↔ Forall₂ (fun x x_1 => f x = some x_1) l l' TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Option.bind_eq_none''
[115, 9]
[116, 74]
cases o <;> simp
α : Type u_1 β : Type u_2 o : Option α f : α → Option β ⊢ Option.bind o f = none ↔ ∀ (a : α), o = some a → f a = none
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 β : Type u_2 o : Option α f : α → Option β ⊢ Option.bind o f = none ↔ ∀ (a : α), o = some a → f a = none TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Std/Basic.lean
Option.forall_ne_some
[118, 9]
[119, 19]
cases o <;> simp
α : Type u_1 o : Option α ⊢ (∀ (a : α), o ≠ some a) ↔ o = none
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 o : Option α ⊢ (∀ (a : α), o ≠ some a) ↔ o = none TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_zero
[24, 9]
[24, 74]
simp [liftVar]
n k : Nat ⊢ liftVar n 0 (k + 1) = 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: n k : Nat ⊢ liftVar n 0 (k + 1) = 0 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_succ
[25, 9]
[26, 71]
simp [liftVar, Nat.succ_lt_succ_iff]
n i k : Nat ⊢ liftVar n (i + 1) (k + 1) = liftVar n i k + 1
n i k : Nat ⊢ (if i < k then i + 1 else n + (i + 1)) = (if i < k then i else n + i) + 1
Please generate a tactic in lean4 to solve the state. STATE: n i k : Nat ⊢ liftVar n (i + 1) (k + 1) = liftVar n i k + 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_succ
[25, 9]
[26, 71]
split <;> simp [Nat.add_assoc]
n i k : Nat ⊢ (if i < k then i + 1 else n + (i + 1)) = (if i < k then i else n + i) + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: n i k : Nat ⊢ (if i < k then i + 1 else n + (i + 1)) = (if i < k then i else n + i) + 1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_lt_add
[28, 1]
[32, 57]
simp [liftVar]
i k n j : Nat self : i < k ⊢ liftVar n i j < k + n
i k n j : Nat self : i < k ⊢ (if i < j then i else n + i) < k + n
Please generate a tactic in lean4 to solve the state. STATE: i k n j : Nat self : i < k ⊢ liftVar n i j < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_lt_add
[28, 1]
[32, 57]
split <;> rename_i h
i k n j : Nat self : i < k ⊢ (if i < j then i else n + i) < k + n
case inl i k n j : Nat self : i < k h : i < j ⊢ i < k + n case inr i k n j : Nat self : i < k h : ¬i < j ⊢ n + i < k + n
Please generate a tactic in lean4 to solve the state. STATE: i k n j : Nat self : i < k ⊢ (if i < j then i else n + i) < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_lt_add
[28, 1]
[32, 57]
exact Nat.lt_of_lt_of_le self (Nat.le_add_right ..)
case inl i k n j : Nat self : i < k h : i < j ⊢ i < k + n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inl i k n j : Nat self : i < k h : i < j ⊢ i < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_lt_add
[28, 1]
[32, 57]
rw [Nat.add_comm]
case inr i k n j : Nat self : i < k h : ¬i < j ⊢ n + i < k + n
case inr i k n j : Nat self : i < k h : ¬i < j ⊢ i + n < k + n
Please generate a tactic in lean4 to solve the state. STATE: case inr i k n j : Nat self : i < k h : ¬i < j ⊢ n + i < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.liftVar_lt_add
[28, 1]
[32, 57]
exact Nat.add_lt_add_right self _
case inr i k n j : Nat self : i < k h : ¬i < j ⊢ i + n < k + n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case inr i k n j : Nat self : i < k h : ¬i < j ⊢ i + n < k + n TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_zero
[47, 9]
[48, 58]
induction e generalizing k <;> simp [liftN, liftVar, *]
e : VExpr k : Nat ⊢ liftN 0 e k = e
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr k : Nat ⊢ liftN 0 e k = e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN'
[50, 1]
[59, 57]
split <;> rename_i h
case bvar n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 ⊢ (if (if i < k1 then i else n1 + i) < k2 then if i < k1 then i else n1 + i else n2 + if i < k1 then i else n1 + i) = if i < k1 then i else n1 + (n2 + i)
case bvar.inl n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : i < k1 ⊢ (if i < k2 then i else n2 + i) = i case bvar.inr n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : ¬i < k1 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = n1 + (n2 + i)
Please generate a tactic in lean4 to solve the state. STATE: case bvar n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 ⊢ (if (if i < k1 then i else n1 + i) < k2 then if i < k1 then i else n1 + i else n2 + if i < k1 then i else n1 + i) = if i < k1 then i else n1 + (n2 + i) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN'
[50, 1]
[59, 57]
rw [if_pos (Nat.lt_of_lt_of_le h h1)]
case bvar.inl n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : i < k1 ⊢ (if i < k2 then i else n2 + i) = i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inl n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : i < k1 ⊢ (if i < k2 then i else n2 + i) = i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN'
[50, 1]
[59, 57]
rw [if_neg (mt (fun h => ?_) h), Nat.add_left_comm]
case bvar.inr n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : ¬i < k1 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = n1 + (n2 + i)
n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h✝ : ¬i < k1 h : n1 + i < k2 ⊢ i < k1
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inr n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h : ¬i < k1 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = n1 + (n2 + i) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN'
[50, 1]
[59, 57]
exact (Nat.add_lt_add_iff_left ..).1 (Nat.lt_of_lt_of_le h h2)
n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h✝ : ¬i < k1 h : n1 + i < k2 ⊢ i < k1
no goals
Please generate a tactic in lean4 to solve the state. STATE: n1 n2 i k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 h✝ : ¬i < k1 h : n1 + i < k2 ⊢ i < k1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN'
[50, 1]
[59, 57]
rw [IH2 (Nat.succ_le_succ h1) (Nat.succ_le_succ h2)]
case forallE n1 n2 : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ {k1 k2 : Nat}, k1 ≤ k2 → k2 ≤ n1 + k1 → liftN n2 (liftN n1 binderType✝ k1) k2 = liftN (n1 + n2) binderType✝ k1 IH2 : ∀ {k1 k2 : Nat}, k1 ≤ k2 → k2 ≤ n1 + k1 → liftN n2 (liftN n1 body✝ k1) k2 = liftN (n1 + n2) body✝ k1 k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 ⊢ liftN n2 (liftN n1 body✝ (k1 + 1)) (k2 + 1) = liftN (n1 + n2) body✝ (k1 + 1)
no goals
Please generate a tactic in lean4 to solve the state. STATE: case forallE n1 n2 : Nat binderType✝ body✝ : VExpr binderType_ih✝ : ∀ {k1 k2 : Nat}, k1 ≤ k2 → k2 ≤ n1 + k1 → liftN n2 (liftN n1 binderType✝ k1) k2 = liftN (n1 + n2) binderType✝ k1 IH2 : ∀ {k1 k2 : Nat}, k1 ≤ k2 → k2 ≤ n1 + k1 → liftN n2 (liftN n1 body✝ k1) k2 = liftN (n1 + n2) body✝ k1 k1 k2 : Nat h1 : k1 ≤ k2 h2 : k2 ≤ n1 + k1 ⊢ liftN n2 (liftN n1 body✝ (k1 + 1)) (k2 + 1) = liftN (n1 + n2) body✝ (k1 + 1) TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_liftN_lo
[61, 1]
[62, 95]
simpa [Nat.add_comm] using liftN'_liftN' (n1 := k) (n2 := n) (Nat.zero_le _) (Nat.le_refl _)
e : VExpr n k : Nat ⊢ liftN n (liftN k e) k = liftN (n + k) e
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr n k : Nat ⊢ liftN n (liftN k e) k = liftN (n + k) e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN_liftN
[68, 1]
[69, 60]
simpa using liftN'_liftN' (Nat.zero_le _) (Nat.zero_le _)
e : VExpr n1 n2 : Nat ⊢ liftN n2 (liftN n1 e) = liftN (n1 + n2) e
no goals
Please generate a tactic in lean4 to solve the state. STATE: e : VExpr n1 n2 : Nat ⊢ liftN n2 (liftN n1 e) = liftN (n1 + n2) e TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
split <;> rename_i h'
case bvar n1 n2 i k1 k2 : Nat h : k2 ≤ k1 ⊢ (if (if i < k1 then i else n1 + i) < k2 then if i < k1 then i else n1 + i else n2 + if i < k1 then i else n1 + i) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i
case bvar.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i case bvar.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : ¬i < k1 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i
Please generate a tactic in lean4 to solve the state. STATE: case bvar n1 n2 i k1 k2 : Nat h : k2 ≤ k1 ⊢ (if (if i < k1 then i else n1 + i) < k2 then if i < k1 then i else n1 + i else n2 + if i < k1 then i else n1 + i) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
rw [if_pos (c := _ < n2 + k1)]
case bvar.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i
case bvar.inl.hc n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) < n2 + k1
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
split
case bvar.inl.hc n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) < n2 + k1
case bvar.inl.hc.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : i < k2 ⊢ i < n2 + k1 case bvar.inl.hc.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : ¬i < k2 ⊢ n2 + i < n2 + k1
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inl.hc n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 ⊢ (if i < k2 then i else n2 + i) < n2 + k1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
exact Nat.lt_add_left _ h'
case bvar.inl.hc.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : i < k2 ⊢ i < n2 + k1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inl.hc.inl n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : i < k2 ⊢ i < n2 + k1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
exact Nat.add_lt_add_left h' _
case bvar.inl.hc.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : ¬i < k2 ⊢ n2 + i < n2 + k1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inl.hc.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : i < k1 h✝ : ¬i < k2 ⊢ n2 + i < n2 + k1 TACTIC:
https://github.com/digama0/lean4lean.git
c534f13d8d25f5e1891b6d18cc76b601ee87aa66
Lean4Lean/Theory/VExpr.lean
Lean4Lean.VExpr.liftN'_comm
[74, 1]
[85, 87]
rw [if_neg (mt (Nat.lt_of_le_of_lt (Nat.le_add_left _ n1)) this), if_neg this, if_neg (mt (Nat.add_lt_add_iff_left ..).1 h'), Nat.add_left_comm]
case bvar.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : ¬i < k1 this : ¬i < k2 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i
no goals
Please generate a tactic in lean4 to solve the state. STATE: case bvar.inr n1 n2 i k1 k2 : Nat h : k2 ≤ k1 h' : ¬i < k1 this : ¬i < k2 ⊢ (if n1 + i < k2 then n1 + i else n2 + (n1 + i)) = if (if i < k2 then i else n2 + i) < n2 + k1 then if i < k2 then i else n2 + i else n1 + if i < k2 then i else n2 + i TACTIC: