ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: NonUnitalStarAlgHom.prodEquiv_symm_apply
File: Mathlib/Algebra/Star/StarAlgHom.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : (A →⋆ₙₐ[R] B) × (A →⋆ₙₐ[R] C)
⊢ (fun f => ((fst R B C).comp f, (snd R B C).comp f)) ((fun f => f.1.prod f.2) f) = f
state_after: no goals
tactic: ext <;> rfl
state_before: R : Type u_1
A : Type u_2
B : Type u_3
C : Type u_4
inst✝⁹ : Monoid R
inst✝⁸ : NonUnitalNonAssocSemiring A
inst✝⁷ : DistribMulAction R A
inst✝⁶ : Star A
inst✝⁵ : NonUnitalNonAssocSemiring B
inst✝⁴ : DistribMulAction R B
inst✝³ : Star B
inst✝² : NonUnitalNonAssocSemiring C
inst✝¹ : DistribMulAction R C
inst✝ : Star C
f : A →⋆ₙₐ[R] B × C
⊢ (fun f => f.1.prod f.2) ((fun f => ((fst R B C).comp f, (snd R B C).comp f)) f) = f
state_after: no goals
tactic: ext <;> rfl
Theorem: AffineMap.lineMap_eq_lineMap_iff
File: Mathlib/LinearAlgebra/AffineSpace/AffineMap.lean

Proof steps:
state_before: k : Type u_1
V1 : Type u_2
P1 : Type u_3
V2 : Type u_4
P2 : Type u_5
V3 : Type u_6
P3 : Type u_7
V4 : Type u_8
P4 : Type u_9
inst✝¹³ : Ring k
inst✝¹² : AddCommGroup V1
inst✝¹¹ : Module k V1
inst✝¹⁰ : AffineSpace V1 P1
inst✝⁹ : AddCommGroup V2
inst✝⁸ : Module k V2
inst✝⁷ : AffineSpace V2 P2
inst✝⁶ : AddCommGroup V3
inst✝⁵ : Module k V3
inst✝⁴ : AffineSpace V3 P3
inst✝³ : AddCommGroup V4
inst✝² : Module k V4
inst✝¹ : AffineSpace V4 P4
inst✝ : NoZeroSMulDivisors k V1
p₀ p₁ : P1
c₁ c₂ : k
⊢ (lineMap p₀ p₁) c₁ = (lineMap p₀ p₁) c₂ ↔ p₀ = p₁ ∨ c₁ = c₂
state_after: no goals
tactic: rw [lineMap_apply, lineMap_apply, ← @vsub_eq_zero_iff_eq V1, vadd_vsub_vadd_cancel_right, ←
    sub_smul, smul_eq_zero, sub_eq_zero, vsub_eq_zero_iff_eq, or_comm, eq_comm]
Theorem: MeasurableEmbedding.comap_preimage
File: Mathlib/MeasureTheory/Measure/Restrict.lean

