1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Matroid.Base.exchange_base_of_indep'
File: Mathlib/Data/Matroid/Basic.lean

tactic: have hfe : f ≠ e := by rintro rfl; exact hf he
state_before: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f B \ {e})
⊢ M.Base (insert f B \ {e})
state_after: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f B \ {e})
hfe : f ≠ e
⊢ M.Base (insert f B \ {e})

tactic: rw [← insert_diff_singleton_comm hfe] at *
state_before: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f B \ {e})
hfe : f ≠ e
⊢ M.Base (insert f B \ {e})
state_after: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f (B \ {e}))
hfe : f ≠ e
⊢ M.Base (insert f (B \ {e}))

tactic: exact hB.exchange_base_of_indep hf hI
state_before: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f (B \ {e}))
hfe : f ≠ e
⊢ M.Base (insert f (B \ {e}))
state_after: no goals

tactic: rintro rfl
state_before: α : Type u_1
M : Matroid α
B : Set α
e f : α
hB : M.Base B
he : e ∈ B
hf : f ∉ B
hI : M.Indep (insert f B \ {e})
⊢ f ≠ e
state_after: α : Type u_1
M : Matroid α
B : Set α
f : α
hB : M.Base B
hf : f ∉ B
he : f ∈ B
hI : M.Indep (insert f B \ {f})
⊢ False

tactic: exact hf he
state_before: α : Type u_1
M : Matroid α
B : Set α
f : α
hB : M.Base B
hf : f ∉ B
he : f ∈ B
hI : M.Indep (insert f B \ {f})
⊢ False
state_after: no goals
Theorem: PowerSeries.Unit_of_divided_by_X_pow_order_zero
File: Mathlib/RingTheory/PowerSeries/Inverse.lean

tactic: simp only [Unit_of_divided_by_X_pow_order, dif_pos]
state_before: R : Type u_1
k : Type u_2
inst✝ : Field k
⊢ Unit_of_divided_by_X_pow_order 0 = 1
state_after: no goals
Theorem: tendsto_inv_nhdsWithin_Iio_inv
File: Mathlib/Topology/Algebra/Group/Basic.lean

tactic: simpa only [inv_inv] using @tendsto_inv_nhdsWithin_Iio _ _ _ _ a⁻¹
state_before: G : Type w
H : Type x
α : Type u
β : Type v
inst✝⁶ : TopologicalSpace G
inst✝⁵ : Group G
inst✝⁴ : TopologicalGroup G
inst✝³ : TopologicalSpace α
f : α → G
s : Set α
x : α
inst✝² : TopologicalSpace H
inst✝¹ : OrderedCommGroup H
inst✝ : ContinuousInv H
a : H
⊢ Tendsto Inv.inv (𝓝[<] a⁻¹) (𝓝[>] a)
state_after: no goals
Theorem: padicValInt_mul_eq_succ
File: Mathlib/NumberTheory/Padics/PadicVal.lean

tactic: rw [padicValInt.mul ha (Int.natCast_ne_zero.mpr hp.out.ne_zero)]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
ha : a ≠ 0
⊢ padicValInt p (a * ↑p) = padicValInt p a + 1
state_after: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
ha : a ≠ 0
⊢ padicValInt p a + padicValInt p ↑p = padicValInt p a + 1

tactic: simp only [eq_self_iff_true, padicValInt.of_nat, padicValNat_self]
state_before: p : ℕ
hp : Fact (Nat.Prime p)
a : ℤ
ha : a ≠ 0
⊢ padicValInt p a + padicValInt p ↑p = padicValInt p a + 1
state_after: no goals
Theorem: LaurentPolynomial.invert_comp_C
File: Mathlib/Algebra/Polynomial/Laurent.lean

tactic: ext
state_before: R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
⊢ ⇑invert ∘ ⇑C = ⇑C
state_after: case h.h
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x✝ : R
a✝ : ℤ
⊢ ((⇑invert ∘ ⇑C) x✝) a✝ = (C x✝) a✝

tactic: simp
state_before: case h.h
R✝ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
x✝ : R
a✝ : ℤ
⊢ ((⇑invert ∘ ⇑C) x✝) a✝ = (C x✝) a✝
state_after: no goals
Theorem: MeasureTheory.Integrable.condexpKernel_ae
File: Mathlib/Probability/Kernel/Condexp.lean

tactic: rw [condexpKernel]
state_before: Ω : Type u_1
F : Type u_2
m mΩ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
μ : Measure Ω
inst✝¹ : IsFiniteMeasure μ
inst✝ : NormedAddCommGroup F
f : Ω → F
hf_int : Integrable f μ
⊢ ∀ᵐ (ω : Ω) ∂μ, Integrable f ((condexpKernel μ m) ω)
state_after: Ω : Type u_1
F : Type u_2
m mΩ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
μ : Measure Ω
inst✝¹ : IsFiniteMeasure μ
inst✝ : NormedAddCommGroup F
f : Ω → F
hf_int : Integrable f μ
⊢ ∀ᵐ (ω : Ω) ∂μ, Integrable f ((kernel.comap (condDistrib id id μ) id ⋯) ω)

tactic: convert Integrable.condDistrib_ae
  (aemeasurable_id'' μ (inf_le_right : m ⊓ mΩ ≤ mΩ)) aemeasurable_id
  (hf_int.comp_snd_map_prod_id (inf_le_right : m ⊓ mΩ ≤ mΩ)) using 1
state_before: Ω : Type u_1
F : Type u_2
m mΩ : MeasurableSpace Ω
inst✝³ : StandardBorelSpace Ω
inst✝² : Nonempty Ω
μ : Measure Ω
inst✝¹ : IsFiniteMeasure μ
inst✝ : NormedAddCommGroup F
f : Ω → F
hf_int : Integrable f μ
⊢ ∀ᵐ (ω : Ω) ∂μ, Integrable f ((kernel.comap (condDistrib id id μ) id ⋯) ω)
state_after: no goals
Theorem: continuous_le_rng
File: Mathlib/Topology/Order.lean

tactic: rw [continuous_iff_coinduced_le] at h₂ ⊢
state_before: α : Type u
β : Type v
γ : Type u_1
f : α → β
ι : Sort u_2
t₁ : TopologicalSpace α
t₂ t₃ : TopologicalSpace β
h₁ : t₂ ≤ t₃
h₂ : Continuous f
⊢ Continuous f
state_after: α : Type u
β : Type v
γ : Type u_1
f : α → β
ι : Sort u_2
t₁ : TopologicalSpace α
t₂ t₃ : TopologicalSpace β
h₁ : t₂ ≤ t₃
h₂ : coinduced f t₁ ≤ t₂
⊢ coinduced f t₁ ≤ t₃

tactic: exact le_trans h₂ h₁
state_before: α : Type u
β : Type v
γ : Type u_1
f : α → β
ι : Sort u_2
t₁ : TopologicalSpace α
t₂ t₃ : TopologicalSpace β
h₁ : t₂ ≤ t₃
h₂ : coinduced f t₁ ≤ t₂
⊢ coinduced f t₁ ≤ t₃
state_after: no goals
Theorem: div_left_injective
File: Mathlib/Algebra/Group/Basic.lean

tactic: simp only [div_eq_mul_inv]
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a b c d : G
n : ℤ
⊢ Injective fun a => a / b
state_after: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a b c d : G
n : ℤ
⊢ Injective fun a => a * b⁻¹

tactic: exact fun a a' h ↦ mul_left_injective b⁻¹ h
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : Group G
a b c d : G
n : ℤ
⊢ Injective fun a => a * b⁻¹
state_after: no goals
Theorem: MeasureTheory.pdf.eq_of_map_eq_withDensity
File: Mathlib/Probability/Density.lean

tactic: rw [map_eq_withDensity_pdf X ℙ μ]
state_before: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ map X ℙ = μ.withDensity f ↔ pdf X ℙ μ =ᶠ[ae μ] f
state_after: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ μ.withDensity (pdf X ℙ μ) = μ.withDensity f ↔ pdf X ℙ μ =ᶠ[ae μ] f

tactic: apply withDensity_eq_iff (measurable_pdf X ℙ μ).aemeasurable hmf
state_before: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ μ.withDensity (pdf X ℙ μ) = μ.withDensity f ↔ pdf X ℙ μ =ᶠ[ae μ] f
state_after: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ ∫⁻ (x : E), pdf X ℙ μ x ∂μ ≠ ⊤

tactic: rw [lintegral_eq_measure_univ]
state_before: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ ∫⁻ (x : E), pdf X ℙ μ x ∂μ ≠ ⊤
state_after: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ ℙ Set.univ ≠ ⊤

tactic: exact measure_ne_top _ _
state_before: Ω : Type u_1
E : Type u_2
inst✝² : MeasurableSpace E
m : MeasurableSpace Ω
ℙ : Measure Ω
μ : Measure E
inst✝¹ : IsFiniteMeasure ℙ
X : Ω → E
inst✝ : HasPDF X ℙ μ
f : E → ℝ≥0∞
hmf : AEMeasurable f μ
⊢ ℙ Set.univ ≠ ⊤
state_after: no goals
Theorem: Finite.of_injective
File: Mathlib/Data/Fintype/Card.lean

tactic: rcases Finite.exists_equiv_fin β with ⟨n, ⟨e⟩⟩
state_before: α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Sort u_4
β : Sort u_5
inst✝ : Finite β
f : α → β
H : Injective f
⊢ Finite α
state_after: case intro.intro
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Sort u_4
β : Sort u_5
inst✝ : Finite β
f : α → β
H : Injective f
n : ℕ
e : β ≃ Fin n
⊢ Finite α

tactic: classical exact .of_equiv (Set.range (e ∘ f)) (Equiv.ofInjective _ (e.injective.comp H)).symm
state_before: case intro.intro
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Sort u_4
β : Sort u_5
inst✝ : Finite β
f : α → β
H : Injective f
n : ℕ
e : β ≃ Fin n
⊢ Finite α
state_after: no goals

tactic: exact .of_equiv (Set.range (e ∘ f)) (Equiv.ofInjective _ (e.injective.comp H)).symm
state_before: case intro.intro
α✝ : Type u_1
β✝ : Type u_2
γ : Type u_3
α : Sort u_4
β : Sort u_5
inst✝ : Finite β
f : α → β
H : Injective f
n : ℕ
e : β ≃ Fin n
⊢ Finite α
state_after: no goals
Theorem: Finset.pimage_inter
File: Mathlib/Data/Finset/PImage.lean

tactic: simp only [← coe_subset, coe_pimage, coe_inter, PFun.image_inter]
state_before: α : Type u_1
β : Type u_2
inst✝³ : DecidableEq β
f g : α →. β
inst✝² : (x : α) → Decidable (f x).Dom
inst✝¹ : (x : α) → Decidable (g x).Dom
s t : Finset α
b : β
inst✝ : DecidableEq α
⊢ pimage f (s ∩ t) ⊆ pimage f s ∩ pimage f t
state_after: no goals
Theorem: Range.isSubfield
File: Mathlib/Deprecated/Subfield.lean

tactic: rw [← Set.image_univ]
state_before: F : Type u_1
inst✝¹ : Field F
S : Set F
K : Type u_2
inst✝ : Field K
f : F →+* K
⊢ IsSubfield (Set.range ⇑f)
state_after: F : Type u_1
inst✝¹ : Field F
S : Set F
K : Type u_2
inst✝ : Field K
f : F →+* K
⊢ IsSubfield (⇑f '' Set.univ)

tactic: apply Image.isSubfield _ Univ.isSubfield
state_before: F : Type u_1
inst✝¹ : Field F
S : Set F
K : Type u_2
inst✝ : Field K
f : F →+* K
⊢ IsSubfield (⇑f '' Set.univ)
state_after: no goals
Theorem: Ordinal.lsub_empty
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: rw [← Ordinal.le_zero, lsub_le_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u_4
h : IsEmpty ι
f : ι → Ordinal.{max u_5 u_4}
⊢ lsub f = 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u_4
h : IsEmpty ι
f : ι → Ordinal.{max u_5 u_4}
⊢ ∀ (i : ι), f i < 0

tactic: exact h.elim
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
ι : Type u_4
h : IsEmpty ι
f : ι → Ordinal.{max u_5 u_4}
⊢ ∀ (i : ι), f i < 0
state_after: no goals
Theorem: Set.intersecting_singleton
File: Mathlib/Combinatorics/SetFamily/Intersecting.lean

tactic: simp [Intersecting]
state_before: α : Type u_1
inst✝¹ : SemilatticeInf α
inst✝ : OrderBot α
s t : Set α
a b c : α
⊢ {a}.Intersecting ↔ a ≠ ⊥
state_after: no goals
Theorem: Matroid.setOf_basis_eq
File: Mathlib/Data/Matroid/Basic.lean

tactic: ext I
state_before: α : Type u_1
M✝ : Matroid α
X : Set α
M : Matroid α
hX : autoParam (X ⊆ M.E) _auto✝
⊢ {I | M.Basis I X} = maximals (fun x x_1 => x ⊆ x_1) ({I | M.Indep I} ∩ Iic X)
state_after: case h
α : Type u_1
M✝ : Matroid α
X : Set α
M : Matroid α
hX : autoParam (X ⊆ M.E) _auto✝
I : Set α
⊢ I ∈ {I | M.Basis I X} ↔ I ∈ maximals (fun x x_1 => x ⊆ x_1) ({I | M.Indep I} ∩ Iic X)

tactic: simp [Matroid.Basis, maximals, iff_true_intro hX]
state_before: case h
α : Type u_1
M✝ : Matroid α
X : Set α
M : Matroid α
hX : autoParam (X ⊆ M.E) _auto✝
I : Set α
⊢ I ∈ {I | M.Basis I X} ↔ I ∈ maximals (fun x x_1 => x ⊆ x_1) ({I | M.Indep I} ∩ Iic X)
state_after: no goals
Theorem: Algebra.isIntegral_sup
File: Mathlib/RingTheory/IntegralClosure.lean

tactic: simp only [← le_integralClosure_iff_isIntegral, sup_le_iff]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
S✝ : Type u_4
inst✝⁵ : CommRing R
inst✝⁴ : CommRing A
inst✝³ : Ring B
inst✝² : CommRing S✝
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f✝¹ : R →+* S✝
f✝ : R →+* B
f : R →+* S✝
S T : Subalgebra R A
⊢ Algebra.IsIntegral R ↥(S ⊔ T) ↔ Algebra.IsIntegral R ↥S ∧ Algebra.IsIntegral R ↥T
state_after: no goals
Theorem: CategoryTheory.ShortComplex.liftCycles_leftHomologyπ_eq_zero_of_boundary
File: Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean

tactic: rw [hx, assoc, S.zero, comp_zero]
state_before: C : Type u_1
inst✝² : Category.{?u.207025, u_1} C
inst✝¹ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.LeftHomologyData
A : C
k : A ⟶ S.X₂
hk : k ≫ S.g = 0
inst✝ : S.HasLeftHomology
x : A ⟶ S.X₁
hx : k = x ≫ S.f
⊢ k ≫ S.g = 0
state_after: no goals
Theorem: HurwitzZeta.hurwitzZetaEven_def_of_ne_or_ne
File: Mathlib/NumberTheory/LSeries/HurwitzZetaEven.lean

tactic: rw [hurwitzZetaEven]
state_before: a : UnitAddCircle
s : ℂ
h : a ≠ 0 ∨ s ≠ 0
⊢ hurwitzZetaEven a s = completedHurwitzZetaEven a s / s.Gammaℝ
state_after: a : UnitAddCircle
s : ℂ
h : a ≠ 0 ∨ s ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) s =
    completedHurwitzZetaEven a s / s.Gammaℝ

tactic: rcases ne_or_eq s 0 with h | rfl
state_before: a : UnitAddCircle
s : ℂ
h : a ≠ 0 ∨ s ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) s =
    completedHurwitzZetaEven a s / s.Gammaℝ
state_after: case inl
a : UnitAddCircle
s : ℂ
h✝ : a ≠ 0 ∨ s ≠ 0
h : s ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) s =
    completedHurwitzZetaEven a s / s.Gammaℝ

case inr
a : UnitAddCircle
h : a ≠ 0 ∨ 0 ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) 0 =
    completedHurwitzZetaEven a 0 / Gammaℝ 0

tactic: rw [Function.update_noteq h]
state_before: case inl
a : UnitAddCircle
s : ℂ
h✝ : a ≠ 0 ∨ s ≠ 0
h : s ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) s =
    completedHurwitzZetaEven a s / s.Gammaℝ
state_after: no goals

tactic: simpa only [Gammaℝ, Function.update_same, neg_zero, zero_div, cpow_zero, Complex.Gamma_zero,
mul_zero, div_zero, ite_eq_right_iff, div_eq_zero_iff, neg_eq_zero, one_ne_zero,
OfNat.ofNat_ne_zero, or_self, imp_false, ne_eq, not_true_eq_false, or_false] using h
state_before: case inr
a : UnitAddCircle
h : a ≠ 0 ∨ 0 ≠ 0
⊢ Function.update (fun s => completedHurwitzZetaEven a s / s.Gammaℝ) 0 (if a = 0 then -1 / 2 else 0) 0 =
    completedHurwitzZetaEven a 0 / Gammaℝ 0
state_after: no goals
Theorem: Cardinal.le_powerlt
File: Mathlib/SetTheory/Cardinal/Basic.lean

tactic: refine le_ciSup (f := fun y : Iio b => a ^ (y : Cardinal)) ?_ ⟨c, h⟩
state_before: α β : Type u
c✝ : Cardinal.{?u.247641}
b c a : Cardinal.{u}
h : c < b
⊢ a ^ c ≤ a ^< b
state_after: α β : Type u
c✝ : Cardinal.{?u.247641}
b c a : Cardinal.{u}
h : c < b
⊢ BddAbove (range fun y => a ^ ↑y)

tactic: rw [← image_eq_range]
state_before: α β : Type u
c✝ : Cardinal.{?u.247641}
b c a : Cardinal.{u}
h : c < b
⊢ BddAbove (range fun y => a ^ ↑y)
state_after: α β : Type u
c✝ : Cardinal.{?u.247641}
b c a : Cardinal.{u}
h : c < b
⊢ BddAbove (HPow.hPow a '' Iio b)

tactic: exact bddAbove_image.{u, u} _ bddAbove_Iio
state_before: α β : Type u
c✝ : Cardinal.{?u.247641}
b c a : Cardinal.{u}
h : c < b
⊢ BddAbove (HPow.hPow a '' Iio b)
state_after: no goals
Theorem: CommMonoid.toMonoid_injective
File: Mathlib/Algebra/Group/Ext.lean

tactic: rintro ⟨⟩ ⟨⟩ h
state_before: M : Type u
⊢ Injective (@toMonoid M)
state_after: case mk.mk
M : Type u
toMonoid✝¹ : Monoid M
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toMonoid✝ : Monoid M
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toMonoid = toMonoid
⊢ mk mul_comm✝¹ = mk mul_comm✝

tactic: congr
state_before: case mk.mk
M : Type u
toMonoid✝¹ : Monoid M
mul_comm✝¹ : ∀ (a b : M), a * b = b * a
toMonoid✝ : Monoid M
mul_comm✝ : ∀ (a b : M), a * b = b * a
h : toMonoid = toMonoid
⊢ mk mul_comm✝¹ = mk mul_comm✝
state_after: no goals
Theorem: Quaternion.normSq_intCast
File: Mathlib/Algebra/Quaternion.lean

tactic: rw [← coe_intCast, normSq_coe]
state_before: S : Type u_1
T : Type u_2
R : Type u_3
inst✝ : CommRing R
r x y z✝ : R
a b c : ℍ[R]
z : ℤ
⊢ normSq ↑z = ↑z ^ 2
state_after: no goals
Theorem: Polynomial.eq_of_degrees_lt_of_eval_finset_eq
File: Mathlib/LinearAlgebra/Lagrange.lean

tactic: rw [← mem_degreeLT] at degree_f_lt degree_g_lt
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f.degree < ↑s.card
degree_g_lt : g.degree < ↑s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ f = g
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ f = g

tactic: refine eq_of_degree_sub_lt_of_eval_finset_eq _ ?_ eval_fg
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ f = g
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ (f - g).degree < ↑s.card

tactic: rw [← mem_degreeLT]
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ (f - g).degree < ↑s.card
state_after: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ f - g ∈ degreeLT R s.card

tactic: exact Submodule.sub_mem _ degree_f_lt degree_g_lt
state_before: R : Type u_1
inst✝¹ : CommRing R
inst✝ : IsDomain R
f g : R[X]
s : Finset R
degree_f_lt : f ∈ degreeLT R s.card
degree_g_lt : g ∈ degreeLT R s.card
eval_fg : ∀ x ∈ s, eval x f = eval x g
⊢ f - g ∈ degreeLT R s.card
state_after: no goals
Theorem: CategoryTheory.MonoidalCategory.inv_hom_whiskerRight
File: Mathlib/CategoryTheory/Monoidal/Category.lean

tactic: rw [← comp_whiskerRight, inv_hom_id, id_whiskerRight]
state_before: C : Type u
𝒞 : Category.{v, u} C
inst✝ : MonoidalCategory C
X Y : C
f : X ≅ Y
Z : C
⊢ f.inv ▷ Z ≫ f.hom ▷ Z = 𝟙 (Y ⊗ Z)
state_after: no goals
Theorem: div_mul_div_cancel
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rw [← mul_div_assoc, div_mul_cancel₀ _ hc]
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a✝ b c d : G₀
m n : ℕ
a : G₀
hc : c ≠ 0
⊢ a / c * (c / b) = a / b
state_after: no goals
Theorem: MvPolynomial.ker_evalₗ
File: Mathlib/FieldTheory/Finite/Polynomial.lean

tactic: cases nonempty_fintype σ
state_before: σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
⊢ ker (evalᵢ σ K) = ⊥
state_after: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ ker (evalᵢ σ K) = ⊥

tactic: refine (ker_eq_bot_iff_range_eq_top_of_finrank_eq_finrank ?_).mpr (range_evalᵢ σ K)
state_before: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ ker (evalᵢ σ K) = ⊥
state_after: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ FiniteDimensional.finrank K (R σ K) = FiniteDimensional.finrank K ((σ → K) → K)

tactic: rw [FiniteDimensional.finrank_fintype_fun_eq_card, finrank_R]
state_before: case intro
σ K : Type u
inst✝² : Fintype K
inst✝¹ : Field K
inst✝ : Finite σ
val✝ : Fintype σ
⊢ FiniteDimensional.finrank K (R σ K) = FiniteDimensional.finrank K ((σ → K) → K)
state_after: no goals
Theorem: Finset.union_empty
File: Mathlib/Data/Finset/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ s₁ s₂ t t₁ t₂ u v : Finset α
a b : α
s : Finset α
x : α
⊢ x ∈ s ∨ x ∈ ∅ ↔ x ∈ s
state_after: no goals
Theorem: MeasureTheory.JordanDecomposition.real_smul_negPart_neg
File: Mathlib/MeasureTheory/Decomposition/Jordan.lean

tactic: rw [real_smul_def, ← smul_posPart, if_neg (not_le.2 hr), neg_negPart]
state_before: α : Type u_1
β : Type u_2
inst✝ : MeasurableSpace α
j : JordanDecomposition α
r : ℝ
hr : r < 0
⊢ (r • j).negPart = (-r).toNNReal • j.posPart
state_after: no goals
Theorem: pow_succ'
File: Mathlib/Algebra/Group/Defs.lean

tactic: simp
state_before: G : Type u_1
M : Type u_2
inst✝ : Monoid M
a✝ b c : M
m n : ℕ
a : M
⊢ a ^ (0 + 1) = a * a ^ 0
state_after: no goals

tactic: rw [pow_succ _ n, pow_succ, pow_succ', mul_assoc]
state_before: G : Type u_1
M : Type u_2
inst✝ : Monoid M
a✝ b c : M
m n✝ : ℕ
a : M
n : ℕ
⊢ a ^ (n + 1 + 1) = a * a ^ (n + 1)
state_after: no goals
Theorem: Set.Finite.absorbs_biUnion
File: Mathlib/Topology/Bornology/Absorbs.lean

tactic: simp [Absorbs, hI]
state_before: M : Type u_1
α : Type u_2
inst✝¹ : Bornology M
inst✝ : SMul M α
s s₁ s₂ t✝ t₁ t₂ : Set α
S T : Set (Set α)
ι : Type u_3
t : ι → Set α
I : Set ι
hI : I.Finite
⊢ Absorbs M s (⋃ i ∈ I, t i) ↔ ∀ i ∈ I, Absorbs M s (t i)
state_after: no goals
Theorem: NNRat.cast_lt_zero
File: Mathlib/Data/Rat/Cast/Order.lean

tactic: norm_cast
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
K : Type u_5
inst✝ : LinearOrderedSemifield K
p q : ℚ≥0
⊢ ↑q < 0 ↔ q < 0
state_after: no goals
Theorem: ENNReal.ofReal_prod_of_nonneg
File: Mathlib/Data/ENNReal/Real.lean

tactic: simp_rw [ENNReal.ofReal, ← coe_finset_prod, coe_inj]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ i ∈ s, 0 ≤ f i
⊢ ENNReal.ofReal (∏ i ∈ s, f i) = ∏ i ∈ s, ENNReal.ofReal (f i)
state_after: a b c d : ℝ≥0∞
r p q : ℝ≥0
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ i ∈ s, 0 ≤ f i
⊢ (∏ i ∈ s, f i).toNNReal = ∏ a ∈ s, (f a).toNNReal

tactic: exact Real.toNNReal_prod_of_nonneg hf
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
α : Type u_1
s : Finset α
f : α → ℝ
hf : ∀ i ∈ s, 0 ≤ f i
⊢ (∏ i ∈ s, f i).toNNReal = ∏ a ∈ s, (f a).toNNReal
state_after: no goals
Theorem: Filter.tendsto_mul_const_atTop_iff_pos
File: Mathlib/Order/Filter/AtTopBot.lean

tactic: simp only [mul_comm _ r, tendsto_const_mul_atTop_iff_pos h]
state_before: ι : Type u_1
ι' : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝¹ : LinearOrderedSemifield α
l : Filter β
f : β → α
r c : α
n : ℕ
inst✝ : l.NeBot
h : Tendsto f l atTop
⊢ Tendsto (fun x => f x * r) l atTop ↔ 0 < r
state_after: no goals
Theorem: Zsqrtd.divides_sq_eq_zero_z
File: Mathlib/NumberTheory/Zsqrtd/Basic.lean

tactic: rw [mul_assoc, ← Int.natAbs_mul_self, ← Int.natAbs_mul_self, ← Int.ofNat_mul, ← mul_assoc] at h
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℤ
h : x * x = ↑d * y * y
⊢ x = 0 ∧ y = 0
state_after: d : ℕ
dnsq : Nonsquare d
x y : ℤ
h : ↑(x.natAbs * x.natAbs) = ↑(d * y.natAbs * y.natAbs)
⊢ x = 0 ∧ y = 0

tactic: exact
  let ⟨h1, h2⟩ := divides_sq_eq_zero (Int.ofNat.inj h)
  ⟨Int.natAbs_eq_zero.mp h1, Int.natAbs_eq_zero.mp h2⟩
state_before: d : ℕ
dnsq : Nonsquare d
x y : ℤ
h : ↑(x.natAbs * x.natAbs) = ↑(d * y.natAbs * y.natAbs)
⊢ x = 0 ∧ y = 0
state_after: no goals
Theorem: Function.Injective.beq_eq
File: Mathlib/Logic/Function/Basic.lean

tactic: by_cases h : a == b <;> simp [h] <;> simpa [I.eq_iff] using h
state_before: α✝ : Sort u_1
β✝ : Sort u_2
γ : Sort u_3
f✝ : α✝ → β✝
α : Type u_4
β : Type u_5
inst✝³ : BEq α
inst✝² : LawfulBEq α
inst✝¹ : BEq β
inst✝ : LawfulBEq β
f : α → β
I : Injective f
a b : α
⊢ (f a == f b) = (a == b)
state_after: no goals