1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: skewAdjoint.smul_mem
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: rw [mem_iff, star_smul, star_trivial, mem_iff.mp h, smul_neg r]
state_before: R : Type u_1
A : Type u_2
inst✝⁶ : Star R
inst✝⁵ : TrivialStar R
inst✝⁴ : AddCommGroup A
inst✝³ : StarAddMonoid A
inst✝² : Monoid R
inst✝¹ : DistribMulAction R A
inst✝ : StarModule R A
r : R
x : A
h : x ∈ skewAdjoint A
⊢ r • x ∈ skewAdjoint A
state_after: no goals
Theorem: CochainComplex.mk_d_1_0
File: Mathlib/Algebra/Homology/HomologicalComplex.lean

tactic: change ite (1 = 0 + 1) (d₀ ≫ 𝟙 X₁) 0 = d₀
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (mk X₀ X₁ X₂ d₀ d₁ s succ).d 0 1 = d₀
state_after: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (if 1 = 0 + 1 then d₀ ≫ 𝟙 X₁ else 0) = d₀

tactic: rw [if_pos rfl, Category.comp_id]
state_before: ι : Type u_1
V : Type u
inst✝¹ : Category.{v, u} V
inst✝ : HasZeroMorphisms V
X₀ X₁ X₂ : V
d₀ : X₀ ⟶ X₁
d₁ : X₁ ⟶ X₂
s : d₀ ≫ d₁ = 0
succ : (S : ShortComplex V) → (X₄ : V) ×' (d₂ : S.X₃ ⟶ X₄) ×' S.g ≫ d₂ = 0
⊢ (if 1 = 0 + 1 then d₀ ≫ 𝟙 X₁ else 0) = d₀
state_after: no goals
Theorem: Matroid.Restriction.eq_restrict
File: Mathlib/Data/Matroid/Restrict.lean

tactic: obtain ⟨R, -, rfl⟩ := h
state_before: α : Type u_1
M : Matroid α
R I J X Y : Set α
N : Matroid α
h : N ≤r M
⊢ M ↾ N.E = N
state_after: case intro.intro
α : Type u_1
M : Matroid α
R✝ I J X Y R : Set α
⊢ M ↾ (M ↾ R).E = M ↾ R

tactic: rw [restrict_ground_eq]
state_before: case intro.intro
α : Type u_1
M : Matroid α
R✝ I J X Y R : Set α
⊢ M ↾ (M ↾ R).E = M ↾ R
state_after: no goals
Theorem: String.utf8Len_append
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

tactic: induction cs₁ <;> simp [*, Nat.add_right_comm]
state_before: cs₁ cs₂ : List Char
⊢ utf8Len (cs₁ ++ cs₂) = utf8Len cs₁ + utf8Len cs₂
state_after: no goals
Theorem: UniformSpace.ball_mem_nhdsWithin
File: Mathlib/Topology/UniformSpace/Basic.lean

tactic: rw [nhdsWithin_eq_comap_uniformity_of_mem x_in, mem_comap]
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
S : Set α
V : Set (α × α)
x_in : x ∈ S
V_in : V ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S)
⊢ ball x V ∈ 𝓝[S] x
state_after: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
S : Set α
V : Set (α × α)
x_in : x ∈ S
V_in : V ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S)
⊢ ∃ t ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S), Prod.mk x ⁻¹' t ⊆ ball x V

tactic: exact ⟨V, V_in, Subset.rfl⟩
state_before: α : Type ua
β : Type ub
γ : Type uc
δ : Type ud
ι : Sort u_1
inst✝ : UniformSpace α
x : α
S : Set α
V : Set (α × α)
x_in : x ∈ S
V_in : V ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S)
⊢ ∃ t ∈ 𝓤 α ⊓ 𝓟 (S ×ˢ S), Prod.mk x ⁻¹' t ⊆ ball x V
state_after: no goals
Theorem: AddMonoid.isTorsion_iff_isTorsion_nat
File: Mathlib/Algebra/Module/Torsion.lean

