1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: AddMonoidAlgebra.of'_mul_modOf
File: Mathlib/Algebra/MonoidAlgebra/Division.lean

tactic: refine Finsupp.ext fun g' => ?_
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
⊢ of' k G g * x %ᵒᶠ g = 0
state_after: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
⊢ (of' k G g * x %ᵒᶠ g) g' = 0 g'

tactic: rw [Finsupp.zero_apply]
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
⊢ (of' k G g * x %ᵒᶠ g) g' = 0 g'
state_after: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
⊢ (of' k G g * x %ᵒᶠ g) g' = 0

tactic: obtain ⟨d, rfl⟩ | h := em (∃ d, g' = g + d)
state_before: k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
⊢ (of' k G g * x %ᵒᶠ g) g' = 0
state_after: case inl.intro
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
d : G
⊢ (of' k G g * x %ᵒᶠ g) (g + d) = 0

case inr
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
h : ¬∃ d, g' = g + d
⊢ (of' k G g * x %ᵒᶠ g) g' = 0

tactic: rw [modOf_apply_self_add]
state_before: case inl.intro
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
d : G
⊢ (of' k G g * x %ᵒᶠ g) (g + d) = 0
state_after: no goals

tactic: rw [modOf_apply_of_not_exists_add _ _ _ h, of'_apply, single_mul_apply_of_not_exists_add _ _ h]
state_before: case inr
k : Type u_1
G : Type u_2
inst✝¹ : Semiring k
inst✝ : AddCancelCommMonoid G
g : G
x : k[G]
g' : G
h : ¬∃ d, g' = g + d
⊢ (of' k G g * x %ᵒᶠ g) g' = 0
state_after: no goals
Theorem: Matrix.exists_iff
File: Mathlib/Data/Matrix/Reflection.lean

tactic: simp only [Exists, FinVec.exists_iff, exists_iff]
state_before: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
P : Matrix (Fin (m + 1)) (Fin n) α → Prop
⊢ Exists P ↔ ∃ x, P x
state_after: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
P : Matrix (Fin (m + 1)) (Fin n) α → Prop
⊢ (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x

tactic: exact Iff.symm Fin.exists_fin_succ_pi
state_before: l m✝ n✝ : ℕ
α : Type u_1
β : Type u_2
m n : ℕ
P : Matrix (Fin (m + 1)) (Fin n) α → Prop
⊢ (∃ r A, P (of (vecCons r A))) ↔ ∃ x, P x
state_after: no goals
Theorem: exists_nonneg_left_iff_sameRay
File: Mathlib/LinearAlgebra/Ray.lean

tactic: refine ⟨fun h => ?_, fun h => h.exists_nonneg_left hx⟩
state_before: R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hx : x ≠ 0
⊢ (∃ r, 0 ≤ r ∧ r • x = y) ↔ SameRay R x y
state_after: R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hx : x ≠ 0
h : ∃ r, 0 ≤ r ∧ r • x = y
⊢ SameRay R x y

tactic: rcases h with ⟨r, hr, rfl⟩
state_before: R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x y : M
hx : x ≠ 0
h : ∃ r, 0 ≤ r ∧ r • x = y
⊢ SameRay R x y
state_after: case intro.intro
R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x : M
hx : x ≠ 0
r : R
hr : 0 ≤ r
⊢ SameRay R x (r • x)

tactic: exact SameRay.sameRay_nonneg_smul_right x hr
state_before: case intro.intro
R : Type u_1
inst✝² : LinearOrderedField R
M : Type u_2
inst✝¹ : AddCommGroup M
inst✝ : Module R M
x : M
hx : x ≠ 0
r : R
hr : 0 ≤ r
⊢ SameRay R x (r • x)
state_after: no goals
Theorem: hasFDerivAt_of_restrictScalars
File: Mathlib/Analysis/Calculus/FDeriv/RestrictScalars.lean

tactic: rw [← H] at h
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
𝕜' : Type u_2
inst✝⁹ : NontriviallyNormedField 𝕜'
inst✝⁸ : NormedAlgebra 𝕜 𝕜'
E : Type u_3
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜' E
inst✝⁴ : IsScalarTower 𝕜 𝕜' E
F : Type u_4
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
f : E → F
f' : E →L[𝕜'] F
s : Set E
x : E
g' : E →L[𝕜] F
h : HasFDerivAt f g' x
H : restrictScalars 𝕜 f' = g'
⊢ HasFDerivAt f f' x
state_after: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
𝕜' : Type u_2
inst✝⁹ : NontriviallyNormedField 𝕜'
inst✝⁸ : NormedAlgebra 𝕜 𝕜'
E : Type u_3
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜' E
inst✝⁴ : IsScalarTower 𝕜 𝕜' E
F : Type u_4
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
f : E → F
f' : E →L[𝕜'] F
s : Set E
x : E
g' : E →L[𝕜] F
h : HasFDerivAt f (restrictScalars 𝕜 f') x
H : restrictScalars 𝕜 f' = g'
⊢ HasFDerivAt f f' x

tactic: exact .of_isLittleO h.1
state_before: 𝕜 : Type u_1
inst✝¹⁰ : NontriviallyNormedField 𝕜
𝕜' : Type u_2
inst✝⁹ : NontriviallyNormedField 𝕜'
inst✝⁸ : NormedAlgebra 𝕜 𝕜'
E : Type u_3
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : NormedSpace 𝕜' E
inst✝⁴ : IsScalarTower 𝕜 𝕜' E
F : Type u_4
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedSpace 𝕜' F
inst✝ : IsScalarTower 𝕜 𝕜' F
f : E → F
f' : E →L[𝕜'] F
s : Set E
x : E
g' : E →L[𝕜] F
h : HasFDerivAt f (restrictScalars 𝕜 f') x
H : restrictScalars 𝕜 f' = g'
⊢ HasFDerivAt f f' x
state_after: no goals
Theorem: SimpleGraph.card_ConnectedComponent_eq_rank_ker_lapMatrix
File: Mathlib/Combinatorics/SimpleGraph/LapMatrix.lean

tactic: rw [FiniteDimensional.finrank_eq_card_basis (lapMatrix_ker_basis G)]
state_before: V : Type u_1
R : Type u_2
inst✝³ : Fintype V
inst✝² : DecidableEq V
G : SimpleGraph V
inst✝¹ : DecidableRel G.Adj
inst✝ : DecidableEq G.ConnectedComponent
⊢ Fintype.card G.ConnectedComponent = FiniteDimensional.finrank ℝ ↥(LinearMap.ker (toLin' (lapMatrix ℝ G)))
state_after: no goals
Theorem: Basis.repr_range
File: Mathlib/LinearAlgebra/Basis.lean

tactic: rw [LinearEquiv.range, Finsupp.supported_univ]
state_before: ι : Type u_1
ι' : Type u_2
R : Type u_3
R₂ : Type u_4
K : Type u_5
M : Type u_6
M' : Type u_7
M'' : Type u_8
V : Type u
V' : Type u_9
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
b b₁ : Basis ι R M
i : ι
c : R
x : M
⊢ LinearMap.range ↑b.repr = Finsupp.supported R R univ
state_after: no goals
Theorem: CategoryTheory.Abelian.Pseudoelement.pseudo_surjective_of_epi
File: Mathlib/CategoryTheory/Abelian/Pseudoelements.lean

tactic: rw [Category.id_comp, ← pullback.condition, app_hom, Over.coe_hom]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
P Q : C
f : P ⟶ Q
inst✝ : Epi f
qbar : Pseudoelement Q
q : Over Q
⊢ 𝟙 (pullback f q.hom) ≫ ((fun g => app f g) (Over.mk pullback.fst)).hom = pullback.snd ≫ q.hom
state_after: no goals
Theorem: MvPowerSeries.inv_mul_cancel
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

tactic: rw [mul_comm, φ.mul_inv_cancel h]
state_before: σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
φ : MvPowerSeries σ k
h : (constantCoeff σ k) φ ≠ 0
⊢ φ⁻¹ * φ = 1
state_after: no goals
Theorem: Multiset.noncommFoldr_coe
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: simp only [noncommFoldr, coe_foldr, coe_attach, List.attach, List.attachWith, Function.comp]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
l : List α
comm : {x | x ∈ ↑l}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ noncommFoldr f (↑l) comm b = List.foldr f b l
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
l : List α
comm : {x | x ∈ ↑l}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ List.foldr (fun x => f ↑x) b (List.pmap Subtype.mk l ⋯) = List.foldr f b l

tactic: rw [← List.foldr_map]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
l : List α
comm : {x | x ∈ ↑l}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ List.foldr (fun x => f ↑x) b (List.pmap Subtype.mk l ⋯) = List.foldr f b l
state_after: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
l : List α
comm : {x | x ∈ ↑l}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ List.foldr f b (List.map Subtype.val (List.pmap Subtype.mk l ⋯)) = List.foldr f b l

tactic: simp [List.map_pmap]
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
l : List α
comm : {x | x ∈ ↑l}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ List.foldr f b (List.map Subtype.val (List.pmap Subtype.mk l ⋯)) = List.foldr f b l
state_after: no goals
Theorem: WeierstrassCurve.Affine.nonsingular_zero
File: Mathlib/AlgebraicGeometry/EllipticCurve/Affine.lean

tactic: rw [Nonsingular, equation_zero, evalEval_polynomialX_zero, neg_ne_zero, evalEval_polynomialY_zero,
  or_comm]
state_before: R : Type u
inst✝ : CommRing R
W : Affine R
⊢ W.Nonsingular 0 0 ↔ W.a₆ = 0 ∧ (W.a₃ ≠ 0 ∨ W.a₄ ≠ 0)
state_after: no goals
Theorem: mdifferentiableWithinAt_univ
File: Mathlib/Geometry/Manifold/MFDeriv/Basic.lean

tactic: simp_rw [MDifferentiableWithinAt, MDifferentiableAt, ChartedSpace.LiftPropAt]
state_before: 𝕜 : Type u_1
inst✝¹⁵ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁴ : NormedAddCommGroup E
inst✝¹³ : NormedSpace 𝕜 E
H : Type u_3
inst✝¹² : TopologicalSpace H
I : ModelWithCorners 𝕜 E H
M : Type u_4
inst✝¹¹ : TopologicalSpace M
inst✝¹⁰ : ChartedSpace H M
E' : Type u_5
inst✝⁹ : NormedAddCommGroup E'
inst✝⁸ : NormedSpace 𝕜 E'
H' : Type u_6
inst✝⁷ : TopologicalSpace H'
I' : ModelWithCorners 𝕜 E' H'
M' : Type u_7
inst✝⁶ : TopologicalSpace M'
inst✝⁵ : ChartedSpace H' M'
E'' : Type u_8
inst✝⁴ : NormedAddCommGroup E''
inst✝³ : NormedSpace 𝕜 E''
H'' : Type u_9
inst✝² : TopologicalSpace H''
I'' : ModelWithCorners 𝕜 E'' H''
M'' : Type u_10
inst✝¹ : TopologicalSpace M''
inst✝ : ChartedSpace H'' M''
f f₀ f₁ : M → M'
x : M
s t : Set M
g : M' → M''
u : Set M'
Is : SmoothManifoldWithCorners I M
I's : SmoothManifoldWithCorners I' M'
I''s : SmoothManifoldWithCorners I'' M''
f' f₀' f₁' : TangentSpace I x →L[𝕜] TangentSpace I' (f x)
g' : TangentSpace I' (f x) →L[𝕜] TangentSpace I'' (g (f x))
⊢ MDifferentiableWithinAt I I' f univ x ↔ MDifferentiableAt I I' f x
state_after: no goals
Theorem: List.last_ofFn
File: Mathlib/Data/List/OfFn.lean

tactic: simp [getLast_eq_get]
state_before: α : Type u
n : ℕ
f : Fin n → α
h : ofFn f ≠ []
hn : optParam (n - 1 < n) ⋯
⊢ (ofFn f).getLast h = f ⟨n - 1, hn⟩
state_after: no goals
Theorem: ENNReal.continuous_div_const
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: simp_rw [div_eq_mul_inv, continuous_iff_continuousAt]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ Continuous fun x => x / c
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ ∀ (x : ℝ≥0∞), ContinuousAt (fun x => x * c⁻¹) x

tactic: intro x
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
⊢ ∀ (x : ℝ≥0∞), ContinuousAt (fun x => x * c⁻¹) x
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
x : ℝ≥0∞
⊢ ContinuousAt (fun x => x * c⁻¹) x

tactic: exact ENNReal.continuousAt_mul_const (Or.intro_left _ (inv_ne_top.mpr c_ne_zero))
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x✝ y z ε ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
c : ℝ≥0∞
c_ne_zero : c ≠ 0
x : ℝ≥0∞
⊢ ContinuousAt (fun x => x * c⁻¹) x
state_after: no goals
Theorem: isClosed_set_pi
File: Mathlib/Topology/Constructions.lean

tactic: rw [pi_def]
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
ι : Type u_5
π : ι → Type u_6
κ : Type u_7
inst✝ : TopologicalSpace X
T : (i : ι) → TopologicalSpace (π i)
f : X → (i : ι) → π i
i : Set ι
s : (a : ι) → Set (π a)
hs : ∀ a ∈ i, IsClosed (s a)
⊢ IsClosed (i.pi s)
state_after: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
ι : Type u_5
π : ι → Type u_6
κ : Type u_7
inst✝ : TopologicalSpace X
T : (i : ι) → TopologicalSpace (π i)
f : X → (i : ι) → π i
i : Set ι
s : (a : ι) → Set (π a)
hs : ∀ a ∈ i, IsClosed (s a)
⊢ IsClosed (⋂ a ∈ i, eval a ⁻¹' s a)

tactic: exact isClosed_biInter fun a ha => (hs _ ha).preimage (continuous_apply _)
state_before: X : Type u
Y : Type v
Z : Type u_1
W : Type u_2
ε : Type u_3
ζ : Type u_4
ι : Type u_5
π : ι → Type u_6
κ : Type u_7
inst✝ : TopologicalSpace X
T : (i : ι) → TopologicalSpace (π i)
f : X → (i : ι) → π i
i : Set ι
s : (a : ι) → Set (π a)
hs : ∀ a ∈ i, IsClosed (s a)
⊢ IsClosed (⋂ a ∈ i, eval a ⁻¹' s a)
state_after: no goals
Theorem: HurwitzZeta.completedSinZeta_neg
File: Mathlib/NumberTheory/LSeries/HurwitzZetaOdd.lean

tactic: simp only [completedSinZeta, StrongFEPair.Λ, mellin, StrongFEPair.symm, WeakFEPair.symm,
  hurwitzOddFEPair, Function.comp_def, sinKernel_neg, ofReal_neg, smul_neg]
state_before: a : UnitAddCircle
s : ℂ
⊢ completedSinZeta (-a) s = -completedSinZeta a s
state_after: a : UnitAddCircle
s : ℂ
⊢ (∫ (t : ℝ) in Ioi 0, -(↑t ^ ((s + 1) / 2 - 1) • ↑(sinKernel a t))) / 2 =
    -((∫ (t : ℝ) in Ioi 0, ↑t ^ ((s + 1) / 2 - 1) • ↑(sinKernel a t)) / 2)

tactic: rw [integral_neg, neg_div]
state_before: a : UnitAddCircle
s : ℂ
⊢ (∫ (t : ℝ) in Ioi 0, -(↑t ^ ((s + 1) / 2 - 1) • ↑(sinKernel a t))) / 2 =
    -((∫ (t : ℝ) in Ioi 0, ↑t ^ ((s + 1) / 2 - 1) • ↑(sinKernel a t)) / 2)
state_after: no goals
Theorem: ProbabilityTheory.integrable_compProd_iff
File: Mathlib/Probability/Kernel/IntegralCompProd.lean

tactic: simp only [Integrable, hasFiniteIntegral_compProd_iff' hf, hf.norm.integral_kernel_compProd,
  hf, hf.compProd_mk_left, eventually_and, true_and_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
E : Type u_4
mα : MeasurableSpace α
mβ : MeasurableSpace β
mγ : MeasurableSpace γ
inst✝² : NormedAddCommGroup E
κ : ↥(kernel α β)
inst✝¹ : IsSFiniteKernel κ
η : ↥(kernel (α × β) γ)
inst✝ : IsSFiniteKernel η
a : α
f : β × γ → E
hf : AEStronglyMeasurable f ((κ ⊗ₖ η) a)
⊢ Integrable f ((κ ⊗ₖ η) a) ↔
    (∀ᵐ (x : β) ∂κ a, Integrable (fun y => f (x, y)) (η (a, x))) ∧
      Integrable (fun x => ∫ (y : γ), ‖f (x, y)‖ ∂η (a, x)) (κ a)
state_after: no goals
Theorem: Monotone.ae_differentiableAt
File: Mathlib/Analysis/Calculus/Monotone.lean

tactic: filter_upwards [hf.ae_hasDerivAt] with x hx using hx.differentiableAt
state_before: f : ℝ → ℝ
hf : Monotone f
⊢ ∀ᵐ (x : ℝ), DifferentiableAt ℝ f x
state_after: no goals
Theorem: Polynomial.leadingCoeff_monic_mul
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rcases eq_or_ne q 0 with (rfl | H)
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
hp : p.Monic
⊢ (p * q).leadingCoeff = q.leadingCoeff
state_after: case inl
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q : R[X]
ι : Type u_1
p : R[X]
hp : p.Monic
⊢ (p * 0).leadingCoeff = leadingCoeff 0

case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
hp : p.Monic
H : q ≠ 0
⊢ (p * q).leadingCoeff = q.leadingCoeff

tactic: simp
state_before: case inl
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q : R[X]
ι : Type u_1
p : R[X]
hp : p.Monic
⊢ (p * 0).leadingCoeff = leadingCoeff 0
state_after: no goals

tactic: rw [leadingCoeff_mul', hp.leadingCoeff, one_mul]
state_before: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
hp : p.Monic
H : q ≠ 0
⊢ (p * q).leadingCoeff = q.leadingCoeff
state_after: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
hp : p.Monic
H : q ≠ 0
⊢ p.leadingCoeff * q.leadingCoeff ≠ 0

tactic: rwa [hp.leadingCoeff, one_mul, Ne, leadingCoeff_eq_zero]
state_before: case inr
R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝¹ p✝ q✝ : R[X]
ι : Type u_1
p q : R[X]
hp : p.Monic
H : q ≠ 0
⊢ p.leadingCoeff * q.leadingCoeff ≠ 0
state_after: no goals
Theorem: beq_eq_decide
File: Mathlib/Logic/Basic.lean

tactic: rw [← beq_iff_eq a b]
state_before: α : Type u_1
inst✝¹ : BEq α
inst✝ : LawfulBEq α
a b : α
⊢ (a == b) = decide (a = b)
state_after: α : Type u_1
inst✝¹ : BEq α
inst✝ : LawfulBEq α
a b : α
⊢ (a == b) = decide ((a == b) = true)

tactic: cases a == b <;> simp
state_before: α : Type u_1
inst✝¹ : BEq α
inst✝ : LawfulBEq α
a b : α
⊢ (a == b) = decide ((a == b) = true)
state_after: no goals
Theorem: Set.not_monotoneOn_not_antitoneOn_iff_exists_le_le
File: Mathlib/Data/Set/Basic.lean

tactic: simp [monotoneOn_iff_monotone, antitoneOn_iff_antitone, and_assoc, exists_and_left,
  not_monotone_not_antitone_iff_exists_le_le, @and_left_comm (_ ∈ s)]
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
a b : α
s s₁ s₂ t t₁ t₂ u : Set α
inst✝¹ : LinearOrder α
inst✝ : LinearOrder β
f : α → β
⊢ ¬MonotoneOn f s ∧ ¬AntitoneOn f s ↔
    ∃ a ∈ s, ∃ b ∈ s, ∃ c ∈ s, a ≤ b ∧ b ≤ c ∧ (f a < f b ∧ f c < f b ∨ f b < f a ∧ f b < f c)
state_after: no goals
Theorem: Turing.ToPartrec.Code.comp_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [eval]
state_before: f g : Code
⊢ (f.comp g).eval = fun v => g.eval v >>= f.eval
state_after: no goals
Theorem: Module.End.injOn_genEigenspace
File: Mathlib/LinearAlgebra/Eigenspace/Basic.lean

tactic: rintro μ₁ _ μ₂ hμ₂ (hμ₁₂ : ⨆ k, f.genEigenspace μ₁ k = ⨆ k, f.genEigenspace μ₂ k)
state_before: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
⊢ InjOn (fun x => ⨆ k, (f.genEigenspace x) k) {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
state_after: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
⊢ μ₁ = μ₂

tactic: by_contra contra
state_before: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
⊢ μ₁ = μ₂
state_after: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
contra : ¬μ₁ = μ₂
⊢ False

tactic: apply hμ₂
state_before: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
contra : ¬μ₁ = μ₂
⊢ False
state_after: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
contra : ¬μ₁ = μ₂
⊢ ⨆ k, (f.genEigenspace μ₂) k = ⊥

tactic: simpa only [hμ₁₂, disjoint_self] using f.disjoint_iSup_genEigenspace contra
state_before: K R : Type v
V M : Type w
inst✝⁶ : CommRing R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : Field K
inst✝² : AddCommGroup V
inst✝¹ : Module K V
inst✝ : NoZeroSMulDivisors R M
f : End R M
μ₁ : R
a✝ : μ₁ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
μ₂ : R
hμ₂ : μ₂ ∈ {μ | ⨆ k, (f.genEigenspace μ) k ≠ ⊥}
hμ₁₂ : ⨆ k, (f.genEigenspace μ₁) k = ⨆ k, (f.genEigenspace μ₂) k
contra : ¬μ₁ = μ₂
⊢ ⨆ k, (f.genEigenspace μ₂) k = ⊥
state_after: no goals
Theorem: CategoryTheory.Limits.Multicoequalizer.hom_ext
File: Mathlib/CategoryTheory/Limits/Shapes/Multiequalizer.lean

tactic: rintro (a | b)
state_before: C : Type u
inst✝¹ : Category.{v, u} C
I : MultispanIndex C
inst✝ : HasMulticoequalizer I
W : C
i j : multicoequalizer I ⟶ W
h : ∀ (b : I.R), π I b ≫ i = π I b ≫ j
⊢ ∀ (j_1 : WalkingMultispan I.fstFrom I.sndFrom), colimit.ι I.multispan j_1 ≫ i = colimit.ι I.multispan j_1 ≫ j
state_after: case left
C : Type u
inst✝¹ : Category.{v, u} C
I : MultispanIndex C
inst✝ : HasMulticoequalizer I
W : C
i j : multicoequalizer I ⟶ W
h : ∀ (b : I.R), π I b ≫ i = π I b ≫ j
a : I.L
⊢ colimit.ι I.multispan (WalkingMultispan.left a) ≫ i = colimit.ι I.multispan (WalkingMultispan.left a) ≫ j

case right
C : Type u
inst✝¹ : Category.{v, u} C
I : MultispanIndex C
inst✝ : HasMulticoequalizer I
W : C
i j : multicoequalizer I ⟶ W
h : ∀ (b : I.R), π I b ≫ i = π I b ≫ j
b : I.R
⊢ colimit.ι I.multispan (WalkingMultispan.right b) ≫ i = colimit.ι I.multispan (WalkingMultispan.right b) ≫ j

tactic: simp_rw [← colimit.w I.multispan (WalkingMultispan.Hom.fst a), Category.assoc, h]
state_before: case left
C : Type u
inst✝¹ : Category.{v, u} C
I : MultispanIndex C
inst✝ : HasMulticoequalizer I
W : C
i j : multicoequalizer I ⟶ W
h : ∀ (b : I.R), π I b ≫ i = π I b ≫ j
a : I.L
⊢ colimit.ι I.multispan (WalkingMultispan.left a) ≫ i = colimit.ι I.multispan (WalkingMultispan.left a) ≫ j
state_after: no goals

tactic: apply h
state_before: case right
C : Type u
inst✝¹ : Category.{v, u} C
I : MultispanIndex C
inst✝ : HasMulticoequalizer I
W : C
i j : multicoequalizer I ⟶ W
h : ∀ (b : I.R), π I b ≫ i = π I b ≫ j
b : I.R
⊢ colimit.ι I.multispan (WalkingMultispan.right b) ≫ i = colimit.ι I.multispan (WalkingMultispan.right b) ≫ j
state_after: no goals