ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Behrend.card_sphere_le_rothNumberNat
File: Mathlib/Combinatorics/Additive/AP/Three/Behrend.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
n✝ d✝ k✝ N : ℕ
x : Fin n✝ → ℕ
n d k : ℕ
⊢ (sphere n d k).card ≤ rothNumberNat ((2 * d - 1) ^ n)
state_after: case zero
α : Type u_1
β : Type u_2
n d✝ k✝ N : ℕ
x : Fin n → ℕ
d k : ℕ
⊢ (sphere 0 d k).card ≤ rothNumberNat ((2 * d - 1) ^ 0)

case succ
α : Type u_1
β : Type u_2
n d✝ k✝ N : ℕ
x : Fin n → ℕ
d k n✝ : ℕ
⊢ (sphere (n✝ + 1) d k).card ≤ rothNumberNat ((2 * d - 1) ^ (n✝ + 1))
tactic: cases n
state_before: case succ
α : Type u_1
β : Type u_2
n d✝ k✝ N : ℕ
x : Fin n → ℕ
d k n✝ : ℕ
⊢ (sphere (n✝ + 1) d k).card ≤ rothNumberNat ((2 * d - 1) ^ (n✝ + 1))
state_after: case succ.zero
α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝ : ℕ
⊢ (sphere (n✝ + 1) 0 k).card ≤ rothNumberNat ((2 * 0 - 1) ^ (n✝ + 1))

case succ.succ
α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ (sphere (n✝¹ + 1) (n✝ + 1) k).card ≤ rothNumberNat ((2 * (n✝ + 1) - 1) ^ (n✝¹ + 1))
tactic: cases d
state_before: case succ.succ
α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ (sphere (n✝¹ + 1) (n✝ + 1) k).card ≤ rothNumberNat ((2 * (n✝ + 1) - 1) ^ (n✝¹ + 1))
state_after: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ Fin (n✝¹ + 1) → ℕ

α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ ∀ x ∈ image (⇑(map (2 * (n✝ + 1) - 1))) (sphere (n✝¹ + 1) (n✝ + 1) k), x < (2 * (n✝ + 1) - 1) ^ (n✝¹ + 1)

α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ Set.InjOn ⇑(map (2 * (n✝ + 1) - 1)) ↑(sphere (n✝¹ + 1) (n✝ + 1) k)
tactic: apply threeAPFree_image_sphere.le_rothNumberNat _ _ (card_image_of_injOn _)
state_before: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ Set.InjOn ⇑(map (2 * (n✝ + 1) - 1)) ↑(sphere (n✝¹ + 1) (n✝ + 1) k)
state_after: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x : Fin n → ℕ
k n✝¹ n✝ : ℕ
⊢ Fin (n✝¹ + 1) → ℕ

α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x✝ : Fin n → ℕ
k n✝¹ n✝ : ℕ
x : Fin (n✝¹ + 1) → ℕ
⊢ x ∈ ↑(sphere (n✝¹ + 1) (n✝ + 1) k) → x ∈ {x | ∀ (i : Fin (n✝¹ + 1)), x i < 2 * (n✝ + 1) - 1}
tactic: apply map_injOn.mono fun x => ?_
state_before: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x✝ : Fin n → ℕ
k n✝¹ n✝ : ℕ
x : Fin (n✝¹ + 1) → ℕ
⊢ x ∈ ↑(sphere (n✝¹ + 1) (n✝ + 1) k) → x ∈ {x | ∀ (i : Fin (n✝¹ + 1)), x i < 2 * (n✝ + 1) - 1}
state_after: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x✝ : Fin n → ℕ
k n✝¹ n✝ : ℕ
x : Fin (n✝¹ + 1) → ℕ
⊢ (∀ (i : Fin (n✝¹ + 1)), x i < n✝ + 1) →
    ∑ i : Fin (n✝¹ + 1), x i ^ 2 = k → x ∈ {x | ∀ (i : Fin (n✝¹ + 1)), x i < n✝ + 1 + (n✝ + 1) - 1}