tactic: refine ⟨fun h x => ?_, fun h x => ?_⟩
state_before: R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
⊢ IsTorsion M ↔ Module.IsTorsion ℕ M
state_after: case refine_1
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : IsTorsion M
x : M
⊢ ∃ a, a • x = 0

case refine_2
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
⊢ IsOfFinAddOrder x

tactic: obtain ⟨n, h0, hn⟩ := (h x).exists_nsmul_eq_zero
state_before: case refine_1
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : IsTorsion M
x : M
⊢ ∃ a, a • x = 0
state_after: case refine_1.intro.intro
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : IsTorsion M
x : M
n : ℕ
h0 : 0 < n
hn : n • x = 0
⊢ ∃ a, a • x = 0

tactic: exact ⟨⟨n, mem_nonZeroDivisors_of_ne_zero <| ne_of_gt h0⟩, hn⟩
state_before: case refine_1.intro.intro
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : IsTorsion M
x : M
n : ℕ
h0 : 0 < n
hn : n • x = 0
⊢ ∃ a, a • x = 0
state_after: no goals

tactic: rw [isOfFinAddOrder_iff_nsmul_eq_zero]
state_before: case refine_2
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
⊢ IsOfFinAddOrder x
state_after: case refine_2
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
⊢ ∃ n, 0 < n ∧ n • x = 0

tactic: obtain ⟨n, hn⟩ := @h x
state_before: case refine_2
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
⊢ ∃ n, 0 < n ∧ n • x = 0
state_after: case refine_2.intro
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
n : ↥ℕ⁰
hn : n • x = 0
⊢ ∃ n, 0 < n ∧ n • x = 0

tactic: exact ⟨n, Nat.pos_of_ne_zero (nonZeroDivisors.coe_ne_zero _), hn⟩
state_before: case refine_2.intro
R : Type u_1
M : Type u_2
inst✝ : AddCommMonoid M
h : Module.IsTorsion ℕ M
x : M
n : ↥ℕ⁰
hn : n • x = 0
⊢ ∃ n, 0 < n ∧ n • x = 0
state_after: no goals
Theorem: dist_smul_add_one_sub_smul_le
File: Mathlib/Analysis/NormedSpace/Real.lean

tactic: simp_rw [dist_eq_norm', ← norm_smul, sub_smul, one_smul, smul_sub, ← sub_sub, ← sub_add,
  sub_right_comm]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ dist (r • x + (1 - r) • y) x = ‖1 - r‖ * ‖x - y‖
state_after: no goals

