1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: CategoryTheory.ShortComplex.homologyι_descOpcycles_eq_zero_of_boundary
File: Mathlib/Algebra/Homology/ShortComplex/Homology.lean

tactic: rw [hx, S.zero_assoc, zero_comp]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
k : S.X₂ ⟶ A
x : S.X₃ ⟶ A
hx : k = S.g ≫ x
⊢ S.f ≫ k = 0
state_after: no goals

tactic: dsimp only [homologyι]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
k : S.X₂ ⟶ A
x : S.X₃ ⟶ A
hx : k = S.g ≫ x
⊢ S.homologyι ≫ S.descOpcycles k ⋯ = 0
state_after: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
k : S.X₂ ⟶ A
x : S.X₃ ⟶ A
hx : k = S.g ≫ x
⊢ (S.rightHomologyIso.inv ≫ S.rightHomologyι) ≫ S.descOpcycles k ⋯ = 0

tactic: rw [assoc, S.rightHomologyι_descOpcycles_π_eq_zero_of_boundary k x hx, comp_zero]
state_before: C : Type u
inst✝² : Category.{v, u} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ S₄ : ShortComplex C
φ : S₁ ⟶ S₂
h₁ : S₁.HomologyData
h₂ : S₂.HomologyData
A : C
inst✝ : S.HasHomology
k : S.X₂ ⟶ A
x : S.X₃ ⟶ A
hx : k = S.g ≫ x
⊢ (S.rightHomologyIso.inv ≫ S.rightHomologyι) ≫ S.descOpcycles k ⋯ = 0
state_after: no goals
Theorem: ContinuousLinearEquiv.hasSum'
File: Mathlib/Topology/Algebra/InfiniteSum/Module.lean

tactic: rw [e.hasSum, ContinuousLinearEquiv.symm_apply_apply]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Type u_5
κ : Type u_6
R : Type u_7
R₂ : Type u_8
M : Type u_9
M₂ : Type u_10
inst✝⁹ : Semiring R
inst✝⁸ : Semiring R₂
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
inst✝⁵ : AddCommMonoid M₂
inst✝⁴ : Module R₂ M₂
inst✝³ : TopologicalSpace M
inst✝² : TopologicalSpace M₂
σ : R →+* R₂
σ' : R₂ →+* R
inst✝¹ : RingHomInvPair σ σ'
inst✝ : RingHomInvPair σ' σ
f : ι → M
e : M ≃SL[σ] M₂
x : M
⊢ HasSum (fun b => e (f b)) (e x) ↔ HasSum f x
state_after: no goals
Theorem: Nat.xor_cancel_right
File: Mathlib/Data/Nat/Bitwise.lean

tactic: rw [Nat.xor_assoc, xor_self, xor_zero]
state_before: n m : ℕ
⊢ m ^^^ n ^^^ n = m
state_after: no goals
Theorem: Finset.card_image_le
File: Mathlib/Data/Finset/Card.lean

tactic: simpa only [card_map] using (s.1.map f).toFinset_card_le
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s t u : Finset α
f : α → β
n : ℕ
inst✝ : DecidableEq β
⊢ (image f s).card ≤ s.card
state_after: no goals
Theorem: partialSups_iff_forall
File: Mathlib/Order/PartialSups.lean

tactic: simp
state_before: α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
p : α → Prop
hp : ∀ {a b : α}, p (a ⊔ b) ↔ p a ∧ p b
⊢ p ((partialSups f) 0) ↔ ∀ k ≤ 0, p (f k)
state_after: no goals

tactic: simp [hp, partialSups_iff_forall, ← Nat.lt_succ_iff, ← Nat.forall_lt_succ]
state_before: α : Type u_1
inst✝ : SemilatticeSup α
f : ℕ → α
p : α → Prop
hp : ∀ {a b : α}, p (a ⊔ b) ↔ p a ∧ p b
n : ℕ
⊢ p ((partialSups f) (n + 1)) ↔ ∀ k ≤ n + 1, p (f k)
state_after: no goals
Theorem: CategoryTheory.id_of_comp_right_id
File: Mathlib/CategoryTheory/Category/Basic.lean

tactic: convert w (𝟙 X)
state_before: C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f : X ⟶ X
w : ∀ {Y : C} (g : Y ⟶ X), g ≫ f = g
⊢ f = 𝟙 X
state_after: case h.e'_2
C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f : X ⟶ X
w : ∀ {Y : C} (g : Y ⟶ X), g ≫ f = g
⊢ f = 𝟙 X ≫ f

tactic: simp
state_before: case h.e'_2
C : Type u
inst✝ : Category.{v, u} C
X Y Z : C
f : X ⟶ X
w : ∀ {Y : C} (g : Y ⟶ X), g ≫ f = g
⊢ f = 𝟙 X ≫ f
state_after: no goals
Theorem: IsLocalizedModule.mk'_add
File: Mathlib/Algebra/Module/LocalizedModule.lean

tactic: rw [mk'_add_mk', ← smul_add, mk'_cancel_left]
state_before: R : Type u_1
inst✝¹² : CommSemiring R
S : Submonoid R
M : Type u_2
M' : Type u_3
M'' : Type u_4
inst✝¹¹ : AddCommMonoid M
inst✝¹⁰ : AddCommMonoid M'
inst✝⁹ : AddCommMonoid M''
A : Type u_5
inst✝⁸ : CommSemiring A
inst✝⁷ : Algebra R A
inst✝⁶ : Module A M'
inst✝⁵ : IsLocalization S A
inst✝⁴ : Module R M
inst✝³ : Module R M'
inst✝² : Module R M''
inst✝¹ : IsScalarTower R A M'
f : M →ₗ[R] M'
g : M →ₗ[R] M''
inst✝ : IsLocalizedModule S f
m₁ m₂ : M
s : ↥S
⊢ mk' f (m₁ + m₂) s = mk' f m₁ s + mk' f m₂ s
state_after: no goals
Theorem: MeasureTheory.GridLines.T_empty
File: Mathlib/Analysis/FunctionalSpaces/SobolevInequality.lean

tactic: simp [T]
state_before: ι : Type u_1
inst✝³ : Fintype ι
inst✝² : DecidableEq ι
A : ι → Type u_2
inst✝¹ : (i : ι) → MeasurableSpace (A i)
μ : (i : ι) → Measure (A i)
inst✝ : ∀ (i : ι), SigmaFinite (μ i)
p : ℝ
f : ((i : ι) → A i) → ℝ≥0∞
x : (i : ι) → A i
⊢ T μ p f ∅ x = f x ^ (1 + p)
state_after: no goals
Theorem: LieIdeal.map_comap_bracket_eq
File: Mathlib/Algebra/Lie/IdealOperations.lean

tactic: rw [← map_sup_ker_eq_map, ← comap_bracket_eq h, map_comap_eq h, inf_eq_right]
state_before: R : Type u
L : Type v
L' : Type w₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J J₁ J₂ : LieIdeal R L'
h : f.IsIdealMorphism
⊢ map f ⁅comap f J₁, comap f J₂⁆ = ⁅f.idealRange ⊓ J₁, f.idealRange ⊓ J₂⁆
state_after: R : Type u
L : Type v
L' : Type w₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J J₁ J₂ : LieIdeal R L'
h : f.IsIdealMorphism
⊢ ⁅f.idealRange ⊓ J₁, f.idealRange ⊓ J₂⁆ ≤ f.idealRange

tactic: exact le_trans (LieSubmodule.lie_le_left _ _) inf_le_left
state_before: R : Type u
L : Type v
L' : Type w₂
inst✝⁴ : CommRing R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : LieRing L'
inst✝ : LieAlgebra R L'
f : L →ₗ⁅R⁆ L'
I : LieIdeal R L
J J₁ J₂ : LieIdeal R L'
h : f.IsIdealMorphism
⊢ ⁅f.idealRange ⊓ J₁, f.idealRange ⊓ J₂⁆ ≤ f.idealRange
state_after: no goals
Theorem: sup_left_idem
File: Mathlib/Order/Lattice.lean

tactic: simp
state_before: α : Type u
β : Type v
inst✝ : SemilatticeSup α
a✝ b✝ c d a b : α
⊢ a ⊔ (a ⊔ b) = a ⊔ b
state_after: no goals
Theorem: Filter.ZeroAtFilter.neg
File: Mathlib/Order/Filter/ZeroAndBoundedAtFilter.lean

tactic: simpa using hf.neg
state_before: 𝕜 : Type u_1
α : Type u_2
β : Type u_3
inst✝² : TopologicalSpace β
inst✝¹ : AddGroup β
inst✝ : ContinuousNeg β
l : Filter α
f : α → β
hf : l.ZeroAtFilter f
⊢ l.ZeroAtFilter (-f)
state_after: no goals
Theorem: Finset.strongDownwardInduction_eq
File: Mathlib/Data/Finset/Card.lean

tactic: rw [strongDownwardInduction]
state_before: α : Type u_1
β : Type u_2
R : Type u_3
s✝ t u : Finset α
f : α → β
n : ℕ
p : Finset α → Sort u_4
H : (t₁ : Finset α) → ({t₂ : Finset α} → t₂.card ≤ n → t₁ ⊂ t₂ → p t₂) → t₁.card ≤ n → p t₁
s : Finset α
⊢ strongDownwardInduction H s = H s fun {t} ht x => strongDownwardInduction H t ht
state_after: no goals
Theorem: Complex.norm_prime_cpow_le_one_half
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [norm_natCast_cpow_of_re_ne_zero p <| by rw [neg_re]; linarith only [hs]]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ ‖↑↑p ^ (-s)‖ ≤ 1 / 2
state_after: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ ↑↑p ^ (-s).re ≤ 1 / 2

tactic: refine (Real.rpow_le_rpow_of_nonpos zero_lt_two (Nat.cast_le.mpr p.prop.two_le) <|
  by rw [neg_re]; linarith only [hs]).trans ?_
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ ↑↑p ^ (-s).re ≤ 1 / 2
state_after: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ 2 ^ (-s).re ≤ 1 / 2

tactic: rw [one_div, ← Real.rpow_neg_one]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ 2 ^ (-s).re ≤ 1 / 2
state_after: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ 2 ^ (-s).re ≤ 2 ^ (-1)

tactic: exact Real.rpow_le_rpow_of_exponent_le one_le_two <| (neg_lt_neg hs).le
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ 2 ^ (-s).re ≤ 2 ^ (-1)
state_after: no goals

tactic: rw [neg_re]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ (-s).re ≠ 0
state_after: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ -s.re ≠ 0

tactic: linarith only [hs]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ -s.re ≠ 0
state_after: no goals

tactic: rw [neg_re]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ (-s).re ≤ 0
state_after: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ -s.re ≤ 0

tactic: linarith only [hs]
state_before: p : Nat.Primes
s : ℂ
hs : 1 < s.re
⊢ -s.re ≤ 0
state_after: no goals
Theorem: LinearOrderedAddCommGroup.tendsto_nhds
File: Mathlib/Topology/Order/LeftRightNhds.lean

tactic: simp [nhds_eq_iInf_abs_sub, abs_sub_comm a]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : TopologicalSpace α
inst✝¹ : LinearOrderedAddCommGroup α
inst✝ : OrderTopology α
l : Filter β
f g : β → α
x : Filter β
a : α
⊢ Tendsto f x (𝓝 a) ↔ ∀ ε > 0, ∀ᶠ (b : β) in x, |f b - a| < ε
state_after: no goals
Theorem: Finset.aux
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

tactic: obtain ⟨u, hu, htu⟩ := ht.exists_superset
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : ∀ t ∈ 𝒜, a ∉ t
ht : 𝒜.Shatters t
⊢ a ∉ t
state_after: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : ∀ t ∈ 𝒜, a ∉ t
ht : 𝒜.Shatters t
u : Finset α
hu : u ∈ 𝒜
htu : t ⊆ u
⊢ a ∉ t

tactic: exact not_mem_mono htu <| h u hu
state_before: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : ∀ t ∈ 𝒜, a ∉ t
ht : 𝒜.Shatters t
u : Finset α
hu : u ∈ 𝒜
htu : t ⊆ u
⊢ a ∉ t
state_after: no goals
Theorem: Complex.summable_one_div_nat_cpow
File: Mathlib/Analysis/PSeriesComplex.lean

tactic: rw [← Real.summable_one_div_nat_rpow, ← summable_nat_add_iff 1 (G := ℝ),
  ← summable_nat_add_iff 1 (G := ℂ), ← summable_norm_iff]
state_before: p : ℂ
⊢ (Summable fun n => 1 / ↑n ^ p) ↔ 1 < p.re
state_after: p : ℂ
⊢ (Summable fun x => ‖1 / ↑(x + 1) ^ p‖) ↔ Summable fun n => 1 / ↑(n + 1) ^ p.re

tactic: simp only [norm_div, norm_one, norm_eq_abs, ← ofReal_natCast, abs_cpow_eq_rpow_re_of_pos
  (Nat.cast_pos.mpr <| Nat.succ_pos _)]
state_before: p : ℂ
⊢ (Summable fun x => ‖1 / ↑(x + 1) ^ p‖) ↔ Summable fun n => 1 / ↑(n + 1) ^ p.re
state_after: no goals
Theorem: DirichletCharacter.mul_delta
File: Mathlib/NumberTheory/LSeries/Dirichlet.lean

tactic: rw [cast_one, map_one]
state_before: n : ℕ
χ : DirichletCharacter ℂ n
⊢ χ ↑1 = 1
state_after: no goals
Theorem: SimpleGraph.degree_compl
File: Mathlib/Combinatorics/SimpleGraph/Finite.lean

tactic: classical
  rw [← card_neighborSet_union_compl_neighborSet G v, Set.toFinset_union]
  simp [card_union_of_disjoint (Set.disjoint_toFinset.mpr (compl_neighborSet_disjoint G v))]
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
v : V
inst✝² : Fintype ↑(G.neighborSet v)
inst✝¹ : Fintype ↑(Gᶜ.neighborSet v)
inst✝ : Fintype V
⊢ Gᶜ.degree v = Fintype.card V - 1 - G.degree v
state_after: no goals

tactic: rw [← card_neighborSet_union_compl_neighborSet G v, Set.toFinset_union]
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
v : V
inst✝² : Fintype ↑(G.neighborSet v)
inst✝¹ : Fintype ↑(Gᶜ.neighborSet v)
inst✝ : Fintype V
⊢ Gᶜ.degree v = Fintype.card V - 1 - G.degree v
state_after: V : Type u_1
G : SimpleGraph V
e : Sym2 V
v : V
inst✝² : Fintype ↑(G.neighborSet v)
inst✝¹ : Fintype ↑(Gᶜ.neighborSet v)
inst✝ : Fintype V
⊢ Gᶜ.degree v = ((G.neighborSet v).toFinset ∪ (Gᶜ.neighborSet v).toFinset).card - G.degree v

tactic: simp [card_union_of_disjoint (Set.disjoint_toFinset.mpr (compl_neighborSet_disjoint G v))]
state_before: V : Type u_1
G : SimpleGraph V
e : Sym2 V
v : V
inst✝² : Fintype ↑(G.neighborSet v)
inst✝¹ : Fintype ↑(Gᶜ.neighborSet v)
inst✝ : Fintype V
⊢ Gᶜ.degree v = ((G.neighborSet v).toFinset ∪ (Gᶜ.neighborSet v).toFinset).card - G.degree v
state_after: no goals
Theorem: Lagrange.degree_basis
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [degree_eq_natDegree (basis_ne_zero hvs hi), natDegree_basis hvs hi]
state_before: F : Type u_1
inst✝¹ : Field F
ι : Type u_2
inst✝ : DecidableEq ι
s : Finset ι
v : ι → F
i j : ι
hvs : Set.InjOn v ↑s
hi : i ∈ s
⊢ (Lagrange.basis s v i).degree = ↑(s.card - 1)
state_after: no goals
Theorem: eq_of_derivWithin_eq
File: Mathlib/Analysis/Calculus/MeanValue.lean

tactic: have A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y := fun y hy =>
  (fdiff y (mem_Icc_of_Ico hy)).hasDerivWithinAt.mono_of_mem (Icc_mem_nhdsWithin_Ici hy)
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → E
a b : ℝ
f' g : ℝ → E
fdiff : DifferentiableOn ℝ f (Icc a b)
gdiff : DifferentiableOn ℝ g (Icc a b)
hderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)
hi : f a = g a
⊢ ∀ y ∈ Icc a b, f y = g y
state_after: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → E
a b : ℝ
f' g : ℝ → E
fdiff : DifferentiableOn ℝ f (Icc a b)
gdiff : DifferentiableOn ℝ g (Icc a b)
hderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)
hi : f a = g a
A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y
⊢ ∀ y ∈ Icc a b, f y = g y

