1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Rat.mul_self_den
File: Mathlib/Data/Rat/Lemmas.lean

tactic: rw [Rat.mul_den, Int.natAbs_mul, Nat.Coprime.gcd_eq_one, Nat.div_one]
state_before: q : ℚ
⊢ (q * q).den = q.den * q.den
state_after: q : ℚ
⊢ (q.num.natAbs * q.num.natAbs).Coprime (q.den * q.den)

tactic: exact (q.reduced.mul_right q.reduced).mul (q.reduced.mul_right q.reduced)
state_before: q : ℚ
⊢ (q.num.natAbs * q.num.natAbs).Coprime (q.den * q.den)
state_after: no goals
Theorem: WeierstrassCurve.ψ₂_sq
File: Mathlib/AlgebraicGeometry/EllipticCurve/DivisionPolynomial/Basic.lean

tactic: rw [C_Ψ₂Sq, sub_add_cancel]
state_before: R : Type r
S : Type s
inst✝¹ : CommRing R
inst✝ : CommRing S
W : WeierstrassCurve R
⊢ W.ψ₂ ^ 2 = C W.Ψ₂Sq + 4 * W.toAffine.polynomial
state_after: no goals
Theorem: toIocDiv_sub_eq_toIocDiv_add
File: Mathlib/Algebra/Order/ToIntervalMod.lean

tactic: apply toIocDiv_eq_of_sub_zsmul_mem_Ioc
state_before: α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ toIocDiv hp a (b - c) = toIocDiv hp (a + c) b
state_after: case h
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ b - c - toIocDiv hp (a + c) b • p ∈ Set.Ioc a (a + p)

tactic: rw [← sub_right_comm, Set.sub_mem_Ioc_iff_left, add_right_comm]
state_before: case h
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ b - c - toIocDiv hp (a + c) b • p ∈ Set.Ioc a (a + p)
state_after: case h
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ b - toIocDiv hp (a + c) b • p ∈ Set.Ioc (a + c) (a + c + p)

tactic: exact sub_toIocDiv_zsmul_mem_Ioc hp (a + c) b
state_before: case h
α : Type u_1
inst✝ : LinearOrderedAddCommGroup α
hα : Archimedean α
p : α
hp : 0 < p
a✝ b✝ c✝ : α
n : ℤ
a b c : α
⊢ b - toIocDiv hp (a + c) b • p ∈ Set.Ioc (a + c) (a + c + p)
state_after: no goals
Theorem: Set.piecewise_compl
File: Mathlib/Data/Set/Function.lean

