ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: add_tsub_cancel_of_le
File: Mathlib/Algebra/Order/Sub/Canonical.lean

Proof steps:
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : a ≤ b
⊢ a + (b - a) = b
state_after: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : a ≤ b
⊢ a + (b - a) ≤ b
tactic: refine le_antisymm ?_ le_add_tsub
state_before: α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a b c d : α
h : a ≤ b
⊢ a + (b - a) ≤ b
state_after: case intro
α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a c✝ d c : α
h : a ≤ a + c
⊢ a + (a + c - a) ≤ a + c
tactic: obtain ⟨c, rfl⟩ := exists_add_of_le h
state_before: case intro
α : Type u_1
inst✝⁵ : AddCommSemigroup α
inst✝⁴ : PartialOrder α
inst✝³ : ExistsAddOfLE α
inst✝² : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
inst✝¹ : Sub α
inst✝ : OrderedSub α
a c✝ d c : α
h : a ≤ a + c
⊢ a + (a + c - a) ≤ a + c
state_after: no goals
tactic: exact add_le_add_left add_tsub_le_left a
Theorem: AddMonoidHom.mker_inl
File: Mathlib/Algebra/Group/Submonoid/Operations.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝⁴ : MulOneClass M
inst✝³ : MulOneClass N
inst✝² : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝¹ : SetLike A M
hA : SubmonoidClass A M
S' : A
F : Type u_5
inst✝ : FunLike F M N
mc : MonoidHomClass F M N
⊢ mker (inl M N) = ⊥
state_after: case h
M : Type u_1
N : Type u_2
P : Type u_3
inst✝⁴ : MulOneClass M
inst✝³ : MulOneClass N
inst✝² : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝¹ : SetLike A M
hA : SubmonoidClass A M
S' : A
F : Type u_5
inst✝ : FunLike F M N
mc : MonoidHomClass F M N
x : M
⊢ x ∈ mker (inl M N) ↔ x ∈ ⊥
tactic: ext x
state_before: case h
M : Type u_1
N : Type u_2
P : Type u_3
inst✝⁴ : MulOneClass M
inst✝³ : MulOneClass N
inst✝² : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝¹ : SetLike A M
hA : SubmonoidClass A M
S' : A
F : Type u_5
inst✝ : FunLike F M N
mc : MonoidHomClass F M N
x : M
⊢ x ∈ mker (inl M N) ↔ x ∈ ⊥
state_after: no goals
tactic: simp [mem_mker]
Theorem: Module.End.IsSemisimple.of_mem_adjoin_singleton
File: Mathlib/LinearAlgebra/Semisimple.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
K : Type u_3
inst✝² : Field K
inst✝¹ : Module K M
f g : End K M
inst✝ : FiniteDimensional K M
hf : f.IsSemisimple
a : End K M
ha : a ∈ Algebra.adjoin K {f}
⊢ a.IsSemisimple
state_after: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
K : Type u_3
inst✝² : Field K
inst✝¹ : Module K M
f g : End K M
inst✝ : FiniteDimensional K M
hf : f.IsSemisimple
a : End K M
ha : a ∈ (aeval f).range
⊢ a.IsSemisimple
tactic: rw [Algebra.adjoin_singleton_eq_range_aeval] at ha
state_before: R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
K : Type u_3
inst✝² : Field K
inst✝¹ : Module K M
f g : End K M
inst✝ : FiniteDimensional K M
hf : f.IsSemisimple
a : End K M
ha : a ∈ (aeval f).range
⊢ a.IsSemisimple
state_after: case intro
R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
K : Type u_3
inst✝² : Field K
inst✝¹ : Module K M
f g : End K M
inst✝ : FiniteDimensional K M
hf : f.IsSemisimple
p : K[X]
⊢ ((aeval f).toRingHom p).IsSemisimple
tactic: obtain ⟨p, rfl⟩ := ha
state_before: case intro
R : Type u_1
M : Type u_2
inst✝⁵ : CommRing R
inst✝⁴ : AddCommGroup M
inst✝³ : Module R M
K : Type u_3
inst✝² : Field K
inst✝¹ : Module K M
f g : End K M
inst✝ : FiniteDimensional K M
hf : f.IsSemisimple
p : K[X]
⊢ ((aeval f).toRingHom p).IsSemisimple
state_after: no goals
tactic: exact .aeval hf _
Theorem: ZMod.euler_criterion_units
File: Mathlib/NumberTheory/LegendreSymbol/Basic.lean