Proof steps:
state_before: R : Type u_1
α : Type u_2
β : Type u_3
δ : Type u_4
γ : Type u_5
ι : Type u_6
m0 : MeasurableSpace α
m1 : MeasurableSpace β
f : α → β
hf : MeasurableEmbedding f
μ : Measure β
s : Set β
⊢ (Measure.comap f μ) (f ⁻¹' s) = μ (s ∩ range f)
state_after: no goals
tactic: rw [← hf.map_apply, hf.map_comap, restrict_apply' hf.measurableSet_range]
Theorem: CategoryTheory.Equivalence.op_inverse
File: Mathlib/CategoryTheory/Opposites.lean

Proof steps:
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
e : C ≌ D
X : Cᵒᵖ
⊢ e.functor.op.map ((NatIso.op e.unitIso).symm.hom.app X) ≫ (NatIso.op e.counitIso).symm.hom.app (e.functor.op.obj X) =
    𝟙 (e.functor.op.obj X)
state_after: case a
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
e : C ≌ D
X : Cᵒᵖ
⊢ (e.functor.op.map ((NatIso.op e.unitIso).symm.hom.app X) ≫
        (NatIso.op e.counitIso).symm.hom.app (e.functor.op.obj X)).unop =
    (𝟙 (e.functor.op.obj X)).unop
tactic: apply Quiver.Hom.unop_inj
state_before: case a
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
e : C ≌ D
X : Cᵒᵖ
⊢ (e.functor.op.map ((NatIso.op e.unitIso).symm.hom.app X) ≫
        (NatIso.op e.counitIso).symm.hom.app (e.functor.op.obj X)).unop =
    (𝟙 (e.functor.op.obj X)).unop
state_after: case a
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
e : C ≌ D
X : Cᵒᵖ
⊢ e.counitIso.inv.app (e.functor.obj (unop X)) ≫ e.functor.map (e.unitIso.inv.app (unop X)) = 𝟙 (e.functor.obj (unop X))
tactic: dsimp
state_before: case a
C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
e : C ≌ D
X : Cᵒᵖ
⊢ e.counitIso.inv.app (e.functor.obj (unop X)) ≫ e.functor.map (e.unitIso.inv.app (unop X)) = 𝟙 (e.functor.obj (unop X))
state_after: no goals
tactic: simp
Theorem: Ordinal.add_sub_cancel_of_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
⊢ b + (a - b) ≤ a
state_after: case inl
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
e : a - b = 0
⊢ b + (a - b) ≤ a

case inr.inl.intro
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
c : Ordinal.{u_4}
e : a - b = succ c
⊢ b + (a - b) ≤ a

case inr.inr
α : Type u_1
β : Type u_2
γ : Type u_3
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal.{u_4}
h : b ≤ a
l : (a - b).IsLimit
⊢ b + (a - b) ≤ a
tactic: rcases zero_or_succ_or_limit (a - b) with (e | ⟨c, e⟩ | l)
Theorem: Sym2.mk_prod_swap_eq
File: Mathlib/Data/Sym/Sym2.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
p : α × α
⊢ Sym2.mk p.swap = Sym2.mk p
state_after: case mk
α : Type u_1
β : Type u_2
γ : Type u_3
fst✝ snd✝ : α
⊢ Sym2.mk (fst✝, snd✝).swap = s(fst✝, snd✝)
tactic: cases p
state_before: case mk
α : Type u_1
β : Type u_2
γ : Type u_3
fst✝ snd✝ : α
⊢ Sym2.mk (fst✝, snd✝).swap = s(fst✝, snd✝)
state_after: no goals
tactic: exact eq_swap
Theorem: Polynomial.Monic.as_sum
File: Mathlib/Algebra/Polynomial/Monic.lean

Proof steps:
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ p = X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ C (p.coeff p.natDegree) * X ^ p.natDegree + ∑ x ∈ range p.natDegree, C (p.coeff x) * X ^ x =
    X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i
tactic: conv_lhs => rw [p.as_sum_range_C_mul_X_pow, sum_range_succ_comm]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ C (p.coeff p.natDegree) * X ^ p.natDegree + ∑ x ∈ range p.natDegree, C (p.coeff x) * X ^ x =
    X ^ p.natDegree + ∑ i ∈ range p.natDegree, C (p.coeff i) * X ^ i
state_after: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ C (p.coeff p.natDegree) = 1
tactic: suffices C (p.coeff p.natDegree) = 1 by rw [this, one_mul]
state_before: R : Type u
S : Type v
a b : R
m n : ℕ
ι : Type y
inst✝ : Semiring R
p q r : R[X]
hp : p.Monic
⊢ C (p.coeff p.natDegree) = 1
state_after: no goals
tactic: exact congr_arg C hp
Theorem: CategoryTheory.Idempotents.karoubiUniversal₁_inverse
File: Mathlib/CategoryTheory/Idempotents/FunctorExtension.lean

Proof steps:
state_before: C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.58582, u_1} C
inst✝¹ : Category.{?u.58586, u_2} D
inst✝ : Category.{?u.58590, u_3} E
F : C ⥤ Karoubi D
⊢ (functorExtension₁ C D).map ((functorExtension₁CompWhiskeringLeftToKaroubiIso C D).symm.hom.app F) ≫
      (KaroubiUniversal₁.counitIso C D).hom.app ((functorExtension₁ C D).obj F) =
    𝟙 ((functorExtension₁ C D).obj F)
state_after: case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.58582, u_1} C
inst✝¹ : Category.{?u.58586, u_2} D
inst✝ : Category.{?u.58590, u_3} E
F : C ⥤ Karoubi D
P : Karoubi C
⊢ (((functorExtension₁ C D).map ((functorExtension₁CompWhiskeringLeftToKaroubiIso C D).symm.hom.app F) ≫
            (KaroubiUniversal₁.counitIso C D).hom.app ((functorExtension₁ C D).obj F)).app
        P).f =
    ((𝟙 ((functorExtension₁ C D).obj F)).app P).f
