1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Matrix.coeff_charpolyRev_eq_neg_trace
File: Mathlib/LinearAlgebra/Matrix/Charpoly/Coeff.lean

tactic: nontriviality R
state_before: R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
⊢ M.charpolyRev.coeff 1 = -M.trace
state_after: R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
⊢ M.charpolyRev.coeff 1 = -M.trace

tactic: cases isEmpty_or_nonempty n
state_before: R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
⊢ M.charpolyRev.coeff 1 = -M.trace
state_after: case inl
R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
h✝ : IsEmpty n
⊢ M.charpolyRev.coeff 1 = -M.trace

case inr
R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
h✝ : Nonempty n
⊢ M.charpolyRev.coeff 1 = -M.trace

tactic: simp [charpolyRev, coeff_one]
state_before: case inl
R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
h✝ : IsEmpty n
⊢ M.charpolyRev.coeff 1 = -M.trace
state_after: no goals

tactic: simp [trace_eq_neg_charpoly_coeff M, ← M.reverse_charpoly, nextCoeff]
state_before: case inr
R : Type u
inst✝⁴ : CommRing R
n G : Type v
inst✝³ : DecidableEq n
inst✝² : Fintype n
α β : Type v
inst✝¹ : DecidableEq α
M✝ : Matrix n n R
p : ℕ
inst✝ : Fact (Nat.Prime p)
M : Matrix n n R
a✝ : Nontrivial R
h✝ : Nonempty n
⊢ M.charpolyRev.coeff 1 = -M.trace
state_after: no goals
Theorem: RelIso.rel_symm_apply
File: Mathlib/Order/RelIso/Basic.lean

