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/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
simp only [cons.injEq, and_true] at xy
case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : [y] = [x] ⊢ [] = ys ∧ x = y
case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : [y] = [x] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
rw [empty, xy]
case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = ys ∧ x = y
case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = [] ∧ x = x
Please generate a tactic in lean4 to solve the state. STATE: case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
apply And.intro <;> rfl
case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = [] ∧ x = x
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.inl.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [] xy : y = x ⊢ [] = [] ∧ x = x TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases right with | intro empty ysx => contradiction
case nil.inr α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] right : ys = [x] ∧ [y] = [] ⊢ [] = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.inr α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] right : ys = [x] ∧ [y] = [] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
contradiction
case nil.inr.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [x] ysx : [y] = [] ⊢ [] = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil.inr.intro α : Type u_1 x y : α ys : List α h' : [x] = ys ++ [y] empty : ys = [x] ysx : [y] = [] ⊢ [] = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
intro ys
case cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ⊢ ∀ {ys : List α}, headx :: tailx ++ [x] = ys ++ [y] → headx :: tailx = ys ∧ x = y
case cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ys : List α ⊢ headx :: tailx ++ [x] = ys ++ [y] → headx :: tailx = ys ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ⊢ ∀ {ys : List α}, headx :: tailx ++ [x] = ys ++ [y] → headx :: tailx = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases ys with | nil => intro h' simp only [cons_append, nil_append, cons.injEq, append_eq_nil, and_false] at h' | cons heady taily => intro h' simp only [cons_append, cons.injEq] at h' cases h' with | intro heads tails => rw [heads] have h: tailx = taily ∧ x = y := (ihx tails) cases h with | intro tailxy xy => rw [tailxy] rw [xy] apply And.intro <;> rfl
case cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ys : List α ⊢ headx :: tailx ++ [x] = ys ++ [y] → headx :: tailx = ys ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ys : List α ⊢ headx :: tailx ++ [x] = ys ++ [y] → headx :: tailx = ys ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
intro h'
case cons.nil α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ⊢ headx :: tailx ++ [x] = [] ++ [y] → headx :: tailx = [] ∧ x = y
case cons.nil α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y h' : headx :: tailx ++ [x] = [] ++ [y] ⊢ headx :: tailx = [] ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y ⊢ headx :: tailx ++ [x] = [] ++ [y] → headx :: tailx = [] ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
simp only [cons_append, nil_append, cons.injEq, append_eq_nil, and_false] at h'
case cons.nil α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y h' : headx :: tailx ++ [x] = [] ++ [y] ⊢ headx :: tailx = [] ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.nil α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y h' : headx :: tailx ++ [x] = [] ++ [y] ⊢ headx :: tailx = [] ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
intro h'
case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α ⊢ headx :: tailx ++ [x] = heady :: taily ++ [y] → headx :: tailx = heady :: taily ∧ x = y
case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx :: tailx ++ [x] = heady :: taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α ⊢ headx :: tailx ++ [x] = heady :: taily ++ [y] → headx :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
simp only [cons_append, cons.injEq] at h'
case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx :: tailx ++ [x] = heady :: taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y
case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx = heady ∧ tailx ++ [x] = taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx :: tailx ++ [x] = heady :: taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases h' with | intro heads tails => rw [heads] have h: tailx = taily ∧ x = y := (ihx tails) cases h with | intro tailxy xy => rw [tailxy] rw [xy] apply And.intro <;> rfl
case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx = heady ∧ tailx ++ [x] = taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α h' : headx = heady ∧ tailx ++ [x] = taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
rw [heads]
case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y
case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] ⊢ heady :: tailx = heady :: taily ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] ⊢ headx :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
have h: tailx = taily ∧ x = y := (ihx tails)
case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] ⊢ heady :: tailx = heady :: taily ∧ x = y
case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] h : tailx = taily ∧ x = y ⊢ heady :: tailx = heady :: taily ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] ⊢ heady :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
cases h with | intro tailxy xy => rw [tailxy] rw [xy] apply And.intro <;> rfl
case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] h : tailx = taily ∧ x = y ⊢ heady :: tailx = heady :: taily ∧ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] h : tailx = taily ∧ x = y ⊢ heady :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
rw [tailxy]
case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: tailx = heady :: taily ∧ x = y
case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ x = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: tailx = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
rw [xy]
case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ x = y
case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ y = y
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_inj_tail
[210, 1]
[246, 34]
apply And.intro <;> rfl
case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ y = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.cons.intro.intro α : Type u_1 x y headx : α tailx : List α ihx : ∀ {ys : List α}, tailx ++ [x] = ys ++ [y] → tailx = ys ∧ x = y heady : α taily : List α heads : headx = heady tails : tailx ++ [x] = taily ++ [y] tailxy : tailx = taily xy : x = y ⊢ heady :: taily = heady :: taily ∧ y = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_inj_tail_app
[248, 1]
[253, 16]
intro H
α : Type u_1 xs ys : List α x y : α ⊢ xs = ys ∧ x = y → xs ++ [x] = ys ++ [y]
α : Type u_1 xs ys : List α x y : α H : xs = ys ∧ x = y ⊢ xs ++ [x] = ys ++ [y]
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α x y : α ⊢ xs = ys ∧ x = y → xs ++ [x] = ys ++ [y] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_inj_tail_app
[248, 1]
[253, 16]
cases H with | intro H1 H2 => rw [H1, H2]
α : Type u_1 xs ys : List α x y : α H : xs = ys ∧ x = y ⊢ xs ++ [x] = ys ++ [y]
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α x y : α H : xs = ys ∧ x = y ⊢ xs ++ [x] = ys ++ [y] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_inj_tail_app
[248, 1]
[253, 16]
rw [H1, H2]
case intro α : Type u_1 xs ys : List α x y : α H1 : xs = ys H2 : x = y ⊢ xs ++ [x] = ys ++ [y]
no goals
Please generate a tactic in lean4 to solve the state. STATE: case intro α : Type u_1 xs ys : List α x y : α H1 : xs = ys H2 : x = y ⊢ xs ++ [x] = ys ++ [y] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_end
[255, 1]
[259, 45]
cases xs with | nil => rfl | cons head tail => simp only [append_nil]
α : Type u_1 xs : List α ⊢ xs = xs ++ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ xs = xs ++ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_end
[255, 1]
[259, 45]
rfl
case nil α : Type u_1 ⊢ [] = [] ++ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ [] = [] ++ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_nil_end
[255, 1]
[259, 45]
simp only [append_nil]
case cons α : Type u_1 head : α tail : List α ⊢ head :: tail = head :: tail ++ []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ⊢ head :: tail = head :: tail ++ [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_length
[261, 1]
[265, 82]
cases xs with | nil => simp only [nil_append, length_nil, zero_add] | cons _ tailx => simp only [cons_append, length_cons, length_append, succ_add]
α : Type u_1 xs ys : List α ⊢ length (xs ++ ys) = length xs + length ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs ys : List α ⊢ length (xs ++ ys) = length xs + length ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_length
[261, 1]
[265, 82]
simp only [nil_append, length_nil, zero_add]
case nil α : Type u_1 ys : List α ⊢ length ([] ++ ys) = length [] + length ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ys : List α ⊢ length ([] ++ ys) = length [] + length ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_app_length
[261, 1]
[265, 82]
simp only [cons_append, length_cons, length_append, succ_add]
case cons α : Type u_1 ys : List α head✝ : α tailx : List α ⊢ length (head✝ :: tailx ++ ys) = length (head✝ :: tailx) + length ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 ys : List α head✝ : α tailx : List α ⊢ length (head✝ :: tailx ++ ys) = length (head✝ :: tailx) + length ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_last_length
[267, 1]
[271, 32]
induction xs with | nil => rfl | cons _ tail ih => simp [ih]
α : Type u_1 x : α xs : List α ⊢ length (xs ++ [x]) = length xs + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x : α xs : List α ⊢ length (xs ++ [x]) = length xs + 1 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_last_length
[267, 1]
[271, 32]
rfl
case nil α : Type u_1 x : α ⊢ length ([] ++ [x]) = length [] + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 x : α ⊢ length ([] ++ [x]) = length [] + 1 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_last_length
[267, 1]
[271, 32]
simp [ih]
case cons α : Type u_1 x head✝ : α tail : List α ih : length (tail ++ [x]) = length tail + 1 ⊢ length (head✝ :: tail ++ [x]) = length (head✝ :: tail) + 1
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 x head✝ : α tail : List α ih : length (tail ++ [x]) = length tail + 1 ⊢ length (head✝ :: tail ++ [x]) = length (head✝ :: tail) + 1 TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
apply Iff.intro
α : Type u_1 x y : α xs ys : List α ⊢ x :: xs = y :: ys ↔ x = y ∧ xs = ys
case mp α : Type u_1 x y : α xs ys : List α ⊢ x :: xs = y :: ys → x = y ∧ xs = ys case mpr α : Type u_1 x y : α xs ys : List α ⊢ x = y ∧ xs = ys → x :: xs = y :: ys
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 x y : α xs ys : List α ⊢ x :: xs = y :: ys ↔ x = y ∧ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
intro h
case mp α : Type u_1 x y : α xs ys : List α ⊢ x :: xs = y :: ys → x = y ∧ xs = ys
case mp α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y ∧ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 x y : α xs ys : List α ⊢ x :: xs = y :: ys → x = y ∧ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
apply And.intro
case mp α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y ∧ xs = ys
case mp.left α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y case mp.right α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: case mp α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y ∧ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
injections
case mp.left α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp.left α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
injections
case mp.right α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ xs = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mp.right α : Type u_1 x y : α xs ys : List α h : x :: xs = y :: ys ⊢ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
intro h
case mpr α : Type u_1 x y : α xs ys : List α ⊢ x = y ∧ xs = ys → x :: xs = y :: ys
case mpr α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x :: xs = y :: ys
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 x y : α xs ys : List α ⊢ x = y ∧ xs = ys → x :: xs = y :: ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
congr
case mpr α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x :: xs = y :: ys
case mpr.e_head α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x = y case mpr.e_tail α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: case mpr α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x :: xs = y :: ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
exact h.left
case mpr.e_head α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x = y
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr.e_head α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ x = y TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_cons_eq
[273, 1]
[283, 20]
exact h.right
case mpr.e_tail α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ xs = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: case mpr.e_tail α : Type u_1 x y : α xs ys : List α h : x = y ∧ xs = ys ⊢ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_or_smaller_is_empty
[285, 1]
[289, 43]
cases xs with | nil => intro; rfl | cons head tail => intro; contradiction
α : Type u_1 xs : List α ⊢ length xs ≤ 0 → xs = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ length xs ≤ 0 → xs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_or_smaller_is_empty
[285, 1]
[289, 43]
intro
case nil α : Type u_1 ⊢ length [] ≤ 0 → [] = []
case nil α : Type u_1 a✝ : length [] ≤ 0 ⊢ [] = []
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ length [] ≤ 0 → [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_or_smaller_is_empty
[285, 1]
[289, 43]
rfl
case nil α : Type u_1 a✝ : length [] ≤ 0 ⊢ [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 a✝ : length [] ≤ 0 ⊢ [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_or_smaller_is_empty
[285, 1]
[289, 43]
intro
case cons α : Type u_1 head : α tail : List α ⊢ length (head :: tail) ≤ 0 → head :: tail = []
case cons α : Type u_1 head : α tail : List α a✝ : length (head :: tail) ≤ 0 ⊢ head :: tail = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ⊢ length (head :: tail) ≤ 0 → head :: tail = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_zero_or_smaller_is_empty
[285, 1]
[289, 43]
contradiction
case cons α : Type u_1 head : α tail : List α a✝ : length (head :: tail) ≤ 0 ⊢ head :: tail = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α a✝ : length (head :: tail) ≤ 0 ⊢ head :: tail = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_nil
[291, 1]
[295, 16]
cases n with | zero => rfl | succ => rfl
α : Type u n : ℕ ⊢ take n [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u n : ℕ ⊢ take n [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_nil
[291, 1]
[295, 16]
rfl
case zero α : Type u ⊢ take zero [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u ⊢ take zero [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_nil
[291, 1]
[295, 16]
rfl
case succ α : Type u n✝ : ℕ ⊢ take (succ n✝) [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u n✝ : ℕ ⊢ take (succ n✝) [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_cons
[297, 1]
[299, 12]
rw [take]
α : Type u_1 n : ℕ x : α xs : List α ⊢ take (n + 1) (x :: xs) = x :: take n xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ x : α xs : List α ⊢ take (n + 1) (x :: xs) = x :: take n xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
induction xs with | nil => rfl | cons head tail ih => have h : take (length (head::tail)) (head::tail) = head :: (take (length tail) tail) := by apply list_take_cons rw [ih] at h trivial
α : Type u_1 xs : List α ⊢ take (length xs) xs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ take (length xs) xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
rfl
case nil α : Type u_1 ⊢ take (length []) [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ take (length []) [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
have h : take (length (head::tail)) (head::tail) = head :: (take (length tail) tail) := by apply list_take_cons
case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail
case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: take (length tail) tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
rw [ih] at h
case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: take (length tail) tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail
case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: take (length tail) tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
trivial
case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail h : take (length (head :: tail)) (head :: tail) = head :: tail ⊢ take (length (head :: tail)) (head :: tail) = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all
[301, 1]
[310, 12]
apply list_take_cons
α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail ⊢ take (length (head :: tail)) (head :: tail) = head :: take (length tail) tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α ih : take (length tail) tail = tail ⊢ take (length (head :: tail)) (head :: tail) = head :: take (length tail) tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_zero
[312, 1]
[313, 36]
rw [take]
α : Type u_1 xs : List α ⊢ take zero xs = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ take zero xs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty
[315, 1]
[322, 111]
cases xs with | nil => simp only [reverse_nil, forall_true_left] | cons head tail => intro h have h' : (reverse (reverse (head :: tail)) = []) := congrArg reverse h simp only [reverse_cons, reverse_append, reverse_nil, nil_append, reverse_reverse, singleton_append] at h'
α : Type u_1 xs : List α ⊢ reverse xs = [] → xs = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ reverse xs = [] → xs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty
[315, 1]
[322, 111]
simp only [reverse_nil, forall_true_left]
case nil α : Type u_1 ⊢ reverse [] = [] → [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ reverse [] = [] → [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty
[315, 1]
[322, 111]
intro h
case cons α : Type u_1 head : α tail : List α ⊢ reverse (head :: tail) = [] → head :: tail = []
case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] ⊢ head :: tail = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ⊢ reverse (head :: tail) = [] → head :: tail = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty
[315, 1]
[322, 111]
have h' : (reverse (reverse (head :: tail)) = []) := congrArg reverse h
case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] ⊢ head :: tail = []
case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] h' : reverse (reverse (head :: tail)) = [] ⊢ head :: tail = []
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] ⊢ head :: tail = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty
[315, 1]
[322, 111]
simp only [reverse_cons, reverse_append, reverse_nil, nil_append, reverse_reverse, singleton_append] at h'
case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] h' : reverse (reverse (head :: tail)) = [] ⊢ head :: tail = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α h : reverse (head :: tail) = [] h' : reverse (reverse (head :: tail)) = [] ⊢ head :: tail = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_empty2
[324, 1]
[325, 43]
trivial
α : Type u_1 ⊢ reverse [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 ⊢ reverse [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_eq
[327, 1]
[333, 13]
intro h
α : Type u_1 n : ℕ xs ys : List α ⊢ reverse xs = reverse ys → xs = ys
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys ⊢ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs ys : List α ⊢ reverse xs = reverse ys → xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_eq
[327, 1]
[333, 13]
have h' : reverse (reverse xs) = reverse (reverse ys) := congrArg reverse h
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys ⊢ xs = ys
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : reverse (reverse xs) = reverse (reverse ys) ⊢ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys ⊢ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_eq
[327, 1]
[333, 13]
simp only [reverse_reverse] at h'
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : reverse (reverse xs) = reverse (reverse ys) ⊢ xs = ys
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : xs = ys ⊢ xs = ys
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : reverse (reverse xs) = reverse (reverse ys) ⊢ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_rev_eq
[327, 1]
[333, 13]
assumption
α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : xs = ys ⊢ xs = ys
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs ys : List α h : reverse xs = reverse ys h' : xs = ys ⊢ xs = ys TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
take_one_nil
[335, 1]
[336, 12]
rw [take]
α : Type u_1 ⊢ take 1 [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 ⊢ take 1 [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_cons_le_succ
[338, 9]
[341, 31]
rw [length]
α : Type u_1 head : α tail : List α k : ℕ ⊢ length (head :: tail) ≤ succ k → length tail ≤ k
α : Type u_1 head : α tail : List α k : ℕ ⊢ length tail + 1 ≤ succ k → length tail ≤ k
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ length (head :: tail) ≤ succ k → length tail ≤ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_cons_le_succ
[338, 9]
[341, 31]
apply Nat.le_of_succ_le_succ
α : Type u_1 head : α tail : List α k : ℕ ⊢ length tail + 1 ≤ succ k → length tail ≤ k
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ length tail + 1 ≤ succ k → length tail ≤ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
revert xs
α : Type u_1 n : ℕ xs : List α ⊢ length xs ≤ n → take n xs = xs
α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length xs ≤ n → take n xs = xs
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length xs ≤ n → take n xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
induction n with | zero => intro xs h rw [list_length_zero_or_smaller_is_empty xs h] rw [take] | succ k ih => intro xs cases xs with | nil => intro _ apply list_take_nil | cons head tail => intro h rw [take] apply (congrArg (cons head)) apply ih tail (list_length_cons_le_succ head tail k h)
α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length xs ≤ n → take n xs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ ⊢ ∀ (xs : List α), length xs ≤ n → take n xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
intro xs h
case zero α : Type u_1 ⊢ ∀ (xs : List α), length xs ≤ zero → take zero xs = xs
case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero xs = xs
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 ⊢ ∀ (xs : List α), length xs ≤ zero → take zero xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
rw [list_length_zero_or_smaller_is_empty xs h]
case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero xs = xs
case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero [] = []
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
rw [take]
case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case zero α : Type u_1 xs : List α h : length xs ≤ zero ⊢ take zero [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
intro xs
case succ α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs ⊢ ∀ (xs : List α), length xs ≤ succ k → take (succ k) xs = xs
case succ α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs xs : List α ⊢ length xs ≤ succ k → take (succ k) xs = xs
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs ⊢ ∀ (xs : List α), length xs ≤ succ k → take (succ k) xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
cases xs with | nil => intro _ apply list_take_nil | cons head tail => intro h rw [take] apply (congrArg (cons head)) apply ih tail (list_length_cons_le_succ head tail k h)
case succ α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs xs : List α ⊢ length xs ≤ succ k → take (succ k) xs = xs
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs xs : List α ⊢ length xs ≤ succ k → take (succ k) xs = xs TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
intro _
case succ.nil α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs ⊢ length [] ≤ succ k → take (succ k) [] = []
case succ.nil α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs a✝ : length [] ≤ succ k ⊢ take (succ k) [] = []
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs ⊢ length [] ≤ succ k → take (succ k) [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
apply list_take_nil
case succ.nil α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs a✝ : length [] ≤ succ k ⊢ take (succ k) [] = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.nil α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs a✝ : length [] ≤ succ k ⊢ take (succ k) [] = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
intro h
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α ⊢ length (head :: tail) ≤ succ k → take (succ k) (head :: tail) = head :: tail
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take (succ k) (head :: tail) = head :: tail
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α ⊢ length (head :: tail) ≤ succ k → take (succ k) (head :: tail) = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
rw [take]
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take (succ k) (head :: tail) = head :: tail
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ head :: take k tail = head :: tail
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take (succ k) (head :: tail) = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
apply (congrArg (cons head))
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ head :: take k tail = head :: tail
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take k tail = tail
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ head :: take k tail = head :: tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_all2
[343, 1]
[361, 61]
apply ih tail (list_length_cons_le_succ head tail k h)
case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take k tail = tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: case succ.cons α : Type u_1 k : ℕ ih : ∀ (xs : List α), length xs ≤ k → take k xs = xs head : α tail : List α h : length (head :: tail) ≤ succ k ⊢ take k tail = tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_O
[363, 1]
[365, 12]
rw [take]
α : Type u_1 xs : List α ⊢ take 0 xs = []
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ take 0 xs = [] TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
revert n
α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) ≤ n
α : Type u_1 xs : List α ⊢ ∀ (n : ℕ), length (take n xs) ≤ n
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 n : ℕ xs : List α ⊢ length (take n xs) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
induction xs with | nil => intro n rw [list_take_nil] simp | cons head tail ih => intro n cases n with | zero => rw [take] simp only [length_nil, zero_eq, le_refl] | succ k => rw [take] rw [length] apply Nat.succ_le_succ apply (ih k)
α : Type u_1 xs : List α ⊢ ∀ (n : ℕ), length (take n xs) ≤ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 xs : List α ⊢ ∀ (n : ℕ), length (take n xs) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
intro n
case nil α : Type u_1 ⊢ ∀ (n : ℕ), length (take n []) ≤ n
case nil α : Type u_1 n : ℕ ⊢ length (take n []) ≤ n
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 ⊢ ∀ (n : ℕ), length (take n []) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
rw [list_take_nil]
case nil α : Type u_1 n : ℕ ⊢ length (take n []) ≤ n
case nil α : Type u_1 n : ℕ ⊢ length [] ≤ n
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 n : ℕ ⊢ length (take n []) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
simp
case nil α : Type u_1 n : ℕ ⊢ length [] ≤ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case nil α : Type u_1 n : ℕ ⊢ length [] ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
intro n
case cons α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ ∀ (n : ℕ), length (take n (head :: tail)) ≤ n
case cons α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n n : ℕ ⊢ length (take n (head :: tail)) ≤ n
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ ∀ (n : ℕ), length (take n (head :: tail)) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
cases n with | zero => rw [take] simp only [length_nil, zero_eq, le_refl] | succ k => rw [take] rw [length] apply Nat.succ_le_succ apply (ih k)
case cons α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n n : ℕ ⊢ length (take n (head :: tail)) ≤ n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n n : ℕ ⊢ length (take n (head :: tail)) ≤ n TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
rw [take]
case cons.zero α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ length (take zero (head :: tail)) ≤ zero
case cons.zero α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ length [] ≤ zero
Please generate a tactic in lean4 to solve the state. STATE: case cons.zero α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ length (take zero (head :: tail)) ≤ zero TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
simp only [length_nil, zero_eq, le_refl]
case cons.zero α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ length [] ≤ zero
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.zero α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n ⊢ length [] ≤ zero TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
rw [take]
case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take (succ k) (head :: tail)) ≤ succ k
case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (head :: take k tail) ≤ succ k
Please generate a tactic in lean4 to solve the state. STATE: case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take (succ k) (head :: tail)) ≤ succ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
rw [length]
case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (head :: take k tail) ≤ succ k
case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) + 1 ≤ succ k
Please generate a tactic in lean4 to solve the state. STATE: case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (head :: take k tail) ≤ succ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
apply Nat.succ_le_succ
case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) + 1 ≤ succ k
case cons.succ.a α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) ≤ k
Please generate a tactic in lean4 to solve the state. STATE: case cons.succ α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) + 1 ≤ succ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_take_le_length
[367, 1]
[385, 19]
apply (ih k)
case cons.succ.a α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) ≤ k
no goals
Please generate a tactic in lean4 to solve the state. STATE: case cons.succ.a α : Type u_1 head : α tail : List α ih : ∀ (n : ℕ), length (take n tail) ≤ n k : ℕ ⊢ length (take k tail) ≤ k TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_succ_le_cons
[387, 1]
[390, 25]
rw [length, <-nat_succ_eq_plus_one]
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length tail → succ k ≤ length (head :: tail)
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length tail → succ k ≤ succ (length tail)
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length tail → succ k ≤ length (head :: tail) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_succ_le_cons
[387, 1]
[390, 25]
apply Nat.succ_le_succ
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length tail → succ k ≤ succ (length tail)
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length tail → succ k ≤ succ (length tail) TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_pred_le_cons
[392, 1]
[395, 25]
rw [length, <-nat_succ_eq_plus_one]
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length (head :: tail) → pred k ≤ length tail
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ succ (length tail) → pred k ≤ length tail
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ length (head :: tail) → pred k ≤ length tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_pred_le_cons
[392, 1]
[395, 25]
apply nat_pred_le_succ
α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ succ (length tail) → pred k ≤ length tail
no goals
Please generate a tactic in lean4 to solve the state. STATE: α : Type u_1 head : α tail : List α k : ℕ ⊢ k ≤ succ (length tail) → pred k ≤ length tail TACTIC:
https://github.com/katydid/proofs.git
8105af686a3bdf193909567f5165835001240640
Katydid/Std/Lists.lean
list_length_cons_succ
[397, 1]
[397, 79]
simp
α✝ : Type u_1 x : α✝ xs : List α✝ ⊢ length (x :: xs) = succ (length xs)
no goals
Please generate a tactic in lean4 to solve the state. STATE: α✝ : Type u_1 x : α✝ xs : List α✝ ⊢ length (x :: xs) = succ (length xs) TACTIC: