1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Polynomial.leadingCoeff_sub_of_degree_eq
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: replace h : degree p = degree (-q) := by rwa [q.degree_neg]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : p.degree = q.degree
hlc : p.leadingCoeff ≠ q.leadingCoeff
⊢ (p - q).leadingCoeff = p.leadingCoeff - q.leadingCoeff
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
hlc : p.leadingCoeff ≠ q.leadingCoeff
h : p.degree = (-q).degree
⊢ (p - q).leadingCoeff = p.leadingCoeff - q.leadingCoeff

tactic: replace hlc : leadingCoeff p + leadingCoeff (-q) ≠ 0 := by
  rwa [← sub_ne_zero, sub_eq_add_neg, ← q.leadingCoeff_neg] at hlc
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
hlc : p.leadingCoeff ≠ q.leadingCoeff
h : p.degree = (-q).degree
⊢ (p - q).leadingCoeff = p.leadingCoeff - q.leadingCoeff
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : p.degree = (-q).degree
hlc : p.leadingCoeff + (-q).leadingCoeff ≠ 0
⊢ (p - q).leadingCoeff = p.leadingCoeff - q.leadingCoeff

tactic: rw [sub_eq_add_neg, leadingCoeff_add_of_degree_eq h hlc, leadingCoeff_neg, sub_eq_add_neg]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : p.degree = (-q).degree
hlc : p.leadingCoeff + (-q).leadingCoeff ≠ 0
⊢ (p - q).leadingCoeff = p.leadingCoeff - q.leadingCoeff
state_after: no goals

tactic: rwa [q.degree_neg]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
h : p.degree = q.degree
hlc : p.leadingCoeff ≠ q.leadingCoeff
⊢ p.degree = (-q).degree
state_after: no goals

tactic: rwa [← sub_ne_zero, sub_eq_add_neg, ← q.leadingCoeff_neg] at hlc
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Ring R
p q : R[X]
hlc : p.leadingCoeff ≠ q.leadingCoeff
h : p.degree = (-q).degree
⊢ p.leadingCoeff + (-q).leadingCoeff ≠ 0
state_after: no goals
Theorem: Polynomial.contract_expand
File: Mathlib/Algebra/Polynomial/Expand.lean

tactic: ext
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
hp : p ≠ 0
⊢ contract p ((expand R p) f) = f
state_after: case a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
hp : p ≠ 0
n✝ : ℕ
⊢ (contract p ((expand R p) f)).coeff n✝ = f.coeff n✝

tactic: simp [coeff_contract hp, coeff_expand hp.bot_lt, Nat.mul_div_cancel _ hp.bot_lt]
state_before: case a
R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p q : ℕ
f : R[X]
hp : p ≠ 0
n✝ : ℕ
⊢ (contract p ((expand R p) f)).coeff n✝ = f.coeff n✝
state_after: no goals
Theorem: div_le_iff
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [div_mul_cancel₀ _ (ne_of_lt hb).symm]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 < b
h : a / b ≤ c
⊢ a = a / b * b
state_after: no goals

tactic: refine (div_eq_iff (ne_of_gt hb)).mpr rfl
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 < b
h : a ≤ c * b
⊢ c * b / b = c
state_after: no goals
Theorem: Finsupp.total_unique
File: Mathlib/LinearAlgebra/Finsupp.lean

tactic: rw [← total_single, ← unique_single l]
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝¹⁰ : Semiring R
inst✝⁹ : Semiring S
inst✝⁸ : AddCommMonoid M
inst✝⁷ : Module R M
inst✝⁶ : AddCommMonoid N
inst✝⁵ : Module R N
inst✝⁴ : AddCommMonoid P
inst✝³ : Module R P
α' : Type u_7
M' : Type u_8
inst✝² : AddCommMonoid M'
inst✝¹ : Module R M'
v✝ : α → M
v' : α' → M'
inst✝ : Unique α
l : α →₀ R
v : α → M
⊢ (Finsupp.total α M R v) l = l default • v default
state_after: no goals
Theorem: SeminormedGroup.uniformCauchySeqOn_iff_tendstoUniformlyOn_one
File: Mathlib/Analysis/Normed/Group/Basic.lean

tactic: rw [tendstoUniformlyOn_iff_tendstoUniformlyOnFilter,
  uniformCauchySeqOn_iff_uniformCauchySeqOnFilter,
  SeminormedGroup.uniformCauchySeqOnFilter_iff_tendstoUniformlyOnFilter_one]