tactic: simp [hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝¹ : (j : α) → Decidable (j ∈ s)
inst✝ : (i : α) → Decidable (i ∈ sᶜ)
x : α
hx : x ∈ s
⊢ sᶜ.piecewise f g x = s.piecewise g f x
state_after: no goals

tactic: simp [hx]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
π : α → Type u_5
δ : α → Sort u_6
s : Set α
f g : (i : α) → δ i
inst✝¹ : (j : α) → Decidable (j ∈ s)
inst✝ : (i : α) → Decidable (i ∈ sᶜ)
x : α
hx : x ∉ s
⊢ sᶜ.piecewise f g x = s.piecewise g f x
state_after: no goals
Theorem: Set.image_op_inv
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: simp_rw [← image_inv, Function.Semiconj.set_image op_inv s]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : InvolutiveInv α
s t : Set α
a : α
⊢ op '' s⁻¹ = (op '' s)⁻¹
state_after: no goals
Theorem: Units.mul_inv_eq_iff_eq_mul
File: Mathlib/Algebra/Group/Units.lean

tactic: rw [← h, inv_mul_cancel_right]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c✝ u : αˣ
a c : α
h : a * ↑b⁻¹ = c
⊢ a = c * ↑b
state_after: no goals

tactic: rw [h, mul_inv_cancel_right]
state_before: α : Type u
inst✝ : Monoid α
a✝ b c✝ u : αˣ
a c : α
h : a = c * ↑b
⊢ a * ↑b⁻¹ = c
state_after: no goals
Theorem: TypeVec.fst_prod_mk
File: Mathlib/Data/TypeVec.lean

tactic: funext i
state_before: n : ℕ
α α' β β' : TypeVec.{u_1} n
f : α ⟹ β
g : α' ⟹ β'
⊢ prod.fst ⊚ (f ⊗' g) = f ⊚ prod.fst
state_after: case h
n : ℕ
α α' β β' : TypeVec.{u_1} n
f : α ⟹ β
g : α' ⟹ β'
i : Fin2 n
⊢ (prod.fst ⊚ (f ⊗' g)) i = (f ⊚ prod.fst) i

tactic: induction i with
| fz => rfl
| fs _ i_ih => apply i_ih
state_before: case h
n : ℕ
α α' β β' : TypeVec.{u_1} n
f : α ⟹ β
g : α' ⟹ β'
i : Fin2 n
⊢ (prod.fst ⊚ (f ⊗' g)) i = (f ⊚ prod.fst) i
state_after: no goals

tactic: rfl
state_before: case h.fz
n n✝ : ℕ
α α' β β' : TypeVec.{u_1} (n✝ + 1)
f : α ⟹ β
g : α' ⟹ β'
⊢ (prod.fst ⊚ (f ⊗' g)) Fin2.fz = (f ⊚ prod.fst) Fin2.fz
state_after: no goals

tactic: apply i_ih
state_before: case h.fs
n n✝ : ℕ
a✝ : Fin2 n✝
i_ih : ∀ {α α' β β' : TypeVec.{u_1} n✝} (f : α ⟹ β) (g : α' ⟹ β'), (prod.fst ⊚ (f ⊗' g)) a✝ = (f ⊚ prod.fst) a✝
α α' β β' : TypeVec.{u_1} (n✝ + 1)
f : α ⟹ β
g : α' ⟹ β'
⊢ (prod.fst ⊚ (f ⊗' g)) a✝.fs = (f ⊚ prod.fst) a✝.fs
state_after: no goals
Theorem: MeasureTheory.measureUnivNNReal_pos
File: Mathlib/MeasureTheory/Measure/Typeclasses.lean

tactic: contrapose! hμ
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : IsFiniteMeasure μ
hμ : μ ≠ 0
⊢ 0 < measureUnivNNReal μ
state_after: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : IsFiniteMeasure μ
hμ : measureUnivNNReal μ ≤ 0
⊢ μ = 0

tactic: simpa [measureUnivNNReal_eq_zero, Nat.le_zero] using hμ
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
ι : Type u_4
m0 : MeasurableSpace α
inst✝¹ : MeasurableSpace β
μ ν ν₁ ν₂ : Measure α
s t : Set α
inst✝ : IsFiniteMeasure μ
hμ : measureUnivNNReal μ ≤ 0
⊢ μ = 0
state_after: no goals
Theorem: xor_true
File: Mathlib/Logic/Basic.lean

tactic: simp (config := { unfoldPartialApp := true }) [Xor']
state_before: a b : Prop
⊢ Xor' True = Not
state_after: no goals
Theorem: WithTop.sInf_empty
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝¹ : Preorder α
inst✝ : InfSet α
⊢ ∅ ⊆ {⊤} ∨ ¬BddBelow ∅
state_after: no goals
Theorem: edist_pos
File: Mathlib/Topology/EMetricSpace/Basic.lean

tactic: simp [← not_le]
state_before: α : Type u
β : Type v
X : Type u_1
inst✝¹ : PseudoEMetricSpace α
γ : Type w
inst✝ : EMetricSpace γ
x y : γ
⊢ 0 < edist x y ↔ x ≠ y
state_after: no goals
Theorem: QuaternionAlgebra.star_eq_neg
File: Mathlib/Algebra/Quaternion.lean

tactic: simp [QuaternionAlgebra.ext_iff, eq_neg_iff_add_eq_zero]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝² : CommRing R
c₁✝ c₂✝ r x y z : R
a✝ b c : ℍ[R,c₁✝,c₂✝]
inst✝¹ : NoZeroDivisors R
inst✝ : CharZero R
c₁ c₂ : R
a : ℍ[R,c₁,c₂]
⊢ star a = -a ↔ a.re = 0
state_after: no goals
Theorem: MeasureTheory.snorm_trim_ae
File: Mathlib/MeasureTheory/Function/LpSeminorm/Trim.lean

tactic: rw [snorm_congr_ae hf.ae_eq_mk, snorm_congr_ae (ae_eq_of_ae_eq_trim hf.ae_eq_mk)]
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ : Measure α
inst✝ : NormedAddCommGroup E
hm : m ≤ m0
f : α → E
hf : AEStronglyMeasurable f (μ.trim hm)
⊢ snorm f p (μ.trim hm) = snorm f p μ
state_after: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ : Measure α
inst✝ : NormedAddCommGroup E
hm : m ≤ m0
f : α → E
hf : AEStronglyMeasurable f (μ.trim hm)
⊢ snorm (AEStronglyMeasurable.mk f hf) p (μ.trim hm) = snorm (AEStronglyMeasurable.mk f hf) p μ

tactic: exact snorm_trim hm hf.stronglyMeasurable_mk
state_before: α : Type u_1
E : Type u_2
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ : Measure α
inst✝ : NormedAddCommGroup E
hm : m ≤ m0
f : α → E
hf : AEStronglyMeasurable f (μ.trim hm)
⊢ snorm (AEStronglyMeasurable.mk f hf) p (μ.trim hm) = snorm (AEStronglyMeasurable.mk f hf) p μ
state_after: no goals
Theorem: Finsupp.mapRange.addMonoidHom_comp
File: Mathlib/Data/Finsupp/Basic.lean

tactic: simp only [comp_apply, map_zero]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Type u_4
M : Type u_5
M' : Type u_6
N : Type u_7
P : Type u_8
G : Type u_9
H : Type u_10
R : Type u_11
S : Type u_12
inst✝⁴ : AddCommMonoid M
inst✝³ : AddCommMonoid N
inst✝² : AddCommMonoid P
F : Type u_13
inst✝¹ : FunLike F M N
inst✝ : AddMonoidHomClass F M N
f : N →+ P
f₂ : M →+ N
⊢ (⇑f ∘ ⇑f₂) 0 = 0
state_after: no goals
Theorem: RatFunc.num_mul_dvd
File: Mathlib/FieldTheory/RatFunc/Basic.lean

tactic: by_cases hx : x = 0
state_before: K : Type u
inst✝ : Field K
x y : RatFunc K
⊢ (x * y).num ∣ x.num * y.num
state_after: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : x = 0
⊢ (x * y).num ∣ x.num * y.num

case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
⊢ (x * y).num ∣ x.num * y.num

tactic: by_cases hy : y = 0
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
⊢ (x * y).num ∣ x.num * y.num
state_after: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : y = 0
⊢ (x * y).num ∣ x.num * y.num

case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ (x * y).num ∣ x.num * y.num

tactic: rw [num_dvd (mul_ne_zero (num_ne_zero hx) (num_ne_zero hy))]
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ (x * y).num ∣ x.num * y.num
state_after: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ ∃ q, q ≠ 0 ∧ x * y = (algebraMap K[X] (RatFunc K)) (x.num * y.num) / (algebraMap K[X] (RatFunc K)) q

tactic: refine ⟨x.denom * y.denom, mul_ne_zero (denom_ne_zero x) (denom_ne_zero y), ?_⟩
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ ∃ q, q ≠ 0 ∧ x * y = (algebraMap K[X] (RatFunc K)) (x.num * y.num) / (algebraMap K[X] (RatFunc K)) q
state_after: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ x * y = (algebraMap K[X] (RatFunc K)) (x.num * y.num) / (algebraMap K[X] (RatFunc K)) (x.denom * y.denom)

tactic: rw [RingHom.map_mul, RingHom.map_mul, ← div_mul_div_comm, num_div_denom, num_div_denom]
state_before: case neg
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : ¬y = 0
⊢ x * y = (algebraMap K[X] (RatFunc K)) (x.num * y.num) / (algebraMap K[X] (RatFunc K)) (x.denom * y.denom)
state_after: no goals

tactic: simp [hx]
state_before: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : x = 0
⊢ (x * y).num ∣ x.num * y.num
state_after: no goals

tactic: simp [hy]
state_before: case pos
K : Type u
inst✝ : Field K
x y : RatFunc K
hx : ¬x = 0
hy : y = 0
⊢ (x * y).num ∣ x.num * y.num
state_after: no goals
Theorem: Module.Baer.ExtensionOfMaxAdjoin.extendIdealTo_eq
File: Mathlib/Algebra/Module/Injective.lean

tactic: simp only [ExtensionOfMaxAdjoin.extendIdealTo_is_extension i f h _ _ hr,
  ExtensionOfMaxAdjoin.idealTo, LinearMap.coe_mk, Subtype.coe_mk, AddHom.coe_mk]
state_before: R : Type u
inst✝⁷ : Ring R
Q : Type v
inst✝⁶ : AddCommGroup Q
inst✝⁵ : Module R Q
M : Type u_1
N : Type u_2
inst✝⁴ : AddCommGroup M
inst✝³ : AddCommGroup N
inst✝² : Module R M
inst✝¹ : Module R N
i : M →ₗ[R] N
f : M →ₗ[R] Q
inst✝ : Fact (Function.Injective ⇑i)
h : Baer R Q
y : N
r : R
hr : r • y ∈ (extensionOfMax i f).domain
⊢ (extendIdealTo i f h y) r = ↑(extensionOfMax i f).toLinearPMap ⟨r • y, hr⟩
state_after: no goals
Theorem: Ordinal.lt_mul_of_limit
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simpa only [not_forall₂, not_le, bex_def] using not_congr (@mul_le_of_limit b c a h)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b c : Ordinal.{u_4}
h : c.IsLimit
⊢ a < b * c ↔ ∃ c' < c, a < b * c'
state_after: no goals
Theorem: Sylow.ne_bot_of_dvd_card
File: Mathlib/GroupTheory/Sylow.lean

tactic: refine fun h => hp.out.not_dvd_one ?_
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
hdvd : p ∣ Fintype.card G
⊢ ↑P ≠ ⊥
state_after: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
hdvd : p ∣ Fintype.card G
h : ↑P = ⊥
⊢ p ∣ 1

tactic: have key : p ∣ card (P : Subgroup G) := P.dvd_card_of_dvd_card hdvd
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
hdvd : p ∣ Fintype.card G
h : ↑P = ⊥
⊢ p ∣ 1
state_after: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
hdvd : p ∣ Fintype.card G
h : ↑P = ⊥
key : p ∣ Fintype.card ↥↑P
⊢ p ∣ 1

tactic: rwa [h, ← @Nat.card_eq_fintype_card, card_bot] at key
state_before: G : Type u
α : Type v
β : Type w
inst✝¹ : Group G
inst✝ : Fintype G
p : ℕ
hp : Fact (Nat.Prime p)
P : Sylow p G
hdvd : p ∣ Fintype.card G
h : ↑P = ⊥
key : p ∣ Fintype.card ↥↑P
⊢ p ∣ 1
state_after: no goals
Theorem: inv_mul_lt_iff_lt_mul
File: Mathlib/Algebra/Order/Group/Defs.lean

tactic: rw [← mul_lt_mul_iff_left b, mul_inv_cancel_left]
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : α
⊢ b⁻¹ * a < c ↔ a < b * c
state_after: no goals
Theorem: Finset.mem_falling
File: Mathlib/Combinatorics/SetFamily/LYM.lean

tactic: simp_rw [falling, mem_sup, mem_powersetCard]
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ s ∈ falling k 𝒜 ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k
state_after: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ v ∈ 𝒜, s ⊆ v ∧ s.card = k) ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k

tactic: aesop
state_before: 𝕜 : Type u_1
α : Type u_2
inst✝¹ : LinearOrderedField 𝕜
inst✝ : DecidableEq α
k : ℕ
𝒜 : Finset (Finset α)
s : Finset α
⊢ (∃ v ∈ 𝒜, s ⊆ v ∧ s.card = k) ↔ (∃ t ∈ 𝒜, s ⊆ t) ∧ s.card = k
state_after: no goals
Theorem: Nat.ord_proj_mul
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: simp [factorization_mul ha hb, pow_add]
state_before: a✝ b✝ m n p✝ a b p : ℕ
ha : a ≠ 0
hb : b ≠ 0
⊢ p ^ (a * b).factorization p = p ^ a.factorization p * p ^ b.factorization p
state_after: no goals
Theorem: PresheafOfModules.DifferentialsConstruction.relativeDifferentials'_map_d
File: Mathlib/Algebra/Category/ModuleCat/Differentials/Presheaf.lean

tactic: rw [relativeDifferentials'_map_apply, CommRingCat.KaehlerDifferential.map_d]
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
S : Cᵒᵖ ⥤ CommRingCat
F : C ⥤ D
S' R : Dᵒᵖ ⥤ CommRingCat
M N : PresheafOfModules (R ⋙ forget₂ CommRingCat RingCat)
φ : S ⟶ F.op ⋙ R
φ' : S' ⟶ R
X Y : Dᵒᵖ
f : X ⟶ Y
x : ↑(R.obj X)
⊢ ((relativeDifferentials' φ').map f) (CommRingCat.KaehlerDifferential.d x) =
    CommRingCat.KaehlerDifferential.d ((R.map f) x)
state_after: no goals
Theorem: CircleDeg1Lift.map_fract_sub_fract_eq
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: rw [Int.fract, f.map_sub_int, sub_sub_sub_cancel_right]
state_before: f g : CircleDeg1Lift
x : ℝ
⊢ f (fract x) - fract x = f x - x
state_after: no goals
Theorem: Complex.GammaIntegral_eq_mellin
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

tactic: simp only [mellin, GammaIntegral, smul_eq_mul, mul_comm]
state_before: s : ℂ
⊢ s.GammaIntegral = mellin (fun x => ↑(rexp (-x))) s
state_after: no goals
Theorem: Real.summable_nat_pow_inv
File: Mathlib/Analysis/PSeries.lean

tactic: simp only [← rpow_natCast, summable_nat_rpow_inv, Nat.one_lt_cast]
state_before: p : ℕ
⊢ (Summable fun n => (↑n ^ p)⁻¹) ↔ 1 < p
state_after: no goals
Theorem: Polynomial.degree_pow_le
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

tactic: rw [pow_zero, zero_nsmul]
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 : R[X]
⊢ (p ^ 0).degree ≤ 0 • p.degree
state_after: 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]
⊢ degree 1 ≤ 0

tactic: exact degree_one_le
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 : R[X]
⊢ degree 1 ≤ 0
state_after: no goals

tactic: rw [pow_succ]
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 : R[X]
n : ℕ
⊢ (p ^ (n + 1)).degree ≤ (p ^ n).degree + p.degree
state_after: 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]
n : ℕ
⊢ (p ^ n * p).degree ≤ (p ^ n).degree + p.degree

tactic: exact degree_mul_le _ _
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 : R[X]
n : ℕ
⊢ (p ^ n * p).degree ≤ (p ^ n).degree + p.degree
state_after: no goals

tactic: rw [succ_nsmul]
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 : R[X]
n : ℕ
⊢ (p ^ n).degree + p.degree ≤ (n + 1) • p.degree
state_after: 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]
n : ℕ
⊢ (p ^ n).degree + p.degree ≤ n • p.degree + p.degree

tactic: exact add_le_add_right (degree_pow_le _ _) _
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 : R[X]
n : ℕ
⊢ (p ^ n).degree + p.degree ≤ n • p.degree + p.degree
state_after: no goals
Theorem: CategoryTheory.ProjectiveResolution.iso_hom_naturality
File: Mathlib/CategoryTheory/Abelian/ProjectiveResolution.lean

tactic: rw [← cancel_epi (P.iso).inv, iso_inv_naturality_assoc f P Q φ comm,
  Iso.inv_hom_id_assoc, Iso.inv_hom_id, comp_id]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : Abelian C
inst✝ : HasProjectiveResolutions C
X Y : C
f : X ⟶ Y
P : ProjectiveResolution X
Q : ProjectiveResolution Y
φ : P.complex ⟶ Q.complex
comm : φ.f 0 ≫ Q.π.f 0 = P.π.f 0 ≫ f
⊢ (projectiveResolutions C).map f ≫ Q.iso.hom = P.iso.hom ≫ (HomotopyCategory.quotient C (ComplexShape.down ℕ)).map φ
state_after: no goals
Theorem: manyOneReducible_refl
File: Mathlib/Computability/Reduce.lean

tactic: simp
state_before: α : Type u_1
inst✝ : Primcodable α
p : α → Prop
⊢ ∀ (a : α), p a ↔ p (id a)
state_after: no goals
Theorem: List.eraseIdx_zero
File: .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean

tactic: cases l <;> rfl
state_before: α : Type u
β : Type v
l : List α
⊢ l.eraseIdx 0 = l.tail
state_after: no goals
Theorem: Subgroup.SchurZassenhausInduction.step0
File: Mathlib/GroupTheory/SchurZassenhaus.lean

tactic: rintro rfl
state_before: G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
N : Subgroup G
inst✝ : N.Normal
h1 : (Fintype.card ↥N).Coprime N.index
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Fintype.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H'
h3 : ∀ (H : Subgroup G), ¬N.IsComplement' H
⊢ N ≠ ⊥
state_after: G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Fintype.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H'
inst✝ : ⊥.Normal
h1 : (Fintype.card ↥⊥).Coprime ⊥.index
h3 : ∀ (H : Subgroup G), ¬⊥.IsComplement' H
⊢ False

tactic: exact h3 ⊤ isComplement'_bot_top
state_before: G : Type u
inst✝² : Group G
inst✝¹ : Fintype G
h2 :
  ∀ (G' : Type u) [inst : Group G'] [inst_1 : Fintype G'],
    Fintype.card G' < Fintype.card G →
      ∀ {N' : Subgroup G'} [inst_2 : N'.Normal], (Fintype.card ↥N').Coprime N'.index → ∃ H', N'.IsComplement' H'
inst✝ : ⊥.Normal
h1 : (Fintype.card ↥⊥).Coprime ⊥.index
h3 : ∀ (H : Subgroup G), ¬⊥.IsComplement' H
⊢ False
state_after: no goals
Theorem: Finset.sum_smul_vsub_const_eq_affineCombination_vsub
File: Mathlib/LinearAlgebra/AffineSpace/Combination.lean

tactic: rw [sum_smul_vsub_eq_affineCombination_vsub, affineCombination_apply_const _ _ _ h]
state_before: k : Type u_1
V : Type u_2
P : Type u_3
inst✝² : Ring k
inst✝¹ : AddCommGroup V
inst✝ : Module k V
S : AffineSpace V P
ι : Type u_4
s : Finset ι
ι₂ : Type u_5
s₂ : Finset ι₂
w : ι → k
p₁ : ι → P
p₂ : P
h : ∑ i ∈ s, w i = 1
⊢ ∑ i ∈ s, w i • (p₁ i -ᵥ p₂) = (affineCombination k s p₁) w -ᵥ p₂
state_after: no goals
Theorem: Ordnode.eraseMin.valid
File: Mathlib/Data/Ordmap/Ordset.lean

tactic: rw [h.2.eq_node']
state_before: α : Type u_1
inst✝ : Preorder α
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
h : (node size✝ l x r).Valid
⊢ (node size✝ l x r).eraseMin.Valid
state_after: α : Type u_1
inst✝ : Preorder α
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
h : (node size✝ l x r).Valid
⊢ (l.node' x r).eraseMin.Valid

tactic: exact h.eraseMin_aux.1.valid
state_before: α : Type u_1
inst✝ : Preorder α
size✝ : ℕ
l : Ordnode α
x : α
r : Ordnode α
h : (node size✝ l x r).Valid
⊢ (l.node' x r).eraseMin.Valid
state_after: no goals
Theorem: List.trop_sum
File: Mathlib/Algebra/Tropical/BigOperators.lean

tactic: induction' l with hd tl IH
state_before: R : Type u_1
S : Type u_2
inst✝ : AddMonoid R
l : List R
⊢ trop l.sum = (map trop l).prod
state_after: case nil
R : Type u_1
S : Type u_2
inst✝ : AddMonoid R
⊢ trop [].sum = (map trop []).prod

case cons
R : Type u_1
S : Type u_2
inst✝ : AddMonoid R
hd : R
tl : List R
IH : trop tl.sum = (map trop tl).prod
⊢ trop (hd :: tl).sum = (map trop (hd :: tl)).prod

tactic: simp
state_before: case nil
R : Type u_1
S : Type u_2
inst✝ : AddMonoid R
⊢ trop [].sum = (map trop []).prod
state_after: no goals

tactic: simp [← IH]
state_before: case cons
R : Type u_1
S : Type u_2
inst✝ : AddMonoid R
hd : R
tl : List R
IH : trop tl.sum = (map trop tl).prod
⊢ trop (hd :: tl).sum = (map trop (hd :: tl)).prod
state_after: no goals
Theorem: Localization.mk_intCast
File: Mathlib/RingTheory/Localization/Basic.lean

tactic: simpa using mk_algebraMap (R := R) (A := ℤ) _
state_before: R : Type u_1
inst✝³ : CommRing R
M : Submonoid R
S : Type u_2
inst✝² : CommRing S
inst✝¹ : Algebra R S
P : Type u_3
inst✝ : CommRing P
m : ℤ
⊢ mk (↑m) 1 = ↑m
state_after: no goals
Theorem: Multiset.count_pos
File: Mathlib/Data/Multiset/Basic.lean

tactic: simp [count, countP_pos]
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
⊢ 0 < count a s ↔ a ∈ s
state_after: no goals
Theorem: Finset.mem_powersetCard
File: Mathlib/Data/Finset/Powerset.lean

tactic: cases s
state_before: α : Type u_1
s✝ t✝ : Finset α
n : ℕ
s t : Finset α
⊢ s ∈ powersetCard n t ↔ s ⊆ t ∧ s.card = n
state_after: case mk
α : Type u_1
s t✝ : Finset α
n : ℕ
t : Finset α
val✝ : Multiset α
nodup✝ : val✝.Nodup
⊢ { val := val✝, nodup := nodup✝ } ∈ powersetCard n t ↔
    { val := val✝, nodup := nodup✝ } ⊆ t ∧ { val := val✝, nodup := nodup✝ }.card = n

tactic: simp [powersetCard, val_le_iff.symm]
state_before: case mk
α : Type u_1
s t✝ : Finset α
n : ℕ
t : Finset α
val✝ : Multiset α
nodup✝ : val✝.Nodup
⊢ { val := val✝, nodup := nodup✝ } ∈ powersetCard n t ↔
    { val := val✝, nodup := nodup✝ } ⊆ t ∧ { val := val✝, nodup := nodup✝ }.card = n
state_after: no goals
Theorem: MvPolynomial.zero_not_mem_coeffs
File: Mathlib/Algebra/MvPolynomial/Basic.lean

tactic: intro hz
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
⊢ 0 ∉ p.coeffs
state_after: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
hz : 0 ∈ p.coeffs
⊢ False

tactic: obtain ⟨n, hnsupp, hn⟩ := mem_coeffs_iff.mp hz
state_before: R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
hz : 0 ∈ p.coeffs
⊢ False
state_after: case intro.intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
hz : 0 ∈ p.coeffs
n : σ →₀ ℕ
hnsupp : n ∈ p.support
hn : 0 = coeff n p
⊢ False

tactic: exact (mem_support_iff.mp hnsupp) hn.symm
state_before: case intro.intro
R : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ : Type u_1
a a' a₁ a₂ : R
e : ℕ
n✝ m : σ
s : σ →₀ ℕ
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S₁
p✝ q p : MvPolynomial σ R
hz : 0 ∈ p.coeffs
n : σ →₀ ℕ
hnsupp : n ∈ p.support
hn : 0 = coeff n p
⊢ False
state_after: no goals