ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Polynomial.natDegree_mem_support_of_nonzero
File: Mathlib/Algebra/Polynomial/Degree/Definitions.lean

Proof steps:
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
H : p ≠ 0
⊢ p.natDegree ∈ p.support
state_after: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
H : p ≠ 0
⊢ p.coeff p.natDegree ≠ 0
tactic: rw [mem_support_iff]
state_before: R : Type u
S : Type v
a b c d : R
n m : ℕ
inst✝ : Semiring R
p✝ p q : R[X]
ι : Type u_1
H : p ≠ 0
⊢ p.coeff p.natDegree ≠ 0
state_after: no goals
tactic: exact (not_congr leadingCoeff_eq_zero).mpr H
Theorem: Finset.mul_eq_one_iff
File: Mathlib/Data/Finset/Pointwise.lean

Proof steps:
state_before: F : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
inst✝² : DecidableEq α
inst✝¹ : DecidableEq β
inst✝ : DivisionMonoid α
s t : Finset α
⊢ s * t = 1 ↔ ∃ a b, s = {a} ∧ t = {b} ∧ a * b = 1
state_after: no goals
tactic: simp_rw [← coe_inj, coe_mul, coe_one, Set.mul_eq_one_iff, coe_singleton]
Theorem: sup_biSup
File: Mathlib/Order/CompleteLattice.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
β₂ : Type u_3
γ : Type u_4
ι : Sort u_5
ι' : Sort u_6
κ : ι → Sort u_7
κ' : ι' → Sort u_8
inst✝ : CompleteLattice α
f✝ g s t : ι → α
a✝ b : α
p : ι → Prop
f : (i : ι) → p i → α
a : α
h : ∃ i, p i
⊢ a ⊔ ⨆ i, ⨆ (h : p i), f i h = ⨆ i, ⨆ (h : p i), a ⊔ f i h
state_after: no goals
tactic: simpa only [sup_comm] using @biSup_sup α _ _ p _ _ h
Theorem: Module.DirectLimit.map_id
File: Mathlib/Algebra/DirectLimit.lean