tactic: have B : ∀ y ∈ Ico a b, HasDerivWithinAt g (derivWithin g (Icc a b) y) (Ici y) y := fun y hy =>
  (gdiff y (mem_Icc_of_Ico hy)).hasDerivWithinAt.mono_of_mem (Icc_mem_nhdsWithin_Ici hy)
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → E
a b : ℝ
f' g : ℝ → E
fdiff : DifferentiableOn ℝ f (Icc a b)
gdiff : DifferentiableOn ℝ g (Icc a b)
hderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)
hi : f a = g a
A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y
⊢ ∀ y ∈ Icc a b, f y = g y
state_after: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → E
a b : ℝ
f' g : ℝ → E
fdiff : DifferentiableOn ℝ f (Icc a b)
gdiff : DifferentiableOn ℝ g (Icc a b)
hderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)
hi : f a = g a
A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y
B : ∀ y ∈ Ico a b, HasDerivWithinAt g (derivWithin g (Icc a b) y) (Ici y) y
⊢ ∀ y ∈ Icc a b, f y = g y

tactic: exact
  eq_of_has_deriv_right_eq A (fun y hy => (hderiv hy).symm ▸ B y hy) fdiff.continuousOn
    gdiff.continuousOn hi
state_before: E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f : ℝ → E
a b : ℝ
f' g : ℝ → E
fdiff : DifferentiableOn ℝ f (Icc a b)
gdiff : DifferentiableOn ℝ g (Icc a b)
hderiv : EqOn (derivWithin f (Icc a b)) (derivWithin g (Icc a b)) (Ico a b)
hi : f a = g a
A : ∀ y ∈ Ico a b, HasDerivWithinAt f (derivWithin f (Icc a b) y) (Ici y) y
B : ∀ y ∈ Ico a b, HasDerivWithinAt g (derivWithin g (Icc a b) y) (Ici y) y
⊢ ∀ y ∈ Icc a b, f y = g y
state_after: no goals
Theorem: Polynomial.smul_modByMonic
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: by_cases hq : q.Monic
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
⊢ c • p %ₘ q = c • (p %ₘ q)
state_after: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
⊢ c • p %ₘ q = c • (p %ₘ q)