tactic: rw [Real.norm_eq_abs, abs_eq_self.mpr (sub_nonneg.mpr h.2), dist_eq_norm']
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ ‖1 - r‖ * ‖x - y‖ = (1 - r) * dist y x
state_after: no goals

tactic: gcongr
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ (1 - r) * dist y x ≤ (1 - 0) * dist y x
state_after: case h.h
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ 0 ≤ r

tactic: exact h.1
state_before: case h.h
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ 0 ≤ r
state_after: no goals

tactic: rw [sub_zero, one_mul]
state_before: E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℝ E
r : ℝ
x y : E
h : r ∈ Icc 0 1
⊢ (1 - 0) * dist y x = dist y x
state_after: no goals
Theorem: Composition.sizeUpTo_zero
File: Mathlib/Combinatorics/Enumerative/Composition.lean

tactic: simp [sizeUpTo]
state_before: n : ℕ
c : Composition n
⊢ c.sizeUpTo 0 = 0
state_after: no goals
Theorem: HasFPowerSeriesOnBall.eventually_hasSum
File: Mathlib/Analysis/Analytic/Basic.lean

tactic: filter_upwards [EMetric.ball_mem_nhds (0 : E) hf.r_pos] using fun _ => hf.hasSum
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
inst✝⁶ : NontriviallyNormedField 𝕜
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace 𝕜 E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace 𝕜 F
inst✝¹ : NormedAddCommGroup G
inst✝ : NormedSpace 𝕜 G
f g : E → F
p pf pg : FormalMultilinearSeries 𝕜 E F
x : E
r r' : ℝ≥0∞
hf : HasFPowerSeriesOnBall f p x r
⊢ ∀ᶠ (y : E) in 𝓝 0, HasSum (fun n => (p n) fun x => y) (f (x + y))
state_after: no goals
Theorem: Set.inv_eq_empty
File: Mathlib/Data/Set/Pointwise/Basic.lean

tactic: rw [← image_inv, image_eq_empty]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝ : InvolutiveInv α
s t : Set α
a : α
⊢ s⁻¹ = ∅ ↔ s = ∅
state_after: no goals
Theorem: SetTheory.PGame.moveLeft_neg_symm'
File: Mathlib/SetTheory/Game/PGame.lean

tactic: simp
state_before: xl xr : Type u
x : PGame
i : x.LeftMoves
⊢ x.moveLeft i = -(-x).moveRight (toRightMovesNeg i)
state_after: no goals
Theorem: IsUnit.mul_liftRight_inv
File: Mathlib/Algebra/Group/Units/Hom.lean

tactic: intro
state_before: F : Type u_1
G : Type u_2
α : Type u_3
M : Type u_4
N : Type u_5
inst✝³ : FunLike F M N
inst✝² : FunLike G N M
inst✝¹ : Monoid M
inst✝ : Monoid N
f : M →* N
h : ∀ (x : M), IsUnit (f x)
x : M
⊢ ∀ (x : M), ↑⋯.unit = f x
state_after: F : Type u_1
G : Type u_2
α : Type u_3
M : Type u_4
N : Type u_5
inst✝³ : FunLike F M N
inst✝² : FunLike G N M
inst✝¹ : Monoid M
inst✝ : Monoid N
f : M →* N
h : ∀ (x : M), IsUnit (f x)
x x✝ : M
⊢ ↑⋯.unit = f x✝

tactic: rfl
state_before: F : Type u_1
G : Type u_2
α : Type u_3
M : Type u_4
N : Type u_5
inst✝³ : FunLike F M N
inst✝² : FunLike G N M
inst✝¹ : Monoid M
inst✝ : Monoid N
f : M →* N
h : ∀ (x : M), IsUnit (f x)
x x✝ : M
⊢ ↑⋯.unit = f x✝
state_after: no goals
Theorem: PFunctor.M.dest_corec
File: Mathlib/Data/PFunctor/Univariate/M.lean

tactic: rw [corec_def, dest_mk]
state_before: F : PFunctor.{u}
X : Type u_1
f : X → ↑F X
P : PFunctor.{u}
α : Type u_2
g : α → ↑P α
x : α
⊢ (M.corec g x).dest = P.map (M.corec g) (g x)
state_after: no goals
Theorem: MeasureTheory.snorm'_add_le
File: Mathlib/MeasureTheory/Function/LpSeminorm/TriangleInequality.lean

tactic: gcongr with a
state_before: α : Type u_1
E : Type u_2
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
q : ℝ
μ : Measure α
f✝ g✝ f g : α → E
hf : AEStronglyMeasurable f μ
hg : AEStronglyMeasurable g μ
hq1 : 1 ≤ q
⊢ (∫⁻ (a : α), ↑‖(f + g) a‖₊ ^ q ∂μ) ^ (1 / q) ≤
    (∫⁻ (a : α), ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a ^ q ∂μ) ^ (1 / q)
state_after: case h₁.hfg.h₁
α : Type u_1
E : Type u_2
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
q : ℝ
μ : Measure α
f✝ g✝ f g : α → E
hf : AEStronglyMeasurable f μ
hg : AEStronglyMeasurable g μ
hq1 : 1 ≤ q
a : α
⊢ ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a

tactic: simp only [Pi.add_apply, ← ENNReal.coe_add, ENNReal.coe_le_coe, nnnorm_add_le]
state_before: case h₁.hfg.h₁
α : Type u_1
E : Type u_2
m : MeasurableSpace α
inst✝ : NormedAddCommGroup E
p : ℝ≥0∞
q : ℝ
μ : Measure α
f✝ g✝ f g : α → E
hf : AEStronglyMeasurable f μ
hg : AEStronglyMeasurable g μ
hq1 : 1 ≤ q
a : α
⊢ ↑‖(f + g) a‖₊ ≤ ((fun a => ↑‖f a‖₊) + fun a => ↑‖g a‖₊) a
state_after: no goals
Theorem: Preperfect.perfect_closure
File: Mathlib/Topology/Perfect.lean

tactic: constructor
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ Perfect (closure C)
state_after: case closed
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ IsClosed (closure C)

case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ Preperfect (closure C)

tactic: intro x hx
state_before: case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ Preperfect (closure C)
state_after: case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
⊢ AccPt x (𝓟 (closure C))

tactic: by_cases h : x ∈ C <;> apply AccPt.mono _ (principal_mono.mpr subset_closure)
state_before: case acc
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
⊢ AccPt x (𝓟 (closure C))
state_after: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∈ C
⊢ AccPt x (𝓟 C)

α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
⊢ AccPt x (𝓟 C)

tactic: have : {x}ᶜ ∩ C = C := by simp [h]
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
⊢ AccPt x (𝓟 C)
state_after: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ AccPt x (𝓟 C)

tactic: rw [AccPt, nhdsWithin, inf_assoc, inf_principal, this]
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ AccPt x (𝓟 C)
state_after: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ (𝓝 x ⊓ 𝓟 C).NeBot

tactic: rw [closure_eq_cluster_pts] at hx
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ (𝓝 x ⊓ 𝓟 C).NeBot
state_after: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ {a | ClusterPt a (𝓟 C)}
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ (𝓝 x ⊓ 𝓟 C).NeBot

tactic: exact hx
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ {a | ClusterPt a (𝓟 C)}
h : x ∉ C
this : {x}ᶜ ∩ C = C
⊢ (𝓝 x ⊓ 𝓟 C).NeBot
state_after: no goals

tactic: exact isClosed_closure
state_before: case closed
α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
⊢ IsClosed (closure C)
state_after: no goals

tactic: exact hC _ h
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∈ C
⊢ AccPt x (𝓟 C)
state_after: no goals

tactic: simp [h]
state_before: α : Type u_1
inst✝ : TopologicalSpace α
C : Set α
hC : Preperfect C
x : α
hx : x ∈ closure C
h : x ∉ C
⊢ {x}ᶜ ∩ C = C
state_after: no goals
Theorem: PartENat.get_natCast'
File: Mathlib/Data/Nat/PartENat.lean

tactic: rw [← natCast_inj, natCast_get]
state_before: x : ℕ
h : (↑x).Dom
⊢ (↑x).get h = x
state_after: no goals
Theorem: Complex.tendsto_normSq_cocompact_atTop
File: Mathlib/Analysis/Complex/Basic.lean

tactic: simpa [mul_self_abs]
  using tendsto_abs_cocompact_atTop.atTop_mul_atTop tendsto_abs_cocompact_atTop
state_before: z : ℂ
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℂ E
⊢ Tendsto (⇑normSq) (cocompact ℂ) atTop
state_after: no goals
Theorem: LieSubmodule.baseChange_bot
File: Mathlib/Algebra/Lie/BaseChange.lean

tactic: simp only [baseChange, bot_coeSubmodule, Submodule.baseChange_bot,
  Submodule.bot_toAddSubmonoid]
state_before: R : Type u_1
A : 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✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
⊢ baseChange A ⊥ = ⊥
state_after: R : Type u_1
A : 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✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
⊢ { toSubmodule := ⊥, lie_mem := ⋯ } = ⊥

tactic: rfl
state_before: R : Type u_1
A : 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✝¹ : CommRing A
inst✝ : Algebra R A
N : LieSubmodule R L M
⊢ { toSubmodule := ⊥, lie_mem := ⋯ } = ⊥
state_after: no goals
Theorem: Multiset.prod_X_sub_C_coeff
File: Mathlib/RingTheory/Polynomial/Vieta.lean

tactic: conv_lhs =>
  congr
  congr
  congr
  ext x
  rw [sub_eq_add_neg]
  rw [← map_neg C x]
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun t => X - C t) s).prod.coeff k = (-1) ^ (card s - k) * s.esymm (card s - k)
state_after: R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (-1) ^ (card s - k) * s.esymm (card s - k)