state_before: 𝓕 : Type u_1
𝕜 : Type u_2
α : Type u_3
ι : Type u_4
κ : Type u_5
E : Type u_6
F : Type u_7
G : Type u_8
inst✝³ : SeminormedGroup E
inst✝² : SeminormedGroup F
inst✝¹ : SeminormedGroup G
s✝ : Set E
a a₁ a₂ b b₁ b₂ : E
r r₁ r₂ : ℝ
inst✝ : FunLike 𝓕 E F
f : ι → κ → G
s : Set κ
l : Filter ι
⊢ UniformCauchySeqOn f l s ↔ TendstoUniformlyOn (fun n z => f n.1 z / f n.2 z) 1 (l ×ˢ l) s
state_after: no goals
Theorem: Finset.disjoint_range_addLeftEmbedding
File: Mathlib/Data/Finset/Image.lean

tactic: simp [disjoint_left]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s : Finset α
a b : ℕ
⊢ _root_.Disjoint (range a) (map (addLeftEmbedding a) (range b))
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s : Finset α
a b : ℕ
⊢ ∀ ⦃a_1 : ℕ⦄, a_1 < a → ∀ x < b, ¬a + x = a_1

tactic: omega
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
f : α ↪ β
s : Finset α
a b : ℕ
⊢ ∀ ⦃a_1 : ℕ⦄, a_1 < a → ∀ x < b, ¬a + x = a_1
state_after: no goals
Theorem: Multiset.sum_nat_mod
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

tactic: induction s using Multiset.induction <;> simp [Nat.add_mod, *]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s : Multiset ℕ
n : ℕ
⊢ s.sum % n = (map (fun x => x % n) s).sum % n
state_after: no goals
Theorem: Matrix.submatrix_updateColumn_equiv
File: Mathlib/Data/Matrix/RowCol.lean

tactic: simp_rw [Equiv.apply_symm_apply]
state_before: l : Type u_1
m : Type u_2
n : Type u_3
o : Type u_4
R : Type u_5
α : Type v
β : Type w
ι : Type u_6
M : Matrix m n α
i : m
j✝ : n
b : n → α
c✝ : m → α
inst✝¹ : DecidableEq o
inst✝ : DecidableEq n
A : Matrix m n α
j : n
c : m → α
e : l ≃ m
f : o ≃ n
⊢ (A.updateColumn j c).submatrix ⇑e ⇑f = (A.updateColumn (f (f.symm j)) fun i => c (e (e.symm i))).submatrix ⇑e ⇑f
state_after: no goals
Theorem: Batteries.RBNode.reverse_setBlack
File: .lake/packages/batteries/Batteries/Data/RBMap/WF.lean

tactic: unfold setBlack
state_before: α : Type u_1
t : RBNode α
⊢ t.setBlack.reverse = t.reverse.setBlack
state_after: α : Type u_1
t : RBNode α
⊢ (match t with
      | nil => nil
      | node c l v r => node black l v r).reverse =
    match t.reverse with
    | nil => nil
    | node c l v r => node black l v r

tactic: split <;> simp
state_before: α : Type u_1
t : RBNode α
⊢ (match t with
      | nil => nil
      | node c l v r => node black l v r).reverse =
    match t.reverse with
    | nil => nil
    | node c l v r => node black l v r
state_after: no goals
Theorem: Partrec.comp
File: Mathlib/Computability/Partrec.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : β →. σ
g : α → β
hf : Partrec f
hg : Computable g
n : ℕ
⊢ (do
      let n ← (↑(decode n)).bind fun a => Part.map encode (↑g a)
      (↑(decode n)).bind fun a => Part.map encode (f a)) =
    (↑(decode n)).bind fun a => Part.map encode ((fun a => f (g a)) a)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : β →. σ
g : α → β
hf : Partrec f
hg : Computable g
n : ℕ
⊢ (((↑(decode n)).bind fun a => Part.some (encode (g a))).bind fun n =>
      (↑(decode n)).bind fun a => Part.map encode (f a)) =
    (↑(decode n)).bind fun a => Part.map encode (f (g a))