case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : ¬q.Monic
⊢ c • p %ₘ q = c • (p %ₘ q)

tactic: cases' subsingleton_or_nontrivial R with hR hR
state_before: case pos
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
⊢ c • p %ₘ q = c • (p %ₘ q)
state_after: case pos.inl
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
hR : Subsingleton R
⊢ c • p %ₘ q = c • (p %ₘ q)

case pos.inr
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
hR : Nontrivial R
⊢ c • p %ₘ q = c • (p %ₘ q)

tactic: simp only [eq_iff_true_of_subsingleton]
state_before: case pos.inl
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
hR : Subsingleton R
⊢ c • p %ₘ q = c • (p %ₘ q)
state_after: no goals

tactic: exact
(div_modByMonic_unique (c • (p /ₘ q)) (c • (p %ₘ q)) hq
    ⟨by rw [mul_smul_comm, ← smul_add, modByMonic_add_div p hq],
      (degree_smul_le _ _).trans_lt (degree_modByMonic_lt _ hq)⟩).2
state_before: case pos.inr
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
hR : Nontrivial R
⊢ c • p %ₘ q = c • (p %ₘ q)
state_after: no goals

tactic: rw [mul_smul_comm, ← smul_add, modByMonic_add_div p hq]
state_before: R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : q.Monic
hR : Nontrivial R
⊢ c • (p %ₘ q) + q * c • (p /ₘ q) = c • p
state_after: no goals