tactic: convert prod_X_add_C_coeff (map (fun t => -t) s) _ using 1
state_before: R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (-1) ^ (card s - k) * s.esymm (card s - k)
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (map (fun r => X + C r) (map (fun t => -t) s)).prod.coeff ?convert_1

case h.e'_3
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (-1) ^ (card s - k) * s.esymm (card s - k) = (map (fun t => -t) s).esymm (card (map (fun t => -t) s) - ?convert_1)

case convert_1
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ ℕ

case convert_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ ?convert_1 ≤ card (map (fun t => -t) s)

tactic: rw [map_map]
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (map (fun r => X + C r) (map (fun t => -t) s)).prod.coeff ?convert_1
state_after: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (map ((fun r => X + C r) ∘ fun t => -t) s).prod.coeff ?convert_1

tactic: rfl
state_before: case h.e'_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (map (fun x => X + C (-x)) s).prod.coeff k = (map ((fun r => X + C r) ∘ fun t => -t) s).prod.coeff ?convert_1
state_after: no goals

tactic: rw [esymm_neg, card_map]
state_before: case h.e'_3
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ (-1) ^ (card s - k) * s.esymm (card s - k) = (map (fun t => -t) s).esymm (card (map (fun t => -t) s) - k)
state_after: no goals

tactic: rwa [card_map]
state_before: case convert_2
R : Type u_1
inst✝ : CommRing R
s : Multiset R
k : ℕ
h : k ≤ card s
⊢ k ≤ card (map (fun t => -t) s)
state_after: no goals
Theorem: Wbtw.left_ne_right_of_ne_left
File: Mathlib/Analysis/Convex/Between.lean