tactic: cases' e : decode (α := α) n with a <;> simp [e, encodek]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
f : β →. σ
g : α → β
hf : Partrec f
hg : Computable g
n : ℕ
⊢ (((↑(decode n)).bind fun a => Part.some (encode (g a))).bind fun n =>
      (↑(decode n)).bind fun a => Part.map encode (f a)) =
    (↑(decode n)).bind fun a => Part.map encode (f (g a))
state_after: no goals
Theorem: map_comap_subtype_coe
File: Mathlib/MeasureTheory/Measure/Restrict.lean

tactic: rw [(MeasurableEmbedding.subtype_coe hs).map_comap, Subtype.range_coe]
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
s : Set α
hs : MeasurableSet s
μ : Measure α
⊢ Measure.map Subtype.val (Measure.comap Subtype.val μ) = μ.restrict s
state_after: no goals
Theorem: SimpleGraph.subgraphOfAdj_le_of_adj
File: Mathlib/Combinatorics/SimpleGraph/Subgraph.lean

tactic: constructor
state_before: ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ G.subgraphOfAdj ⋯ ≤ H
state_after: case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ (G.subgraphOfAdj ⋯).verts ⊆ H.verts

case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ ∀ ⦃v_1 w_1 : V⦄, (G.subgraphOfAdj ⋯).Adj v_1 w_1 → H.Adj v_1 w_1

tactic: intro x
state_before: case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ (G.subgraphOfAdj ⋯).verts ⊆ H.verts
state_after: case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
x : V
⊢ x ∈ (G.subgraphOfAdj ⋯).verts → x ∈ H.verts

tactic: rintro (rfl | rfl) <;> simp [H.edge_vert h, H.edge_vert h.symm]
state_before: case left
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
x : V
⊢ x ∈ (G.subgraphOfAdj ⋯).verts → x ∈ H.verts
state_after: no goals

tactic: simp only [subgraphOfAdj_adj, Sym2.eq, Sym2.rel_iff]
state_before: case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ ∀ ⦃v_1 w_1 : V⦄, (G.subgraphOfAdj ⋯).Adj v_1 w_1 → H.Adj v_1 w_1
state_after: case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ ∀ ⦃v_1 w_1 : V⦄, v = v_1 ∧ w = w_1 ∨ v = w_1 ∧ w = v_1 → H.Adj v_1 w_1

tactic: rintro _ _ (⟨rfl, rfl⟩ | ⟨rfl, rfl⟩) <;> simp [h, h.symm]
state_before: case right
ι : Sort u_1
V : Type u
W : Type v
G : SimpleGraph V
G' : SimpleGraph W
v w : V
H : G.Subgraph
h : H.Adj v w
⊢ ∀ ⦃v_1 w_1 : V⦄, v = v_1 ∧ w = w_1 ∨ v = w_1 ∧ w = v_1 → H.Adj v_1 w_1
state_after: no goals
Theorem: Nat.isUnit_iff
File: Mathlib/Algebra/Group/Nat.lean

tactic: rintro ⟨u, rfl⟩
state_before: m n✝ n : ℕ
⊢ IsUnit n → n = 1
state_after: case intro
m n : ℕ
u : ℕˣ
⊢ ↑u = 1

tactic: obtain rfl := Nat.units_eq_one u
state_before: case intro
m n : ℕ
u : ℕˣ
⊢ ↑u = 1
state_after: case intro
m n : ℕ
⊢ ↑1 = 1

tactic: rfl
state_before: case intro
m n : ℕ
⊢ ↑1 = 1
state_after: no goals
Theorem: Rel.preimage_inv
File: Mathlib/Data/Rel.lean

tactic: rw [preimage, inv_inv]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : Rel α β
s : Set α
⊢ r.inv.preimage s = r.image s
state_after: no goals
Theorem: isMulFreimanHom_two
File: Mathlib/Combinatorics/Additive/FreimanHom.lean

tactic: aesop (add simp [Multiset.card_eq_two])
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : CommMonoid α
inst✝¹ : CommMonoid β
inst✝ : CommMonoid γ
A A₁ A₂ : Set α
B B₁ B₂ : Set β
C : Set γ
f f₁ f₂ : α → β
g : β → γ
m n : ℕ
hf : MapsTo f A B ∧ ∀ a ∈ A, ∀ b ∈ A, ∀ c ∈ A, ∀ d ∈ A, a * b = c * d → f a * f b = f c * f d
⊢ ∀ ⦃s t : Multiset α⦄,
    (∀ ⦃x : α⦄, x ∈ s → x ∈ A) →
      (∀ ⦃x : α⦄, x ∈ t → x ∈ A) → card s = 2 → card t = 2 → s.prod = t.prod → (map f s).prod = (map f t).prod