tactic: ext P
state_before: case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.58582, u_1} C
inst✝¹ : Category.{?u.58586, u_2} D
inst✝ : Category.{?u.58590, u_3} E
F : C ⥤ Karoubi D
P : Karoubi C
⊢ (((functorExtension₁ C D).map ((functorExtension₁CompWhiskeringLeftToKaroubiIso C D).symm.hom.app F) ≫
            (KaroubiUniversal₁.counitIso C D).hom.app ((functorExtension₁ C D).obj F)).app
        P).f =
    ((𝟙 ((functorExtension₁ C D).obj F)).app P).f
state_after: case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.58582, u_1} C
inst✝¹ : Category.{?u.58586, u_2} D
inst✝ : Category.{?u.58590, u_3} E
F : C ⥤ Karoubi D
P : Karoubi C
⊢ ((F.map P.p).f ≫ (F.obj P.X).p) ≫ (F.map P.p).f = (F.map P.p).f
tactic: dsimp
state_before: case w.h.h
C : Type u_1
D : Type u_2
E : Type u_3
inst✝² : Category.{?u.58582, u_1} C
inst✝¹ : Category.{?u.58586, u_2} D
inst✝ : Category.{?u.58590, u_3} E
F : C ⥤ Karoubi D
P : Karoubi C
⊢ ((F.map P.p).f ≫ (F.obj P.X).p) ≫ (F.map P.p).f = (F.map P.p).f
state_after: no goals
tactic: rw [comp_p, ← comp_f, ← F.map_comp, P.idem]
Theorem: Polynomial.toFinsupp_monomial
File: Mathlib/Algebra/Polynomial/Basic.lean

Proof steps:
state_before: R : Type u
a b : R
m n✝ : ℕ
inst✝ : Semiring R
p q : R[X]
n : ℕ
r : R
⊢ ((monomial n) r).toFinsupp = Finsupp.single n r
state_after: no goals
tactic: simp [monomial]
Theorem: Finsupp.neLocus_self_add_right
File: Mathlib/Data/Finsupp/NeLocus.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq N
inst✝ : AddGroup N
f f₁ f₂ g g₁ g₂ : α →₀ N
⊢ f.neLocus (f + g) = g.support
state_after: no goals
tactic: rw [← neLocus_zero_left, ← neLocus_add_left f 0 g, add_zero]
Theorem: Finset.ssubset_singleton_iff
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
s✝ : Finset α
a✝ b : α
s : Finset α
a : α
⊢ s ⊂ {a} ↔ s = ∅
state_after: no goals
tactic: rw [← coe_ssubset, coe_singleton, Set.ssubset_singleton_iff, coe_eq_empty]
Theorem: padicValNat_dvd_iff
File: Mathlib/NumberTheory/Padics/PadicVal.lean

Proof steps:
state_before: p n : ℕ
hp : Fact (Nat.Prime p)
a : ℕ
⊢ p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValNat p a
state_after: case inl
p n : ℕ
hp : Fact (Nat.Prime p)
⊢ p ^ n ∣ 0 ↔ 0 = 0 ∨ n ≤ padicValNat p 0