tactic: rintro rfl
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y z : P
h : Wbtw R x y z
hne : y ≠ x
⊢ x ≠ z
state_after: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y : P
hne : y ≠ x
h : Wbtw R x y x
⊢ False

tactic: rw [wbtw_self_iff] at h
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y : P
hne : y ≠ x
h : Wbtw R x y x
⊢ False
state_after: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y : P
hne : y ≠ x
h : y = x
⊢ False

tactic: exact hne h
state_before: R : Type u_1
V : Type u_2
V' : Type u_3
P : Type u_4
P' : Type u_5
inst✝⁶ : OrderedRing R
inst✝⁵ : AddCommGroup V
inst✝⁴ : Module R V
inst✝³ : AddTorsor V P
inst✝² : AddCommGroup V'
inst✝¹ : Module R V'
inst✝ : AddTorsor V' P'
x y : P
hne : y ≠ x
h : y = x
⊢ False
state_after: no goals
Theorem: PNat.XgcdType.finish_isSpecial
File: Mathlib/Data/PNat/Xgcd.lean

tactic: dsimp [IsSpecial, finish] at hs ⊢
state_before: u : XgcdType
hs : u.IsSpecial
⊢ u.finish.IsSpecial
state_after: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * u.qp + u.zp) + u.wp * (u.y * u.qp + u.zp) = ((u.wp + 1) * u.qp + u.x) * u.y

tactic: rw [add_mul _ _ u.y, add_comm _ (u.x * u.y), ← hs]
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * u.qp + u.zp) + u.wp * (u.y * u.qp + u.zp) = ((u.wp + 1) * u.qp + u.x) * u.y
state_after: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * u.qp + u.zp) + u.wp * (u.y * u.qp + u.zp) = u.wp + u.zp + u.wp * u.zp + (u.wp + 1) * u.qp * u.y

tactic: ring
state_before: u : XgcdType
hs : u.wp + u.zp + u.wp * u.zp = u.x * u.y
⊢ u.wp + (u.y * u.qp + u.zp) + u.wp * (u.y * u.qp + u.zp) = u.wp + u.zp + u.wp * u.zp + (u.wp + 1) * u.qp * u.y
state_after: no goals
Theorem: FirstOrder.Language.Structure.CG.range
File: Mathlib/ModelTheory/FinitelyGenerated.lean

tactic: rw [Hom.range_eq_map]
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ f.range.CG
state_after: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ (map f ⊤).CG