tactic: rw [← e.map_rel_iff, e.apply_symm_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
u : δ → δ → Prop
e : r ≃r s
x : α
y : β
⊢ r x (e.symm y) ↔ s (e x) y
state_after: no goals
Theorem: IsCoprime.add_mul_right_right
File: Mathlib/RingTheory/Coprime/Basic.lean

tactic: rw [isCoprime_comm]
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime x (y + z * x)
state_after: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (y + z * x) x

tactic: exact h.symm.add_mul_right_left z
state_before: R : Type u
inst✝ : CommRing R
x y : R
h : IsCoprime x y
z : R
⊢ IsCoprime (y + z * x) x
state_after: no goals
Theorem: CategoryTheory.Subobject.mk_eq_bot_iff_zero
File: Mathlib/CategoryTheory/Subobject/Lattice.lean

tactic: simpa [h, bot_factors_iff_zero] using mk_factors_self f
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
f : X ⟶ Y
inst✝ : Mono f
h : mk f = ⊥
⊢ f = 0
state_after: no goals

tactic: simp [h]
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
X Y Z : C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
inst✝² : HasZeroObject C
inst✝¹ : HasZeroMorphisms C
f : X ⟶ Y
inst✝ : Mono f
h : f = 0
⊢ (isoZeroOfMonoEqZero h ≪≫ HasZeroObject.zeroIsoInitial).hom ≫ initial.to Y = f
state_after: no goals
Theorem: CategoryTheory.IsIso.of_isIso_comp_left
File: Mathlib/CategoryTheory/Iso.lean

tactic: rw [← id_comp g, ← inv_hom_id f, assoc]
state_before: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : IsIso f
inst✝ : IsIso (f ≫ g)
⊢ IsIso g
state_after: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : IsIso f
inst✝ : IsIso (f ≫ g)
⊢ IsIso (inv f ≫ f ≫ g)

tactic: infer_instance
state_before: C : Type u
inst✝² : Category.{v, u} C
X✝ Y✝ Z✝ : C
f✝ g✝ : X✝ ⟶ Y✝
h : Y✝ ⟶ Z✝
X Y Z : C
f : X ⟶ Y
g : Y ⟶ Z
inst✝¹ : IsIso f
inst✝ : IsIso (f ≫ g)
⊢ IsIso (inv f ≫ f ≫ g)
state_after: no goals
Theorem: CochainComplex.mappingCone.inr_f_descShortComplex_f
File: Mathlib/Algebra/Homology/HomotopyCategory/ShortExact.lean

tactic: simp [descShortComplex]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Abelian C
S : ShortComplex (CochainComplex C ℤ)
hS : S.ShortExact
n : ℤ
⊢ (inr S.f).f n ≫ (descShortComplex S).f n = S.g.f n
state_after: no goals
Theorem: PMF.toMeasure_toPMF
File: Mathlib/Probability/ProbabilityMassFunction/Basic.lean

tactic: rw [← p.toMeasure_apply_singleton x (measurableSet_singleton x), p.toMeasure.toPMF_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Countable α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSingletonClass α
p : PMF α
μ : Measure α
inst✝ : IsProbabilityMeasure μ
x : α
⊢ p.toMeasure.toPMF x = p x
state_after: no goals
Theorem: LieIdeal.mem_killingCompl
File: Mathlib/Algebra/Lie/TraceForm.lean

tactic: rfl
state_before: R : Type u_1
K : Type u_2
L : Type u_3
M : Type u_4
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
inst✝³ : Module.Free R M
inst✝² : Module.Finite R M
inst✝¹ : Module.Free R L
inst✝ : Module.Finite R L
I : LieIdeal R L
x : L
⊢ x ∈ killingCompl R L I ↔ ∀ y ∈ I, ((killingForm R L) y) x = 0
state_after: no goals
Theorem: commProb_eq_one_iff
File: Mathlib/GroupTheory/CommutingProbability.lean

tactic: haveI := Fintype.ofFinite M
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
⊢ commProb M = 1 ↔ Commutative fun x x_1 => x * x_1
state_after: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ commProb M = 1 ↔ Commutative fun x x_1 => x * x_1

tactic: rw [commProb, ← Set.coe_setOf, Nat.card_eq_fintype_card, Nat.card_eq_fintype_card]
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ commProb M = 1 ↔ Commutative fun x x_1 => x * x_1
state_after: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ ↑(card ↑{x | Commute x.1 x.2}) / ↑(card M) ^ 2 = 1 ↔ Commutative fun x x_1 => x * x_1

tactic: rw [div_eq_one_iff_eq, ← Nat.cast_pow, Nat.cast_inj, sq, ← card_prod,
  set_fintype_card_eq_univ_iff, Set.eq_univ_iff_forall]
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ ↑(card ↑{x | Commute x.1 x.2}) / ↑(card M) ^ 2 = 1 ↔ Commutative fun x x_1 => x * x_1
state_after: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ (∀ (x : M × M), x ∈ {x | Commute x.1 x.2}) ↔ Commutative fun x x_1 => x * x_1

M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ ↑(card M) ^ 2 ≠ 0

tactic: exact ⟨fun h x y ↦ h (x, y), fun h x ↦ h x.1 x.2⟩
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ (∀ (x : M × M), x ∈ {x | Commute x.1 x.2}) ↔ Commutative fun x x_1 => x * x_1
state_after: no goals

tactic: exact pow_ne_zero 2 (Nat.cast_ne_zero.mpr card_ne_zero)
state_before: M : Type u_1
inst✝¹ : Mul M
inst✝ : Finite M
h : Nonempty M
this : Fintype M
⊢ ↑(card M) ^ 2 ≠ 0
state_after: no goals
Theorem: Multiset.prod_eq_prod_toEnumFinset
File: Mathlib/Data/Multiset/Fintype.lean

tactic: congr
state_before: α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
inst✝ : CommMonoid α
m : Multiset α
⊢ m.prod = ∏ x ∈ m.toEnumFinset, x.1
state_after: case e_a
α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
inst✝ : CommMonoid α
m : Multiset α
⊢ m = map (fun x => x.1) m.toEnumFinset.val

tactic: simp
state_before: case e_a
α : Type u_1
inst✝¹ : DecidableEq α
m✝ : Multiset α
inst✝ : CommMonoid α
m : Multiset α
⊢ m = map (fun x => x.1) m.toEnumFinset.val
state_after: no goals
Theorem: mul_lt_of_lt_one_right
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

tactic: simpa only [mul_one] using mul_lt_mul_of_pos_left h ha
state_before: α : Type u_1
a b c d : α
inst✝³ : MulOneClass α
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : PosMulStrictMono α
ha : 0 < a
h : b < 1
⊢ a * b < a
state_after: no goals
Theorem: abs_max_sub_max_le_abs
File: Mathlib/Algebra/Order/Group/MinMax.lean

tactic: simpa only [sub_self, abs_zero, max_eq_left (abs_nonneg (a - b))]
  using abs_max_sub_max_le_max a c b c
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
a✝ b✝ c✝ a b c : α
⊢ |max a c - max b c| ≤ |a - b|
state_after: no goals
Theorem: Num.cast_le
File: Mathlib/Data/Num/Lemmas.lean

tactic: rw [← not_lt]
state_before: α : Type u_1
inst✝ : LinearOrderedSemiring α
m n : Num
⊢ ↑m ≤ ↑n ↔ m ≤ n
state_after: α : Type u_1
inst✝ : LinearOrderedSemiring α
m n : Num
⊢ ¬↑n < ↑m ↔ m ≤ n

tactic: exact not_congr cast_lt
state_before: α : Type u_1
inst✝ : LinearOrderedSemiring α
m n : Num
⊢ ¬↑n < ↑m ↔ m ≤ n
state_after: no goals
Theorem: Diffeomorph.contMDiffOn_comp_diffeomorph_iff
File: Mathlib/Geometry/Manifold/Diffeomorph.lean

tactic: simp only [hm, coe_toEquiv, h.symm_apply_apply, contMDiffWithinAt_comp_diffeomorph_iff,
  mem_preimage]
state_before: 𝕜 : Type u_1
inst✝¹⁸ : NontriviallyNormedField 𝕜
E : Type u_2
inst✝¹⁷ : NormedAddCommGroup E
inst✝¹⁶ : NormedSpace 𝕜 E
E' : Type u_3
inst✝¹⁵ : NormedAddCommGroup E'
inst✝¹⁴ : NormedSpace 𝕜 E'
F : Type u_4
inst✝¹³ : NormedAddCommGroup F
inst✝¹² : NormedSpace 𝕜 F
H : Type u_5
inst✝¹¹ : TopologicalSpace H
H' : Type u_6
inst✝¹⁰ : TopologicalSpace H'
G : Type u_7
inst✝⁹ : TopologicalSpace G
G' : Type u_8
inst✝⁸ : TopologicalSpace G'
I : ModelWithCorners 𝕜 E H
I' : ModelWithCorners 𝕜 E' H'
J : ModelWithCorners 𝕜 F G
J' : ModelWithCorners 𝕜 F G'
M : Type u_9
inst✝⁷ : TopologicalSpace M
inst✝⁶ : ChartedSpace H M
M' : Type u_10
inst✝⁵ : TopologicalSpace M'
inst✝⁴ : ChartedSpace H' M'
N : Type u_11
inst✝³ : TopologicalSpace N
inst✝² : ChartedSpace G N
N' : Type u_12
inst✝¹ : TopologicalSpace N'
inst✝ : ChartedSpace G' N'
n m : ℕ∞
h : M ≃ₘ^n⟮I, J⟯ N
f : N → M'
s : Set M
hm : m ≤ n
x✝ : M
⊢ x✝ ∈ s → ContMDiffWithinAt I I' m (f ∘ ⇑h) s x✝ ↔
    h.toEquiv x✝ ∈ ⇑h.symm ⁻¹' s → ContMDiffWithinAt J I' m f (⇑h.symm ⁻¹' s) (h.toEquiv x✝)
state_after: no goals
Theorem: Equiv.Perm.viaFintypeEmbedding_sign
File: Mathlib/Logic/Equiv/Fintype.lean

tactic: simp [Equiv.Perm.viaFintypeEmbedding]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Fintype α
inst✝² : DecidableEq β
e : Perm α
f : α ↪ β
inst✝¹ : DecidableEq α
inst✝ : Fintype β
⊢ sign (e.viaFintypeEmbedding f) = sign e
state_after: no goals
Theorem: CategoryTheory.ShortComplex.LeftHomologyData.ofEpiOfIsIsoOfMono'_f'
File: Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean

tactic: rw [← cancel_mono (ofEpiOfIsIsoOfMono' φ h).i, f'_i, ofEpiOfIsIsoOfMono'_i,
  assoc, f'_i_assoc, φ.comm₁₂_assoc, IsIso.hom_inv_id, comp_id]
state_before: C : Type u_1
inst✝⁴ : Category.{u_2, u_1} C
inst✝³ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
φ : S₁ ⟶ S₂
h : S₂.LeftHomologyData
inst✝² : Epi φ.τ₁
inst✝¹ : IsIso φ.τ₂
inst✝ : Mono φ.τ₃
⊢ (ofEpiOfIsIsoOfMono' φ h).f' = φ.τ₁ ≫ h.f'
state_after: no goals
Theorem: Fin.cycleRange_symm_succ
File: Mathlib/GroupTheory/Perm/Fin.lean

tactic: simp
state_before: n : ℕ
i : Fin (n + 1)
j : Fin n
⊢ i.cycleRange ((Equiv.symm i.cycleRange) j.succ) = i.cycleRange (i.succAbove j)
state_after: no goals
Theorem: Polynomial.mem_support_derivative
File: Mathlib/Algebra/Polynomial/Derivative.lean

tactic: suffices ¬p.coeff (n + 1) * (n + 1 : ℕ) = 0 ↔ coeff p (n + 1) ≠ 0 by
  simpa only [mem_support_iff, coeff_derivative, Ne, Nat.cast_succ]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ n ∈ (derivative p).support ↔ n + 1 ∈ p.support
state_after: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬p.coeff (n + 1) * ↑(n + 1) = 0 ↔ p.coeff (n + 1) ≠ 0

tactic: rw [← nsmul_eq_mul', smul_eq_zero]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬p.coeff (n + 1) * ↑(n + 1) = 0 ↔ p.coeff (n + 1) ≠ 0
state_after: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬(n + 1 = 0 ∨ p.coeff (n + 1) = 0) ↔ p.coeff (n + 1) ≠ 0

tactic: simp only [Nat.succ_ne_zero, false_or_iff]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
⊢ ¬(n + 1 = 0 ∨ p.coeff (n + 1) = 0) ↔ p.coeff (n + 1) ≠ 0
state_after: no goals

tactic: simpa only [mem_support_iff, coeff_derivative, Ne, Nat.cast_succ]
state_before: R : Type u
S : Type v
T : Type w
ι : Type y
A : Type z
a b : R
n✝ : ℕ
inst✝¹ : Semiring R
inst✝ : NoZeroSMulDivisors ℕ R
p : R[X]
n : ℕ
this : ¬p.coeff (n + 1) * ↑(n + 1) = 0 ↔ p.coeff (n + 1) ≠ 0
⊢ n ∈ (derivative p).support ↔ n + 1 ∈ p.support
state_after: no goals
Theorem: Zspan.coe_floor_self
File: Mathlib/Algebra/Module/Zlattice/Basic.lean

tactic: rw [repr_floor_apply, Basis.singleton_repr, Basis.singleton_repr]
state_before: E : Type u_1
ι : Type u_2
K : Type u_3
inst✝⁵ : NormedLinearOrderedField K
inst✝⁴ : NormedAddCommGroup E
inst✝³ : NormedSpace K E
b : Basis ι K E
inst✝² : FloorRing K
inst✝¹ : Fintype ι
inst✝ : Unique ι
k : K
x✝ : ?m.162536
⊢ (?m.162542.repr ↑(floor (Basis.singleton ι K) k)) x✝ = (?m.162542.repr ↑⌊k⌋) x✝
state_after: no goals
Theorem: MvQPF.corecF_eq
File: Mathlib/Data/QPF/Multivariate/Constructions/Cofix.lean

tactic: rw [corecF, M.dest_corec]
state_before: n : ℕ
F : TypeVec.{u} (n + 1) → Type u
q : MvQPF F
α : TypeVec.{u} n
β : Type u
g : β → F (α ::: β)
x : β
⊢ M.dest (P F) (corecF g x) = (TypeVec.id ::: corecF g) <$$> repr (g x)
state_after: no goals
Theorem: strictConvexOn_zpow
File: Mathlib/Analysis/Convex/SpecificFunctions/Deriv.lean

tactic: apply strictConvexOn_of_deriv2_pos' (convex_Ioi 0)
state_before: m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
⊢ StrictConvexOn ℝ (Ioi 0) fun x => x ^ m
state_after: case hf
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
⊢ ContinuousOn (fun x => x ^ m) (Ioi 0)

case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
⊢ ∀ x ∈ Ioi 0, 0 < deriv^[2] (fun x => x ^ m) x

tactic: intro x hx
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
⊢ ∀ x ∈ Ioi 0, 0 < deriv^[2] (fun x => x ^ m) x
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : x ∈ Ioi 0
⊢ 0 < deriv^[2] (fun x => x ^ m) x

tactic: rw [mem_Ioi] at hx
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : x ∈ Ioi 0
⊢ 0 < deriv^[2] (fun x => x ^ m) x
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < deriv^[2] (fun x => x ^ m) x

tactic: rw [iter_deriv_zpow]
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < deriv^[2] (fun x => x ^ m) x
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < (∏ i ∈ Finset.range 2, (↑m - ↑i)) * x ^ (m - ↑2)

tactic: refine mul_pos ?_ (zpow_pos_of_pos hx _)
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < (∏ i ∈ Finset.range 2, (↑m - ↑i)) * x ^ (m - ↑2)
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < ∏ i ∈ Finset.range 2, (↑m - ↑i)

tactic: norm_cast
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < ∏ i ∈ Finset.range 2, (↑m - ↑i)
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < ∏ i ∈ Finset.range 2, (m - ↑i)

tactic: refine int_prod_range_pos (by decide) fun hm => ?_
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ 0 < ∏ i ∈ Finset.range 2, (m - ↑i)
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ Ico 0 ↑2
⊢ False

tactic: rw [← Finset.coe_Ico] at hm
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ Ico 0 ↑2
⊢ False
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ ↑(Finset.Ico 0 ↑2)
⊢ False

tactic: norm_cast at hm
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ ↑(Finset.Ico 0 ↑2)
⊢ False
state_after: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ Finset.Ico 0 2
⊢ False

tactic: fin_cases hm <;> simp_all
state_before: case hf''
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
hm : m ∈ Finset.Ico 0 2
⊢ False
state_after: no goals

tactic: exact (continuousOn_zpow₀ m).mono fun x hx => ne_of_gt hx
state_before: case hf
m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
⊢ ContinuousOn (fun x => x ^ m) (Ioi 0)
state_after: no goals

tactic: decide
state_before: m : ℤ
hm₀ : m ≠ 0
hm₁ : m ≠ 1
x : ℝ
hx : 0 < x
⊢ Even 2
state_after: no goals
Theorem: Multiset.prod_hom'
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

tactic: convert (s.map g).prod_hom f
state_before: F✝ : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝⁴ : CommMonoid α
inst✝³ : CommMonoid β
s✝ t : Multiset α
a : α
m : Multiset ι
f✝ g✝ : ι → α
inst✝² : CommMonoid β
s : Multiset ι
F : Type u_6
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
f : F
g : ι → α
⊢ (map (fun i => f (g i)) s).prod = f (map g s).prod
state_after: case h.e'_2.h.e'_3
F✝ : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝⁴ : CommMonoid α
inst✝³ : CommMonoid β
s✝ t : Multiset α
a : α
m : Multiset ι
f✝ g✝ : ι → α
inst✝² : CommMonoid β
s : Multiset ι
F : Type u_6
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
f : F
g : ι → α
⊢ map (fun i => f (g i)) s = map (⇑f) (map g s)

tactic: exact (map_map _ _ _).symm
state_before: case h.e'_2.h.e'_3
F✝ : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝⁴ : CommMonoid α
inst✝³ : CommMonoid β
s✝ t : Multiset α
a : α
m : Multiset ι
f✝ g✝ : ι → α
inst✝² : CommMonoid β
s : Multiset ι
F : Type u_6
inst✝¹ : FunLike F α β
inst✝ : MonoidHomClass F α β
f : F
g : ι → α
⊢ map (fun i => f (g i)) s = map (⇑f) (map g s)
state_after: no goals
Theorem: AddLECancellable.le_add_tsub
File: Mathlib/Algebra/Order/Sub/Defs.lean

tactic: rw [add_comm]
state_before: α : Type u_1
β : Type u_2
inst✝³ : Preorder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
⊢ a ≤ a + b - b
state_after: α : Type u_1
β : Type u_2
inst✝³ : Preorder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
⊢ a ≤ b + a - b

tactic: exact hb.le_add_tsub_swap
state_before: α : Type u_1
β : Type u_2
inst✝³ : Preorder α
inst✝² : AddCommSemigroup α
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
hb : AddLECancellable b
⊢ a ≤ b + a - b
state_after: no goals
Theorem: Monoid.Coprod.fst_toProd
File: Mathlib/GroupTheory/Coprod/Basic.lean

tactic: rw [← fst_comp_toProd]
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).1 = fst x
state_after: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).1 = ((MonoidHom.fst M N).comp toProd) x

tactic: rfl
state_before: M : Type u_1
N : Type u_2
inst✝¹ : Monoid M
inst✝ : Monoid N
x : M ∗ N
⊢ (toProd x).1 = ((MonoidHom.fst M N).comp toProd) x
state_after: no goals
Theorem: Set.infinite_range_of_injective
File: Mathlib/Data/Set/Finite.lean

tactic: rw [← image_univ, infinite_image_iff hi.injOn]
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝ : Infinite α
f : α → β
hi : Injective f
⊢ (range f).Infinite
state_after: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝ : Infinite α
f : α → β
hi : Injective f
⊢ univ.Infinite

tactic: exact infinite_univ
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s t : Set α
inst✝ : Infinite α
f : α → β
hi : Injective f
⊢ univ.Infinite
state_after: no goals
Theorem: AdjoinRoot.aeval_eq
File: Mathlib/RingTheory/AdjoinRoot.lean

tactic: rw [aeval_C]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
x : R
⊢ (aeval (root f)) (C x) = (mk f) (C x)
state_after: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
x : R
⊢ (algebraMap R (AdjoinRoot f)) x = (mk f) (C x)

tactic: rfl
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
x : R
⊢ (algebraMap R (AdjoinRoot f)) x = (mk f) (C x)
state_after: no goals

tactic: rw [AlgHom.map_add, RingHom.map_add, ihp, ihq]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p✝ p q : R[X]
ihp : (aeval (root f)) p = (mk f) p
ihq : (aeval (root f)) q = (mk f) q
⊢ (aeval (root f)) (p + q) = (mk f) (p + q)
state_after: no goals

tactic: rw [AlgHom.map_mul, aeval_C, AlgHom.map_pow, aeval_X, RingHom.map_mul, mk_C, RingHom.map_pow,
  mk_X]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
n : ℕ
x : R
x✝ : (aeval (root f)) (C x * X ^ n) = (mk f) (C x * X ^ n)
⊢ (aeval (root f)) (C x * X ^ (n + 1)) = (mk f) (C x * X ^ (n + 1))
state_after: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
n : ℕ
x : R
x✝ : (aeval (root f)) (C x * X ^ n) = (mk f) (C x * X ^ n)
⊢ (algebraMap R (AdjoinRoot f)) x * root f ^ (n + 1) = (of f) x * root f ^ (n + 1)

tactic: rfl
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
f p : R[X]
n : ℕ
x : R
x✝ : (aeval (root f)) (C x * X ^ n) = (mk f) (C x * X ^ n)
⊢ (algebraMap R (AdjoinRoot f)) x * root f ^ (n + 1) = (of f) x * root f ^ (n + 1)
state_after: no goals
Theorem: OreLocalization.expand'
File: Mathlib/RingTheory/OreLocalization/Basic.lean

tactic: norm_cast
state_before: R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type u_2
inst✝ : MulAction R X
r : X
s s' : ↥S
⊢ ↑s' * ↑s ∈ S
state_after: R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type u_2
inst✝ : MulAction R X
r : X
s s' : ↥S
⊢ ↑(s' * s) ∈ S

tactic: apply SetLike.coe_mem
state_before: R : Type u_1
inst✝² : Monoid R
S : Submonoid R
inst✝¹ : OreSet S
X : Type u_2
inst✝ : MulAction R X
r : X
s s' : ↥S
⊢ ↑(s' * s) ∈ S
state_after: no goals
Theorem: Ergodic.ae_empty_or_univ_of_preimage_ae_le'
File: Mathlib/Dynamics/Ergodic/Ergodic.lean

tactic: refine hf.quasiErgodic.ae_empty_or_univ' hs ?_
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f ⁻¹' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ s =ᶠ[ae μ] ∅ ∨ s =ᶠ[ae μ] univ
state_after: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f ⁻¹' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ f ⁻¹' s =ᶠ[ae μ] s

tactic: refine ae_eq_of_ae_subset_of_measure_ge hs' (hf.measure_preimage hs).symm.le ?_ h_fin
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f ⁻¹' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ f ⁻¹' s =ᶠ[ae μ] s
state_after: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f ⁻¹' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ MeasurableSet (f ⁻¹' s)

tactic: exact measurableSet_preimage hf.measurable hs
state_before: α : Type u_1
m : MeasurableSpace α
f : α → α
s : Set α
μ : Measure α
hf : Ergodic f μ
hs : MeasurableSet s
hs' : f ⁻¹' s ≤ᶠ[ae μ] s
h_fin : μ s ≠ ⊤
⊢ MeasurableSet (f ⁻¹' s)
state_after: no goals
Theorem: norm_deriv_eq_norm_fderiv
File: Mathlib/Analysis/Calculus/Deriv/Basic.lean

tactic: simp [← deriv_fderiv]
state_before: 𝕜 : Type u
inst✝⁴ : NontriviallyNormedField 𝕜
F : Type v
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
E : Type w
inst✝¹ : NormedAddCommGroup E
inst✝ : NormedSpace 𝕜 E
f f₀ f₁ g : 𝕜 → F
f' f₀' f₁' g' : F
x : 𝕜
s t : Set 𝕜
L L₁ L₂ : Filter 𝕜
⊢ ‖deriv f x‖ = ‖fderiv 𝕜 f x‖
state_after: no goals