ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Multiset.map_erase
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x : α
s : Multiset α
⊢ map f (s.erase x) = (map f s).erase (f x)
state_after: case empty
α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x : α
⊢ map f (erase 0 x) = (map f 0).erase (f x)

case cons
α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y : α
s : Multiset α
ih : map f (s.erase x) = (map f s).erase (f x)
⊢ map f ((y ::ₘ s).erase x) = (map f (y ::ₘ s)).erase (f x)
tactic: induction' s using Multiset.induction_on with y s ih
state_before: case cons
α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y : α
s : Multiset α
ih : map f (s.erase x) = (map f s).erase (f x)
⊢ map f ((y ::ₘ s).erase x) = (map f (y ::ₘ s)).erase (f x)
state_after: case pos
α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y : α
s : Multiset α
ih : map f (s.erase x) = (map f s).erase (f x)
hxy : y = x
⊢ map f ((y ::ₘ s).erase x) = (map f (y ::ₘ s)).erase (f x)

case neg
α : Type u_1
β : Type v
γ : Type u_2
inst✝¹ : DecidableEq α
inst✝ : DecidableEq β
f : α → β
hf : Injective f
x y : α
s : Multiset α
ih : map f (s.erase x) = (map f s).erase (f x)
hxy : ¬y = x
⊢ map f ((y ::ₘ s).erase x) = (map f (y ::ₘ s)).erase (f x)
tactic: by_cases hxy : y = x
Theorem: CompleteLattice.setIndependent_iff
File: Mathlib/Order/SupIndep.lean

Proof steps:
state_before: α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
⊢ SetIndependent s ↔ Independent Subtype.val
state_after: α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
⊢ (∀ ⦃a : α⦄, a ∈ s → Disjoint a (⨆ a_2 ∈ s \ {a}, a_2)) ↔
    ∀ (x : α) (h : x ∈ s), Disjoint x (⨆ j, ⨆ (_ : j ≠ ⟨x, h⟩), ↑j)
tactic: simp_rw [Independent, SetIndependent, SetCoe.forall, sSup_eq_iSup]
state_before: α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
⊢ (∀ ⦃a : α⦄, a ∈ s → Disjoint a (⨆ a_2 ∈ s \ {a}, a_2)) ↔
    ∀ (x : α) (h : x ∈ s), Disjoint x (⨆ j, ⨆ (_ : j ≠ ⟨x, h⟩), ↑j)
state_after: α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
a : α
ha : a ∈ s
⊢ Disjoint a (⨆ a_1 ∈ s \ {a}, a_1) ↔ Disjoint a (⨆ j, ⨆ (_ : j ≠ ⟨a, ha⟩), ↑j)
tactic: refine forall₂_congr fun a ha => ?_
state_before: α✝ : Type u_1
β : Type u_2
ι : Type u_3
ι' : Type u_4
inst✝¹ : CompleteLattice α✝
s✝ : Set α✝
hs : SetIndependent s✝
α : Type u_5
inst✝ : CompleteLattice α
s : Set α
a : α
ha : a ∈ s
⊢ Disjoint a (⨆ a_1 ∈ s \ {a}, a_1) ↔ Disjoint a (⨆ j, ⨆ (_ : j ≠ ⟨a, ha⟩), ↑j)
state_after: no goals
tactic: simp [iSup_subtype, iSup_and]
Theorem: IsClosed.interior_union_right
File: Mathlib/Topology/Basic.lean

Proof steps:
state_before: X : Type u
Y : Type v
ι : Sort w
α : Type u_1
β : Type u_2
x : X
s s₁ s₂ t : Set X
p p₁ p₂ : X → Prop
inst✝ : TopologicalSpace X
h : IsClosed t
⊢ interior (s ∪ t) ⊆ interior s ∪ t
state_after: no goals
tactic: simpa only [union_comm _ t] using h.interior_union_left
Theorem: Polynomial.monic_expand_iff
File: Mathlib/Algebra/Polynomial/Expand.lean

Proof steps:
state_before: R : Type u
inst✝¹ : CommSemiring R
S : Type v
inst✝ : CommSemiring S
p✝ q p : ℕ
f : R[X]
hp : 0 < p
⊢ ((expand R p) f).Monic ↔ f.Monic
state_after: no goals
tactic: simp only [Monic, leadingCoeff_expand hp]
Theorem: ContT.monadLift_bind
File: Mathlib/Control/Monad/Cont.lean