tactic: exact (cg_def.1 h).map f
state_before: L : Language
M : Type u_1
inst✝¹ : L.Structure M
N : Type u_2
inst✝ : L.Structure N
h : CG L M
f : M →[L] N
⊢ (map f ⊤).CG
state_after: no goals
Theorem: SimpleGraph.Walk.support_append
File: Mathlib/Combinatorics/SimpleGraph/Connectivity.lean

tactic: induction p <;> cases p' <;> simp [*]
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v w : V
p : G.Walk u v
p' : G.Walk v w
⊢ (p.append p').support = p.support ++ p'.support.tail
state_after: no goals
Theorem: WithTop.sInf_eq
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

tactic: simp [hs, h's]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝¹ : Preorder α
inst✝ : InfSet α
s : Set (WithTop α)
hs : ¬s ⊆ {⊤}
h's : BddBelow s
⊢ ¬(s ⊆ {⊤} ∨ ¬BddBelow s)
state_after: no goals
Theorem: AlgebraicTopology.DoldKan.N₁Γ₀_app
File: Mathlib/AlgebraicTopology/DoldKan/GammaCompN.lean

tactic: ext1
state_before: C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ N₁Γ₀.app K =
    (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫ (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)
state_after: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ (N₁Γ₀.app K).hom =
    ((Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫
        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).hom

tactic: dsimp [N₁Γ₀]
state_before: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ (N₁Γ₀.app K).hom =
    ((Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.symm ≪≫
        (toKaroubi (ChainComplex C ℕ)).mapIso (Γ₀NondegComplexIso K)).hom
state_after: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ ((({ f := PInfty, comm := ⋯ } ≫ Split.toKaroubiNondegComplexFunctorIsoN₁.inv.app (Split.mk' (Γ₀.splitting K))) ≫
          { f := 𝟙 (Γ₀.splitting K).nondegComplex, comm := ⋯ }) ≫
        (toKaroubi (ChainComplex C ℕ)).map (Γ₀'CompNondegComplexFunctor.hom.app K)) ≫
      { f := 𝟙 K, comm := ⋯ } =
    (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫ (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom

tactic: erw [id_comp, comp_id, comp_id]
state_before: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ ((({ f := PInfty, comm := ⋯ } ≫ Split.toKaroubiNondegComplexFunctorIsoN₁.inv.app (Split.mk' (Γ₀.splitting K))) ≫
          { f := 𝟙 (Γ₀.splitting K).nondegComplex, comm := ⋯ }) ≫
        (toKaroubi (ChainComplex C ℕ)).map (Γ₀'CompNondegComplexFunctor.hom.app K)) ≫
      { f := 𝟙 K, comm := ⋯ } =
    (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫ (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom
state_after: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ Split.toKaroubiNondegComplexFunctorIsoN₁.inv.app (Split.mk' (Γ₀.splitting K)) ≫
      (toKaroubi (ChainComplex C ℕ)).map (Γ₀'CompNondegComplexFunctor.hom.app K) =
    (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫ (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom

tactic: rfl
state_before: case w
C : Type u_1
inst✝² : Category.{u_2, u_1} C
inst✝¹ : Preadditive C
inst✝ : HasFiniteCoproducts C
K : ChainComplex C ℕ
⊢ Split.toKaroubiNondegComplexFunctorIsoN₁.inv.app (Split.mk' (Γ₀.splitting K)) ≫
      (toKaroubi (ChainComplex C ℕ)).map (Γ₀'CompNondegComplexFunctor.hom.app K) =
    (Γ₀.splitting K).toKaroubiNondegComplexIsoN₁.inv ≫ (toKaroubi (ChainComplex C ℕ)).map (Γ₀NondegComplexIso K).hom
state_after: no goals
Theorem: ProbabilityTheory.gammaPDF_of_nonneg
File: Mathlib/Probability/Distributions/Gamma.lean

tactic: simp only [gammaPDF_eq, if_pos hx]
state_before: a r x : ℝ
hx : 0 ≤ x
⊢ gammaPDF a r x = ENNReal.ofReal (r ^ a / Gamma a * x ^ (a - 1) * rexp (-(r * x)))
state_after: no goals