Proof steps:
state_before: R : Type u
inst✝¹¹ : Ring R
ι : Type v
inst✝¹⁰ : Preorder ι
G : ι → Type w
inst✝⁹ : (i : ι) → AddCommGroup (G i)
inst✝⁸ : (i : ι) → Module R (G i)
f : (i j : ι) → i ≤ j → G i →ₗ[R] G j
inst✝⁷ : DecidableEq ι
P : Type u₁
inst✝⁶ : AddCommGroup P
inst✝⁵ : Module R P
g : (i : ι) → G i →ₗ[R] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), (g j) ((f i j hij) x) = (g i) x
G' : ι → Type v'
inst✝⁴ : (i : ι) → AddCommGroup (G' i)
inst✝³ : (i : ι) → Module R (G' i)
f' : (i j : ι) → i ≤ j → G' i →ₗ[R] G' j
G'' : ι → Type v''
inst✝² : (i : ι) → AddCommGroup (G'' i)
inst✝¹ : (i : ι) → Module R (G'' i)
f'' : (i j : ι) → i ≤ j → G'' i →ₗ[R] G'' j
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x : DirectLimit G f
⊢ IsEmpty ι → (map (fun i => LinearMap.id) ⋯) x = LinearMap.id x
state_after: no goals
tactic: subsingleton
state_before: R : Type u
inst✝¹¹ : Ring R
ι : Type v
inst✝¹⁰ : Preorder ι
G : ι → Type w
inst✝⁹ : (i : ι) → AddCommGroup (G i)
inst✝⁸ : (i : ι) → Module R (G i)
f : (i j : ι) → i ≤ j → G i →ₗ[R] G j
inst✝⁷ : DecidableEq ι
P : Type u₁
inst✝⁶ : AddCommGroup P
inst✝⁵ : Module R P
g✝ : (i : ι) → G i →ₗ[R] P
Hg : ∀ (i j : ι) (hij : i ≤ j) (x : G i), (g✝ j) ((f i j hij) x) = (g✝ i) x
G' : ι → Type v'
inst✝⁴ : (i : ι) → AddCommGroup (G' i)
inst✝³ : (i : ι) → Module R (G' i)
f' : (i j : ι) → i ≤ j → G' i →ₗ[R] G' j
G'' : ι → Type v''
inst✝² : (i : ι) → AddCommGroup (G'' i)
inst✝¹ : (i : ι) → Module R (G'' i)
f'' : (i j : ι) → i ≤ j → G'' i →ₗ[R] G'' j
inst✝ : IsDirected ι fun x x_1 => x ≤ x_1
x : DirectLimit G f
x✝ : Nonempty ι
i : ι
g : G i
⊢ (map (fun i => LinearMap.id) ⋯) ((of R ι G f i) g) = LinearMap.id ((of R ι G f i) g)
state_after: no goals
tactic: simp
Theorem: Units.mk0_prod
File: Mathlib/Algebra/BigOperators/GroupWithZero/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
G₀ : Type u_3
M₀ : Type u_4
inst✝ : CommGroupWithZero G₀
s : Finset ι
f : ι → G₀
h : ∏ i ∈ s, f i ≠ 0
⊢ mk0 (∏ i ∈ s, f i) h = ∏ i ∈ s.attach, mk0 (f ↑i) ⋯
state_after: no goals
tactic: classical induction s using Finset.induction_on <;> simp [*]
Theorem: pi_mul_cot_pi_q_exp
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Cotangent.lean

Proof steps:
state_before: z : ℍ
⊢ ↑π * (↑π * ↑z).cot = ↑π * I - 2 * ↑π * I * ∑' (n : ℕ), cexp (2 * ↑π * I * ↑z) ^ n
state_after: z : ℍ
h1 :
  ↑π * ((cexp (2 * ↑π * I * ↑z) + 1) / (I * (1 - cexp (2 * ↑π * I * ↑z)))) =
    -↑π * I * ((cexp (2 * ↑π * I * ↑z) + 1) * (1 / (1 - cexp (2 * ↑π * I * ↑z))))
⊢ ↑π * (↑π * ↑z).cot = ↑π * I - 2 * ↑π * I * ∑' (n : ℕ), cexp (2 * ↑π * I * ↑z) ^ n
tactic: have h1 : π * ((exp (2 * π * I * z) + 1) / (I * (1 - exp (2 * π * I * z)))) =
      -π * I * ((exp (2 * π * I * z) + 1) * (1 / (1 - exp (2 * π * I * z)))) := by
    simp only [div_mul_eq_div_mul_one_div, div_I, one_div, neg_mul, mul_neg, neg_inj]
    ring
state_before: z : ℍ
h1 :
  ↑π * ((cexp (2 * ↑π * I * ↑z) + 1) / (I * (1 - cexp (2 * ↑π * I * ↑z)))) =
    -↑π * I * ((cexp (2 * ↑π * I * ↑z) + 1) * (1 / (1 - cexp (2 * ↑π * I * ↑z))))
⊢ ↑π * (↑π * ↑z).cot = ↑π * I - 2 * ↑π * I * ∑' (n : ℕ), cexp (2 * ↑π * I * ↑z) ^ n
state_after: z : ℍ
h1 :
  ↑π * ((cexp (2 * ↑π * I * ↑z) + 1) / (I * (1 - cexp (2 * ↑π * I * ↑z)))) =
    -↑π * I * ((cexp (2 * ↑π * I * ↑z) + 1) * (1 / (1 - cexp (2 * ↑π * I * ↑z))))
⊢ -↑π * I * (2 * ∑' (i : ℕ), cexp (2 * ↑π * I * ↑z) ^ i - 1) =
    ↑π * I - 2 * ↑π * I * ∑' (n : ℕ), cexp (2 * ↑π * I * ↑z) ^ n
tactic: rw [cot_pi_eq_exp_ratio, h1, one_div, (tsum_geometric_of_norm_lt_one
    (UpperHalfPlane.abs_exp_two_pi_I_lt_one z)).symm, add_comm, geom_series_mul_one_add
      (Complex.exp (2 * π * I * (z : ℂ))) (UpperHalfPlane.abs_exp_two_pi_I_lt_one _)]
state_before: z : ℍ
h1 :
  ↑π * ((cexp (2 * ↑π * I * ↑z) + 1) / (I * (1 - cexp (2 * ↑π * I * ↑z)))) =
    -↑π * I * ((cexp (2 * ↑π * I * ↑z) + 1) * (1 / (1 - cexp (2 * ↑π * I * ↑z))))
⊢ -↑π * I * (2 * ∑' (i : ℕ), cexp (2 * ↑π * I * ↑z) ^ i - 1) =
    ↑π * I - 2 * ↑π * I * ∑' (n : ℕ), cexp (2 * ↑π * I * ↑z) ^ n
state_after: no goals
tactic: ring
Theorem: Multiset.prod_map_zpow
File: Mathlib/Algebra/BigOperators/Group/Multiset.lean

Proof steps:
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : DivisionCommMonoid α
m : Multiset ι
f g : ι → α
n : ℤ
⊢ (map (fun i => f i ^ n) m).prod = (map f m).prod ^ n
state_after: case h.e'_2.h.e'_3
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : DivisionCommMonoid α
m : Multiset ι
f g : ι → α
n : ℤ
⊢ map (fun i => f i ^ n) m = map (⇑(zpowGroupHom n)) (map f m)
tactic: convert (m.map f).prod_hom (zpowGroupHom n : α →* α)
state_before: case h.e'_2.h.e'_3
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
inst✝ : DivisionCommMonoid α
m : Multiset ι
f g : ι → α
n : ℤ
⊢ map (fun i => f i ^ n) m = map (⇑(zpowGroupHom n)) (map f m)
state_after: no goals
tactic: simp only [map_map, Function.comp_apply, zpowGroupHom_apply]
Theorem: ENNReal.inv_le_iff_le_mul
File: Mathlib/Data/ENNReal/Inv.lean

Proof steps:
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a⁻¹ ≤ b ↔ 1 ≤ a * b
state_after: case hb0
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a ≠ 0 ∨ b ≠ ⊤

case hbt
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a ≠ ⊤ ∨ b ≠ 0
tactic: rw [← one_div, ENNReal.div_le_iff_le_mul, mul_comm]
state_before: case hb0
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a ≠ 0 ∨ b ≠ ⊤

case hbt
a b c d : ℝ≥0∞
r p q : ℝ≥0
h₁ : b = ⊤ → a ≠ 0
h₂ : a = ⊤ → b ≠ 0
⊢ a ≠ ⊤ ∨ b ≠ 0
state_after: no goals
tactic: exacts [or_not_of_imp h₁, not_or_of_imp h₂]
Theorem: Equiv.Perm.swap_mul_swap_same_mem_closure_three_cycles
File: Mathlib/GroupTheory/Perm/Cycle/Type.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
a b c : α
ab : a ≠ b
ac : a ≠ c
⊢ swap a b * swap a c ∈ closure {σ | σ.IsThreeCycle}
state_after: case pos
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
a b c : α
ab : a ≠ b
ac : a ≠ c
bc : b = c
⊢ swap a b * swap a c ∈ closure {σ | σ.IsThreeCycle}

case neg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
a b c : α
ab : a ≠ b
ac : a ≠ c
bc : ¬b = c
⊢ swap a b * swap a c ∈ closure {σ | σ.IsThreeCycle}
tactic: by_cases bc : b = c
state_before: case neg
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
a b c : α
ab : a ≠ b
ac : a ≠ c
bc : ¬b = c
⊢ swap a b * swap a c ∈ closure {σ | σ.IsThreeCycle}
state_after: no goals
tactic: exact subset_closure (isThreeCycle_swap_mul_swap_same ab ac bc)
Theorem: Complex.integrable_pow_mul_norm_one_add_mul_inv
File: Mathlib/Analysis/SpecialFunctions/Complex/LogBounds.lean

Proof steps:
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
⊢ IntervalIntegrable (fun t => t ^ n * ‖(1 + ↑t * z)⁻¹‖) MeasureTheory.volume 0 1
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
this : ContinuousOn (fun t => (1 + t • z)⁻¹) (Set.Icc 0 1)
⊢ IntervalIntegrable (fun t => t ^ n * ‖(1 + ↑t * z)⁻¹‖) MeasureTheory.volume 0 1
tactic: have := continuousOn_one_add_mul_inv <| mem_slitPlane_of_norm_lt_one hz
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
this : ContinuousOn (fun t => (1 + t • z)⁻¹) (Set.Icc 0 1)
⊢ IntervalIntegrable (fun t => t ^ n * ‖(1 + ↑t * z)⁻¹‖) MeasureTheory.volume 0 1
state_after: n : ℕ
z : ℂ
hz : ‖z‖ < 1
this : ContinuousOn (fun t => (1 + t • z)⁻¹) (Set.uIcc 0 1)
⊢ IntervalIntegrable (fun t => t ^ n * ‖(1 + ↑t * z)⁻¹‖) MeasureTheory.volume 0 1
tactic: rw [← Set.uIcc_of_le zero_le_one] at this
state_before: n : ℕ
z : ℂ
hz : ‖z‖ < 1
this : ContinuousOn (fun t => (1 + t • z)⁻¹) (Set.uIcc 0 1)
⊢ IntervalIntegrable (fun t => t ^ n * ‖(1 + ↑t * z)⁻¹‖) MeasureTheory.volume 0 1
state_after: no goals
tactic: exact ContinuousOn.intervalIntegrable (by fun_prop)
Theorem: Multiset.le_sum_of_subadditive
File: Mathlib/Algebra/Order/BigOperators/Group/Multiset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_one : f 1 = 1
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
⊢ ∀ (a b : α), (fun x => True) a → (fun x => True) b → (fun x => True) (a * b)
state_after: no goals
tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : CommMonoid α
inst✝ : OrderedCommMonoid β
f : α → β
h_one : f 1 = 1
h_mul : ∀ (a b : α), f (a * b) ≤ f a * f b
s : Multiset α
⊢ ∀ a ∈ s, (fun x => True) a
state_after: no goals
tactic: simp
Theorem: ConvexOn.map_integral_le
File: Mathlib/Analysis/Convex/Integral.lean

Proof steps:
state_before: α : Type u_1
E : Type u_2
F : Type u_3
m0 : MeasurableSpace α
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedSpace ℝ E
inst✝⁴ : CompleteSpace E
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace ℝ F
inst✝¹ : CompleteSpace F
μ : Measure α
s : Set E
t : Set α
f : α → E
g : E → ℝ
C : ℝ
inst✝ : IsProbabilityMeasure μ
hg : ConvexOn ℝ s g
hgc : ContinuousOn g s
hsc : IsClosed s
hfs : ∀ᵐ (x : α) ∂μ, f x ∈ s
hfi : Integrable f μ
hgi : Integrable (g ∘ f) μ
⊢ g (∫ (x : α), f x ∂μ) ≤ ∫ (x : α), g (f x) ∂μ
state_after: no goals
tactic: simpa only [average_eq_integral] using hg.map_average_le hgc hsc hfs hfi hgi
Theorem: Summable.of_neg
File: Mathlib/Topology/Algebra/InfiniteSum/Group.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝² : CommGroup α
inst✝¹ : TopologicalSpace α
inst✝ : TopologicalGroup α
f g : β → α
a a₁ a₂ : α
hf : Multipliable fun b => (f b)⁻¹
⊢ Multipliable f
state_after: no goals
tactic: simpa only [inv_inv] using hf.inv
Theorem: even_iff_two_dvd
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✝¹ : Semiring α
inst✝ : Semiring β
a b : α
m n : ℕ
⊢ Even a ↔ 2 ∣ a
state_after: no goals
tactic: simp [Even, Dvd.dvd, two_mul]
Theorem: summable_sigma_of_nonneg
File: Mathlib/Topology/Algebra/InfiniteSum/Real.lean

Proof steps:
state_before: α : Type u_1
β✝ : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
β : α → Type u_3
f : (x : α) × β x → ℝ
hf : ∀ (x : (x : α) × β x), 0 ≤ f x
⊢ Summable f ↔ (∀ (x : α), Summable fun y => f ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), f ⟨x, y⟩
state_after: case intro
α : Type u_1
β✝ : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
β : α → Type u_3
f : (x : α) × β x → ℝ≥0
⊢ (Summable fun i => ↑(f i)) ↔
    (∀ (x : α), Summable fun y => (fun i => ↑(f i)) ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), (fun i => ↑(f i)) ⟨x, y⟩
tactic: lift f to (Σx, β x) → ℝ≥0 using hf
state_before: case intro
α : Type u_1
β✝ : Type u_2
inst✝ : PseudoMetricSpace α
f✝ : ℕ → α
a : α
β : α → Type u_3
f : (x : α) × β x → ℝ≥0
⊢ (Summable fun i => ↑(f i)) ↔
    (∀ (x : α), Summable fun y => (fun i => ↑(f i)) ⟨x, y⟩) ∧ Summable fun x => ∑' (y : β x), (fun i => ↑(f i)) ⟨x, y⟩
state_after: no goals
tactic: exact mod_cast NNReal.summable_sigma
Theorem: _private.Mathlib.Topology.MetricSpace.Gluing.0.Metric.Sum.mem_uniformity
File: Mathlib/Topology/MetricSpace/Gluing.lean

Proof steps:
state_before: X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ s ∈ 𝓤 (X ⊕ Y) ↔ ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s
state_after: case mp
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ s ∈ 𝓤 (X ⊕ Y) → ∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s

case mpr
X : Type u
Y : Type v
Z : Type w
inst✝¹ : MetricSpace X
inst✝ : MetricSpace Y
s : Set ((X ⊕ Y) × (X ⊕ Y))
⊢ (∃ ε > 0, ∀ (a b : X ⊕ Y), Sum.dist a b < ε → (a, b) ∈ s) → s ∈ 𝓤 (X ⊕ Y)
tactic: constructor
Theorem: div_le_of_nonneg_of_le_mul
File: Mathlib/Algebra/Order/Field/Basic.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 ≤ b
hc : 0 ≤ c
h : a ≤ c * b
⊢ a / b ≤ c
state_after: case inl
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a c d e : α
m n : ℤ
hc : 0 ≤ c
hb : 0 ≤ 0
h : a ≤ c * 0
⊢ a / 0 ≤ c

case inr
ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
hb : 0 ≤ b
hc : 0 ≤ c
h : a ≤ c * b
hb' : 0 < b
⊢ a / b ≤ c
tactic: rcases eq_or_lt_of_le hb with (rfl | hb')
Theorem: AlgebraicTopology.DoldKan.PInfty_add_QInfty
File: Mathlib/AlgebraicTopology/DoldKan/PInfty.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ PInfty + QInfty = 𝟙 K[X]
state_after: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ PInfty + (𝟙 K[X] - PInfty) = 𝟙 K[X]
tactic: dsimp only [QInfty]
state_before: C : Type u_1
inst✝¹ : Category.{u_2, u_1} C
inst✝ : Preadditive C
X : SimplicialObject C
⊢ PInfty + (𝟙 K[X] - PInfty) = 𝟙 K[X]
state_after: no goals
tactic: simp only [add_sub_cancel]
Theorem: QuaternionGroup.xa_sq
File: Mathlib/GroupTheory/SpecificGroups/Quaternion.lean

Proof steps:
state_before: n : ℕ
i : ZMod (2 * n)
⊢ xa i ^ 2 = a ↑n
state_after: no goals
tactic: simp [sq]
Theorem: GenContFract.succ_succ_nth_conv'Aux_eq_succ_nth_conv'Aux_squashSeq
File: Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

Proof steps:
state_before: K : Type u_1
n : ℕ
g : GenContFract K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ convs'Aux s (n + 2) = convs'Aux (squashSeq s n) (n + 1)
state_after: no goals
tactic: cases s_succ_nth_eq : s.get? <| n + 1 with
  | none =>
    rw [squashSeq_eq_self_of_terminated s_succ_nth_eq,
      convs'Aux_stable_step_of_terminated s_succ_nth_eq]
  | some gp_succ_n =>
    induction n generalizing s gp_succ_n with
    | zero =>
      obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head :=
        s.ge_stable zero_le_one s_succ_nth_eq
      have : (squashSeq s 0).head = some ⟨gp_head.a, gp_head.b + gp_succ_n.a / gp_succ_n.b⟩ :=
        squashSeq_nth_of_not_terminated s_head_eq s_succ_nth_eq
      simp_all [convs'Aux, Stream'.Seq.head, Stream'.Seq.get?_tail]
    | succ m IH =>
      obtain ⟨gp_head, s_head_eq⟩ : ∃ gp_head, s.head = some gp_head :=
        s.ge_stable (m + 2).zero_le s_succ_nth_eq
      suffices
        gp_head.a / (gp_head.b + convs'Aux s.tail (m + 2)) =
          convs'Aux (squashSeq s (m + 1)) (m + 2)
        by simpa only [convs'Aux, s_head_eq]
      have : convs'Aux s.tail (m + 2) = convs'Aux (squashSeq s.tail m) (m + 1) := by
        refine IH gp_succ_n ?_
        simpa [Stream'.Seq.get?_tail] using s_succ_nth_eq
      have : (squashSeq s (m + 1)).head = some gp_head :=
        (squashSeq_nth_of_lt m.succ_pos).trans s_head_eq
      simp_all [convs'Aux, squashSeq_succ_n_tail_eq_squashSeq_tail_n]
Theorem: Doset.doset_eq_of_mem
File: Mathlib/GroupTheory/DoubleCoset.lean

Proof steps:
state_before: G : Type u_1
inst✝¹ : Group G
α : Type u_2
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a b : G
hb : b ∈ doset a ↑H ↑K
⊢ doset b ↑H ↑K = doset a ↑H ↑K
state_after: case intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type u_2
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a h : G
hh : h ∈ ↑H
k : G
hk : k ∈ ↑K
hb : h * a * k ∈ doset a ↑H ↑K
⊢ doset (h * a * k) ↑H ↑K = doset a ↑H ↑K
tactic: obtain ⟨h, hh, k, hk, rfl⟩ := mem_doset.1 hb
state_before: case intro.intro.intro.intro
G : Type u_1
inst✝¹ : Group G
α : Type u_2
inst✝ : Mul α
J : Subgroup G
g : G
H K : Subgroup G
a h : G
hh : h ∈ ↑H
k : G
hk : k ∈ ↑K
hb : h * a * k ∈ doset a ↑H ↑K
⊢ doset (h * a * k) ↑H ↑K = doset a ↑H ↑K
state_after: no goals
tactic: rw [doset, doset, ← Set.singleton_mul_singleton, ← Set.singleton_mul_singleton, mul_assoc,
    mul_assoc, Subgroup.singleton_mul_subgroup hk, ← mul_assoc, ← mul_assoc,
    Subgroup.subgroup_mul_singleton hh]
Theorem: CliffordAlgebra.ofBaseChange_comp_toBaseChange
File: Mathlib/LinearAlgebra/CliffordAlgebra/BaseChange.lean

Proof steps:
state_before: R : Type u_1
A : Type u_2
V : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : AddCommGroup V
inst✝⁴ : Algebra R A
inst✝³ : Module R V
inst✝² : Module A V
inst✝¹ : IsScalarTower R A V
inst✝ : Invertible 2
Q : QuadraticForm R V
⊢ (ofBaseChange A Q).comp (toBaseChange A Q) = AlgHom.id A (CliffordAlgebra (QuadraticForm.baseChange A Q))
state_after: case a.a.h.h
R : Type u_1
A : Type u_2
V : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : AddCommGroup V
inst✝⁴ : Algebra R A
inst✝³ : Module R V
inst✝² : Module A V
inst✝¹ : IsScalarTower R A V
inst✝ : Invertible 2
Q : QuadraticForm R V
x : V
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((ofBaseChange A Q).comp (toBaseChange A Q)).toLinearMap ∘ₗ ι (QuadraticForm.baseChange A Q)))
        1)
      x =
    ((TensorProduct.AlgebraTensorModule.curry
          ((AlgHom.id A (CliffordAlgebra (QuadraticForm.baseChange A Q))).toLinearMap ∘ₗ
            ι (QuadraticForm.baseChange A Q)))
        1)
      x
tactic: ext x
state_before: case a.a.h.h
R : Type u_1
A : Type u_2
V : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : AddCommGroup V
inst✝⁴ : Algebra R A
inst✝³ : Module R V
inst✝² : Module A V
inst✝¹ : IsScalarTower R A V
inst✝ : Invertible 2
Q : QuadraticForm R V
x : V
⊢ ((TensorProduct.AlgebraTensorModule.curry
          (((ofBaseChange A Q).comp (toBaseChange A Q)).toLinearMap ∘ₗ ι (QuadraticForm.baseChange A Q)))
        1)
      x =
    ((TensorProduct.AlgebraTensorModule.curry
          ((AlgHom.id A (CliffordAlgebra (QuadraticForm.baseChange A Q))).toLinearMap ∘ₗ
            ι (QuadraticForm.baseChange A Q)))
        1)
      x
state_after: case a.a.h.h
R : Type u_1
A : Type u_2
V : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : AddCommGroup V
inst✝⁴ : Algebra R A
inst✝³ : Module R V
inst✝² : Module A V
inst✝¹ : IsScalarTower R A V
inst✝ : Invertible 2
Q : QuadraticForm R V
x : V
⊢ (ofBaseChange A Q) ((toBaseChange A Q) ((ι (QuadraticForm.baseChange A Q)) (1 ⊗ₜ[R] x))) =
    (ι (QuadraticForm.baseChange A Q)) (1 ⊗ₜ[R] x)
tactic: show ofBaseChange A Q (toBaseChange A Q (ι (Q.baseChange A) (1 ⊗ₜ[R] x)))
    = ι (Q.baseChange A) (1 ⊗ₜ[R] x)
state_before: case a.a.h.h
R : Type u_1
A : Type u_2
V : Type u_3
inst✝⁷ : CommRing R
inst✝⁶ : CommRing A
inst✝⁵ : AddCommGroup V
inst✝⁴ : Algebra R A
inst✝³ : Module R V
inst✝² : Module A V
inst✝¹ : IsScalarTower R A V
inst✝ : Invertible 2
Q : QuadraticForm R V
x : V
⊢ (ofBaseChange A Q) ((toBaseChange A Q) ((ι (QuadraticForm.baseChange A Q)) (1 ⊗ₜ[R] x))) =
    (ι (QuadraticForm.baseChange A Q)) (1 ⊗ₜ[R] x)
state_after: no goals
tactic: rw [toBaseChange_ι, ofBaseChange_tmul_ι]
Theorem: Finset.Shatters.mono_right
File: Mathlib/Combinatorics/SetFamily/Shatter.lean

Proof steps:
state_before: α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : t ⊆ s
hs : 𝒜.Shatters s
u : Finset α
hu : u ⊆ t
⊢ ∃ u_1 ∈ 𝒜, t ∩ u_1 = u
state_after: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : t ⊆ s
hs : 𝒜.Shatters s
v : Finset α
hv : v ∈ 𝒜
hu : s ∩ v ⊆ t
⊢ ∃ u ∈ 𝒜, t ∩ u = s ∩ v
tactic: obtain ⟨v, hv, rfl⟩ := hs (hu.trans h)
state_before: case intro.intro
α : Type u_1
inst✝ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s t : Finset α
a : α
n : ℕ
h : t ⊆ s
hs : 𝒜.Shatters s
v : Finset α
hv : v ∈ 𝒜
hu : s ∩ v ⊆ t
⊢ ∃ u ∈ 𝒜, t ∩ u = s ∩ v
state_after: no goals
tactic: exact ⟨v, hv, inf_congr_right hu <| inf_le_of_left_le h⟩
Theorem: Fintype.sum_neg
File: Mathlib/Algebra/Order/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
M : Type u_4
N : Type u_5
G : Type u_6
k : Type u_7
R : Type u_8
inst✝¹ : Fintype ι
inst✝ : OrderedCancelCommMonoid M
f : ι → M
hf : f < 1
⊢ ∃ i ∈ Finset.univ, f i < 1
state_after: no goals
tactic: simpa using (Pi.lt_def.1 hf).2
Theorem: Primrec₂.ofNat_iff
File: Mathlib/Computability/Primrec.lean

Proof steps:
state_before: α✝ : Type u_1
β✝ : Type u_2
σ✝ : Type u_3
inst✝⁵ : Primcodable α✝
inst✝⁴ : Primcodable β✝
inst✝³ : Primcodable σ✝
α : Type u_4
β : Type u_5
σ : Type u_6
inst✝² : Denumerable α
inst✝¹ : Denumerable β
inst✝ : Primcodable σ
f : α → β → σ
⊢ (Primrec fun n => f (ofNat (α × β) n).1 (ofNat (α × β) n).2) ↔
    Primrec (Nat.unpaired fun m n => f (ofNat α m) (ofNat β n))
state_after: no goals
tactic: simp
Theorem: Pell.yz_succ_succ
File: Mathlib/NumberTheory/PellMatiyasevic.lean

Proof steps:
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ yz a1 (n + 2) + yz a1 n = ↑(2 * a) * yz a1 (n + 1)
state_after: a : ℕ
a1 : 1 < a
n : ℕ
⊢ ↑(yn a1 (n + 2)) + ↑(yn a1 n) = ↑(2 * a) * ↑(yn a1 (n + 1))
tactic: delta yz
state_before: a : ℕ
a1 : 1 < a
n : ℕ
⊢ ↑(yn a1 (n + 2)) + ↑(yn a1 n) = ↑(2 * a) * ↑(yn a1 (n + 1))
state_after: no goals
tactic: rw [← Int.ofNat_add, ← Int.ofNat_mul, yn_succ_succ]
Theorem: ofBoolAlg_symmDiff
File: Mathlib/Algebra/Ring/BooleanRing.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : BooleanRing α
inst✝¹ : BooleanRing β
inst✝ : BooleanRing γ
a b : AsBoolAlg α
⊢ ofBoolAlg (a ∆ b) = ofBoolAlg a + ofBoolAlg b
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : BooleanRing α
inst✝¹ : BooleanRing β
inst✝ : BooleanRing γ
a b : AsBoolAlg α
⊢ ofBoolAlg ((a ⊔ b) \ (a ⊓ b)) = ofBoolAlg a + ofBoolAlg b
tactic: rw [symmDiff_eq_sup_sdiff_inf]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝² : BooleanRing α
inst✝¹ : BooleanRing β
inst✝ : BooleanRing γ
a b : AsBoolAlg α
⊢ ofBoolAlg ((a ⊔ b) \ (a ⊓ b)) = ofBoolAlg a + ofBoolAlg b
state_after: no goals
tactic: exact of_boolalg_symmDiff_aux _ _
Theorem: Function.IsPeriodicPt.iterate_mod_apply
File: Mathlib/Dynamics/PeriodicPts.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
f fa : α → α
fb : β → β
x y : α
m✝ n : ℕ
h : IsPeriodicPt f n x
m : ℕ
⊢ f^[m % n] x = f^[m] x
state_after: no goals
tactic: conv_rhs => rw [← Nat.mod_add_div m n, iterate_add_apply, (h.mul_const _).eq]
Theorem: HomologicalComplex.toCycles_comp_homologyπ
File: Mathlib/Algebra/Homology/ShortComplex/HomologicalComplex.lean

Proof steps:
state_before: C : Type u_1
inst✝³ : Category.{u_3, u_1} C
inst✝² : HasZeroMorphisms C
ι : Type u_2
c : ComplexShape ι
K L M : HomologicalComplex C c
φ : K ⟶ L
ψ : L ⟶ M
i j k : ι
inst✝¹ : K.HasHomology i
inst✝ : K.HasHomology j
⊢ K.d i j = 𝟙 (K.X i) ≫ K.d i j
state_after: no goals
tactic: simp
Theorem: Turing.TM2to1.trNormal_run
File: Mathlib/Computability/TuringMachine.lean

Proof steps:
state_before: K : Type u_1
inst✝² : DecidableEq K
Γ : K → Type u_2
Λ : Type u_3
inst✝¹ : Inhabited Λ
σ : Type u_4
inst✝ : Inhabited σ
k : K
s : StAct k
q : Stmt₂
⊢ trNormal (stRun s q) = goto fun x x => go k s q
state_after: no goals
tactic: cases s <;> rfl
Theorem: MvPowerSeries.inv_eq_iff_mul_eq_one
File: Mathlib/RingTheory/MvPowerSeries/Inverse.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
k : Type u_3
inst✝ : Field k
φ ψ : MvPowerSeries σ k
h : (constantCoeff σ k) ψ ≠ 0
⊢ ψ⁻¹ = φ ↔ φ * ψ = 1
state_after: no goals
tactic: rw [eq_comm, MvPowerSeries.eq_inv_iff_mul_eq_one h]