case inr
p n : ℕ
hp : Fact (Nat.Prime p)
a : ℕ
ha : a ≠ 0
⊢ p ^ n ∣ a ↔ a = 0 ∨ n ≤ padicValNat p a
tactic: rcases eq_or_ne a 0 with (rfl | ha)
Theorem: Equiv.Perm.IsCycle.of_pow
File: Mathlib/GroupTheory/Perm/Cycle/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : (f ^ n).IsCycle
h2 : f.support ⊆ (f ^ n).support
⊢ f.IsCycle
state_after: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : (f ^ n).IsCycle
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
⊢ f.IsCycle
tactic: have key : ∀ x : α, (f ^ n) x ≠ x ↔ f x ≠ x := by
    simp_rw [← mem_support, ← Finset.ext_iff]
    exact (support_pow_le _ n).antisymm h2
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : (f ^ n).IsCycle
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
⊢ f.IsCycle
state_after: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
⊢ f.IsCycle
tactic: obtain ⟨x, hx1, hx2⟩ := h1
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
⊢ f.IsCycle
state_after: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
y : α
hy : f y ≠ y
⊢ f.SameCycle x y
tactic: refine ⟨x, (key x).mp hx1, fun y hy => ?_⟩
state_before: case intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
y : α
hy : f y ≠ y
⊢ f.SameCycle x y
state_after: case intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
y : α
hy : f y ≠ y
i : ℤ
h✝ : ((f ^ n) ^ i) x = y
⊢ f.SameCycle x y
tactic: cases' hx2 ((key y).mpr hy) with i _
state_before: case intro.intro.intro
ι : Type u_1
α : Type u_2
β : Type u_3
f g : Perm α
x✝ y✝ : α
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h2 : f.support ⊆ (f ^ n).support
key : ∀ (x : α), (f ^ n) x ≠ x ↔ f x ≠ x
x : α
hx1 : (f ^ n) x ≠ x
hx2 : ∀ ⦃y : α⦄, (f ^ n) y ≠ y → (f ^ n).SameCycle x y
y : α
hy : f y ≠ y
i : ℤ
h✝ : ((f ^ n) ^ i) x = y
⊢ f.SameCycle x y
state_after: no goals
tactic: exact ⟨n * i, by rwa [zpow_mul]⟩
Theorem: mul_lt_of_lt_one_left
File: Mathlib/Algebra/Order/GroupWithZero/Unbundled.lean

Proof steps:
state_before: α : Type u_1
a b c d : α
inst✝³ : MulOneClass α
inst✝² : Zero α
inst✝¹ : Preorder α
inst✝ : MulPosStrictMono α
hb : 0 < b
h : a < 1
⊢ a * b < b
state_after: no goals
tactic: simpa only [one_mul] using mul_lt_mul_of_pos_right h hb
Theorem: StrictMonoOn.exists_deriv_lt_slope
File: Mathlib/Analysis/Convex/Deriv.lean

Proof steps:
state_before: x y : ℝ
f : ℝ → ℝ
hf : ContinuousOn f (Icc x y)
hxy : x < y
hf'_mono : StrictMonoOn (deriv f) (Ioo x y)
⊢ ∃ a ∈ Ioo x y, deriv f a < (f y - f x) / (y - x)
state_after: case pos
x y : ℝ
f : ℝ → ℝ
hf : ContinuousOn f (Icc x y)
hxy : x < y
hf'_mono : StrictMonoOn (deriv f) (Ioo x y)
h : ∀ w ∈ Ioo x y, deriv f w ≠ 0
⊢ ∃ a ∈ Ioo x y, deriv f a < (f y - f x) / (y - x)

case neg
x y : ℝ
f : ℝ → ℝ
hf : ContinuousOn f (Icc x y)
hxy : x < y
hf'_mono : StrictMonoOn (deriv f) (Ioo x y)
h : ¬∀ w ∈ Ioo x y, deriv f w ≠ 0
⊢ ∃ a ∈ Ioo x y, deriv f a < (f y - f x) / (y - x)
tactic: by_cases h : ∀ w ∈ Ioo x y, deriv f w ≠ 0
Theorem: IsAddUnit.isAddRegular
File: Mathlib/Algebra/Regular/Basic.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Monoid R
a b : R
ua : IsUnit a
⊢ IsRegular a
state_after: case intro
R : Type u_1
inst✝ : Monoid R
b : R
a : Rˣ
⊢ IsRegular ↑a
tactic: rcases ua with ⟨a, rfl⟩
state_before: case intro
R : Type u_1
inst✝ : Monoid R
b : R
a : Rˣ
⊢ IsRegular ↑a
state_after: no goals
tactic: exact Units.isRegular a
Theorem: hasDerivAt_of_hasDerivAt_of_ne'
File: Mathlib/Analysis/Calculus/FDeriv/Extend.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 g : ℝ → E
x : ℝ
f_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y
hf : ContinuousAt f x
hg : ContinuousAt g x
y : ℝ
⊢ HasDerivAt f (g y) y
state_after: case inl
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f g : ℝ → E
y : ℝ
f_diff : ∀ (y_1 : ℝ), y_1 ≠ y → HasDerivAt f (g y_1) y_1
hf : ContinuousAt f y
hg : ContinuousAt g y
⊢ HasDerivAt f (g y) y