Proof steps:
state_before: p : ℕ
inst✝ : Fact (Nat.Prime p)
x : (ZMod p)ˣ
⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1
state_after: case pos
p : ℕ
inst✝ : Fact (Nat.Prime p)
x : (ZMod p)ˣ
hc : p = 2
⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1

case neg
p : ℕ
inst✝ : Fact (Nat.Prime p)
x : (ZMod p)ˣ
hc : ¬p = 2
⊢ (∃ y, y ^ 2 = x) ↔ x ^ (p / 2) = 1
tactic: by_cases hc : p = 2
Theorem: Odd.sub_odd
File: Mathlib/Algebra/Ring/Parity.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝ : Ring α
a b : α
n : ℕ
ha : Odd a
hb : Odd b
⊢ Even (a - b)
state_after: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝ : Ring α
a b : α
n : ℕ
ha : Odd a
hb : Odd b
⊢ Even (a + -b)
tactic: rw [sub_eq_add_neg]
state_before: F : Type u_1
α : Type u_2
β : Type u_3
R : Type u_4
inst✝ : Ring α
a b : α
n : ℕ
ha : Odd a
hb : Odd b
⊢ Even (a + -b)
state_after: no goals
tactic: exact ha.add_odd hb.neg
Theorem: MeasureTheory.setToFun_indicator_const
File: Mathlib/MeasureTheory/Integral/SetToL1.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
x : E
⊢ setToFun μ T hT (s.indicator fun x_1 => x) = (T s) x
state_after: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
x : E
⊢ setToFun μ T hT ↑↑(indicatorConstLp 1 hs hμs x) = (T s) x
tactic: rw [setToFun_congr_ae hT (@indicatorConstLp_coeFn _ _ _ 1 _ _ _ hs hμs x).symm]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
x : E
⊢ setToFun μ T hT ↑↑(indicatorConstLp 1 hs hμs x) = (T s) x
state_after: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
x : E
⊢ (L1.setToL1 hT) (indicatorConstLp 1 hs hμs x) = (T s) x
tactic: rw [L1.setToFun_eq_setToL1 hT]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
F' : Type u_4
G : Type u_5
𝕜 : Type u_6
p : ℝ≥0∞
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace ℝ E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace ℝ F
inst✝³ : NormedAddCommGroup F'
inst✝² : NormedSpace ℝ F'
inst✝¹ : NormedAddCommGroup G
m : MeasurableSpace α
μ : Measure α
inst✝ : CompleteSpace F
T T' T'' : Set α → E →L[ℝ] F
C C' C'' : ℝ
f g : α → E
hT : DominatedFinMeasAdditive μ T C
s : Set α
hs : MeasurableSet s
hμs : μ s ≠ ⊤
x : E
⊢ (L1.setToL1 hT) (indicatorConstLp 1 hs hμs x) = (T s) x
state_after: no goals
tactic: exact L1.setToL1_indicatorConstLp hT hs hμs x
Theorem: integrableOn_Ico_iff_integrableOn_Ioo'
File: Mathlib/MeasureTheory/Integral/IntegrableOn.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : Measure α
a b : α
ha : μ {a} ≠ ⊤
⊢ IntegrableOn f (Ico a b) μ ↔ IntegrableOn f (Ioo a b) μ
state_after: case pos
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : Measure α
a b : α
ha : μ {a} ≠ ⊤
hab : a < b
⊢ IntegrableOn f (Ico a b) μ ↔ IntegrableOn f (Ioo a b) μ