tactic: simp_rw [modByMonic_eq_of_not_monic _ hq]
state_before: case neg
R : Type u
S : Type v
T : Type w
a b : R
n : ℕ
inst✝¹ : CommRing R
p✝ q : R[X]
inst✝ : Semiring S
c : R
p : R[X]
hq : ¬q.Monic
⊢ c • p %ₘ q = c • (p %ₘ q)
state_after: no goals
Theorem: Pi.isCompact_iff_of_isClosed
File: Mathlib/Topology/Compactness/Compact.lean

tactic: constructor <;> intro H
state_before: X✝ : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
s✝ t : Set X✝
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
s : Set ((i : ι) → X i)
hs : IsClosed s
⊢ IsCompact s ↔ ∀ (i : ι), IsCompact (eval i '' s)
state_after: case mp
X✝ : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
s✝ t : Set X✝
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
s : Set ((i : ι) → X i)
hs : IsClosed s
H : IsCompact s
⊢ ∀ (i : ι), IsCompact (eval i '' s)

case mpr
X✝ : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
s✝ t : Set X✝
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
s : Set ((i : ι) → X i)
hs : IsClosed s
H : ∀ (i : ι), IsCompact (eval i '' s)
⊢ IsCompact s

tactic: exact fun i ↦ H.image <| continuous_apply i
state_before: case mp
X✝ : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
s✝ t : Set X✝
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
s : Set ((i : ι) → X i)
hs : IsClosed s
H : IsCompact s
⊢ ∀ (i : ι), IsCompact (eval i '' s)
state_after: no goals