tactic: simp only [mem_coe, sphere, mem_filter, mem_box, and_imp, two_mul]
state_before: α : Type u_1
β : Type u_2
n d k✝ N : ℕ
x✝ : Fin n → ℕ
k n✝¹ n✝ : ℕ
x : Fin (n✝¹ + 1) → ℕ
⊢ (∀ (i : Fin (n✝¹ + 1)), x i < n✝ + 1) →
    ∑ i : Fin (n✝¹ + 1), x i ^ 2 = k → x ∈ {x | ∀ (i : Fin (n✝¹ + 1)), x i < n✝ + 1 + (n✝ + 1) - 1}
state_after: no goals
tactic: exact fun h _ i => (h i).trans_le le_self_add
Theorem: WeierstrassCurve.Jacobian.map_polynomialX
File: Mathlib/AlgebraicGeometry/EllipticCurve/Jacobian.lean

Proof steps:
state_before: R : Type u
inst✝² : CommRing R
W' : Jacobian R
F : Type v
inst✝¹ : Field F
W : Jacobian F
S : Type u_1
inst✝ : CommRing S
f : R →+* S
P Q : Fin 3 → R
⊢ (map W' f).toJacobian.polynomialX = (MvPolynomial.map f) W'.polynomialX
state_after: no goals
tactic: simp [polynomialX, map_polynomial, pderiv_map]
Theorem: Ideal.IsRadical.inf
File: Mathlib/RingTheory/Ideal/Operations.lean

Proof steps:
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
hI : I.IsRadical
hJ : J.IsRadical
⊢ (I ⊓ J).IsRadical
state_after: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
hI : I.IsRadical
hJ : J.IsRadical
⊢ I.radical ⊓ J.radical ≤ I ⊓ J
tactic: rw [IsRadical, radical_inf]
state_before: R : Type u
ι : Type u_1
inst✝ : CommSemiring R
I J K L : Ideal R
hI : I.IsRadical
hJ : J.IsRadical
⊢ I.radical ⊓ J.radical ≤ I ⊓ J
state_after: no goals
tactic: exact inf_le_inf hI hJ
Theorem: Multiset.card_sub
File: Mathlib/Data/Multiset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type v
γ : Type u_2
inst✝ : DecidableEq α
s✝ t✝ u : Multiset α
a b : α
s t : Multiset α
h : t ≤ s
⊢ card (s - t) + card t = card s
state_after: no goals
tactic: rw [← card_add, tsub_add_cancel_of_le h]
Theorem: isIntegral_algEquiv
File: Mathlib/RingTheory/IntegralClosure/IsIntegralClosure/Basic.lean

Proof steps:
state_before: R : Type u_1
A✝ : Type u_2
B✝ : Type u_3
S : Type u_4
inst✝⁹ : CommRing R
inst✝⁸ : CommRing A✝
inst✝⁷ : Ring B✝
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R A✝
inst✝⁴ : Algebra R B✝
f✝ : R →+* S
A : Type u_5
B : Type u_6
inst✝³ : Ring A
inst✝² : Ring B
inst✝¹ : Algebra R A
inst✝ : Algebra R B
f : A ≃ₐ[R] B
x : A
h : IsIntegral R (f x)
⊢ IsIntegral R x
state_after: no goals
tactic: simpa using h.map f.symm
Theorem: inv_mul_lt_iff_lt_mul
File: Mathlib/Algebra/Order/Group/Unbundled/Basic.lean

Proof steps:
state_before: α : Type u
inst✝² : Group α
inst✝¹ : LT α
inst✝ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b c : α
⊢ b⁻¹ * a < c ↔ a < b * c
state_after: no goals
tactic: rw [← mul_lt_mul_iff_left b, mul_inv_cancel_left]
Theorem: MvPFunctor.wPathCasesOn_eta
File: Mathlib/Data/PFunctor/Multivariate/W.lean

Proof steps:
state_before: n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u_1} n
a : P.A
f : P.last.B a → P.last.W
h : P.WPath (WType.mk a f) ⟹ α
⊢ P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) = h
state_after: case a.h
n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u_1} n
a : P.A
f : P.last.B a → P.last.W
h : P.WPath (WType.mk a f) ⟹ α
i : Fin2 n
x : P.WPath (WType.mk a f) i
⊢ P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i x = h i x
tactic: ext i x
state_before: case a.h
n : ℕ
P : MvPFunctor.{u} (n + 1)
α : TypeVec.{u_1} n
a : P.A
f : P.last.B a → P.last.W
h : P.WPath (WType.mk a f) ⟹ α
i : Fin2 n
x : P.WPath (WType.mk a f) i
⊢ P.wPathCasesOn (P.wPathDestLeft h) (P.wPathDestRight h) i x = h i x
state_after: no goals
tactic: cases x <;> rfl
Theorem: CategoryTheory.ShortComplex.opcyclesMapIso'_hom
File: Mathlib/Algebra/Homology/ShortComplex/RightHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.116671, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
e : S₁ ≅ S₂
h₁ : S₁.RightHomologyData
h₂ : S₂.RightHomologyData
⊢ opcyclesMap' e.hom h₁ h₂ ≫ opcyclesMap' e.inv h₂ h₁ = 𝟙 h₁.Q
state_after: no goals
tactic: rw [← opcyclesMap'_comp, e.hom_inv_id, opcyclesMap'_id]
state_before: C : Type u_1
inst✝¹ : Category.{?u.116671, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
e : S₁ ≅ S₂
h₁ : S₁.RightHomologyData
h₂ : S₂.RightHomologyData
⊢ opcyclesMap' e.inv h₂ h₁ ≫ opcyclesMap' e.hom h₁ h₂ = 𝟙 h₂.Q
state_after: no goals
tactic: rw [← opcyclesMap'_comp, e.inv_hom_id, opcyclesMap'_id]
Theorem: Real.inv_logb_mul_base
File: Mathlib/Analysis/SpecialFunctions/Log/Base.lean

Proof steps:
state_before: b✝ x y a b : ℝ
h₁ : a ≠ 0
h₂ : b ≠ 0
c : ℝ
⊢ (logb (a * b) c)⁻¹ = (logb a c)⁻¹ + (logb b c)⁻¹
state_after: b✝ x y a b : ℝ
h₁ : a ≠ 0
h₂ : b ≠ 0
c : ℝ
⊢ logb c (a * b) = logb c a + logb c b
tactic: simp_rw [inv_logb]
state_before: b✝ x y a b : ℝ
h₁ : a ≠ 0
h₂ : b ≠ 0
c : ℝ
⊢ logb c (a * b) = logb c a + logb c b
state_after: no goals
tactic: exact logb_mul h₁ h₂
Theorem: MeasureTheory.measure_eq_div_smul
File: Mathlib/MeasureTheory/Group/Prod.lean

Proof steps:
state_before: G : Type u_1
inst✝¹⁰ : MeasurableSpace G
inst✝⁹ : Group G
inst✝⁸ : MeasurableMul₂ G
μ ν : Measure G
inst✝⁷ : SFinite ν
inst✝⁶ : SFinite μ
s : Set G
inst✝⁵ : MeasurableInv G
inst✝⁴ : μ.IsMulLeftInvariant
μ' ν' : Measure G
inst✝³ : SigmaFinite μ'
inst✝² : SigmaFinite ν'
inst✝¹ : μ'.IsMulLeftInvariant
inst✝ : ν'.IsMulLeftInvariant
h2s : ν' s ≠ 0
h3s : ν' s ≠ ⊤
⊢ μ' = (μ' s / ν' s) • ν'
state_after: case h
G : Type u_1
inst✝¹⁰ : MeasurableSpace G
inst✝⁹ : Group G
inst✝⁸ : MeasurableMul₂ G
μ ν : Measure G
inst✝⁷ : SFinite ν
inst✝⁶ : SFinite μ
s : Set G
inst✝⁵ : MeasurableInv G
inst✝⁴ : μ.IsMulLeftInvariant
μ' ν' : Measure G
inst✝³ : SigmaFinite μ'
inst✝² : SigmaFinite ν'
inst✝¹ : μ'.IsMulLeftInvariant
inst✝ : ν'.IsMulLeftInvariant
h2s : ν' s ≠ 0
h3s : ν' s ≠ ⊤
t : Set G
⊢ μ' t = ((μ' s / ν' s) • ν') t
tactic: ext1 t -
state_before: case h
G : Type u_1
inst✝¹⁰ : MeasurableSpace G
inst✝⁹ : Group G
inst✝⁸ : MeasurableMul₂ G
μ ν : Measure G
inst✝⁷ : SFinite ν
inst✝⁶ : SFinite μ
s : Set G
inst✝⁵ : MeasurableInv G
inst✝⁴ : μ.IsMulLeftInvariant
μ' ν' : Measure G
inst✝³ : SigmaFinite μ'
inst✝² : SigmaFinite ν'
inst✝¹ : μ'.IsMulLeftInvariant
inst✝ : ν'.IsMulLeftInvariant
h2s : ν' s ≠ 0
h3s : ν' s ≠ ⊤
t : Set G
⊢ μ' t = ((μ' s / ν' s) • ν') t
state_after: no goals
tactic: rw [smul_apply, smul_eq_mul, mul_comm, ← mul_div_assoc, mul_comm,
    measure_mul_measure_eq μ' ν' s t h2s h3s, mul_div_assoc, ENNReal.mul_div_cancel' h2s h3s]
Theorem: MeasureTheory.setLIntegral_const_lt_top
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
s : Set α
c : ℝ≥0∞
hc : c ≠ ⊤
⊢ ∫⁻ (x : α) in s, c ∂μ < ⊤
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
s : Set α
c : ℝ≥0∞
hc : c ≠ ⊤
⊢ c * (μ.restrict s) univ < ⊤
tactic: rw [lintegral_const]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝ : IsFiniteMeasure μ
s : Set α
c : ℝ≥0∞
hc : c ≠ ⊤
⊢ c * (μ.restrict s) univ < ⊤
state_after: no goals
tactic: exact ENNReal.mul_lt_top hc (measure_ne_top (μ.restrict s) univ)
Theorem: Nat.le_mod_add_mod_of_dvd_add_of_not_dvd
File: Mathlib/Data/Nat/ModEq.lean

Proof steps:
state_before: m n a✝ b✝ c✝ d a b c : ℕ
h : c ∣ a + b
ha : ¬c ∣ a
hc : ¬c ≤ a % c + b % c
⊢ False
state_after: m n a✝ b✝ c✝ d a b c : ℕ
h : c ∣ a + b
ha : ¬c ∣ a
hc : ¬c ≤ a % c + b % c
this : (a + b) % c = a % c + b % c
⊢ False
tactic: have : (a + b) % c = a % c + b % c := add_mod_of_add_mod_lt (lt_of_not_ge hc)
state_before: m n a✝ b✝ c✝ d a b c : ℕ
h : c ∣ a + b
ha : ¬c ∣ a
hc : ¬c ≤ a % c + b % c
this : (a + b) % c = a % c + b % c
⊢ False
state_after: no goals
tactic: simp_all [dvd_iff_mod_eq_zero]
Theorem: SemiconjBy.pow_right
File: Mathlib/Algebra/Group/Semiconj/Defs.lean

Proof steps:
state_before: S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Monoid M
a x y : M
h : SemiconjBy a x y
n : ℕ
⊢ SemiconjBy a (x ^ n) (y ^ n)
state_after: case zero
S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Monoid M
a x y : M
h : SemiconjBy a x y
⊢ SemiconjBy a (x ^ 0) (y ^ 0)

case succ
S : Type u_1
M : Type u_2
G : Type u_3
inst✝ : Monoid M
a x y : M
h : SemiconjBy a x y
n : ℕ
ih : SemiconjBy a (x ^ n) (y ^ n)
⊢ SemiconjBy a (x ^ (n + 1)) (y ^ (n + 1))
tactic: induction' n with n ih
Theorem: Fin.cons_mem_piFinset_cons
File: Mathlib/Data/Fin/Tuple/Finset.lean

Proof steps:
state_before: n : ℕ
α : Fin (n + 1) → Type u_1
x₀ : α 0
x : (i : Fin n) → α i.succ
s₀ : Finset (α 0)
s : (i : Fin n) → Finset (α i.succ)
⊢ cons x₀ x ∈ piFinset (cons s₀ s) ↔ x₀ ∈ s₀ ∧ x ∈ piFinset s
state_after: no goals
tactic: simp_rw [mem_piFinset_succ, cons_zero, tail_cons]
Theorem: Matrix.Pivot.listTransvecCol_mul_last_row
File: Mathlib/LinearAlgebra/Matrix/Transvection.lean

Proof steps:
state_before: n : Type u_1
p : Type u_2
R : Type u₂
𝕜 : Type u_3
inst✝³ : Field 𝕜
inst✝² : DecidableEq n
inst✝¹ : DecidableEq p
inst✝ : CommRing R
r : ℕ
M : Matrix (Fin r ⊕ Unit) (Fin r ⊕ Unit) 𝕜
i : Fin r ⊕ Unit
⊢ ((listTransvecCol M).prod * M) (inr ()) i = M (inr ()) i
state_after: no goals
tactic: simpa using listTransvecCol_mul_last_row_drop M i (zero_le _)
Theorem: AdicCompletion.map_surjective
File: Mathlib/RingTheory/AdicCompletion/Exactness.lean

Proof steps:
state_before: R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
⊢ ∃ a, (map I f) a = y
state_after: R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
⊢ ∃ a, (map I f) a = (mk I N) b
tactic: apply AdicCompletion.induction_on I N y (fun b ↦ ?_)
state_before: R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
⊢ ∃ a, (map I f) a = (mk I N) b
state_after: R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
a : (n : ℕ) → ↑(⇑f ⁻¹' {↑b n}) := AdicCompletion.mapPreimage hf b
⊢ ∃ a, (map I f) a = (mk I N) b
tactic: let a := mapPreimage hf b
state_before: R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
a : (n : ℕ) → ↑(⇑f ⁻¹' {↑b n}) := AdicCompletion.mapPreimage hf b
⊢ ∃ a, (map I f) a = (mk I N) b
state_after: case refine_1
R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
a : (n : ℕ) → ↑(⇑f ⁻¹' {↑b n}) := AdicCompletion.mapPreimage hf b
⊢ ∀ (n : ℕ), (fun n => ↑(a n)) n ≡ (fun n => ↑(a n)) (n + 1) [SMOD I ^ n • ⊤]

case refine_2
R : Type u
inst✝⁴ : CommRing R
I : Ideal R
M : Type v
inst✝³ : AddCommGroup M
inst✝² : Module R M
N : Type w
inst✝¹ : AddCommGroup N
inst✝ : Module R N
f : M →ₗ[R] N
hf : Function.Surjective ⇑f
y : AdicCompletion I N
b : AdicCauchySequence I N
a : (n : ℕ) → ↑(⇑f ⁻¹' {↑b n}) := AdicCompletion.mapPreimage hf b
⊢ (map I f) ((mk I M) (AdicCauchySequence.mk I M (fun n => ↑(a n)) ?refine_1)) = (mk I N) b
tactic: refine ⟨AdicCompletion.mk I M (AdicCauchySequence.mk I M (fun n ↦ (a n : M)) ?_), ?_⟩
Theorem: Polynomial.eraseLead_add_of_natDegree_lt_left
File: Mathlib/Algebra/Polynomial/EraseLead.lean

Proof steps:
state_before: R : Type u_1
inst✝ : Semiring R
f p q : R[X]
pq : q.natDegree < p.natDegree
⊢ (p + q).eraseLead = p.eraseLead + q
state_after: case a
R : Type u_1
inst✝ : Semiring R
f p q : R[X]
pq : q.natDegree < p.natDegree
n : ℕ
⊢ (p + q).eraseLead.coeff n = (p.eraseLead + q).coeff n
tactic: ext n
state_before: case a
R : Type u_1
inst✝ : Semiring R
f p q : R[X]
pq : q.natDegree < p.natDegree
n : ℕ
⊢ (p + q).eraseLead.coeff n = (p.eraseLead + q).coeff n
state_after: case pos
R : Type u_1
inst✝ : Semiring R
f p q : R[X]
pq : q.natDegree < p.natDegree
n : ℕ
nd : n = p.natDegree
⊢ (p + q).eraseLead.coeff n = (p.eraseLead + q).coeff n

case neg
R : Type u_1
inst✝ : Semiring R
f p q : R[X]
pq : q.natDegree < p.natDegree
n : ℕ
nd : ¬n = p.natDegree
⊢ (p + q).eraseLead.coeff n = (p.eraseLead + q).coeff n
tactic: by_cases nd : n = p.natDegree
Theorem: DFinsupp.mk_sub
File: Mathlib/Data/DFinsupp/Basic.lean

Proof steps:
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → AddGroup (β i)
s : Finset ι
x y : (i : ↑↑s) → β ↑i
i : ι
⊢ (mk s (x - y)) i = (mk s x - mk s y) i
state_after: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → AddGroup (β i)
s : Finset ι
x y : (i : ↑↑s) → β ↑i
i : ι
⊢ (if H : i ∈ s then (x - y) ⟨i, H⟩ else 0) = (if H : i ∈ s then x ⟨i, H⟩ else 0) - if H : i ∈ s then y ⟨i, H⟩ else 0
tactic: simp only [sub_apply, mk_apply]
state_before: ι : Type u
γ : Type w
β : ι → Type v
β₁ : ι → Type v₁
β₂ : ι → Type v₂
inst✝¹ : DecidableEq ι
inst✝ : (i : ι) → AddGroup (β i)
s : Finset ι
x y : (i : ↑↑s) → β ↑i
i : ι
⊢ (if H : i ∈ s then (x - y) ⟨i, H⟩ else 0) = (if H : i ∈ s then x ⟨i, H⟩ else 0) - if H : i ∈ s then y ⟨i, H⟩ else 0
state_after: no goals
tactic: split_ifs <;> [rfl; rw [sub_zero]]
Theorem: CategoryTheory.Groupoid.Free.congr_comp_reverse
File: Mathlib/CategoryTheory/Groupoid/FreeGroupoid.lean

Proof steps:
state_before: V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
p : X ⟶ Y
⊢ Quot.mk (Quotient.CompClosure redStep) (p ≫ Quiver.Path.reverse p) = Quot.mk (Quotient.CompClosure redStep) (𝟙 X)
state_after: case H
V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
p : X ⟶ Y
⊢ EqvGen (Quotient.CompClosure redStep) (p ≫ Quiver.Path.reverse p) (𝟙 X)
tactic: apply Quot.EqvGen_sound
state_before: case H
V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
p : X ⟶ Y
⊢ EqvGen (Quotient.CompClosure redStep) (p ≫ Quiver.Path.reverse p) (𝟙 X)
state_after: case H.nil
V : Type u
inst✝ : Quiver V
X Y : Paths (Quiver.Symmetrify V)
⊢ EqvGen (Quotient.CompClosure redStep) (Quiver.Path.nil ≫ Quiver.Path.nil.reverse) (𝟙 X)

case H.cons
V : Type u
inst✝ : Quiver V
X Y a b : Paths (Quiver.Symmetrify V)
q : Quiver.Path X a
f : a ⟶ b
ih : EqvGen (Quotient.CompClosure redStep) (q ≫ q.reverse) (𝟙 X)
⊢ EqvGen (Quotient.CompClosure redStep) (q.cons f ≫ (q.cons f).reverse) (𝟙 X)
tactic: induction' p with a b q f ih
Theorem: normEDS_three
File: Mathlib/NumberTheory/EllipticDivisibilitySequence.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝¹ : CommRing R
inst✝ : CommRing S
W : ℤ → R
f : R →+* S
b c d : R
⊢ normEDS b c d 3 = c
state_after: no goals
tactic: erw [normEDS_ofNat, preNormEDS'_three, if_neg <| by decide, mul_one]
Theorem: MvPowerSeries.coeff_monomial_same
File: Mathlib/RingTheory/MvPowerSeries/Basic.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
inst✝ : Semiring R
n : σ →₀ ℕ
a : R
⊢ (coeff R n) ((monomial R n) a) = a
state_after: no goals
tactic: classical
  rw [monomial_def]
  exact LinearMap.stdBasis_same R (fun _ ↦ R) n a
Theorem: WithLp.nndist_equiv_symm_snd
File: Mathlib/Analysis/Normed/Lp/ProdLp.lean

Proof steps:
state_before: p : ℝ≥0∞
𝕜 : Type u_1
α : Type u_2
β : Type u_3
hp : Fact (1 ≤ p)
inst✝¹ : SeminormedAddCommGroup α
inst✝ : SeminormedAddCommGroup β
y₁ y₂ : β
⊢ nndist ((WithLp.equiv p (α × β)).symm (0, y₁)) ((WithLp.equiv p (α × β)).symm (0, y₂)) = nndist y₁ y₂
state_after: no goals
tactic: rw [nndist_eq_nnnorm, nndist_eq_nnnorm, ← WithLp.equiv_symm_sub, Prod.mk_sub_mk, sub_zero,
    nnnorm_equiv_symm_snd]
Theorem: Multiset.sup_union
File: Mathlib/Data/Multiset/Lattice.lean

Proof steps:
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ (s₁ ∪ s₂).sup = s₁.sup ⊔ s₂.sup
state_after: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ ∀ (a : α), a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ + s₂
tactic: rw [← sup_dedup, dedup_ext.2, sup_dedup, sup_add]
state_before: α : Type u_1
inst✝² : SemilatticeSup α
inst✝¹ : OrderBot α
inst✝ : DecidableEq α
s₁ s₂ : Multiset α
⊢ ∀ (a : α), a ∈ s₁ ∪ s₂ ↔ a ∈ s₁ + s₂
state_after: no goals
tactic: simp
Theorem: IsSl2Triple.HasPrimitiveVectorWith.lie_f_pow_toEnd_f
File: Mathlib/Algebra/Lie/Sl2.lean

Proof steps:
state_before: R : Type u_1
L : Type u_2
M : Type u_3
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
h e f : L
m : M
μ : R
t : IsSl2Triple h e f
P✝ P : t.HasPrimitiveVectorWith m μ
n : ℕ
⊢ ⁅f, ((toEnd R L M) f ^ n) m⁆ = ((toEnd R L M) f ^ (n + 1)) m
state_after: no goals
tactic: simp [pow_succ']
Theorem: ultrafilterBasis_is_basis
File: Mathlib/Topology/StoneCech.lean

Proof steps:
state_before: α : Type u
⊢ ∀ t₁ ∈ ultrafilterBasis α, ∀ t₂ ∈ ultrafilterBasis α, ∀ x ∈ t₁ ∩ t₂, ∃ t₃ ∈ ultrafilterBasis α, x ∈ t₃ ∧ t₃ ⊆ t₁ ∩ t₂
state_after: case intro.intro.intro
α : Type u
a b : Set α
u : Ultrafilter α
ua : u ∈ (fun s => {u | s ∈ u}) a
ub : u ∈ (fun s => {u | s ∈ u}) b
⊢ ∃ t₃ ∈ ultrafilterBasis α, u ∈ t₃ ∧ t₃ ⊆ (fun s => {u | s ∈ u}) a ∩ (fun s => {u | s ∈ u}) b
tactic: rintro _ ⟨a, rfl⟩ _ ⟨b, rfl⟩ u ⟨ua, ub⟩
state_before: case intro.intro.intro
α : Type u
a b : Set α
u : Ultrafilter α
ua : u ∈ (fun s => {u | s ∈ u}) a
ub : u ∈ (fun s => {u | s ∈ u}) b
⊢ ∃ t₃ ∈ ultrafilterBasis α, u ∈ t₃ ∧ t₃ ⊆ (fun s => {u | s ∈ u}) a ∩ (fun s => {u | s ∈ u}) b
state_after: no goals
tactic: refine ⟨_, ⟨a ∩ b, rfl⟩, inter_mem ua ub, fun v hv ↦ ⟨?_, ?_⟩⟩ <;> apply mem_of_superset hv <;>
      simp [inter_subset_right]
Theorem: jacobiSym.list_prod_right
File: Mathlib/NumberTheory/LegendreSymbol/JacobiSymbol.lean

Proof steps:
state_before: a : ℤ
l : List ℕ
hl : ∀ n ∈ l, n ≠ 0
⊢ J(a | l.prod) = (List.map (fun n => J(a | n)) l).prod
state_after: case nil
a : ℤ
hl : ∀ n ∈ [], n ≠ 0
⊢ J(a | [].prod) = (List.map (fun n => J(a | n)) []).prod

case cons
a : ℤ
n : ℕ
l' : List ℕ
ih : (∀ n ∈ l', n ≠ 0) → J(a | l'.prod) = (List.map (fun n => J(a | n)) l').prod
hl : ∀ n_1 ∈ n :: l', n_1 ≠ 0
⊢ J(a | (n :: l').prod) = (List.map (fun n => J(a | n)) (n :: l')).prod
tactic: induction' l with n l' ih
Theorem: Filter.EventuallyLE.mul_nonneg
File: Mathlib/Order/Filter/Ring.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝ : OrderedSemiring β
l : Filter α
f g : α → β
hf : 0 ≤ᶠ[l] f
hg : 0 ≤ᶠ[l] g
⊢ 0 ≤ᶠ[l] f * g
state_after: no goals
tactic: filter_upwards [hf, hg] with x using _root_.mul_nonneg
Theorem: Function.update_apply
File: Mathlib/Logic/Function/Basic.lean

Proof steps:
state_before: α : Sort u
β✝ : α → Sort v
α' : Sort w
inst✝¹ : DecidableEq α
inst✝ : DecidableEq α'
f✝ g : (a : α) → β✝ a
a✝ : α
b✝ : β✝ a✝
β : Sort u_1
f : α → β
a' : α
b : β
a : α
⊢ update f a' b a = if a = a' then b else f a
state_after: no goals
tactic: rcases Decidable.eq_or_ne a a' with rfl | hne <;> simp [*]
Theorem: AlgebraicGeometry.IsAffineOpen.isQuasiSeparated
File: Mathlib/AlgebraicGeometry/Morphisms/QuasiSeparated.lean

Proof steps:
state_before: X✝ Y : Scheme
f : X✝ ⟶ Y
X : Scheme
U : X.Opens
hU : IsAffineOpen U
⊢ IsQuasiSeparated ↑U
state_after: X✝ Y : Scheme
f : X✝ ⟶ Y
X : Scheme
U : X.Opens
hU : IsAffineOpen U
⊢ QuasiSeparatedSpace ↑↑U

case hs
X✝ Y : Scheme
f : X✝ ⟶ Y
X : Scheme
U : X.Opens
hU : IsAffineOpen U
⊢ IsOpen ↑U
tactic: rw [isQuasiSeparated_iff_quasiSeparatedSpace]
state_before: X✝ Y : Scheme
f : X✝ ⟶ Y
X : Scheme
U : X.Opens
hU : IsAffineOpen U
⊢ QuasiSeparatedSpace ↑↑U

case hs
X✝ Y : Scheme
f : X✝ ⟶ Y
X : Scheme
U : X.Opens
hU : IsAffineOpen U
⊢ IsOpen ↑U
state_after: no goals
tactic: exacts [@AlgebraicGeometry.quasiSeparatedSpace_of_isAffine _ hU, U.isOpen]
Theorem: Polynomial.eval_intCast_map
File: Mathlib/Algebra/Polynomial/Eval.lean

Proof steps:
state_before: R✝ : Type u
S✝ : Type v
T : Type w
ι : Type y
a b : R✝
m n : ℕ
inst✝³ : Semiring R✝
p✝ q r : R✝[X]
inst✝² : Semiring S✝
f✝ : R✝ →+* S✝
R : Type u_1
S : Type u_2
inst✝¹ : Ring R
inst✝ : Ring S
f : R →+* S
p : R[X]
i : ℤ
⊢ eval (↑i) (map f p) = f (eval (↑i) p)
state_after: no goals
tactic: induction p using Polynomial.induction_on' with
  | h_add p q hp hq =>
    simp only [hp, hq, Polynomial.map_add, RingHom.map_add, eval_add]
  | h_monomial n r =>
    simp only [map_intCast, eval_monomial, map_monomial, map_pow, map_mul]