case neg
α : Type u_1
β : Type u_2
E : Type u_3
F : Type u_4
inst✝³ : MeasurableSpace α
inst✝² : NormedAddCommGroup E
inst✝¹ : PartialOrder α
inst✝ : MeasurableSingletonClass α
f : α → E
μ : Measure α
a b : α
ha : μ {a} ≠ ⊤
hab : ¬a < b
⊢ IntegrableOn f (Ico a b) μ ↔ IntegrableOn f (Ioo a b) μ
tactic: by_cases hab : a < b
Theorem: zero_le_four
File: Mathlib/Algebra/Order/Monoid/NatCast.lean

Proof steps:
state_before: α : Type u_1
inst✝³ : AddMonoidWithOne α
inst✝² : Preorder α
inst✝¹ : ZeroLEOneClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ 0 ≤ 4
state_after: α : Type u_1
inst✝³ : AddMonoidWithOne α
inst✝² : Preorder α
inst✝¹ : ZeroLEOneClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ 0 ≤ 3 + 1
tactic: rw [← three_add_one_eq_four]
state_before: α : Type u_1
inst✝³ : AddMonoidWithOne α
inst✝² : Preorder α
inst✝¹ : ZeroLEOneClass α
inst✝ : CovariantClass α α (fun x x_1 => x + x_1) fun x x_1 => x ≤ x_1
⊢ 0 ≤ 3 + 1
state_after: no goals
tactic: exact add_nonneg zero_le_three zero_le_one
Theorem: AddSubmonoid.closure_closure_coe_preimage
File: Mathlib/Algebra/Group/Submonoid/Operations.lean

