ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: eq_natCast'
File: Mathlib/Data/Nat/Cast/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
A : Type u_3
B : Type u_4
F : Type u_5
inst✝³ : AddMonoidWithOne B
inst✝² : FunLike F ℕ A
inst✝¹ : AddMonoidWithOne A
inst✝ : AddMonoidHomClass F ℕ A
f : F
h1 : f 1 = 1
⊢ f 0 = ↑0
state_after: no goals
tactic: simp [map_zero f]
state_before: α : Type u_1
β : Type u_2
A : Type u_3
B : Type u_4
F : Type u_5
inst✝³ : AddMonoidWithOne B
inst✝² : FunLike F ℕ A
inst✝¹ : AddMonoidWithOne A
inst✝ : AddMonoidHomClass F ℕ A
f : F
h1 : f 1 = 1
n : ℕ
⊢ f (n + 1) = ↑(n + 1)
state_after: no goals
tactic: rw [map_add, h1, eq_natCast' f h1 n, Nat.cast_add_one]
Theorem: CategoryTheory.Pretriangulated.Triangle.shiftFunctorAdd'_eq
File: Mathlib/CategoryTheory/Triangulated/TriangleShift.lean

Proof steps:
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
a b c : ℤ
h : a + b = c
⊢ CategoryTheory.shiftFunctorAdd' (Triangle C) a b c h = shiftFunctorAdd' C a b c h
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
a b : ℤ
⊢ CategoryTheory.shiftFunctorAdd' (Triangle C) a b (a + b) ⋯ = shiftFunctorAdd' C a b (a + b) ⋯
tactic: subst h
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
a b : ℤ
⊢ CategoryTheory.shiftFunctorAdd' (Triangle C) a b (a + b) ⋯ = shiftFunctorAdd' C a b (a + b) ⋯
state_after: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
a b : ℤ
⊢ shiftFunctorAdd (Triangle C) a b = shiftFunctorAdd' C a b (a + b) ⋯
tactic: rw [shiftFunctorAdd'_eq_shiftFunctorAdd]
state_before: C : Type u
inst✝³ : Category.{v, u} C
inst✝² : Preadditive C
inst✝¹ : HasShift C ℤ
inst✝ : ∀ (n : ℤ), (CategoryTheory.shiftFunctor C n).Additive
a b : ℤ
⊢ shiftFunctorAdd (Triangle C) a b = shiftFunctorAdd' C a b (a + b) ⋯
state_after: no goals
tactic: apply shiftFunctorAdd_eq
Theorem: Complex.sin_eq_one_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

Proof steps:
state_before: x : ℂ
⊢ sin x = 1 ↔ ∃ k, ↑π / 2 + ↑k * (2 * ↑π) = x
state_after: x : ℂ
⊢ (∃ k, ↑k * (2 * ↑π) = x - ↑π / 2) ↔ ∃ k, ↑π / 2 + ↑k * (2 * ↑π) = x
tactic: rw [← cos_sub_pi_div_two, cos_eq_one_iff]
state_before: x : ℂ
⊢ (∃ k, ↑k * (2 * ↑π) = x - ↑π / 2) ↔ ∃ k, ↑π / 2 + ↑k * (2 * ↑π) = x
state_after: no goals
tactic: simp only [eq_sub_iff_add_eq']
Theorem: List.chain_of_chain_pmap
File: Mathlib/Data/List/Chain.lean

Proof steps:
state_before: α : Type u
β : Type v
R r : α → α → Prop
l✝ l₁ l₂ : List α
a✝ b : α
S : β → β → Prop
p : α → Prop
f : (a : α) → p a → β
l : List α
hl₁ : ∀ (a : α), a ∈ l → p a
a : α
ha : p a
hl₂ : Chain S (f a ha) (pmap f l hl₁)
H : ∀ (a b : α) (ha : p a) (hb : p b), S (f a ha) (f b hb) → R a b
⊢ Chain R a l
state_after: case nil
α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a✝ b : α
S : β → β → Prop
p : α → Prop
f : (a : α) → p a → β
H : ∀ (a b : α) (ha : p a) (hb : p b), S (f a ha) (f b hb) → R a b
hl₁ : ∀ (a : α), a ∈ [] → p a
a : α
ha : p a
hl₂ : Chain S (f a ha) (pmap f [] hl₁)
⊢ Chain R a []

case cons
α : Type u
β : Type v
R r : α → α → Prop
l l₁ l₂ : List α
a✝ b : α
S : β → β → Prop
p : α → Prop
f : (a : α) → p a → β
H : ∀ (a b : α) (ha : p a) (hb : p b), S (f a ha) (f b hb) → R a b
lh : α
lt : List α
l_ih : ∀ (hl₁ : ∀ (a : α), a ∈ lt → p a) {a : α} (ha : p a), Chain S (f a ha) (pmap f lt hl₁) → Chain R a lt
hl₁ : ∀ (a : α), a ∈ lh :: lt → p a
a : α
ha : p a
hl₂ : Chain S (f a ha) (pmap f (lh :: lt) hl₁)
⊢ Chain R a (lh :: lt)
tactic: induction' l with lh lt l_ih generalizing a
Theorem: Complex.integral_cpow_mul_exp_neg_mul_Ioi
File: Mathlib/Analysis/SpecialFunctions/Gamma/Basic.lean

Proof steps:
state_before: a : ℂ
r : ℝ
ha : 0 < a.re
hr : 0 < r
⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (a - 1) * cexp (-(↑r * ↑t)) = (1 / ↑r) ^ a * Gamma a
state_after: a : ℂ
r : ℝ
ha : 0 < a.re
hr : 0 < r
aux : (1 / ↑r) ^ a = 1 / ↑r * (1 / ↑r) ^ (a - 1)
⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (a - 1) * cexp (-(↑r * ↑t)) = (1 / ↑r) ^ a * Gamma a
tactic: have aux : (1 / r : ℂ) ^ a = 1 / r * (1 / r) ^ (a - 1) := by
    nth_rewrite 2 [← cpow_one (1 / r : ℂ)]
    rw [← cpow_add _ _ (one_div_ne_zero <| ofReal_ne_zero.mpr hr.ne'), add_sub_cancel]
state_before: a : ℂ
r : ℝ
ha : 0 < a.re
hr : 0 < r
aux : (1 / ↑r) ^ a = 1 / ↑r * (1 / ↑r) ^ (a - 1)
⊢ ∫ (t : ℝ) in Ioi 0, ↑t ^ (a - 1) * cexp (-(↑r * ↑t)) = (1 / ↑r) ^ a * Gamma a
state_after: no goals
tactic: calc
    _ = ∫ (t : ℝ) in Ioi 0, (1 / r) ^ (a - 1) * (r * t) ^ (a - 1) * exp (-(r * t)) := by
      refine MeasureTheory.setIntegral_congr measurableSet_Ioi (fun x hx ↦ ?_)
      rw [mem_Ioi] at hx
      rw [mul_cpow_ofReal_nonneg hr.le hx.le, ← mul_assoc, one_div, ← ofReal_inv,
        ← mul_cpow_ofReal_nonneg (inv_pos.mpr hr).le hr.le, ← ofReal_mul r⁻¹, inv_mul_cancel hr.ne',
        ofReal_one, one_cpow, one_mul]
    _ = 1 / r * ∫ (t : ℝ) in Ioi 0, (1 / r) ^ (a - 1) * t ^ (a - 1) * exp (-t) := by
      simp_rw [← ofReal_mul]
      rw [integral_comp_mul_left_Ioi (fun x ↦ _ * x ^ (a - 1) * exp (-x)) _ hr, mul_zero,
        real_smul, ← one_div, ofReal_div, ofReal_one]
    _ = 1 / r * (1 / r : ℂ) ^ (a - 1) * (∫ (t : ℝ) in Ioi 0, t ^ (a - 1) * exp (-t)) := by
      simp_rw [← integral_mul_left, mul_assoc]
    _ = (1 / r) ^ a * Gamma a := by
      rw [aux, Gamma_eq_integral ha]
      congr 2 with x
      rw [ofReal_exp, ofReal_neg, mul_comm]
Theorem: Fin.repeat_one
File: Mathlib/Data/Fin/Tuple/Basic.lean

Proof steps:
state_before: m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
⊢ repeat 1 a = a ∘ cast ⋯
state_after: m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ repeat 1 a = a ∘ cast h
tactic: generalize_proofs h
state_before: m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ repeat 1 a = a ∘ cast h
state_after: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin (1 * n)), repeat 1 a x = (a ∘ cast h) x
tactic: apply funext
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin (1 * n)), repeat 1 a x = (a ∘ cast h) x
state_after: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin n), repeat 1 a (cast ⋯ x) = (a ∘ cast h) (cast ⋯ x)
tactic: rw [(Fin.rightInverse_cast h.symm).surjective.forall]
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i : Fin n
y : α✝ i.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
⊢ ∀ (x : Fin n), repeat 1 a (cast ⋯ x) = (a ∘ cast h) (cast ⋯ x)
state_after: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i✝ : Fin n
y : α✝ i✝.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
i : Fin n
⊢ repeat 1 a (cast ⋯ i) = (a ∘ cast h) (cast ⋯ i)
tactic: intro i
state_before: case h
m n : ℕ
α✝ : Fin (n + 1) → Type u
x : α✝ 0
q : (i : Fin (n + 1)) → α✝ i
p : (i : Fin n) → α✝ i.succ
i✝ : Fin n
y : α✝ i✝.succ
z : α✝ 0
α : Type u_1
a : Fin n → α
h : 1 * n = n
i : Fin n
⊢ repeat 1 a (cast ⋯ i) = (a ∘ cast h) (cast ⋯ i)
state_after: no goals
tactic: simp [modNat, Nat.mod_eq_of_lt i.is_lt]
Theorem: Complex.norm_natCast_cpow_of_pos
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

Proof steps:
state_before: n : ℕ
hn : 0 < n
s : ℂ
⊢ ‖↑n ^ s‖ = ↑n ^ s.re
state_after: no goals
tactic: rw [norm_eq_abs, ← ofReal_natCast, abs_cpow_eq_rpow_re_of_pos (Nat.cast_pos.mpr hn) _]
Theorem: two_smul
File: Mathlib/Algebra/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r s : R
x y : M
⊢ 2 • x = x + x
state_after: no goals
tactic: rw [← one_add_one_eq_two, add_smul, one_smul]
Theorem: intervalIntegral.intervalIntegrable_deriv_of_nonneg
File: Mathlib/MeasureTheory/Integral/FundThmCalculus.lean

Proof steps:
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ : ℝ → E
g' g φ : ℝ → ℝ
a b : ℝ
inst✝ : CompleteSpace E
f f' : ℝ → E
hcont : ContinuousOn g [[a, b]]
hderiv : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt g (g' x) x
hpos : ∀ x ∈ Ioo (min a b) (max a b), 0 ≤ g' x
⊢ IntervalIntegrable g' volume a b
state_after: case inl
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ : ℝ → E
g' g φ : ℝ → ℝ
a b : ℝ
inst✝ : CompleteSpace E
f f' : ℝ → E
hcont : ContinuousOn g [[a, b]]
hderiv : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt g (g' x) x
hpos : ∀ x ∈ Ioo (min a b) (max a b), 0 ≤ g' x
hab : a ≤ b
⊢ IntervalIntegrable g' volume a b

case inr
ι : Type u_1
𝕜 : Type u_2
E : Type u_3
F : Type u_4
A : Type u_5
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
f✝ : ℝ → E
g' g φ : ℝ → ℝ
a b : ℝ
inst✝ : CompleteSpace E
f f' : ℝ → E
hcont : ContinuousOn g [[a, b]]
hderiv : ∀ x ∈ Ioo (min a b) (max a b), HasDerivAt g (g' x) x
hpos : ∀ x ∈ Ioo (min a b) (max a b), 0 ≤ g' x
hab : b ≤ a
⊢ IntervalIntegrable g' volume a b
tactic: rcases le_total a b with hab | hab
Theorem: MeasureTheory.pairwise_disjoint_fundamentalInterior
File: Mathlib/MeasureTheory/Group/FundamentalDomain.lean

Proof steps:
state_before: G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x : α
⊢ Pairwise (Disjoint on fun g => g • fundamentalInterior G s)
state_after: G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x : α
a b : G
hab : a ≠ b
⊢ ∀ ⦃a_1 : α⦄, a_1 ∈ (fun g => g • fundamentalInterior G s) a → a_1 ∉ (fun g => g • fundamentalInterior G s) b
tactic: refine fun a b hab => disjoint_left.2 ?_
state_before: G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x : α
a b : G
hab : a ≠ b
⊢ ∀ ⦃a_1 : α⦄, a_1 ∈ (fun g => g • fundamentalInterior G s) a → a_1 ∉ (fun g => g • fundamentalInterior G s) b
state_after: case intro.intro.intro.intro
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ fundamentalInterior G s
y : α
hy : y ∈ fundamentalInterior G s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ False
tactic: rintro _ ⟨x, hx, rfl⟩ ⟨y, hy, hxy⟩
state_before: case intro.intro.intro.intro
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ fundamentalInterior G s
y : α
hy : y ∈ fundamentalInterior G s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ False
state_after: case intro.intro.intro.intro
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s
y : α
hy : y ∈ s ∧ ∀ (g : G), g ≠ 1 → y ∉ g • s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ False
tactic: rw [mem_fundamentalInterior] at hx hy
state_before: case intro.intro.intro.intro
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s
y : α
hy : y ∈ s ∧ ∀ (g : G), g ≠ 1 → y ∉ g • s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ False
state_after: case intro.intro.intro.intro.refine_1
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s
y : α
hy : y ∈ s ∧ ∀ (g : G), g ≠ 1 → y ∉ g • s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ a⁻¹ * b ≠ 1

case intro.intro.intro.intro.refine_2
G : Type u_1
H : Type u_2
α : Type u_3
β : Type u_4
E : Type u_5
inst✝¹ : Group G
inst✝ : MulAction G α
s : Set α
x✝ : α
a b : G
hab : a ≠ b
x : α
hx : x ∈ s ∧ ∀ (g : G), g ≠ 1 → x ∉ g • s
y : α
hy : y ∈ s ∧ ∀ (g : G), g ≠ 1 → y ∉ g • s
hxy : (fun x => b • x) y = (fun x => a • x) x
⊢ x ∈ (a⁻¹ * b) • s
tactic: refine hx.2 (a⁻¹ * b) ?_ ?_
Theorem: ENNReal.coe_mem_upperBounds
File: Mathlib/Data/ENNReal/Basic.lean

Proof steps:
state_before: α : Type u_1
a b c d : ℝ≥0∞
r p q : ℝ≥0
ι : Sort u_2
f : ι → ℝ≥0
s : Set ℝ≥0
⊢ ↑r ∈ upperBounds (ofNNReal '' s) ↔ r ∈ upperBounds s
state_after: no goals
tactic: simp (config := { contextual := true }) [upperBounds, forall_mem_image, -mem_image, *]
Theorem: Nat.count_nth_succ
File: Mathlib/Data/Nat/Nth.lean

Proof steps:
state_before: p : ℕ → Prop
inst✝ : DecidablePred p
n : ℕ
hn : ∀ (hf : (setOf p).Finite), n < hf.toFinset.card
⊢ count p (nth p n + 1) = n + 1
state_after: no goals
tactic: rw [count_succ, count_nth hn, if_pos (nth_mem _ hn)]
Theorem: Real.lt_log_iff_exp_lt
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

Proof steps:
state_before: x y : ℝ
hy : 0 < y
⊢ x < log y ↔ rexp x < y
state_after: no goals
tactic: rw [← exp_lt_exp, exp_log hy]
Theorem: PrimeSpectrum.zeroLocus_minimalPrimes
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

Proof steps:
state_before: R : Type u
S : Type v
inst✝ : CommSemiring R
⊢ zeroLocus ∘ SetLike.coe '' minimalPrimes R = irreducibleComponents (PrimeSpectrum R)
state_after: R : Type u
S : Type v
inst✝ : CommSemiring R
⊢ Set.EqOn ((zeroLocus ∘ SetLike.coe) ∘ vanishingIdeal) id (irreducibleComponents (PrimeSpectrum R))
tactic: rw [← vanishingIdeal_irreducibleComponents, ← Set.image_comp, Set.EqOn.image_eq_self]
state_before: R : Type u
S : Type v
inst✝ : CommSemiring R
⊢ Set.EqOn ((zeroLocus ∘ SetLike.coe) ∘ vanishingIdeal) id (irreducibleComponents (PrimeSpectrum R))
state_after: R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
hs : s ∈ irreducibleComponents (PrimeSpectrum R)
⊢ ((zeroLocus ∘ SetLike.coe) ∘ vanishingIdeal) s = id s
tactic: intros s hs
state_before: R : Type u
S : Type v
inst✝ : CommSemiring R
s : Set (PrimeSpectrum R)
hs : s ∈ irreducibleComponents (PrimeSpectrum R)
⊢ ((zeroLocus ∘ SetLike.coe) ∘ vanishingIdeal) s = id s
state_after: no goals
tactic: simpa [zeroLocus_vanishingIdeal_eq_closure, closure_eq_iff_isClosed]
    using isClosed_of_mem_irreducibleComponents s hs
Theorem: Int.alternating_sum_range_choose
File: Mathlib/Data/Nat/Choose/Sum.lean

Proof steps:
state_before: R : Type u_1
n : ℕ
⊢ ∑ m ∈ range (n + 1), (-1) ^ m * ↑(n.choose m) = if n = 0 then 1 else 0
state_after: no goals
tactic: cases n with
  | zero => simp
  | succ n =>
    have h := add_pow (-1 : ℤ) 1 n.succ
    simp only [one_pow, mul_one, add_left_neg] at h
    rw [← h, zero_pow n.succ_ne_zero, if_neg (Nat.succ_ne_zero n)]
Theorem: Stream'.WSeq.Equiv.ext
File: Mathlib/Data/Seq/WSeq.lean

Proof steps:
state_before: α : Type u
β : Type v
γ : Type w
s✝ t✝ : WSeq α
h✝ : ∀ (n : ℕ), s✝.get? n ~ t✝.get? n
s t : WSeq α
h : (fun s t => ∀ (n : ℕ), s.get? n ~ t.get? n) s t
⊢ Computation.LiftRel (LiftRelO (fun x x_1 => x = x_1) fun s t => ∀ (n : ℕ), s.get? n ~ t.get? n) s.destruct t.destruct
state_after: case refine_1
α : Type u
β : Type v
γ : Type w
s✝ t✝ : WSeq α
h✝ : ∀ (n : ℕ), s✝.get? n ~ t✝.get? n
s t : WSeq α
h : (fun s t => ∀ (n : ℕ), s.get? n ~ t.get? n) s t
⊢ s.destruct.Terminates ↔ t.destruct.Terminates

case refine_2
α : Type u
β : Type v
γ : Type w
s✝ t✝ : WSeq α
h✝ : ∀ (n : ℕ), s✝.get? n ~ t✝.get? n
s t : WSeq α
h : (fun s t => ∀ (n : ℕ), s.get? n ~ t.get? n) s t
⊢ ∀ {a b : Option (α × WSeq α)},
    a ∈ s.destruct → b ∈ t.destruct → LiftRelO (fun x x_1 => x = x_1) (fun s t => ∀ (n : ℕ), s.get? n ~ t.get? n) a b
tactic: refine liftRel_def.2 ⟨?_, ?_⟩
Theorem: IsLocalization.coeSubmodule_isPrincipal
File: Mathlib/RingTheory/Localization/Submodule.lean

Proof steps:
state_before: R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
I : Ideal R
h : M ≤ nonZeroDivisors R
⊢ (coeSubmodule S I).IsPrincipal ↔ Submodule.IsPrincipal I
state_after: case mp.mk.intro
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
I : Ideal R
h : M ≤ nonZeroDivisors R
x : S
hx : coeSubmodule S I = Submodule.span R {x}
⊢ Submodule.IsPrincipal I

case mpr.mk.intro
R : Type u_1
inst✝⁷ : CommRing R
M : Submonoid R
S : Type u_2
inst✝⁶ : CommRing S
inst✝⁵ : Algebra R S
P : Type u_3
inst✝⁴ : CommRing P
g : R →+* P
T : Submonoid P
hy : M ≤ Submonoid.comap g T
Q : Type u_4
inst✝³ : CommRing Q
inst✝² : Algebra P Q
inst✝¹ : IsLocalization T Q
inst✝ : IsLocalization M S
I : Ideal R
h : M ≤ nonZeroDivisors R
x : R
hx : I = Submodule.span R {x}
⊢ (coeSubmodule S I).IsPrincipal
tactic: constructor <;> rintro ⟨⟨x, hx⟩⟩
Theorem: CongruenceSubgroup.Gamma_one_top
File: Mathlib/NumberTheory/ModularForms/CongruenceSubgroups.lean

Proof steps:
state_before: N : ℕ
⊢ Gamma 1 = ⊤
state_after: case h
N : ℕ
x✝ : SL(2, ℤ)
⊢ x✝ ∈ Gamma 1 ↔ x✝ ∈ ⊤
tactic: ext
state_before: case h
N : ℕ
x✝ : SL(2, ℤ)
⊢ x✝ ∈ Gamma 1 ↔ x✝ ∈ ⊤
state_after: no goals
tactic: simp [eq_iff_true_of_subsingleton]
Theorem: Metric.infEdist_ne_top
File: Mathlib/Topology/MetricSpace/HausdorffDistance.lean

Proof steps:
state_before: ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y : α
Φ : α → β
h : s.Nonempty
⊢ infEdist x s ≠ ⊤
state_after: case intro
ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y✝ : α
Φ : α → β
y : α
hy : y ∈ s
⊢ infEdist x s ≠ ⊤
tactic: rcases h with ⟨y, hy⟩
state_before: case intro
ι : Sort u_1
α : Type u
β : Type v
inst✝¹ : PseudoMetricSpace α
inst✝ : PseudoMetricSpace β
s t u : Set α
x y✝ : α
Φ : α → β
y : α
hy : y ∈ s
⊢ infEdist x s ≠ ⊤
state_after: no goals
tactic: exact ne_top_of_le_ne_top (edist_ne_top _ _) (infEdist_le_edist_of_mem hy)
Theorem: List.all_iff_forall_prop
File: Mathlib/Data/Bool/AllAny.lean

Proof steps:
state_before: α : Type u_1
p : α → Prop
inst✝ : DecidablePred p
l : List α
a : α
⊢ (l.all fun a => decide (p a)) = true ↔ ∀ (a : α), a ∈ l → p a
state_after: no goals
tactic: simp only [all_iff_forall, decide_eq_true_iff]
Theorem: finAddFlip_apply_mk_right
File: Mathlib/Logic/Equiv/Fin.lean

Proof steps:
state_before: m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ k - m < n + m
state_after: no goals
tactic: omega
state_before: m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ finAddFlip ⟨k, h₂⟩ = ⟨k - m, ⋯⟩
state_after: case h.e'_2.h.e'_6.h.e'_2
m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ k = ↑(Fin.natAdd m ⟨k - m, ⋯⟩)
tactic: convert @finAddFlip_apply_natAdd n ⟨k - m, by omega⟩ m
state_before: case h.e'_2.h.e'_6.h.e'_2
m n k : ℕ
h₁ : m ≤ k
h₂ : k < m + n
⊢ k = ↑(Fin.natAdd m ⟨k - m, ⋯⟩)
state_after: no goals
tactic: simp [Nat.add_sub_cancel' h₁]
Theorem: Submodule.map₂_bot_left
File: Mathlib/Algebra/Module/Submodule/Bilinear.lean

Proof steps:
state_before: ι : Sort uι
R : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid N
inst✝³ : AddCommMonoid P
inst✝² : Module R M
inst✝¹ : Module R N
inst✝ : Module R P
f : M →ₗ[R] N →ₗ[R] P
q : Submodule R N
m : M
hm : m ∈ ⊥
n : N
hn : n ∈ q
⊢ (f m) n ∈ ⊥
state_after: ι : Sort uι
R : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid N
inst✝³ : AddCommMonoid P
inst✝² : Module R M
inst✝¹ : Module R N
inst✝ : Module R P
f : M →ₗ[R] N →ₗ[R] P
q : Submodule R N
m : M
hm : m = 0
n : N
hn : n ∈ q
⊢ (f m) n = 0
tactic: rw [Submodule.mem_bot] at hm ⊢
state_before: ι : Sort uι
R : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
inst✝⁶ : CommSemiring R
inst✝⁵ : AddCommMonoid M
inst✝⁴ : AddCommMonoid N
inst✝³ : AddCommMonoid P
inst✝² : Module R M
inst✝¹ : Module R N
inst✝ : Module R P
f : M →ₗ[R] N →ₗ[R] P
q : Submodule R N
m : M
hm : m = 0
n : N
hn : n ∈ q
⊢ (f m) n = 0
state_after: no goals
tactic: rw [hm, LinearMap.map_zero₂]
Theorem: mulTSupport_eq_empty_iff
File: Mathlib/Topology/Support.lean

Proof steps:
state_before: X : Type u_1
α : Type u_2
α' : Type u_3
β : Type u_4
γ : Type u_5
δ : Type u_6
M : Type u_7
E : Type u_8
R : Type u_9
inst✝¹ : One α
inst✝ : TopologicalSpace X
f : X → α
⊢ mulTSupport f = ∅ ↔ f = 1
state_after: no goals
tactic: rw [mulTSupport, closure_empty_iff, mulSupport_eq_empty_iff]
Theorem: Cardinal.not_injective_limitation_set
File: Mathlib/SetTheory/Ordinal/FixedPointApproximants.lean

Proof steps:
state_before: α : Type u
g : Ordinal.{u} → α
⊢ ¬InjOn g (Iio (succ #α).ord)
state_after: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
⊢ False
tactic: intro h_inj
state_before: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
⊢ False
state_after: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : lift.{u, u + 1} #↑(Iio (succ #α).ord) ≤ lift.{u + 1, u} #α
⊢ False
tactic: have h := lift_mk_le_lift_mk_of_injective <| injOn_iff_injective.1 h_inj
state_before: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : lift.{u, u + 1} #↑(Iio (succ #α).ord) ≤ lift.{u + 1, u} #α
⊢ False
state_after: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : lift.{u, u + 1} #↑(Iio (succ #α).ord) ≤ lift.{u + 1, u} #α
mk_initialSeg_subtype : #↑(Iio (succ #α).ord) = lift.{u + 1, u} (succ #α)
⊢ False
tactic: have mk_initialSeg_subtype :
      #(Iio (ord <| succ #α)) = lift.{u + 1} (succ #α) := by
    simpa only [coe_setOf, card_typein, card_ord] using mk_initialSeg (ord <| succ #α)
state_before: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : lift.{u, u + 1} #↑(Iio (succ #α).ord) ≤ lift.{u + 1, u} #α
mk_initialSeg_subtype : #↑(Iio (succ #α).ord) = lift.{u + 1, u} (succ #α)
⊢ False
state_after: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : succ #α ≤ #α
mk_initialSeg_subtype : #↑(Iio (succ #α).ord) = lift.{u + 1, u} (succ #α)
⊢ False
tactic: rw [mk_initialSeg_subtype, lift_lift, lift_le] at h
state_before: α : Type u
g : Ordinal.{u} → α
h_inj : InjOn g (Iio (succ #α).ord)
h : succ #α ≤ #α
mk_initialSeg_subtype : #↑(Iio (succ #α).ord) = lift.{u + 1, u} (succ #α)
⊢ False
state_after: no goals
tactic: exact not_le_of_lt (Order.lt_succ #α) h
Theorem: closure_inter_coborder
File: Mathlib/Topology/LocallyClosed.lean

Proof steps:
state_before: X : Type u_1
Y : Type u_2
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
⊢ closure s ∩ coborder s = s
state_after: no goals
tactic: rw [inter_comm, coborder_inter_closure]
Theorem: support_finRotate
File: Mathlib/GroupTheory/Perm/Fin.lean

Proof steps:
state_before: n : ℕ
⊢ (finRotate (n + 2)).support = Finset.univ
state_after: case a
n : ℕ
a✝ : Fin (n + 2)
⊢ a✝ ∈ (finRotate (n + 2)).support ↔ a✝ ∈ Finset.univ
tactic: ext
state_before: case a
n : ℕ
a✝ : Fin (n + 2)
⊢ a✝ ∈ (finRotate (n + 2)).support ↔ a✝ ∈ Finset.univ
state_after: no goals
tactic: simp