state_after: no goals
Theorem: CategoryTheory.isIso_of_coyoneda_map_bijective
File: Mathlib/CategoryTheory/Yoneda.lean

tactic: obtain ⟨g, hg : f ≫ g = 𝟙 X⟩ := (hf X).2 (𝟙 X)
state_before: C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
hf : ∀ (T : C), Function.Bijective fun x => f ≫ x
⊢ IsIso f
state_after: case intro
C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
hf : ∀ (T : C), Function.Bijective fun x => f ≫ x
g : Y ⟶ X
hg : f ≫ g = 𝟙 X
⊢ IsIso f

tactic: refine ⟨g, hg, (hf _).1 ?_⟩
state_before: case intro
C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
hf : ∀ (T : C), Function.Bijective fun x => f ≫ x
g : Y ⟶ X
hg : f ≫ g = 𝟙 X
⊢ IsIso f
state_after: case intro
C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
hf : ∀ (T : C), Function.Bijective fun x => f ≫ x
g : Y ⟶ X
hg : f ≫ g = 𝟙 X
⊢ (fun x => f ≫ x) (g ≫ f) = (fun x => f ≫ x) (𝟙 Y)

tactic: simp only [Category.comp_id, ← Category.assoc, hg, Category.id_comp]
state_before: case intro
C : Type u₁
inst✝ : Category.{v₁, u₁} C
X Y : C
f : X ⟶ Y
hf : ∀ (T : C), Function.Bijective fun x => f ≫ x
g : Y ⟶ X
hg : f ≫ g = 𝟙 X
⊢ (fun x => f ≫ x) (g ≫ f) = (fun x => f ≫ x) (𝟙 Y)
state_after: no goals
Theorem: Profinite.NobelingProof.proj_eq_self
File: Mathlib/Topology/Category/Profinite/Nobeling.lean

tactic: ext i
state_before: I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
⊢ Proj J x = x
state_after: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ Proj J x i = x i

tactic: simp only [Proj, ite_eq_left_iff]
state_before: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ Proj J x i = x i
state_after: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ ¬J i → false = x i

tactic: contrapose!
state_before: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ ¬J i → false = x i
state_after: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ false ≠ x i → J i

tactic: simpa only [ne_comm] using h i
state_before: case h
I : Type u
inst✝⁴ : LinearOrder I
inst✝³ : IsWellOrder I fun x x_1 => x < x_1
C : Set (I → Bool)
J K L : I → Prop
inst✝² : (i : I) → Decidable (J i)
inst✝¹ : (i : I) → Decidable (K i)
inst✝ : (i : I) → Decidable (L i)
x : I → Bool
h : ∀ (i : I), x i ≠ false → J i
i : I
⊢ false ≠ x i → J i
state_after: no goals
Theorem: CategoryTheory.Limits.cokernelIsoOfEq_refl
File: Mathlib/CategoryTheory/Limits/Shapes/Kernels.lean

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

tactic: simp [cokernelIsoOfEq]
state_before: case w.h
C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
X Y : C
f : X ⟶ Y
inst✝ : HasCokernel f
h : f = f
⊢ coequalizer.π f 0 ≫ (cokernelIsoOfEq h).hom = coequalizer.π f 0 ≫ (Iso.refl (cokernel f)).hom
state_after: no goals
Theorem: CategoryTheory.OverPresheafAux.counitForward_naturality₁
File: Mathlib/CategoryTheory/Comma/Presheaf.lean

tactic: aesop_cat
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
F : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
X : C
G : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
η : F ⟶ G
s : (CostructuredArrow yoneda A)ᵒᵖ
x : F.obj s
⊢ yonedaCollectionPresheafMap₁ η ≫ yonedaCollectionPresheafToA G = yonedaCollectionPresheafToA F
state_after: no goals

tactic: simp
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
F : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
X : C
G : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
η : F ⟶ G
s : (CostructuredArrow yoneda A)ᵒᵖ
x : F.obj s
⊢ YonedaCollection.fst (counitForward G s.unop (η.app s x)).val =
    YonedaCollection.fst ((counitForward F s.unop x).map₁ (yonedaCollectionPresheafMap₁ η) ⋯).val
state_after: no goals