case inr
E : Type u_1
inst✝³ : NormedAddCommGroup E
inst✝² : NormedSpace ℝ E
F : Type u_2
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedSpace ℝ F
f g : ℝ → E
x : ℝ
f_diff : ∀ (y : ℝ), y ≠ x → HasDerivAt f (g y) y
hf : ContinuousAt f x
hg : ContinuousAt g x
y : ℝ
hne : y ≠ x
⊢ HasDerivAt f (g y) y
tactic: rcases eq_or_ne y x with (rfl | hne)
Theorem: Multiset.gcd_dedup
File: Mathlib/Algebra/GCDMonoid/Multiset.lean

Proof steps:
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s : Multiset α
⊢ (dedup 0).gcd = gcd 0
state_after: no goals
tactic: simp
state_before: α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
⊢ (a ::ₘ s).dedup.gcd = (a ::ₘ s).gcd
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ s.gcd = GCDMonoid.gcd a s.gcd
tactic: by_cases h : a ∈ s <;> simp [IH, h]
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ s.gcd = GCDMonoid.gcd a s.gcd
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ fold GCDMonoid.gcd 0 s = GCDMonoid.gcd a (fold GCDMonoid.gcd 0 s)
tactic: unfold gcd
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ fold GCDMonoid.gcd 0 s = GCDMonoid.gcd a (fold GCDMonoid.gcd 0 s)
state_after: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ GCDMonoid.gcd a (fold GCDMonoid.gcd 0 (s.erase a)) = GCDMonoid.gcd (normalize a) (fold GCDMonoid.gcd 0 (s.erase a))
tactic: rw [← cons_erase h, fold_cons_left, ← gcd_assoc, gcd_same]
state_before: case pos
α : Type u_1
inst✝² : CancelCommMonoidWithZero α
inst✝¹ : NormalizedGCDMonoid α
inst✝ : DecidableEq α
s✝ : Multiset α
a : α
s : Multiset α
IH : s.dedup.gcd = s.gcd
h : a ∈ s
⊢ GCDMonoid.gcd a (fold GCDMonoid.gcd 0 (s.erase a)) = GCDMonoid.gcd (normalize a) (fold GCDMonoid.gcd 0 (s.erase a))
state_after: no goals
tactic: apply (associated_normalize _).gcd_eq_left
Theorem: Substring.Valid.validFor
File: .lake/packages/batteries/Batteries/Data/String/Lemmas.lean

Proof steps:
state_before: l mr lm r : List Char
e :
  lm ++ r =
    { str := { data := l ++ mr }, startPos := { byteIdx := utf8ByteSize.go l },
          stopPos := { byteIdx := utf8ByteSize.go lm } }.str.data
h :
  { str := { data := l ++ mr }, startPos := { byteIdx := utf8ByteSize.go l },
        stopPos := { byteIdx := utf8ByteSize.go lm } }.startPos ≤
    { str := { data := l ++ mr }, startPos := { byteIdx := utf8ByteSize.go l },
        stopPos := { byteIdx := utf8ByteSize.go lm } }.stopPos
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8ByteSize.go l },
        stopPos := { byteIdx := utf8ByteSize.go lm } }
state_after: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }
tactic: simp only [utf8ByteSize.go_eq, Pos.mk_le_mk] at *
state_before: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }
state_after: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
this : ∃ c', lm = l ++ c' ∧ mr = c' ++ r
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }

case x
l mr lm r : List Char
e : lm ++ r = l ++ mr
h✝ : utf8Len l ≤ utf8Len lm
h : ∃ a', l = lm ++ a' ∧ r = a' ++ mr
⊢ ∃ c', lm = l ++ c' ∧ mr = c' ++ r
tactic: have := (or_iff_right_iff_imp.2 fun h => ?x).1 (List.append_eq_append_iff.1 e)
state_before: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
this : ∃ c', lm = l ++ c' ∧ mr = c' ++ r
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }

case x
l mr lm r : List Char
e : lm ++ r = l ++ mr
h✝ : utf8Len l ≤ utf8Len lm
h : ∃ a', l = lm ++ a' ∧ r = a' ++ mr
⊢ ∃ c', lm = l ++ c' ∧ mr = c' ++ r
state_after: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
this : ∃ c', lm = l ++ c' ∧ mr = c' ++ r
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }
tactic: case x =>
      match l, r, h with | _, _, ⟨m, rfl, rfl⟩ => ?_
      simp only [utf8Len_append] at h
      cases utf8Len_eq_zero.1 <| Nat.le_zero.1 (Nat.le_of_add_le_add_left (c := 0) h)
      exact ⟨[], by simp⟩