Proof steps:
state_before: r : Type u
m : Type u → Type v
α✝ β✝ γ ω : Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
α β : Type u
x : m α
f : α → m β
⊢ monadLift (x >>= f) = monadLift x >>= monadLift ∘ f
state_after: case h
r : Type u
m : Type u → Type v
α✝ β✝ γ ω : Type w
inst✝¹ : Monad m
inst✝ : LawfulMonad m
α β : Type u
x : m α
f : α → m β
f✝ : β → m r
⊢ (monadLift (x >>= f)).run f✝ = (monadLift x >>= monadLift ∘ f).run f✝
tactic: ext
Theorem: orderOf_eq_prime_pow
File: Mathlib/GroupTheory/OrderOfElement.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
A : Type u_3
α : Type u_4
β : Type u_5
inst✝ : Monoid G
a b x y : G
n m p : ℕ
hp : Fact (Nat.Prime p)
hnot : ¬x ^ p ^ n = 1
hfin : x ^ p ^ (n + 1) = 1
⊢ orderOf x = p ^ (n + 1)
state_after: no goals
tactic: apply minimalPeriod_eq_prime_pow <;> rwa [isPeriodicPt_mul_iff_pow_eq_one]
Theorem: WithTop.iInf_coe_eq_top
File: Mathlib/Order/ConditionallyCompleteLattice/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
inst✝ : ConditionallyCompleteLinearOrderBot α
f : ι → α
⊢ ⨅ x, ↑(f x) = ⊤ ↔ IsEmpty ι
state_after: no goals
tactic: simp [isEmpty_iff]
Theorem: Basis.dualBasis_apply_self
File: Mathlib/LinearAlgebra/Dual.lean

Proof steps:
state_before: R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ (b.dualBasis i) (b j) = if j = i then 1 else 0
state_after: case h.e'_3.h₁.a
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ j = i ↔ i = j
tactic: convert b.toDual_apply i j using 2
state_before: case h.e'_3.h₁.a
R : Type uR
M : Type uM
K : Type uK
V : Type uV
ι : Type uι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : Module R M
inst✝¹ : DecidableEq ι
b : Basis ι R M
inst✝ : _root_.Finite ι
i j : ι
⊢ j = i ↔ i = j
state_after: no goals
tactic: rw [@eq_comm _ j i]
Theorem: Metric.toInductiveLimit_isometry
File: Mathlib/Topology/MetricSpace/Gluing.lean

Proof steps:
state_before: X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
n : ℕ
x y : X n
⊢ dist (toInductiveLimit I n x) (toInductiveLimit I n y) = dist x y
state_after: X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
n : ℕ
x y : X n
⊢ inductiveLimitDist f ⟨n, x⟩ ⟨n, y⟩ = dist x y
tactic: change inductiveLimitDist f ⟨n, x⟩ ⟨n, y⟩ = dist x y
state_before: X : ℕ → Type u
inst✝ : (n : ℕ) → MetricSpace (X n)
f : (n : ℕ) → X n → X (n + 1)
I : ∀ (n : ℕ), Isometry (f n)
n : ℕ
x y : X n
⊢ inductiveLimitDist f ⟨n, x⟩ ⟨n, y⟩ = dist x y
state_after: no goals
tactic: rw [inductiveLimitDist_eq_dist I ⟨n, x⟩ ⟨n, y⟩ n (le_refl n) (le_refl n), leRecOn_self,
      leRecOn_self]
Theorem: eq_of_has_deriv_right_eq
File: Mathlib/Analysis/Calculus/MeanValue.lean

