1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.foldr_max_of_ne_nil
File: Mathlib/Data/List/MinMax.lean

tactic: induction' l with hd tl IH
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
h : l ≠ []
⊢ ↑(foldr max ⊥ l) = l.maximum
state_after: case nil
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
h : [] ≠ []
⊢ ↑(foldr max ⊥ []) = [].maximum

case cons
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h : hd :: tl ≠ []
⊢ ↑(foldr max ⊥ (hd :: tl)) = (hd :: tl).maximum

tactic: contradiction
state_before: case nil
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
h : [] ≠ []
⊢ ↑(foldr max ⊥ []) = [].maximum
state_after: no goals

tactic: rw [maximum_cons, foldr, WithBot.coe_max]
state_before: case cons
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h : hd :: tl ≠ []
⊢ ↑(foldr max ⊥ (hd :: tl)) = (hd :: tl).maximum
state_after: case cons
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h : hd :: tl ≠ []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum

tactic: by_cases h : tl = []
state_before: case cons
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h : hd :: tl ≠ []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum
state_after: case pos
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h✝ : hd :: tl ≠ []
h : tl = []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum

case neg
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h✝ : hd :: tl ≠ []
h : ¬tl = []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum

tactic: simp [h]
state_before: case pos
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h✝ : hd :: tl ≠ []
h : tl = []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum
state_after: no goals

tactic: simp [IH h]
state_before: case neg
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : OrderBot α
l : List α
hd : α
tl : List α
IH : tl ≠ [] → ↑(foldr max ⊥ tl) = tl.maximum
h✝ : hd :: tl ≠ []
h : ¬tl = []
⊢ max ↑hd ↑(foldr max ⊥ tl) = max (↑hd) tl.maximum
state_after: no goals
Theorem: SetTheory.PGame.add_moveLeft_inl
File: Mathlib/SetTheory/Game/PGame.lean

tactic: cases x
state_before: xl xr : Type u
x y : PGame
i : x.LeftMoves
⊢ (x + y).moveLeft (toLeftMovesAdd (Sum.inl i)) = x.moveLeft i + y
state_after: case mk
xl xr : Type u
y : PGame
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝ β✝ a✝¹ a✝ + y).moveLeft (toLeftMovesAdd (Sum.inl i)) = (mk α✝ β✝ a✝¹ a✝).moveLeft i + y