tactic: exact IsCompact.of_isClosed_subset (isCompact_univ_pi H) hs (subset_pi_eval_image univ s)
state_before: case mpr
X✝ : Type u
Y : Type v
ι : Type u_1
inst✝² : TopologicalSpace X✝
inst✝¹ : TopologicalSpace Y
s✝ t : Set X✝
X : ι → Type u_2
inst✝ : (i : ι) → TopologicalSpace (X i)
s : Set ((i : ι) → X i)
hs : IsClosed s
H : ∀ (i : ι), IsCompact (eval i '' s)
⊢ IsCompact s
state_after: no goals
Theorem: Finset.antidiagonal_zero
File: Mathlib/Algebra/Order/Antidiag/Prod.lean

tactic: ext ⟨x, y⟩
state_before: A : Type u_1
inst✝¹ : CanonicallyOrderedAddCommMonoid A
inst✝ : HasAntidiagonal A
⊢ antidiagonal 0 = {(0, 0)}
state_after: case a.mk
A : Type u_1
inst✝¹ : CanonicallyOrderedAddCommMonoid A
inst✝ : HasAntidiagonal A
x y : A
⊢ (x, y) ∈ antidiagonal 0 ↔ (x, y) ∈ {(0, 0)}

tactic: simp
state_before: case a.mk
A : Type u_1
inst✝¹ : CanonicallyOrderedAddCommMonoid A
inst✝ : HasAntidiagonal A
x y : A
⊢ (x, y) ∈ antidiagonal 0 ↔ (x, y) ∈ {(0, 0)}
state_after: no goals
Theorem: PowerSeries.coeff_mul_one_sub_of_lt_order
File: Mathlib/RingTheory/PowerSeries/Order.lean

tactic: simp [coeff_mul_of_lt_order h, mul_sub]
state_before: R✝ : Type u_1
inst✝¹ : Semiring R✝
φ✝ : R✝⟦X⟧
R : Type u_2
inst✝ : CommRing R
φ ψ : R⟦X⟧
n : ℕ
h : ↑n < ψ.order
⊢ (coeff R n) (φ * (1 - ψ)) = (coeff R n) φ
state_after: no goals
Theorem: CompositionAsSet.blocks_sum
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: have : c.blocks.take c.length = c.blocks := take_all_of_le (by simp [blocks])
state_before: n : ℕ
c : CompositionAsSet n
⊢ c.blocks.sum = n
state_after: n : ℕ
c : CompositionAsSet n
this : take c.length c.blocks = c.blocks
⊢ c.blocks.sum = n

tactic: rw [← this, c.blocks_partial_sum c.length_lt_card_boundaries, c.boundary_length]
state_before: n : ℕ
c : CompositionAsSet n
this : take c.length c.blocks = c.blocks
⊢ c.blocks.sum = n
state_after: n : ℕ
c : CompositionAsSet n
this : take c.length c.blocks = c.blocks
⊢ ↑(Fin.last n) = n

tactic: rfl
state_before: n : ℕ
c : CompositionAsSet n
this : take c.length c.blocks = c.blocks
⊢ ↑(Fin.last n) = n
state_after: no goals

tactic: simp [blocks]
state_before: n : ℕ
c : CompositionAsSet n
⊢ c.blocks.length ≤ c.length
state_after: no goals
Theorem: Polynomial.mem_nonZeroDivisors_iff
File: Mathlib/Algebra/Polynomial/RingDivision.lean

tactic: simpa [not_imp_not] using (nmem_nonZeroDivisors_iff (P := P)).not
state_before: R : Type u
S : Type v
T : Type w
a✝ b : R
n : ℕ
inst✝ : CommSemiring R
a p P : R[X]
⊢ P ∈ R[X]⁰ ↔ ∀ (a : R), a • P = 0 → a = 0
state_after: no goals