state_before: l mr lm r : List Char
e : lm ++ r = l ++ mr
h : utf8Len l ≤ utf8Len lm
this : ∃ c', lm = l ++ c' ∧ mr = c' ++ r
⊢ ∃ l_1 m r,
    ValidFor l_1 m r
      { str := { data := l ++ mr }, startPos := { byteIdx := utf8Len l }, stopPos := { byteIdx := utf8Len lm } }
state_after: no goals
tactic: match lm, mr, this with
    | _, _, ⟨m, rfl, rfl⟩ => exact ⟨l, m, r, by simpa using ValidFor.mk⟩
Theorem: ModularGroup.abs_two_mul_re_lt_one_of_mem_fdo
File: Mathlib/NumberTheory/Modular.lean

Proof steps:
state_before: g : SL(2, ℤ)
z : ℍ
h : z ∈ 𝒟ᵒ
⊢ |2 * z.re| < 1
state_after: g : SL(2, ℤ)
z : ℍ
h : z ∈ 𝒟ᵒ
⊢ |z.re| < 1 / 2
tactic: rw [abs_mul, abs_two, ← lt_div_iff' (zero_lt_two' ℝ)]
state_before: g : SL(2, ℤ)
z : ℍ
h : z ∈ 𝒟ᵒ
⊢ |z.re| < 1 / 2
state_after: no goals
tactic: exact h.2
Theorem: CategoryTheory.Bicategory.right_triangle_of_left_triangle
File: Mathlib/CategoryTheory/Bicategory/Adjunction.lean

Proof steps:
state_before: B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
η : 𝟙 a ≅ f ≫ g
ε : g ≫ f ≅ 𝟙 b
h : leftZigzag η.hom ε.hom = (λ_ f).hom ≫ (ρ_ f).inv
⊢ rightZigzag η.hom ε.hom = (ρ_ g).hom ≫ (λ_ g).inv
state_after: B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
η : 𝟙 a ≅ f ≫ g
ε : g ≫ f ≅ 𝟙 b
h : leftZigzag η.hom ε.hom = (λ_ f).hom ≫ (ρ_ f).inv
⊢ (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv) ≫ rightZigzag η.hom ε.hom =
    (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv) ≫ (ρ_ g).hom ≫ (λ_ g).inv
tactic: rw [← cancel_epi (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv)]
state_before: B : Type u
inst✝ : Bicategory B
a b c : B
f : a ⟶ b
g : b ⟶ a
η : 𝟙 a ≅ f ≫ g
ε : g ≫ f ≅ 𝟙 b
h : leftZigzag η.hom ε.hom = (λ_ f).hom ≫ (ρ_ f).inv
⊢ (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv) ≫ rightZigzag η.hom ε.hom =
    (rightZigzag η.hom ε.hom ≫ (λ_ g).hom ≫ (ρ_ g).inv) ≫ (ρ_ g).hom ≫ (λ_ g).inv
state_after: no goals
tactic: calc
    _ = rightZigzag η.hom ε.hom ⊗≫ rightZigzag η.hom ε.hom := by coherence
    _ = rightZigzag η.hom ε.hom := rightZigzag_idempotent_of_left_triangle _ _ h
    _ = _ := by simp
Theorem: DFinsupp.filter_ne_eq_erase'
File: Mathlib/Data/DFinsupp/Basic.lean

Proof steps:
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i : ι
⊢ filter (fun x => i ≠ x) f = erase i f
state_after: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i : ι
⊢ filter (fun x => i ≠ x) f = filter (fun x => x ≠ i) f
tactic: rw [← filter_ne_eq_erase f i]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i : ι
⊢ filter (fun x => i ≠ x) f = filter (fun x => x ≠ i) f
state_after: case e_p.h.a
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i j : ι
⊢ i ≠ j ↔ j ≠ i
tactic: congr with j
state_before: case e_p.h.a
ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → Zero (β i)
s : Finset ι
x : (i : ↑↑s) → β ↑i
i✝ : ι
f : Π₀ (i : ι), β i
i j : ι
⊢ i ≠ j ↔ j ≠ i
state_after: no goals
tactic: exact ne_comm