tactic: cases y
state_before: case mk
xl xr : Type u
y : PGame
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
i : (mk α✝ β✝ a✝¹ a✝).LeftMoves
⊢ (mk α✝ β✝ a✝¹ a✝ + y).moveLeft (toLeftMovesAdd (Sum.inl i)) = (mk α✝ β✝ a✝¹ a✝).moveLeft i + y
state_after: case mk.mk
xl xr : Type u
α✝¹ β✝¹ : Type u_1
a✝³ : α✝¹ → PGame
a✝² : β✝¹ → PGame
i : (mk α✝¹ β✝¹ a✝³ a✝²).LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
⊢ (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝).moveLeft (toLeftMovesAdd (Sum.inl i)) =
    (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i + mk α✝ β✝ a✝¹ a✝

tactic: rfl
state_before: case mk.mk
xl xr : Type u
α✝¹ β✝¹ : Type u_1
a✝³ : α✝¹ → PGame
a✝² : β✝¹ → PGame
i : (mk α✝¹ β✝¹ a✝³ a✝²).LeftMoves
α✝ β✝ : Type u_1
a✝¹ : α✝ → PGame
a✝ : β✝ → PGame
⊢ (mk α✝¹ β✝¹ a✝³ a✝² + mk α✝ β✝ a✝¹ a✝).moveLeft (toLeftMovesAdd (Sum.inl i)) =
    (mk α✝¹ β✝¹ a✝³ a✝²).moveLeft i + mk α✝ β✝ a✝¹ a✝
state_after: no goals
Theorem: Int.bodd_add
File: Mathlib/Data/Int/Bitwise.lean

tactic: cases' m with m m <;>
cases' n with n n <;>
simp only [ofNat_eq_coe, ofNat_add_negSucc, negSucc_add_ofNat,
           negSucc_add_negSucc, bodd_subNatNat] <;>
simp only [negSucc_coe, bodd_neg, bodd_coe, ← Nat.bodd_add, Bool.xor_comm, ← Nat.cast_add]
state_before: m n : ℤ
⊢ (m + n).bodd = xor m.bodd n.bodd
state_after: case negSucc.negSucc
m n : ℕ
⊢ ((m + n).succ + 1).bodd = (m + 1 + (n + 1)).bodd

tactic: rw [← Nat.succ_add, add_assoc]
state_before: case negSucc.negSucc
m n : ℕ
⊢ ((m + n).succ + 1).bodd = (m + 1 + (n + 1)).bodd
state_after: no goals
Theorem: Equiv.Perm.cycleType_eq
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

tactic: have hl : l.Nodup := nodup_of_pairwise_disjoint_cycles h1 h2
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
⊢ σ.cycleType = ↑(List.map (Finset.card ∘ support) l)
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ σ.cycleType = ↑(List.map (Finset.card ∘ support) l)

tactic: rw [cycleType_eq' l.toFinset]
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ σ.cycleType = ↑(List.map (Finset.card ∘ support) l)
state_after: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ Multiset.map (Finset.card ∘ support) l.toFinset.val = ↑(List.map (Finset.card ∘ support) l)

case h1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ ∀ f ∈ l.toFinset, f.IsCycle

case h2
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ (↑l.toFinset).Pairwise Disjoint

case h0
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ l.toFinset.noncommProd id ⋯ = σ

tactic: simpa using h1
state_before: case h1
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ ∀ f ∈ l.toFinset, f.IsCycle
state_after: no goals

tactic: simpa [hl] using h2
state_before: case h2
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ (↑l.toFinset).Pairwise Disjoint
state_after: no goals

tactic: simp [hl, h0]
state_before: case h0
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
σ : Perm α
l : List (Perm α)
h0 : l.prod = σ
h1 : ∀ σ ∈ l, σ.IsCycle
h2 : List.Pairwise Disjoint l
hl : l.Nodup
⊢ l.toFinset.noncommProd id ⋯ = σ
state_after: no goals
Theorem: MeasureTheory.le_iInf_lintegral
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: simp only [← iInf_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
f : ι → α → ℝ≥0∞
⊢ ∫⁻ (a : α), ⨅ i, f i a ∂μ ≤ ⨅ i, ∫⁻ (a : α), f i a ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
f : ι → α → ℝ≥0∞
⊢ ∫⁻ (a : α), (⨅ i, f i) a ∂μ ≤ ⨅ i, ∫⁻ (a : α), f i a ∂μ

tactic: exact (monotone_lintegral μ).map_iInf_le
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
ι : Sort u_5
f : ι → α → ℝ≥0∞
⊢ ∫⁻ (a : α), (⨅ i, f i) a ∂μ ≤ ⨅ i, ∫⁻ (a : α), f i a ∂μ
state_after: no goals
Theorem: Asymptotics.isLittleO_pow_sub_sub
File: Mathlib/Analysis/Asymptotics/Asymptotics.lean

tactic: simpa only [isLittleO_norm_right, pow_one] using isLittleO_pow_sub_pow_sub x₀ h
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
G : Type u_5
E' : Type u_6
F' : Type u_7
G' : Type u_8
E'' : Type u_9
F'' : Type u_10
G'' : Type u_11
E''' : Type u_12
R : Type u_13
R' : Type u_14
𝕜 : Type u_15
𝕜' : Type u_16
inst✝¹³ : Norm E
inst✝¹² : Norm F
inst✝¹¹ : Norm G
inst✝¹⁰ : SeminormedAddCommGroup E'
inst✝⁹ : SeminormedAddCommGroup F'
inst✝⁸ : SeminormedAddCommGroup G'
inst✝⁷ : NormedAddCommGroup E''
inst✝⁶ : NormedAddCommGroup F''
inst✝⁵ : NormedAddCommGroup G''
inst✝⁴ : SeminormedRing R
inst✝³ : SeminormedAddGroup E'''
inst✝² : SeminormedRing R'
inst✝¹ : NormedDivisionRing 𝕜
inst✝ : NormedDivisionRing 𝕜'
c c' c₁ c₂ : ℝ
f : α → E
g : α → F
k : α → G
f' : α → E'
g' : α → F'
k' : α → G'
f'' : α → E''
g'' : α → F''
k'' : α → G''
l l' : Filter α
x₀ : E'
m : ℕ
h : 1 < m
⊢ (fun x => ‖x - x₀‖ ^ m) =o[𝓝 x₀] fun x => x - x₀
state_after: no goals
Theorem: Fin.get_list
File: .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean

tactic: simp [getElem_list]
state_before: n : Nat
i : Fin (list n).length
⊢ (list n).get i = cast ⋯ i
state_after: no goals
Theorem: Finset.sdiff_insert
File: Mathlib/Data/Finset/Basic.lean

tactic: simp_rw [← sdiff_singleton_eq_erase, insert_eq, sdiff_sdiff_left', sdiff_union_distrib,
  inter_comm]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ t✝ u v : Finset α
a b : α
s t : Finset α
x : α
⊢ s \ insert x t = (s \ t).erase x
state_after: no goals
Theorem: mem_posTangentConeAt_of_segment_subset'
File: Mathlib/Analysis/Calculus/LocalExtr/Basic.lean

tactic: simpa only [add_sub_cancel_left] using mem_posTangentConeAt_of_segment_subset h
state_before: E : Type u
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace ℝ E
f : E → ℝ
a : E
f' : E →L[ℝ] ℝ
s : Set E
x y : E
h : segment ℝ x (x + y) ⊆ s
⊢ y ∈ posTangentConeAt s x
state_after: no goals
Theorem: isIrreducible_iff_singleton
File: Mathlib/Topology/Separation.lean

tactic: rw [IsIrreducible, isPreirreducible_iff_subsingleton,
  exists_eq_singleton_iff_nonempty_subsingleton]
state_before: X : Type u_1
Y : Type u_2
inst✝⁴ : TopologicalSpace X
inst✝³ : FirstCountableTopology X
Z : Type u_3
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : T2Space X
S : Set X
⊢ IsIrreducible S ↔ ∃ x, S = {x}
state_after: no goals
Theorem: CategoryTheory.Limits.cokernelIsoOfEq_trans
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

tactic: cases w₁
state_before: C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f g h : X ⟶ Y
inst✝² : HasCokernel f
inst✝¹ : HasCokernel g
inst✝ : HasCokernel h
w₁ : f = g
w₂ : g = h
⊢ cokernelIsoOfEq w₁ ≪≫ cokernelIsoOfEq w₂ = cokernelIsoOfEq ⋯
state_after: case refl
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f h : X ⟶ Y
inst✝² : HasCokernel f
inst✝¹ : HasCokernel h
inst✝ : HasCokernel f
w₂ : f = h
⊢ cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq w₂ = cokernelIsoOfEq ⋯

tactic: cases w₂
state_before: case refl
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f h : X ⟶ Y
inst✝² : HasCokernel f
inst✝¹ : HasCokernel h
inst✝ : HasCokernel f
w₂ : f = h
⊢ cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq w₂ = cokernelIsoOfEq ⋯
state_after: case refl.refl
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f : X ⟶ Y
inst✝² inst✝¹ inst✝ : HasCokernel f
⊢ cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq ⋯ = cokernelIsoOfEq ⋯

tactic: ext
state_before: case refl.refl
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f : X ⟶ Y
inst✝² inst✝¹ inst✝ : HasCokernel f
⊢ cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq ⋯ = cokernelIsoOfEq ⋯
state_after: case refl.refl.w.h
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f : X ⟶ Y
inst✝² inst✝¹ inst✝ : HasCokernel f
⊢ coequalizer.π f 0 ≫ (cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq ⋯).hom = coequalizer.π f 0 ≫ (cokernelIsoOfEq ⋯).hom

tactic: simp [cokernelIsoOfEq]
state_before: case refl.refl.w.h
C : Type u
inst✝⁵ : Category.{v, u} C
inst✝⁴ : HasZeroMorphisms C
X Y : C
f✝ : X ⟶ Y
inst✝³ : HasCokernel f✝
f : X ⟶ Y
inst✝² inst✝¹ inst✝ : HasCokernel f
⊢ coequalizer.π f 0 ≫ (cokernelIsoOfEq ⋯ ≪≫ cokernelIsoOfEq ⋯).hom = coequalizer.π f 0 ≫ (cokernelIsoOfEq ⋯).hom
state_after: no goals
Theorem: Ring.choose_natCast
File: Mathlib/RingTheory/Binomial.lean

tactic: refine nsmul_right_injective (Nat.factorial k) (Nat.factorial_ne_zero k) ?_
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
n k : ℕ
⊢ choose (↑n) k = ↑(n.choose k)
state_after: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
n k : ℕ
⊢ (fun x => k.factorial • x) (choose (↑n) k) = (fun x => k.factorial • x) ↑(n.choose k)

tactic: simp only
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
n k : ℕ
⊢ (fun x => k.factorial • x) (choose (↑n) k) = (fun x => k.factorial • x) ↑(n.choose k)
state_after: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
n k : ℕ
⊢ k.factorial • choose (↑n) k = k.factorial • ↑(n.choose k)

tactic: rw [← descPochhammer_eq_factorial_smul_choose, nsmul_eq_mul, ← Nat.cast_mul,
  ← Nat.descFactorial_eq_factorial_mul_choose, ← descPochhammer_smeval_eq_descFactorial]
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
n k : ℕ
⊢ k.factorial • choose (↑n) k = k.factorial • ↑(n.choose k)
state_after: no goals
Theorem: MvPolynomial.bind₂_monomial
File: Mathlib/Algebra/MvPolynomial/Monad.lean

tactic: simp only [monomial_eq, RingHom.map_mul, bind₂_C_right, Finsupp.prod, map_prod,
  map_pow, bind₂_X_right, C_1, one_mul]
state_before: σ : Type u_1
τ : Type u_2
R : Type u_3
S : Type u_4
T : Type u_5
inst✝² : CommSemiring R
inst✝¹ : CommSemiring S
inst✝ : CommSemiring T
f✝ : σ → MvPolynomial τ R
f : R →+* MvPolynomial σ S
d : σ →₀ ℕ
r : R
⊢ (bind₂ f) ((monomial d) r) = f r * (monomial d) 1
state_after: no goals
Theorem: CompositionSeries.eq_of_head_eq_head_of_last_eq_last_of_length_eq_zero
File: Mathlib/Order/JordanHolder.lean

tactic: have : ∀ x, x ∈ s₁ ↔ x = s₁.last := fun x =>
  ⟨fun hx =>  subsingleton_of_length_eq_zero hs₁0 hx s₁.last_mem, fun hx => hx.symm ▸ s₁.last_mem⟩
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
⊢ s₁ = s₂
state_after: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
⊢ s₁ = s₂

tactic: have : ∀ x, x ∈ s₂ ↔ x = s₂.last := fun x =>
  ⟨fun hx =>
    subsingleton_of_length_eq_zero
      (length_eq_zero_of_head_eq_head_of_last_eq_last_of_length_eq_zero hb ht
        hs₁0) hx s₂.last_mem,
    fun hx => hx.symm ▸ s₂.last_mem⟩
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
⊢ s₁ = s₂
state_after: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this✝ : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
this : ∀ (x : X), x ∈ s₂ ↔ x = last s₂
⊢ s₁ = s₂

tactic: ext
state_before: X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this✝ : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
this : ∀ (x : X), x ∈ s₂ ↔ x = last s₂
⊢ s₁ = s₂
state_after: case h
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this✝ : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
this : ∀ (x : X), x ∈ s₂ ↔ x = last s₂
x✝ : X
⊢ x✝ ∈ s₁ ↔ x✝ ∈ s₂

tactic: simp [*]
state_before: case h
X : Type u
inst✝¹ : Lattice X
inst✝ : JordanHolderLattice X
s₁ s₂ : CompositionSeries X
hb : head s₁ = head s₂
ht : last s₁ = last s₂
hs₁0 : s₁.length = 0
this✝ : ∀ (x : X), x ∈ s₁ ↔ x = last s₁
this : ∀ (x : X), x ∈ s₂ ↔ x = last s₂
x✝ : X
⊢ x✝ ∈ s₁ ↔ x✝ ∈ s₂
state_after: no goals
Theorem: List.leftpad_prefix
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: simp only [IsPrefix, leftpad]
state_before: α : Type u_1
n : Nat
a : α
l : List α
⊢ replicate (n - l.length) a <+: leftpad n a l
state_after: α : Type u_1
n : Nat
a : α
l : List α
⊢ ∃ t, replicate (n - l.length) a ++ t = replicate (n - l.length) a ++ l

tactic: exact Exists.intro l rfl
state_before: α : Type u_1
n : Nat
a : α
l : List α
⊢ ∃ t, replicate (n - l.length) a ++ t = replicate (n - l.length) a ++ l
state_after: no goals
Theorem: Finset.preimage_inv
File: Mathlib/Data/Finset/Pointwise.lean

tactic: rw [coe_preimage, Set.inv_preimage, coe_inv]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝¹ : DecidableEq α
inst✝ : InvolutiveInv α
s✝ : Finset α
a : α
s : Finset α
⊢ ↑(s.preimage (fun x => x⁻¹) ⋯) = ↑s⁻¹
state_after: no goals
Theorem: iSup_iSup_eq_left
File: Mathlib/Order/CompleteLattice.lean

tactic: rintro rfl
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b✝ : α
b : β
f : (x : β) → x = b → α
c : β
⊢ ∀ (i : c = b), f c i ≤ f b ⋯
state_after: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
c : β
f : (x : β) → x = c → α
⊢ f c ⋯ ≤ f c ⋯

tactic: rfl
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a b : α
c : β
f : (x : β) → x = c → α
⊢ f c ⋯ ≤ f c ⋯
state_after: no goals
Theorem: Matrix.smul_one_eq_diagonal
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp_rw [← diagonal_one, ← diagonal_smul, Pi.smul_def, smul_eq_mul, mul_one]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : NonAssocSemiring α
inst✝ : DecidableEq m
a : α
⊢ a • 1 = diagonal fun x => a
state_after: no goals
Theorem: Submodule.prod_bot
File: Mathlib/LinearAlgebra/Span.lean

tactic: ext ⟨x, y⟩
state_before: R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
x : M
p p' : Submodule R M
inst✝⁶ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
F : Type u_8
inst✝³ : FunLike F M M₂
inst✝² : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
M' : Type u_9
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
q₁ q₁' : Submodule R M'
⊢ ⊥.prod ⊥ = ⊥
state_after: case h.mk
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
x✝ : M
p p' : Submodule R M
inst✝⁶ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
F : Type u_8
inst✝³ : FunLike F M M₂
inst✝² : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
M' : Type u_9
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
q₁ q₁' : Submodule R M'
x : M
y : M'
⊢ (x, y) ∈ ⊥.prod ⊥ ↔ (x, y) ∈ ⊥

tactic: simp [Prod.zero_eq_mk]
state_before: case h.mk
R : Type u_1
R₂ : Type u_2
K : Type u_3
M : Type u_4
M₂ : Type u_5
V : Type u_6
S : Type u_7
inst✝⁹ : Semiring R
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
x✝ : M
p p' : Submodule R M
inst✝⁶ : Semiring R₂
σ₁₂ : R →+* R₂
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
F : Type u_8
inst✝³ : FunLike F M M₂
inst✝² : SemilinearMapClass F σ₁₂ M M₂
s t : Set M
M' : Type u_9
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
q₁ q₁' : Submodule R M'
x : M
y : M'
⊢ (x, y) ∈ ⊥.prod ⊥ ↔ (x, y) ∈ ⊥
state_after: no goals
Theorem: padicValNat_def'
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: simp [padicValNat, hp, hn]
state_before: p n : ℕ
hp : p ≠ 1
hn : 0 < n
⊢ ↑(padicValNat p n) = multiplicity p n
state_after: no goals
Theorem: WeierstrassCurve.leadingCoeff_preΨ
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Degree.lean

tactic: rw [leadingCoeff, W.natDegree_preΨ h, coeff_preΨ]
state_before: R : Type u
inst✝ : CommRing R
W : WeierstrassCurve R
n : ℤ
h : ↑n ≠ 0
⊢ (W.preΨ n).leadingCoeff = ↑(if Even n then n / 2 else n)
state_after: no goals
Theorem: Set.image_empty
File: Mathlib/Data/Set/Image.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s t : Set α
f : α → β
⊢ f '' ∅ = ∅
state_after: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s t : Set α
f : α → β
x✝ : β
⊢ x✝ ∈ f '' ∅ ↔ x✝ ∈ ∅

tactic: simp
state_before: case h
α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
f✝ : α → β
s t : Set α
f : α → β
x✝ : β
⊢ x✝ ∈ f '' ∅ ↔ x✝ ∈ ∅
state_after: no goals
Theorem: Matrix.diagonal_apply_ne
File: Mathlib/Data/Matrix/Basic.lean

tactic: simp [diagonal, h]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
m' : o → Type u_5
n' : o → Type u_6
R : Type u_7
S : Type u_8
α : Type v
β : Type w
γ : Type u_9
inst✝¹ : DecidableEq n
inst✝ : Zero α
d : n → α
i j : n
h : i ≠ j
⊢ diagonal d i j = 0
state_after: no goals
Theorem: CategoryTheory.monoidalComp_refl
File: Mathlib/Tactic/CategoryTheory/MonoidalComp.lean

tactic: simp [monoidalComp]
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : MonoidalCategory C
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
⊢ f ⊗≫ g = f ≫ g
state_after: no goals
Theorem: HurwitzZeta.continuousOn_cosKernel
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: induction' a using QuotientAddGroup.induction_on' with a'
state_before: a : UnitAddCircle
⊢ ContinuousOn (cosKernel a) (Ioi 0)
state_after: case H
a' : ℝ
⊢ ContinuousOn (cosKernel ↑a') (Ioi 0)

tactic: apply continuous_re.comp_continuousOn (f := fun x ↦ (cosKernel a' x : ℂ))
state_before: case H
a' : ℝ
⊢ ContinuousOn (cosKernel ↑a') (Ioi 0)
state_after: case H
a' : ℝ
⊢ ContinuousOn (fun x => ↑(cosKernel (↑a') x)) (Ioi 0)

tactic: simp only [cosKernel_def]
state_before: case H
a' : ℝ
⊢ ContinuousOn (fun x => ↑(cosKernel (↑a') x)) (Ioi 0)
state_after: case H
a' : ℝ
⊢ ContinuousOn (fun x => jacobiTheta₂ (↑a') (I * ↑x)) (Ioi 0)

tactic: refine ContinuousAt.continuousOn (fun x hx ↦ ?_)
state_before: case H
a' : ℝ
⊢ ContinuousOn (fun x => jacobiTheta₂ (↑a') (I * ↑x)) (Ioi 0)
state_after: case H
a' x : ℝ
hx : x ∈ Ioi 0
⊢ ContinuousAt (fun x => jacobiTheta₂ (↑a') (I * ↑x)) x

tactic: have : 0 < im (I * x) := by rwa [mul_im, I_re, I_im, zero_mul, one_mul, zero_add, ofReal_re]
state_before: case H
a' x : ℝ
hx : x ∈ Ioi 0
⊢ ContinuousAt (fun x => jacobiTheta₂ (↑a') (I * ↑x)) x
state_after: case H
a' x : ℝ
hx : x ∈ Ioi 0
this : 0 < (I * ↑x).im
⊢ ContinuousAt (fun x => jacobiTheta₂ (↑a') (I * ↑x)) x

tactic: exact (continuousAt_jacobiTheta₂ a' this).comp (f := fun u : ℝ ↦ (_, I * u)) (by fun_prop)
state_before: case H
a' x : ℝ
hx : x ∈ Ioi 0
this : 0 < (I * ↑x).im
⊢ ContinuousAt (fun x => jacobiTheta₂ (↑a') (I * ↑x)) x
state_after: no goals

tactic: rwa [mul_im, I_re, I_im, zero_mul, one_mul, zero_add, ofReal_re]
state_before: a' x : ℝ
hx : x ∈ Ioi 0
⊢ 0 < (I * ↑x).im
state_after: no goals

tactic: fun_prop
state_before: a' x : ℝ
hx : x ∈ Ioi 0
this : 0 < (I * ↑x).im
⊢ ContinuousAt (fun u => ({ re := a', im := 0 }, I * ↑u)) x
state_after: no goals