Proof steps:
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
derivf : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x
derivg : ∀ x ∈ Ico a b, HasDerivWithinAt g (f' x) (Ici x) x
fcont : ContinuousOn f (Icc a b)
gcont : ContinuousOn g (Icc 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
derivf : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x
derivg : ∀ x ∈ Ico a b, HasDerivWithinAt g (f' x) (Ici x) x
fcont : ContinuousOn f (Icc a b)
gcont : ContinuousOn g (Icc a b)
hi : f a - g a = 0
⊢ ∀ y ∈ Icc a b, f y - g y = 0
tactic: simp only [← @sub_eq_zero _ _ (f _)] at 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
derivf : ∀ x ∈ Ico a b, HasDerivWithinAt f (f' x) (Ici x) x
derivg : ∀ x ∈ Ico a b, HasDerivWithinAt g (f' x) (Ici x) x
fcont : ContinuousOn f (Icc a b)
gcont : ContinuousOn g (Icc a b)
hi : f a - g a = 0
⊢ ∀ y ∈ Icc a b, f y - g y = 0
state_after: no goals
tactic: exact hi ▸ constant_of_has_deriv_right_zero (fcont.sub gcont) fun y hy => by
    simpa only [sub_self] using (derivf y hy).sub (derivg y hy)
Theorem: Polynomial.coe_C
File: Mathlib/RingTheory/PowerSeries/Basic.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : R[X]
a : R
⊢ ↑(C a) = (PowerSeries.C R) a
state_after: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : R[X]
a : R
this : ↑((monomial 0) a) = (PowerSeries.monomial R 0) a
⊢ ↑(C a) = (PowerSeries.C R) a
tactic: have := coe_monomial 0 a
state_before: σ : Type u_1
R : Type u_2
inst✝ : CommSemiring R
φ ψ : R[X]
a : R
this : ↑((monomial 0) a) = (PowerSeries.monomial R 0) a
⊢ ↑(C a) = (PowerSeries.C R) a
state_after: no goals
tactic: rwa [PowerSeries.monomial_zero_eq_C_apply] at this
Theorem: StieltjesFunction.length_Ioc
File: Mathlib/MeasureTheory/Measure/Stieltjes.lean

Proof steps:
state_before: f : StieltjesFunction
a b : ℝ
⊢ f.length (Ioc a b) = ofReal (↑f b - ↑f a)
state_after: f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
tactic: refine
    le_antisymm (iInf_le_of_le a <| iInf₂_le b Subset.rfl)
      (le_iInf fun a' => le_iInf fun b' => le_iInf fun h => ENNReal.coe_le_coe.2 ?_)
state_before: f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
state_after: case inl
f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
ab : b ≤ a
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal

case inr
f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
ab : a < b
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
tactic: rcases le_or_lt b a with ab | ab
state_before: case inr
f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
ab : a < b
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
state_after: case inr.intro
f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
ab : a < b
h₁ : b ≤ b'
h₂ : a' ≤ a
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
tactic: cases' (Ioc_subset_Ioc_iff ab).1 h with h₁ h₂
state_before: case inr.intro
f : StieltjesFunction
a b a' b' : ℝ
h : Ioc a b ⊆ Ioc a' b'
ab : a < b
h₁ : b ≤ b'
h₂ : a' ≤ a
⊢ (↑f b - ↑f a).toNNReal ≤ (↑f b' - ↑f a').toNNReal
state_after: no goals
tactic: exact Real.toNNReal_le_toNNReal (sub_le_sub (f.mono h₁) (f.mono h₂))
Theorem: OreLocalization.oreDiv_mul_oreDiv_comm
File: Mathlib/RingTheory/OreLocalization/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝¹ : CommMonoid R
S : Submonoid R
inst✝ : OreSet S
r₁ r₂ : R
s₁ s₂ : ↥S
⊢ r₁ /ₒ s₁ * (r₂ /ₒ s₂) = r₁ * r₂ /ₒ (s₁ * s₂)
state_after: no goals
tactic: rw [oreDiv_mul_char r₁ r₂ s₁ s₂ r₁ s₂ (by simp [mul_comm]), mul_comm s₂]
Theorem: Cardinal.toENat_strictMonoOn
File: Mathlib/SetTheory/Cardinal/ENat.lean

Proof steps:
state_before: ⊢ StrictMonoOn (⇑toENat) (Iic ℵ₀)
state_after: ⊢ ∀ (i i_1 : ℕ∞), i < i_1 → i < i_1
tactic: simp only [← range_ofENat, StrictMonoOn, forall_mem_range, toENat_ofENat, ofENat_lt_ofENat]
state_before: ⊢ ∀ (i i_1 : ℕ∞), i < i_1 → i < i_1
state_after: no goals
tactic: exact fun _ _ ↦ id
Theorem: measurableSet_inl_image
File: Mathlib/MeasureTheory/MeasurableSpace/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort uι
s✝ t u : Set α
m : MeasurableSpace α
mβ : MeasurableSpace β
s : Set α
⊢ MeasurableSet (Sum.inl '' s) ↔ MeasurableSet s
state_after: no goals
tactic: simp [measurableSet_sum_iff, Sum.inl_injective.preimage_image]
Theorem: TopCat.piIsoPi_hom_apply
File: Mathlib/Topology/Category/TopCat/Limits/Products.lean

Proof steps:
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : (piIsoPi α).inv ≫ Pi.π α i = piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
tactic: have := piIsoPi_inv_π α i
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : (piIsoPi α).inv ≫ Pi.π α i = piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : Pi.π α i = (piIsoPi α).hom ≫ piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
tactic: rw [Iso.inv_comp_eq] at this
state_before: J : Type v
inst✝ : SmallCategory J
ι : Type v
α : ι → TopCat
i : ι
x : ↑(∏ᶜ α)
this : Pi.π α i = (piIsoPi α).hom ≫ piπ α i
⊢ (piIsoPi α).hom x i = (Pi.π α i) x
state_after: no goals
tactic: exact ConcreteCategory.congr_hom this x
Theorem: Finsupp.support_smul_eq
File: Mathlib/Data/Finsupp/Basic.lean

Proof steps:
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✝³ : Semiring R
inst✝² : AddCommMonoid M
inst✝¹ : Module R M
inst✝ : NoZeroSMulDivisors R M
b : R
hb : b ≠ 0
g : α →₀ M
a : α
⊢ a ∈ (b • g).support ↔ a ∈ g.support
state_after: no goals
tactic: simp [Finsupp.smul_apply, hb]
Theorem: Submodule.prodEquivOfIsCompl_symm_apply_left
File: Mathlib/LinearAlgebra/Projection.lean

Proof steps:
state_before: R : Type u_1
inst✝⁹ : Ring R
E : Type u_2
inst✝⁸ : AddCommGroup E
inst✝⁷ : Module R E
F : Type u_3
inst✝⁶ : AddCommGroup F
inst✝⁵ : Module R F
G : Type u_4
inst✝⁴ : AddCommGroup G
inst✝³ : Module R G
p q : Submodule R E
S : Type u_5
inst✝² : Semiring S
M : Type u_6
inst✝¹ : AddCommMonoid M
inst✝ : Module S M
m : Submodule S M
h : IsCompl p q
x : ↥p
⊢ ↑x = (p.prodEquivOfIsCompl q h) (x, 0)
state_after: no goals
tactic: simp
Theorem: PartENat.coe_lt_iff
File: Mathlib/Data/Nat/PartENat.lean

Proof steps:
state_before: n : ℕ
x : PartENat
⊢ ↑n < x ↔ ∀ (h : x.Dom), n < x.get h
state_after: n : ℕ
x : PartENat
⊢ (∀ (hy : x.Dom), (↑n).get ⋯ < x.get hy) ↔ ∀ (h : x.Dom), n < x.get h
tactic: simp only [lt_def, exists_prop_of_true, dom_some, forall_true_iff]
state_before: n : ℕ
x : PartENat
⊢ (∀ (hy : x.Dom), (↑n).get ⋯ < x.get hy) ↔ ∀ (h : x.Dom), n < x.get h
state_after: no goals
tactic: rfl
Theorem: ContinuousWithinAt.finset_inf
File: Mathlib/Topology/Order/Lattice.lean

Proof steps:
state_before: L : Type u_1
X : Type u_2
inst✝⁴ : TopologicalSpace L
inst✝³ : TopologicalSpace X
ι : Type u_3
inst✝² : SemilatticeInf L
inst✝¹ : OrderTop L
inst✝ : ContinuousInf L
s : Finset ι
f : ι → X → L
t : Set X
x : X
hs : ∀ i ∈ s, ContinuousWithinAt (f i) t x
⊢ ContinuousWithinAt (s.inf f) t x
state_after: no goals
tactic: simpa only [← Finset.inf_apply] using finset_inf_apply hs
Theorem: MeasureTheory.integrable_add_iff_integrable_left
File: Mathlib/MeasureTheory/Function/L1Space.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝² : MeasurableSpace δ
inst✝¹ : NormedAddCommGroup β
inst✝ : NormedAddCommGroup γ
f g : α → β
hf : Integrable f μ
⊢ Integrable (g + f) μ ↔ Integrable g μ
state_after: no goals
tactic: rw [add_comm, integrable_add_iff_integrable_right hf]
Theorem: threeAPFree_iff_eq_right
File: Mathlib/Combinatorics/Additive/AP/Three/Defs.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Set ℕ
⊢ ThreeAPFree s ↔ ∀ ⦃a : ℕ⦄, a ∈ s → ∀ ⦃b : ℕ⦄, b ∈ s → ∀ ⦃c : ℕ⦄, c ∈ s → a + c = b + b → a = c
state_after: case refine_1
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Set ℕ
a : ℕ
_ha : a ∈ s
b : ℕ
hb : b ∈ s
c : ℕ
hc : c ∈ s
habc : a + c = b + b
⊢ a = b → a = c

case refine_2
F : Type u_1
α : Type u_2
β : Type u_3
𝕜 : Type u_4
E : Type u_5
s : Set ℕ
a : ℕ
_ha : a ∈ s
b : ℕ
hb : b ∈ s
c : ℕ
hc : c ∈ s
habc : a + c = b + b
⊢ a = c → a = b
tactic: refine forall₄_congr fun a _ha b hb => forall₃_congr fun c hc habc => ⟨?_, ?_⟩
Theorem: Int.gcd_eq_one_iff_coprime
File: Mathlib/RingTheory/Int/Basic.lean

Proof steps:
state_before: a b : ℤ
⊢ a.gcd b = 1 ↔ IsCoprime a b
state_after: case mp
a b : ℤ
⊢ a.gcd b = 1 → IsCoprime a b

case mpr
a b : ℤ
⊢ IsCoprime a b → a.gcd b = 1
tactic: constructor
Theorem: Polynomial.map_natDegree_eq_sub
File: Mathlib/Algebra/Polynomial/EraseLead.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : Semiring R
f : R[X]
S : Type u_2
F : Type u_3
inst✝² : Semiring S
inst✝¹ : FunLike F R[X] S[X]
inst✝ : AddMonoidHomClass F R[X] S[X]
φ : F
p : R[X]
k : ℕ
φ_k : ∀ (f : R[X]), f.natDegree < k → φ f = 0
φ_mon : ∀ (n : ℕ) (c : R), c ≠ 0 → (φ ((monomial n) c)).natDegree = n - k
⊢ ∀ {n : ℕ}, n ≤ k → (fun j => j - k) n = 0
state_after: no goals
tactic: simp_all
Theorem: Filter.Eventually.diag_of_prod_left
File: Mathlib/Order/Filter/Prod.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
⊢ (∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x) → ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)
tactic: intro h
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s : Set α
t : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)
state_after: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t✝ : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
t : α × α → Prop
ht : ∀ᶠ (x : α × α) in f ×ˢ f, t x
s : γ → Prop
hs : ∀ᶠ (y : γ) in g, s y
hst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)
tactic: obtain ⟨t, ht, s, hs, hst⟩ := eventually_prod_iff.1 h
state_before: case intro.intro.intro.intro
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort u_5
s✝ : Set α
t✝ : Set β
f✝ : Filter α
g✝ : Filter β
f : Filter α
g : Filter γ
p : (α × α) × γ → Prop
h : ∀ᶠ (x : (α × α) × γ) in (f ×ˢ f) ×ˢ g, p x
t : α × α → Prop
ht : ∀ᶠ (x : α × α) in f ×ˢ f, t x
s : γ → Prop
hs : ∀ᶠ (y : γ) in g, s y
hst : ∀ {x : α × α}, t x → ∀ {y : γ}, s y → p (x, y)
⊢ ∀ᶠ (x : α × γ) in f ×ˢ g, p ((x.1, x.1), x.2)
state_after: no goals
tactic: exact (ht.diag_of_prod.prod_mk hs).mono fun x hx => by simp only [hst hx.1 hx.2]
Theorem: Finset.eq_of_mem_of_not_mem_erase
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
hs : b ∈ s
hsa : b ∉ s.erase a
⊢ b = a
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
hs : b ∈ s
hsa : b ≠ a → b ∉ s
⊢ b = a
tactic: rw [mem_erase, not_and] at hsa
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s t u v : Finset α
a b : α
hs : b ∈ s
hsa : b ≠ a → b ∉ s
⊢ b = a
state_after: no goals
tactic: exact not_imp_not.mp hsa hs
Theorem: List.mem_eraseIdx_iff_getElem
File: .lake/packages/batteries/Batteries/Data/List/EraseIdx.lean

Proof steps:
state_before: α : Type u
β : Type v
x : α
x✝ : Nat
⊢ x ∈ [].eraseIdx x✝ ↔ ∃ i, ↑i ≠ x✝ ∧ [][↑i] = x
state_after: α : Type u
β : Type v
x : α
x✝ : Nat
⊢ ¬∃ i h, i ≠ x✝ ∧ [][i] = x
tactic: simp only [eraseIdx, Fin.exists_iff, not_mem_nil, false_iff]
state_before: α : Type u
β : Type v
x : α
x✝ : Nat
⊢ ¬∃ i h, i ≠ x✝ ∧ [][i] = x
state_after: case intro.intro
α : Type u
β : Type v
x : α
x✝ i : Nat
h : i < [].length
⊢ False
tactic: rintro ⟨i, h, -⟩
state_before: case intro.intro
α : Type u
β : Type v
x : α
x✝ i : Nat
h : i < [].length
⊢ False
state_after: no goals
tactic: exact Nat.not_lt_zero _ h
state_before: α : Type u
β : Type v
x a : α
l : List α
⊢ x ∈ (a :: l).eraseIdx 0 ↔ ∃ i, ↑i ≠ 0 ∧ (a :: l)[↑i] = x
state_after: no goals
tactic: simp [Fin.exists_fin_succ, mem_iff_get]
state_before: α : Type u
β : Type v
x a : α
l : List α
k : Nat
⊢ x ∈ (a :: l).eraseIdx (k + 1) ↔ ∃ i, ↑i ≠ k + 1 ∧ (a :: l)[↑i] = x
state_after: no goals
tactic: simp [Fin.exists_fin_succ, mem_eraseIdx_iff_getElem, @eq_comm _ a, k.succ_ne_zero.symm]
Theorem: CategoryTheory.instCategorySimplicialObject_id_app
File: Mathlib/AlgebraicTopology/SimplicialObject.lean

Proof steps:
state_before: C : Type u
inst✝ : Category.{v, u} C
⊢ Category.{?u.61, max u v} (SimplicialObject C)
state_after: C : Type u
inst✝ : Category.{v, u} C
⊢ Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)
tactic: dsimp only [SimplicialObject]
state_before: C : Type u
inst✝ : Category.{v, u} C
⊢ Category.{?u.61, max u v} (SimplexCategoryᵒᵖ ⥤ C)
state_after: no goals
tactic: infer_instance
Theorem: atom_iff_nonzero_span
File: Mathlib/LinearAlgebra/Basis/VectorSpace.lean

Proof steps:
state_before: ι : Type u_1
ι' : Type u_2
K : Type u_3
V : Type u_4
V' : Type u_5
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v : ι → V
s t : Set V
x y z : V
W : Submodule K V
⊢ IsAtom W ↔ ∃ v, v ≠ 0 ∧ W = span K {v}
state_after: case refine_1
ι : Type u_1
ι' : Type u_2
K : Type u_3
V : Type u_4
V' : Type u_5
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v : ι → V
s t : Set V
x y z : V
W : Submodule K V
h : IsAtom W
⊢ ∃ v, v ≠ 0 ∧ W = span K {v}

case refine_2
ι : Type u_1
ι' : Type u_2
K : Type u_3
V : Type u_4
V' : Type u_5
inst✝⁴ : DivisionRing K
inst✝³ : AddCommGroup V
inst✝² : AddCommGroup V'
inst✝¹ : Module K V
inst✝ : Module K V'
v : ι → V
s t : Set V
x y z : V
W : Submodule K V
h : ∃ v, v ≠ 0 ∧ W = span K {v}
⊢ IsAtom W
tactic: refine ⟨fun h => ?_, fun h => ?_⟩