Proof steps:
state_before: M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
⊢ ⟨x, hx⟩ ∈ closure (Subtype.val ⁻¹' s)
state_after: case refine_1
M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
⊢ (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) 1 ⋯

case refine_2
M : Type u_1
N : Type u_2
P : Type u_3
inst✝³ : MulOneClass M
inst✝² : MulOneClass N
inst✝¹ : MulOneClass P
S : Submonoid M
A : Type u_4
inst✝ : SetLike A M
hA : SubmonoidClass A M
S' : A
s : Set M
x✝¹ : { x // x ∈ ↑(closure s) }
x : M
hx : x ∈ ↑(closure s)
x✝ : ⟨x, hx⟩ ∈ ⊤
g₁ : M
g₂ : g₁ ∈ closure s
hg₁ : M
hg₂ : hg₁ ∈ closure s
⊢ (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) g₁ g₂ →
    (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) hg₁ hg₂ →
      (fun y hy => ⟨y, hy⟩ ∈ closure (Subtype.val ⁻¹' s)) (g₁ * hg₁) ⋯
tactic: refine closure_induction' (p := fun y hy ↦ ⟨y, hy⟩ ∈ closure (((↑) : closure s → M) ⁻¹' s))
        (fun g hg => subset_closure hg) ?_ (fun g₁ g₂ hg₁ hg₂ => ?_) hx
Theorem: UniformSpace.comap_comap
File: Mathlib/Topology/UniformSpace/Basic.lean

Proof steps:
state_before: α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
uγ : UniformSpace γ
f : α → β
g : β → γ
⊢ comap (g ∘ f) uγ = comap f (comap g uγ)
state_after: case h
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
uγ : UniformSpace γ
f : α → β
g : β → γ
⊢ 𝓤 α = 𝓤 α
tactic: ext1
state_before: case h
α✝ : Type ua
β✝ : Type ub
γ✝ : Type uc
δ : Type ud
ι : Sort u_1
α : Type u_2
β : Type u_3
γ : Type u_4
uγ : UniformSpace γ
f : α → β
g : β → γ
⊢ 𝓤 α = 𝓤 α
state_after: no goals
tactic: simp only [uniformity_comap, Filter.comap_comap, Prod.map_comp_map]
Theorem: Setoid.eqv_classes_of_disjoint_union
File: Mathlib/Data/Setoid/Partition.lean

Proof steps:
state_before: α : Type u_1
c : Set (Set α)
hu : ⋃₀ c = Set.univ
H : c.PairwiseDisjoint id
a : α
⊢ a ∈ ⋃₀ c
state_after: α : Type u_1
c : Set (Set α)
hu : ⋃₀ c = Set.univ
H : c.PairwiseDisjoint id
a : α
⊢ a ∈ Set.univ
tactic: rw [hu]
state_before: α : Type u_1
c : Set (Set α)
hu : ⋃₀ c = Set.univ
H : c.PairwiseDisjoint id
a : α
⊢ a ∈ Set.univ
state_after: no goals
tactic: exact Set.mem_univ a
Theorem: specializes_iff_exterior_subset
File: Mathlib/Topology/AlexandrovDiscrete.lean

Proof steps:
state_before: ι : Sort u_1
κ : ι → Sort u_2
α : Type u_3
β : Type u_4
inst✝³ : TopologicalSpace α
inst✝² : TopologicalSpace β
s t : Set α
a x y : α
inst✝¹ : AlexandrovDiscrete α
inst✝ : AlexandrovDiscrete β
⊢ x ⤳ y ↔ exterior {x} ⊆ exterior {y}
state_after: no goals
tactic: simp [Specializes]
Theorem: AdjoinRoot.quotEquivQuotMap_symm_apply
File: Mathlib/RingTheory/AdjoinRoot.lean

Proof steps:
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f : R[X]
I : Ideal R
x : R
⊢ (quotAdjoinRootEquivQuotPolynomialQuot I f) ((algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x) =
    (algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x
state_after: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f : R[X]
I : Ideal R
x : R
this : (algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = (Ideal.Quotient.mk (Ideal.map (of f) I)) ((mk f) (C x))
⊢ (quotAdjoinRootEquivQuotPolynomialQuot I f) ((algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x) =
    (algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x
tactic: have :
        algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I) x =
          Ideal.Quotient.mk (Ideal.map (AdjoinRoot.of f) I) ((mk f) (C x)) :=
        rfl
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f : R[X]
I : Ideal R
x : R
this : (algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = (Ideal.Quotient.mk (Ideal.map (of f) I)) ((mk f) (C x))
⊢ (quotAdjoinRootEquivQuotPolynomialQuot I f) ((algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x) =
    (algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x
state_after: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f : R[X]
I : Ideal R
x : R
this : (algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = (Ideal.Quotient.mk (Ideal.map (of f) I)) ((mk f) (C x))
⊢ (Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (C ((Ideal.Quotient.mk I) x)) =
    (algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x
tactic: rw [this, quotAdjoinRootEquivQuotPolynomialQuot_mk_of, map_C]
state_before: R : Type u
S : Type v
K : Type w
inst✝ : CommRing R
I✝ : Ideal R
f✝ f : R[X]
I : Ideal R
x : R
this : (algebraMap R (AdjoinRoot f ⧸ Ideal.map (of f) I)) x = (Ideal.Quotient.mk (Ideal.map (of f) I)) ((mk f) (C x))
⊢ (Ideal.Quotient.mk (span {Polynomial.map (Ideal.Quotient.mk I) f})) (C ((Ideal.Quotient.mk I) x)) =
    (algebraMap R ((R ⧸ I)[X] ⧸ span {Polynomial.map (Ideal.Quotient.mk I) f})) x
state_after: no goals
tactic: rfl
Theorem: Matrix.zpow_sub
File: Mathlib/LinearAlgebra/Matrix/ZPow.lean

Proof steps:
state_before: n' : Type u_1
inst✝² : DecidableEq n'
inst✝¹ : Fintype n'
R : Type u_2
inst✝ : CommRing R
A : M
ha : IsUnit A.det
z1 z2 : ℤ
⊢ A ^ (z1 - z2) = A ^ z1 / A ^ z2
state_after: no goals
tactic: rw [sub_eq_add_neg, zpow_add ha, zpow_neg ha, div_eq_mul_inv]
Theorem: SimpleGraph.ComponentCompl.disjoint_right
File: Mathlib/Combinatorics/SimpleGraph/Ends/Defs.lean

Proof steps:
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
⊢ Disjoint K ↑C
state_after: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
⊢ K ∩ ↑C ⊆ ∅
tactic: rw [Set.disjoint_iff]
state_before: V : Type u
G : SimpleGraph V
K L L' M : Set V
C : G.ComponentCompl K
⊢ K ∩ ↑C ⊆ ∅
state_after: no goals
tactic: exact fun v ⟨vK, vC⟩ => vC.choose vK
Theorem: CategoryTheory.Limits.coprod.rightUnitor_hom
File: Mathlib/CategoryTheory/Limits/Shapes/BinaryProducts.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ desc (𝟙 P) (initial.to P) ≫ inl = 𝟙 (P ⨿ ⊥_ C)
state_after: no goals
tactic: apply coprod.hom_ext <;> simp [eq_iff_true_of_subsingleton]
state_before: C : Type u
inst✝³ : Category.{v, u} C
X Y : C
inst✝² : Category.{v, u} C
inst✝¹ : HasBinaryCoproducts C
inst✝ : HasInitial C
P : C
⊢ inl ≫ desc (𝟙 P) (initial.to P) = 𝟙 P
state_after: no goals
tactic: simp
Theorem: eq_of_zero_sub_eq_zero_sub
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : DivisionMonoid α
a b c d : α
h : 1 / a = 1 / b
⊢ a = b
state_after: no goals
tactic: rw [← one_div_one_div a, h, one_div_one_div]
Theorem: EulerSine.integral_cos_mul_cos_pow
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/EulerSineProd.lean

Proof steps:
state_before: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
state_after: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
tactic: have nne : (n : ℂ) ≠ 0 := by
    contrapose! hn; rw [Nat.cast_eq_zero] at hn; rw [hn]; exact zero_lt_two
state_before: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
state_after: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
this :
  ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    ↑n / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.sin (2 * z * ↑x) * ↑(sin x) * ↑(cos x) ^ (n - 1)
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
tactic: have := integral_cos_mul_cos_pow_aux hn hz
state_before: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
this :
  ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    ↑n / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.sin (2 * z * ↑x) * ↑(sin x) * ↑(cos x) ^ (n - 1)
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
state_after: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
this :
  (∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n) -
      ↑n / (2 * z) * (↑n / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n) =
    ↑n / (2 * z) * -((↑n - 1) / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2))
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
tactic: rw [integral_sin_mul_sin_mul_cos_pow_eq hn hz, sub_eq_neg_add, mul_add, ← sub_eq_iff_eq_add]
    at this
state_before: z : ℂ
n : ℕ
hn : 2 ≤ n
hz : z ≠ 0
nne : ↑n ≠ 0
this :
  (∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n) -
      ↑n / (2 * z) * (↑n / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n) =
    ↑n / (2 * z) * -((↑n - 1) / (2 * z) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2))
⊢ (1 - 4 * z ^ 2 / ↑n ^ 2) * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ n =
    (↑n - 1) / ↑n * ∫ (x : ℝ) in 0 ..π / 2, Complex.cos (2 * z * ↑x) * ↑(cos x) ^ (n - 2)
state_after: no goals
tactic: convert congr_arg (fun u : ℂ => -u * (2 * z) ^ 2 / n ^ 2) this using 1 <;> field_simp <;> ring
Theorem: Ring.smeval_ascPochhammer_int_ofNat
File: Mathlib/RingTheory/Binomial.lean

Proof steps:
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
⊢ (ascPochhammer ℤ 0).smeval r = (ascPochhammer ℕ 0).smeval r
state_after: no goals
tactic: simp only [ascPochhammer_zero, smeval_one]
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
n : ℕ
⊢ (ascPochhammer ℤ (n + 1)).smeval r = (ascPochhammer ℕ (n + 1)).smeval r
state_after: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
n : ℕ
⊢ (ascPochhammer ℤ n).smeval r * (X + ↑n).smeval r = (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r
tactic: simp only [ascPochhammer_succ_right, smeval_mul]
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
n : ℕ
⊢ (ascPochhammer ℤ n).smeval r * (X + ↑n).smeval r = (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r
state_after: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
n : ℕ
⊢ (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r = (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r
tactic: rw [smeval_ascPochhammer_int_ofNat r n]
state_before: R : Type u_1
inst✝³ : NonAssocRing R
inst✝² : Pow R ℕ
inst✝¹ : BinomialRing R
inst✝ : NatPowAssoc R
r : R
n : ℕ
⊢ (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r = (ascPochhammer ℕ n).smeval r * (X + ↑n).smeval r
state_after: no goals
tactic: simp only [smeval_add, smeval_X, ← C_eq_natCast, smeval_C, natCast_zsmul, nsmul_eq_mul,
      Nat.cast_id]
Theorem: Real.le_toNNReal_iff_coe_le
File: Mathlib/Data/NNReal/Basic.lean

Proof steps:
state_before: r : ℝ≥0
p : ℝ
hp : 0 ≤ p
⊢ r ≤ p.toNNReal ↔ ↑r ≤ p
state_after: no goals
tactic: rw [← NNReal.coe_le_coe, Real.coe_toNNReal p hp]
Theorem: Matrix.StdBasisMatrix.diag_same
File: Mathlib/Data/Matrix/Basis.lean

Proof steps:
state_before: l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i j : n
c : α
i' j' : n
⊢ (stdBasisMatrix i i c).diag = Pi.single i c
state_after: case h
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i j✝ : n
c : α
i' j' j : n
⊢ (stdBasisMatrix i i c).diag j = Pi.single i c j
tactic: ext j
state_before: case h
l : Type u_1
m : Type u_2
n : Type u_3
R : Type u_4
α : Type u_5
inst✝³ : DecidableEq l
inst✝² : DecidableEq m
inst✝¹ : DecidableEq n
inst✝ : Semiring α
i j✝ : n
c : α
i' j' j : n
⊢ (stdBasisMatrix i i c).diag j = Pi.single i c j
state_after: no goals
tactic: by_cases hij : i = j <;> (try rw [hij]) <;> simp [hij]
Theorem: List.lookup_ext
File: Mathlib/Data/List/Sigma.lean

Proof steps:
state_before: α : Type u
β : α → Type v
l l₁✝ l₂ : List (Sigma β)
inst✝ : DecidableEq α
l₀ l₁ : List (Sigma β)
nd₀ : l₀.NodupKeys
nd₁ : l₁.NodupKeys
h : ∀ (x : α) (y : β x), y ∈ dlookup x l₀ ↔ y ∈ dlookup x l₁
x✝ : Sigma β
a : α
b : β a
⊢ ⟨a, b⟩ ∈ l₀ ↔ ⟨a, b⟩ ∈ l₁
state_after: no goals
tactic: rw [← mem_dlookup_iff, ← mem_dlookup_iff, h] <;> assumption
Theorem: levenshtein_nil_nil
File: Mathlib/Data/List/EditDistance/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
δ : Type u_3
inst✝¹ : AddZeroClass δ
inst✝ : Min δ
C : Cost α β δ
⊢ levenshtein C [] [] = 0
state_after: no goals
tactic: simp [levenshtein, suffixLevenshtein]