tactic: simp
state_before: C : Type u
inst✝ : Category.{v, u} C
A : Cᵒᵖ ⥤ Type v
F : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
X : C
G : (CostructuredArrow yoneda A)ᵒᵖ ⥤ Type v
η : F ⟶ G
s : (CostructuredArrow yoneda A)ᵒᵖ
x : F.obj s
⊢ G.map (eqToHom ⋯) (YonedaCollection.snd ((counitForward F s.unop x).map₁ (yonedaCollectionPresheafMap₁ η) ⋯).val) =
    YonedaCollection.snd (counitForward G s.unop (η.app s x)).val
state_after: no goals
Theorem: Substring.Valid.data_takeWhile
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: simp [(h.takeWhile _).toString, h.toString]
state_before: p : Char → Bool
x✝ : Substring
h✝ : x✝.Valid
w✝² w✝¹ w✝ : List Char
h : ValidFor w✝² w✝¹ w✝ x✝
⊢ (x✝.takeWhile p).toString.data = List.takeWhile p x✝.toString.data
state_after: no goals
Theorem: Polynomial.smul_eval
File: Mathlib/Algebra/Polynomial/GroupRingAction.lean

tactic: rw [← smul_eval_smul, smul_inv_smul]
state_before: M : Type u_1
inst✝⁶ : Monoid M
R : Type u_2
inst✝⁵ : Semiring R
inst✝⁴ : MulSemiringAction M R
S : Type u_3
inst✝³ : CommSemiring S
inst✝² : MulSemiringAction M S
G : Type u_4
inst✝¹ : Group G
inst✝ : MulSemiringAction G S
g : G
f : S[X]
x : S
⊢ eval x (g • f) = g • eval (g⁻¹ • x) f
state_after: no goals
Theorem: ascPochhammer_zero_eval_zero
File: Mathlib/RingTheory/Polynomial/Pochhammer.lean

tactic: simp
state_before: S : Type u
inst✝ : Semiring S
⊢ eval 0 (ascPochhammer S 0) = 1
state_after: no goals
Theorem: List.Chain.pairwise
File: Mathlib/Data/List/Chain.lean

tactic: simp only [mem_cons, forall_eq_or_imp, h, true_and_iff]
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b✝ : α
inst✝ : IsTrans α R
a b : α
l : List α
h : R a b
hb : Chain R b l
⊢ ∀ (a' : α), a' ∈ b :: l → R a a'
state_after: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b✝ : α
inst✝ : IsTrans α R
a b : α
l : List α
h : R a b
hb : Chain R b l
⊢ ∀ (a_1 : α), a_1 ∈ l → R a a_1

tactic: exact fun c hc => _root_.trans h (rel_of_pairwise_cons hb.pairwise hc)
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b✝ : α
inst✝ : IsTrans α R
a b : α
l : List α
h : R a b
hb : Chain R b l
⊢ ∀ (a_1 : α), a_1 ∈ l → R a a_1
state_after: no goals
Theorem: smul_ne_zero_iff
File: Mathlib/Algebra/Module/Defs.lean

tactic: rw [Ne, smul_eq_zero, not_or]
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝³ : Zero R
inst✝² : Zero M
inst✝¹ : SMulWithZero R M
inst✝ : NoZeroSMulDivisors R M
c : R
x : M
⊢ c • x ≠ 0 ↔ c ≠ 0 ∧ x ≠ 0
state_after: no goals
Theorem: FiniteDimensional.finite_of_finite
File: Mathlib/LinearAlgebra/FiniteDimensional.lean

tactic: cases nonempty_fintype K
state_before: K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : _root_.Finite K
inst✝ : FiniteDimensional K V
⊢ _root_.Finite V
state_after: case intro
K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : _root_.Finite K
inst✝ : FiniteDimensional K V
val✝ : Fintype K
⊢ _root_.Finite V

tactic: haveI := fintypeOfFintype K V
state_before: case intro
K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : _root_.Finite K
inst✝ : FiniteDimensional K V
val✝ : Fintype K
⊢ _root_.Finite V
state_after: case intro
K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : _root_.Finite K
inst✝ : FiniteDimensional K V
val✝ : Fintype K
this : Fintype V
⊢ _root_.Finite V

tactic: infer_instance
state_before: case intro
K : Type u
V : Type v
inst✝⁶ : DivisionRing K
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module K V
V₂ : Type v'
inst✝³ : AddCommGroup V₂
inst✝² : Module K V₂
inst✝¹ : _root_.Finite K
inst✝ : FiniteDimensional K V
val✝ : Fintype K
this : Fintype V
⊢ _root_.Finite V
state_after: no goals
Theorem: mul_le_of_le_one_right
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

tactic: simpa only [mul_one] using mul_le_mul_of_nonneg_left h ha
state_before: α : Type u_1
a b c d : α
inst✝³ : MulOneClass α
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : PosMulMono α
ha : 0 ≤ a
h : b ≤ 1
⊢ a * b ≤ a
state_after: no goals
Theorem: AlgebraicGeometry.Γ_map_morphismRestrict
File: Mathlib/AlgebraicGeometry/Restrict.lean

tactic: rw [Scheme.Γ_map_op, morphismRestrict_app f U ⊤, f.naturality_assoc, ← X.presheaf.map_comp]
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
⊢ Scheme.Γ.map (f ∣_ U).op = Y.presheaf.map (eqToHom ⋯).op ≫ Scheme.Hom.app f U ≫ X.presheaf.map (eqToHom ⋯).op
state_after: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
⊢ Scheme.Hom.app f (Scheme.ιOpens U ''ᵁ ⊤) ≫ X.presheaf.map (eqToHom ⋯).op =
    Scheme.Hom.app f (⋯.functor.obj ⊤) ≫
      X.presheaf.map (((Opens.map f.val.base).map (eqToHom ⋯).op.unop).op ≫ (eqToHom ⋯).op)

tactic: rfl
state_before: C : Type u₁
inst✝ : Category.{v, u₁} C
X Y : Scheme
f : X ⟶ Y
U : Opens ↑↑Y.toPresheafedSpace
⊢ Scheme.Hom.app f (Scheme.ιOpens U ''ᵁ ⊤) ≫ X.presheaf.map (eqToHom ⋯).op =
    Scheme.Hom.app f (⋯.functor.obj ⊤) ≫
      X.presheaf.map (((Opens.map f.val.base).map (eqToHom ⋯).op.unop).op ≫ (eqToHom ⋯).op)
state_after: no goals
Theorem: Field.finSepDegree_self
File: Mathlib/FieldTheory/SeparableDegree.lean

tactic: have : Cardinal.mk (Emb F F) = 1 := le_antisymm
  (Cardinal.le_one_iff_subsingleton.2 AlgHom.subsingleton)
  (Cardinal.one_le_iff_ne_zero.2 <| Cardinal.mk_ne_zero _)
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
⊢ finSepDegree F F = 1
state_after: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
this : Cardinal.mk (Emb F F) = 1
⊢ finSepDegree F F = 1

tactic: rw [finSepDegree, Nat.card, this, Cardinal.one_toNat]
state_before: F : Type u
E : Type v
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
K : Type w
inst✝¹ : Field K
inst✝ : Algebra F K
this : Cardinal.mk (Emb F F) = 1
⊢ finSepDegree F F = 1
state_after: no goals
Theorem: isOpen_iSup_iff
File: Mathlib/Topology/Order.lean

tactic: simp [setOf_isOpen_iSup]
state_before: α : Type u
ι : Sort v
t : ι → TopologicalSpace α
s : Set α
⊢ s ∈ {s | IsOpen s} ↔ s ∈ {x | ∀ (i : ι), IsOpen x}
state_after: no goals
Theorem: StrictConvexOn.add_convexOn
File: Mathlib/Analysis/Convex/Function.lean

tactic: rw [smul_add, smul_add, add_add_add_comm]
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
α : Type u_4
β : Type u_5
ι : Type u_6
inst✝⁵ : OrderedSemiring 𝕜
inst✝⁴ : AddCommMonoid E
inst✝³ : AddCommMonoid F
inst✝² : OrderedCancelAddCommMonoid β
inst✝¹ : SMul 𝕜 E
inst✝ : DistribMulAction 𝕜 β
s : Set E
f g : E → β
hf : StrictConvexOn 𝕜 s f
hg : ConvexOn 𝕜 s g
x : E
hx : x ∈ s
y : E
hy : y ∈ s
hxy : x ≠ y
a b : 𝕜
ha : 0 < a
hb : 0 < b
hab : a + b = 1
⊢ a • f x + b • f y + (a • g x + b • g y) = a • (f x + g x) + b • (f y + g y)
state_after: no goals